Water heater water consumption prediction method, water heater and storage medium

By training the water consumption prediction model and using the loss function regularization term, the problem of prediction error in the traditional water heater water consumption prediction method is solved, and the prediction accuracy and user experience are improved.

CN114528747BActive Publication Date: 2025-06-06MIDEA GROUP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011226101.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-05
Publication Date
2025-06-06
Estimated Expiration
2040-11-05

AI Technical Summary

Technical Problem

The traditional water heater water consumption prediction method has prediction errors, especially when the user's water temperature is different, which leads to inaccurate prediction of water consumption and affects the user experience.

Method used

By obtaining the historical water consumption of the water heater, the water consumption prediction model is trained, and during the model training process, the actual water consumption is subtracted from the difference in the predicted water consumption as the regularization term of the loss function to improve the prediction accuracy.

Benefits of technology

It improves the accuracy of the prediction of water consumption of water heaters, reduces the situation where users encounter water cuts (hot water) during water use, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528747B_ABST
    Figure CN114528747B_ABST
Patent Text Reader

Abstract

The present application discloses a method for predicting the water consumption of a water heater, a water heater and a storage medium. The method comprises: obtaining 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; wherein the water consumption prediction model is obtained by pre-training using the historical water consumption of the water heater corresponding to the training water use event as sample input data, and using the predicted water consumption of the water heater corresponding to the training water use event as sample output data. In this way, the prediction accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of water heaters, and in particular to a method for predicting water consumption of a water heater, a water heater, and a computer-readable storage medium. Background Art

[0002] The water usage behavior of water heater users is highly cyclical and is also affected by factors such as weather and holidays. Traditional water usage behavior prediction generally uses time series or statistical methods to predict users' water consumption. However, this method usually faces two problems. First, it is difficult to predict the historical water consumption of users without water flow sensors. Second, it does not take into account the difference in user experience caused by prediction errors. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a method for predicting the water consumption of a water heater, a water heater and a computer-readable storage medium, which can improve the prediction accuracy.

[0004] In order to solve the above technical problems, a technical solution adopted by the present application is: to provide a method for predicting the water consumption of a water heater, the method comprising: obtaining 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 pre-training using the historical water consumption of the water heater corresponding to the training water use event as sample input data, and using the predicted water consumption of the water heater corresponding to the training water use event as sample output data.

[0005] Furthermore, during the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater is used as a regularization term of the loss function of the water consumption prediction model.

[0006] Furthermore, the historical water consumption of the water heater is input into the water consumption prediction model, and the predicted water consumption of the water heater output by the water consumption prediction model is obtained, including: obtaining temperature data and holiday data. The historical water consumption, temperature data and holiday data of the water heater are input into the water consumption prediction model, and the predicted water consumption of the water heater output by the water consumption prediction model is obtained. Among them, the water consumption prediction model is trained in advance using the historical water consumption, temperature data and holiday data of the water heater corresponding to the training water use event as sample input data, and the predicted water consumption of the water heater corresponding to the training water use event as sample output data.

[0007] Furthermore, the water consumption prediction model is established based on the linear regression equation. The loss function includes 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 between the actual water consumption of the water heater and the predicted water consumption of the water heater.

[0008] Furthermore, the water consumption prediction model is:

[0009]

[0010] The loss function is:

[0011]

[0012] Among them, y i is the actual water consumption of the water heater corresponding to the i-th training water use event, The predicted water consumption of the water heater corresponding to the i-th training water consumption event output by the water consumption prediction model is λ and γ, which are hyper parameters, λ,γ>0, m is the total number of training water consumption events, and a j is the jth coefficient of the linear regression equation, and t means that the linear regression equation has t coefficients in total.

[0013] Further, obtaining the historical water consumption of the water heater includes: obtaining the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater, and calculating the historical water consumption of the water heater according to the historical water consumption in the water tank and the historical total power consumption of the water heater.

[0014] Furthermore, the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater is obtained, including: using the initial tank temperature and the final tank temperature of the water heater to calculate the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater.

[0015] Furthermore, the historical water consumption W in the water tank corresponding to the increase in water temperature in the water heater is obtained according to the following formula: 1 :

[0016]

[0017] Among them, T 最终 Indicates the final temperature inside the water heater, T 初始 It indicates the initial temperature inside the water heater, and V indicates the volume of the water heater.

[0018] Furthermore, the historical water consumption of the water heater W is calculated according to the following formula: 2 :

[0019] W 2 =K*WW 1

[0020] Where W represents the total historical power consumption of the water heater, K represents the loss coefficient, and W 1 Indicates the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater.

[0021] Furthermore, 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, it also includes: performing extreme value correction on the obtained predicted water consumption of the water heater.

[0022] Furthermore, the predicted water consumption of the water heater is corrected for extreme values ​​according to the following formula:

[0023]

[0024] Among them, T 最高 Indicates the maximum temperature allowed for the water heater, T 出水 Indicates the appropriate body temperature for water use, T 进水 It indicates the water inlet temperature of the water heater, and V indicates the volume of the water heater.

[0025] To solve the above technical problems, another technical solution adopted in the present application is: to provide a water heater, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the steps of the above method are implemented when the processor executes the computer program.

[0026] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a computer-readable storage medium, the computer-readable storage medium storing a computer program, and the computer program implements the steps of the above method when executed by a processor.

[0027] The beneficial effect of the present application is: different from the prior art, the present application provides a water heater water consumption prediction method that uses the historical water and electricity consumption of the water heater to train a water consumption prediction model. In this way, the error in predicting water consumption caused by different water temperatures of users can be avoided, thereby improving the accuracy of water consumption prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 It is a flow chart of an implementation method of a method for predicting water consumption of a water heater provided by the present application;

[0030] Figure 2 yes Figure 1 A flowchart of a specific implementation method of step S10;

[0031] Figure 3 yes Figure 1 A schematic diagram of a flow chart of an implementation method of step S20;

[0032] Figure 4 It is a structural schematic diagram of an embodiment of a water heater provided by the present application;

[0033] Figure 5 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0036] The inventor of the present application has found through long-term research that traditional electric water heaters usually use the user's historical water consumption to obtain the user's predicted water consumption. However, due to the fluctuation of the water temperature of the user's water, the prediction of the historical water consumption inevitably has a certain error. The use of historical water consumption to predict future water consumption will lead to the amplification of this error, which may eventually affect the effect of the model. Therefore, this embodiment uses the historical water consumption of the water heater as the input feature of the preset water consumption prediction model, which can effectively avoid the above-mentioned drawbacks and make the predicted water consumption of the water heater more accurate. In addition, in this way, it is also possible to cleverly avoid the disadvantage that some current water heaters may not be equipped with water flow sensors for some reasons, and the historical water consumption of water heaters without water flow sensors is difficult to predict.

[0037] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a method for predicting water consumption of a water heater provided in this application. Figure 1 As shown, the method comprises the following steps:

[0038] Step S10: Obtain the historical water and electricity consumption of the water heater.

[0039] In this step, in this embodiment, the so-called historical water consumption of the water heater actually refers to the historical water consumption of the user. The specific acquisition time of the user's historical water consumption can be flexibly set according to the actual water use situation. Considering that the user has a certain periodicity and habit in using the electric water heater, the historical water consumption when to obtain is determined according to the user's usage cycle or usage habits. For example, the historical water consumption of one or more cycles closest to the day to be measured can be obtained. In addition, it can be seen from the big data of user water use that users have different water needs at different times of each day. For example, most users have a much higher water demand in the time period from 19:00 to 21:00 every day than in other time periods of the day. Therefore, the historical water consumption of users in different time periods can be obtained in different time periods according to the user's water use habits.

[0040] In addition, after obtaining the historical water consumption of the water heater, several historical power consumption statistical characteristics about these historical water consumption can be calculated based on the obtained historical water consumption, for example, the maximum value, minimum value, mean value, standard deviation, etc. of multiple historical water consumption.

[0041] Optionally, these historical power consumption statistical features are input into a water consumption prediction model, and the predicted water consumption of the water heater output by the water consumption prediction model is obtained.

[0042] In a specific implementation, as shown in the following table, the following table obtains a total of eight historical power consumption statistical features Feature1-Feature8.

[0043]

[0044]

[0045] See also Figure 2 , Figure 2 yes Figure 1 FIG. 1 is a flow chart of a specific implementation method of step S10.

[0046] Specifically, step S10 may include the following sub-steps:

[0047] Step S11: Obtain the historical power consumption of the water in the water tank corresponding to the increase in water temperature in the water heater.

[0048] In a specific implementation, the initial tank temperature and the final tank temperature of the water heater can be used to calculate the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater. Specifically, the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater can be obtained according to the following formula: 1 :

[0049]

[0050] Among them, T 最终 Indicates the final temperature inside the water heater, T 初始 It indicates the initial temperature inside the water heater, and V indicates the volume of the water heater.

[0051] 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, which can be obtained through the temperature sensor in the tank, and will not be described in detail here.

[0052] Step S12: Calculate the historical water consumption of the water heater according to the historical water consumption in the barrel and the historical total power consumption of the water heater.

[0053] Optionally, the water heater is equipped with a water heater control device. After the water heater is turned on, the water heater obtains the amount of electricity consumed by the water heater in this operation in real time or at a fixed time through the built-in water heater control device. For example, the water heater is pre-connected to a corresponding electric meter device, wherein the electric meter device includes but is not limited to a smart socket, etc. After the water heater is turned on, the amount of electricity consumed by the water heater in this operation is collected through the electric meter device, and the water heater control device obtains the amount of electricity consumed by the water heater in this operation collected by the electric meter device.

[0054] In this embodiment, the historical total power consumption of the water heater can be obtained in the above manner. Of course, the historical power consumption of the water heater in this embodiment can also be obtained in other ways, which are not specifically limited here.

[0055] It can be understood that part of the total historical power consumption of the water heater is used to heat the water in the water heater tank, that is, the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater, and the other part is used to heat the historical water consumption used by the user, that is, the historical water consumption. Therefore, the historical water consumption of the water heater can be calculated according to the following formula W: 2 :

[0056] W 2 =K*WW 1 ,

[0057] Where W represents the total historical power consumption of the water heater, K represents the loss coefficient, and W 1 Indicates the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater.

[0058] Step S20: input the historical water consumption of the water heater into the water consumption prediction model, and obtain the predicted water consumption of the water heater output by the water consumption prediction model.

[0059] The inventor of this application has found through long-term research that the traditional method has not considered the difference in user experience caused by prediction error when predicting the water consumption of water heater users, that is, it has not considered the phenomenon that the user's perceived experience is worse when the predicted water consumption is less than the user's actual water consumption. Therefore, a method for predicting water consumption of water heaters is proposed, which can take the difference in user experience caused by prediction error into account as an important parameter when establishing a water consumption prediction model.

[0060] Optionally, the water consumption prediction model is obtained by training in advance using the historical water consumption of the water heater corresponding to the training water consumption event as sample input data, and using the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data.

[0061] Optionally, during the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater is used as a regularization term of the loss function of the water consumption prediction model.

[0062] Optionally, the water consumption prediction model of this embodiment is obtained based on machine learning training.

[0063] See also Figure 3 , Figure 3 yes Figure 1 Schematic diagram of a flow chart of an implementation method of step S20 in FIG. Specifically, step S20 may include the following sub-steps:

[0064] Step S21: Obtain training water use events.

[0065] When establishing a water consumption prediction model, it is necessary to first construct a preset number of training water use events (for example, pre-construct 1.5 million training water use events), and the constructed training water use events here need to correspond to a certain actual water consumption.

[0066] Step S22: Using training water usage events, a water consumption prediction model is constructed based on a machine learning algorithm.

[0067] The historical water consumption of the water heater corresponding to each training water use event is used as sample input data, and the predicted water consumption information corresponding to each training water use event output by the water consumption prediction model is used as sample output data. Model training is performed based on the machine learning algorithm to obtain a water consumption prediction model.

[0068] Optionally, a water consumption prediction model is established based on a linear regression equation. The water consumption prediction model is:

[0069]

[0070] Among them, X i(i=1, ..., m) is the historical water consumption (or historical power consumption statistical characteristics) of the i-th water heater, a i (i=1, ..., m) represents the measured parameter corresponding to the historical water and electricity consumption (or historical electricity consumption statistical characteristics) of the i-th water heater.

[0071] As mentioned above, the water consumption prediction method for water heaters provided in the present application takes the difference in prediction error in user experience into consideration as an important parameter when establishing a water consumption prediction model. That is, in the training process of the water consumption prediction model, the difference 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 the loss function of the water consumption prediction model. In this way, the predicted water consumption can be made as close as possible to the actual water consumption of the user, while the predicted water consumption is made as greater as possible than the actual water consumption of the user, so as to avoid the embarrassing situation that the user suddenly runs out of hot water during the water use process, thereby improving the user experience.

[0072] Optionally, the constructed loss function includes a first regularization term and a second regularization term, and the first regularization term is the sum of squares of coefficients in the linear regression equation, that is,

[0073] The second regularization term is the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater, that is,

[0074] Specifically, the loss function is constructed as:

[0075]

[0076] Among them, y i is the actual water consumption of the water heater corresponding to the i-th training water use event, The predicted water consumption of the water heater corresponding to the i-th training water consumption event output by the water consumption prediction model is λ and γ, which are hyper parameters, λ,γ>0, m is the total number of training water consumption events, and a j is the jth coefficient of the linear regression equation, and t indicates that the linear regression equation has a total of t coefficients. During the training process, the closer the loss function E is to zero, the more accurate the trained water consumption prediction model is, and the smaller the loss function E is, the greater the water consumption prediction output by the water consumption prediction model is than the actual water consumption of the water heater.

[0077] This embodiment constructs a water consumption prediction model. During the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater is used as a regularization term of the loss function of the water consumption prediction model. Finally, the historical water consumption of the water heater is input into the trained water consumption prediction model, and the predicted water consumption of the water heater is output. In this way, the user can reduce the situation of water (hot water) outage during water use, thereby improving the user experience.

[0078] Step S23: inputting the historical water consumption and electricity 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.

[0079] Optionally, considering that the water consumption behavior of water heater users is not only highly periodic but also affected by weather and holidays, temperature data and holiday data can be used as one or more features when establishing a water consumption prediction model, and used to train the water consumption prediction model in combination with the historical water and electricity consumption of the water heater.

[0080] It is understandable that the temperature data represents the temperature data of the area where the water heater is located, and multiple temperature data can be obtained, such as the highest temperature in the area on that day, the lowest temperature in the area on that day, the average temperature in the area on that day, the highest temperature in the area on that day-the lowest temperature in the area on that day, etc., without specific limitation here. Optionally, the temperature data can be obtained in a variety of ways, such as obtaining it through a weather APP on a mobile terminal, or obtaining temperature data through a TV weather forecast, etc.

[0081] For example, the acquired temperature data is shown in the following table.

[0082]

[0083]

[0084] It can be understood that when training the water consumption prediction model, holiday data indicates whether the day corresponding to the actual water consumption is a holiday. 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 set to 1, otherwise it is 0.

[0085] Specifically, when training the water consumption prediction model, the historical water consumption, temperature data and holiday data of the water heater corresponding to the training water consumption event are used as sample input data, and the predicted water consumption of the water heater corresponding to the training water consumption event is used as sample output data, and is trained based on the machine learning algorithm. During the training process of the water consumption prediction model, the difference obtained by subtracting the actual water consumption of the water heater from the predicted water consumption of the water heater is still used as a regularization term in the loss function of the water consumption prediction model.

[0086] Specifically, a water consumption prediction model is established based on the linear regression equation. The water consumption prediction model is:

[0087]

[0088] Among them, X i (i=1, ..., m) is the i-th historical water and electricity consumption (or historical electricity consumption statistical characteristics), a i (i=1, ..., x) represents the measured parameter corresponding to the i-th historical water and electricity consumption (or historical electricity consumption statistical characteristics). j represents the jth temperature data, b i represents the measured parameter corresponding to the j-th temperature data, C represents the holiday data, and c represents the measured parameter corresponding to the holiday data.

[0089] Similarly, the loss function is constructed as:

[0090]

[0091] Among them, y i is the actual water consumption of the water heater corresponding to the i-th training water use event, is the predicted water consumption of the i-th water heater output by the water consumption prediction model, λ and γ are hyperparameters, λ,γ>0, and n is the total number of training water consumption events.

[0092] Similarly, after the water consumption prediction model is trained, you only need to input the historical water consumption and electricity consumption of the water heater, the temperature data of the test day, and the holiday data of the test day into the water consumption prediction model to obtain the predicted water consumption of the water heater output by the water consumption prediction model.

[0093] In this embodiment, in order to avoid the situation where the water consumption prediction model established above predicts abnormal extreme values ​​about the predicted water consumption, the predicted water consumption output by the model can be subject to upper and lower limits. In this way, the prediction results of the model can be more in line with the actual situation.

[0094] Specifically, for safety reasons, a water heater generally has a maximum temperature that can be set. Therefore, an extreme value correction formula can be set based on the maximum temperature that can be set for the water heater. Specifically, the extreme value correction of the predicted water consumption of the water heater can be performed according to the following formula:

[0095]

[0096] Among them, T 最高 Indicates the maximum temperature allowed for the water heater, T 出水 Indicates the appropriate body temperature for water use, T 进水 It indicates the water inlet temperature of the water heater, and V indicates the volume of the water heater.

[0097] Different types and brands of water heaters have different maximum set temperatures. For example, the maximum set temperature of storage electric water heaters is mostly around 75 degrees, instant electric water heaters are around 80 degrees, and the maximum set water temperature of air-energy water heaters without auxiliary electric heating function is around 60 degrees, and gas water heaters are lower.

[0098] Generally speaking, the appropriate body temperature for water use is set between 37 and 42 degrees. The water inlet temperature of the water heater can be replaced by the water temperature of the cold water pipe where the water heater equipment is located.

[0099] The meaning of this formula is: if the predicted water consumption of the output water heater is greater than or equal to 0 and less than or equal to The predicted water consumption is used as the final predicted water consumption. Then As the final predicted water consumption, if the predicted water consumption is less than 0, the final predicted water consumption is 0.

[0100] Generally, users may have similar water usage habits during the same time period of each day. Therefore, in a specific implementation, the method for predicting the water consumption of a water heater provided in this embodiment can establish a water consumption prediction model corresponding to each time period based on the historical water consumption and electricity consumption corresponding to each time period, and obtain the predicted water consumption for each time period of the day to be tested by time period. 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 hour, and the historical water consumption and electricity consumption of the water heater corresponding to each time period can be obtained respectively, and a water consumption prediction model corresponding to each time period can be established, and finally the predicted water consumption corresponding to each time period can be obtained. The predicted water consumption corresponding to each time period can be merged to obtain the predicted water consumption for the future day.

[0101] This embodiment provides a method for predicting the water consumption of a water heater. On the one hand, the water consumption prediction model is trained using the historical water and electricity consumption of the water heater. In this way, the error in predicting water consumption caused by different water temperatures of users can be avoided. On the other hand, the present application scheme constructs a water consumption prediction model and uses a machine learning algorithm for training. In the training process of the water consumption prediction model, the difference 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 the loss function of the water consumption prediction model. Finally, the historical water consumption of the water heater is input into the trained water consumption prediction model, and the predicted water consumption of the water heater is output. In this way, the situation where users encounter water (hot water) outages during water use can be reduced, thereby improving the user experience.

[0102] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of an embodiment of a water heater provided by the present application. The water heater 100 includes a memory 110 and a processor 120, wherein the memory 110 is used to store a computer program, and the processor 120 is used to execute the computer program to implement the steps of the method for predicting the 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: obtaining the historical water consumption of the water heater 100. Inputting the historical water consumption of the water heater 100 into the water consumption prediction model, and obtaining the predicted water consumption of the water heater 100 output by the water consumption prediction model. Among them, the water consumption prediction model is obtained by pre-training the historical water consumption of the water heater 100 corresponding to the training water use event as sample input data, and using the predicted water consumption of the water heater 100 corresponding to the training water use event as sample output data. In the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater 100 and the predicted water consumption of the water heater 100 is used as a regularization term of the 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 the embodiments of the present application.

[0103] The memory 110 is used for executable instructions. The memory 110 may include a high-speed RAM memory 110, and may also include a non-volatile memory 110 (non-volatile memory), such as at least one disk memory. The memory 110 may also be a memory array. The memory 110 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The instructions stored in the memory 110 can be executed by the processor 120, so that the processor 120 can execute the water consumption prediction method of the water heater 100 in any of the above method embodiments.

[0104] See also Figure 5 , Figure 5 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 200 stores a computer program 201, and when the computer program 201 is executed by the processor, the steps of the method for predicting the water consumption of the water heater 100 provided by the present application are implemented. For example, when the computer program 201 is executed by the processor, the following steps are implemented: obtaining the historical water consumption of the water heater 100. Inputting the historical water consumption of the water heater 100 into the water consumption prediction model, and obtaining the predicted water consumption of the water heater 100 output by the water consumption prediction model. Among them, the water consumption prediction model is obtained by pre-training using the historical water consumption of the water heater 100 corresponding to the training water use event as sample input data, and using the predicted water consumption of the water heater 100 corresponding to the training water use event as sample output data. In the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater 100 and the predicted water consumption of the water heater 100 is used as a regularization term of the loss function of the water consumption prediction model. The computer storage medium 200 can be any available medium or data storage device that can be accessed by the computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory 110 (NANDFLASH), solid-state drives (SSDs)), etc.

[0105] In summary, the present application provides a water consumption prediction method for the water heater 100, which utilizes the historical water and electricity consumption of the water heater to train a water consumption prediction model. In this way, the error in predicting water consumption caused by different water temperatures of users can be avoided.

[0106] The above are only specific implementation methods in the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technology can understand that any changes or substitutions that can be thought of within the technical scope disclosed in the present application should be included in the scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0107] In addition, in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

Claims

1. A method for predicting water consumption of water heaters, It is characterized in that The method comprises: Obtain the historical water consumption of the water heater; the historical water consumption is generated by heating the historical water consumption used by the user; 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 pre-training using the historical water consumption and electricity consumption of the water heater corresponding to the training water consumption event as sample input data and using the predicted water consumption of the water heater corresponding to the training water consumption event as sample output data; The historical water consumption W of the water heater is calculated according to the following formula: 2 : W 2 =K*W-W 1 Where W represents the total historical power consumption of the water heater, K represents the loss coefficient, and W 1 Indicates the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater.

2. The method according to claim 1, It is characterized in that During the training process of the water consumption prediction model, the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater is used as a regularization term of the loss function of the water consumption prediction model.

3. The method according to claim 1 or 2, It is characterized in that The step of 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: Get temperature data and holiday data; Inputting the historical water and electricity consumption of the water heater, the 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; Among them, the water consumption prediction model is obtained by training in advance using the historical water consumption and electricity consumption of the water heater corresponding to the training water use event, the temperature data and the holiday data as sample input data, and using the predicted water consumption of the water heater corresponding to the training water use event as sample output data.

4. The method according to claim 2, It is characterized in that The water consumption prediction model is established based on a linear regression equation; The loss function includes 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 the difference between the actual water consumption of the water heater and the predicted water consumption of the water heater.

5. The method according to claim 4, It is characterized in that The water consumption prediction model is: The loss function is: Among them, X i is the historical water consumption corresponding to the i-th training water event, y i is the actual water consumption of the water heater corresponding to the i-th training water use event, is the predicted water consumption of the water heater corresponding to the i-th training water consumption event output by the water consumption prediction model, λ and γ are hyperparameters, λ,γ>0, m is the total number of training water consumption events, a j is the jth coefficient of the linear regression equation, t means that the linear regression equation has t coefficients in total, a i (i=1, ..., t) represents the measured parameter corresponding to the historical water consumption and power consumption of the i-th water heater.

6. The method according to claim 1, It is characterized in that The obtaining of the historical water consumption and power consumption of the water heater comprises: Obtain the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater; The historical water consumption of the water heater is calculated according to the historical water consumption in the barrel and the historical total power consumption of the water heater.

7. The method according to claim 6, It is characterized in that The method of obtaining the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater includes: The initial tank temperature and the final tank temperature of the water heater are used to calculate the historical water consumption in the water tank corresponding to the increase in water temperature in the water heater.

8. The method according to claim 7, It is characterized in that The historical water consumption W in the water tank corresponding to the water temperature increase in the water heater is obtained according to the following formula 1 : Among them, T 最终 represents the final temperature inside the water heater, T 初始 represents the initial temperature inside the water heater, and V represents the volume of the water heater.

9. The method according to claim 1, It is characterized in that 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 includes: The obtained predicted water consumption of the water heater is corrected for extreme values.

10. The method according to claim 9, It is characterized in that The predicted water consumption of the water heater is corrected for extreme values ​​according to the following formula: Among them, T 最高 Indicates the maximum temperature allowed to be set for the water heater, T 出水 Indicates the appropriate body temperature for water use, T 进水 represents the water inlet temperature of the water heater, and V represents the volume of the water heater.

11. A water heater, It is characterized in that The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 10 when executing the computer program.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Prediction method for water consumption of water heater, water heater and storage medium

    CN112446169A