Dietary preference prediction method and device based on large language model, equipment and medium

By analyzing food images and multimodal information through large language models and neural networks, dietary preference prediction results are generated, which solves the problem that steam ovens cannot accurately judge user preferences, provides personalized cooking suggestions, and improves user cooking satisfaction.

CN120298815BActive Publication Date: 2025-10-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510788931.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-10-10
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

Existing steam ovens are unable to accurately judge users' dietary preferences, resulting in cooking results that are difficult to match personal tastes, affecting user experience and satisfaction.

Method used

By analyzing cooked food images and collecting multimodal information through a large language model, food state description features and preference features are generated. Feature vectors are extracted using a neural network, and dietary preference prediction results are generated through weighted fusion to provide cooking suggestions.

Benefits of technology

It can accurately judge users’ dietary preferences, provide personalized cooking suggestions, and improve users’ cooking satisfaction and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298815B_ABST
    Figure CN120298815B_ABST
Patent Text Reader

Abstract

The application discloses a kind of diet preference prediction method, device, equipment and medium based on large language model. The method comprises: by default large language model, the food picture of cooking is judged, and the state description feature and preference feature of food are generated;Food multimodal information in cooking process is collected, and the feature vector is obtained by feature processing of the food multimodal information through the preset neural network;The feature vector is weighted and fused with the state description feature and the preference feature to obtain fusion feature;The fusion feature is generated corresponding diet preference prediction result through preset preference prediction model, and corresponding cooking suggestion is generated according to the diet preference prediction result. By implementing the method of the application, the problem that the cooking equipment in the prior art cannot accurately judge the user's diet preference can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cooking intelligence, and in particular to a method, device, equipment and medium for predicting dietary preferences based on a large language model. Background Art

[0002] As the quality of life improves, steam ovens, as important cooking appliances in modern kitchens, are used more and more frequently. When using steam ovens, users often expect the baked food to meet their personal dietary preferences, such as a preference for a crispy crust, a tender taste, or a specific degree of doneness. However, the current cooking programs of steam ovens are mostly fixed presets, or users are required to manually adjust the parameters, which is cumbersome to operate and difficult to accurately match personal tastes. Existing steam oven technology cannot effectively evaluate the color, texture, flavor and other results of baked food, which are associated with user preferences. As a result, the cooking equipment in the existing technology cannot accurately judge the user's dietary preferences, making it difficult for users to stably obtain the ideal cooking results, affecting the user experience and satisfaction. Summary of the Invention

[0003] The embodiments of the present invention provide a method, apparatus, device and medium for predicting dietary preferences based on a large language model, aiming to solve the problem that cooking equipment in the prior art cannot accurately judge user dietary preferences.

[0004] In a first aspect, an embodiment of the present invention provides a dietary preference prediction method based on a large language model, which includes: performing preference judgment on cooked food pictures through a preset large language model to generate food state description features and preference features; collecting multimodal information of food during the cooking process, and performing feature processing on the food multimodal information through a preset neural network to obtain a feature vector; performing weighted fusion of the feature vector with the state description feature and the preference feature to obtain a fusion feature; generating a corresponding dietary preference prediction result from the fusion feature through a preset preference prediction model, and generating corresponding cooking suggestions based on the dietary preference prediction result.

[0005] In the second aspect, an embodiment of the present invention also provides a dietary preference prediction device based on a large language model, which includes: a judgment unit, used to perform preference judgment on cooked food pictures through a preset large language model, and generate food state description features and preference features; an acquisition unit, used to collect multimodal information of food during the cooking process, and perform feature processing on the food multimodal information through a preset neural network to obtain a feature vector; a fusion unit, used to perform weighted fusion of the feature vector with the state description feature and the preference feature to obtain a fusion feature; a generation unit, used to generate a corresponding dietary preference prediction result from the fusion feature through a preset preference prediction model, and generate corresponding cooking suggestions based on the dietary preference prediction result.

[0006] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0007] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above method can be implemented.

[0008] Embodiments of the present invention provide a method, apparatus, device, and medium for predicting dietary preferences based on a large language model. The method includes: performing preference judgment on images of cooked food using a preset large language model to generate food state description features and preference features; collecting multimodal information about the food during the cooking process, subjecting the multimodal information to feature processing using a preset neural network to obtain a feature vector; weightedly fusing the feature vector with the state description features and the preference features to obtain a fused feature; applying the fused feature to a preset preference prediction model to generate a corresponding dietary preference prediction result; and generating corresponding cooking suggestions based on the dietary preference prediction result. The embodiments of the present invention collect food images from a cooking device and multimodal information about the food during the cooking process to understand the state of the food being cooked. Feature extraction and acquisition of corresponding food state description features and preference features are performed based on the collected information to predict a user's dietary preferences based on sufficient information. By fusing all collected information and applying the preset preference prediction model to generate a corresponding dietary preference prediction result and corresponding cooking suggestions, the method accurately determines the user's cooking preferences, assists the user in adjusting their diet and cooking process, helps the user make food that better suits their taste, and improves user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 A schematic diagram of a flow chart of a method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0011] Figure 2 A schematic diagram of the first sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0012] Figure 3A schematic diagram of the second sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0013] Figure 4 A schematic diagram of a third sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0014] Figure 5 A schematic diagram of a fourth sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0015] Figure 6 A schematic diagram of a fifth sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0016] Figure 7 A schematic diagram of a sixth sub-process of the method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention;

[0017] Figure 8 A schematic block diagram of a dietary preference prediction device based on a large language model provided by an embodiment of the present invention;

[0018] Figure 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0020] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should be further understood that the term "and / or" used in the present description and appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0023] See also Figure 1 , Figure 1 A flow chart of a method for predicting dietary preferences based on a large language model provided in an embodiment of the present invention. The method for predicting dietary preferences based on a large language model in this embodiment can be applied to steaming and baking cooking equipment, wherein the equipment has one or more of electromagnetic heating, heating tube heating, steam heating, microwave heating, or gas heating, and a number of gas sensors, cameras, relative humidity sensors, and absolute humidity sensors are also deployed in the equipment. The camera can capture food pictures, and the gas sensor, relative humidity sensor, and absolute humidity sensor can capture multimodal information of food, so as to analyze dietary preferences based on the collected information, accurately judge the user's cooking dietary preferences, and improve user satisfaction.

[0024] Figure 1 1 is a flow chart of a method for predicting dietary preferences based on a large language model provided by an embodiment of the present invention. As shown in the figure, the method includes the following steps S110-S140.

[0025] S110: Perform preference judgment on the cooked food images using a preset large language model to generate food state description features and preference features.

[0026] In this embodiment, the large language model is an artificial intelligence model based on deep learning. In the field of cooking, the large language model can be used to analyze descriptive text in food images. The state description feature refers to a specific description of the current state of the food, and the preference feature represents the user's taste and cooking method preferences, for example, taste preferences: rich and tangy, and cooking method preferences: grilled, homemade, healthy food. A preset large language model is used to determine preference for cooked food images, generating food state description features and preference features. Specifically, after the steaming and baking cooking device completes cooking, the camera in the cooking device captures the food image. Image recognition technology identifies the cooked food in the image and extracts corresponding appearance features, such as color, shape, and texture. The image information is input into the pre-prepared large language model. The preset large language model then describes the state of the image and provides a preliminary judgment of the user's dietary preferences, generating food state description features and preference features. For example, the state description feature may be: eggplant: surface: covered with red sauce, grilled; state: evenly coated, with grill marks on the surface; preference features may be: taste preference: rich and tangy, cooking method preference: grilled, and homemade food preference: homemade, healthy food. The food description information is generated by the large language model based on the state description features and preference features of the food, providing objective and quantifiable information to facilitate the subsequent accurate prediction of the user's dietary preferences.

[0027] In one embodiment, if Figure 2 As shown, the step S110 also includes steps S111-S112.

[0028] S111, inputting the food image into the preset large language model for state description and dietary preference judgment, and generating a structured output result according to a preset template;

[0029] S112: Encode the output result to generate the state description feature and the preference feature.

[0030] In this embodiment, the preset template is a predefined output template that specifies which fields and formats the output result should include. Before inputting the food image into the preset large language model for status description and dietary preference judgment, and generating a structured output result according to the preset template, the cooking data of different ingredients is collected in advance, a large amount of sample data is established, and the actual dietary preferences of each sample are recorded. The corresponding image information is input into the pre-prepared large language model, and the large language model is required to describe the status of the image and give a preliminary judgment of the user's dietary preference through the preset template to train the large language model. The preset template can be: I uploaded a picture of food that the user has cooked. Help me analyze the cooking status of this food based on the information in this picture, and analyze the user's dietary preferences based on this food status. The trained large language model generates a corresponding structured output result according to the preset template, such as an output result in json format, and encodes the generated output result. For example, an embedding layer is created to convert the output result into a dense vector representation, thereby obtaining a status description feature and a preference feature. By generating a structured output result and encoding it to obtain the corresponding state description features and the preference features, the features can be standardized and the subsequent calculation efficiency can be improved.

[0031] S120: Collect multimodal information of food during the cooking process, perform feature processing on the multimodal information of food through a preset neural network, and obtain a feature vector.

[0032] In this embodiment, the multimodal food information is information collected from different sensors, including gas information, absolute humidity information, and relative humidity information collected by gas sensors, relative humidity sensors, and absolute humidity sensors. The multimodal food information is a pre-trained deep learning model that can receive multimodal information as input and perform feature extraction and conversion on this information through mathematical operations (such as convolution, pooling, full connection, etc.). The neural network performs multi-level abstraction and representation learning on the input multimodal information to generate corresponding feature vectors, where a feature vector is a multidimensional vector in which each dimension represents a specific feature or attribute. By subjecting the multimodal food information to feature processing through a preset neural network, a feature vector is obtained to capture key information about the food, providing a data basis for subsequent predictions of user dietary preferences.

[0033] In one embodiment, if Figure 3 As shown, the step S120 also includes steps S121-S122.

[0034] S121. Extracting features from the multimodal information using the preset neural network to generate a feature sequence;

[0035] S122: Assigning a number of features in the feature sequence to a position according to the training feature data to obtain the feature vector.

[0036] In this embodiment, the feature sequence is a sequence composed of features of multimodal information at different moments in time. The preset neural network is a pre-trained artificial neural network model that receives multimodal information as input and performs feature extraction and conversion on this information. The preset neural network extracts features from the multimodal information to generate a feature sequence. Specifically, sensors deployed in the steaming and baking appliance collect gas information, absolute humidity information, and relative humidity information at various stages or time points during cooking. Information collection can be performed at preset intervals, for example, once every minute. If the steaming and baking appliance is equipped with four gas sensors, one relative humidity sensor, one absolute humidity sensor, and one temperature sensor, and each sensor collects data at 300 time points during the cooking time, the gas information data is considered a two-dimensional array with a length of 300 and a width of 7. This two-dimensional array is then multiplied by the pre-trained neural network to produce an output, which is the extracted gas feature sequence. The number of features outputted varies depending on the structure of the pre-trained neural network and is not limited thereto. The variance, mean, initial and final time change value of the multimodal information collected at different times, the maximum sensor response of each sensor, the average sensor response of a specific cooking stage, the time to reach the peak response, the area under the curve of the sensor response, and other information can also be calculated to obtain the corresponding information features. According to the training feature data, several features in the feature sequence are ranked to obtain the feature vector. Specifically, the calculated individual features can be sorted in the training feature data set to obtain the rank of this feature, and the rank is assigned to the feature. After all features are sorted, a feature vector will be obtained. The training feature data set is composed of different collected features, and the training features are sorted according to the values ​​to represent the degree of change in the cooking features. For example, the burnt odor feature with a large value is ranked in front, and the normal odor feature with a small value is ranked behind. By obtaining the feature vector, the key information of the food is captured to understand the food state, thereby accurately judging the user's dietary preferences.

[0037] In one embodiment, if Figure 4 As shown, step S122 includes steps S1221-S1222.

[0038] S1221, sequentially arrange the features in the feature sequence in the training feature data to obtain the position of each feature in the training feature data;

[0039] S1221, assign the position to the corresponding feature, and determine the feature vector according to the feature sequence after the assignment.

[0040] In the embodiment, the feature sequence refers to a feature set obtained by processing multi-modal information collected at different times during cooking by a neural network. These features can be arranged in chronological order to form a feature sequence. A plurality of features in the feature sequence are sequentially arranged in the training feature data to obtain the position of each feature in the training feature data. For example, there are 3000 training samples in the training set, and a certain gas feature is ranked 322nd in all training sets from large to small. Assign the position to the corresponding feature, and the ranking feature position is 322. Determine the feature vector according to the feature sequence after the assignment, that is, sort all features to obtain a feature vector, for example, [feature a position 322, feature b position 567, …, feature N position n]. Finally, normalize the sorted features. The features in the training feature data are also arranged according to the feature values, for example, the features with more mouth are arranged in front. According to the difference of feature position, the user's eating preference can be understood, which is convenient for subsequent preference prediction. By determining the feature vector according to the feature sequence after the assignment, the accuracy of user eating preference prediction can be improved.

[0041] S130, weight and fuse the feature vector, the state description feature and the preference feature to obtain a fused feature.

[0042] In this embodiment, weighted fusion combines multiple features or data sources, each of which is assigned a weight to indicate its importance or contribution to the final fusion result. The feature vector is weightedly fused with the state description feature and the preference feature to obtain a fused feature. Specifically, weights are assigned to the feature vector, state description feature, and preference feature. These weights can be set based on the actual application scenario, data characteristics, or expert knowledge, and are not limited to this. For example, if the state description feature is considered most important in the current application, it can be assigned a higher weight; if the preference feature has less impact on the final result, it can be assigned a lower weight. Before weighted fusion, each feature can be normalized to eliminate dimensional differences between features. Normalization methods include min-max normalization and Z-score normalization, and the choice of method is not limited. The feature vector, state description feature, and preference feature are each multiplied by their corresponding weights, and the resulting results are summed to obtain the fused feature. Alternatively, a fused feature can be obtained through simple feature concatenation. By weighted fusion of all features, fusion features are obtained to obtain features that integrate multiple information, providing more accurate and comprehensive information for subsequent dietary preference prediction.

[0043] In one embodiment, if Figure 5 As shown, the step S130 also includes steps S131-S132.

[0044] S131, performing weighted fusion on the feature vector, the state description feature, and the preference feature to generate a high-dimensional vector;

[0045] S132: Determine whether the high-dimensional vector exceeds a preset feature dimension. If so, perform dimensionality reduction using a preset dimensionality reduction method to obtain the fusion feature.

[0046] In this embodiment, the preset feature dimension is a pre-set threshold value used to limit the maximum dimension of the fused feature. This threshold value may be set based on factors such as computing resources, model performance or application requirements, and is not limited to this. The feature vector is weightedly fused with the state description feature and the preference feature to generate a high-dimensional vector. Specifically, weights are assigned to the feature vector, state description feature and preference feature respectively, and the feature vector, state description feature and preference feature are multiplied by their corresponding weights respectively, and then the results are added to generate a high-dimensional vector. For example, high-dimensional vector = weight 1 * feature vector + weight 2 * state description feature + weight 3 * preference feature. Determine whether the high-dimensional vector exceeds the preset feature dimension. If it exceeds, reduce the dimension by a preset dimensionality reduction method to obtain the fused feature. Specifically, calculate the dimension of the high-dimensional vector, that is, the number of features. Compare the dimension of the high-dimensional vector with the preset feature dimension. If the dimension of the high-dimensional vector exceeds the preset feature dimension, it needs to be reduced in dimension. If the dimensionality of a high-dimensional vector exceeds the preset feature dimension, one or more of the following dimensionality reduction methods can be used: principal component analysis (PCA): projects high-dimensional data into a low-dimensional space through linear transformation, preserving the maximum variance; t-SNE (t-distributed stochastic neighbor embedding): used to visualize high-dimensional data while preserving its local structure; and autoencoders: learning low-dimensional representations of data through neural networks. Selecting an appropriate dimensionality reduction method converts the high-dimensional vector into a low-dimensional vector, thereby obtaining a low-dimensional fused feature vector. By selecting an appropriate dimensionality reduction method, the high-dimensional vector is converted into a low-dimensional vector, comprehensively considering the information of the feature vector, state descriptors, and preference features, while maintaining a low dimensionality for subsequent processing and analysis.

[0047] S140: Generate corresponding dietary preference prediction results based on the fusion features through a preset preference prediction model, and generate corresponding cooking suggestions based on the dietary preference prediction results.

[0048] In this embodiment, the preset preference prediction model is a trained deep learning model used to predict a user's dietary preferences based on an input feature vector. The model can employ techniques such as decision trees, support vector machines, and neural networks, trained using historical data to ensure that the model learns the relationship between features and dietary preferences. The fused features are applied to the preset preference prediction model to generate corresponding dietary preference prediction results. Cooking suggestions are then generated based on these dietary preference prediction results. Specifically, the model calculates based on the input fused features and outputs a predicted dietary preference result for the user. For example, the model predicts that the user has a high preference for healthy, low-fat foods. Based on the dietary preference prediction results output by the model, cooking suggestions tailored to the user are generated. Cooking suggestions may include recommended ingredients, cooking methods, seasonings, and more. For example, if a user has a high preference for a certain food, more related recipes or cooking methods may be recommended. If a user has a low preference for a certain food, suggestions to avoid or substitute other ingredients may be made. The trained preference prediction model can accurately predict a user's dietary preferences, and the generated cooking suggestions help users choose recipes that suit their tastes and health needs, thereby increasing their satisfaction and engagement with the cooking process.

[0049] In one embodiment, if Figure 6 As shown, the step S140 also includes steps S1401-S1402 before the step S140.

[0050] S1401, selecting an initial classification model according to the task type;

[0051] S1402. Train and update the initial classification model using training data and a preset loss function to generate the preset preference prediction model that can perform preference prediction.

[0052] In this embodiment, the task type is the type of task to be performed by the constructed model. In this embodiment, the task type is a classification task (classifying the input features into different taste preferences, for example, the preset taste preference is one of [crunchy, tender, bland, spicy, or very spicy]). Therefore, a classification model is selected. Logistic regression, SVM, random forest, or neural network (such as MLP) can be used as the initial classification model. A deep learning model can also be used for structural design to obtain the initial classification model. The designed model must include: an input layer (accepting concatenated feature vectors), a hidden layer (using a fully connected layer, convolutional layer, or LSTM layer to extract features), and an output layer (output designed based on the task type, such as a probability distribution for classification tasks and a continuous value for regression tasks). The initial classification model is trained and updated using training data and a preset loss function to generate the preset preference prediction model capable of performing preference prediction. Specifically, a training dataset is prepared, including input features and corresponding labels (such as user preference ratings or classification labels for food). The dataset should be divided into a training set, a validation set, and a test set to facilitate evaluation of model performance. Select an appropriate loss function according to the task type, for example, the mean squared error loss function. Use an optimizer (such as Adam, SGD) and loss function and a training set to train the model. Adjust hyperparameters such as learning rate, batch size, and number of training rounds to optimize model performance, and use validation sets and test sets to evaluate model performance to ensure that the model has good generalization capabilities. Evaluation indicators include accuracy, precision, recall, F1 score, etc. (classification tasks) or mean squared error, mean absolute error, etc. (regression tasks). After training is completed, the model can be used to predict the preference results of new data, then the model is the preset preference prediction model. By generating the preset preference prediction model that can perform preference prediction, preference prediction can be effectively performed based on the collected data to provide personalized dietary recommendations.

[0053] In one embodiment, if Figure 7 As shown, step S140 includes steps S141-S142.

[0054] S141, filtering out corresponding recipes and cooking suggestions to be recommended based on the dietary preference prediction results;

[0055] S142: Display the recipe to be recommended, the cooking suggestion, and the dietary preference prediction result.

[0056] In this embodiment, the cooking device's cloud contains a large number of recipes. Based on the dietary preference prediction results, the system filters out corresponding recipes and cooking suggestions to be recommended. Based on the dietary preference prediction results, the system then selects recipes from the recipe database that match the user's preferences. This screening process may involve matching recipes based on multiple dimensions, such as ingredients, flavors, and cooking methods. For example, if a user prefers low-fat foods, the system will prioritize low-fat or fat-free recipes. In addition to filtering recipes, the system also generates personalized cooking suggestions based on the user's dietary preferences and current availability (such as available ingredients and cooking equipment). Cooking suggestions may include adjusting ingredient amounts, recommending alternative ingredients, and providing cooking tips or precautions. The filtered recipes and generated cooking suggestions are combined into a list to be recommended. This list can be sorted based on factors such as user preference, recipe popularity, and cooking difficulty, making it easier for users to find their desired recipes. The recommended recipes, cooking suggestions, and dietary preference prediction results are displayed, specifically on the cooking device's screen or on the corresponding app terminal. By filtering out and displaying recommended recipes and cooking suggestions, users can easily find recipes that suit their preferences and get personalized cooking suggestions, thereby improving the dining experience and user satisfaction.

[0057] Figure 8 : is a schematic block diagram of a dietary preference prediction device 200 based on a large language model provided by an embodiment of the present invention. Figure 8 As shown, corresponding to the above-mentioned dietary preference prediction method based on a large language model, the present invention also provides a dietary preference prediction device based on a large language model. The dietary preference prediction device based on a large language model includes a unit for executing the above-mentioned dietary preference prediction method based on a large language model. The device can be configured in a terminal such as a desktop computer, a tablet computer, a laptop computer, etc. Specifically, please refer to Figure 8 The dietary preference prediction device based on a large language model includes a judgment unit 210, a collection unit 220, a fusion unit 230 and a generation unit 240.

[0058] The judgment unit 210 is used to perform preference judgment on the cooked food pictures using a preset large language model to generate state description features and preference features of the food.

[0059] In one embodiment, the determination unit 210 includes an input unit and an encoding unit.

[0060] An input unit, configured to input the food image into the preset large language model for state description and dietary preference judgment, and generate a structured output result according to a preset template;

[0061] An encoding unit is used to encode the output result to generate the state description feature and the preference feature.

[0062] The collection unit 220 is used to collect multimodal information of food during the cooking process, perform feature processing on the multimodal information of food through a preset neural network, and obtain a feature vector.

[0063] In one embodiment, the acquisition unit 220 includes an extraction unit and an assignment unit.

[0064] an extraction unit, configured to extract features from the multimodal information using the preset neural network to generate a feature sequence;

[0065] The assignment unit is used to assign positions to several features in the feature sequence according to the training feature data to obtain the feature vector.

[0066] In one embodiment, the collecting unit 220 includes a sorting unit and a determining unit.

[0067] a sorting unit, configured to sequentially sort the features in the feature sequence in the training feature data, and obtain a rank of each feature in the training feature data;

[0068] A determining unit is used to assign the rank to the corresponding feature and determine the feature vector according to the assigned feature sequence.

[0069] The fusion unit 230 is configured to perform weighted fusion on the feature vector, the state description feature, and the preference feature to obtain a fused feature.

[0070] In one embodiment, the fusion unit 230 includes a weighting unit and a dimensionality reduction unit.

[0071] A weighting unit, configured to perform weighted fusion of the feature vector, the state description feature, and the preference feature to generate a high-dimensional vector;

[0072] The dimensionality reduction unit is used to determine whether the high-dimensional vector exceeds the preset feature dimension. If so, the dimensionality is reduced by a preset dimensionality reduction method to obtain the fusion feature.

[0073] The generating unit 240 is configured to generate corresponding dietary preference prediction results based on the fusion features through a preset preference prediction model, and generate corresponding cooking suggestions based on the dietary preference prediction results.

[0074] In one embodiment, the generating unit 240 includes a selecting unit and an updating unit.

[0075] A selection unit, used to select an initial classification model according to the task type;

[0076] an updating unit configured to train and update the initial classification model by using the training data and a preset loss function, to generate the preset preference prediction model capable of performing preference prediction.

[0077] In an embodiment, the generating unit 240 includes a selecting unit and an updating unit.

[0078] a screening unit configured to screen out corresponding to-be-recommended recipes and cooking suggestions according to the diet preference prediction result;

[0079] a display unit configured to display the to-be-recommended recipes, the cooking suggestions, and the diet preference prediction result.

[0080] It should be noted that the specific implementation process of the above-mentioned diet preference prediction apparatus 200 based on a large language model and each unit can be clearly understood by those skilled in the art, which can be referred to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.

[0081] The above-mentioned diet preference prediction apparatus based on a large language model can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 9 .

[0082] Please refer to Figure 9 , Figure 9 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and an electronic device with a communication function. The server can be a stand-alone server or a server cluster composed of multiple servers.

[0083] Please refer to Figure 9 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.

[0084] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which when executed, can cause the processor 502 to perform a diet preference prediction method based on a large language model.

[0085] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.

[0086] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a dietary preference prediction method based on a large language model.

[0087] The network interface 505 is used to communicate with other devices through the network. Figure 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0088] The processor 502 is configured to run a computer program 5032 stored in the memory to implement the steps of the above method.

[0089] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0090] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.

[0091] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor performs the steps of the above method.

[0092] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0093] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0094] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0095] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0096] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (such as a personal computer, terminal, or network device) to execute all or part of the steps of the method described in various embodiments of the present invention.

[0097] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A dietary preference prediction method based on a large language model, characterized in that: include: Using a preset large language model, the cooked food images are used for preference judgment to generate food state description features and preference features, wherein the preference features include the user's taste preference and cooking method preference; Collecting multimodal information of food during the cooking process, performing feature processing on the multimodal information of food through a preset neural network to obtain a feature vector; Performing weighted fusion of the feature vector, the state description feature, and the preference feature to obtain a fusion feature; The fusion features are used to generate corresponding dietary preference prediction results through a preset preference prediction model, and corresponding cooking suggestions are generated based on the dietary preference prediction results; The step of collecting multimodal information of food during the cooking process, performing feature processing on the multimodal information of food through a preset neural network, and obtaining a feature vector includes: Extracting features from the multimodal information using the preset neural network to generate a feature sequence; Assigning positions to several features in the feature sequence according to the training feature data to obtain the feature vector; Before the step of generating corresponding dietary preference prediction results by using the fusion features through a preset preference prediction model, the method includes: Select an initial classification model based on the task type; The initial classification model is trained and updated through training data and a preset loss function to generate the preset preference prediction model that can perform preference prediction.

2. The method according to claim 1, characterized in that The step of performing preference judgment on the cooked food image by using a preset large language model to generate food state description features and preference features includes: Input the food image into the preset large language model for status description and dietary preference judgment, and generate a structured output result according to a preset template; The output result is encoded to generate the state description feature and the preference feature.

3. The method according to claim 1, characterized in that The step of assigning positions of the features in the feature sequence according to the training feature data to obtain the feature vector includes: Sort the features in the feature sequence in the training feature data in sequence, and obtain the rank of each feature in the training feature data; The rank is assigned to the corresponding feature, and the feature vector is determined according to the assigned feature sequence.

4. The method according to claim 1, wherein The step of performing weighted fusion of the feature vector, the state description feature, and the preference feature to obtain a fused feature includes: Performing weighted fusion of the feature vector, the state description feature, and the preference feature to generate a high-dimensional vector; Determine whether the high-dimensional vector exceeds the preset feature dimension. If so, reduce the dimension using a preset dimensionality reduction method to obtain the fusion feature.

5. The method according to claim 1, wherein The step of generating corresponding cooking suggestions based on the dietary preference prediction results includes: Filtering corresponding recipes and cooking suggestions to be recommended based on the dietary preference prediction results; The recipe to be recommended, the cooking suggestion, and the dietary preference prediction result are displayed.

6. A dietary preference prediction device based on a large language model, characterized in that: The apparatus comprises means for executing the method according to any one of claims 1 to 5.

7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 5 can be implemented.

Citation Information

Patent Citations

  • Semantic segmentation-based food material image processing method and device, equipment and medium

    CN117975440A

  • Oven control method and device, electronic equipment and storage medium

    CN120010308A