A method for reading recipes using a QR code scanning function
By spraying the QR code on the vegetable box and using the scanning function of the cooking machine, we automatically read the recipe information and control the operation of the cooking machine, the problem of manually adjusting the cooking machine settings in the existing technology is solved, and the cooking method of the cooking machine is automatically adapted to fresh boxed dishes, improving the user experience.
Patent Information
- Application Number
- CN202411938482.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the stir-frying machine needs to manually adjust the stir-frying method and the firepower size according to the dishes, and cannot automatically adapt to the cooking method of fresh boxed dishes.
By spraying the QR code on the vegetable box, using the QR code scanning function to read the recipe information, and controlling the cooking machine to start the preset program for processing. The method includes generating a recipe QR code, reading the QR code information, and controlling the operation of the cooking machine according to the execution program.
The cooking machine automatically adapts to different types of fresh boxed dishes, without manual adjustment, and improves user experience and convenience of use.
Smart Images

Figure CN119783708A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to information application processing technology, and in particular to a method for reading a recipe using a two-dimensional code scanning function. Background Art
[0002] Fresh boxed dishes mainly refer to dishes that have not been deeply cooked and processed, with fresh vegetables, meat, etc. as the main ingredients, and are packaged in boxes after simple processing (such as washing, cutting, etc.). Its purpose is to provide consumers with fresh and convenient food options.
[0003] The cooking machine can simulate the process of manual cooking. Its principle is to control the heating system, stirring system and other components through the built-in computer chip, and cook the ingredients according to the preset program. The cooking machine has a heating chassis, which is similar to the heating function of a stove, and can provide appropriate firepower according to the needs of different dishes. At the same time, there is also a stirring device that can imitate the action of manual frying to make the ingredients heated evenly.
[0004] Fresh boxed vegetables are combined with a cooking machine, so that users do not need to manually handle the cooking and preparation steps. The ideal way to use it is to put the fresh boxed vegetables into the cooking machine and then wait for the dishes to be cooked. However, at present, manual adjustments to the cooking machine are still required according to the dishes, so that the stir-frying method and firepower of the cooking machine are adapted to the fresh boxed vegetables. Ultimately, it is possible to get correctly cooked dishes without manual preparation and cooking.
[0005] It is necessary to develop a cooking machine control method that can quickly adapt to fresh boxed vegetables, so that the cooking machine can quickly adapt to the corresponding cooking methods according to different types of fresh boxed vegetables, so as to be convenient for users to use. Summary of the invention
[0006] In view of the above-mentioned defects, the purpose of the present invention is to propose a method for reading recipes using a QR code scanning function. The method identifies the dish information by reading the QR code set on the lunch box, and controls the cooking machine to start a preset program and use a cooking program matching the color box dish for processing.
[0007] To achieve this object, the present invention adopts the following technical solutions:
[0008] A method for reading a recipe using a QR code scanning function comprises the following steps:
[0009] S1. Generate a recipe QR code, and print the execution program corresponding to the recipe into a QR code. The execution program consists of a sequence of execution instructions, and the execution instructions include the speed of the stir-frying motor, the heating temperature and heating time required by the heating device;
[0010] S2, the dish box matches the QR code, and the execution QR code of different recipes is sprayed on the outside of the dish box corresponding to the content. When cooking, the QR code information of the dish box is read by the camera of the cooking machine;
[0011] S3, QR code reading, after the QR code on the dish box is read, the execution program corresponding to the recipe is transmitted to the controller;
[0012] S4, the cooking machine executes, and the controller controls whether the motor rotates for stirring according to the instructions corresponding to the execution program, and controls the working time of the stir-fry motor, the heating power size and heating time of the heating device.
[0013] Preferably, step S1 also includes:
[0014] S11, constructing a data set, dividing a single image of a QR code that has been generated into square areas with the same side length, and dividing the QR code image into multiple square areas; presetting the missing images at different positions and in different proportions, and generating a QR code comparison data atlas;
[0015] S12. Build a cascaded DAE-ResNet network model. Use the Pytorch deep learning framework to build a cascaded DAE-ResNet network model. The model integrates a denoising autoencoder and a 1D convolutional ResNet18 classifier. The model classifies the read QR code images end-to-end to determine whether the scanned missing QR code corresponds to the image in the data atlas. The corresponding control program corresponds to the complete QR code link.
[0016] Preferably, in step S3, if the QR code is damaged, the currently scanned QR code image is compared using a data set comparison method.
[0017] Preferably, the method further includes step S13, training a cascaded DAE-ResNet neural network model: dividing the data atlases of multiple recipes obtained after processing in step S11 and the corresponding damaged atlases into a training set, a validation set and a test set, selecting data sets and validation sets of three types of recipes and putting them into the network model for training, continuously optimizing the network through a deep learning propagation algorithm and parameter updating, and finally obtaining optimized model weight parameters.
[0018] Further, in step S12, in step S4, the autoencoder is composed of an encoder and a decoder, the encoder compresses the 768-dimensional feature to 128 dimensions, the input data dimension is 768, and through three linear layers, the output dimensions are 512, 256 and 128 respectively, and the ReLU activation function is used after each layer to enhance the nonlinear expression ability; the decoder decodes the 128-dimensional feature back to 768 dimensions, and the last layer uses Sigmoid activation to ensure that the output value is in the range of [0,1];
[0019] The output data of the autoencoder is passed to the input of a ResNet18 classifier with 1D convolution. The initial convolution layer of the classifier maps the input to 64 dimensions with a kernel size of 7, a stride of 2, and a padding of 3. It then passes through four residual modules with 64, 128, 256, and 512 channels, respectively. Each module contains 2 basic blocks.
[0020] Finally, the global average pooling layer and the fully connected layer map the feature vector to the corresponding number of classes in the specific classification task.
[0021] Furthermore, in step S13, the ratios of the data sets and validation sets of the three types of recipes are different, and the data related to the three types of recipes are randomly extracted into training sets, validation sets and test sets in a ratio of 6:2:2.
[0022] 7. The method for reading recipes using a QR code scanning function according to claim 6, wherein the number of recipes can be set to multiple.
[0023] One of the above technical solutions includes the following beneficial effects: the QR code of the vegetable box may be damaged during use. If the message cannot be scanned normally, the above steps must be taken, that is, by performing image segmentation on the QR code, pre-setting the damage conditions at different positions and to different degrees of the entire image, and making an atlas, and then comparing the scanned image with the atlas to achieve lossless QR code recognition capability; the solution adopts a cascaded DAE-ResNet network model to improve the rate and accuracy of recognition and comparison between the collected images and the atlas. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a schematic diagram of the steps of the overall method of one embodiment of the present invention;
[0025] Figure 2 It is an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0027] like Figure 1-2 As shown, a method for reading a recipe using a QR code scanning function comprises the following steps:
[0028] S1. Generate a recipe QR code, and print the execution program corresponding to the recipe into a QR code. The execution program consists of a sequence of execution instructions, and the execution instructions include the speed of the stir-frying motor, the heating temperature and heating time required by the heating device;
[0029] S2, the dish box matches the QR code, and the execution QR code of different recipes is sprayed on the outside of the dish box corresponding to the content. When cooking, the QR code information of the dish box is read by the camera of the cooking machine;
[0030] S3, QR code reading, after the QR code on the dish box is read, the execution program corresponding to the recipe is transmitted to the controller;
[0031] S4, the cooking machine executes, and the controller controls whether the motor rotates for stirring according to the instructions corresponding to the execution program, and controls the working time of the stir-frying motor, the heating power size and heating time of the heating device.
[0032] The purpose of the present invention is to propose a method for reading recipes using a QR code scanning function. The method identifies dish information by reading a QR code set on a lunch box, and controls a cooking machine to start a preset program and use a cooking program matching the dishes in the lunch box for processing.
[0033] Wherein, step S1 also includes:
[0034] S11, constructing a data set, dividing a single image of a QR code that has been generated into square areas with the same side length, and dividing the QR code image into multiple square areas; presetting the missing images at different positions and in different proportions, and generating a QR code comparison data atlas;
[0035] S12. Build a cascaded DAE-ResNet network model. Use the Pytorch deep learning framework to build a cascaded DAE-ResNet network model. The model integrates a denoising autoencoder and a 1D convolutional ResNet18 classifier. The model classifies the read QR code images end-to-end to determine whether the scanned missing QR code corresponds to the image in the data atlas. The corresponding control program corresponds to the complete QR code link.
[0036] The QR code of the vegetable box may be damaged during use. If the message cannot be scanned normally, the above steps must be taken, that is, by performing image segmentation on the QR code, pre-setting the damage conditions in different positions and degrees of the entire image, and making an atlas, and then comparing the scanned image with the atlas to achieve lossless QR code recognition. The solution uses a cascaded DAE-ResNet network model to improve the speed and accuracy of recognition and comparison between the collected images and the atlas.
[0037] Among them, in step S3, if the QR code is damaged, the currently scanned QR code image is compared using a data set comparison method.
[0038] If there is no contamination, it will be directly identified; if there is contamination, the data set comparison function will be activated.
[0039] Among them, it also includes step S13, training the cascade DAE-ResNet neural network model: dividing the data atlas of multiple recipes obtained after processing in step S11 and the corresponding damaged atlas into a training set, a validation set and a test set, selecting data sets and validation sets of three types of recipes and putting them into the network model for training, and continuously optimizing the network through the deep learning propagation algorithm and parameter update, and finally obtaining the optimized model weight parameters.
[0040] Dividing the model into training set, validation set and test set can provide sufficient training data for learning, adjust the model parameters through the validation set, find the optimal model, and evaluate the generalization ability of the model through an independent test set.
[0041] In addition, in step S12, in step S4, the autoencoder is composed of an encoder and a decoder. The encoder compresses the 768-dimensional feature to 128 dimensions, the input data dimension is 768, and through three linear layers, the output dimensions are 512, 256 and 128 respectively. ReLU activation function is used after each layer to enhance the nonlinear expression ability; the decoder decodes the 128-dimensional feature back to 768 dimensions, and the last layer uses Sigmoid activation to ensure that the output value is in the range of [0,1];
[0042] The output data of the autoencoder is passed to the input of a ResNet18 classifier with 1D convolution. The initial convolution layer of the classifier maps the input to 64 dimensions with a kernel size of 7, a stride of 2, and a padding of 3. It then passes through four residual modules with 64, 128, 256, and 512 channels, respectively. Each module contains 2 basic blocks.
[0043] Finally, the global average pooling layer and the fully connected layer map the feature vector to the corresponding number of classes in the specific classification task.
[0044] The denoising autoencoder and ResNet are integrated. The denoising autoencoder effectively extracts key features and reduces data noise, providing a more refined input for ResNet18, thereby improving training efficiency and model stability; the deep residual module of ResNet18 further optimizes feature extraction, learns complex image graphs, avoids the gradient vanishing problem, and reduces the risk of overfitting; the global average pooling layer and the fully connected layer can integrate features and reduce the risk of overfitting; using this cascade model, we can achieve end-to-end accurate classification and recognition of QR code images.
[0045] In addition, in step S13, the ratios of the data sets and validation sets of the three types of recipes are different, and the data related to the three types of recipes are randomly extracted into training sets, validation sets, and test sets in a ratio of 6:2:2.
[0046] In addition, the number of recipes can be set multiple times.
[0047] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without paying creative labor, and these methods will fall within the scope of protection of the present invention.
Claims
1. A method for reading a recipe using a QR code scanning function, characterized in that: The following steps are involved: S1. Generate a recipe QR code, and print the execution program corresponding to the recipe into a QR code. The execution program consists of a sequence of execution instructions, and the execution instructions include the speed of the stir-frying motor, the heating temperature and heating time required by the heating device; S2, the dish box matches the QR code, and the execution QR code of different recipes is sprayed on the outside of the dish box corresponding to the content. When cooking, the QR code information of the dish box is read by the camera of the cooking machine; S3, QR code reading, after the QR code on the dish box is read, the execution program corresponding to the recipe is transmitted to the controller; S4, the cooking machine executes, and the controller controls whether the motor rotates for stirring according to the instructions corresponding to the execution program, and controls the working time of the stir-fry motor, the heating power size and heating time of the heating device.
2. The method for reading a recipe using a QR code scanning function according to claim 2, characterized in that: Step S1 also includes: S11, constructing a data set, dividing a single image of a QR code that has been generated into square areas with the same side length, and dividing the QR code image into multiple square areas; presetting the missing images at different positions and in different proportions, and generating a QR code comparison data atlas; S12. Build a cascaded DAE-ResNet network model. Use the Pytorch deep learning framework to build a cascaded DAE-ResNet network model. The model integrates a denoising autoencoder and a 1D convolutional ResNet18 classifier. The model classifies the read QR code images end-to-end to determine whether the scanned missing QR code corresponds to the image in the data atlas. The corresponding control program corresponds to the complete QR code link.
3. The method for reading a recipe using a QR code scanning function according to claim 2, characterized in that: In step S3, if the QR code is damaged, the currently scanned QR code image is compared using a data set comparison method.
4. The method for reading a recipe using a QR code scanning function according to claim 2, characterized in that: The method also includes step S13, training the cascade DAE-ResNet neural network model: dividing the data atlases of multiple recipes obtained after processing in step S11 and the corresponding damaged atlases into a training set, a validation set and a test set, selecting data sets and validation sets of three types of recipes and putting them into the network model for training, and continuously optimizing the network through the deep learning propagation algorithm and parameter update, and finally obtaining the optimized model weight parameters.
5. The method for reading a recipe using a QR code scanning function according to claim 4, characterized in that: In step S12, in step S4, the autoencoder is composed of an encoder and a decoder. The encoder compresses the 768-dimensional feature to 128 dimensions. The input data dimension is 768. After three linear layers, the output dimensions are 512, 256 and 128 respectively. ReLU activation function is used after each layer to enhance the nonlinear expression ability; the decoder decodes the 128-dimensional feature back to 768 dimensions. Sigmoid activation is used in the last layer to ensure that the output value is in the range of [0,1]. The output data of the autoencoder is passed to the input of a ResNet18 classifier with 1D convolution. The initial convolution layer of the classifier maps the input to 64 dimensions with a kernel size of 7, a stride of 2, and a padding of 3. It then passes through four residual modules with 64, 128, 256, and 512 channels, respectively. Each module contains 2 basic blocks. Finally, the global average pooling layer and the fully connected layer map the feature vector to the corresponding number of classes in the specific classification task.
6. The method for reading a recipe using a QR code scanning function according to claim 5, characterized in that: In step S13, the ratios of the data sets and validation sets of the three types of recipes are different, and the data related to the three types of recipes are randomly extracted into training sets, validation sets and test sets in a ratio of 6:2:
2.
7. The method for reading a recipe using a QR code scanning function according to claim 6, characterized in that: You can set multiple recipes.