Method, device, equipment and storage medium for intelligently judging dish categories
Through the online dish database and improved neural network model, the problem of inaccurate dish classification is solved and the digital and accurate judgment of dish categories is achieved.
Patent Information
- Application Number
- CN202211634718.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-12-19
AI Technical Summary
It is difficult for the existing technology to achieve digital and accurate classification of multiple types of dishes in different cuisines, and the expert evaluation method is susceptible to personal experience and physical condition, resulting in inaccurate classification.
The online dish database obtains text, pictures and cooking video data, performs feature extraction and dimensionality reduction processing, establishes and optimizes the dish category intelligent judgment model, and uses the improved neural network model to judge the dish category.
It realizes digital and accurate judgment of dish categories, reduces the influence of subjective factors, and improves the accuracy and consistency of classification.
Smart Images

Figure CN116188840B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for intelligently determining the category of a dish. Background Art
[0002] In the Qing Dynasty, the four major cuisines of Shandong, Sichuan, Guangdong and Jiangsu were formed. Later, local cuisines such as Fujian, Zhejiang, Hunan and Anhui also gradually became famous, thus forming China's "Eight Major Cuisine", namely Shandong cuisine, Sichuan cuisine, Cantonese cuisine, Jiangsu cuisine, Fujian cuisine, Zhejiang cuisine, Hunan cuisine and Anhui cuisine. Different cuisines contain numerous dishes. Therefore, how to realize the digital and accurate classification of multiple types of dishes of different cuisines has become a technical problem that needs to be solved urgently. The current traditional method mainly adopts expert evaluation. The gourmet master obtains the target dish information through his own senses or instruments, and then classifies the target dish according to his own subjective consciousness and experience. However, the expert evaluation method is easily affected by subjective factors such as the expert's personal experience and physical condition, which leads to inaccurate classification of the target dish.
[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of the present invention is to provide a method, device, equipment and storage medium for intelligently judging the category of dishes, aiming to solve the technical problem in the existing technology that it is difficult to achieve accurate digital classification of multiple types of dishes from different cuisines.
[0005] To achieve the above object, the present invention provides a method for intelligently determining the category of a dish, the method comprising the following steps:
[0006] Obtain various dish text data, dish image data, and dish cooking video data through the online dish database;
[0007] Extracting features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors;
[0008] Establishing a dish category intelligent judgment model, and iteratively optimizing the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained;
[0009] The current dish to be judged is obtained, and the dish to be judged is input into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain the intelligent judgment result of the dish category to be judged.
[0010] Optionally, the feature extraction of the various types of dish text data, dish image data, and dish cooking video data to obtain a dish category feature vector includes:
[0011] Using a residual network, local features of the various types of dish text data, dish image data, and dish cooking video data are extracted to obtain local features of the various types of dishes;
[0012] The local features of each type of dish are subjected to dimensionality reduction processing through a convolutional neural network model to obtain the local features of each type of dish after dimensionality reduction;
[0013] The local features of various dishes after dimensionality reduction are input into the improved VLAD neural network model to obtain the dish category feature vector.
[0014] Optionally, the step of establishing a dish category intelligent judgment model and iteratively optimizing parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained includes:
[0015] Setting the neural network part of the dish category intelligent judgment model according to the dish category feature vector;
[0016] The neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
[0017] Optionally, the optimizing the neural network portion of the intelligent dish category judgment model to obtain an intelligent dish category judgment model that meets preset accuracy requirements includes:
[0018] A particle swarm is randomly generated according to the dish category feature vector, and the PSO parameters are initialized to solve the individual extreme value and group extreme value of the particle swarm;
[0019] Performing crossover and mutation operations on the individual extreme value and the group extreme value of the particle swarm to obtain new individual extreme value and group extreme value;
[0020] Repeat the above operation until the individual extreme value and the group extreme value of the particle swarm are less than the preset error value, and the number of repeated iterations exceeds the preset number of iterations, and the target individual extreme value and group extreme value are obtained;
[0021] According to the target individual machine value and group extreme value, the parameters of the dish category intelligent judgment model are optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
[0022] Optionally, the optimizing the parameters of the intelligent judgment model for dish category according to the target individual probability value and the group extreme value to obtain the intelligent judgment model for dish category that meets the preset accuracy requirement includes:
[0023] Determine the weight and threshold of the intelligent judgment model for the dish category based on the target individual probability value and group extreme value;
[0024] The weights and thresholds of the intelligent judgment model for the dish category are iterated by the energy function gradient method to obtain the optimal weights and thresholds;
[0025] Based on the optimal weights and thresholds, an intelligent dish category judgment model that meets preset accuracy requirements is established.
[0026] Optionally, before extracting features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors, the method further includes:
[0027] Establish dish data cleaning rules based on the preset data importance;
[0028] According to the dish data cleaning rules, useless data, abnormal data and duplicate data in the various types of dish text data, dish image data and dish cooking video data are eliminated.
[0029] Optionally, after obtaining the current dish to be judged and inputting the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirement, and obtaining the intelligent judgment result of the dish category to be judged, the method further includes:
[0030] According to the preset acquisition cycle, obtain the current dish to be judged;
[0031] According to the newly acquired dish to be judged, the dish category intelligent judgment model that meets the preset accuracy requirements is optimized and corrected to obtain a new dish category intelligent judgment model;
[0032] The newly acquired dish to be judged is input into a new dish category intelligent judgment model to obtain a new dish category intelligent judgment result.
[0033] In addition, to achieve the above-mentioned purpose, the present invention further proposes a device for intelligently determining the category of a dish, the device comprising:
[0034] The acquisition module is used to obtain various dish text data, dish image data and dish cooking video data through the online dish database;
[0035] A processing module is used to extract features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors;
[0036] A modeling module, configured to establish a dish category intelligent judgment model and iteratively optimize the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained;
[0037] The judgment module is used to obtain the current dish to be judged, and input the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain the intelligent judgment result of the dish category to be judged.
[0038] In addition, to achieve the above-mentioned purpose, the present invention also proposes a dish category intelligent judgment device, which includes: a memory, a processor, and a dish category intelligent judgment program stored on the memory and running on the processor, and the dish category intelligent judgment program is configured to implement the dish category intelligent judgment method described above.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a dish category intelligent judgment program is stored. When the dish category intelligent judgment program is executed by a processor, the dish category intelligent judgment method described above is implemented.
[0040] The present invention discloses a method, device, equipment and storage medium for intelligently judging the category of dishes. The method includes: obtaining various types of dish text data, dish image data and dish cooking video data through a network dish database; performing feature extraction on the various types of dish text data, dish image data and dish cooking video data to obtain dish category feature vectors; establishing a dish category intelligent judgment model, and iteratively optimizing the parameters of the dish category intelligent judgment model according to the dish category feature vectors until a dish category intelligent judgment model that meets preset accuracy requirements is obtained; obtaining the current dish to be judged, and inputting the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged, thereby digitally and accurately judging the category of the target dish through a method combining the network dish database and the improved neural network model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a schematic diagram of the structure of a device for intelligently determining the category of a dish in a hardware operating environment according to an embodiment of the present invention;
[0042] Figure 2 This is a flow chart of the first embodiment of the method for intelligently determining the category of a dish according to the present invention;
[0043] Figure 3 This is a flow chart of a second embodiment of the method for intelligently determining the category of a dish according to the present invention;
[0044] Figure 4This is a flow chart of a third embodiment of the method for intelligently determining the category of a dish according to the present invention;
[0045] Figure 5 This is a schematic diagram of the functional modules of the first embodiment of the intelligent device for determining the category of dishes according to the present invention.
[0046] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0047] 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 the embodiments. 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.
[0048] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a device for intelligently judging the flavor of a dish in the hardware operating environment involved in an embodiment of the present invention.
[0049] like Figure 1 As shown, the intelligent dish flavor judgment device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. In the present invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) memory or a stable memory (NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0050] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the device for intelligently judging the flavor of a dish, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0051] like Figure 1 As shown, the memory 1005 identified as a computer storage medium may include an operating system, a network communication module, a user interface module, and a dish category intelligent judgment program.
[0052] exist Figure 1 In the dish category intelligent judgment device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the user device; the dish category intelligent judgment device calls the dish category intelligent judgment program stored in the memory 1005 through the processor 1001, and executes the dish category intelligent judgment method provided by the embodiment of the present invention.
[0053] Based on the above hardware structure, an embodiment of the intelligent method for determining the category of dishes of the present invention is proposed.
[0054] Reference Figure 2 , Figure 2 This is a flow chart of the first embodiment of the intelligent method for determining the category of a dish according to the present invention, and provides the first embodiment of the intelligent method for determining the category of a dish according to the present invention.
[0055] In the first embodiment, the method for intelligently determining the category of a dish includes the following steps:
[0056] Step S10: Obtain various dish text data, dish image data, and dish cooking video data through the online dish database.
[0057] It should be understood that the execution subject of this embodiment is a dish category intelligent judgment device, which has functions such as data processing, data communication and program running.
[0058] It should be noted that the online dish database is established by collecting various dish information on the Internet, including various dish text data, dish picture data and dish cooking video data. After collection, the various dish text data, dish picture data and dish cooking video data will be cleaned. Specifically, dish data cleaning rules are established based on the preset data importance; according to the dish data cleaning rules, useless data, abnormal data and duplicate data in the various dish text data, dish picture data and dish cooking video data are eliminated. The cleaning principle here will eliminate redundant video data.
[0059] Step S20: performing feature extraction on the various types of dish text data, dish image data, and dish cooking video data to obtain a dish category feature vector.
[0060] In the specific implementation, local features of the various types of dish text data, dish image data and dish cooking video data are extracted through the residual network to obtain local features of various types of dishes; the local features of various types of dishes are subjected to dimensionality reduction processing through the convolutional neural network model to obtain the local features of various types of dishes after dimensionality reduction; the local features of various types of dishes after dimensionality reduction are input into the improved VLAD neural network model to obtain the dish category feature vector.
[0061] Step S30: Establish a dish category intelligent judgment model, and iteratively optimize the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets the preset accuracy requirements is obtained.
[0062] In a specific implementation, the neural network part of the dish category intelligent judgment model is set according to the dish category feature vector; the neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
[0063] Step S40: Obtain the current dish to be judged, and input the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged.
[0064] It should be understood that according to the preset acquisition cycle, the current dish to be judged is obtained; based on the newly acquired current dish to be judged, the dish category intelligent judgment model that meets the preset accuracy requirements is optimized and corrected to obtain a new dish category intelligent judgment model; the newly acquired dish to be judged is input into the new dish category intelligent judgment model to obtain a new dish category intelligent judgment result, thereby realizing continuous optimization and updating of the dish category intelligent judgment model.
[0065] In this embodiment, various types of dish text data, dish image data and dish cooking video data are obtained through the network dish database; feature extraction is performed on the various types of dish text data, dish image data and dish cooking video data to obtain dish category feature vectors; a dish category intelligent judgment model is established, and the parameters of the dish category intelligent judgment model are iteratively optimized according to the dish category feature vectors until a dish category intelligent judgment model that meets the preset accuracy requirements is obtained; the current dish to be judged is obtained, and the dish to be judged is input into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged, thereby digitally and accurately judging the category of the target dish through the method of combining the network dish database and the improved neural network model.
[0066] Reference Figure 3 , Figure 3This is a flow chart of the second embodiment of the intelligent method for determining the category of dishes according to the present invention. Figure 2 The first embodiment shown here is a second embodiment of the method for intelligently determining the category of a dish according to the present invention.
[0067] In the second embodiment, step S30 includes:
[0068] Step S301: According to the dish category feature vector, the neural network part of the dish category intelligent judgment model is set.
[0069] It should be noted that this embodiment uses a PSO-GA neural network. That is, at the beginning of the operation, the PSO algorithm is used to find an iterative population of dish categories (this iterative population contains individuals close to the optimal). In this step, the dimension of the particles D = M × H + H × N + H + N, where M is the input dimension, N is the output dimension, and H is the number of hidden layer nodes. The initial weights and thresholds will randomly affect the accuracy and convergence speed of the model results, but the impact is small and can be ignored. The iterative dish category population obtained is used as the first generation of the GA to search for the optimal solution.
[0070] Step S302: Optimize the neural network part of the intelligent judgment model for the category of dishes to obtain an intelligent judgment model for the category of dishes that meets the preset accuracy requirements.
[0071] In a specific implementation, a particle swarm is randomly generated according to the feature vector of the dish category, and the PSO parameters are initialized to solve the individual extreme value and group extreme value of the particle swarm; crossover and mutation operations are performed on the individual extreme value and group extreme value of the particle swarm to obtain new individual machine value and group extreme value; the above operations are repeated until the individual extreme value and group extreme value of the particle swarm are less than the preset error value, and the number of repeated iterations exceeds the preset number of iterations, and the target individual machine value and group extreme value are obtained; according to the target individual machine value and group extreme value, the parameters of the dish category intelligent judgment model are optimized to obtain An intelligent judgment model for dish categories that meets preset accuracy requirements, wherein the parameters of the intelligent judgment model for dish categories are optimized according to the target individual machine value and the group extreme value to obtain the intelligent judgment model for dish categories that meets the preset accuracy requirements, including: determining the weights and thresholds of the intelligent judgment model for dish categories according to the target individual machine value and the group extreme value; iterating the weights and thresholds of the intelligent judgment model for dish categories through the energy function gradient method to obtain the optimal weights and thresholds; and establishing the intelligent judgment model for dish categories that meets the preset accuracy requirements according to the optimal weights and thresholds.
[0072] It should be noted that to prevent the algorithm from experiencing low efficiency and falling into a local optimum in its early stages, the model's mutation threshold is adaptively lowered as the program runs. The optimal particle position in the model undergoes several iterations of training based on the principle of negative gradient descent of the energy function to determine the final weights.
[0073] In this embodiment, various types of dish text data, dish image data and dish cooking video data are obtained through the network dish database; feature extraction is performed on the various types of dish text data, dish image data and dish cooking video data to obtain dish category feature vectors; according to the dish category feature vectors, the neural network part of the dish category intelligent judgment model is set; the neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements; the current dish to be judged is obtained, and the dish to be judged is input into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged, thereby digitally and accurately judging the category of the target dish through the method of combining the network dish database and the improved neural network model.
[0074] Reference Figure 4 , Figure 4 This is a flow chart of the third embodiment of the intelligent method for determining the category of dishes according to the present invention. Figure 2 The first embodiment shown here is a third embodiment of the method for intelligently determining the category of dishes according to the present invention.
[0075] In the third embodiment, step S20 includes:
[0076] Step S201: Using a residual network, local features of the various types of dish text data, dish image data, and dish cooking video data are extracted to obtain local features of the various types of dishes.
[0077] It should be noted that the residual network based on ResNet18 extracts local features of various dishes. Here, feature extraction of images is required and classification is not required, so the last fully connected layer FC in the original ResNet18 network is removed; in addition, since the pooling operation will reduce the accuracy of the feature maps of various dishes, in order to retain the characteristics of the original dishes to a greater extent, the average pooling layer avgpool before the fully connected layer of various dishes is removed, and finally a feature extraction backbone network composed of the first several layers of ResNet18 is obtained.
[0078] Step S202: The local features of each type of dish are subjected to dimensionality reduction processing through a convolutional neural network model to obtain the local features of each type of dish after dimensionality reduction.
[0079] It should be noted that the input part mainly performs dimensionality reduction processing on the local features of various dishes. It consists of a convolution layer with a convolution kernel size of 6×6 and a stride of 2, and a maximum pooling layer with a size of 4×4 and a stride of 2. After the 207×207 input local features of various dishes are processed by these two layers, the local features of various dishes with a size of 56×56 are obtained, thereby realizing the dimensionality reduction operation.
[0080] Step S203: Input the local features of each type of dish after dimensionality reduction into the improved VLAD neural network model to obtain a dish category feature vector.
[0081] It should be noted that the NetVLAD dish cooking video data feature extraction consists of two parts: a backbone network based on the residual network ResNet18 and a NetVLAD layer improved based on the ASPP module. NetVLAD is the neural network implementation of VLAD, which consists of a standard convolutional layer, a softmax layer, a VLAD cor aggregation layer, and an L2 normalization layer. The final output is the dish category feature vector.
[0082] In this embodiment, various types of dish text data, dish image data and dish cooking video data are obtained through the network dish database; local features of the various types of dish text data, dish image data and dish cooking video data are extracted through the residual network to obtain local features of various types of dishes; the local features of various types of dishes are subjected to dimensionality reduction processing through a convolutional neural network model to obtain local features of various types of dishes after dimensionality reduction; the local features of various types of dishes after dimensionality reduction are input into an improved VLAD neural network model to obtain a dish category feature vector; an intelligent judgment model for dish category is established, and the parameters of the intelligent judgment model for dish category are iteratively optimized according to the dish category feature vector until an intelligent judgment model for dish category that meets the preset accuracy requirements is obtained; the current dish to be judged is obtained, and the dish to be judged is input into the intelligent judgment model for dish category that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged, thereby performing high-precision classification on each dish.
[0083] In addition, an embodiment of the present invention further proposes a storage medium, on which a dish category intelligent judgment program is stored. When the dish category intelligent judgment program is executed by a processor, the steps of the dish category intelligent judgment method described above are implemented.
[0084] Since the storage medium can adopt the technical solutions of all the above embodiments, it at least has the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0085] Reference Figure 5 , Figure 5This is a schematic diagram of the functional modules of the first embodiment of the intelligent device for determining the category of dishes according to the present invention.
[0086] In a first embodiment of the intelligent device for determining the category of a dish according to the present invention, the device comprises:
[0087] The acquisition module 10 is used to obtain various dish text data, dish image data and dish cooking video data through the online dish database;
[0088] The processing module 20 is used to extract features from the various types of dish text data, dish image data, and dish cooking video data to obtain a dish category feature vector;
[0089] A modeling module 30 is used to establish a dish category intelligent judgment model and iteratively optimize the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained;
[0090] The judgment module 40 is used to obtain the current dish to be judged, and input the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain the intelligent judgment result of the dish category to be judged.
[0091] In this embodiment, various types of dish text data, dish image data and dish cooking video data are obtained through the network dish database; feature extraction is performed on the various types of dish text data, dish image data and dish cooking video data to obtain dish category feature vectors; a dish category intelligent judgment model is established, and the parameters of the dish category intelligent judgment model are iteratively optimized according to the dish category feature vectors until a dish category intelligent judgment model that meets the preset accuracy requirements is obtained; the current dish to be judged is obtained, and the dish to be judged is input into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged.
[0092] In one embodiment, the processing module 20 is further configured to perform feature extraction on the various types of dish text data, dish image data, and dish cooking video data to obtain a dish category feature vector, including:
[0093] Using a residual network, local features of the various types of dish text data, dish image data, and dish cooking video data are extracted to obtain local features of the various types of dishes;
[0094] The local features of each type of dish are subjected to dimensionality reduction processing through a convolutional neural network model to obtain the local features of each type of dish after dimensionality reduction;
[0095] The local features of various dishes after dimensionality reduction are input into the improved VLAD neural network model to obtain the dish category feature vector.
[0096] In one embodiment, the processing module 20 is further configured to establish a dish category intelligent judgment model and iteratively optimize the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained, including:
[0097] According to the dish category feature vector, the neural network part of the dish category intelligent judgment model is set; the neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
[0098] In one embodiment, the processing module 20 is further configured to optimize the neural network portion of the intelligent dish category determination model to obtain an intelligent dish category determination model that meets preset accuracy requirements, including:
[0099] A particle swarm is randomly generated according to the dish category feature vector, and the PSO parameters are initialized to solve the individual extreme value and group extreme value of the particle swarm;
[0100] Performing crossover and mutation operations on the individual extreme value and the group extreme value of the particle swarm to obtain new individual extreme value and group extreme value;
[0101] Repeat the above operation until the individual extreme value and the group extreme value of the particle swarm are less than the preset error value, and the number of repeated iterations exceeds the preset number of iterations, and the target individual extreme value and group extreme value are obtained;
[0102] According to the target individual machine value and group extreme value, the parameters of the dish category intelligent judgment model are optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
[0103] In one embodiment, the processing module 20 is further configured to optimize the parameters of the intelligent dish category determination model based on the target individual probability value and the group extreme value to obtain an intelligent dish category determination model that meets preset accuracy requirements, including:
[0104] Determine the weight and threshold of the intelligent judgment model for the dish category based on the target individual probability value and group extreme value;
[0105] The weights and thresholds of the intelligent judgment model for the dish category are iterated by the energy function gradient method to obtain the optimal weights and thresholds;
[0106] Based on the optimal weights and thresholds, an intelligent dish category judgment model that meets preset accuracy requirements is established.
[0107] In one embodiment, the modeling module 30 is further configured to extract features from the various types of dish text data, dish image data, and dish cooking video data, and before obtaining the dish category feature vector, further includes:
[0108] Establish dish data cleaning rules based on the preset data importance;
[0109] According to the dish data cleaning rules, useless data, abnormal data and duplicate data in the various types of dish text data, dish image data and dish cooking video data are eliminated.
[0110] In one embodiment, the modeling module 30 is further configured to obtain a dish to be judged, input the dish to be judged into the intelligent judgment model for the dish category that meets the preset accuracy requirements, and obtain the intelligent judgment result of the dish category to be judged, further comprising:
[0111] According to the preset acquisition cycle, obtain the current dish to be judged;
[0112] According to the newly acquired dish to be judged, the dish category intelligent judgment model that meets the preset accuracy requirements is optimized and corrected to obtain a new dish category intelligent judgment model;
[0113] The newly acquired dish to be judged is input into a new dish category intelligent judgment model to obtain a new dish category intelligent judgment result.
[0114] Other embodiments or specific implementations of the intelligent dish flavor judgment device of the present invention can refer to the above-mentioned method embodiments, and therefore at least have all the beneficial effects brought about by the technical solutions of the above-mentioned embodiments, which will not be repeated here.
[0115] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0116] The serial numbers of the embodiments of the present invention are for descriptive purposes only and do not represent superiority or inferiority of the embodiments. In a unit claim that enumerates several means, several of these means may be embodied by the same item of hardware. The use of the terms first, second, and third, etc., does not denote any order; these terms should be interpreted as designations.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0118] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for intelligently determining the category of a dish, characterized in that: The method comprises the following steps: Obtain various dish text data, dish image data, and dish cooking video data through the online dish database; Extracting features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors; Establishing a dish category intelligent judgment model, and iteratively optimizing the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained; Obtaining the current dish to be judged, and inputting the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged; The feature extraction of the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors includes: Using a residual network, local features of the various dish text data, dish image data, and dish cooking video data are extracted to obtain local features of the various dishes. The residual network is based on ResNet18, removing the last fully connected layer FC in the original ResNet18 network and the average pooling layer avgpool before the fully connected layer of each dish. The local features of each type of dish are subjected to dimensionality reduction processing through a convolutional neural network model to obtain the local features of each type of dish after dimensionality reduction; The local features of various dishes after dimensionality reduction are input into the improved VLAD neural network model to obtain the dish category feature vector. Among them, the NetVLAD dish cooking video data feature extraction consists of two parts: a backbone network based on the residual network ResNet18 and a NetVLAD layer improved based on the ASPP module. NetVLAD is the neural network implementation form of VLAD, which consists of a standard convolutional layer, a softmax layer, a VLAD cor aggregation layer and an L2 normalization layer. The final output is the dish category feature vector.
2. The method according to claim 1, wherein The step of establishing a dish category intelligent judgment model and iteratively optimizing parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained includes: Setting the neural network part of the dish category intelligent judgment model according to the dish category feature vector; The neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
3. The method according to claim 2, wherein The neural network part of the dish category intelligent judgment model is optimized to obtain a dish category intelligent judgment model that meets preset accuracy requirements, including: A particle swarm is randomly generated according to the dish category feature vector, and the PSO parameters are initialized to solve the individual extreme value and group extreme value of the particle swarm; Performing crossover and mutation operations on the individual extreme value and the group extreme value of the particle swarm to obtain new individual extreme value and group extreme value; Repeat the above operation until the individual extreme value and the group extreme value of the particle swarm are less than the preset error value, and the number of repeated iterations exceeds the preset number of iterations, and the target individual extreme value and group extreme value are obtained; According to the target individual machine value and group extreme value, the parameters of the dish category intelligent judgment model are optimized to obtain a dish category intelligent judgment model that meets the preset accuracy requirements.
4. The method according to claim 3, wherein The method of optimizing the parameters of the intelligent judgment model for dish categories based on the target individual probability value and the group extreme value to obtain an intelligent judgment model for dish categories that meets preset accuracy requirements includes: Determine the weights and thresholds of the intelligent judgment model for the dish category based on the target individual extreme value and group extreme value; The weights and thresholds of the intelligent judgment model for the dish category are iterated by the energy function gradient method to obtain the optimal weights and thresholds; Based on the optimal weights and thresholds, an intelligent dish category judgment model that meets preset accuracy requirements is established.
5. The method according to claim 1, wherein Before extracting features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors, the method further includes: Establish dish data cleaning rules based on the preset data importance; According to the dish data cleaning rules, useless data, abnormal data and duplicate data in the various types of dish text data, dish image data and dish cooking video data are eliminated.
6. The method according to any one of claims 1 to 5, characterized in that The method further includes: obtaining the current dish to be judged, inputting the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements, and obtaining the intelligent judgment result of the dish category to be judged. According to the preset acquisition cycle, obtain the current dish to be judged; According to the newly acquired dish to be judged, the dish category intelligent judgment model that meets the preset accuracy requirements is optimized and corrected to obtain a new dish category intelligent judgment model; The newly acquired dish to be judged is input into a new dish category intelligent judgment model to obtain a new dish category intelligent judgment result.
7. An intelligent device for determining the category of a dish, characterized in that: The intelligent device for determining the category of a dish comprises: The acquisition module is used to obtain various dish text data, dish image data and dish cooking video data through the online dish database; A processing module is used to extract features from the various types of dish text data, dish image data, and dish cooking video data to obtain dish category feature vectors; A modeling module, configured to establish a dish category intelligent judgment model and iteratively optimize the parameters of the dish category intelligent judgment model according to the dish category feature vector until a dish category intelligent judgment model that meets preset accuracy requirements is obtained; A judgment module is used to obtain the current dish to be judged, and input the dish to be judged into the dish category intelligent judgment model that meets the preset accuracy requirements to obtain an intelligent judgment result of the dish category to be judged; The processing module is also used to extract local features of the various types of dish text data, dish image data and dish cooking video data through a residual network to obtain local features of various dishes, wherein the residual network is a residual network based on ResNet18, and the last fully connected layer FC in the original ResNet18 network and the mean pooling layer avgpool before the fully connected layer of various dishes are removed; the local features of various dishes are subjected to dimensionality reduction processing through a convolutional neural network model to obtain the local features of various dishes after dimensionality reduction; the local features of various dishes after dimensionality reduction are input into the improved VLAD neural network model to obtain a dish category feature vector, wherein the NetVLAD dish cooking video data feature extraction consists of two parts: a backbone network based on the residual network ResNet18 and a NetVLAD layer improved based on the ASPP module. NetVLAD is a neural network implementation form of VLAD, which is composed of a standard convolutional layer, a softmax layer, a VLAD cor aggregation layer and an L2 normalization layer. The final output is a dish category feature vector.
8. An intelligent device for determining the category of dishes, characterized in that: The dish category intelligent judgment device includes a memory, a processor, and a dish category intelligent judgment program stored in the memory and executable on the processor. When the dish category intelligent judgment program is executed by the processor, the dish category intelligent judgment method as described in any one of claims 1 to 6 is implemented.
9. A storage medium, characterized in that: The storage medium stores a dish category intelligent judgment program, which, when executed by the processor, implements the dish category intelligent judgment method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Search method and system based on digital dishes, and medium
CN111382280A