Hot water machine control method, device, storage medium and electronic device

By obtaining the current operating status information of the water heater and optimizing operating parameters using Kalman filtering and reinforcement learning, the problem that the existing water heater control methods cannot effectively reduce energy consumption, and achieve more intelligent control and lower energy consumption.

CN116164422BActive Publication Date: 2025-06-24GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211483739.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2025-06-24
Estimated Expiration
2042-11-24

AI Technical Summary

Technical Problem

The existing water heater control methods cannot effectively consider actual energy consumption, resulting in a low degree of energy waste and intelligent control.

Method used

By obtaining the current operating status information of the water heater, using the Kalman filtering algorithm and reinforcement learning model to optimize the operating parameters, the operating status of the water heater at the next moment is controlled to achieve the preset target temperature and reduce power consumption.

Benefits of technology

It realizes intelligent control of the water heater while taking into account the actual power consumption, reduces the energy consumption of the water heater and improves the intelligent degree of control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116164422B_ABST
    Figure CN116164422B_ABST
Patent Text Reader

Abstract

The present invention provides a control method, device, storage medium and electronic device for a water heater, relating to the technical field of intelligent water heaters. The method includes: obtaining the current operating state information of the water heater; based on the current operating state information, controlling the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold. The technical solution provided by the present invention can control the water heater more intelligently, thereby reducing the energy consumption of the water heater.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent water heaters, and particularly to a water heater control method, device, storage medium and electronic device. Background Art

[0002] In the prior art, most water heaters are controlled by set parameters. The water heater operates according to a predetermined operation rule without considering the actual operation energy consumption. This control method results in a low degree of intelligence in the control of the water heater and causes energy waste. Summary of the Invention

[0003] In view of the above problems in the prior art, the present application proposes a water heater control method, device, storage medium and electronic device, which can control the water heater more intelligently, thereby reducing the energy consumption of the water heater.

[0004] To achieve the above object, the technical solution of the present invention is realized as follows:

[0005] In a first aspect, an embodiment of the present invention provides a water heater control method, the method comprising:

[0006] Obtaining current operation state information of the water heater;

[0007] Based on the current operation state information, controlling the operation state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0008] In some embodiments, the water heater includes: a compressor, an expansion valve and a blower; the obtaining current operation state information of the water heater includes:

[0009] Obtaining current preset operation parameters of the water heater as the current operation state information; wherein, the current preset operation parameters include at least one of the following items: current indoor temperature, current compressor frequency, current expansion valve opening, current blower speed.

[0010] In some embodiments, the method further comprises:

[0011] Optimizing the current operation state information to obtain optimized current operation state information;

[0012] The controlling the operation state of the water heater at the next moment based on the current operation state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold, includes:

[0013] Based on the optimized current operating state information, control the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0014] In some embodiments, optimizing the current operating state information to obtain optimized current operating state information includes:

[0015] Use the Kalman filter algorithm to optimize the current operating state information to obtain the optimized current operating state information.

[0016] In some embodiments, based on the optimized current operating state information, controlling the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold, includes:

[0017] Input the optimized current operating state information into a pre-established reinforcement learning model, so that the reinforcement learning model outputs the set value of the operating parameters of the water heater at the next moment, and a reward value corresponding to the current operating state information and the set value of the operating parameters at the next moment; wherein, the reward value is obtained based on the current indoor temperature and the current power consumption of the water heater;

[0018] Adjust the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold.

[0019] In some embodiments, the current operating state information includes: the current operating parameter value; adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information includes:

[0020] Judge whether the reward value is less than a preset reward threshold;

[0021] When the reward value is less than the preset reward threshold, increase or decrease the current operating parameter value until the reward value is not less than the preset reward threshold.

[0022] In some embodiments, the algorithm adopted by the reinforcement learning model is the Q-Learning algorithm.

[0023] In a second aspect, an embodiment of the present invention provides a water heater control device, and the device includes:

[0024] An acquisition unit for acquiring the current operating status information of the water heater;

[0025] A control unit for controlling the operating status of the water heater at the next moment based on the current operating status information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0026] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which program code is stored. When the program code is executed by a processor, the water heater control method according to any one of the above embodiments is implemented.

[0027] In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes a memory and a processor. Program code that can run on the processor is stored on the memory. When the program code is executed by the processor, the water heater control method according to any one of the above embodiments is implemented.

[0028] The water heater control method, device, storage medium, and electronic device provided by the embodiments of the present invention obtain the current operating status information of the water heater, and based on this current operating status information, control the operating status of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold. This enables the present solution to perform intelligent control on the operating status of the water heater at each moment while considering the actual power consumption of the water heater, and solves the technical problem of high energy consumption caused by the fact that the water heater in the prior art can only operate according to predetermined parameters. It can be seen that the technical solution provided by the present invention can perform more intelligent control on the water heater, thereby reducing the energy consumption of the water heater. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The scope of the present disclosure can be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings. The accompanying drawings included are:

[0030] Figure 1 The method flow of the embodiment of the present invention Figure 1 ;

[0031] Figure 2 The method flow of the embodiment of the present invention Figure 2 ;

[0032] Figure 3 The method flow chart for optimizing the current operating status information of the water heater based on the Kalman filter algorithm in the embodiment of the present invention;

[0033] Figure 4 The model schematic diagram of the water heater operation strategy based on reinforcement learning in the embodiment of the present invention;

[0034] Figure 5 is the device structure of the embodiment of the present invention Figure 1 ;

[0035] Figure 6 is the device structure of the embodiment of the present invention Figure 2 。 Detailed implementation manners

[0036] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following will, in conjunction with the accompanying drawings and embodiments, detail the implementation methods of the present invention, so as to fully understand how the present invention uses technical means to solve technical problems and achieve the implementation process of technical effects and implement accordingly.

[0037] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention may be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0038] Example 1

[0039] In the existing methods for controlling a water heater, most adjust the operating parameters through traditional control methods to make the water heater operate according to a predetermined operating law, resulting in relatively high energy consumption of the water heater. Saving system energy consumption by controlling the set values during the operation of the key parameters of the heat pump system can be regarded as a direction for energy saving of the heat pump water heater.

[0040] Based on the above idea, an embodiment of the present invention provides a method for controlling a water heater. As Figure 1 shown, the method for controlling a water heater in this embodiment includes step S101 and step S102. The specific contents of these steps are described in detail below:

[0041] Step S101, obtaining the current operating state information of the water heater;

[0042] In this embodiment, the water heater includes: a compressor, an expansion valve and a blower. In order to obtain the current operating state information of the water heater more conveniently and accurately, in this embodiment, the obtaining the current operating state information of the water heater includes: obtaining the current predetermined operating parameters of the water heater as the current operating state information; wherein, the current predetermined operating parameters include at least one of the following items: the current indoor temperature, the current compressor frequency, the current expansion valve opening, and the current blower speed.

[0043] Specifically, the current indoor temperature, the current compressor frequency, the current expansion valve opening degree, and the current fan speed are key parameters during the operation of the water heater, which can accurately reflect the current operating state of the water heater. Therefore, at least one of the above parameters can be used as the current operating state information of the water heater.

[0044] In practical applications, different sensors and / or special detection devices can be used to obtain key operating parameters such as the current indoor temperature, the current compressor frequency, the current expansion valve opening degree, and the current fan speed for subsequent processing.

[0045] Step S102, based on the current operating state information, control the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0046] Since in practical applications, the readings of some sensors are jittery and cannot well reflect the variation law of actual operating parameters, therefore, in order to obtain more accurate sensor data and thus more accurate operating parameters, as Figure 2 shown, the method described in this embodiment further includes: optimizing the current operating state information to obtain optimized current operating state information. On this premise, the control of the operating state of the water heater at the next moment based on the current operating state information so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold includes: controlling the operating state of the water heater at the next moment based on the optimized current operating state information so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0047] In order to optimize the current operating state information more accurately and effectively, the optimization of the current operating state information to obtain optimized current operating state information described in this embodiment includes: using the Kalman filter algorithm to optimize the current operating state information to obtain the optimized current operating state information.

[0048] As a relatively common state optimal estimation algorithm, the Kalman filter algorithm can better compensate for problems such as insufficient sensor accuracy and large curve fluctuations. Combining the Kalman filter technology to process the return signals of each sensor can make it better reflect the parameter values during the actual operation of each parameter, so as to better control the water heater during operation.

[0049] Such as Figure 3As shown in the figure, optimizing the current operating state of the water heater based on the Kalman filter algorithm includes: First, initialize the parameters of the Kalman filter according to expert experience and the actual situation of the water heater, including the state matrix, observation matrix, prediction error, state matrix variance, and observation matrix variance. Among them, the actual situation of the water heater refers to the parameters corresponding to each parameter that needs to be filtered due to the installation environment. The purpose of initializing the parameters of the Kalman filter is to assign initial values to the parameters for subsequent iterative updates.

[0050] In this embodiment, the purpose of establishing the prediction model is to predict the state corresponding to the parameters at the next moment. Taking temperature as an example, what needs to be predicted is the temperature value at the next moment. The role of the prediction model in the Kalman filter is to update the filtered value. The prediction model is obtained based on experience. For example, taking the temperature change as an example, the ideal model is that the temperature at the previous moment and the next moment is the same, so X = x. However, due to the operating environment, there will be some heat dissipation, and this part is the temperature change D (as shown in Equation 1 below).

[0051] Next, obtain the states of each sensor of the water heater through the water heater control terminal, and establish prediction models for each operating state respectively in combination with the change rules of each parameter of the water heater (the reference key states are indoor temperature, compressor frequency, expansion valve opening, and fan speed), and calculate the covariance and Kalman gain respectively. Then, calculate the filtered value based on the obtained parameter state values, and finally update the covariance to complete the Kalman filter process, obtaining relatively smooth and relatively accurate change curves of each parameter. After Kalman filtering, save each data combination to provide a data basis for the formulation of subsequent control strategies.

[0052] Taking the indoor temperature sensor as an example, the Kalman filter process is illustrated as follows:

[0053] Suppose the currently obtained temperature value is x, then the calculation formula for the temperature prediction value X at the next moment is as shown in Equation (1) below:

[0054] X = A * x - D (1)

[0055] In the formula, A is the state matrix, and D is the temperature change caused by heat dissipation such as air flow during each sampling interval. Among them, the parameter D is an estimated value obtained based on expert experience and needs to be obtained in combination with the operating environment of the water heater.

[0056] Next, calculate the covariance P, and the formula is as shown in Equation 2:

[0057] P = A * A * P + Q (2)

[0058] In the formula, P is the covariance of the temperature value, A is the state matrix, and Q is the state matrix variance. Among them, the covariance P of the temperature value is used to update the Kalman gain.

[0059] After that, calculate the Kalman filter gain G, and the calculation method is as shown in Equation 3:

[0060] G = P * H / (P * H * H + R) (3)

[0061] In the formula, H is the observation matrix, and R is the variance of the observation matrix.

[0062] Finally, calculate the filtered value and update the covariance, and the calculation methods are as shown in Equation 4 and Equation 5 respectively:

[0063] X_filter = X + (x - X) * G (4)

[0064] P = (1 - G * H) * P (5)

[0065] In the formula, X is the predicted temperature value at the next moment. Among them, the purpose of updating the covariance is to update the Kalman gain for the next iteration.

[0066] Through the above steps, the final indoor temperature value X_filter after filtering can be obtained.

[0067] In order to more accurately and effectively control the operating state of the water heater at the next moment, based on the optimized current operating state information in this embodiment, control the operating state of the water heater at the next moment, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold, including: inputting the optimized current operating state information into a pre-established reinforcement learning model, so that the reinforcement learning model outputs the set value of the operating parameters of the water heater at the next moment, and the reward value corresponding to the current operating state information and the set value of the operating parameters at the next moment; wherein, the reward value is obtained based on the current indoor temperature and the current power consumption of the water heater; adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold.

[0068] In this embodiment, the current operating state information includes: the current operating parameter value. In order to more accurately and effectively adjust the set value of the operating parameters of the water heater at the next moment, based on the reward value and the optimized current operating state information in this embodiment, adjusting the set value of the operating parameters of the water heater at the next moment includes: judging whether the reward value is less than the preset reward threshold; when the reward value is less than the preset reward threshold, increase or decrease the current operating parameter value until the reward value is not less than the preset reward threshold.

[0069] In order to further accurately and effectively control the operating state of the water heater at the next moment, the algorithm adopted by the reinforcement learning model described in this embodiment is the Q-Learning algorithm.

[0070] As Figure 4 shown, the control of the operating state of the water heater at each moment in this embodiment includes: First, obtain the key parameter states during the operation of the water heater through Figure 3 the above-mentioned method. Then, set the reward function based on the current indoor temperature change and the power consumption of the water heater, and set the system action value in combination with the reward function. For example, if the reward value is large, try to maintain the current operating state. If the reward value is small, adjust the parameter values. Finally, obtain the Q value in the Q-Learning algorithm to obtain the optimal operating strategy.

[0071] Among them, Figure 4 the state s in Figure 3 is the current operating state of each device in the water heater, that is, the key parameters obtained through

[0072] the Kalman filter algorithm, such as the indoor temperature value, the compressor frequency value, the expansion valve opening value, and the fan rotation speed value; the reward r is the reward value obtained through the reward function; the action a is the adjustment value from each state parameter to the next state. For example, the compressor adjusts its frequency up and down according to the reward value; the environment is the current power consumption of the water heater and the current indoor temperature; the intelligent agent is the water heater.

[0073] In this embodiment, the above reward function can be: R = a*T + b*E, where T is the current indoor temperature, E is the power consumption of the water heater, a is the weight of the current indoor temperature, b is the weight of the power consumption of the water heater, and both a and b can be obtained from expert experience. Of course, the reward function here is only an example, and its specific form is not limited to the above formula, and this embodiment does not make specific restrictions on this.

[0074] In practical applications, specific parameter values can be adjusted according to the actual situation. Taking the compressor frequency as an example, if the reward value obtained by the system is low, first increase the frequency value of the compressor, obtain the next state information of the water heater, and then run the water heater for a period of time to update the reward value. If the reward value increases, retain the current frequency value of the compressor; if it decreases, change the current state of the water heater back to the original state, and then re-select a new state. If all selectable states are tried but the reward value does not increase, select the state with a relatively high reward value as the parameter value of the next state of the water heater.

[0075] For the above reinforcement learning process, in this embodiment, the Q-Learning algorithm is specifically used to obtain the final Q value, that is, to obtain the optimal operation strategy of the water heater at each moment. The optimal operation strategy is specifically to set the operation parameters of each device at the next moment according to the current state parameter values of each device in the water heater, so that the temperature that the water heater can actually provide can reach the target temperature, and at the same time minimize the power consumption of the water heater within a certain period of time. Since the reward function of the above Q-Learning algorithm is determined based on the current indoor temperature and the power consumption of the water heater, therefore, each moment during the operation of the water heater is the optimal operation strategy. Under this optimal operation strategy, the water heater can not only reach the set target temperature but also has the minimum power consumption within a period of time. Therefore, it can not only meet the user's usage requirements but also save the operation energy consumption of the water heater.

[0076] In this embodiment, the current operation state information of the water heater is first optimized by Kalman filtering, and then the operation state of the water heater at the next moment is controlled by combining the optimized current operation state information and the reinforcement learning model. Using the set target temperature and the power consumption of the water heater as the criteria, the water heater can minimize the power consumption while ensuring the set operation temperature, thereby saving the operation energy consumption of the water heater. This solution reduces the operation energy consumption of the water heater, meets the usage requirements of the set temperature of the water heater, improves the operation energy efficiency of the water heater, and further improves the degree of intelligence of the control of the water heater.

[0077] The water heater control method provided by the embodiment of the present invention controls the operation state of the water heater at the next moment based on the obtained current operation state information of the water heater, so that the water heater can reach the preset target temperature and the power consumption of the water heater within the preset time period is less than the preset power threshold. This enables the present solution to perform intelligent control on the operation state of the water heater at each moment considering the actual power consumption of the water heater, and solves the technical problem of high energy consumption caused by the fact that the water heater in the prior art can only operate according to predetermined parameters. It can be seen that the technical solution provided by the present invention can control the water heater more intelligently, thereby reducing the energy consumption of the water heater.

[0078] Example 2

[0079] Corresponding to the above method embodiments, the present invention further provides a water heater control device, as Figure 5 shown. The device described in this embodiment includes:

[0080] An acquisition unit 201, configured to acquire the current operating state information of the water heater;

[0081] A control unit 202, configured to control the operating state of the water heater at the next moment based on the current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0082] In this embodiment, the water heater includes: a compressor, an expansion valve, and a blower; the acquisition unit 201 acquires the current operating state information of the water heater in the following manner:

[0083] Acquire the current predetermined operating parameters of the water heater as the current operating state information; wherein, the current predetermined operating parameters include at least one of the following items: the current indoor temperature, the current compressor frequency, the current expansion valve opening, and the current blower speed.

[0084] Further, as Figure 6 shown, the device described in this embodiment further includes:

[0085] An optimization unit 203, configured to optimize the current operating state information to obtain optimized current operating state information;

[0086] The control unit 202 is further configured to control the operating state of the water heater at the next moment based on the optimized current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold.

[0087] In this embodiment, the optimization unit 203 optimizes the current operating state information in the following manner to obtain optimized current operating state information:

[0088] Use the Kalman filter algorithm to optimize the current operating state information to obtain the optimized current operating state information.

[0089] In this embodiment, the control unit 202 includes:

[0090] An input unit for inputting the optimized current operating state information into a pre-established reinforcement learning model, so that the reinforcement learning model outputs the set value of the operating parameters of the water heater at the next moment, and a reward value corresponding to the current operating state information and the set value of the operating parameters at the next moment; wherein, the reward value is obtained based on the current indoor temperature and the current power consumption of the water heater;

[0091] An adjustment unit for adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold.

[0092] In this embodiment, the current operating state information includes: the current operating parameter value; the adjustment unit adjusts the set value of the operating parameters of the water heater at the next moment in the following manner:

[0093] Judge whether the reward value is less than a preset reward threshold;

[0094] When the reward value is less than the preset reward threshold, increase or decrease the current operating parameter value until the reward value is not less than the preset reward threshold.

[0095] In this embodiment, the algorithm adopted by the reinforcement learning model is the Q-Learning algorithm.

[0096] For the working principle, working process and other content related to the specific implementation manner of the above device, reference can be made to the specific implementation manner of the water heater control method provided by the present invention, and the same technical content will not be described in detail here.

[0097] The water heater control device provided by the embodiment of the present invention controls the operating state of the water heater at the next moment based on the obtained current operating state information of the water heater, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold. This solution can perform intelligent control on the operating state of the water heater at each moment on the premise of considering the actual power consumption of the water heater, and solves the technical problem of high energy consumption caused by the fact that the water heater in the prior art can only operate according to predetermined parameters. It can be seen that the technical solution provided by the present invention can control the water heater more intelligently, thereby reducing the energy consumption of the water heater.

[0098] Example 3

[0099] According to an embodiment of the present invention, there is also provided a computer-readable storage medium, on which program code is stored, and when the program code is executed by a processor, the hot water machine control method described in any one of the above embodiments is implemented.

[0100] Example 4

[0101] According to an embodiment of the present invention, there is also provided an electronic device, which includes a memory and a processor. Program code that can run on the processor is stored on the memory, and when the program code is executed by the processor, the hot water machine control method described in any one of the above embodiments is implemented.

[0102] The hot water machine control method, device, storage medium and electronic device provided by the embodiments of the present invention obtain the current operating state information of the hot water machine, and based on this current operating state information, control the operating state of the hot water machine at the next moment, so that the hot water machine can reach a preset target temperature and the power consumption of the hot water machine within a preset time period is less than a preset power threshold. This enables the present solution to perform intelligent control on the operating state of the hot water machine at each moment on the premise of considering the actual power consumption of the hot water machine, and solves the technical problem of high energy consumption caused by the fact that the hot water machine in the prior art can only operate according to predetermined parameters. It can be seen that the technical solution provided by the present invention can perform more intelligent control on the hot water machine, thereby reducing the energy consumption of the hot water machine.

[0103] The intelligent control method for the hot water machine provided by this solution optimizes the key parameters returned by each sensor using the Kalman filtering algorithm based on the state of each key parameter during the operation of the multifunctional hot water machine, and finally formulates a control strategy for the operation of the hot water machine based on the reinforcement learning model by combining the system-set operating temperature and the system operating power consumption. This method not only reduces the energy consumption of equipment operation but also meets the user's usage requirements, improving the intelligent level of the hot water machine control method.

[0104] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present invention.

[0106] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0108] Although the embodiments disclosed in the present invention are as above, the content described above is only an embodiment for facilitating the understanding of the present invention and is not intended to limit the present invention. Any person skilled in the art within the technical field to which the present invention pertains, without departing from the spirit and scope disclosed by the present invention, can make any modifications and changes in the form of implementation and details, but the protection scope of the present invention shall still be subject to the scope defined by the appended claims.

Claims

1. A method for controlling a water heater, characterized in that, The method includes: Obtaining the current operating state information of the water heater; Based on the current operating state information, controlling the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold; The method further includes: Optimizing the current operating state information to obtain optimized current operating state information; The controlling the operating state of the water heater at the next moment based on the current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold includes: Based on the optimized current operating state information, controlling the operating state of the water heater at the next moment, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold; Wherein, the controlling the operating state of the water heater at the next moment based on the optimized current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold includes: Inputting the optimized current operating state information into a pre-established reinforcement learning model, so that the reinforcement learning model outputs the set value of the operating parameters of the water heater at the next moment, and a reward value corresponding to the current operating state information and the set value of the operating parameters at the next moment; wherein, the reward value is obtained based on the current indoor temperature and the current power consumption of the water heater; Adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold; The current operating state information includes: the current operating parameter value; the adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information includes: Judging whether the reward value is less than a preset reward threshold; When the reward value is less than the preset reward threshold, increasing or decreasing the current operating parameter value until the reward value is not less than the preset reward threshold.

2. The hot water machine control method according to claim 1, wherein, The water heater includes: a compressor, an expansion valve and a blower; the obtaining the current operating state information of the water heater includes: Obtaining the current preset operating parameters of the water heater as the current operating state information; wherein, the current preset operating parameters include at least one of the following items: the current indoor temperature, the current compressor frequency, the current expansion valve opening degree, the current blower rotation speed.

3. The hot water machine control method according to claim 1, wherein, The optimizing the current operating state information to obtain optimized current operating state information includes: Optimizing the current operating state information by using a Kalman filter algorithm to obtain the optimized current operating state information.

4. The hot water machine control method according to claim 1, characterized in that, The algorithm adopted by the reinforcement learning model is the Q-Learning algorithm.

5. A water heater control device, characterized in that, The device includes: An acquisition unit for acquiring the current operating state information of the water heater; A control unit for controlling the operating state of the water heater at the next moment based on the current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold; An optimization unit for optimizing the current operating state information to obtain optimized current operating state information; The control unit is further configured to control the operating state of the water heater at the next moment based on the optimized current operating state information, so that the water heater can reach a preset target temperature and the power consumption of the water heater within a preset time period is less than a preset power threshold; The control unit includes: an input unit for inputting the optimized current operating state information into a pre-established reinforcement learning model, so that the reinforcement learning model outputs the set value of the operating parameters of the water heater at the next moment, and a reward value corresponding to the current operating state information and the set value of the operating parameters at the next moment; wherein, the reward value is obtained based on the current indoor temperature and the current power consumption of the water heater; An adjustment unit for adjusting the set value of the operating parameters of the water heater at the next moment based on the reward value and the optimized current operating state information, so that the water heater can reach the preset target temperature and the power consumption of the water heater within a preset time period is less than the preset power threshold; The current operating state information includes: the current operating parameter value; the adjustment unit adjusts the set value of the operating parameters of the water heater at the next moment in the following manner: Judge whether the reward value is less than a preset reward threshold; When the reward value is less than the preset reward threshold, increase or decrease the current operating parameter value until the reward value is not less than the preset reward threshold.

6. A computer-readable storage medium, on which program code is stored, characterized in that, When the program code is executed by a processor, it implements the water heater control method according to any one of claims 1 to 4.

7. An electronic device, characterized in that, The electronic device includes a memory and a processor, and a program code that can run on the processor is stored on the memory. When the program code is executed by the processor, it implements the water heater control method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Power consumption based hot water dispenser control method, device and hot water dispenser

    CN110513874A

  • Modulating Boiler System

    US20090001186A1