CN112446169A - Water heater water consumption prediction method, water heater and storage medium - Google Patents
Water heater water consumption prediction method, water heater and storage medium Download PDFInfo
- Publication number
- CN112446169A CN112446169A CN202011225066.2A CN202011225066A CN112446169A CN 112446169 A CN112446169 A CN 112446169A CN 202011225066 A CN202011225066 A CN 202011225066A CN 112446169 A CN112446169 A CN 112446169A
- Authority
- CN
- China
- Prior art keywords
- water
- water heater
- consumption
- water consumption
- historical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 667
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000012549 training Methods 0.000 claims abstract description 58
- 230000006870 function Effects 0.000 claims description 20
- 238000012417 linear regression Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 11
- 238000007599 discharging Methods 0.000 claims description 6
- 238000010801 machine learning Methods 0.000 claims description 6
- 238000013461 design Methods 0.000 claims description 3
- 238000012937 correction Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 5
- 230000006399 behavior Effects 0.000 description 3
- 238000010438 heat treatment Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 101100272279 Beauveria bassiana Beas gene Proteins 0.000 description 1
- 206010052804 Drug tolerance Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005485 electric heating Methods 0.000 description 1
- 230000026781 habituation Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F24—HEATING; RANGES; VENTILATING
- F24H—FLUID HEATERS, e.g. WATER OR AIR HEATERS, HAVING HEAT-GENERATING MEANS, e.g. HEAT PUMPS, IN GENERAL
- F24H9/00—Details
- F24H9/20—Arrangement or mounting of control or safety devices
- F24H9/2007—Arrangement or mounting of control or safety devices for water heaters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/08—Fluids
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/06—Power analysis or power optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/08—Thermal analysis or thermal optimisation
Abstract
The application discloses a prediction method of water consumption of a water heater, the water heater and a storage medium. The method comprises the following steps: acquiring the historical water consumption of the water heater; inputting the historical water consumption of the water heater into a water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model; the water consumption prediction model is obtained by training by using the historical water consumption of the water heater corresponding to the training water consumption event as sample input data and the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data in advance, and in the training process of the water consumption prediction model, the difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization item of a loss function of the water consumption prediction model. By the method, the prediction accuracy can be improved, and the situation that a user breaks hot water in the water using process can be reduced.
Description
Technical Field
The invention relates to the technical field of water heaters, in particular to a method for predicting water consumption of a water heater, the water heater and a computer-readable storage medium.
Background
The water consumption behaviors of water heater users have strong periodicity, and are influenced by weather and holidays, the water consumption of the users is generally predicted by adopting a time sequence or a statistic-based mode in the traditional water consumption behavior prediction, but the mode usually faces two problems, namely that the historical water consumption of the users without the water flow sensor is not well predicted, and the difference of prediction errors in user experience is not considered.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a method for predicting water consumption of a water heater, the water heater and a computer-readable storage medium, which can improve prediction accuracy and reduce the situation that a user breaks hot water in the water using process.
In order to solve the technical problem, the application adopts a technical scheme that: a method for predicting water consumption of a water heater is provided, and the method comprises the following steps: and acquiring the historical water consumption of the water heater. Inputting the historical water consumption of the water heater into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model.
The water consumption prediction model is obtained by training by using the historical water consumption of the water heater corresponding to the training water consumption event as sample input data and the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data in advance, and in the training process of the water consumption prediction model, the difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization item of a loss function of the water consumption prediction model.
Further, inputting the historical water consumption of the water heater into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model comprises:
air temperature data and holiday data are acquired. And inputting the historical water consumption, the air temperature data and the data of the holidays of the water heater into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model.
The water consumption prediction model is obtained by adopting the historical water consumption, the air temperature data and the holiday data of the water heater corresponding to the training water consumption event as sample input data, adopting the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data and training based on a machine learning algorithm.
Further, the water consumption prediction model is established based on a linear regression equation.
The loss function comprises a first regularization term and a second regularization term, wherein the first regularization term is the square sum of coefficients in the linear regression equation, and the second regularization term is the difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater.
Further, the water consumption prediction model is:
the loss function is:
wherein, yiThe actual water usage of the water heater for the ith training water event,the predicted water consumption of the ith water heater is output by the water consumption prediction model, lambda and gamma are hyper-parameters, and lambda and gamma are>0, n is the total number of training water events, ajFor the jth coefficient of the linear regression equation, m represents the total of m coefficients of the linear regression equation.
Further, obtaining the historical water usage of the water heater comprises: and acquiring the historical water consumption of the water heater. And calculating the historical water consumption of the water heater according to the historical water consumption of the water heater.
Further, acquiring the historical water consumption of the water heater comprises the following steps: and acquiring the power consumption of the water in the historical barrel corresponding to the temperature rise of the water in the water heater. And calculating the historical water consumption of the water heater according to the historical water consumption in the bucket and the historical total power consumption of the water heater.
Further, acquire the water consumption in the history bucket that the water temperature rose and corresponds in the water heater, include: and calculating the power consumption of the water in the historical barrel corresponding to the rise of the water temperature in the water heater by using the initial temperature in the liner and the final temperature in the liner of the water heater.
Further, obtaining the power consumption W of the water in the historical barrel corresponding to the temperature rise of the water in the water heater according to the following formula1:
Wherein, TFinally, the product is processedIndicating the final temperature, T, in the tank of the water heaterInitialThe initial temperature in the container of the water heater is shown, and V represents the volume of the water heater.
Further, the historical water consumption amount W of the water heater is calculated according to the following formula2:
W2=K*W-W1
Wherein W represents the total historical power consumption of the water heater, K represents the loss coefficient, and W1And the power consumption of the water in the historical barrel corresponding to the temperature rise of the water in the water heater is shown.
Further, the historical water usage of the water heater is calculated according to the following formula:
wherein, TDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterIndicating the inlet water temperature, W, of the water heater2The power consumption of the water heater is shown in the history, and V is the volume of the water heater.
Further, after inputting the historical water consumption of the water heater into the water consumption prediction model and obtaining the predicted water consumption of the water heater output by the water consumption prediction model, the method further comprises the following steps: and carrying out extreme value correction on the obtained predicted water consumption of the water heater.
Further, the predicted water usage of the water heater is extremally corrected according to the following equation:
wherein, THighest point of the designIndicating the maximum temperature, T, allowed to be set by the water heaterDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterThe water inlet temperature of the water heater is shown, and V is the volume of the water heater.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a water heater comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the steps of the method being carried out when the computer program is executed by the processor.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned method.
The beneficial effect of this application is: the method is different from the situation of the prior art, the water consumption prediction model is constructed, and in the training process of the water consumption prediction model, the difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization item of the loss function of the water consumption prediction model. And finally, inputting the obtained historical water consumption of the water heater into a trained water consumption prediction model, and outputting to obtain the predicted water consumption of the water heater. By the mode, the situation that the water is cut off (hot water) when the user uses the water can be reduced, and the user experience is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for predicting water consumption of a water heater provided herein;
FIG. 2 is a flowchart illustrating one embodiment of step S10 of FIG. 1;
FIG. 3 is a schematic flow chart of one embodiment of step S11 in FIG. 2;
FIG. 4 is a schematic flow chart illustrating an embodiment of step S20 in FIG. 1;
FIG. 5 is a schematic block diagram of an embodiment of a water heater provided herein;
FIG. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The inventor of the application finds that the difference of prediction errors in user experience is not considered when the water consumption of a water heater user is predicted by the traditional method through long-term research, namely, the phenomenon that the user perception experience is worse when the predicted water consumption is smaller than the actual water consumption of the user is not considered. Therefore, the method for predicting the water consumption of the water heater is provided, and when a water consumption prediction model is established, the difference of prediction errors in user experience is taken into consideration as an important parameter.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an embodiment of a method for predicting water consumption of a water heater according to the present disclosure. As shown in fig. 1, the method comprises the steps of:
and step S10, acquiring the historical water consumption of the water heater.
In this step, the specific time when the user obtains the historical water consumption can be flexibly set according to the actual water consumption condition, and considering that the user has certain periodicity and habituation when using the electric water heater, the time when the user obtains the historical water consumption can be determined according to the use period or the use habit of the user, for example, the historical water consumption of one period or a plurality of periods closest to the day to be measured can be obtained. In addition, as can be seen from the big data of the water consumption of the user, the user has different water demands in different time periods of each day, for example, the water demand of most users in the time period from 19 o 'clock to 21 o' clock of each day is much higher than that of other time periods of the day. Therefore, the historical water consumption of the user in different periods can be acquired in different periods according to the water consumption habit of the user.
In addition, after the historical water consumption of the water heater is obtained, a plurality of historical water statistical characteristics about the historical water consumption can be calculated and obtained according to the obtained historical water consumption, such as the maximum value, the minimum value, the average value, the standard deviation and the like of the plurality of historical water consumption.
Optionally, the historical water usage statistics are input into a water usage prediction model, and a predicted water usage of the water heater output by the water usage prediction model is obtained.
In one embodiment, the following table shows the eight historical water usage statistics obtained for X1-X8.
Characteristic name | Feature generating aperture |
X1 | Average water consumption in the same time period of the first three days |
X2 | Maximum water consumption in the same time period of the first three days |
X3 | Minimum water consumption in the same time period of the first three days |
X4 | Standard deviation of water consumption in first three days and second time |
X5 | Average water consumption in the same period of the first three weeks and the same week |
X6 | Maximum water consumption in the same period of the first three weeks and the same week |
X7 | The first three weeks are the same as the week and the same time periodSmall water consumption |
X8 | Standard deviation of water consumption in same time period of first three weeks and same week |
In one embodiment, the water flow in the water using process of the user can be collected through a water flow sensor installed inside the water heater, and then the historical water using amount of the water heater can be obtained after the collected water flow is multiplied by the water using time length.
In another embodiment, considering that some current water heaters may not be provided with a water flow sensor for some reasons, and therefore the historical water consumption of the water heater without the water flow sensor is not estimated well, another way for obtaining the historical water consumption is provided. Referring to fig. 2, fig. 2 is a schematic flowchart illustrating an embodiment of step S10 in fig. 1. The method comprises the following steps of obtaining the historical water consumption of the water heater through the historical water consumption of the water heater, specifically:
step S11, obtaining the historical water consumption of the water heater, referring to fig. 3, fig. 3 is a flowchart of the step S11 in fig. 2. Specifically, step S11 may further include the following sub-steps:
and step S111, acquiring the power consumption of the water in the history barrel corresponding to the temperature rise of the water in the water heater.
In one embodiment, the historical amount of water consumed in the barrel corresponding to the increase in water temperature in the water heater may be calculated using the initial and final internal bladder temperatures of the water heater. Specifically, the power consumption W of the water in the historical barrel corresponding to the temperature rise of the water in the water heater can be obtained according to the following formula1:
Wherein, TFinally, the product is processedIndicating the final temperature, T, in the tank of the water heaterInitialIndicating the initial in-bladder temperature of the water heater,v denotes the volume of the water heater.
It can be understood that the final tank temperature and the initial tank temperature of the water heater both represent the temperature of the water in the tank of the water heater and can be obtained by a temperature sensor in the tank.
And step S112, calculating the historical water consumption of the water heater according to the historical water consumption of the water in the historical barrel and the historical total power consumption of the water heater. It can be understood that one part of the historical total power consumption of the water heater is used for heating the water in the water heater liner, namely the power consumption of the water in the historical barrel corresponding to the rise of the water temperature in the water heater, and the other part of the historical total power consumption of the water heater is used for heating the historical water consumption used by the user, namely the power consumption of the historical water, so the historical water power consumption W of the water heater can be calculated according to the following formula2:
W2=K*W-W1
Wherein W represents the total historical power consumption of the water heater, K represents the loss coefficient, and W1And the power consumption of the water in the historical barrel corresponding to the temperature rise of the water in the water heater is shown.
And step S12, calculating the historical water consumption of the water heater according to the historical water consumption of the water heater.
The historical water consumption of the water heater can be calculated according to the following formula:
wherein, TDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterIndicating the inlet water temperature, W, of the water heater2The power consumption of the water heater is shown in the history, and V is the volume of the water heater.
By the mode, the historical water consumption of the water heater can be calculated by utilizing the historical water consumption, and the problem that the historical water consumption of the water heater cannot be obtained due to the fact that some sensors are not provided with water flow sensors in the market can be solved.
And step S20, inputting the historical water consumption of the water heater into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model.
Optionally, the water consumption prediction model is obtained by using the historical water consumption of the water heater corresponding to the training water consumption event as sample input data in advance, using the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data, and training based on a machine learning algorithm, wherein in the training process of the water consumption prediction model, a difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization term of a loss function of the water consumption prediction model.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating an embodiment of step S20 in fig. 1. Specifically, step S20 may include the following sub-steps:
step S21: a training water event is obtained.
When the water consumption prediction model is established, a preset number of training water events (for example, 150 ten thousand training water events) need to be established, where the established training water events can be training water events established from water heaters equipped with water flow sensors or other water flow measuring devices, and need to correspond to a certain actual water consumption.
Step S22: and constructing a water consumption prediction model based on a machine learning algorithm by utilizing the training water consumption event.
And (3) taking the historical water consumption corresponding to each training water use event as sample input data, taking the predicted water use information corresponding to each training water use event output by the water use prediction model as sample output data, and performing model training based on a machine learning algorithm to obtain a water use prediction model.
Optionally, a water consumption prediction model is established based on a linear regression equation, and the water consumption prediction model is as follows:
wherein, Xi(i ═ 1, … …, m) is the ith historical water usage characteristic, ai(i-1, … …, m) represents the ith historyAnd (5) a parameter to be measured corresponding to the water consumption characteristic.
Therefore, when the water consumption prediction model is established, the difference of the prediction error in the user experience is taken into consideration as an important parameter. That is, in the training process of the water consumption prediction model, the difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization item of a loss function of the water consumption prediction model, and by the method, the predicted water consumption can be larger than the actual water consumption of a user as much as possible on the basis that the predicted water consumption is close to the actual water consumption of the user as much as possible, so that the embarrassing situation that the user does not have hot water suddenly in the water consumption process is avoided, and the user experience is improved.
Optionally, the constructed loss function includes a first regularization term, a second regularization term, the first regularization term being the sum of squares of coefficients in a linear regression equation, i.e., the first regularization term is a function of the first regularization term and the second regularization term
The second regularization term is the difference between the actual water consumption of the water heater minus the predicted water consumption of the water heater, i.e.
Specifically, the loss function is constructed as:
wherein, yiThe actual water usage of the water heater for the ith training water event,the predicted water consumption of the ith water heater is output by the water consumption prediction model, lambda and gamma are hyper-parameters, and lambda and gamma are>0, n is the total number of training water events, ajFor the jth coefficient of the linear regression equation, m represents m lines of the linear regression equationAnd (4) counting. In the training process, the closer the loss function E is to zero, the more accurate the water consumption prediction model representing the training is, and the smaller the loss function E is, the larger the water consumption prediction quantity output by the water consumption prediction model is, the more the actual water consumption of the water heater is, so that the situation of meeting hot water shortage can be reduced in the process of using the water heater by a user, and the user experience is improved.
Step S23: inputting the historical water consumption of the water heater into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model.
Alternatively, considering that the water consumption behavior of the water heater user not only has strong periodicity, but also is influenced by weather and holidays, the temperature data and the holiday data can be respectively used as one or more characteristics when the water consumption prediction model is established and used for training the water consumption prediction model by combining the historical water consumption of the water heater.
It is to be understood that the temperature data represents temperature data of the region where the water heater is located, and a plurality of temperature data may be acquired, such as the highest temperature of the region where the current day is located, the lowest temperature of the region where the current day is located, the average temperature of the region where the current day is located, the highest temperature of the region where the current day is located-the lowest temperature of the region where the current day is located, and the like, without being particularly limited thereto. Alternatively, the temperature data can be obtained in various ways, such as obtaining the temperature data through a weather APP of the mobile terminal, or obtaining the temperature data through a weather forecast of a TV terminal, and the like.
For example, the acquired air temperature data Feature1-Feature8 are shown in the following table.
The holiday data represents whether the day corresponding to the actual water consumption is a holiday or not when the water consumption prediction model is trained, for example, if the day corresponding to the actual water consumption is a holiday, the holiday data of the actual water consumption corresponding to the training water consumption event is 1, otherwise, the holiday data is 0.
Specifically, when the water consumption prediction model is trained, historical water consumption, air temperature data and holiday data of a water heater corresponding to a training water consumption event are used as sample input data, the predicted water consumption of the water heater corresponding to the training water consumption event is used as sample output data, and the water consumption prediction model is obtained by training based on a machine learning algorithm.
Specifically, a water consumption prediction model is established based on a linear regression equation, and the water consumption prediction model is as follows:
wherein, Xi(i ═ 1, … …, m) is the ith historical water usage characteristic, aiAnd (i-1, … …, x) represents a parameter to be measured corresponding to the ith historical water consumption characteristic. ZjRepresents the jth air temperature data, biAnd C represents the parameter to be measured corresponding to the holiday data.
Similarly, the loss function is constructed as follows:
wherein, yiThe actual water usage of the water heater for the ith training water event,the predicted water consumption of the ith water heater is output by the water consumption prediction model, lambda and gamma are hyper-parameters, and lambda and gamma are>0, n is the total number of training water events.
Similarly, after the water consumption prediction model is trained, the predicted water consumption of the water heater output by the water consumption prediction model can be obtained only by inputting the historical water consumption of the water heater, the air temperature data of the day to be measured and the holiday data of the day to be measured into the water consumption prediction model.
In this embodiment, in order to avoid the situation that the established water consumption prediction model has an abnormal extreme value with respect to the prediction of the predicted water consumption, the upper and lower limits of the predicted water consumption output by the model can be limited, so that the prediction result of the model can better meet the actual situation.
Specifically, for safety reasons, a maximum temperature allowed to be set exists in a common water heater, and therefore, the extreme value can be set and corrected based on the maximum temperature allowed to be set in the water heater. Specifically, the predicted water usage of the water heater may be extremally corrected according to the following equation:
wherein, THighest point of the designIndicating the maximum temperature, T, allowed to be set by the water heaterDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterThe water inlet temperature of the water heater is shown, and V is the volume of the water heater.
Different types, different brands of water heaters may have different set maximum temperatures. For example, the maximum set temperature of a storage type electric water heater is mostly about 75 degrees, the instantaneous electric water heater is about 80 degrees, the maximum set water temperature of an air energy water heater without an auxiliary electric heating function is about 60 degrees, and the gas water heater is lower.
In general, the appropriate sensible temperature of water is set to be between 37 and 42 degrees, and the water inlet temperature of the water heater can be replaced by the water temperature of a cold water pipe at the position of the water heater equipment.
The meaning of this formula is: if the output predicted water consumption of the water heater is more than or equal to 0 and less than or equal toThe predicted water usage is taken as the final predicted water usage. If the predicted water consumption is more thanThen will beAs the final predicted water consumption, if the predicted water consumption is less than 0, the final predicted water consumption is 0.
Generally, the water consumption habits of users in the same time period of each day are similar, and therefore, in a specific embodiment, the water consumption prediction method for the water heater provided by the embodiment can establish a water consumption prediction model corresponding to each time period according to the historical water consumption corresponding to each time period, and obtain the predicted water consumption of each time period of the day to be measured in time periods. For example, to predict the predicted water consumption of a water heater on a certain day in the future, the 24 hours of the day can be divided into 24 time periods according to the whole point, the historical water consumption of the water heater corresponding to each time period is respectively obtained, a water consumption prediction model corresponding to each time period is established, the predicted water consumption corresponding to each time period is finally obtained, and the predicted water consumption corresponding to the 24 time periods is combined, so that the predicted water consumption of the certain day in the future can be obtained.
The application provides a water consumption prediction method for a water heater, a water consumption prediction model is constructed, and in the training process of the water consumption prediction model, a difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization term of a loss function of the water consumption prediction model. And finally, inputting the obtained historical water consumption of the water heater into a trained water consumption prediction model, and outputting to obtain the predicted water consumption of the water heater. By the mode, the situation that the water is cut off (hot water) when the user uses the water can be reduced, and the user experience is further improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of the water heater 100 provided by the present application, where the water heater 100 includes a memory 110 and a processor 120, where the memory 110 is used for storing a computer program, and the processor 120 is used for executing the computer program to implement the steps of the method for predicting water consumption of the water heater 100 provided by the present application. For example, the water heater 100 is used to implement the following steps: the historical water usage of the water heater 100 is obtained. The historical water consumption of the water heater 100 is input into the water consumption prediction model, and the predicted water consumption of the water heater 100 output by the water consumption prediction model is obtained. The water consumption prediction model is obtained by training by using the historical water consumption of the water heater 100 corresponding to the training water consumption event as sample input data and the predicted water consumption of the water heater 100 corresponding to the training water consumption event as sample output data in advance, and in the training process of the water consumption prediction model, a difference value obtained by subtracting the predicted water consumption of the water heater 100 from the actual water consumption of the water heater 100 is used as a regularization term of a loss function of the water consumption prediction model. The processor 120 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application.
The memory 110 is for executable instructions. Memory 110 may comprise high-speed RAM memory 110, and may also include non-volatile memory 110 (e.g., at least one disk memory). The memory 110 may also be a memory array. The storage 110 may also be partitioned, and the blocks may be combined into virtual volumes according to certain rules. The instructions stored by the memory 110 are executable by the processor 120 to enable the processor 120 to perform a method of predicting water usage by the water heater 100 in any of the method embodiments described above.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 200 has a computer program 201 stored thereon, and the computer program 201, when executed by a processor, implements the steps of the method for predicting water consumption of a water heater 100 provided herein. For example, the computer program 201, when executed by a processor, implements the steps of: the historical water usage of the water heater 100 is obtained. The historical water consumption of the water heater 100 is input into the water consumption prediction model, and the predicted water consumption of the water heater 100 output by the water consumption prediction model is obtained. The water consumption prediction model is obtained by training by using the historical water consumption of the water heater 100 corresponding to the training water consumption event as sample input data and the predicted water consumption of the water heater 100 corresponding to the training water consumption event as sample output data in advance, and in the training process of the water consumption prediction model, the difference value obtained by subtracting the predicted water consumption of the water heater 100 from the actual water consumption of the water heater 100 is used as a regularization term of a loss function of the water consumption prediction model. The computer storage medium 200 may be any available media or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory 110(NANDFLASH), Solid State Disks (SSDs)), etc.
In summary, the present application provides a method for predicting water consumption of a water heater 100, wherein a water consumption prediction model is constructed, and in the training process of the water consumption prediction model, a difference obtained by subtracting the predicted water consumption of the water heater 100 from the actual water consumption of the water heater 100 is used as a regularization term of a loss function of the water consumption prediction model. And finally, inputting the obtained historical water consumption of the water heater 100 into a trained water consumption prediction model, and outputting to obtain the predicted water consumption of the water heater 100. By the mode, the situation that the water is cut off (hot water) when the user uses the water can be reduced, and the user experience is further improved.
The above embodiments are only specific embodiments in the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can understand that the modifications or substitutions within the technical scope disclosed in the present application are all covered by the scope of the present application, and therefore, the scope of the present application should be subject to the protection scope of the claims.
Furthermore, in the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Claims (14)
1. A method for predicting water usage by a water heater, the method comprising:
acquiring the historical water consumption of the water heater;
inputting the historical water consumption of the water heater into a water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model;
the water consumption prediction model is obtained by training by using the historical water consumption of the water heater corresponding to a training water consumption event as sample input data and the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data in advance, and in the training process of the water consumption prediction model, a difference value obtained by subtracting the predicted water consumption of the water heater from the actual water consumption of the water heater is used as a regularization term of a loss function of the water consumption prediction model.
2. The method of claim 1, wherein inputting the historical water usage of the water heater into a water usage prediction model and obtaining the predicted water usage of the water heater output by the water usage prediction model comprises:
acquiring air temperature data and holiday data;
inputting the historical water consumption of the water heater, the air temperature data and the holiday data into the water consumption prediction model, and obtaining the predicted water consumption of the water heater output by the water consumption prediction model;
the water consumption prediction model is obtained by using the historical water consumption, the air temperature data and the holiday data of the water heater corresponding to the training water event as sample input data, using the predicted water consumption of the water heater corresponding to the training water event as sample output data and training based on the machine learning algorithm.
3. The method of claim 1,
the water consumption prediction model is established based on a linear regression equation;
the loss function comprises a first regularization term and a second regularization term, wherein the first regularization term is the sum of squares of coefficients in the linear regression equation, and the second regularization term is a difference value obtained by subtracting a predicted water consumption of the water heater from an actual water consumption of the water heater.
4. The method of claim 3,
the water consumption prediction model comprises the following steps:
the loss function is:
wherein, yiThe actual water consumption of the water heater corresponding to the ith training water consumption event,the predicted water consumption of the ith water heater output by the water consumption prediction model, lambda and gamma are hyper-parameters, and lambda and gamma are>0, n is the total number of the training water events, ajFor the jth coefficient of the linear regression equation, m represents that the linear regression equation has m coefficients.
5. The method of claim 1,
the acquiring the historical water consumption of the water heater comprises the following steps:
acquiring historical water consumption of the water heater;
and calculating the historical water consumption of the water heater according to the historical water consumption of the water heater.
6. The method of claim 5,
the acquiring of the historical water consumption of the water heater comprises:
acquiring the power consumption of water in a historical barrel corresponding to the temperature rise of the water in the water heater;
and calculating the historical water consumption of the water heater according to the historical bucket water consumption and the historical total power consumption of the water heater.
7. The method of claim 6, wherein obtaining the historical amount of power consumption of water in the barrel corresponding to the temperature increase of water in the water heater comprises:
and calculating the power consumption of the water in the historical barrel corresponding to the rise of the water temperature in the water heater by using the initial temperature in the liner and the final temperature in the liner of the water heater.
8. The method according to claim 7, wherein the historical water power consumption W corresponding to the temperature rise of the water in the water heater is obtained according to the following formula1:
Wherein, TFinally, the product is processedIndicating the final tank temperature, T, of the water heaterInitialRepresents the initial in-tank temperature of the water heater and V represents the volume of the water heater.
9. The method of claim 7, wherein the historical water consumption amount W of the water heater is calculated according to the following formula2:
W2=K*W-W1
Wherein W represents the historical total power consumption of the water heater, K represents the loss coefficient, and W1And representing the power consumption of the water in the historical barrel corresponding to the temperature rise of the water in the water heater.
10. The method of claim 7, wherein the historical water usage of the water heater is calculated according to the formula:
wherein, TDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterIndicating the inlet water temperature, W, of said water heater2Representing the historical water consumption of the water heater and V representing the volume of the water heater.
11. The method of claim 1, wherein after inputting the historical water usage of the water heater into the water usage prediction model and obtaining the predicted water usage of the water heater output by the water usage prediction model, the method further comprises:
and carrying out extreme value correction on the obtained predicted water consumption of the water heater.
12. The method of claim 11, wherein the predicted water usage of the water heater is extremally corrected according to the following equation:
wherein, THighest point of the designIndicates the maximum temperature, T, allowed to be set by the water heaterDischarging waterShows the appropriate sensible temperature, T, of waterInflow waterRepresents the inlet water temperature of the water heater and V represents the volume of the water heater.
13. A water heater comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011225066.2A CN112446169A (en) | 2020-11-05 | 2020-11-05 | Water heater water consumption prediction method, water heater and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011225066.2A CN112446169A (en) | 2020-11-05 | 2020-11-05 | Water heater water consumption prediction method, water heater and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112446169A true CN112446169A (en) | 2021-03-05 |
Family
ID=74736289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011225066.2A Pending CN112446169A (en) | 2020-11-05 | 2020-11-05 | Water heater water consumption prediction method, water heater and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112446169A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114094570A (en) * | 2021-11-05 | 2022-02-25 | 国能浙江余姚燃气发电有限责任公司 | Method and device for predicting power generation gas consumption of gas turbine unit |
CN114396728A (en) * | 2021-12-29 | 2022-04-26 | 广东万和新电气股份有限公司 | Heating control method of electric water heater and establishment method of effective energy consumption prediction model |
EP3995747A1 (en) * | 2020-11-05 | 2022-05-11 | Midea Group Co., Ltd. | Method for setting temperature of water heater, water heater and non-transitorycomputer readable storage medium |
CN115164416A (en) * | 2022-06-30 | 2022-10-11 | 青岛海尔空调电子有限公司 | Method and device for controlling water heater, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106839468A (en) * | 2017-04-14 | 2017-06-13 | 广州机智云物联网科技有限公司 | A kind of solar water heater runoff investigation method and system |
CN107655212A (en) * | 2017-09-29 | 2018-02-02 | 深圳和而泰智能控制股份有限公司 | Heating treatment method and device |
CN109086912A (en) * | 2018-07-11 | 2018-12-25 | 东北大学 | A kind of intelligent appliance user's behavior prediction method and apparatus based on LSTM |
CN110530035A (en) * | 2019-09-17 | 2019-12-03 | 美的集团股份有限公司 | Water heater autocontrol method and device, water heater and electronic equipment |
US10497250B1 (en) * | 2017-09-27 | 2019-12-03 | State Farm Mutual Automobile Insurance Company | Real property monitoring systems and methods for detecting damage and other conditions |
-
2020
- 2020-11-05 CN CN202011225066.2A patent/CN112446169A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106839468A (en) * | 2017-04-14 | 2017-06-13 | 广州机智云物联网科技有限公司 | A kind of solar water heater runoff investigation method and system |
US10497250B1 (en) * | 2017-09-27 | 2019-12-03 | State Farm Mutual Automobile Insurance Company | Real property monitoring systems and methods for detecting damage and other conditions |
CN107655212A (en) * | 2017-09-29 | 2018-02-02 | 深圳和而泰智能控制股份有限公司 | Heating treatment method and device |
CN109086912A (en) * | 2018-07-11 | 2018-12-25 | 东北大学 | A kind of intelligent appliance user's behavior prediction method and apparatus based on LSTM |
CN110530035A (en) * | 2019-09-17 | 2019-12-03 | 美的集团股份有限公司 | Water heater autocontrol method and device, water heater and electronic equipment |
Non-Patent Citations (1)
Title |
---|
陈庆明;钟益明;孙颖楷;: "储水式电热水器的剩余洗浴时间预报系统", 日用电器, no. 08, 25 August 2018 (2018-08-25) * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3995747A1 (en) * | 2020-11-05 | 2022-05-11 | Midea Group Co., Ltd. | Method for setting temperature of water heater, water heater and non-transitorycomputer readable storage medium |
CN114094570A (en) * | 2021-11-05 | 2022-02-25 | 国能浙江余姚燃气发电有限责任公司 | Method and device for predicting power generation gas consumption of gas turbine unit |
CN114396728A (en) * | 2021-12-29 | 2022-04-26 | 广东万和新电气股份有限公司 | Heating control method of electric water heater and establishment method of effective energy consumption prediction model |
CN114396728B (en) * | 2021-12-29 | 2024-03-15 | 广东万和新电气股份有限公司 | Heating control method of electric water heater and establishing method of effective energy consumption prediction model |
CN115164416A (en) * | 2022-06-30 | 2022-10-11 | 青岛海尔空调电子有限公司 | Method and device for controlling water heater, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112446169A (en) | Water heater water consumption prediction method, water heater and storage medium | |
JP4920703B2 (en) | System, method, and product for determining estimated combined battery condition-parameter vectors | |
TWI592811B (en) | Demand forecast device, program and recording medium | |
CN112150311B (en) | Method, device, computer equipment and storage medium for detecting abnormal energy consumption state | |
CN110530035B (en) | Automatic control method and device for water heater, water heater and electronic equipment | |
CN112330077B (en) | Power load prediction method, power load prediction device, computer equipment and storage medium | |
CN109146236A (en) | Indexes Abnormality detection method, device, readable storage medium storing program for executing and electronic equipment | |
CN106249168A (en) | A kind of battery curve modification method and device | |
Mohammad Ashrafi | Two-stage metaheuristic mixed integer nonlinear programming approach to extract optimum hedging rules for multireservoir systems | |
CN114611845B (en) | Method and device for predicting carbon emission, electronic device, and medium | |
CN110598336B (en) | Water consumption prediction method and device for water heater, water heater and electronic equipment | |
CN111143777A (en) | Data processing method and device, intelligent terminal and storage medium | |
JP2007032879A (en) | Thermal load predicting device and thermal load predicting method | |
CN114459160A (en) | Water heater temperature setting method, water heater and storage medium | |
CN114528747A (en) | Water heater water consumption prediction method, water heater and storage medium | |
Ekström et al. | Recovering a time-homogeneous stock price process from perpetual option prices | |
Guigues | Robust production management | |
CN108767854B (en) | Electricity purchase scheme optimization method and device and electronic equipment | |
KR102083248B1 (en) | Calculation method of the reservoir operating rules using robust optimization | |
CN113991711B (en) | Capacity configuration method for energy storage system of photovoltaic power station | |
CN116295902A (en) | Method and device for detecting environmental temperature of electronic equipment | |
CN116720742A (en) | Carbon emission prediction method and prediction system | |
CN114036723A (en) | Method, device, equipment and storage medium for predicting running state of comprehensive energy system | |
CN115759336A (en) | Prediction method and storage medium for short-term power load prediction | |
JP2016127622A (en) | Power demand prediction system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |