Information entry method, device and computer readable storage medium

By performing text content recognition and machine learning model prediction on the image of the goods list in the refrigerator, the food items are screened out, which solves the inefficiency problem of the existing refrigerator food entry method and achieves efficient and accurate food information entry.

CN111860263BActive Publication Date: 2024-08-23HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010665115.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-10
Publication Date
2024-08-23
Estimated Expiration
2040-07-10

AI Technical Summary

Technical Problem

The existing refrigerator ingredient input method is inefficient, manual input is cumbersome, voice input has ambiguous judgments, and image input is affected by occlusion, making it impossible to achieve efficient and accurate input of ingredient information.

Method used

By obtaining the image of the goods list, perform text content recognition and word segmentation, and use the machine learning model to predict the goods category, filter out the food goods, record their information, use a variety of text recognition systems to merge the results, and correct errors based on the natural language model, using The focus loss is used as the training error, and the difference between the generation time and the acquisition time is determined to adjust the recording strategy.

Benefits of technology

It achieves efficient and accurate identification and recording of food ingredient information, solves the problem of inefficiency caused by item-by-item input, and improves the accuracy and completeness of food input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111860263B
    Figure CN111860263B
Patent Text Reader

Abstract

This invention provides an information entry method, apparatus, and computer-readable storage medium. The method includes: acquiring an image of a goods list; performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list; segmenting the text information corresponding to the goods list into words, and using a machine learning model based on the word segmentation results to predict the categories of goods in the goods list; filtering out food-related goods from the goods list according to the predicted categories of goods, and recording the information of the food-related goods. This invention solves the problem of low efficiency caused by inputting food information item by item in related technologies, thereby achieving efficient and accurate identification and recording of food information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to an information entry method, device and computer-readable storage medium. Background Art

[0002] With the development of science and technology, smart refrigerators are attracting more and more attention. Compared with traditional refrigerators, smart refrigerators have more rational management methods and introduce many new technologies, such as precision-controlled micro-air duct technology, dry-wet separation technology, dynamic sterilization technology, food management, expiration reminder, etc. The high-precision realization of these functions depends on the accurate derivation and entry of food types in the storage area.

[0003] At present, the entry of items stored in the refrigerator mainly includes the following methods:

[0004] 1) Manual entry, that is, manually entering the items placed on the smart refrigerator screen or the mobile phone connected to it;

[0005] 2) Voice input, that is, inputting information directly through voice communication when placing items;

[0006] 3) Image input, that is, by regularly analyzing the images of food in the refrigerator, determining the types of items in the refrigerator, etc.

[0007] However, the above-mentioned food input methods have the following shortcomings:

[0008] 1) Manual input requires users to interact with the refrigerator multiple times to enter information such as product name, category, time, etc., which is inefficient. After purchasing a large number of items, it is often impossible to enter them comprehensively due to time constraints, thus affecting the integrity of the information.

[0009] 2) Voice input optimizes the communication method of input and reduces human labor, but it also has similar problems as manual input.

[0010] 3) The image input method is easily affected by the mutual occlusion between ingredients. The camera cannot capture all the information of the ingredients, resulting in blurred judgment.

[0011] In the face of the shortcomings of the current refrigerator food input method, it is urgent to provide an efficient and accurate refrigerator food input solution. Summary of the invention

[0012] The embodiments of the present invention provide an information entry method, device and computer-readable storage medium to at least solve the problem of low efficiency caused by inputting ingredients one by one in the related art.

[0013] According to one embodiment of the present invention, there is provided an information entry method, comprising: acquiring an image of a goods list; performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list; performing word segmentation on the text information corresponding to the goods list, and using a machine learning model to predict the category of goods in the goods list based on the word segmentation result; screening out food material goods from the goods in the goods list according to the predicted category of the goods, and recording the goods information of the food material goods.

[0014] In at least one exemplary embodiment, obtaining the image of the goods list includes at least one of the following: acquiring the image of the goods list through an image acquisition module on a smart refrigerator; receiving the image of the goods list acquired and sent by a mobile terminal.

[0015] In at least one exemplary embodiment, when the goods list corresponds to a plurality of images, after acquiring the image of the goods list, the method further includes: performing image stitching on the plurality of images corresponding to the goods list.

[0016] In at least one exemplary embodiment, performing text content recognition on the image of the goods list to obtain the text information corresponding to the goods list includes: performing text content recognition on the image of the goods list using multiple different text content recognition systems to obtain multiple recognition results; and merging the multiple recognition results according to the recognition accuracy of different categories of text by the multiple different text content recognition systems to obtain the text information corresponding to the goods list.

[0017] In at least one exemplary embodiment, after performing text content recognition on the image of the goods list to obtain the text information corresponding to the goods list, the method further includes: correcting the text information corresponding to the goods list based on context information according to a natural language model.

[0018] In at least one exemplary embodiment, word segmentation is performed on the text information corresponding to the goods list, and a machine learning model is used to predict the category of the goods in the goods list based on the word segmentation result, including: word segmentation is performed on the text information corresponding to the goods list, each word is converted into a word vector, and the word vectors are combined into a vector matrix according to the relationship between the words; based on the vector matrix, a machine learning model is used to predict the category of the goods in the goods list, wherein the machine learning model uses focal loss as a training error.

[0019] In at least one exemplary embodiment, before performing word segmentation on the text information corresponding to the goods list and using a machine learning model to predict the category of the goods in the goods list based on the word segmentation result, the method also includes: determining the generation time of the goods list from the text information corresponding to the goods list based on character fuzzy matching; recording the generation time of the goods list, and deleting the generation time from the text information corresponding to the goods list.

[0020] In at least one exemplary embodiment, recording the cargo information of the food-type cargo includes: extracting and recording the cargo information corresponding to the food-type cargo from the text information corresponding to the cargo list, wherein the cargo information includes at least one of the following: cargo name, cargo quantity, cargo brand, and cargo weight.

[0021] In at least one exemplary embodiment, recording the cargo information of the food-type cargo includes: determining the time difference between the generation time of the cargo list and the acquisition time of the image; and adopting the recording strategy corresponding to the time difference to record the cargo information of the food-type cargo.

[0022] In at least one exemplary embodiment, a recording strategy corresponding to the time difference is adopted, and recording the cargo information of the food type goods includes at least one of the following: when the time difference is less than a threshold value t, a first interface is displayed, wherein the first interface displays the cargo information of the filtered food type goods, and prompts to confirm the cargo information of the filtered food type goods; when the time difference is not less than the threshold value t, a second interface is displayed, wherein the second interface displays the cargo information of the filtered food type goods, and prompts to delete the cargo information of the used food type goods; when a deletion result is received, the cargo information of the food type goods that have not been deleted is recorded, and a recommended storage location of the food type goods that have not been deleted is displayed.

[0023] In at least one exemplary embodiment, the value of the threshold t during the meal time period is smaller than the value of the threshold t during other time periods except the meal time period.

[0024] According to another embodiment of the present invention, there is provided an information entry device, comprising: an image acquisition module, configured to acquire an image of a goods list; a text content recognition module, configured to perform text content recognition on the image of the goods list to obtain text information corresponding to the goods list; a category prediction module, configured to perform word segmentation on the text information corresponding to the goods list, and use a machine learning model to predict the category of goods in the goods list based on the word segmentation result; and a goods screening and recording module, configured to screen out food-type goods from the goods in the goods list according to the predicted category of the goods, and record the goods information of the food-type goods.

[0025] In at least one exemplary embodiment, the text content recognition module is configured to: use multiple different text content recognition systems to perform text content recognition on the image of the goods list to obtain multiple recognition results; merge the multiple recognition results according to the recognition accuracy of the multiple different text content recognition systems for different categories of text to obtain the text information corresponding to the goods list.

[0026] In at least one exemplary embodiment, the category prediction module is configured to: perform word segmentation on the text information corresponding to the cargo list, convert each word into a word vector, and combine the word vectors into a vector matrix based on the relationship between the words; and use a machine learning model based on the vector matrix to predict the category of the cargo in the cargo list, wherein the machine learning model uses focal loss as a training error.

[0027] In at least one exemplary embodiment, the cargo screening and recording module is configured to: determine the time difference between the generation time of the cargo list and the acquisition time of the image; and adopt a recording strategy corresponding to the time difference to record cargo information of the food-type cargo.

[0028] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0029] Through the present invention, since text content recognition is performed on the image of the goods list, word segmentation is performed based on the result of text content recognition, and the category of the goods is predicted based on the machine learning model, it is possible to accurately screen out food goods and record food information. Therefore, the problem of low efficiency caused by inputting food one by one in the related technology can be solved, and the effect of efficiently and accurately identifying and recording food information can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0031] Figure 1 is a flow chart of an information entry method according to Embodiment 1 of the present invention;

[0032] Figure 2 is a structural block diagram of an information entry device according to Embodiment 2 of the present invention;

[0033] Figure 3 is an exemplary structural block diagram of an information identification device according to Embodiment 2 of the present invention;

[0034] Figure 4 is a schematic diagram of a food material input process according to Embodiment 4 of the present invention;

[0035] Figure 5 is a schematic diagram of a first model for interactive confirmation of recognition results according to Embodiment 4 of the present invention;

[0036] Figure 6 4 is a schematic diagram of a second model for interactive confirmation of recognition results according to Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0039] Example 1

[0040] In this embodiment, a method for inputting information is provided. Figure 1 is a flow chart of the information entry method according to Embodiment 1 of the present invention. Figure 1 As shown, the process includes the following steps:

[0041] Step S102, obtaining an image of a goods list, wherein the goods list includes a list of goods involved in online or offline shopping, and the goods list may include at least one of the following: a shopping receipt, a shopping list, a shipping list, an online shopping order, etc.;

[0042] Step S104, performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list;

[0043] Step S106, segmenting the text information corresponding to the goods list, and using a machine learning model to predict the category of the goods in the goods list based on the segmentation result;

[0044] Step S108, screening out food-related goods from the goods in the goods list according to the predicted categories of the goods, and recording the goods information of the food-related goods.

[0045] Through the above steps, text content recognition is performed on the image of the goods list, word segmentation is performed based on the results of text content recognition, and the category of the goods is predicted based on the machine learning model, so that food goods can be accurately screened out and food information can be recorded. Therefore, the problem of inefficiency caused by inputting ingredients one by one in the related technology can be solved, and the effect of efficiently and accurately identifying and recording food information can be achieved.

[0046] Optionally, the above information entry method can be executed by a smart refrigerator (or its corresponding server, or by the smart refrigerator interacting with its corresponding server), or by a mobile terminal (or its corresponding server, or by the mobile terminal interacting with its corresponding server), but is not limited to this.

[0047] In at least one exemplary embodiment, step S102 may include at least one of the following:

[0048] The image of the goods list is collected by an image collection module on the smart refrigerator, that is, the image collection module can be installed on the smart refrigerator, and the image of the goods list is collected by the smart refrigerator;

[0049] Receive the image of the goods list captured and sent by the mobile terminal, that is, the image of the goods list can be photographed or uploaded in the client APP related to the smart refrigerator through the mobile terminal, and then the image is transmitted to the smart refrigerator or the server.

[0050] In at least one exemplary embodiment, when the goods list corresponds to multiple images, after acquiring the image of the goods list, the method further includes: stitching the multiple images corresponding to the goods list. Through this method, when the goods list is long, by acquiring the image of the goods list multiple times and stitching the multiple images together, the entry of the food information of the entire goods list can be processed at one time.

[0051] In at least one exemplary embodiment, in order to achieve more accurate text recognition, step S104 may include:

[0052] Step S1042, using a plurality of different text content recognition systems (for example, a plurality of optical character recognition (OCR) systems, etc.) to perform text content recognition on the image of the goods list to obtain a plurality of recognition results;

[0053] Step S1044: merging the multiple recognition results according to the recognition accuracy of the multiple different text content recognition systems for different categories of texts to obtain the text information corresponding to the goods list.

[0054] Through this solution, for example, through multiple OCR recognition results, the model recognition results are selected according to the expected statistical information, and the recognition results of different OCR models are selected for Chinese, English letters, numbers, etc., thereby improving the robustness of the recognition results.

[0055] In at least one exemplary embodiment, the text recognition result can also be corrected. For example, after step S104, the process can also include: correcting the text information corresponding to the goods list based on the context information according to the natural language model. Through the error correction process, the accuracy of the text recognition result can be further improved, and more accurate text information corresponding to the goods list can be obtained, thereby providing more accurate basic information for the subsequent goods category prediction and food material goods information recording.

[0056] In at least one exemplary embodiment, step S106 may include:

[0057] Step S1062, segmenting the text information corresponding to the goods list, converting each word into a word vector, and combining the word vectors into a vector matrix according to the relationship between the words;

[0058] Step S1064: Using a machine learning model to predict the category of the goods in the goods list based on the vector matrix, wherein the machine learning model uses focal loss as a training error.

[0059] By implementing step S106 in the manner of using weighted focal loss as the training error of the model, it is possible to effectively avoid classification errors caused by too many other categories and reduce the impact of the category "others" on the model.

[0060] In at least one exemplary embodiment, before step S106, the method further includes:

[0061] Determining the generation time of the goods list from the text information corresponding to the goods list based on character fuzzy matching;

[0062] The generation time of the goods list is recorded, and the generation time is deleted from the text information corresponding to the goods list.

[0063] Through the above method, the time information is removed from the text information, making the results of word scoring and category prediction more accurate.

[0064] In at least one exemplary embodiment, recording the cargo information of the food-related cargo may include: extracting and recording the cargo information corresponding to the food-related cargo from the text information corresponding to the cargo list, wherein the cargo information includes at least one of the following: cargo name, cargo quantity, cargo brand, and cargo weight. It should be clear to those skilled in the art that the recorded cargo information may not be limited to the several types of information listed above, and various types of cargo information corresponding to the food-related cargo in the text information corresponding to the cargo list may be extracted and recorded.

[0065] In at least one exemplary embodiment, recording the cargo information of the food-related cargo may include:

[0066] Determine the time difference between the time when the goods list is generated and the time when the image is acquired;

[0067] The recording strategy corresponding to the time difference is adopted to record the cargo information of the food cargo.

[0068] By determining the time difference between the time when the goods list is generated and the time when the image is acquired, we can actually know how long it takes from the purchase of goods to the current preparation for information entry. According to the length of the time difference, the recording strategy needs to be appropriately adjusted to record more accurate goods information. For specific recording strategies, please see the following description.

[0069] In an exemplary embodiment, using the recording strategy corresponding to the time difference, recording the cargo information of the food-type cargo may include at least one of the following:

[0070] (1) When the time difference is less than the threshold value t, the first interface is displayed, wherein the first interface displays the cargo information of the selected food-type goods, and prompts the user to confirm the cargo information of the selected food-type goods; when the confirmation of the cargo information of the selected food-type goods is received, the displayed cargo information is recorded, and the recommended storage location corresponding to the food-type goods is displayed. In this case, the time from purchasing the goods to the current preparation for information entry is short, which indicates that the user may start to enter the information directly after completing the purchase and returning home, and is ready to put the food-type goods into the refrigerator. In this case, the user may not use the food-type goods, so the food-type goods to be put into the refrigerator are generally consistent with the food-type goods on the cargo list. At this time, the recording strategy may be to directly display the cargo information of the selected food-type goods in the first interface for the user to confirm, and the cargo information may be recorded after the user confirms, and preferably the recommended storage location of the food may be displayed.

[0071] (2) When the time difference is not less than the threshold value t, a second interface is displayed, wherein the second interface displays the cargo information of the filtered food-type goods and prompts the user to delete the cargo information of the used food-type goods; when the deletion result is received, the cargo information of the food-type goods that have not been deleted is recorded and the recommended storage location of the food-type goods that have not been deleted is displayed. In this case, the time from purchasing the goods to the current preparation for information entry is relatively long. In this case, it is very likely that the user has already used some of the food-type goods. Therefore, the food-type goods to be put into the refrigerator are generally inconsistent with the food-type goods on the cargo list (the former is less than the latter). At this time, the recording strategy can be to display the cargo information of the filtered food-type goods in the second interface and prompt the user to delete the used food. After the user deletes, the cargo information can be recorded, and preferably the recommended storage location of the food can be displayed.

[0072] In the above exemplary embodiment, considering that when it is close to meal time (for example, breakfast, lunch, and dinner time), the user is more likely to use some of the ingredients directly after purchasing them (i.e., cook the ingredients), at this time, it should be given priority to issue an inquiry to prompt the user to delete the ingredients that have been used. Therefore, the value of the threshold t in the meal time period (that is, within a predetermined range before and after the meal time) is recommended to be smaller than the value in other time periods except the meal time period. In this way, the user is more likely to be prompted to delete the ingredients that have been used during the peak period of user use of ingredients, so that the entered content is more accurate.

[0073] In another exemplary embodiment, using the recording strategy corresponding to the time difference, recording the cargo information of the food-type cargo may include at least one of the following:

[0074] (1) When the time difference is less than the first threshold value t1, the first interface is displayed, wherein the first interface displays the cargo information of the selected food-type goods, and prompts the user to confirm the cargo information of the selected food-type goods; when the confirmation of the cargo information of the selected food-type goods is received, the displayed cargo information is recorded, and the recommended storage location corresponding to the food-type goods is displayed. In this case, the time from purchasing the goods to the current preparation for information entry is short, which indicates that the user may start to enter the information directly after completing the purchase and returning home, and is ready to put the food-type goods into the refrigerator. In this case, the user may not use the food-type goods, so the food-type goods to be put into the refrigerator are generally consistent with the food-type goods on the cargo list. At this time, the recording strategy may be to directly display the cargo information of the selected food-type goods in the first interface for the user to confirm, and the cargo information may be recorded after the user confirms, and preferably the recommended storage location of the food may be displayed.

[0075] (2) When the time difference is not less than the first threshold value t1 but less than the second threshold value t2, the second interface is displayed, wherein the second threshold value t2 is greater than the first threshold value t1, the second interface displays the cargo information of the selected food-type cargo, and prompts the user to confirm the cargo information of the selected food-type cargo; upon receiving the confirmation of the cargo information of the selected food-type cargo, the displayed cargo information is recorded. In this case, the time from purchasing the cargo to the current preparation for information entry is medium. In this case, the user may be ready to use some food-type cargo, but has not yet used it up. At this time, the food-type cargo to be put into the refrigerator may be consistent with the food-type cargo on the cargo list or may not be consistent, and is in an uncertain state. At this time, the recording strategy may be to display the cargo information of the selected food-type cargo in the second interface and prompt the user to confirm, and the cargo information can be recorded after the user confirms.

[0076] (3) When the time difference is not less than the second threshold value t2, a third interface is displayed, wherein the third interface displays the cargo information of the filtered food-type goods and prompts the user to delete the cargo information of the used food-type goods; when the deletion result is received, the cargo information of the food-type goods that have not been deleted is recorded, and the recommended storage location of the food-type goods that have not been deleted is displayed. In this case, the time from purchasing the goods to the current preparation for information entry is relatively long. In this case, it is very likely that the user has already used some of the food-type goods. Therefore, the food-type goods to be put into the refrigerator are generally inconsistent with the food-type goods on the cargo list (the former is less than the latter). At this time, the recording strategy can be to display the cargo information of the filtered food-type goods in the third interface and prompt the user to delete the used food. After the user deletes, the cargo information can be recorded, and preferably the recommended storage location of the food can be displayed.

[0077] In the above exemplary embodiment, considering that when it is close to meal time (for example, breakfast, lunch, and dinner time), the user is more likely to use some of the ingredients directly after purchasing them (i.e., cook the ingredients), at this time, it should be given priority to issue an inquiry to prompt the user to delete the ingredients that have been used. Therefore, the values ​​of the first threshold t1 and the second threshold t2 in the meal time period (that is, within a predetermined range before and after the meal time) are recommended to be smaller than the values ​​in other time periods except the meal time period. In this way, the user is more likely to be prompted to delete the ingredients that have been used during the peak period of user's use of ingredients, so that the entered content is more accurate.

[0078] Through this solution, the time difference between the time when the user inputs the image of the goods list and the time when the goods are purchased can be determined based on the time difference between the time when the goods list is generated and the time when the image is acquired, so that it can be determined whether the entry timing after the purchase of the goods is immediate or after using some ingredients, thereby executing more humane recording and reminder functions according to corresponding strategies.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an 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 computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0080] Example 2

[0081] In this embodiment, an information entry device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0082] Figure 2 is a structural block diagram of an information entry device according to Embodiment 2 of the present invention. Figure 2 As shown, the device comprises:

[0083] The image acquisition module 22 is configured to acquire an image of a goods list, wherein the goods list includes a list of goods involved in online or offline shopping, and the goods list may include at least one of the following: a shopping receipt, a shopping list, a shipping list, an online shopping order, etc.;

[0084] A text content recognition module 24 is configured to perform text content recognition on the image of the goods list to obtain text information corresponding to the goods list;

[0085] A category prediction module 26 is configured to segment the text information corresponding to the goods list, and predict the category of the goods in the goods list using a machine learning model based on the segmentation result;

[0086] The cargo screening and recording module 28 is configured to screen out food-related cargo from the cargo in the cargo list according to the predicted categories of the cargo, and record cargo information of the food-related cargo.

[0087] Through the above-mentioned device, the text content recognition module 24 performs text content recognition on the image of the goods list, and the category prediction module 26 performs word segmentation based on the result of text content recognition and predicts the category of the goods based on the machine learning model, so that the goods screening and recording module 28 can accurately screen out food goods and record food information. Therefore, the problem of low efficiency caused by inputting one by one in the related technology can be solved, and the effect of efficiently and accurately identifying and recording food information can be achieved.

[0088] Optionally, the above-mentioned information entry device can be set in a smart refrigerator (or its corresponding server, or different modules therein are respectively set in the smart refrigerator and its corresponding server), or it can be set in a mobile terminal (or its corresponding server, or different modules therein are respectively set in the mobile terminal and its corresponding server), but is not limited to this.

[0089] In at least one exemplary embodiment, the image acquisition module 22 may include an image acquisition module installed on a smart refrigerator, and may also include a receiver for receiving the image of the goods list captured and sent by a mobile terminal.

[0090] In at least one exemplary embodiment, the image acquisition module 22 is further configured to perform image stitching on the multiple images corresponding to the goods list after acquiring the image of the goods list when the goods list corresponds to multiple images.

[0091] In at least one exemplary embodiment, in order to achieve more accurate text recognition, the text content recognition module 24 may be configured as follows:

[0092] Using a plurality of different text content recognition systems (e.g., a plurality of optical character recognition (OCR) systems, etc.) to perform text content recognition on the image of the goods list to obtain a plurality of recognition results;

[0093] The multiple recognition results are merged according to the recognition accuracy of the multiple different text content recognition systems for different categories of texts to obtain the text information corresponding to the goods list.

[0094] Through this solution, for example, through multiple OCR recognition results, the model recognition results are selected according to the expected statistical information, and the recognition results of different OCR models are selected for Chinese, English letters, numbers, etc., thereby improving the robustness of the recognition results.

[0095] Figure 3 is an exemplary structural block diagram of an information identification device according to Embodiment 2 of the present invention. Figure 3 As shown, in at least one exemplary embodiment, in order to correct the text recognition results, the device may also include: a text information correction module 32, which is configured to correct the text information corresponding to the goods list based on context information according to a natural language model.

[0096] In at least one exemplary embodiment, the category prediction module 26 can be configured to: segment the text information corresponding to the cargo list, convert each word into a word vector, and combine the word vectors into a vector matrix based on the relationship between the words; and use a machine learning model based on the vector matrix to predict the category of the cargo in the cargo list, wherein the machine learning model uses focal loss as a training error.

[0097] In at least one exemplary embodiment, the cargo screening record module 28 is configured to determine the generation time of the cargo list from the text information corresponding to the cargo list based on character fuzzy matching; record the generation time of the cargo list, and delete the generation time from the text information corresponding to the cargo list.

[0098] Through the above scheme, the time information is removed from the text information, so that the results of word scoring and category prediction are more accurate.

[0099] In at least one exemplary embodiment, the cargo screening and recording module 28 is configured to extract and record cargo information corresponding to the food-type cargo from the text information corresponding to the cargo list, wherein the cargo information includes at least one of the following: cargo name, cargo quantity, cargo brand, and cargo weight.

[0100] In at least one exemplary embodiment, the cargo screening and recording module 28 is configured to determine the time difference between the generation time of the cargo list and the acquisition time of the image; and adopt a recording strategy corresponding to the time difference to record the cargo information of the food-type cargo.

[0101] In an exemplary embodiment, the cargo screening record module 28 is configured to perform at least one of the following:

[0102] When the time difference is less than the threshold value t, a first interface is displayed, wherein the first interface displays the cargo information of the filtered cargo of the food type, and prompts to confirm the cargo information of the filtered cargo of the food type; when confirmation of the cargo information of the filtered cargo of the food type is received, the displayed cargo information is recorded, and a recommended storage location corresponding to the cargo of the food type is displayed;

[0103] When the time difference is not less than the threshold value t, a second interface is displayed, wherein the second interface displays the cargo information of the filtered food type goods and prompts to delete the cargo information of the used food type goods; when the deletion result is received, the cargo information of the food type goods that have not been deleted is recorded and the recommended storage location of the food type goods that have not been deleted is displayed.

[0104] In the above exemplary embodiment, the value of the threshold t during the meal time period is smaller than the value of the threshold t during other time periods except the meal time period.

[0105] In another exemplary embodiment, using the recording strategy corresponding to the time difference, recording the cargo information of the food-type cargo may include at least one of the following:

[0106] When the time difference is less than the first threshold value t1, a first interface is displayed, wherein the first interface displays the cargo information of the filtered cargo of the food type, and prompts to confirm the cargo information of the filtered cargo of the food type; when confirmation of the cargo information of the filtered cargo of the food type is received, the displayed cargo information is recorded, and a recommended storage location corresponding to the cargo of the food type is displayed;

[0107] In the case where the time difference is not less than the first threshold value t1 but less than the second threshold value t2, a second interface is displayed, wherein the second threshold value t2 is greater than the first threshold value t1, and the cargo information of the filtered cargo of the food type is displayed in the second interface, and a prompt is given to confirm the cargo information of the filtered cargo of the food type; when confirmation of the cargo information of the filtered cargo of the food type is received, the displayed cargo information is recorded;

[0108] When the time difference is not less than the second threshold value t2, a third interface is displayed, wherein the third interface displays the cargo information of the filtered food type goods and prompts to delete the cargo information of the used food type goods; when the deletion result is received, the cargo information of the food type goods that have not been deleted is recorded and the recommended storage location of the food type goods that have not been deleted is displayed.

[0109] In the above exemplary embodiment, the values ​​of the first threshold t1 and the second threshold t2 during the meal time period are smaller than the values ​​during other time periods except the meal time period.

[0110] Through this solution, the time difference between the time when the user inputs the image of the goods list and the time when the goods are purchased can be determined based on the time difference between the time when the goods list is generated and the time when the image is acquired, so that it can be determined whether the entry timing after the purchase of the goods is immediate or after using some ingredients, thereby executing more humane recording and reminder functions according to corresponding strategies.

[0111] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0112] Example 3

[0113] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0114] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0115] Step S1, obtaining an image of a goods list, wherein the goods list includes a list of goods involved in online or offline shopping, and the goods list may include at least one of the following: a shopping receipt, a shopping list, a shipping list, an online shopping order, etc.;

[0116] Step S2, performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list;

[0117] Step S3, segmenting the text information corresponding to the goods list, and using a machine learning model to predict the category of the goods in the goods list based on the segmentation results;

[0118] Step S4, screening out food-related goods from the goods in the goods list according to the predicted categories of the goods, and recording the goods information of the food-related goods.

[0119] Optionally, the computer readable storage medium is further configured to store a computer program for performing the following steps:

[0120] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0121] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0122] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0123] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0124] Step S1, obtaining an image of a goods list, wherein the goods list includes a list of goods involved in online or offline shopping, and the goods list may include at least one of the following: a shopping receipt, a shopping list, a shipping list, an online shopping order, etc.;

[0125] Step S2, performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list;

[0126] Step S3, segmenting the text information corresponding to the goods list, and using a machine learning model to predict the category of the goods in the goods list based on the segmentation results;

[0127] Step S4, screening out food-related goods from the goods in the goods list according to the predicted categories of the goods, and recording the goods information of the food-related goods.

[0128] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0129] Example 4

[0130] In order to solve the problem of low efficiency caused by inputting ingredients one by one, the solution provided in this embodiment starts from shopping receipts and lists, uses OCR technology to recognize the content of shopping receipts and lists, and then models the recognized text to determine the category to which the goods belong, thereby realizing the function of batch import. In order to better manage ingredients, after confirming the category, corresponding information will be displayed according to the current time and shopping time.

[0131] The food input solution for smart refrigerators specifically involves hardware parts such as smart refrigerators, image acquisition cameras, and terminal devices bound to smart refrigerators. It also includes image acquisition modules, OCR (Optical Character Recognition), text error correction modules, text-based food classification models, and software parts for interactive confirmation of recognition results.

[0132] The image acquisition module is used to obtain shopping receipts, shopping lists, etc. by taking photos with a handheld terminal, taking photos with a camera built into a smart refrigerator, or taking screenshots, and also includes image file import;

[0133] The OCR recognition module is used to recognize the image using OCR technology, and the OCR recognition model includes multiple OCR engines. It is preferred to select multiple OCR recognition models for text content recognition, and improve the accuracy of the recognition result by comparing multiple models. More specifically, the model recognition result is selected based on the expected statistical information through multiple OCR recognition results, and the recognition results of different OCR models are selected for Chinese, English letters, numbers, etc., so as to improve the robustness of the recognition result;

[0134] The text error correction module is used to correct easily confused letters and numbers, such as 0 and o, 1 and I, 9 and g, by using a natural language model with the help of context information;

[0135] The text-based ingredient classification model is used to classify the results obtained by the text error correction module, segment the content by line, and classify the content into non-ingredients, time, and specific ingredient categories through a machine learning model;

[0136] The recognition result confirmation interaction model is used to compare the time recorded by the image acquisition module with the time in the shopping receipt and the shopping list. If the time is less than the threshold t, a suitable placement location is provided while the user confirms the recognition result, such as placing it in the refrigerator, etc.; if the time is not less than the threshold t, the user is reminded to delete the used items and enter the ingredients, and a suitable placement location is provided, such as placing it in the refrigerator, etc. The above is one embodiment. In another embodiment, the conditions can be further refined. If the time is less than the threshold t1, a suitable placement location is provided while the user confirms the recognition result, such as placing it in the refrigerator, etc.; if the time is not less than the threshold t2 (t2 is greater than t1), the user is reminded to delete the used items and enter the ingredients, and a suitable placement location is provided, such as placing it in the refrigerator, etc.; if it is between t1 and t2, the ingredients are entered after the customer confirms.

[0137] Figure 4 Schematic diagram of the food input process according to Embodiment 4 of the present invention. Figure 4 As shown, the food input scheme of the smart refrigerator includes the following steps:

[0138] Step S401, after shopping is completed, open the mobile phone APP to take a photo of the shopping receipt through the photo entry in the APP, and align the edges through the auxiliary frame. For a long shopping receipt, multiple shots can be taken to obtain a series of images containing the shopping receipt. This step can also be performed by configuring an image acquisition module in the smart refrigerator to take photos of the shopping receipt, and is not limited to the implementation method of taking photos through a mobile phone.

[0139] Step S402, after obtaining the image of the shopping receipt, the image is recognized by multiple OCR systems such as Baidu OCR, Ali OCR, Tencent OCR, etc., to obtain the recognized result. Different OCR models have different recognition results due to different methods, so the error positions are different. During recognition, different OCR output results are selected as the final result according to different symbol types in different OCR systems.

[0140] Step S403, after obtaining the OCR result, it is often possible that the difference between letters, numbers, and words such as l (letter L) and 1 (number) is very small due to the different printed forms, and an estimation is established based on the context, such as establishing an n-gram model for learning, and inferring possible candidate results through probabilistic reasoning.

[0141] Step S404, obtain the result after error correction, and use it in the food classification model, which is a two-segment model combining word vectors and LSTM. First, use character fuzzy matching to determine the time in the receipt, extract the time, and delete the line of text; then, use the jieba word segmentation tool to segment the remaining text lines, convert each word into a 256-dimensional word vector, such as "Red Fuji Apple" is divided into Red Fuji and Apple, and combined into a 2x 256 vector matrix. Since the receipt generally has short information, the sentence is padded with 0 to a vector of 8x 256 dimensions. In order to avoid the influence of supplementary information, a bidirectional LSTM model is used for prediction to obtain the final prediction category, which contains a total of 601 categories (600 categories of food plus 1 category of others). In order to avoid classification errors caused by too many others, weighted focal loss is used as the training error of the model to reduce the influence of the category "others" on the model.

[0142] Step S405, after obtaining all the ingredients included in the receipt, obtain the appropriate storage space for the ingredients in the database, and execute the ingredient information recording process. Preferably, the recognition result interactive confirmation process can be executed in this step. This embodiment gives two recognition result interactive confirmation processes as examples. Those skilled in the art should understand that the confirmation process actually adopted can be set as needed and is not limited to the two examples given here.

[0143] Figure 5 is a schematic diagram of a first model for interactive confirmation of recognition results according to Embodiment 4 of the present invention, such as Figure 5 As shown in the figure, the specific process of interactive confirmation of recognition results is as follows:

[0144] Step S501, obtaining food classification results;

[0145] Step S502, obtaining the recording time of the image acquisition module (that is, the time when the image acquisition module acquires the list image, or the list acquisition time);

[0146] Step S503, determining whether the recorded time falls within the dining time period, so as to obtain different t according to different time periods;

[0147] Step S504, if it falls into the dining time period, then reduce the value of the threshold t, for example, during breakfast, lunch, and dinner time, since it is used directly after buying food, the value of t is reduced to 30 minutes to 45 minutes. At other times, it can be correspondingly longer;

[0148] Step S505, determine whether the time difference between the recorded time and the time in the list is less than t, if so, proceed to step S506, if not, proceed to step S507;

[0149] Step S506, the user confirms the recognition result and provides a suitable placement location;

[0150] Step S507, reminding the user to delete the used items and then enter the ingredients.

[0151] Figure 6 is a schematic diagram of a second model for interactive confirmation of recognition results according to Embodiment 4 of the present invention, such as Figure 6 As shown in the figure, the specific process of interactive confirmation of recognition results is as follows:

[0152] Step S601, obtaining food classification results;

[0153] Step S602, obtaining the recording time of the image acquisition module (that is, the time when the image acquisition module acquires the list image, or the list acquisition time);

[0154] Step S603, determining whether the recorded time falls within the dining time period, so as to obtain different t1 and t2 according to different time periods;

[0155] Step S604, if it falls into the dining time period, then reduce the values ​​of thresholds t1 and t2. For example, during breakfast, lunch, and dinner time, since it is used directly after shopping, the values ​​of t2 and t1 are reduced to 30 minutes to 45 minutes. At other times, they can be increased accordingly;

[0156] Step S605, determine whether the time difference between the recorded time and the time in the list is less than t1, if so, proceed to step S607, if not, proceed to step S606;

[0157] Step S606, determine whether the time difference is less than t2, if not, proceed to step S608, if yes, proceed to step S609;

[0158] Step S607, the user confirms the recognition result and provides a suitable placement location;

[0159] Step S608, remind the user to delete the used items and then enter the ingredients

[0160] Step S609, input the ingredients after the customer confirms.

[0161] In the above scheme, the food input function of the smart refrigerator is realized by touch input, voice input, barcode scanning or QR code scanning, etc., and single entry has the problems of low input efficiency and incomplete information input. For example, manual entry requires the user to interact with the refrigerator multiple times to input information such as product name, category, time, etc., which is inefficient. After the purchase of a large number of items, it is often impossible to enter them comprehensively due to time reasons, which affects the integrity of the information. The solution provided in this embodiment realizes the entry of multiple pieces of information through unified recognition of information aggregates such as shopping receipts and lists.

[0162] Although OCR technology can read text information on receipts, it does not determine relevant information, making it difficult to store the results directly, and sometimes there are recognition errors, such as the recognition of numbers and letters. Specifically, OCR technology will recognize information on receipts, such as items such as apples and pots, but only ingredients are placed in the refrigerator, so it is necessary to classify the OCR-recognized text and determine its category.

[0163] Nowadays, there are many kinds of commodities, and different merchants have different descriptions of the same item from different origins, such as 500g red apple as a commodity name. For a wide range of commodities, pre-building a database and then performing database matching often results in matching errors and failure to match. In order to improve the accuracy, a huge dish library needs to be manually constructed, thereby increasing labor costs and reducing efficiency. The solution provided in this embodiment improves the accuracy of food recognition by establishing a machine learning model for food-related information.

[0164] The solution of this embodiment recognizes information such as shopping receipts and shopping lists through OCR, and then imports the text classification model, thereby realizing batch import of multiple food information and improving efficiency. Users only need to input images and confirm information, which reduces the user's workload and improves the usability of the product. By establishing a recognition model for text, different texts are classified into different categories, thereby avoiding the construction of a huge food database and reducing labor costs.

[0165] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for inputting information, characterized in that: include: Get an image of the goods list; Performing text content recognition on the image of the goods list to obtain text information corresponding to the goods list; Segmenting the text information corresponding to the goods list, and using a machine learning model to predict the category of the goods in the goods list based on the segmentation results; Filtering out food-related goods from the goods in the goods list according to the predicted category of the goods, and recording the goods information of the food-related goods; The recording of the cargo information of the food-related cargo includes: determining the time difference between the generation time of the cargo list and the acquisition time of the image; and recording the cargo information of the food-related cargo using a recording strategy corresponding to the time difference; Among them, the recording strategy corresponding to the time difference is adopted to record the cargo information of the food type goods, including at least one of the following: when the time difference is less than a threshold value t, a first interface is displayed, wherein the first interface displays the cargo information of the filtered food type goods, and prompts to confirm the cargo information of the filtered food type goods; when confirmation of the cargo information of the filtered food type goods is received, the displayed cargo information is recorded, and the recommended storage location corresponding to the food type goods is displayed; when the time difference is not less than the threshold value t, a second interface is displayed, wherein the second interface displays the cargo information of the filtered food type goods, and prompts to delete the cargo information of the used food type goods; when a deletion result is received, the cargo information of the food type goods that have not been deleted is recorded, and the recommended storage location of the food type goods that have not been deleted is displayed.

2. The method according to claim 1, characterized in that Acquiring the image of the cargo list includes at least one of the following: Capturing the image of the goods list through an image acquisition module on the smart refrigerator; The image of the goods list captured and sent by a mobile terminal is received.

3. The method according to claim 1, characterized in that: Performing text content recognition on the image of the goods list to obtain the text information corresponding to the goods list includes: Using a plurality of different text content recognition systems to perform text content recognition on the image of the goods list to obtain a plurality of recognition results; The multiple recognition results are merged according to the recognition accuracy of the multiple different text content recognition systems for different categories of texts to obtain the text information corresponding to the goods list.

4. The method according to claim 1, characterized in that After performing text content recognition on the image of the goods list to obtain the text information corresponding to the goods list, the method further includes: According to the natural language model, the text information corresponding to the goods list is corrected based on the context information.

5. The method according to claim 1, characterized in that Segmenting the text information corresponding to the goods list, and using a machine learning model to predict the categories of the goods in the goods list based on the segmentation results includes: Segment the text information corresponding to the goods list, convert each word into a word vector, and combine the word vectors into a vector matrix according to the relationship between the words; A machine learning model is used based on the vector matrix to predict the category of the goods in the goods list, wherein the machine learning model uses focal loss as a training error.

6. The method according to claim 1, characterized in that Before segmenting the text information corresponding to the goods list and predicting the category of the goods in the goods list using a machine learning model based on the segmentation result, the method further includes: Determining the generation time of the goods list from the text information corresponding to the goods list based on character fuzzy matching; The generation time of the goods list is recorded, and the generation time is deleted from the text information corresponding to the goods list.

7. The method according to any one of claims 1 to 6, characterized in that: The cargo information recording the food cargo includes: From the text information corresponding to the goods list, the goods information corresponding to the food-type goods is extracted and recorded, wherein the goods information includes at least one of the following: goods name, goods quantity, goods brand, and goods weight.

8. The method according to claim 1, characterized in that The value of the threshold t in the meal time period is smaller than the value in other time periods except the meal time period.

9. An information input device, characterized in that: include: An image acquisition module, configured to acquire images of a cargo list; a text content recognition module, configured to perform text content recognition on the image of the goods list to obtain text information corresponding to the goods list; a category prediction module, configured to segment the text information corresponding to the goods list, and predict the category of the goods in the goods list using a machine learning model based on the segmentation result; a cargo screening and recording module, configured to screen out food-related cargo from the cargo in the cargo list according to the predicted category of the cargo, and record cargo information of the food-related cargo; The cargo screening and recording module is further configured to determine a time difference between a generation time of the cargo list and an acquisition time of the image; and adopt a recording strategy corresponding to the time difference to record cargo information of the food-type cargo; wherein the adopting of the recording strategy corresponding to the time difference to record cargo information of the food-type cargo comprises at least one of the following: when the time difference is less than a threshold value t, displaying a first interface, wherein cargo information of the food-type cargo screened out is displayed in the first interface, and prompting to confirm the cargo information of the food-type cargo screened out; upon receiving confirmation of the cargo information of the food-type cargo screened out, recording the displayed cargo information, and displaying a recommended storage location corresponding to the food-type cargo; and when the time difference is not less than the threshold value t, displaying a second interface, wherein cargo information of the food-type cargo screened out is displayed in the second interface, and prompting to delete the cargo information of the food-type cargo that has been used; upon receiving a deletion result, recording cargo information of the food-type cargo that has not been deleted, and displaying a recommended storage location of the food-type cargo that has not been deleted.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 8 when executed.