Freshness detection method and device and storage equipment

By acquiring sample data from non-standard sensor arrays, using a target algorithm to select sample data and optimize the calibration model, the problem of differences in sensor array response characteristics was solved, improving the calibration effect and the accuracy of freshness detection.

CN121637221APending Publication Date: 2026-03-10QINDAO HAIER REFRIGERATOR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, electronic nose sensor arrays vary in response characteristics and fail to fully consider the mutual influence between sensors, affecting the calibration results and recognition performance.

Method used

By acquiring sample data from multiple non-standard sensor arrays, a target algorithm is used to select target sample data, optimize the calibration model, consider the mutual influence between sensors, select the sample size through predefined criteria, and use the KS algorithm and weights to optimize the calibration model.

Benefits of technology

It improves the calibration effect of the sensor array, increases the accuracy of samples and the precision of the calibration model, reduces labor and time costs, and improves the accuracy of freshness detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637221A_ABST
    Figure CN121637221A_ABST
Patent Text Reader

Abstract

The invention discloses a freshness detection method and device and storage equipment, and belongs to the field of storage equipment. The freshness detection method comprises the following steps: acquiring a plurality of sample data collected by a plurality of non-standard sensor arrays; processing the multiple pieces of sample data by adopting a target algorithm, and determining target sample data from the multiple pieces of sample data; optimizing the correction model based on the target sample data; the correction model is used for mapping the target data collected by the non-standard sensor array into a response value corresponding to the standard sensor array. According to the freshness detection method disclosed by the invention, the sensor array is uniformly corrected, so that the mutual influence among the sensors can be fully considered, and the correction effect of the sensor array is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of storage equipment, and particularly relates to a freshness detection method and device and storage equipment. BACKGROUND

[0002] In the field of storage equipment, etc., multiple electronic nose sensor arrays are often used for odor recognition. Differences exist among different arrays in response characteristics, and consistency transformation is needed to reduce such differences. In the related art, each sensor is mainly corrected individually. This method does not consider the mutual influence among sensors, affecting the correction result and thus affecting the subsequent recognition effect. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the related art. To this end, the present application provides a freshness detection method, device and storage equipment, which can fully consider the mutual influence among sensors and significantly improve the correction effect of the sensor array.

[0004] In a first aspect, the present application provides a freshness detection method applied to a sensor array, wherein the sensor array includes multiple odor sensors; the method includes:

[0005] Obtaining multiple sample data collected by multiple non-standard sensor arrays;

[0006] Processing the multiple sample data by using a target algorithm to determine target sample data from the multiple sample data;

[0007] Optimizing a correction model based on the target sample data; the correction model is used to map target data collected by the non-standard sensor array to a corresponding response value of a standard sensor array.

[0008] According to the freshness detection method of the present application, the selection of sample quantity is automatically performed by setting a predefined standard, which can improve the accuracy of samples participating in the training of the correction model to improve the precision and accuracy of the correction model obtained by training, and effectively reduce the cost of manpower and time, etc. By uniformly correcting the sensor array, the mutual influence among the sensors can be fully considered, and the correction effect of the sensor array can be significantly improved.

[0009] According to one embodiment of the present application, the optimization of the correction model based on the target sample data includes:

[0010] Inputting the target sample data into the correction model to obtain a predicted value output by the correction model;

[0011] Determining a weight based on the predicted value and a true value corresponding to the predicted value;

[0012] based on the weight, optimizing the correction model.

[0013] According to an embodiment of the present application, the determining weight based on the predicted value and the true value corresponding to the predicted value comprises:

[0014] calculating the residual between each predicted value and the true value corresponding to the predicted value;

[0015] based on the residual, calculating the difference value between the predicted value and the true value corresponding to the predicted value;

[0016] based on the difference value, obtaining the weight corresponding to each predicted value.

[0017] According to an embodiment of the present application, the obtaining the weight corresponding to each predicted value based on the difference value comprises:

[0018] in the case that the absolute value of the difference value is not less than a second threshold value, determining the weight as a first numerical value;

[0019] in the case that the absolute value of the difference value is less than a second threshold value, determining the weight based on the difference value.

[0020] According to an embodiment of the present application, the optimizing the correction model based on the weight comprises:

[0021] calculating the loss function of the correction model based on the weight;

[0022] in the case that the loss function fitting converges, ending the optimization;

[0023] in the case that the loss function does not converge, re-fitting the correction model, and returning to the step of inputting the target sample data into the correction model to obtain the predicted value output by the correction model.

[0024] According to an embodiment of the present application, the processing the plurality of sample data by using a target algorithm to determine target sample data from the plurality of sample data comprises:

[0025] respectively determining the Euclidean distance between any two sample data in the plurality of sample data;

[0026] adding the two sample data corresponding to the maximum Euclidean distance to a training sample set, and deleting the sample data added to the training sample set from the plurality of sample data;

[0027] in the case that the number of sample data in the training sample set does not exceed a first threshold value, calculating the Euclidean distance between the target sample data in the training sample set and each sample data in the updated plurality of sample data.

[0028] adding sample data corresponding to the maximum Euclidean distance and the minimum Euclidean distance to the training sample set, and deleting sample data added to the training sample set from the plurality of sample data;

[0029] in a case where the number of sample data in the training sample set exceeds a first threshold, determining the training sample set as the target sample data.

[0030] According to an embodiment of the present application, after the correction model is optimized based on the target sample data, the method further comprises:

[0031] obtaining second data in the to-be-tested storage device collected by a non-standard sensor array;

[0032] inputting the second data into the correction model to obtain third data output by the correction model;

[0033] based on the third data, predicting freshness information in the to-be-tested storage device.

[0034] According to an embodiment of the present application, the freshness information in the to-be-tested storage device is predicted based on the third data, comprising:

[0035] inputting the third data into a freshness classification model to obtain the freshness information output by the freshness classification model; wherein,

[0036] the freshness classification model is trained based on sample data collected by the standard sensor array.

[0037] According to an embodiment of the present application, the freshness information in the to-be-tested storage device is predicted based on the third data, comprising:

[0038] in a case where it is determined based on the third data and a target threshold that an odor corresponding to the third data is a target odor, determining the freshness information based on the third data: wherein the target threshold is determined based on first data corresponding to the target odor or first data corresponding to an interference odor collected by each sensor in the sensor array.

[0039] According to an embodiment of the present application, the freshness information in the to-be-tested storage device is predicted based on the third data, comprising:

[0040] performing temperature and humidity compensation on the third data to update the third data;

[0041] based on the updated third data, predicting the freshness information in the to-be-tested storage device.

[0042] According to one embodiment of this application, the step of performing temperature and humidity compensation on the third data and updating the third data includes:

[0043] Principal component analysis and independent component analysis are performed on the third data corresponding to the current acquisition time and the third data corresponding to multiple historical acquisition times to obtain the independent component matrix;

[0044] Each independent component in the independent component matrix is ​​filtered, and the filtered independent component matrix is ​​reconstructed to update the third data corresponding to the current acquisition time.

[0045] Secondly, this application provides a freshness detection device applied to a sensor array, the sensor array including multiple odor sensors; the device includes:

[0046] The first processing module is used to acquire multiple sample data collected by multiple non-standard sensor arrays;

[0047] The second processing module is used to process the plurality of sample data using a target algorithm to determine the target sample data from the plurality of sample data;

[0048] The third processing module is used to optimize the calibration model based on the target sample data; the calibration model is used to map the target data collected by the non-standard sensor array to the response value corresponding to the standard sensor array, and the response value is used for freshness detection.

[0049] According to the freshness detection device of this application, by automatically selecting the sample size by setting predefined standards, the accuracy of the samples participating in training the calibration model can be improved, thereby improving the accuracy and precision of the calibration model obtained by training, and effectively reducing manpower and time costs; by uniformly calibrating the sensor array, the mutual influence between the sensors can be fully considered, significantly improving the calibration effect of the sensor array.

[0050] Thirdly, this application provides a storage device, comprising:

[0051] Box;

[0052] A sensor array, which is disposed within the housing, includes multiple odor sensors;

[0053] The freshness detection device as described in the second aspect is electrically connected to the sensor array.

[0054] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the freshness detection method as described in the first aspect above.

[0055] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the freshness detection method as described in the first aspect above.

[0056] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:

[0057] By automatically selecting the sample size using predefined criteria, the accuracy of the samples used to train the calibration model can be improved, thereby increasing the precision and accuracy of the trained calibration model and effectively reducing costs such as manpower and time. By uniformly calibrating the sensor array, the mutual influence between the sensors can be fully considered, significantly improving the calibration effect of the sensor array.

[0058] Furthermore, by automatically selecting the sample size through the KS algorithm, the maximum variability of the original dataset can be fully reflected, thereby significantly improving the subsequent training effect, increasing the accuracy and precision of the final corrected model, and effectively reducing manpower and time costs.

[0059] Furthermore, the weights used for model training are determined by the difference between the predicted and true values, allowing the weights to be adjusted based on different sample data to achieve the best training effect, thereby improving the accuracy and precision of the calibration model.

[0060] Furthermore, by correcting the data collected by non-standard sensor arrays to reduce the differences in response characteristics between different arrays, and by making freshness predictions based on the data after consistency correction, the accuracy of the prediction results can be further improved, thereby enhancing the user experience.

[0061] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0062] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0063] Figure 1 This is one of the flowcharts illustrating the freshness detection method provided in the embodiments of this application;

[0064] Figure 2 This is a second schematic flowchart of the freshness detection method provided in the embodiments of this application;

[0065] Figure 3 This is a schematic diagram of the results of the freshness detection method provided in the embodiments of this application;

[0066] Figure 4 This is a schematic diagram of the freshness detection device provided in the embodiments of this application;

[0067] Figure 5 This is a schematic diagram of the structure of the storage device provided in the embodiments of this application;

[0068] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0069] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0070] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0071] The freshness detection method, freshness detection device, storage equipment, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0072] The freshness detection method can be applied to the terminal, and can be executed by the hardware or software in the terminal.

[0073] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets. It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer.

[0074] The freshness detection method provided in this application can be executed by a storage device or a functional module or entity within the storage device that can implement the freshness detection method, such as a microcontroller within the storage device. In some embodiments, the execution entity of the freshness detection method can also be a server that is communicatively connected to the storage device. In some embodiments, the freshness detection method can also be jointly executed by a microcontroller and a server.

[0075] like Figure 1 As shown, the freshness detection method includes steps 110, 120 and 130.

[0076] It should be noted that this freshness detection method is applied to a sensor array, which includes multiple odor sensors.

[0077] In some embodiments, the number of odor sensors may be 3, 5, 20 or other numbers, and this application does not limit the number.

[0078] In some embodiments, the sensor array may further include at least one of a temperature sensor and a humidity sensor.

[0079] Multiple odor sensors are mounted on the same circuit board.

[0080] Step 110: Acquire multiple sample data collected by multiple non-standard sensor arrays;

[0081] In this step, a single data collection from a non-standard sensor array constitutes one sample data point.

[0082] Sample data may include sensor data collected at the same time by multiple odor sensors set in a non-standard sensor array.

[0083] In actual implementation, for each non-standard sensor array, it can be controlled to collect sensing data at certain time intervals (such as 5s or 10s).

[0084] Taking a non-standard sensor array consisting of 5 odor sensors, 1 temperature sensor, and 1 humidity sensor as an example, a single data acquisition of a non-standard sensor array can yield sensor data with 7 features.

[0085] The obtained sensor data can be sorted sequentially based on odor concentration, and a certain number of sensor data can be selected as sample data.

[0086] Multiple sample data can be used as the original dataset.

[0087] Step 120: Use the target algorithm to process multiple sample data and determine the target sample data from the multiple sample data;

[0088] In this step, the target algorithm is a pre-defined algorithm used for selecting the sample size.

[0089] In some embodiments, the target algorithm may include the KS algorithm or any other implementable algorithm.

[0090] Among them, the KS (Kennard-Stone) algorithm is a method for partitioning datasets; its core idea is to treat all samples as candidate samples for the training sample set, and then select samples from them in turn to add to the training sample set.

[0091] The target sample data is the training sample set used for subsequent calibration model training and optimization.

[0092] The target sample data includes the sample data for the target number of samples.

[0093] The target sample size refers to the number of samples used in subsequent training and optimization of the calibration model.

[0094] Understandably, in actual implementation, sensor array calibration models often use linear regression models. Due to the characteristics of linear regression models, the number of samples involved in the linear regression model is relatively small. Calibration is performed using only a few samples. Since there will be a certain proportion of outliers in the measured values, these outliers may be mixed into the training samples. As a result, the actual samples involved in the training will greatly affect the accuracy and precision of the calibration model obtained in the final training.

[0095] In this application, the sample size is automatically selected by setting predefined criteria. Compared with random selection or selection based on manual selection, this can improve the accuracy of the samples used to train the calibration model, thereby improving the precision and accuracy of the trained calibration model, and saving manpower and time costs.

[0096] Step 130: Optimize the calibration model based on the target sample data.

[0097] In this step, the calibration model is used to map the target data acquired by the non-standard sensor array to the response values ​​corresponding to the standard sensor array.

[0098] The input to the calibration model is the target data collected by a non-standard sensor array, and the output is the response value corresponding to a standard sensor array.

[0099] The target data includes actual data collected by multiple odor sensors set up in a non-standard sensor array.

[0100] During the training phase, the calibration model is trained using the training sample set determined in step 120 to obtain the final calibration model. In subsequent applications, the actual data collected by any non-standard sensor array is input into the calibration model to obtain the response value that maps the actual data to a standard sensor array.

[0101] During the research and development process, the inventors also discovered that in related technologies, when calibrating sensors, the main method used is to calibrate each sensor individually. This method does not take into account the mutual influence between the sensors, which affects the calibration results.

[0102] In this application, by uniformly calibrating the sensor array, the influence between multiple odor sensors under a unified circuit and the interrelationships between the sensors, such as the angles in the coordinate system, can be fully considered. This allows more information to be incorporated during the calibration process, preserving the signals between the arrays while ensuring the speed of the calibration model, thereby significantly improving the calibration effect of the sensor array.

[0103] According to the freshness detection method provided in the embodiments of this application, by setting predefined standards to automatically select the sample size, the accuracy of the samples participating in training the calibration model can be improved, thereby improving the accuracy and precision of the trained calibration model, and effectively reducing manpower and time costs; by uniformly calibrating the sensor array, the mutual influence between the sensors can be fully considered, significantly improving the calibration effect of the sensor array.

[0104] Of course, in other embodiments, the above correction method can also be used for the correction of a single type of sensor. Simply change the multivariate regression model to a univariate linear regression model to correct the same sensor between different arrays.

[0105] The implementation of step 120 will be explained below using the KS algorithm as an example.

[0106] In some embodiments, step 120 may include:

[0107] Determine the Euclidean distance between any two samples in a set of multiple sample data;

[0108] Add the two samples corresponding to the largest Euclidean distance to the training sample set, and remove the samples added to the training sample set from multiple sample sets;

[0109] If the number of sample data in the training sample set does not exceed the first threshold, calculate the Euclidean distance between the target sample data in the training sample set and each sample data in the updated sample data.

[0110] Add the sample data corresponding to the maximum Euclidean distance and the minimum Euclidean distance to the training sample set, and delete the sample data added to the training sample set from multiple sample data;

[0111] When the number of sample data in the training sample set exceeds the first threshold, determine the training sample set as the target sample data.

[0112] In this embodiment, the first threshold is the sample size of the training sample set that will subsequently participate in the calibration model training and optimization.

[0113] The first threshold is used to make the calibration model reach the most stable state.

[0114] In the actual execution process, the first threshold can be set to N, and through multiple experimental verifications, the value of n can be determined.

[0115] For example, in the case where L sample data have been collected and a subset with N (N < L) sample data needs to be selected from these L samples as the training sample set for the calibration model, N > 0, L > 1 and both N and L are positive integers:

[0116] The KS algorithm takes all L sample data as candidate samples for the training sample set and sequentially selects samples into the training sample set.

[0117] First, select the two sample data with the farthest Euclidean distance into the training sample set. Then, by calculating the Euclidean distance from each remaining sample data to each selected sample data in the training sample set, find the two sample data with the farthest and the nearest distances to the selected sample data, and select these two sample data into the training sample set. Repeat the above steps until the number of samples reaches N.

[0118] In some embodiments, the Euclidean distance can be calculated based on the following formula:

[0119]

[0120] where d(p,q) is the Euclidean distance between the p-th sample data and the q-th sample data, p,q ∈ [1,L]; x p and x q represent the p-th sample data and the q-th sample data in the original data set; L is the total number of multiple sample data, that is, the total sample size of the original data set, and k represents the number of sensors included in the sensor array.

[0121] In some embodiments, when N = 10, the calibration model can be made the most stable.

[0122] Such as Figure 3As shown, the vertical axis represents the sum of squared residuals, and the horizontal axis represents the number of N samples. It can be observed that, for this method, the residuals of the correction model can be approximately considered to have reached a stable value after the number of sample data reaches 10. Figure 3 The curve in the lower middle section is shown; however, for traditional methods, when the number of sample data is less than 45, the residual fluctuation is relatively large, such as... Figure 3 As shown in the upper middle curve.

[0123] During the research and development process, the inventors discovered that in related technologies, the method of manually selecting the number of samples to participate in training is often used, such as selecting 5 sample data as training samples. However, this selection method relies heavily on user experience and is greatly influenced by user subjectivity, making it difficult to select the optimal number of samples, which affects the accuracy and precision of the correction model obtained from subsequent training. In addition, the operation is relatively complicated and consumes a lot of manpower and time.

[0124] In this application, the KS algorithm is used to automatically select samples, which can fully reflect the maximum variability of the original dataset, ensuring the comprehensiveness and accuracy of the data. From the perspective of data distribution, the data distribution of the selected training sample set is as similar as that of the original dataset. No manual intervention is required, and the training of correction samples can be completed automatically, thereby significantly improving the subsequent training effect and improving the accuracy and precision of the final correction model.

[0125] According to the freshness detection method provided in the embodiments of this application, the KS algorithm is used to automatically select the sample size, which can fully reflect the maximum variability of the original dataset, thereby significantly improving the subsequent training effect, improving the accuracy and precision of the final corrected model, and effectively reducing manpower and time costs.

[0126] In some embodiments, step 130 may include:

[0127] Input the sample data into the calibration model and obtain the predicted value output by the calibration model;

[0128] The weights are determined based on the predicted values ​​and their corresponding actual values.

[0129] The calibration model is optimized based on the weights.

[0130] In this embodiment, the weights are the weights corresponding to each predicted value involved in calculating the loss function during the optimization of the calibration model.

[0131] The predicted value corresponds to the actual value, which can be the sample data collected by a standard sensor array under the same environment.

[0132] In some embodiments, the correction model can be represented as:

[0133]

[0134] in, x is the predicted value corresponding to the nth sample data of the kth sensor; i,n This represents the nth sample data corresponding to the kth sensor; a i and b k The parameters to be trained are: n represents the nth sample data in the training sample set, K represents the number of sensors included in the sensor array, and k represents the kth sensor.

[0135] For each sample data point in the dataset x acquired by a non-standard sensor array, it can be transformed into the calibrated result of a standard sensor array using the above formula, thus obtaining the calibrated dataset.

[0136] The weights are set based on the difference between the predicted and the actual values. For example, in some embodiments, the weights can be determined based on the residual between the predicted and the actual values. It is understood that the weights calculated may be different for different predicted and actual values, that is, the weights change accordingly based on the changes in the residual.

[0137] After obtaining the weights, a can be trained based on those weights. i and b k This allows for the optimization of the calibration model.

[0138] In some embodiments, determining the weights based on the predicted values ​​and their corresponding actual values ​​may include:

[0139] The residuals between each predicted value and the corresponding actual value are calculated.

[0140] Based on the residual, calculate the difference between the predicted value and the actual value corresponding to the predicted value;

[0141] Based on the difference value, the weights corresponding to each predicted value are obtained.

[0142] In this embodiment, the calibration model can be fitted using ordinary least squares (OLS), and the residuals of all predicted values ​​can be calculated.

[0143] The hat matrix H for this regression is calculated, where H = x(x T x) -1 x T H is an N×N square matrix, where N is the number of samples in the training sample set; the nth diagonal element of H is denoted as h. k,n .

[0144] In some embodiments, calculating the difference between the predicted value and the actual value corresponding to the predicted value based on the residual may include:

[0145] Based on the residuals and the robust variance of the training sample set, the difference between the predicted value and the actual value corresponding to the predicted value is calculated.

[0146] In this embodiment, robust variance, or mean absolute deviation (MAD), is the variance of the univariate sequence X. i The median of the absolute values ​​of the deviations from the median.

[0147] MAD = median(|Xi - median(X)|)

[0148] In statistics, the MAD (Median Absolute Deviation) method is used for outlier detection. The basic idea is that if the difference between a data point's value and the median is greater than a certain constant multiple of the MAD, then the data point can be considered an outlier.

[0149] Assuming the data follows a normal distribution, let outliers fall within the two outer 50% areas, and let normal values ​​fall within the middle 50% area:

[0150]

[0151] in:

[0152]

[0153] Furthermore, given Φ(-a) = 1 - Φ(a),

[0154] achievable According to the table,

[0155]

[0156] Assuming the MAD of the sample is known, the robust variance of the sample can be obtained from... Derivation:

[0157]

[0158] In some embodiments, the difference value can be calculated using the following formula:

[0159]

[0160] Among them, u k,n r is the difference value corresponding to the nth sample data of the kth sensor; k,n h is the residual between the predicted value and the true value corresponding to the nth sample data. k,nLet h be the nth diagonal element in H. k,n c is a hyperparameter; s is the robust variance of the training sample set.

[0161] Once the difference value is obtained, the weight corresponding to that difference value can be determined based on the difference value.

[0162] It is understandable that different sample data will have different difference values, and the final calculated weights may also differ.

[0163] In actual implementation, the relationship between the difference value and the weight can be set in advance so that the weight can be calculated based on the difference value in subsequent calculations.

[0164] In some embodiments, obtaining the weights corresponding to each predicted value based on the difference value may include:

[0165] If the absolute value of the difference is not less than the second threshold, the weight is determined to be the first value;

[0166] If the absolute value of the difference is less than the second threshold, the weight is determined based on the difference value.

[0167] In this embodiment, the second threshold can be user-defined.

[0168] The first value is a constant, which can be customized by the user.

[0169] If the difference value is not less than the second threshold, the weight can be set to a fixed constant.

[0170] If the difference value is less than the second threshold, the weight can be set as a variable that changes accordingly based on the change in the difference value.

[0171] For example, in some embodiments, the following relationship can be established between the difference value and the weight:

[0172]

[0173] Among them, w k,n The weight corresponding to the nth sample data of the kth sensor; u k,n The difference value is the value corresponding to the nth sample data of the kth sensor; the second threshold is set to 1; the first value is set to 0.

[0174] Based on the above method, the weight corresponding to each sample data of each sensor can be obtained, and the correction model can be optimized with the goal of minimizing loss.

[0175] In some embodiments, optimizing the correction model based on weights may include:

[0176] The loss function of the correction model is calculated based on weights;

[0177] The optimization ends when the loss function fit converges.

[0178] If the loss function fails to converge, refit the calibration model and return to the step of inputting the target sample data into the calibration model to obtain the predicted value output by the calibration model.

[0179] In this embodiment, the weight is substituted into the loss function to optimize the calibration model.

[0180] In some embodiments, the loss function can be:

[0181]

[0182] Among them, w k,n The weight corresponding to the nth sample data of the kth sensor; y k,n This represents the nth true value from the kth sensor. Let N be the nth predicted value of the kth sensor, where K is the number of sensors in the sensor array, and N is the number of samples in the training sample set.

[0183] If the loss function fits and converges, it can be approximated that the loss has reached a small value, at which point the algorithm can be terminated and optimization stopped.

[0184] If the loss function fails to fit convergence, the calibration model needs to be further optimized. This involves refitting the calibration model, updating the residuals and weights, and repeating the optimization steps until the loss function fits convergence.

[0185] During the research and development process, the inventors also discovered that in related technologies, the default weights are the same when performing calibration model optimization training, which affects the accuracy and precision of model training.

[0186] In this application, the loss function of the regression model is optimized, and the weight of the regression sample in the next iteration is dynamically determined based on the residual of each sample data during the model iteration optimization process. This makes the calibration model robust and unaffected by outliers, thereby improving the accuracy and precision of model training.

[0187] Figure 3 The diagram illustrates the calibration results of the traditional linear regression method and the method proposed in this application. The upper curve represents the sum of squared residuals corrected by the traditional linear regression method, while the lower curve represents the sum of squared residuals corrected by the method proposed in this application. It can be seen that the calibration error of this application is significantly smaller than that of the traditional method, and it has a better calibration effect.

[0188] According to the freshness detection method provided in the embodiments of this application, the weights used for model training are determined by the difference between the predicted value and the true value, so that the weights can be adjusted according to different sample data to achieve the best training effect, thereby improving the accuracy and precision of the calibration model.

[0189] like Figure 2 As shown, in some embodiments, after step 130, the method may further include:

[0190] Acquire second data from the storage device under test, collected by a non-standard sensor array;

[0191] The second data is input into the calibration model to obtain the third data output by the calibration model;

[0192] Based on third-party data, the freshness information of the storage device to be tested is predicted.

[0193] In this embodiment, the storage device under test can be understood as a refrigeration storage device in a broad sense, including but not limited to refrigerators, freezers, display cases, beverage cabinets, wine cabinets, refrigerated display cases, and refrigerated vending machines. The storage devices have diverse structural forms and a wide range of applications.

[0194] The calibration model is the model after calibration completed in steps 110 to 130 above.

[0195] The third data is the response value of a standard sensor array converted from the second data.

[0196] Freshness information is the freshness of the object corresponding to the odor information, which is predicted based on the odor information collected by the sensor array.

[0197] Freshness information can include whether something is fresh or spoiled.

[0198] In some embodiments, the freshness information can be set to multiple levels based on actual needs, such as 3 to 5 freshness levels, etc., which is not limited in this application.

[0199] In actual implementation, any feasible method can be used to predict freshness information, such as using a pre-trained model to predict freshness, etc. This application does not limit this.

[0200] Continue to refer to Figure 2 In some embodiments, predicting the freshness information within the storage device to be tested based on third data may include:

[0201] The third set of data is input into the freshness classification model to obtain the freshness information output by the model; among which,

[0202] The freshness classification model was trained using sample data collected from a standard sensor array.

[0203] In this embodiment, the freshness classification model may include models such as SVM and KNN.

[0204] The freshness classification model is trained using sample data collected by a standard sensor array. Any feasible training method can be used, which will not be elaborated here.

[0205] According to the freshness detection method provided in the embodiments of this application, by correcting the data collected by non-standard sensor arrays to reduce the differences in response characteristics between different arrays, and by making freshness predictions based on the data after consistency correction, the accuracy of the prediction results can be further improved, thereby improving the user experience.

[0206] In some embodiments, predicting the freshness information within the storage device to be tested based on third data may further include:

[0207] If the odor corresponding to the third data is determined to be the target odor based on the third data and the target threshold, then the freshness information is determined based on the third data.

[0208] In this embodiment, the target threshold is determined by the first data corresponding to the target odor or the first data corresponding to the interfering odor collected by each sensor in the sensor array.

[0209] The target threshold is a threshold used to distinguish whether the odor corresponding to the sample data is the target odor.

[0210] The target odor is the odor to be identified.

[0211] Interfering odors are odors from other categories besides the odor to be identified.

[0212] Taking the target odor as the odor of meat as an example, the interfering odors can be the odors of fruits, vegetables, and other items.

[0213] For example, if the odor is greater than the target threshold, it can be approximated as a distracting odor; if it is not greater than the target threshold, it can be considered as the target odor, thus eliminating the interference of distracting odors on freshness recognition.

[0214] In some embodiments, the target threshold is determined by the first data corresponding to the target odor or the first data corresponding to the interfering odor collected by each sensor in the sensor array, and may include:

[0215] Acquire multiple sample data, including the first data corresponding to the target odor or the first data corresponding to the interfering odor collected by each sensor in the sensor array;

[0216] Based on the first data collected by other sensors within the target sample data from multiple sample data, the second data corresponding to the target odor sensor among multiple odor sensors is predicted; the other sensors are the sensors in the sensor array other than the target odor sensor;

[0217] Based on the first and second data corresponding to each sample data, the first predicted difference between the target odor and the interfering odor is obtained;

[0218] Based on the first predicted difference, a target threshold is determined; the target threshold is used for freshness detection.

[0219] In this embodiment, a single sample data point collected by the sensor array is considered as a single sample data point. A single sample data point includes the first data points collected by all the sensors in the sensor array at the same acquisition time.

[0220] The first data is the actual data collected by the sensor.

[0221] The target sample data can be any one of the multiple sample data. It can be the actual value collected by the sensor array under the target odor environment or the actual value collected by the sensor array under the interference odor environment.

[0222] The target odor sensor can be any one of multiple odor sensors.

[0223] The second data is the predicted value corresponding to the target odor sensor, which is obtained by predicting the real values ​​collected by other sensors in the sensor array at the same acquisition time.

[0224] The second data is used to represent the response pattern of the target odor on the sensor array.

[0225] In some embodiments, predicting second data corresponding to the target odor sensor among multiple odor sensors based on first data collected by other sensors within the target sample data in a plurality of sample data may include:

[0226] The first data collected by other sensors is input into the regression model corresponding to the target odor sensor, and the second data corresponding to the target odor sensor is obtained from the output of the regression model; wherein, the regression model corresponding to the target odor sensor is trained based on the regression sample set corresponding to the target odor sensor, and the regression sample set is determined based on the first data corresponding to the target odor.

[0227] In this embodiment, the regression sample set is the training sample used to train the regression model.

[0228] The regression sample set includes sample data collected by the sensor array under the target odor environment, that is, it includes: the first data corresponding to the target odor collected by each sensor in the sensor array.

[0229] The first prediction difference is used to characterize the degree of difference between the target odor and the interfering odor.

[0230] It is understandable that, if the first data is the data corresponding to the target odor, the second data predicted based on the first data is similar to its actual response pattern on the sensor array.

[0231] If the first data is not the data corresponding to the target odor, the second data predicted based on the first data will differ significantly from its actual response pattern on the sensor array.

[0232] The higher the first prediction difference, the greater the difference between its true response pattern and the corresponding pattern of the target odor, that is, the more obvious the difference between the target odor and the interfering odor.

[0233] In some embodiments, the target threshold can be obtained by minimizing the sum of the error rates of each prediction result.

[0234] According to the freshness detection method provided in the embodiments of this application, by performing inter-plate correction, further determining whether the collected odor is the target odor through a target threshold to eliminate interference from other odors, the accuracy of freshness identification can be further improved, thereby enhancing the user experience.

[0235] In some embodiments, predicting the freshness information within the storage device to be tested based on third data may include:

[0236] Perform temperature and humidity compensation on the third data and update the third data;

[0237] Based on the updated third-party data, the freshness information of the storage device to be tested is predicted.

[0238] In this embodiment, temperature and humidity compensation is a method for compensating for measurement errors caused by changes in temperature and humidity during the temperature and humidity measurement process.

[0239] In actual implementation, the third data can be compensated and updated using conventional temperature and humidity compensation methods.

[0240] Then, freshness is predicted based on the third data after temperature and humidity compensation.

[0241] For example, the third data after temperature and humidity compensation can be input into the freshness classification model to predict freshness.

[0242] According to the freshness detection method provided in the embodiments of this application, by performing inter-plate correction on the sensor data and further performing temperature and humidity compensation, the data acquisition error can be effectively reduced and the accuracy of freshness identification can be improved.

[0243] In some embodiments, performing temperature and humidity compensation on the third data and updating the third data may include:

[0244] Principal component analysis and independent component analysis are performed on the third data corresponding to the current acquisition time and the third data corresponding to multiple historical acquisition times to obtain the independent component matrix;

[0245] Each independent component in the independent component matrix is ​​filtered, and the filtered independent component matrix is ​​reconstructed to update the third data corresponding to the current acquisition time.

[0246] In this embodiment, the third data corresponding to the current acquisition time is the data after inter-board correction of the real-time sensor data acquired at the current acquisition time.

[0247] The third data corresponding to the historical acquisition time is the data obtained after correcting the real-time sensor data acquired at the historical acquisition time through a similar inter-board correction method.

[0248] Principal component analysis is used for dimensionality reduction of data.

[0249] Principal component analysis transforms the third data into a new set of variables (i.e., principal components) through linear transformation. These new variables are linear combinations of the variables corresponding to the third data and are uncorrelated with each other.

[0250] The main goal of principal component analysis is to find the main features in the third data and represent these features in a new way.

[0251] Independent component analysis is an algorithm used for signal processing and data analysis.

[0252] The main goal of independent component analysis is to find a linear transformation, or unmixing matrix, that makes the transformed signal components as statistically independent as possible.

[0253] The independent components are the individual components in the independent component matrix obtained by performing principal component analysis and independent component analysis on the third data.

[0254] It is understandable that the degree to which each independent component is affected by different factors may vary. For example, different independent components may be affected to different degrees by factors such as changes in temperature and humidity and changes in airflow.

[0255] In some embodiments, principal component analysis and independent component analysis are performed on the third data corresponding to the current acquisition time and the third data corresponding to multiple historical acquisition times to obtain an independent component matrix. This may further include:

[0256] Construct a third data matrix based on the third data corresponding to the current acquisition time and the third data corresponding to the historical acquisition times.

[0257] Principal component analysis was performed on the third data matrix to obtain the principal component matrix;

[0258] Based on the principal component matrix, independent component analysis is performed on the third data to obtain the independent component matrix.

[0259] In this embodiment, in some embodiments, the acquired third data at each acquisition time can be stored in the form of a matrix to obtain a third data matrix, such as representing the third data as an n×m matrix, where n and m are both positive integers.

[0260] The principal component matrix can be obtained from the standardized third data matrix and the principal component transformation matrix.

[0261] The specific method for obtaining the principal component matrix is ​​explained below.

[0262] In some embodiments, performing principal component analysis on the third data matrix to obtain the principal component matrix may include:

[0263] The principal component matrix is ​​obtained based on the third data matrix and the principal component transformation matrix.

[0264] In this embodiment, the third data can be standardized first.

[0265] In practice, the standardization methods for third-party data can be mean centering or variance scaling.

[0266] Third, data standardization can alleviate the problem of over-capturing certain large-value features, making the data size within the same range, and ensuring that different variables have the same scale, which is convenient for subsequent principal component analysis.

[0267] Solve for the covariance matrix of the standardized third data to obtain the eigenvalues ​​and eigenvectors of the covariance matrix. Then, select the principal components and their corresponding eigenvectors to obtain the principal component transformation matrix.

[0268] The principal component transformation matrix can include k principal components, each of which is a k eigenvector of the covariance matrix corresponding to the third data.

[0269] The principal component transformation matrix can be expressed as:

[0270]

[0271] Wherein, the columns of P are the eigenvectors corresponding to the first k largest eigenvalues ​​in the eigenvector group after solving the covariance matrix, v i ( j) Let represent the j-th element of the i-th feature vector, k be the number of principal components, and n be the number of features in the third data, i.e., the number of sensors.

[0272] In some embodiments, the value of k can be determined by experimentally observing whether the curve fluctuation of the target third data after processing the third data is smooth.

[0273] After obtaining the principal component transformation matrix, the principal component matrix is ​​calculated based on the following formula:

[0274] The calculation method is as follows:

[0275] Z = XP

[0276] Where Z is an m×k principal component matrix, m is the number of samples, and k is the number of principal components selected. Each row of Z... i Let X represent the coordinates of the i-th sample in the principal component space, X be the standardized third data, and P be the principal component transformation matrix, where m and k are both positive integers.

[0277] According to the freshness detection method provided in the embodiments of this application, by performing principal component analysis on the third data, the third data can be dimensionality reduced to reduce the amount of data in the subsequent calculation process and improve the calculation efficiency; the main features are extracted, and independent component processing is performed based on the main features to determine the degree of influence of temperature, humidity and airflow on each data in the third data, thereby improving the accuracy and efficiency of the judgment.

[0278] After obtaining the principal component matrix, independent component processing is performed based on the principal component matrix to obtain the independent component matrix.

[0279] In some embodiments, independent component analysis is performed on the third data based on the principal component matrix to obtain an independent component matrix, which may include:

[0280] Independent component analysis was performed on the third data matrix to obtain the unmixing matrix;

[0281] Based on the unmixing matrix and the principal component matrix, the independent component matrix is ​​obtained.

[0282] In this embodiment, independent component analysis is an algorithm used for signal processing and data analysis.

[0283] The main goal of independent component analysis is to find a linear transformation, or unmixing matrix, that makes the transformed signal components as statistically independent as possible.

[0284] For example, suppose the observed mixed signal is obtained by linearly mixing several unknown independent source signals.

[0285] The mixing process can be described by a mixing matrix A, that is, the observed signal X is the product of the source signal S and the mixing matrix A. The goal of independent component analysis is to find an unmixing matrix W such that the result U obtained by W acting on X is as close as possible to the true source signal S.

[0286] In theory, the unmixing matrix W is the inverse of the mixing matrix A. However, since independent component analysis is a blind source separation, the mixing matrix A cannot usually be obtained directly. Therefore, optimization algorithms are needed to approximate the unmixing matrix W.

[0287] The independent component matrix is ​​a matrix composed of the independent components obtained by performing principal component analysis and independent component analysis on the third data corresponding to multiple acquisition times.

[0288] The independent component matrix can be obtained from the principal component matrix and the unmixing matrix.

[0289] The calculation method can be expressed as:

[0290] U = W·Z

[0291] Where U is the independent component matrix, W is the unmixing matrix, and Z is the principal component matrix.

[0292] According to the freshness detection method provided in the embodiments of this application, by performing independent component analysis on the third data matrix, the basic source signals that are independent of each other in the mixed signal can be obtained. Processing based on the basic source signals facilitates the subsequent extraction of target signal data, reduces the processing of non-target signal data, and improves processing efficiency. It can also eliminate the influence of temperature, humidity and airflow to the greatest extent possible, thereby improving the accuracy of freshness prediction.

[0293] The third set of data after temperature and humidity compensation is the data that is less affected by temperature, humidity and airflow.

[0294] In some embodiments, filtering each independent component in the independent component matrix and reconstructing the filtered independent component matrix to update the third data corresponding to the current acquisition time may include:

[0295] Calculate the correlation coefficient between each independent component and each third data point in the third data matrix;

[0296] The third data matrix is ​​filtered based on the correlation coefficient and the first threshold, and the filtered independent component matrix is ​​reconstructed to obtain the processed third data corresponding to the current acquisition time.

[0297] In this embodiment, the correlation coefficient is used to characterize the degree to which temperature, humidity, or airflow affects the system.

[0298] The correlation coefficients between each independent component and each third data point in the third data matrix are obtained by the formula.

[0299] The calculation method is as follows:

[0300]

[0301] Where R is the correlation coefficient matrix, i and j represent rows and columns respectively, and n is the number of sensors.

[0302] After obtaining the correlation coefficient, the third data matrix is ​​filtered based on the correlation coefficient and the first threshold to obtain the third data.

[0303] In some embodiments, the third data matrix is ​​filtered based on the correlation coefficient and a first threshold, and the filtered independent component matrix is ​​reconstructed to obtain the processed third data corresponding to the current acquisition time, which may include:

[0304] The independent components with correlation coefficients greater than the first threshold are updated to 0, resulting in the updated independent component matrix.

[0305] The updated independent component matrix is ​​reconstructed to obtain the updated third data.

[0306] In this embodiment, the first threshold is a correlation coefficient value that can distinguish between target data and non-target data.

[0307] The first threshold is used to filter components in the independent component matrix that are highly correlated with the temperature and humidity sensor but lowly correlated with the gas sensor.

[0308] The first threshold can be determined by experimental observation of whether the curve of the third data after processing is smooth.

[0309] In some embodiments, updating independent components with correlation coefficients greater than a first threshold to 0 to obtain an updated independent component matrix may include:

[0310] Set a threshold A and create an index file corMax corresponding to each independent component. Assign the index j of the component that is greater than the threshold A to corMax. Use the index to locate the component in the independent component matrix and set its value to 0.

[0311] According to the freshness detection method provided in the embodiments of this application, by filtering the independent component matrix, gas independent component data that excludes temperature, humidity and airflow interference can be obtained, so as to obtain gas sensor data after suppressing the interference of temperature, humidity and airflow sensors, thereby improving the accuracy of subsequent freshness prediction.

[0312] The third data can be obtained by reconstructing the updated independent component matrices based on the principal component transformation matrix and unmixing matrix corresponding to the third data matrix.

[0313] In some embodiments, reconstruction can be the inverse operation.

[0314] In some embodiments, reconstructing the updated independent component matrix can yield third data, which may include:

[0315] The third data calculation process can be represented as follows:

[0316] X = W -1 ·U·P -1

[0317] Where X is the third data, W is the unmixing matrix corresponding to the third data matrix, P is the unmixing matrix corresponding to the third data matrix, and U is the updated independent component matrix.

[0318] According to the freshness detection method provided in the embodiments of this application, by performing an inverse transformation on the updated independent component matrix, third data that excludes the interference of temperature, humidity and airflow can be obtained. The third data affected by temperature, humidity and airflow is corrected into compensated third data, thereby improving the accuracy of freshness prediction.

[0319] During the research and development process, the inventors discovered that in related technologies, interference suppression requires reliance on temperature, humidity, and airflow sensors, and separate algorithms need to be developed for temperature, humidity, and airflow to suppress interference. This increases hardware costs while the interference suppression effect is not significant.

[0320] In this application, principal component analysis (PCA) is used to reduce the dimensionality of the third data matrix to obtain the main feature data. Based on the main feature data, independent component analysis is performed on the third data to obtain the independent component matrix, thereby extracting mutually independent components. Based on the independent component matrix, the third data is filtered, which can accurately and quickly remove data that is greatly affected by temperature, humidity, or airflow. Freshness prediction is then based on the third data that is less affected by temperature, humidity, or airflow, thus improving the prediction accuracy and precision.

[0321] According to the freshness detection method provided in the embodiments of this application, by performing principal component analysis and independent component analysis on the third data, and filtering the third data matrix based on the independent components obtained after processing, the third data can be dimensionality reduced, and the third data that excludes the influence of temperature, humidity and airflow in the mixed signal can be obtained, thereby achieving gas sensor interference suppression with high suppression accuracy and precision.

[0322] In actual execution, after obtaining the third data after temperature and humidity compensation, the temperature and humidity compensated data corresponding to the current collection time can be extracted from the third data after temperature and humidity compensation, so as to input the third data corresponding to the current collection time into the freshness classification model and obtain the freshness information output by the freshness classification model.

[0323] According to the freshness detection method provided in this application embodiment, based on the third data obtained through inter-plate calibration, temperature and humidity compensation is applied to the third data to accurately and quickly remove data that is significantly affected by temperature, humidity, or airflow, resulting in more accurate third data. It can also address the differences in data acquired between different sensor arrays and the impact of refrigerator temperature and humidity fluctuations on the target odor, obtaining more accurate gas sensor data. This data is then used for freshness classification, resulting in a more accurate freshness identification result and achieving higher precision freshness detection.

[0324] The freshness detection method provided in this application can be executed by a freshness detection device. This application uses a freshness detection device executing the freshness detection method as an example to illustrate the freshness detection device provided in this application.

[0325] This application also provides a freshness detection device.

[0326] like Figure 4 As shown, the freshness detection device is applied to a sensor array, which includes multiple odor sensors; the device includes a first processing module 410, a second processing module 420 and a third processing module 430.

[0327] The first processing module 410 is used to acquire multiple sample data collected by multiple non-standard sensor arrays;

[0328] The second processing module 420 is used to process multiple sample data using a target algorithm to determine the target sample data from the multiple sample data.

[0329] The third processing module 430 is used to optimize the calibration model based on the target sample data. The calibration model is used to map the target data collected by the non-standard sensor array to the response value corresponding to the standard sensor array. The response value is used for freshness detection.

[0330] According to the freshness detection device provided in the embodiments of this application, by automatically selecting the sample size by setting predefined standards, the accuracy of the samples participating in training the calibration model can be improved, thereby improving the accuracy and precision of the calibration model obtained by training, and effectively reducing manpower and time costs; by uniformly calibrating the sensor array, the mutual influence between the sensors can be fully considered, and the calibration effect of the sensor array can be significantly improved.

[0331] In some embodiments, the third processing module 430 can also be used for:

[0332] Input the target sample data into the calibration model and obtain the predicted value output by the calibration model;

[0333] The weights are determined based on the predicted values ​​and their corresponding actual values.

[0334] The calibration model is optimized based on the weights.

[0335] In some embodiments, the third processing module 430 can also be used for:

[0336] The residuals between each predicted value and the corresponding actual value are calculated.

[0337] Based on the residual, calculate the difference between the predicted value and the actual value corresponding to the predicted value;

[0338] Based on the difference value, the weights corresponding to each predicted value are obtained.

[0339] In some embodiments, the third processing module 430 can also be used for:

[0340] If the absolute value of the difference is not less than the second threshold, the weight is determined to be the first value;

[0341] If the absolute value of the difference is less than the second threshold, the weight is determined based on the difference value.

[0342] In some embodiments, the third processing module 430 can also be used for:

[0343] The loss function of the correction model is calculated based on weights;

[0344] The optimization ends when the loss function fit converges.

[0345] If the loss function fails to converge, refit the calibration model and return to the step of inputting the target sample data into the calibration model to obtain the predicted value output by the calibration model.

[0346] In some embodiments, the second processing module 420 may also be used for:

[0347] Determine the Euclidean distance between any two samples in a set of multiple sample data;

[0348] Add the two samples corresponding to the largest Euclidean distance to the training sample set, and remove the samples added to the training sample set from multiple sample sets;

[0349] If the number of sample data in the training sample set does not exceed the first threshold, calculate the Euclidean distance between the target sample data in the training sample set and each sample data in the updated sample data.

[0350] Add the sample data corresponding to the largest and smallest Euclidean distances to the training sample set, and remove the sample data added to the training sample set from multiple sample data sets;

[0351] If the number of sample data in the training sample set exceeds the first threshold, the training sample set is determined as the target sample data.

[0352] In some embodiments, the device may further include a fourth processing module for:

[0353] After optimizing the calibration model based on the target sample data, the second data from the storage device under test, collected by a non-standard sensor array, is obtained.

[0354] The second data is input into the calibration model to obtain the third data output by the calibration model;

[0355] Based on third-party data, the freshness information of the storage device to be tested is predicted.

[0356] In some embodiments, the fourth processing module may also be used for:

[0357] The third set of data is input into the freshness classification model to obtain the freshness information output by the model; among which,

[0358] The freshness classification model was trained using sample data collected from a standard sensor array.

[0359] In some embodiments, the fourth processing module may also be used for:

[0360] If the odor corresponding to the third data is determined to be the target odor based on the third data and the target threshold, the freshness information is determined based on the third data: wherein the target threshold is determined by the first data corresponding to the target odor or the first data corresponding to the interfering odor collected by each sensor in the sensor array.

[0361] In some embodiments, the fourth processing module may also be used for:

[0362] Perform temperature and humidity compensation on the third data and update the third data;

[0363] Based on the updated third-party data, the freshness information of the storage device to be tested is predicted.

[0364] In some embodiments, the fourth processing module may also be used for:

[0365] Principal component analysis and independent component analysis are performed on the third data corresponding to the current acquisition time and the third data corresponding to multiple historical acquisition times to obtain the independent component matrix;

[0366] Each independent component in the independent component matrix is ​​filtered, and the filtered independent component matrix is ​​reconstructed to update the third data corresponding to the current acquisition time.

[0367] The freshness detection device in this application embodiment can be an electronic device or a component in a storage device, such as an integrated circuit or a chip. The electronic device can be a terminal.

[0368] The freshness detection device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0369] The freshness detection device provided in this application embodiment can achieve… Figures 1 to 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0370] like Figure 5 As shown in the figure, this application embodiment also provides a storage device.

[0371] The storage device includes: a housing 510, a sensor array, and a freshness detection device as described in any of the above embodiments.

[0372] In this embodiment, the storage device can be understood as a refrigeration storage device in a broad sense, including but not limited to refrigerators, freezers, display cases, beverage cabinets, wine cabinets, refrigerated display cases, and refrigerated vending machines. The storage devices have diverse structural forms and a wide range of applications.

[0373] The sensor array is housed within the enclosure 510.

[0374] The sensor array includes multiple odor sensors.

[0375] In some embodiments, the sensor array may further include temperature sensors and humidity sensors, etc.

[0376] The freshness detection device is electrically connected to the sensor array.

[0377] According to the storage device provided in the embodiments of this application, by setting predefined standards to automatically select the sample size, the accuracy of the samples participating in the training and correction model can be improved, thereby improving the accuracy and precision of the training correction model, and effectively reducing manpower and time costs; by uniformly correcting the sensor array, the mutual influence between the sensors can be fully considered, significantly improving the correction effect of the sensor array.

[0378] In some embodiments, such as Figure 6 As shown, this application embodiment also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, it implements the various processes of the above-described freshness detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0379] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0380] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described freshness detection method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0381] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0382] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described freshness detection method.

[0383] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0384] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described freshness detection method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0385] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0386] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0387] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0388] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0389] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0390] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A freshness detection method characterized by, The method is applied to a sensor array including a plurality of odor sensors, and includes: obtaining a plurality of sample data collected by a plurality of non-standard sensor arrays; processing the plurality of sample data by using a target algorithm to determine target sample data from the plurality of sample data; based on the target sample data, optimizing a correction model; the correction model is used to map target data collected by the non-standard sensor array to a corresponding response value of a standard sensor array, and the response value is used for freshness detection.

2. The freshness detection method according to claim 1, characterized by, The method further includes: inputting the target sample data into the correction model to obtain a predicted value output by the correction model; based on the predicted value and a true value corresponding to the predicted value, determining a weight; based on the weight, optimizing the correction model.

3. The freshness detection method according to claim 2, characterized by, The method further includes: calculating a residual between each predicted value and a true value corresponding to the predicted value; based on the residual, calculating a difference value between the predicted value and the true value corresponding to the predicted value; based on the difference value, obtaining a weight corresponding to each predicted value.

4. The freshness detection method according to claim 3, characterized by, The method further includes: in a case where an absolute value of the difference value is not less than a second threshold value, determining the weight as a first numerical value; in a case where the absolute value of the difference value is less than the second threshold value, determining the weight based on the difference value.

5. The freshness detection method according to claim 2, characterized by, The method further includes: based on the weight, calculating a loss function of the correction model; in a case where the loss function is fitted to converge, ending the optimization; in a case where the loss function is not fitted to converge, re-fitting the correction model, and returning to perform the step of inputting the target sample data into the correction model to obtain a predicted value output by the correction model.

6. The freshness detection method according to any one of claims 1 to 5, characterized in that, The method further includes: respectively determining an Euclidean distance between any two sample data in the plurality of sample data; adding two sample data corresponding to the maximum Euclidean distance to a training sample set, and deleting sample data added to the training sample set from the plurality of sample data; in a case where a number of sample data in the training sample set does not exceed a first threshold value, calculating an Euclidean distance between target sample data in the training sample set and each sample data in the updated plurality of sample data; adding sample data corresponding to the maximum Euclidean distance and the minimum Euclidean distance to the training sample set, and deleting sample data added to the training sample set from the plurality of sample data; in a case where the number of sample data in the training sample set exceeds the first threshold value, determining the training sample set as the target sample data.

7. The freshness detection method according to any one of claims 1 to 5, characterized by, After the step of optimizing the correction model based on the target sample data, the method further includes: obtaining second data in a to-be-tested storage device collected by a non-standard sensor array; inputting the second data into the correction model to obtain third data output by the correction model; based on the third data, predicting freshness information in the to-be-tested storage device.

8. The freshness detection method according to claim 7, characterized by, The freshness information is predicted based on the third data, and the freshness information includes: inputting the third data into a freshness classification model to obtain the freshness information output by the freshness classification model; wherein, The freshness classification model is trained based on sample data collected by the standard sensor array.

9. The freshness detection method according to claim 7, characterized by, The freshness information is predicted based on the third data, and the freshness information includes: In a case where it is determined based on the third data and a target threshold that the odor corresponding to the third data is a target odor, the freshness information is determined based on the third data: wherein the target threshold is determined based on first data corresponding to the target odor or first data corresponding to an interference odor collected by each sensor in the sensor array.

10. The freshness detection method according to claim 7, characterized by, The freshness information is predicted based on the third data, and the freshness information includes: The third data is temperature and humidity compensated, and the third data is updated. The freshness information is predicted based on the updated third data.

11. The freshness detection method according to claim 10, characterized by, The third data is temperature and humidity compensated, and the third data is updated, and includes: Performing principal component analysis and independent component analysis on the third data corresponding to the current collection time and the third data corresponding to a plurality of historical collection times to obtain an independent component matrix; Filtering each independent component in the independent component matrix, and reconstructing the filtered independent component matrix to update the third data corresponding to the current collection time.

12. A freshness detecting device characterized by comprising: The sensor array includes a plurality of odor sensors; and the device includes: A first processing module for obtaining a plurality of sample data collected by a plurality of non-standard sensor arrays; A second processing module for processing the plurality of sample data using a target algorithm to determine target sample data from the plurality of sample data; A third processing module for optimizing a correction model based on the target sample data; the correction model is used to map target data collected by the non-standard sensor array to a response value corresponding to a standard sensor array, and the response value is used for freshness detection.

13. A storage device, comprising: It includes: A box; A sensor array disposed in the box, the sensor array including a plurality of odor sensors; The freshness detection device of claim 12 is electrically connected to the sensor array.

14. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the freshness detection method of any one of claims 1-11.

15. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the freshness detection method of any one of claims 1-11.