Method and device for adjusting cabin environment, refrigerator and storage medium
By predicting the type and quantity of ingredients when stored, and adjusting the refrigerator compartment environment in advance, the problem of inappropriate environment when stored is solved, and the freshness of ingredients is maximized and the energy-saving effect of the refrigerator is achieved.
Patent Information
- Application Number
- CN202311047960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
The existing refrigerator technology cannot adjust the cabin environment in time when the ingredients are first stored, resulting in inappropriate storage environment and the inability to maintain the freshness of the ingredients to the maximum extent.
By calling the historical data stored in the ingredients, establish an autoregressive model to predict the ingredients to be stored, and adjust the storage environment of the refrigerator compartment in advance to ensure that the ingredients are in the optimal storage environment when stored.
It effectively reduces the possibility of inappropriate storage environment when ingredient is stored, maximizes the storage time of food, and achieves energy-saving effects by adjusting the refrigerator's operating power in a timely manner.
Smart Images

Figure CN119492232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart home appliances, for example, to a method and device for adjusting a cabin environment, a refrigerator, and a storage medium. Background Art
[0002] As people's living standards continue to improve, people pay more and more attention to eating habits and dietary health, and the storage method of food is becoming more and more important. Refrigerators are the most common food storage appliances in people's home life. However, after users put the food into the refrigerator compartment, since different food requires different storage environments, when different food is placed in the original compartment environment, there is a possibility that the best storage environment for the food cannot be met, so the freshness of the food cannot be kept to the maximum extent.
[0003] With the development of refrigerators, a more intelligent way of storing food can be provided for users. The related technology discloses a method for controlling the food storage environment of a refrigerator, including: scanning the food in the refrigerator to obtain spectral data; analyzing the spectral data to determine the type information of the food; obtaining the suitable storage environment information of the food according to the type information; regulating the storage environment of the refrigerator according to the suitable storage environment information; when there are multiple types of information, judging whether the multiple types of food are suitable for storage together; when multiple food that are not suitable for storage together are stored together, selecting the temperature upper limit value of the food with the lowest temperature information in the multiple suitable storage environment information as the temperature setting value, and regulating the storage temperature of the refrigerator to reach the setting value.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0005] After the related technology scans the food information stored in the refrigerator, it adjusts the environment of the refrigerator compartment according to the food information. However, when the food is just stored in the refrigerator, it cannot provide the food with the most suitable storage environment in time, and it cannot keep the freshness of the food to the maximum extent.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a method and device for adjusting a cabin environment, a refrigerator, and a storage medium, which can adjust the refrigerator cabin environment in advance according to prediction results, thereby reducing the possibility of an inappropriate storage environment when food is just stored in the refrigerator.
[0009] In some embodiments, the method for adjusting the cabin environment includes: calling historical data on food storage; predicting food to be stored in the cabin based on the historical data on food storage; and adjusting the storage environment of the cabin based on the prediction results.
[0010] Optionally, predicting the food to be stored in the cabin based on the historical data of food storage includes: establishing an autoregressive model based on the historical data of food storage; and predicting the food to be stored in the cabin in the autoregressive model.
[0011] Optionally, establishing an autoregressive model based on historical data of food storage includes: grouping the historical data of food storage to form multiple groups of time series; performing stationarity assessment on each group of time series; if the group of time series is stationary, setting the order of the autoregressive model; and establishing the autoregressive model of the group of time series according to the set order.
[0012] Optionally, adjusting the storage environment of the cabin according to the prediction results includes: generating an environment prediction table according to the prediction results; and adjusting the storage environment of the cabin in advance according to the environment prediction table.
[0013] Optionally, generating an environmental prediction table based on the prediction results includes: obtaining optimal storage environment indicators for the ingredients in the prediction results and optimal storage environment indicators for the ingredients already in the cabin; combining the same optimal storage environment indicator for all ingredients to determine a predicted value for the environmental indicator; and generating an environmental prediction table based on the predicted values of each environmental indicator.
[0014] Optionally, the method of combining the same optimal storage environment indicator for all ingredients to determine the predicted value of the environmental indicator includes: determining the intersection range of the same optimal storage environment indicator for all ingredients; if an environmental indicator has a common intersection range, then determining the value in the intersection range that is closest to the original state of the cabin as the predicted value of the indicator; if an environmental indicator has multiple non-intersecting value ranges, first selecting the range with the lowest value among the multiple value ranges, and then determining the value in the selected range that is closest to the original state of the cabin as the predicted value of the indicator.
[0015] Optionally, before calling the historical data stored in the food material, the method further includes: acquiring the original data stored in the food material; and generating the historical data stored in the food material that can be called according to the original data stored in the food material.
[0016] In some embodiments, the apparatus for adjusting the cabin environment comprises a processor and a memory storing program instructions, and the processor is configured to execute the method for adjusting the cabin environment as described above when running the program instructions.
[0017] In some embodiments, the refrigerator for adjusting the cabin environment includes a refrigerator body, and the above-mentioned device for adjusting the cabin environment is installed on the refrigerator body.
[0018] In some embodiments, the storage medium for adjusting the cabin environment stores program instructions, and when the program instructions are run, the above-mentioned method for adjusting the cabin environment is executed.
[0019] The method and device for adjusting the cabin environment, refrigerator, and storage medium provided in the embodiments of the present disclosure can achieve the following technical effects:
[0020] Based on the historical data of food storage, the user's food storage habits are learned, the food to be stored in different compartments is predicted, and the compartment storage environment is adjusted for the user in advance, which can reduce the possibility of an inappropriate storage environment when the food is just stored in the refrigerator, thereby maximizing the storage time of the food. In addition, since different food storage requires different humidity and temperature environments, the corresponding refrigerator operating power is also different. Different operating powers are used for different food, and the refrigerator can enter low-power mode in a timely manner, thereby achieving the purpose of energy saving.
[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0023] Figure 1 is a schematic diagram of a method for adjusting a cabin environment provided by an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of another method for adjusting a cabin environment provided by an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of another method for adjusting a cabin environment provided by an embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of another method for adjusting a cabin environment provided by an embodiment of the present disclosure;
[0027] Figure 5 is a schematic diagram of a device for adjusting a cabin environment provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a schematic diagram of a refrigerator provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0030] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0031] Unless otherwise stated, the term "plurality" means two or more.
[0032] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0033] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0034] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0035] With the improvement of living standards, people pay more and more attention to eating habits and dietary health, and the storage method of food ingredients is also receiving more and more attention. Refrigerators are the most common food storage appliances in daily home life, but after the food ingredients are placed in the refrigerator compartment, users rarely pay attention to or adjust the operation mode of the refrigerator. Because different food ingredients require different storage environments, when different food ingredients are placed in the original compartment environment, there is a possibility that the optimal storage environment of the food ingredients cannot be met, and therefore the freshness of the food ingredients cannot be kept to the maximum extent.
[0036] The development of refrigerators has provided users with a smarter way to store food. According to the user's food storage situation, refrigerators can recommend food or consumption suggestions to users, or provide users with food expiration warnings. However, existing technologies focus more on the food already in the refrigerator, and do not pay attention to the food that the user is about to store.
[0037] The disclosed embodiment provides a method for adjusting the cabin environment. The refrigerator can learn the user's food storage habits based on the historical data of food storage, predict the food to be stored in different cabins, and adjust the cabin storage environment for the user in advance. When the food is just put in, the food is placed in the best storage environment, thereby maximizing the storage time of the food. In addition, since the humidity and temperature environment required for storing different food ingredients are different, the corresponding refrigerator operating power is also different. Different operating powers are used for different food ingredients, and the refrigerator can enter the low power mode in time to achieve the purpose of energy saving.
[0038] Combination Figure 1 As shown, the method for adjusting the cabin environment provided by the embodiment of the present disclosure includes:
[0039] S001, the refrigerator calls up the historical data of food storage.
[0040] S002, the refrigerator predicts the food to be stored in the compartment based on the historical data of food storage.
[0041] S003, the refrigerator adjusts the storage environment of the compartment according to the prediction result.
[0042] The refrigerator can learn the user's storage habits through the user's food storage history data, predict the food that will be stored in the refrigerator compartment, and then adjust the storage environment of the corresponding compartment of the refrigerator in advance according to the prediction results, which can increase the possibility that the food is in the best storage environment when it is first stored in the refrigerator. In addition, the refrigerator's operating power will also change according to the predicted food storage situation, and the refrigerator can enter the low-power mode operation in time to achieve the purpose of energy saving.
[0043] Optionally, predicting the food to be stored in the cabin based on the historical data of food storage includes: establishing an autoregressive model based on the historical data of food storage; and predicting the food to be stored in the cabin in the autoregressive model.
[0044] The prediction method in this solution uses the autoregressive model for prediction, which is a time series analysis method used to describe the relationship between a variable and its past values in a time series. The autoregressive model assumes that there is a linear relationship between the current observation value and the past observation value, and predicts the future observation value by using the past observation value. The formula is:
[0045]
[0046] Among them, Y t is the time series value at time point t, that is, the label at time t; c is the constant term of the model; Y t-1 is the label value of the time point t-1 before the time point t; is the coefficient of the tth lag term; ξ t is the error term at time point t.
[0047] Optionally, an autoregressive model is established based on historical data of food storage, including: grouping the historical data of food storage to form multiple groups of time series; evaluating the stationarity of each group of time series; if the group of time series is stationary, setting the order of the autoregressive model; and establishing the autoregressive model of the group of time series according to the set order.
[0048] When establishing an autoregressive model for the historical data of food storage, we can first group the food storage historical data according to each device, each compartment, and each food, and divide the food storage historical data into multiple groups of time series. Each group of time series represents the storage status of a food in a compartment of a device.
[0049] Then, it is necessary to evaluate the stationarity of all time series. If the evaluation result of the series is stationary, it means that prediction can be made; if the evaluation result is not stationary, it means that prediction cannot be made. The ADF (Augmented Dickey-Fuller test) test is a statistical test method used to determine whether a time series has a unit root, and then determine the stationarity of the series. The assumptions of the ADF test include the null hypothesis and the alternative hypothesis. The null hypothesis indicates that the data series has a unit root and is non-stationary; the alternative hypothesis indicates that the data series does not have a unit root and is stationary. Using the adfuller function in Python, the value of the statistic of each time series can be calculated. If the obtained significance test statistic is less than the statistical value under 10% and 5%, the null hypothesis is rejected, indicating that the series is stationary. If the series is non-stationary, it is necessary to perform the first-order difference through the diff function in Python, and then re-perform the ADF test.
[0050] For stationary series, AutoReg is imported from the statsmodels.tsa.ar_model program module in Python, and autoregressive model prediction is performed on each group, and the model order is set. In the embodiment of the present disclosure, the data used for prediction is the data before the prediction date, so when setting parameters, it is necessary to adjust according to the number of elements in the time series and the prediction results.
[0051] After adjusting the model, you can predict the time series of each group. If the predicted unit number is 0 or negative, it is uniformly set to 0, indicating that the user will not store the ingredient on that day. At the same time, the prediction results are rounded to retain integer digits.
[0052] Optionally, since the purpose of the embodiment of the present disclosure is to adjust the temperature and humidity of the refrigerator compartment according to the food to be stored, predicting the specific quantity of food does not affect the humidity and temperature adjustment, and it is only necessary to predict whether the user will store food.
[0053] Optionally, adjusting the storage environment of the cabin according to the prediction results includes: generating an environment prediction table according to the prediction results; and adjusting the storage environment of the cabin in advance according to the environment prediction table.
[0054] After obtaining the prediction results, an environmental prediction table will be generated based on the prediction results, and then according to the various environmental indicators in the environmental prediction table, the environment of the corresponding compartment of the refrigerator will be adjusted in advance before the ingredients in the prediction results are stored.
[0055] Optionally, an environmental prediction table is generated based on the prediction results, including: obtaining the optimal storage environment indicators of the ingredients in the prediction results and the optimal storage environment indicators of the ingredients already in the cabin; combining the same optimal storage environment indicator of all ingredients to determine the predicted value of the environmental indicator; and generating an environmental prediction table based on the predicted values of each environmental indicator.
[0056] The environmental prediction table needs to take into account both the ingredients already in the refrigerator and the ingredients in the prediction results, so that all ingredients can be in a relatively suitable storage environment. At the same time, combining the optimal storage environment indicators of all ingredients can increase the possibility of obtaining an environment suitable for storing all ingredients.
[0057] Optionally, the predicted value of the environmental indicator is determined in combination with the same optimal storage environment indicator for all ingredients, including: determining the intersection range of the same optimal storage environment indicator for all ingredients; if an environmental indicator has a common intersection range, then determining the value in the intersection range that is closest to the original state of the cabin as the predicted value of the indicator; if an environmental indicator has multiple non-intersecting value ranges, first selecting the range with the lowest value among the multiple value ranges, and then determining the value in the selected range that is closest to the original state of the cabin as the predicted value of the indicator.
[0058] The various environmental indicators in the optimal storage environment of the food materials usually have a range of values, so it is necessary to select the best value from the multiple different ranges of the multiple food materials as the predicted value. The following describes the method for determining the predicted value in two different situations.
[0059] Taking the ambient temperature as an example, if the optimal storage ambient temperature range of the first ingredient is [0, 3], and the optimal storage ambient temperature range of the second ingredient is [1, 5], then the crossover range of the optimal storage ambient temperature of the first ingredient and the second ingredient is [1, 3]; if the optimal storage ambient temperature range of the first ingredient is [0, 2], and the optimal storage ambient temperature range of the second ingredient is [3, 5], then the optimal storage ambient temperature of the first ingredient and the second ingredient has no crossover range, and at this time, the lower temperature range is selected from the two different ranges, that is, [0, 2]. When there are three or more ingredients, just repeat the above steps until only one temperature range is left. Combined with the original storage ambient temperature in the cabin, select the closest temperature value in the above temperature range as the predicted value of the optimal storage ambient temperature.
[0060] Optionally, the method for adjusting the cabin environment further includes: obtaining original data of food storage before calling the historical data of food storage; and generating callable historical data of food storage based on the original data of food storage.
[0061] Combination Figure 2 As shown, the embodiment of the present disclosure provides another method for adjusting the cabin environment, comprising:
[0062] S101, the refrigerator obtains original data of food storage.
[0063] S102, the refrigerator generates callable food storage history data based on the original food storage data.
[0064] S103, the refrigerator calls up the historical data of food storage.
[0065] S104, the refrigerator predicts the food to be stored in the compartment based on the historical data of food storage.
[0066] S105, the refrigerator adjusts the storage environment of the compartment according to the prediction result.
[0067] The raw data of refrigerator food storage, including the food storage status in each compartment of each device, cannot be directly called. These raw data need to be recorded and predicted separately according to each food in each compartment of each device. Therefore, the data needs to be processed before prediction to obtain the table structure required by the prediction algorithm. The table structure includes the device name, compartment, food name, food storage date, food storage unit number and food storage unit. If there is a date when the food is not stored, the food storage unit number of that day is set to 0.
[0068] Optionally, the method for adjusting the cabin environment also includes: if the prediction result shows that no food is stored on the predicted date, there is no need to adjust the cabin environment.
[0069] Combination Figure 3 As shown, the embodiment of the present disclosure provides another method for adjusting the cabin environment, comprising:
[0070] S201, the refrigerator obtains original data of food storage.
[0071] S202, the refrigerator generates callable food storage history data based on the original food storage data.
[0072] S203, the refrigerator calls up the historical data of food storage.
[0073] S204, the refrigerator predicts the food to be stored in the compartment based on the historical data of food storage.
[0074] S205, the refrigerator determines whether there is food stored on the predicted date, if so, execute S206, if not, execute S207.
[0075] S206, the refrigerator adjusts the storage environment of the compartment according to the prediction result.
[0076] S207, the refrigerator does not need to adjust the cabin environment.
[0077] When the prediction results show that the user will not store food, there is no need to adjust the refrigerator compartment environment. The original storage environment can be maintained to facilitate the preservation of food already in the refrigerator.
[0078] Optionally, the method for adjusting the cabin environment also includes: when adjusting the storage environment of the cabin according to the prediction results, the environmental adjustment that can be achieved by the refrigerator is limited to a certain range, and the range is set by the user.
[0079] Combination Figure 4 As shown, the embodiment of the present disclosure provides another method for adjusting the cabin environment, comprising:
[0080] S301, the refrigerator obtains original data of food storage.
[0081] S302, the refrigerator generates callable food storage history data based on the original food storage data.
[0082] S303, the refrigerator calls up the historical data of food storage.
[0083] S304, the refrigerator predicts the food to be stored in the compartment based on the historical data of food storage.
[0084] S305, the refrigerator determines whether there is food stored on the predicted date, if yes, execute S306, if not, execute S307.
[0085] S306, the refrigerator determines whether the storage environment index adjusted according to the prediction result exceeds the preset range, if so, execute S308, if not, execute S309.
[0086] S307, the refrigerator does not need to adjust the cabin environment.
[0087] S308, the refrigerator is adjusted to a storage environment closest to the predicted result within a preset range.
[0088] S309, the refrigerator adjusts the storage environment of the compartment according to the prediction result.
[0089] Since the prediction results may have errors, adjusting the refrigerator compartment storage environment based entirely on the prediction results may result in storage environment indicators such as temperature and humidity being too high or too low, which is not conducive to the storage of existing food in the refrigerator compartment. Therefore, the user can pre-set an adjustment range for the compartment environment to reduce the possibility of the storage environment being unsuitable for storing some food.
[0090] The following is an example of storage prediction for a user's apples and pork and adjustment of the cabin storage environment.
[0091] Before making food storage predictions, the refrigerator first obtains food storage history data and generates a food storage record table. The food usage record table includes data such as equipment name, compartment, food name, food storage date, unit number, unit, etc. Among them, the equipment name indicates the device name that identifies the unique device; the compartment indicates the various storage compartments of the refrigerator, such as the refrigerator, the first freezer, the second freezer, etc.; the food name indicates the name of the stored food; the food storage date indicates the date when a certain food is placed in the refrigerator compartment; the unit number indicates the weight or number of stored food; the unit indicates the unit of stored food, such as piece, kilogram, etc. In actual applications, the food storage record table for apples and pork between May 1, 2023 and May 10, 2023 can be obtained, as shown in Table 1.
[0092] Table 1
[0093]
[0094]
[0095] The food storage prediction requires a separate prediction for each food in each compartment of each device, so it is necessary to process the food storage record table in Table 1 into the table structure required by the prediction algorithm according to different devices, different compartments, and different foods. If there is a date when the food is not stored, the number of food storage units on that day needs to be set to 0. For example, in Table 1, if the user did not store pork on May 2, 2023, the number of pork units stored by the user on that day is 0. The food storage record table in Table 1 is processed as shown in Tables 2 and 3.
[0096] Table 2
[0097]
[0098]
[0099] Table 3
[0100] Device Name cabin Ingredients Food storage date Number of units unit Mac1 Cold room pork 20230501 0 Kg Mac1 Cold room pork 20230502 1 Kg Mac1 Cold room pork 20230503 0 Kg Mac1 Cold room pork 20230504 1 Kg Mac1 Cold room pork 20230505 0 Kg Mac1 Cold room pork 20230506 1 Kg Mac1 Cold room pork 20230507 0 Kg Mac1 Cold room pork 20230508 1 Kg Mac1 Cold room pork 20230509 0 Kg Mac1 Cold room pork 20230510 1 Kg
[0101] The data in Table 2 and Table 3 are formed into time series, including:
[0102] Mac1, fresh room, apple: (6, 6, 3, 6, 3, 3, 6, 3, 3, 3);
[0103] Mac2, cold room, pork: (0, 1, 0, 1, 0, 1, 0, 1, 1).
[0104] The stationarity of the two time series of apples and pork is evaluated. The time series of apples (6, 6, 3, 6, 3, 3, 6, 3, 3, 3) is input into the adfuller function for ADF test. The output result is:
[0105] (-2.6801813713575773,0.07753099188657403,1,8,{'1%':-4.6651863281249994,'5%':-3.3671868750000002,'10%':-2.802960625},21.301169963745387)
[0106] Since the ADF statistical value: -2.6801813713575773 is greater than the statistical value -2.802960625 at 10%, it is necessary to perform a first-order difference on the apple time series. The result after using the diff function for differentiation is: [0 -3 3 -3 03 -3 0 0]. Then the ADF stationarity test is performed again, and the result is:
[0107] (-5.649078501144051,9.956351737868513e-07,1,7,{'1%':-4.938690233236151 5,'5%':-3.477582857142857,'10%':-2.8438679591836733},23.79813234709486)
[0108] The ADF statistic value -5.649078501144051 is less than the statistic value -4.9386902332361515 at 1%, so the null hypothesis can be rejected and the series is stationary. Then the prediction is made based on the differenced series. At the same time, after the prediction is made based on the differenced value, the prediction result needs to be restored.
[0109] The time series of pork is (0, 1, 0, 1, 0, 1, 0, 1, 0, 1). The result after ADF test is:
[0110] (-1424163249197636.5,0.0,3,6,{'1%':-5.354256481481482,'5%':-3.6462381481481483,'10%':-2.901197777777778},-415.65546135430947)
[0111] The ADF statistic value -1424163249197636.5 is less than the statistic value -5.354256481481482 at 1%, indicating that the sequence is stable and time series prediction can be performed directly.
[0112] Then we need to set the AR model order, import AutoReg from Python's statsmodels.tsa.ar_model program module, and perform AR model prediction on two sets of series. In this example, the data used for prediction is the data 10 days before the prediction date, so there are 10 elements in the time series, and the maximum order of the AR model is 3. Through the experimental data of 5 groups, it is found that when the model order is 2, the average error is the smallest, so the AR model order is set to 2. The 5 groups of experimental data are shown in Table 4.
[0113] Table 4
[0114] sequence Actual value Error of order = 1 Error of order = 2 Error for order = 3 (1,2,3,2,3,4,3,4,5,4) 5 1.48 1.51 0.9 (1,2,2,2,1,2,2,2,1,2) 2 0 0 0.3 (1,3,0,2,4,0,3,5,0,4) 6 0.13 0.03 4.73 (1,1,1,2,2,2,1,1,1,2) 2 0 0 0.33 (1,2,3,4,2,3,4,5,3,4) 5 0 0 2.11 Average Error 1.67 0.3 1.61
[0115] When the model order is set to 2, the formula of the AR model is:
[0116]
[0117] Since the model order may be different in different application scenarios, the order can be adjusted accordingly for different prediction data.
[0118] Finally, according to the adjusted model, prediction is performed. The two time series of apples and pork are input into the AutoReg function respectively, and the final formulas of apples and pork are obtained respectively:
[0119] Y t1 =-0.75-1.0625Y t-1 -0.6875Y t-2
[0120] Y t2 =0.33-0.33Y t-1 +0.67Y t-2
[0121] If the predicted unit number is 0 or a negative number, it is uniformly set to 0, indicating that the user will not store the ingredient on that day. At the same time, the predicted result is rounded to an integer. According to the above ingredient storage record table, the predicted result can be obtained as shown in Table 5.
[0122] Table 5
[0123] Device Name cabin Ingredients Food storage date Number of units unit Mac1 Fresh room apple 20230512 2 indivual Mac1 Cold room pork 20230512 0 Kg
[0124] The prediction result indicates that on May 12, the user will store 2 apples in the fresh-keeping room and 0 kg of pork in the refrigerator, which means that the user will not store pork on that day.
[0125] After obtaining the prediction results, the fresh-keeping room and refrigerator of the device Mac1 will generate an environmental prediction table based on the existing ingredients in the cabin and the ingredients to be stored, and the optimal storage environment indicators of these ingredients, and adjust the cabin environment in the early morning of May 12. The optimal storage humidity and temperature of some ingredients are shown in Table 6, where Null means that the ingredient has no requirements for temperature or humidity.
[0126] Table 6
[0127] Ingredients Maximum temperature Minimum temperature Maximum humidity Humidity minimum apple 0 -1 95% 85% banana 5 2 Null Null Peach 3 1 Null Null egg 7 0 Null Null pork 4 0 90% 85%
[0128] If there are already bananas and peaches in the fresh-keeping room, and eggs in the refrigerator, and the temperature in the fresh-keeping room is 2°C, the humidity is 80%, and the temperature in the refrigerator is 2°C, and the humidity is 90%. According to the prediction results in Table 5, it is predicted that the user will store apples in the fresh-keeping room on May 12, so the final temperature of the cabin needs to be determined according to the temperature range of bananas, peaches, and apples. First, take the temperature intersection range of the three fruits, that is, [2, 3] and [-1, 0], and then select the lowest temperature range [-1, 0]. The original temperature of the cabin is 2°C. In [-1, 0], 0°C is closest to 2°C, so the final temperature is 0°C. The determination rule of humidity is the same as that of temperature. Among the three fruits, bananas, peaches, and apples, only apples have requirements for the humidity of the storage environment, which is [85%, 95%]. The original humidity of the cabin is 80%, so the final humidity is determined to be 85%. In the refrigerator, the prediction results show that the user will not store food, so there is no need to adjust the environment of the refrigerator. Finally, the environment prediction table is generated, as shown in Table 7.
[0129] Table 7
[0130] cabin temperature humidity Cold room 2 90% Fresh room 0 85%
[0131] In the early morning of May 12, the refrigerator will adjust the corresponding cabin environment to the corresponding value according to the environmental prediction table. At the same time, the temperature or humidity adjustment realized by the prediction function has a certain temperature and humidity range, and the range is set by the user to prevent the temperature from being too high or too low due to the prediction error.
[0132] Combination Figure 5 As shown, an embodiment of the present disclosure provides a device 300 for adjusting a cabin environment, including a processor 100 and a memory 101. Optionally, the device may also include a communication interface 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other through the bus 103. The communication interface 102 may be used for information transmission. The processor 100 may call the logic instructions in the memory 101 to execute the method for adjusting the cabin environment of the above embodiment.
[0133] In addition, the logic instructions in the memory 101 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0134] The memory 101 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 100 executes functional applications and data processing by running the program instructions / modules stored in the memory 101, that is, implementing the method for adjusting the cabin environment in the above embodiment.
[0135] The memory 101 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 101 may include a high-speed random access memory and may also include a non-volatile memory.
[0136] Combination Figure 6 As shown, an embodiment of the present disclosure provides a refrigerator 200, comprising: a refrigerator body, and the above-mentioned device 300 for adjusting the cabin environment. The device 300 for adjusting the cabin environment is installed on the refrigerator body. The installation relationship described here is not limited to placement inside the product, but also includes installation connections with other components of the product, including but not limited to physical connections, electrical connections, or signal transmission connections. It can be understood by those skilled in the art that the device 300 for adjusting the cabin environment can be adapted to a feasible product body, thereby realizing other feasible embodiments.
[0137] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for adjusting the cabin environment.
[0138] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0139] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0140] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
Claims
1. A method for adjusting a cabin environment, characterized in that: include: Call the historical data stored in the food ingredients; Predict the food to be stored in the cabin based on historical food storage data; Adjust the storage environment of the cabin based on the prediction results.
2. The method according to claim 1, characterized in that The method of predicting the food to be stored in the cabin according to the historical data of food storage includes: An autoregressive model was established based on historical data of food storage; Predict the amount of food to be stored in a cabin using an autoregressive model.
3. The method according to claim 2, characterized in that The step of establishing an autoregressive model based on historical data of food storage includes: Group the food storage history data to form multiple time series; Evaluate the stationarity of each group of time series; If the time series is stationary, set the order of the autoregressive model; The autoregressive model of this group of time series is established according to the set order.
4. The method according to claim 1, characterized in that: The step of adjusting the storage environment of the cabin according to the prediction result includes: Generate an environmental prediction table based on the prediction results; Adjust the storage environment of the cabin in advance according to the environmental forecast table.
5. The method according to claim 4, characterized in that The step of generating an environmental prediction table according to the prediction results includes: Obtaining the optimal storage environment index of the food in the prediction result and the optimal storage environment index of the food already in the cabin; Combining the same optimal storage environment index of all food materials, determining the predicted value of the environment index; Generate an environmental prediction table based on the predicted values of various environmental indicators.
6. The method according to claim 5, characterized in that The step of combining the same optimal storage environment indicator for all ingredients and determining the predicted value of the environment indicator comprises: Determine the cross-range of the same optimal storage environment indicator for all ingredients; If an environmental indicator has a common cross-range, the value in the cross-range that is closest to the original state of the cabin is determined as the predicted value of the indicator; If an environmental indicator has multiple non-overlapping value ranges, the range with the lowest value among the multiple value ranges is selected first, and then the value in the selected range that is closest to the original state of the cabin is determined as the predicted value of the indicator.
7. The method according to any one of claims 1 to 6, characterized in that: Before calling the historical data stored in the food material, the method further includes: Get the raw data of food storage; Based on the original data of food storage, historical food storage data that can be called is generated.
8. A device for adjusting a cabin environment, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for adjusting the cabin environment according to any one of claims 1 to 7 when running the program instructions.
9. A refrigerator, characterized in that: include: Refrigerator body; The device for adjusting the cabin environment as described in claim 8 is installed on the refrigerator body.
10. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the method for adjusting the cabin environment according to any one of claims 1 to 7 is executed.