A method and device for detecting food validity period

By obtaining image information of food and considering changes in the storage environment, the problem of insufficient accurate detection of existing food validity periods is solved, and the accurate detection of food validity periods is achieved, especially the calculation of the validity period after the food is taken out from the refrigerator or refrigerator.

CN115931156BActive Publication Date: 2025-05-16EUROPEAN ANALYSIS INSPECTION & CERTIFICATION (CHENGDU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310000905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-03
Publication Date
2025-05-16
Estimated Expiration
2043-01-03

AI Technical Summary

Technical Problem

The existing food validity testing methods fail to fully consider the food storage environment and conditions, resulting in inaccurate testing, especially when the food is taken out of the refrigerator or refrigerator, its validity decay accelerates attenuation.

Method used

By obtaining image information of food, determining the situation of entering the storage device, and considering the validity period and temperature changes of the last departure time when it is not the first time, the validity period of the food storage time is calculated.

Benefits of technology

It realizes accurate detection of the validity period of food, takes into account storage time and environmental changes, and reduces errors, especially the calculation of the validity period after the food is taken out of the refrigerator or refrigerator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115931156B_ABST
    Figure CN115931156B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting the validity period of food, and relates to the technical field of food detection. The method comprises: obtaining first image information of food; determining the situation of the food entering a storage device according to the first image information, the situation including the first time and non-first time; when the food does not enter the storage device for the first time, obtaining the validity period corresponding to the time of leaving the storage device last time and the temperature change situation outside the storage device from the time of leaving to the time of storage, the temperature change situation including at least one temperature interval, and the temperature interval including multiple attenuation cycles; determining the validity period of the food at the time of storage according to the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change situation. The present invention takes into account the food storage environment and storage situation, and improves the accuracy of validity period detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of food detection, and in particular to a method and device for detecting the validity period of food. Background Art

[0002] As people's living standards continue to improve, the types of food they eat are becoming more and more abundant, and the nutritional combinations are becoming more and more scientific. This requires the reasonable storage of a variety of foods. Since different types of food have different shelf lives, the validity period of food is different. It is necessary to test the validity period of different foods to ensure food safety.

[0003] However, current food expiration date testing is not comprehensive enough. Existing food expiration date testing only determines the expiration date of food based on the shelf life on the packaging bag, without considering the storage environment and storage conditions of the food. In particular, if the user takes the food out of storage devices such as refrigerators and cold storage rooms, the expiration date of the food will decay faster. If the food is taken out again, relying on the original calculation method at this time cannot obtain an accurate expiration date. Summary of the invention

[0004] In view of the defects in the prior art, the present invention provides a method and device for detecting the validity period of food.

[0005] The technical solution of the present invention is as follows:

[0006] In one aspect, a method for detecting the expiration date of food is provided, the method comprising:

[0007] Acquiring first image information of food;

[0008] determining, according to the first image information, a situation in which the food enters the storage device, including the first time and the non-first time;

[0009] When the food does not enter the storage device for the first time, obtain the validity period corresponding to the last time the food left the storage device and the temperature change outside the storage device from the time of leaving to the time of storage, wherein the temperature change includes at least one temperature interval, and the temperature interval includes multiple attenuation cycles; determine the validity period of the food at the time of storage based on the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change.

[0010] Preferably, when the temperature change condition includes a temperature range, the formula for determining the validity period of the food storage time according to the validity period corresponding to the departure time, the time difference between the departure time and the storage time, and the temperature change condition is:

[0011]

[0012] t1+t2…tn =ΔT2

[0013] Where D3 is the validity period of the non-first storage time, d0 is the validity period corresponding to the last time of leaving the storage device, ΔT2 is the time difference between the time of leaving and the time of storage, and Δt i is the i-th decay period in ΔT2, and is the decay rate corresponding to the i-th decay period.

[0014] Preferably, the method further comprises:

[0015] When the food enters the storage device for the first time, acquiring second image information of the food;

[0016] The first predicted validity period of the food is determined based on the first image information, the second predicted validity period of the food is determined based on the second image information, and the validity period of the food when it is first stored is determined in combination with the first predicted validity period.

[0017] Preferably, the formula for determining the first predicted validity period of the food according to the first image information, determining the second predicted validity period of the food according to the second image information, and determining the validity period of the food at the first storage time in combination with the first predicted validity period is:

[0018] D1=λ1d1+λ2d2

[0019] In the formula, D1 is the validity period at the first storage time, d1 is the first predicted validity period, d2 is the second predicted validity period, λ1 is the weight coefficient of the first predicted validity period, λ2 is the weight coefficient of the second predicted validity period, and the weight coefficients of the first predicted validity period and the second validity period are determined according to the category of the food.

[0020] Preferably, the method further comprises: determining the validity period of the next departure time of leaving the storage device according to the difference between the storage time and the next departure time of leaving the storage device and the validity period of the storage time.

[0021] Preferably, the formula for determining the validity period of the next departure time of leaving the storage device according to the difference between the storage time and the next departure time of leaving the storage device and the validity period of the storage time is:

[0022]

[0023] Wherein, D2 is the validity period of the next departure time of leaving the storage device, ΔT2 is the difference between the storage time and the next departure time of leaving the storage device, and D0 is the validity period of the storage time.

[0024] In another aspect, a food expiration date detection device is provided, the device comprising:

[0025] An acquisition module, used for acquiring first image information of food;

[0026] A first processing module, configured to determine, based on the first image information, a situation in which the food enters the storage device, including a first time and a non-first time;

[0027] The second processing module is used to obtain the validity period corresponding to the last time the food leaves the storage device and the temperature change outside the storage device from the time of leaving to the time of storage, when it is not the first time that the food enters the storage device, wherein the temperature change includes at least one temperature interval, and the temperature interval includes multiple attenuation cycles; the validity period of the food at the time of storage is determined according to the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change.

[0028] The beneficial effects of the present invention are reflected in: the embodiments of the present invention provide a method and device for detecting the expiration date of food, which can determine the situation of the food entering the storage device based on the image of the food, take into account the changes in storage time and storage environment, and can realize accurate detection of the expiration date of the food. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0030] Figure 1 A schematic diagram of a food detection method provided by an embodiment of the present invention;

[0031] Figure 2 A structural diagram of a food detection device provided by an embodiment of the present invention DETAILED DESCRIPTION

[0032] The following embodiments of the technical solution of the present invention are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and cannot be used to limit the protection scope of the present invention.

[0033] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.

[0034] Embodiment 1

[0035] like Figure 1As shown, Figure 1 A method for detecting the validity period of food provided by an embodiment of the present invention is provided.

[0036] Step 1: Acquire first image information of food;

[0037] In the embodiment of the present invention, the first image information is obtained by a camera installed at the entrance of the storage room of the storage device, at least one storage room is installed in the warehouse, and the storage device includes but is not limited to a refrigerator, a cold storage room, etc. The first image information includes the name of the food, the production date and the shelf life.

[0038] More specifically, the first image information includes the name, production date and shelf life of the food, and the real-time second image information is obtained through a camera, which is a HYC-HD2000 high-definition camera, and the camera is used to obtain identification pictures of the food.

[0039] It should be noted that the embodiments of the present invention are directed to foods that can be distinguished from other foods, that is, products with distinguishing characteristics, for example, independently packaged products or labeled products, and the corresponding labels or packaging have unique codes.

[0040] For independently packaged foods, such as milk, ice cream, etc., the surface thereof usually includes a barcode part and a text part. In the embodiment of the present application, the barcode part and the text part are collectively referred to as identification information, wherein the barcode part can be a two-dimensional code or a barcode. In the embodiment of the present application, the camera obtains the barcode or two-dimensional code of the barcode part in the form of taking a photo, and then identifies the information of the barcode part to obtain the food information corresponding to the barcode part. If there is no barcode part on the outer surface of the independent package, the food name, production date and shelf life of the food are obtained according to the text part on the surface of the independent package. If the outer surface of the independent package has both a barcode part and a text part, the barcode part and the text part corresponding to the food are identified respectively, and the device result of the barcode part is combined with the recognition result of the text part to screen out the food name, production date and shelf life. For the same type of food, the food name recorded is the original food name and its barcode or any distinguishing feature.

[0041] Step 2: determining the situation of the food entering the storage device according to the first image information, the situation including the first time and the non-first time;

[0042] When food enters the storage device for the first time, its unique name is recorded. If it enters next time, it can be quickly identified to distinguish between first-time entry and non-first-time entry. For food that does not enter the storage device for the first time, its corresponding historical data can be quickly retrieved.

[0043] Step three: When the food does not enter the storage device for the first time, obtain the validity period corresponding to the last time the food left the storage device and the temperature change outside the storage device from the time of leaving to the time of storage, wherein the temperature change includes at least one temperature interval, and the temperature interval includes multiple attenuation cycles; determine the validity period of the food at the time of storage based on the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change.

[0044] Specifically, when the temperature change condition includes a temperature range, the formula for determining the validity period of the food storage time according to the validity period corresponding to the departure time, the time difference between the departure time and the storage time, and the temperature change condition is:

[0045]

[0046] Where D3 is the validity period of the non-first storage time, d0 is the validity period corresponding to the last time of leaving the storage device, ΔT2 is the time difference between the time of leaving and the time of storage, and Δt i is the i-th decay period in ΔT2, σ i is the decay rate corresponding to the i-th decay period.

[0047] When food leaves the storage device, its storage state changes. Since the external environment cannot preserve the food well, the food's shelf life decay rate will increase with the change of the external environment temperature. In addition, at the same temperature, the food's decay rate will increase with the growth of time. Therefore, in the embodiment of the present invention, a temperature interval is divided into multiple decay cycles. That is to say, the decay rate involved in the embodiment of the present invention is a dynamic function related to time.

[0048] Step 4: When the food enters the storage device for the first time, obtain the second image information of the food; determine the first predicted validity period of the food based on the first image information, determine the second predicted validity period of the food based on the second image information, and determine the validity period of the food when it is first stored in combination with the first predicted validity period.

[0049] In an embodiment of the present invention, a formula for determining a first predicted validity period of the food according to the first image information, determining a second predicted validity period of the food according to the second image information, and determining the validity period of the food at the first storage time in combination with the first predicted validity period is:

[0050] D1=λ1d1+λ2d2

[0051] In the formula, D1 is the validity period of the first storage time, d1 is the first predicted validity period, d2 is the second predicted validity period, λ1 is the weight coefficient of the first predicted validity period, and λ2 is the weight coefficient of the second predicted validity period.

[0052] It should be noted that the weight coefficients of the first predicted validity period and the second validity period are determined according to the category of the food. For example, when the food is milk in non-transparent packaging, the weight of the first predicted validity period is 100% because the internal situation cannot be observed. When the food is milk in transparent packaging, the weight of the first predicted validity period is 70%. This is because although the food is in transparent packaging, the index that can be obtained through the image is lower than the preset value. When the index that can be obtained through the image is greater than or equal to the preset value, the weight is 50%.

[0053] Since the food has not been placed in the storage device before, the previous storage conditions of the food are unclear. At this time, the shelf life of the food cannot be directly determined based on the shelf life on the packaging bag. In order to solve this problem, an embodiment of the present invention provides a method to reduce this error, which comprehensively considers the current shelf life and the current sensory state of the food to calculate the shelf life of the food when it initially enters the storage device.

[0054] Specifically, the first predicted validity period of the food is shelf life - (today's date - production date) * 24.

[0055] Specifically, the second image information is obtained by taking a photo of the appearance of the food at the time of storage. The second image information includes appearance information of the image. The appearance information includes color, transparency, surface texture, etc. In an embodiment of the present invention, a preset food expiration date evaluation model is used to evaluate the appearance of the food to determine the second expiration date of the food. The food expiration date evaluation model uses the food expiration date as output and various appearance indicators of the food as input.

[0056] Step 5: Determine the validity period of the next departure time of leaving the storage device according to the difference between the storage time and the next departure time of leaving the storage device and the validity period of the storage time.

[0057] Specifically, the formula for determining the validity period of the next departure time from the storage device according to the difference between the storage time and the next departure time from the storage device and the validity period of the storage time is:

[0058]

[0059] Wherein, D2 is the validity period of the next departure time of leaving the storage device, ΔT2 is the difference between the storage time and the next departure time of leaving the storage device, and D0 is the validity period of the storage time.

[0060] Since the storage device can provide the best storage environment for food, the decay of the validity period of the food when it is in the storage device can be approximately considered to be balanced. At this time, it is only necessary to calculate the difference between the validity period at the storage moment and the storage duration to obtain the validity period currently stored in the storage device. However, when the validity period is lower than a preset threshold, a reminder can be issued to the user in real time. In the embodiment of the present invention, the reminder method is not limited to voice or light signals, and can be used for reminders in remote and on-site ways.

[0061] In summary, the embodiments of the present invention provide a food detection method, which can determine the situation of food entering a storage device based on its image, take into account the changes in storage time and storage environment, and can realize accurate detection of the expiration date of food.

[0062] Embodiment 2

[0063] like Figure 2 As shown, an embodiment of the present invention provides a food expiration date detection device, the device comprising: an acquisition module, used to acquire first image information of food; a first processing module, used to determine the situation of the food entering a storage device according to the first image information, the situation including the first time and the non-first time; a second acquisition module, used to acquire the expiration date corresponding to the time of leaving the storage device last time and the temperature change of the outside of the storage device from the time of leaving to the time of storage when the food does not enter the storage device for the first time, the temperature change including at least one temperature interval, and the temperature interval including multiple attenuation cycles; a second processing module, used to determine the expiration date of the food at the time of storage according to the expiration date corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change.

[0064] A food expiration date detection device provided in an embodiment of the present invention and a food expiration date detection method provided in the above embodiment are based on the same inventive concept. For more specific working principles of each module in the embodiment of the present invention, reference can be made to the above embodiment and will not be repeated in the embodiment of the present invention.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

Claims

1. A method for detecting the validity period of food, characterized in that: The method comprises: Acquire first image information of food, wherein the first image information includes food name, production date and shelf life; determining, according to the first image information, a situation in which the food enters the storage device, including the first time and the non-first time; When the food does not enter the storage device for the first time, the validity period corresponding to the time of leaving the storage device last time and the temperature change outside the storage device from the time of leaving to the time of storage are obtained, wherein the temperature change includes at least one temperature interval, and the temperature interval includes multiple decay cycles; the validity period of the food at the time of storage is determined according to the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change; When the temperature change condition includes a temperature range, the formula for determining the validity period of the food storage time according to the validity period corresponding to the departure time, the time difference between the departure time and the storage time, and the temperature change condition is: In the formula, The validity period is not the first storage time. is the validity period corresponding to the last time you left the storage device, The time difference between the departure time and the storage time, for The i-th decay period in is the decay rate corresponding to the i-th decay cycle. The decay rate is a dynamic function related to time. As the external ambient temperature changes, the shelf life decay rate of the food will increase. At the same temperature, the decay rate of the food will also increase with time.

2. A method for detecting the validity period of food according to claim 1, characterized in that: The method further comprises: When the food enters the storage device for the first time, obtaining second image information of the food, the second image information including appearance information of the image, the appearance information including color, transparency and surface texture; A first predicted expiration date of the food is determined based on the first image information, and a second predicted expiration date of the food is determined based on the second image information. A preset food expiration date evaluation model is used to evaluate the appearance of the food to determine the second expiration date of the food. The food expiration date evaluation model uses the food expiration date as output and various appearance indicators of the food as input, and determines the expiration date of the food when it is first stored in combination with the first predicted expiration date.

3. A method for detecting the validity period of food according to claim 2, characterized in that: The formula for determining the first predicted validity period of the food according to the first image information, determining the second predicted validity period of the food according to the second image information, and determining the validity period of the food at the first storage time in combination with the first predicted validity period is: In the formula, The validity period is the first storage time. is the first forecast validity period, is the second forecast validity period, is the weight coefficient of the first prediction validity period, is a weight coefficient of the second predicted validity period, and the weight coefficients of the first predicted validity period and the second predicted validity period are determined according to the category of the food.

4. A food expiration date detection device, applied to the food expiration date detection method according to any one of claims 1 to 3, characterized in that: The device comprises: An acquisition module, used for acquiring first image information of food; A first processing module, configured to determine, based on the first image information, a situation in which the food enters the storage device, including a first time and a non-first time; The second processing module is used to obtain the validity period corresponding to the last time the food leaves the storage device and the temperature change outside the storage device from the time of leaving to the time of storage, when it is not the first time that the food enters the storage device, wherein the temperature change includes at least one temperature interval, and the temperature interval includes multiple attenuation cycles; the validity period of the food at the time of storage is determined according to the validity period corresponding to the time of leaving, the time difference between the time of leaving and the time of storage, and the temperature change.

Citation Information

Patent Citations

  • Material tracking and management system using electronic tags

    US20230012851A1