Refrigerator cabin cleanliness prediction method and device, electronic equipment and storage medium
By collecting and processing gas sensor data in the refrigerator, calculating and compensating sensor drift, and using one-dimensional convolutional neural network to predict cleanliness, the problem of inaccurate cleanliness prediction caused by sensor drift is solved, and the accuracy and real-time prediction are improved.
Patent Information
- Application Number
- CN202311462688.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the problem of inaccurate prediction of refrigerator compartment cleanliness due to gas sensor drift.
By collecting gas sensor measurement data in the refrigerator under no load and on-load states, the mean of low-frequency coefficients is calculated, the sensor drift compensation coefficient is calculated, and the gas sensor measurement data in the on-load stage is drift compensation. Then, the processed data is input into the one-dimensional convolutional neural network, and the cleanliness of the refrigerator compartment at the current time end is predicted through multi-sensor sequence classification.
It improves the accuracy and real-time prediction of refrigerator compartment cleanliness, reduces cost and time consumption, and improves user experience.
Smart Images

Figure CN119939376A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas sensors, and in particular to a method, device, electronic equipment and storage medium for predicting the cleanliness of a refrigerator compartment. Background Art
[0002] As people's concerns about food safety and hygiene continue to increase, the cleanliness of refrigerators has become an important issue. Traditionally, the cleanliness of refrigerators is usually determined by visual inspection or testing using chemical reagents. However, these methods have some limitations, such as subjectivity, time consumption and high cost.
[0003] In recent years, the development of gas sensor technology has provided new possibilities for solving this problem. Gas sensors can detect and measure the gas composition inside the refrigerator, thereby providing information about the cleanliness of the refrigerator. By analyzing the changes in gas composition, the sanitary conditions inside the refrigerator can be predicted. Gas sensors can detect a variety of gases, including volatile organic compounds, ammonia, carbon dioxide, etc. The presence and concentration of these gases can be correlated with the sanitary conditions inside the refrigerator. For example, high concentrations of volatile organic compounds may indicate food rotting or odor generation in the refrigerator, while high concentrations of ammonia may indicate food spoilage or bacterial growth in the refrigerator.
[0004] However, when using gas sensors for cleanliness prediction, there is a problem of gas sensor drift. Current technical means cannot completely solve the problem of sensor drift, so drift can be regarded as an inherent characteristic of the sensor, resulting in inaccurate cleanliness prediction. Summary of the invention
[0005] The object of the present invention is to provide a refrigerator compartment cleanliness prediction method, device, electronic device and storage medium to solve the problem of inaccurate refrigerator compartment cleanliness prediction caused by drift of gas sensors in the prior art.
[0006] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a method for predicting the cleanliness of a refrigerator compartment, comprising:
[0007] Collect gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state respectively;
[0008] Based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage, the low-frequency coefficient average of the two is calculated;
[0009] Calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data during the loaded phase;
[0010] The processed measurement data of multiple gas sensors within a period of time are input into a one-dimensional convolutional neural network, and the cleanliness of the refrigerator compartment at the current time end is predicted through multi-sensor sequence classification.
[0011] As a further improvement of an embodiment of the present invention, the method further includes: when the refrigerator is started, calibrating the gas sensor and saving the low-frequency coefficient mean C of K wavelet decompositions of the no-load measurement data in the initial state oi ,i∈{1,2,…,K};
[0012] Among them, K needs to obtain experience value according to specific circumstances.
[0013] As a further improvement of an embodiment of the present invention, the method further includes: determining whether the refrigerator compartment is in an empty state or a loaded state based on the gravity sensor;
[0014] The measurement data of the gas sensor is stored in real time. When the refrigerator compartment is in an empty state, only the empty measurement data of the last hour of this stage is retained;
[0015] The mean of the low-frequency coefficients of the K wavelet decompositions of the no-load measurement data for the last hour is C li ,i∈{1,2,…,K}.
[0016] As a further improvement of an embodiment of the present invention, the method further includes: the sensor drift compensation coefficient is expressed as:
[0017]
[0018] Then the K wavelet decomposition coefficients in the loaded stage after drift compensation are It is expressed as:
[0019]
[0020] Among them, m ji are the K wavelet decomposition coefficients in the loaded stage.
[0021] As a further improvement of an embodiment of the present invention, the method further includes: inversely transforming the drift-compensated wavelet decomposition coefficients in the loaded phase to obtain the gas sensor measurement data after the drift compensation in the loaded phase;
[0022] A mean filtering operation is performed on the gas sensor measurement data after drift compensation in the loaded stage to remove periodic noise.
[0023] As a further improvement of an embodiment of the present invention, the method further includes: the “inputting processed measurement data of multiple gas sensors within a period of time into a one-dimensional convolutional neural network” includes,
[0024] The measurement data of multiple gas sensors in the refrigerator compartment are collected over a period of time and input into a one-dimensional CNN neural network after drift compensation and mean filtering.
[0025] In the one-dimensional CNN neural network, gas features are extracted by using consecutive convolutional layers, batch normalization, and ReLU activation functions, and the gas features are summarized using a pooling layer after the convolutional layer.
[0026] As a further improvement of an embodiment of the present invention, the method further includes: the “predicting the cleanliness of the refrigerator compartment at the current time end through multi-sensor sequence classification” includes,
[0027] The summarized gas features are used for multi-classification prediction through the fully connected layer and the Softmax activation function, and the multi-classification probability value of the predicted cleanliness is output;
[0028] Based on the multi-classification probability value of the predicted cleanliness, the cleanliness of the refrigerator compartment corresponding to the current time series is determined.
[0029] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a refrigerator compartment cleanliness prediction device, comprising a data acquisition module, a calculation module, a drift compensation module and a prediction module.
[0030] The data acquisition module is used to respectively acquire gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state;
[0031] The calculation module is used to calculate the low-frequency coefficient mean of the two based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage;
[0032] The drift compensation module is used to calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data in the loaded stage;
[0033] The prediction module is used to input the processed measurement data of multiple gas sensors within a period of time into a one-dimensional convolutional neural network, and predict the cleanliness of the refrigerator compartment at the current time end through multi-sensor sequence classification.
[0034] To achieve one of the above-mentioned purposes of the invention, one embodiment of the present invention provides an electronic device, comprising a memory and a processor, characterized in that the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the refrigerator compartment cleanliness prediction method as described above are implemented.
[0035] To achieve one of the above-mentioned objects of the invention, one embodiment of the present invention provides a storage medium, wherein the storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, the steps in the refrigerator compartment cleanliness prediction method as described above are implemented.
[0036] Compared with the prior art, the refrigerator compartment cleanliness prediction method, device, electronic device and storage medium provided by the present invention can improve the accuracy and real-time performance of cleanliness prediction by collecting and processing gas sensor measurement data. The prediction accuracy is further improved by applying sensor drift compensation and one-dimensional convolutional neural network. At the same time, the present invention also reduces cost and time consumption and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is an overall flow chart of the refrigerator compartment cleanliness prediction method of the present invention.
[0038] Figure 2 It is a structural schematic diagram of the refrigerator compartment cleanliness prediction device of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0040] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0041] In the first embodiment of the present invention, the present invention provides a method for predicting the cleanliness of a refrigerator compartment, such as Figure 1 As shown, the method includes:
[0042] S1: Collect gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state respectively;
[0043] S2: Based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage, the low-frequency coefficient average of the two is calculated;
[0044] S3: Calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data during the loaded phase;
[0045] S4: The processed measurement data of multiple gas sensors within a period of time are input into a one-dimensional convolutional neural network, and the cleanliness of the refrigerator compartment at the current time end is predicted through multi-sensor sequence classification.
[0046] In a specific embodiment of the present invention, when the refrigerator is started, the gas sensor is calibrated and the low-frequency coefficient mean C of K wavelet decompositions of the no-load measurement data in the initial state is saved. oi ,i∈{1,2,…,K}; where K needs to obtain an empirical value based on the specific situation.
[0047] Specifically, in order to calibrate the gas sensor, a no-load measurement is required when the refrigerator is started. This means that there is no food or other objects inside the refrigerator to ensure that the measurement results are not interfered with by external factors. In this process, the gas sensor will measure the gas concentration in the environment and convert it into an electrical signal. Next, these measurement data are processed using wavelet decomposition technology. Wavelet decomposition is a signal processing technique that can decompose a signal into sub-signals in different frequency ranges. In this case, we will focus on sub-signals in the low-frequency range because they usually contain important information about the gas concentration. By calculating the low-frequency coefficients of K wavelet decompositions and calculating their mean C oi .
[0048] It should be noted that determining the value of K requires obtaining empirical values based on specific circumstances. This depends on the performance of the gas sensor, the measurement requirements, and the required accuracy. Generally speaking, a larger K value can provide more information, but it also increases the burden of calculation and storage.
[0049] In a specific embodiment of the present invention, the gravity sensor is used to determine whether the refrigerator compartment is in an empty state or a loaded state; the measurement data of the gas sensor is stored in real time, and when the refrigerator compartment is in an empty state, only the empty measurement data of the last hour of this stage is retained; the mean of the low-frequency coefficients of the K wavelet decompositions of the empty measurement data of the last hour is C li ,i∈{1,2,…,K}.
[0050] Specifically, the gas concentration changes in the refrigerator compartment are monitored by storing the measurement data of the gas sensor in real time. Since the gas concentration may fluctuate for a period of time after the refrigerator is started, these fluctuations should be relatively small and stable in the unloaded state. Therefore, when the gravity sensor detects that the compartment is in an unloaded state, only the unloaded measurement data of the last hour of this stage is retained. Next, the unloaded measurement data of the last hour is decomposed into K wavelets, and the mean value C of their low-frequency coefficients is calculated. li, where i∈{1,2,…,K}. The mean of the low-frequency coefficients reflects the trend and change of the gas concentration under no-load conditions. By calculating their mean, a more stable and reliable reference value can be obtained for analyzing the air quality of the refrigerator compartment.
[0051] In a specific embodiment of the present invention, the sensor drift compensation coefficient is expressed as:
[0052]
[0053] The K wavelet decomposition coefficients in the loaded phase are adjusted by using the drift compensation coefficients of the gas sensor in the unloaded phase. The J wavelet decomposition coefficients in the loaded phase after drift compensation It is expressed as:
[0054]
[0055] Among them, m ji are the J wavelet decomposition coefficients in the loaded stage.
[0056] In a specific embodiment of the present invention, the wavelet decomposition coefficients of the loaded stage after drift compensation are inversely transformed to obtain gas sensor measurement data after drift compensation in the loaded stage; and the gas sensor measurement data after drift compensation in the loaded stage is mean filtered to remove periodic noise.
[0057] Specifically, inverse transform is the process of recombining wavelet decomposition coefficients into the original signal. By inverse transforming the wavelet decomposition coefficients after drift compensation in the loaded stage, the time series data of gas concentration changes in the loaded stage are restored. After obtaining the gas sensor measurement data after drift compensation in the loaded stage, a mean filtering operation is further performed on it. Mean filtering is a commonly used signal processing technology used to smooth signals and remove periodic noise. By performing mean filtering on the gas sensor measurement data after drift compensation in the loaded stage, the mean of the data within a period of time is calculated, and the original data points are replaced with the mean to reduce the impact of periodic noise and improve the stability and reliability of the measurement data.
[0058] It should be noted that the window size of the mean filter can be selected according to specific requirements. A larger window size can provide a smoother signal, but may cause data delay.
[0059] In a specific embodiment of the present invention, the processed measurement data of multiple gas sensors over a period of time are input into a one-dimensional convolutional neural network.
[0060] Specifically, the processed measurement data is input into a one-dimensional convolutional neural network (CNN). A one-dimensional CNN is a neural network structure suitable for sequence data. In this network, gas features are extracted by using continuous convolutional layers. The convolutional layer performs filtering operations on the input data by sliding a small window (convolution kernel) to capture features of different scales. In order to enhance the stability and convergence speed of the network, a batch normalization layer is added after the convolutional layer. Normalizing the data of each batch through batch normalization helps to reduce internal covariate shift and improve the training effect of the network. After the convolutional layer and batch normalization layer, nonlinearity is introduced by using the ReLU (rectified linear unit) activation function. The ReLU function is used to set negative values to zero and retain positive values, thereby enhancing the expression ability of the network. After the convolutional layer and activation function, we summarize the extracted gas features by using a pooling layer. The pooling layer is used to reduce the dimension of the features and retain the most important information. Useful gas features are extracted from the measurement data of multiple gas sensors in the refrigerator compartment through a one-dimensional convolutional neural network structure for subsequent analysis, monitoring or control tasks.
[0061] In a specific embodiment of the present invention, the cleanliness of the refrigerator compartment at the current time end is predicted through multi-sensor sequence classification.
[0062] Specifically, the summarized gas features are input into the fully connected layer. The fully connected layer is a neural network layer in which each neuron is connected to all neurons in the previous layer. After the fully connected layer, the Softmax activation function is used for multi-classification prediction. The Softmax function is used to convert the output of the neural network into a probability distribution, which represents the probability of each category. In this way, a multi-classification probability value of the predicted cleanliness can be obtained, and each category corresponds to a cleanliness level. Based on these multi-classification probability values, the cleanliness of the refrigerator compartment corresponding to the current time series can be determined. In general, the category with the highest probability is selected as the prediction result, which represents the cleanliness level of the refrigerator compartment in the current time period.
[0063] In the second embodiment of the present invention, the present invention provides a refrigerator compartment cleanliness prediction device, such as Figure 2 As shown, it includes a data acquisition module, a calculation module, a drift compensation module and a prediction module.
[0064] The data acquisition module 1 is used to respectively acquire the gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state;
[0065] Calculation module 2, used for calculating the low-frequency coefficient mean of the two based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage;
[0066] The drift compensation module 3 is used to calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data in the loaded stage;
[0067] The prediction module 4 is used to input the processed measurement data of multiple gas sensors within a period of time into a one-dimensional convolutional neural network, and predict the cleanliness of the refrigerator compartment at the current time end through multi-sensor sequence classification.
[0068] In a third embodiment of the present invention, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the refrigerator compartment cleanliness prediction method as described above are implemented.
[0069] In a fourth embodiment of the present invention, the present invention provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps in the refrigerator compartment cleanliness prediction method as described above.
[0070] In summary, the present invention provides a refrigerator compartment cleanliness prediction method, device, electronic device and storage medium, which can improve the accuracy and real-time performance of cleanliness prediction by collecting and processing gas sensor measurement data. The prediction accuracy is further improved by using sensor drift compensation and one-dimensional convolutional neural network. At the same time, the present invention also reduces cost and time consumption and improves user experience.
[0071] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the modules described above can refer to the corresponding process in the aforementioned method implementation, and will not be repeated here.
[0073] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0074] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0075] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0076] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned implementation modes, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned implementation modes, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various implementation modes of the present application.
Claims
1. A method for predicting the cleanliness of a refrigerator compartment, characterized in that: include, Collect gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state respectively; Based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage, the low-frequency coefficient average of the two is calculated; Calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data during the loaded phase; The processed measurement data of multiple gas sensors within a period of time are input into a one-dimensional convolutional neural network, and the cleanliness of the refrigerator compartment at the current time end is predicted through multi-sensor sequence classification.
2. The refrigerator compartment cleanliness prediction method according to claim 1, characterized in that: Also includes, When the refrigerator is started, the gas sensor is calibrated and the mean value C of the low-frequency coefficients of the K wavelet decompositions of the no-load measurement data in the initial state is saved. oi ,i∈{1,2,…,K}; Among them, K needs to obtain experience value according to specific circumstances.
3. The refrigerator compartment cleanliness prediction method according to claim 2, characterized in that: Based on the gravity sensor, it is determined whether the refrigerator compartment is empty or loaded; The measurement data of the gas sensor is stored in real time. When the refrigerator compartment is in an empty state, only the empty measurement data of the last hour of this stage is retained; The mean of the low-frequency coefficients of the K wavelet decompositions of the no-load measurement data for the last hour is C li ,i∈{1,2,…,K}.
4. The refrigerator compartment cleanliness prediction method according to claim 3, characterized in that: The sensor drift compensation coefficient is expressed as: Then the K wavelet decomposition coefficients in the loaded stage after drift compensation are It is expressed as: Among them, m ji are the K wavelet decomposition coefficients in the loaded stage.
5. The refrigerator compartment cleanliness prediction method according to claim 4, characterized in that: Also includes, Perform inverse transformation on the wavelet decomposition coefficients in the loaded phase after drift compensation to obtain the gas sensor measurement data after drift compensation in the loaded phase; A mean filtering operation is performed on the gas sensor measurement data after drift compensation in the loaded stage to remove periodic noise.
6. The refrigerator compartment cleanliness prediction method according to claim 1, characterized in that: The “inputting the processed measurement data of multiple gas sensors within a period of time into a one-dimensional convolutional neural network” includes: The measurement data of multiple gas sensors in the refrigerator compartment are collected over a period of time and input into a one-dimensional CNN neural network after drift compensation and mean filtering. In the one-dimensional CNN neural network, gas features are extracted by using consecutive convolutional layers, batch normalization, and ReLU activation functions, and the gas features are summarized using a pooling layer after the convolutional layer.
7. The refrigerator compartment cleanliness prediction method according to claim 6, characterized in that: The "predicting the cleanliness of the refrigerator compartment at the current time end through multi-sensor sequence classification" includes: The summarized gas features are used for multi-classification prediction through the fully connected layer and the Softmax activation function, and the multi-classification probability value of the predicted cleanliness is output; Based on the multi-classification probability value of the predicted cleanliness, the cleanliness of the refrigerator compartment corresponding to the current time series is determined.
8. A refrigerator compartment cleanliness prediction device, comprising a data acquisition module, a calculation module, a drift compensation module and a prediction module, characterized in that: The data acquisition module is used to respectively acquire gas sensor measurement data when the refrigerator is in an unloaded state and a loaded state; The calculation module is used to calculate the low-frequency coefficient mean of the two based on the gas sensor measurement data of the initial state when the refrigerator is started and the gas sensor measurement data of the most recent no-load stage; The drift compensation module is used to calculate the sensor drift compensation coefficient and perform drift compensation on the low-frequency coefficient of the gas sensor measurement data in the loaded stage; The prediction module is used to input the processed measurement data of multiple gas sensors within a period of time into a one-dimensional convolutional neural network, and predict the cleanliness of the refrigerator compartment at the current time end through multi-sensor sequence classification.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the refrigerator compartment cleanliness prediction method as described in any one of claims 1 to 7 are implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the steps in the refrigerator compartment cleanliness prediction method described in any one of claims 1 to 7 are implemented.