Edible oil detection method and device

By setting up a sampling device and detection model in the frying device, combining visual characteristics and status information, the total polar component value of edible oil is identified in real time, and the real-time and cost problems of edible oil detection in the prior art are solved, and efficient and accurate edible oil safety assessment is achieved.

CN115046936BActive Publication Date: 2025-08-26ALIBABA CLOUD COMPUTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210300832.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-08-26
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

The existing detection methods for total polarity component value of edible oil cannot achieve real-time detection and are cost-effective, and can only conduct random inspections, and the safety of edible oil cannot be determined during the frying process.

Method used

The sampling device is set up in the frying device. By collecting the visual characteristic information of the oil sample and the frying status information, the edible oil detection model is used to identify the total polar component value in real time, and data processing is carried out in combination with the Internet of Things platform and cloud data center to achieve safety assessment of edible oil.

Benefits of technology

Real-time detection of edible oil during frying is achieved, and its safety is determined. The detection method is convenient and accurate, so as to avoid using unsafe edible oil to treat food.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115046936B_ABST
    Figure CN115046936B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method and device for detecting edible oil, which are applied to a frying device equipped with a sampling device. The method includes: while the frying device is in operation, obtaining frying status information and transferring the edible oil in the frying device to the sampling device to obtain an oil sample; collecting visual feature information of the oil sample in the sampling device; identifying the total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying status information; and determining the safety of the edible oil in the frying device based on the range within which the total polar component value falls. This method allows for real-time testing of the edible oil during use, determining the total polar component value, and thereby determining whether the current edible oil is safe. The detection method is convenient and highly accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of food technology, in particular to a method and a device for detecting edible oil. Background Art

[0002] Total Polar Meters (TPM) is a metric used to evaluate the polarity content of cooking oils. Excessively high polarity levels indicate that the oil is unsafe to use and should not be used for cooking.

[0003] Generally speaking, there are two ways to test the total polarity content of edible oil. One method involves using a total polarity content test strip. After smearing the edible oil on the test strip for 10-20 seconds, the approximate range of the total polarity content of the edible oil is determined by comparing the color of the test strip with a standard color sample card. The other method involves using a handheld detector, inserting the probe into the edible oil to measure the total polarity content in real time.

[0004] However, the test strip method cannot obtain test results in real time. The handheld detector method is expensive. Furthermore, both the test strip and handheld detector methods require hot oil (around 170°C) to obtain relatively accurate test results. Furthermore, both methods are typically limited to spot checks and cannot perform real-time detection of total polar component values. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method for detecting edible oil and a corresponding device for detecting edible oil that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a method for detecting edible oil, which is applied to a frying device, wherein a sampling device is provided in the frying device. The method comprises:

[0007] When the frying device is in operation, frying state information is obtained, and edible oil in the frying device is transferred to a sampling device to obtain an oil sample;

[0008] collecting visual characteristic information of the oil sample in the sampling device;

[0009] identifying a total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information;

[0010] The safety level of the edible oil in the frying device is determined according to the interval in which the total polar component value is located.

[0011] Optionally, the step of identifying the total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information includes:

[0012] extracting color information from the visual feature information of the oil sample;

[0013] The total polar component value of the current edible oil is identified according to the color information of the oil sample and the frying state information.

[0014] Optionally, the step of extracting color information from the visual feature information of the oil sample includes:

[0015] Extracting original color information represented by three primary colors from the visual feature information of the oil sample;

[0016] Converts the original color information represented by the three primary colors into the target color information represented by brightness and color.

[0017] Optionally, the step of identifying the total polar component value of the current edible oil based on the color information of the oil sample and the frying state information includes:

[0018] The color information of the oil sample and the frying state information are input into an edible oil detection model to obtain a total polar component value of the current edible oil.

[0019] Optionally, the step of inputting the color information and frying status information of the oil sample into an edible oil detection model to obtain a total polar component value of the current edible oil includes:

[0020] The color information and frying state information of the oil sample obtained in the current cycle and at least one historical cycle before the current cycle are input into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0021] Optionally, the step of extracting color information from the visual feature information of the oil sample includes:

[0022] Sending the visual feature information to the Internet of Things platform;

[0023] The visual feature information is sent to the edible oil detection server via the Internet of Things platform using the Advanced Message Queuing Protocol;

[0024] The color information is extracted from the visual feature information by the edible oil detection server.

[0025] Optionally, the method further includes:

[0026] Sending the frying status information to an Internet of Things platform;

[0027] The frying status information is sent to an edible oil detection server via the Internet of Things platform based on the Advanced Message Queuing Protocol;

[0028] The step of inputting the color information of the oil sample and the frying state information into an edible oil detection model to obtain a total polar component value of the current edible oil comprises:

[0029] The color information of the oil sample and the frying state information are input into an edible oil detection model through the edible oil detection server to obtain a total polar component value of the current edible oil.

[0030] Optionally, the method further includes:

[0031] At least one piece of visual feature information is sent as a training sample to a preset cloud data center.

[0032] An embodiment of the present invention further provides an edible oil detection device, which is applied to a frying device, wherein a sampling device is provided in the frying device, and the method includes:

[0033] An oil sampling module is used to obtain frying status information when the frying device is in operation, and to transfer the edible oil in the frying device to a sampling device to obtain an oil sample;

[0034] A visual feature acquisition module, configured to acquire visual feature information of the oil sample in the sampling device;

[0035] an identification module, configured to identify a total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information;

[0036] The safety determination module is used to determine the safety level of the edible oil in the frying device according to the interval of the total polar component value.

[0037] Optionally, the identification module includes:

[0038] A color extraction submodule, configured to extract color information from the visual feature information of the oil sample;

[0039] The component identification submodule is used to identify the total polar component value of the current edible oil according to the color information of the oil sample and the frying state information.

[0040] Optionally, the color extraction submodule includes:

[0041] an original color recognition unit, configured to extract original color information represented by three primary colors from the visual feature information of the oil sample;

[0042] The color conversion unit is used to convert original color information represented by the three primary colors into target color information represented by brightness and color.

[0043] Optionally, the component identification submodule includes:

[0044] The model recognition unit is used to input the color information of the oil sample and the frying state information into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0045] Optionally, the model recognition unit includes:

[0046] The model recognition subunit is used to input the color information and frying status information of the oil sample obtained in the current cycle and at least one historical cycle before the current cycle into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0047] Optionally, the color extraction submodule includes:

[0048] A platform uploading unit, configured to send the visual feature information to an Internet of Things platform;

[0049] A server sending unit, configured to send the visual feature information to an edible oil detection server via the Internet of Things platform using an Advanced Message Queuing Protocol;

[0050] A color recognition unit is configured to extract color information from the visual feature information through the edible oil detection server.

[0051] Optionally, the device further comprises:

[0052] A first status uploading module, configured to send the frying status information to an Internet of Things platform;

[0053] A second status uploading module is used to send the frying status information to the edible oil detection server through the Internet of Things platform based on the Advanced Message Queuing Protocol;

[0054] The component identification submodule includes:

[0055] The component identification unit is used to input the color information of the oil sample and the frying state information into the edible oil detection model through the edible oil detection server to obtain the total polar component value of the current edible oil.

[0056] Optionally, the device further comprises:

[0057] The central uploading module is used to send at least one piece of the visual feature information as a training sample to a preset cloud data center.

[0058] An embodiment of the present invention further discloses an electronic device, including:

[0059] one or more processors; and

[0060] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform one or more methods as described in the embodiments of the present invention.

[0061] The embodiments of the present invention further disclose one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to perform one or more methods as described in the embodiments of the present invention.

[0062] The embodiments of the present invention include the following advantages:

[0063] The edible oil detection method provided by an embodiment of the present invention obtains frying status information while a frying device is in operation, transfers the edible oil in the frying device to a sampling device to obtain an oil sample, collects visual feature information of the oil sample in the sampling device, and identifies the total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying status information. This allows for real-time testing of the edible oil during use, determining the total polar component value to determine whether the current edible oil is safe. This convenient and highly accurate detection method is used. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is a schematic diagram of a frying device according to an embodiment of the present invention:

[0065] Figure 2 This is a schematic diagram of the interior of a frying device according to an embodiment of the present invention;

[0066] Figure 3 This is a flowchart of the steps of an edible oil detection method according to an embodiment of the present invention;

[0067] Figure 4 Schematic diagram of the color difference between an oil sample and a colorimetric column according to an embodiment of the present invention;

[0068] Figure 5 is a flowchart of another embodiment of an edible oil detection method according to an embodiment of the present invention;

[0069] Figure 6 is a schematic diagram of an edible oil detection model according to an embodiment of the present invention;

[0070] Figure 7 is a schematic diagram of an edible oil detection method according to an embodiment of the present invention;

[0071] Figure 8 This is a structural block diagram of an edible oil detection device embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0073] In an embodiment of the present invention, a sampling device is provided within a frying apparatus, enabling the frying apparatus to collect oil samples. Subsequently, while the frying apparatus is in operation and frying food, the sampling device periodically collects oil samples and collects visual feature information of the oil samples within the sampling device. Based on the visual feature information and frying status information, the total polar component value of the current edible oil is identified. This allows for real-time and convenient monitoring of the safety of the edible oil within the frying apparatus during operation.

[0074] Embodiments of the present invention can be applied to a frying device. A frying device can be used to process food using oil, such as deep-frying, pan-frying, or blistering. Examples include commercial and household fryers. The frying device can have a cubic or circular shape, and can hold oil volumes of 1L, 10L, 50L, or 100L, without limitation in the present invention.

[0075] The frying apparatus may be provided with a sampling device, such as a straight sampling tube, a U-shaped sampling tube, or a vacuum sampler. The sampling device communicates with the oil-containing space within the frying apparatus. Thus, during the frying process, the oil being used in the frying apparatus can be delivered to the sampling device via hydraulic pressure or other means.

[0076] As a specific example of the present invention, Figure 1 This is a schematic diagram of a frying device according to an embodiment of the present invention. Figure 2 This is another internal schematic diagram of a frying device according to an embodiment of the present invention. Figure 1 The frying device shown is a commercial frying pan, which may be provided with an oil tank for containing cooking oil. Figure 2 The U-shaped sampling tube 201 is shown to collect oil samples during the operation of a commercial fryer. At the same time, a visual feature extraction device 202 can also be set facing the U-shaped sampling tube 201 to collect visual feature information later.

[0077] Reference Figure 3 , shows a flowchart of a method for detecting edible oil according to an embodiment of the present invention, which may specifically include the following steps:

[0078] Step 301: When a frying device is in operation, frying status information is obtained, and edible oil in the frying device is transferred to a sampling device to obtain an oil sample;

[0079] When the frying device is in operation, it may be processing food using cooking oil. Over time, the polarity of the cooking oil may gradually increase. To prevent the use of unsafe cooking oil to process food, the cooking oil from the food being processed in the frying device may be transferred to a sampling device at a predetermined interval to obtain an oil sample for subsequent testing to determine whether the cooking oil is safe.

[0080] Among them, the preset period can be 2 minutes, 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 6 hours, etc., and the amount of the oil sample can be 1 ml, 10 ml, 50 ml, 100 ml, etc., and the present invention does not impose any restrictions on this.

[0081] The total polar component value of the edible oil may be associated with the frying state information during the frying process. To improve the accuracy of calculating the total polar component value, the frying state information may be obtained while obtaining the oil sample at a preset period.

[0082] The frying status information includes at least one of oil temperature, cooking oil density, usage time, fried food type, and fried food weight.

[0083] Specifically, the higher the oil temperature, the higher the total polar component value of the edible oil. Therefore, a preset periodic oil temperature measurement can be used to better determine the total polar component value of the edible oil. In a specific implementation, a thermometer can be installed in the frying device to monitor the oil temperature in real time.

[0084] During cooking oil use, moisture from food can enter the oil, and at high temperatures, the oil can undergo oxidation reactions, generating impurities. Consequently, the specific gravity of the oil gradually increases during use. Therefore, the specific gravity of the oil can be collected at a predetermined interval to better determine the total polar component value of the oil. In a specific implementation, a hydrometer can be installed in the frying device to monitor the specific gravity of the oil in real time.

[0085] Usage time can be the actual time the cooking oil is used to fry food. For example, if a frying machine is used to fry French fries from 0 to 10 minutes, pauses from 10 to 20 minutes, and resumes frying French fries from 20 to 30 minutes, the cooking oil is actually used from 0 to 10 minutes and from 20 to 30 minutes, resulting in a total usage time of 20 minutes. As usage time increases, the total polarity component value of the cooking oil can gradually increase. Therefore, the usage time of the cooking oil can be counted to better determine the total polarity component value of the cooking oil.

[0086] The type of fried food and the weight of fried food may be correlated with the rate of increase of the total polar component value of the edible oil. For example, when the edible oil is used to process meat dishes, the rate of increase of the total polar component value may be greater than when the edible oil is used to process vegetables. At the same time, the more food is processed with the edible oil, the faster the total polar component value of the edible oil may increase. Therefore, in order to better determine the total polar component value of the edible oil, the type of fried food and the weight of fried food may also be collected. In a specific implementation, the type of fried food and the weight of fried food may be obtained by manual input. In the standardized catering industry, the processing flow of dishes is usually fixed. For example, the standard processing flow of meatballs is to fry 2 kilograms of meatballs each time. In this case, the type of fried food and the weight of fried food may be input into the frying device in advance.

[0087] Step 302: collecting visual feature information of the oil sample in the sampling device;

[0088] Generally speaking, experienced chefs can infer whether the cooking oil is safe and whether it needs to be used by observing changes in the appearance of the cooking oil.

[0089] As a specific example of the present invention, a colorimetric column can be used to compare the color changes of oil samples. Generally speaking, the colorimetric column can include a left oil column, a middle oil column, and a right oil column. An oil sample that is close to being unusable can be added to the left oil column, and an oil sample that is in a discarded state can be added to the right oil column. The middle oil column is used to load the oil sample to be tested that needs to be compared. During the use of a frying device, sampling can be performed regularly based on the colorimetric column, and the color difference between the oil samples collected at different times relative to the left oil column and the right oil column can be compared. The color difference comparison result is as follows: Figure 4 As shown in the figure, as the cooking oil ages, the color difference between the oil sample collected using the colorimetric column and the left and right oil columns gradually decreases. This indicates that the content of polar components in cooking oil can be correlated with its appearance.

[0090] Thus, when the total polar component value of the oil sample is detected by the sampling device, visual feature information of the oil sample in the sampling device can be collected. Specifically, the frying device can be provided with a visual feature extraction device facing the sampling device. The visual feature extraction device can collect the oil sample in the sampling device to obtain visual feature information.

[0091] The visual feature information may be information associated with the appearance of the oil sample, for example, at least one of the shape and color of the oil sample.

[0092] The visual feature extraction device can be a device for collecting visual feature information of the oil sample, such as a camera, a video camera, an infrared imaging device, etc. When the visual feature extraction device is a camera, the camera can specifically be an area array camera, a line array camera, etc., and the present invention does not impose any limitation on this.

[0093] At the same time, in order to ensure that during the information collection process, the shooting conditions will not change due to changes in the external environment, so that the effect of the visual feature information will not be affected by multiple factors and cause errors, the visual feature extraction device and the sampling device can be set in a black box to ensure that the visual feature information is shot under the same shooting conditions, thereby improving the accuracy of the total polar component value detection.

[0094] Step 303: identifying the total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information;

[0095] After the visual feature information is obtained, the total polar component value of the current edible oil can be identified based on the visual feature information and the frying state information.

[0096] In a specific implementation, the visual feature information and frying status information of the oil sample at different polarity component values ​​can be collected in advance, and then the total polarity component value of the current edible oil can be determined in a variety of different ways. For example, a correspondence between the appearance of the oil sample and the polarity component value can be established, and then the appearance of the current oil sample can be determined based on the visual feature information of the current edible oil, and the state of the current oil sample can be determined based on the frying status information of the current edible oil. Thereafter, based on the correspondence between the visual feature information and frying status information of the oil sample relative to the polarity component value, the polarity component value corresponding to the current oil sample can be determined, thereby knowing the total polarity component value of the current edible oil. For another example, a model can be trained by using the visual feature information and frying status information of the oil sample at different polarity component values ​​collected in advance, and then the visual feature information and frying status information can be input into the model to obtain the total polarity component value output by the model.

[0097] Step 304: Determine the safety level of the edible oil in the frying device according to the interval of the total polar component value.

[0098] After determining the total polar component value of the current edible oil, the safety level of the edible oil in the frying device can be determined based on the interval in which the total polar component value is located. Generally speaking, when the total polar component value is greater than 27, the edible oil can be considered unusable and the safety level of the edible oil is extremely low. In addition, according to actual needs, at least one interval can be divided within a range of no more than 27 to further divide the safety level of the current edible oil. For example, 0 to 10 can be divided into a high safety level interval, 11 to 18 can be divided into a medium safety level interval, and 18 to 27 can be divided into a low safety level interval requiring vigilance. The present invention does not impose any restrictions on this.

[0099] The edible oil detection method provided by an embodiment of the present invention obtains frying status information while a frying device is in operation, transfers the edible oil in the frying device to a sampling device to obtain an oil sample, and performs real-time sampling during the edible oil use process. Visual feature information of the oil sample in the sampling device is collected; based on the visual feature information of the oil sample and the frying status information, the total polar component value of the current edible oil is identified; and based on the range within which the total polar component value falls, the safety level of the edible oil in the frying device is determined. This allows for real-time testing of the edible oil during use, determining the total polar component value, and determining whether the current edible oil is safe. This convenient detection method is highly accurate.

[0100] Reference Figure 5 , shows a flowchart of a method for detecting edible oil according to an embodiment of the present invention, which may specifically include the following steps:

[0101] Step 501: When a frying device is in operation, frying status information is obtained, and edible oil in the frying device is transferred to a sampling device to obtain an oil sample;

[0102] When the frying device is in operation, it may be processing food using cooking oil. Over time, the polarity of the cooking oil may gradually increase. To prevent the use of unsafe cooking oil to process food, the cooking oil from the food being processed in the frying device may be transferred to a sampling device at a predetermined interval to obtain an oil sample for subsequent testing to determine whether the cooking oil is safe.

[0103] Among them, the preset period can be 2 minutes, 5 minutes, 10 minutes, 50 minutes, 1 hour, 2 hours, 6 hours, etc., and the amount of the oil sample can be 1 ml, 10 ml, 50 ml, 100 ml, etc., and the present invention does not impose any restrictions on this.

[0104] The total polar component value of the edible oil may be associated with the frying state information during the frying process. To improve the accuracy of calculating the total polar component value, the frying state information may be obtained while obtaining the oil sample at a preset period.

[0105] The frying status information includes at least one of oil temperature, cooking oil density, usage time, fried food type, and fried food weight.

[0106] Step 502, collecting visual feature information of the oil sample in the sampling device;

[0107] Generally speaking, experienced chefs can infer whether the cooking oil is safe and whether it needs to be used by observing changes in the appearance of the cooking oil.

[0108] Therefore, when the total polar component value of the oil sample is detected based on the sampling device, visual feature information of the oil sample in the sampling device can be collected, wherein the visual feature information can be information associated with the appearance of the oil sample.

[0109] As a specific example of the present invention, the frying device may be provided with a camera facing the sampling device. The camera can be used to photograph the oil sample in the sampling device, obtaining a photograph of the oil sample as visual feature information. Furthermore, to ensure that the image capture process is not affected by changes in the external environment that may cause changes in shooting conditions and lead to errors in the shooting effect due to multiple factors, the camera and sampling device can be placed in a black box to ensure that photos of the oil sample are taken under the same shooting conditions, thereby improving the accuracy of the total polar component value detection.

[0110] Step 503: extracting color information from the visual feature information of the oil sample;

[0111] Generally speaking, experienced chefs can infer whether cooking oil is safe and whether it needs to be used by observing the changes in its color. Therefore, after obtaining the visual feature information, color information can be further extracted from the visual feature information of the oil sample to determine the safety level of the oil sample based on the color information of the oil sample.

[0112] In a specific implementation, the visual feature information acquired by the visual feature extraction device may include at least color information and may also include information such as the oil sample's morphology. If the visual feature information only includes color information, the visual feature information can be used as the color information. Furthermore, if the visual feature information also includes other information besides color information, the color information can be extracted from the visual feature information of the oil sample.

[0113] For example, when a camera is used to take a picture of an oil sample, the picture of the oil sample may contain not only color information but also shape information of the oil sample. In this case, the picture of the oil sample may be further processed to extract the color information of the oil sample.

[0114] In one embodiment of the present invention, the step of extracting color information from the visual feature information of the oil sample includes:

[0115] S11, extracting original color information represented by three primary colors from the visual feature information of the oil sample;

[0116] Generally speaking, color information can be represented using the three primary colors (RGB), which can be divided into three color channels: red, green, and blue. Each color channel has a value range of 0 to 255. By using different values ​​in the three color channels, the color components of different brightnesses in the three color channels are mixed together to form the final displayed color. Most systems use the three primary colors to represent color. Therefore, the original color information based on the three primary colors can be extracted from the visual feature information of the oil sample.

[0117] S12, converting the original color information represented by the three primary colors into target color information represented by brightness and color.

[0118] Because the color components of the three color channels are correlated when representing color based on the three primary colors, changes in a single color channel can simultaneously change the hue, saturation, and brightness of the resulting displayed color. Representing color based on the three primary colors does not intuitively measure hue, saturation, and brightness. In reality, chefs determine the safety of cooking oil based on a comprehensive evaluation of its hue, saturation, and brightness. Therefore, to better determine the total polar component value of an oil sample based on its color information, the original color information represented by the three primary colors can be converted into target color information based on brightness and color representation (Lab). This target color information can represent all colors perceptible to the human eye and more closely resembles true human perception. Furthermore, because it uses the lightness channel (L), the red-green channel (a), and the yellow-blue channel (b) to represent color, distinguishing lightness from color, it can better analyze color similarity using the target color information based on brightness and color representation.

[0119] In a specific implementation, the conversion of the original color information represented by the three primary colors into the target color information represented by brightness and color can be achieved using the following calculation formula:

[0120]

[0121]

[0122] a=500[f(X / 0.950456)-f(Y / 1.0)]

[0123] b=200[f(Y / 1.0)-f(Z / 1.088754)]

[0124] in,

[0125] Where R is the value of the red channel in the original color information, G is the value of the green channel in the original color information, and B is the value of the blue channel in the original color information. L is the lightness value in the target color information, a is the value of the red and green channels in the target color information, and b is the value of the yellow and blue channels in the target color information.

[0126] In one embodiment of the present invention, the step of extracting color information from the visual feature information of the oil sample includes:

[0127] S21, sending the visual feature information to the Internet of Things platform;

[0128] In order to improve the efficiency and security of data transmission, the frying device can upload the collected visual feature information through the Internet of Things platform to subsequently determine the total polar component value of the edible oil.

[0129] Specifically, the IoT platform can be used to manage a large number of devices and provide a variety of network access solutions to facilitate the access of different types of IoT devices to the network. It can also provide authentication, communication management and other functions to ensure the security of connected IoT devices.

[0130] The fryer can upload visual feature information to an IoT platform via the Message Queuing Telemetry Transport (MQTT) protocol. This protocol is scalable in unreliable network environments and is suitable for scenarios with limited device hardware storage or network bandwidth. This allows the fryer to complete data transmission even with limited bandwidth.

[0131] S22, sending the visual feature information to an edible oil detection server via the Internet of Things platform using an Advanced Message Queuing Protocol;

[0132] Specifically, after the IoT platform obtains the visual feature information, since the total polar component value of the edible oil requires high real-time performance and the amount of data to be transmitted is small, the Advanced Message Queuing Protocol (AMQP) can be used to efficiently push the visual feature information to the edible oil detection server in the form of subscription, thereby realizing efficient transmission of low-data-volume messages.

[0133] S23, extracting color information from the visual feature information through the edible oil detection server.

[0134] After acquiring the visual feature information, the edible oil detection server can extract the color information of the oil sample from the visual feature information, so as to further determine the total polar component value of the edible oil.

[0135] Step 504: identifying the total polar component value of the current edible oil based on the color information of the oil sample and the frying state information;

[0136] Specifically, the total polarity component value of the current edible oil can be identified based on both the color information of the oil sample and the frying status information. This allows the total polarity component value of the edible oil to be determined by comprehensively considering multiple factors associated with changes in the total polarity component value. This ensures efficient detection of the total polarity component value of the edible oil while further improving the accuracy of detection.

[0137] In one embodiment of the present invention, the step of identifying the total polar component value of the current edible oil based on the color information of the oil sample and the frying state information includes:

[0138] S31, inputting the color information of the oil sample and the frying state information into an edible oil detection model to obtain a total polar component value of the current edible oil.

[0139] In a specific implementation, a pre-trained edible oil detection model can be used to detect the total polar component value of the current edible oil. Thus, the color information of the oil sample and the frying state information can be input into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0140] The edible oil detection model may be a K-nearest neighbor algorithm model, a perceptron model, a recurrent neural network (RNN) model, a long short-term memory (LSTM) model, etc., and the present invention does not limit this.

[0141] In a specific implementation, the color information and frying status information of at least one set of oil samples can be collected in advance, and the total polar component value of the oil sample can be determined as a training sample to train the preset model to be trained to obtain an edible oil detection model.

[0142] In one embodiment of the present invention, the step of inputting the color information and frying status information of the oil sample into an edible oil detection model to obtain the total polar component value of the current edible oil includes:

[0143] S41, inputting the color information and frying status information of the oil sample obtained in the current cycle and at least one historical cycle before the current cycle into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0144] Specifically, because the total polarity component value of edible oil changes continuously during its use, the edible oil detection model can determine the total polarity component value of the current edible oil based on the color information and frying status information obtained in the current cycle, and further based on the color information and frying status information obtained in at least one historical cycle before the current cycle, to more accurately determine the total polarity component value of the edible oil.

[0145] Specifically, the edible oil detection model can have multiple time steps, so that the edible oil detection model can record the color information and frying state information input in the current cycle, and the color information and frying state information input in at least one historical cycle. The edible oil detection model can each be based on the color information and frying state information of the oil sample input in the current cycle and at least one historical cycle before the current cycle.

[0146] As a specific example of the present invention, Figure 6 Schematic diagram of an edible oil detection model according to an embodiment of the present invention. The edible oil detection model may be a Long Short-Term Memory (LSTM) model with 6 time steps.

[0147] X t = [Lab value, temperature, specific gravity, type and weight of fried food, actual frying time] t

[0148] For example, the color information and frying status information can be acquired in a cycle of 10 minutes. t The color information and frying status information obtained at the current moment, X t-6 For X tThe edible oil detection model can determine the total polar component value of the edible oil based on the color information and frying status information of the oil sample obtained in the current cycle and the 6 historical cycles before the current cycle.

[0149] In one embodiment of the present invention, the method further comprises:

[0150] S51, sending the frying status information to an Internet of Things platform;

[0151] In order to improve the efficiency and security of data transmission, the frying device can upload the collected frying status information through the Internet of Things platform to subsequently determine the total polar component value of the edible oil.

[0152] S52, sending the frying status information to an edible oil detection server via the Internet of Things platform based on the Advanced Message Queuing Protocol;

[0153] Specifically, after the IoT platform obtains the frying status information, since the total polar component value of the edible oil requires high real-time performance and the amount of data to be transmitted is small, the Advanced Message Queuing Protocol (AMQP) can be used to efficiently push the frying status information to the edible oil detection server in the form of subscription, thereby achieving efficient transmission of low-data-volume messages.

[0154] In one embodiment of the present invention, the step of inputting the color information of the oil sample and the frying state information into an edible oil detection model to obtain a total polar component value of the current edible oil includes:

[0155] S61: Inputting the color information of the oil sample and the frying state information into an edible oil detection model through the edible oil detection server to obtain a total polar component value of the current edible oil.

[0156] Specifically, the edible oil detection model can be deployed in an edible oil detection server. After receiving the oil sample color information and frying status information from the IoT platform, the edible oil detection server can input these information into the edible oil detection model to obtain the total polarity component value of the current edible oil. Subsequently, the Advanced Message Queuing Protocol (AMQ) can be used to transmit the total polarity component value of the current edible oil back to the IoT platform. The platform then sends this value to the frying device, allowing the frying device to obtain the total polarity component value and determine whether the edible oil is safe.

[0157] In one embodiment of the present invention, the method further comprises:

[0158] S71: Send at least one piece of visual feature information as a training sample to a preset cloud data center.

[0159] Specifically, to improve the accuracy of the model, while the total polar component value of the current edible oil is detected by the edible oil detection server, at least one piece of visual feature information can be sent as a training sample to a preset cloud data center as needed. The cloud data center further trains the model based on the uploaded data to improve its accuracy.

[0160] In a specific implementation, the cloud data center can include a big data computing platform, a data storage platform, and a data processing platform. Visual feature information can be stored in the data storage platform, and frying state information can be stored in the big data computing platform. The data processing platform can then process this information into feature information required for model training.

[0161] As a specific example of the present invention, Figure 7 The figure is a schematic diagram of an edible oil detection method according to an embodiment of the present invention. The frying device can upload visual feature information and frying status information to an IoT platform via the Message Queuing Telemetry Transport (MQTT) protocol. Subsequently, after collecting a large amount of data, the IoT platform can upload the visual feature information and frying status information as training data to a cloud data center. The cloud data center can store the visual feature information on a data storage platform and the frying status information on a big data computing platform. The data processing platform can then process the information into feature information required for model training. Furthermore, for total polarity component detection, which requires high real-time performance, the IoT platform can efficiently push the visual feature information and frying status information to an edible oil detection server using the Advanced Message Queuing Protocol (AMQP) via a subscription mechanism, achieving efficient transmission of low-volume messages. The edible oil detection server inputs the oil sample's color information and frying status information into the edible oil detection model, obtains the total polarity component value of the current edible oil, and transmits it back to the IoT platform via the Advanced Message Queuing Protocol. The IoT platform then returns the total polarity component value to the frying device via the Message Queuing Telemetry Transport Protocol.

[0162] Step 505: Determine the safety level of the edible oil in the frying device according to the interval of the total polar component value.

[0163] After determining the total polar component value of the current edible oil, the safety level of the edible oil in the frying device can be determined based on the interval in which the total polar component value is located. Generally speaking, when the total polar component value is greater than 27, the edible oil can be considered unusable and the safety level of the edible oil is extremely low. In addition, according to actual needs, at least one interval can be divided within a range of no more than 27 to further divide the safety level of the current edible oil. For example, 0 to 10 can be divided into a high safety level interval, 11 to 18 can be divided into a medium safety level interval, and 18 to 27 can be divided into a low safety level interval requiring vigilance. The present invention does not impose any restrictions on this.

[0164] The edible oil detection method provided by an embodiment of the present invention obtains frying status information while a frying device is in operation, transfers the edible oil in the frying device to a sampling device to obtain an oil sample, and performs real-time sampling during the edible oil use process. Visual feature information of the oil sample in the sampling device is collected; based on the visual feature information of the oil sample and the frying status information, the total polar component value of the current edible oil is identified; and based on the range within which the total polar component value falls, the safety level of the edible oil in the frying device is determined. This allows for real-time testing of the edible oil during use, determining the total polar component value, and determining whether the current edible oil is safe. This convenient detection method is highly accurate.

[0165] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0166] Reference Figure 8 , shows a structural block diagram of an embodiment of an edible oil detection device according to an embodiment of the present invention, which may specifically include the following modules:

[0167] The oil sampling module 801 is used to obtain frying status information when the frying device is in operation, and to transfer the edible oil in the frying device to a sampling device to obtain an oil sample;

[0168] A visual feature acquisition module 802 is used to acquire visual feature information of the oil sample in the sampling device;

[0169] an identification module 803 for identifying a total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information;

[0170] The safety determination module 804 is configured to determine the safety level of the edible oil in the frying device according to the interval in which the total polar component value is located.

[0171] Optionally, the identification module includes:

[0172] A color extraction submodule, configured to extract color information from the visual feature information of the oil sample;

[0173] The component identification submodule is used to identify the total polar component value of the current edible oil according to the color information of the oil sample and the frying state information.

[0174] Optionally, the color extraction submodule includes:

[0175] an original color recognition unit, configured to extract original color information represented by three primary colors from the visual feature information of the oil sample;

[0176] The color conversion unit is used to convert original color information represented by the three primary colors into target color information represented by brightness and color.

[0177] Optionally, the component identification submodule includes:

[0178] The model recognition unit is used to input the color information of the oil sample and the frying state information into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0179] Optionally, the model recognition unit includes:

[0180] The model recognition subunit is used to input the color information and frying status information of the oil sample obtained in the current cycle and at least one historical cycle before the current cycle into the edible oil detection model to obtain the total polar component value of the current edible oil.

[0181] Optionally, the color extraction submodule includes:

[0182] A platform uploading unit, configured to send the visual feature information to an Internet of Things platform;

[0183] A server sending unit, configured to send the visual feature information to an edible oil detection server via the Internet of Things platform using an Advanced Message Queuing Protocol;

[0184] A color recognition unit is configured to extract color information from the visual feature information through the edible oil detection server.

[0185] Optionally, the device further comprises:

[0186] A first status uploading module, configured to send the frying status information to an Internet of Things platform;

[0187] A second status uploading module is used to send the frying status information to the edible oil detection server through the Internet of Things platform based on the Advanced Message Queuing Protocol;

[0188] The component identification submodule includes:

[0189] The component identification unit is used to input the color information of the oil sample and the frying state information into the edible oil detection model through the edible oil detection server to obtain the total polar component value of the current edible oil.

[0190] Optionally, the device further comprises:

[0191] The central uploading module is used to send at least one piece of the visual feature information as a training sample to a preset cloud data center.

[0192] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0193] An embodiment of the present invention further provides an electronic device, including:

[0194] one or more processors; and

[0195] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the method described in the embodiment of the present invention.

[0196] The embodiments of the present invention further provide one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to perform the methods described in the embodiments of the present invention.

[0197] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0198] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0199] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0200] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0202] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0203] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0204] The above is a detailed introduction to a method for detecting edible oil and an edible oil detection device provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A method for detecting edible oil, characterized in that: Applied to a frying device, wherein a sampling device is provided in the frying device, the method comprises: When the frying device is in operation, frying state information is obtained, and edible oil in the frying device is transferred to a sampling device to obtain an oil sample; Acquiring visual characteristic information of the oil sample in the sampling device; Identifying the total polar component value of the current edible oil based on visual feature information of the oil sample acquired in the current cycle and at least one historical cycle before the current cycle and the frying state information; the visual feature information of the oil sample includes color information; The safety level of the edible oil in the frying device is determined according to the interval in which the total polar component value is located.

2. The method according to claim 1, characterized in that The step of identifying the total polar component value of the current edible oil based on the visual feature information of the oil sample and the frying state information includes: extracting color information from the visual feature information of the oil sample; The total polar component value of the current edible oil is identified according to the color information of the oil sample and the frying state information.

3. The method according to claim 2, characterized in that The step of extracting color information from the visual feature information of the oil sample comprises: Extracting original color information represented by three primary colors from the visual feature information of the oil sample; Converts the original color information represented by the three primary colors into the target color information represented by brightness and color.

4. The method according to claim 2, characterized in that The step of identifying the total polar component value of the current edible oil based on the color information of the oil sample and the frying state information includes: The color information of the oil sample and the frying state information are input into an edible oil detection model to obtain a total polar component value of the current edible oil.

5. The method according to claim 4, characterized in that The step of inputting the color information and frying state information of the oil sample into the edible oil detection model to obtain the total polar component value of the current edible oil includes: The color information and frying state information of the oil sample obtained in the current cycle and at least one historical cycle before the current cycle are input into the edible oil detection model to obtain the total polar component value of the current edible oil.

6. The method according to claim 2, characterized in that The step of extracting color information from the visual feature information of the oil sample comprises: Sending the visual feature information to the Internet of Things platform; The visual feature information is sent to the edible oil detection server via the Internet of Things platform using the Advanced Message Queuing Protocol; The color information is extracted from the visual feature information by the edible oil detection server.

7. The method according to claim 6, characterized in that The method further comprises: Sending the frying status information to an Internet of Things platform; The frying status information is sent to an edible oil detection server via the Internet of Things platform based on the Advanced Message Queuing Protocol; The step of inputting the color information of the oil sample and the frying state information into an edible oil detection model to obtain a total polar component value of the current edible oil comprises: The color information of the oil sample and the frying state information are input into an edible oil detection model through the edible oil detection server to obtain a total polar component value of the current edible oil.

8. The method according to claim 1, characterized in that The method further comprises: At least one piece of the visual feature information is sent as a training sample to a preset cloud data center.

9. A device for detecting edible oil, characterized in that: Applicable to a frying device, wherein a sampling device is provided in the frying device, and the device comprises: An oil sampling module is used to obtain frying status information when the frying device is in operation, and to transfer the edible oil in the frying device to a sampling device to obtain an oil sample; A visual feature acquisition module, configured to acquire visual feature information of the oil sample in the sampling device; an identification module, configured to identify the total polar component value of the current edible oil based on visual feature information of the oil sample acquired in a current cycle and at least one historical cycle before the current cycle and the frying state information; the visual feature information of the oil sample including color information; The safety determination module is used to determine the safety level of the edible oil in the frying device according to the interval of the total polar component value.

10. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the electronic device to perform the method according to any one of claims 1 to 8.

11. One or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Frying oil quality real-time on-line automatic detection device and method thereof

    CN108037162A