A gas water heater control method and device, a gas water heater and a storage medium

CN122792784APending Publication Date: 2026-09-22HANGZHOU ROBAM APPLIANCES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611172974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0004]本发明提供了一种燃气热水器控制方法、装置、燃气热水器及存储介质,以解决现有技术多依赖单一维度的用水时间记录,预约精度较低,易出现热水供应滞后或提前预热的问题

Benefits of technology

[0015]本发明实施例的技术方案,将全天时间划分为N个等时长的基本用水单元,建立各个基本用水单元与存储空间中二进制位的映射关系,并以预设字节长度的数据帧存储每日各个基本用水单元的用水记录,实现低存储资源占用,降低硬件成本;进一步,根据各个基本用水单元内的累计用水时长判定对应基本用水单元是否为有效用水单元,并将判定为有效用水单元的基本用水单元对应的二进制位设为第一数值,实现动态捕捉用户用水习惯的周期性变化,精准用户用水习惯匹配;此外,基于至少一日的用水记录中的有效用水单元生成次日预约时间段,并在燃气热水器的当前时间刻度到达次日预约时间段的起始刻度时,启动燃气热水器中循环泵进行预热,以及在燃气热水器的当前时间刻度到达次日预约时间段的结束刻度时,控制循环泵停止工作,实现仅在预约时段启动加热,避免无效循环,显著降低能耗。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122792784A_ABST
    Figure CN122792784A_ABST
Patent Text Reader

Abstract

The application discloses a gas water heater control method and device, a gas water heater and a storage medium. The gas water heater control method comprises the following steps: dividing the whole day into N basic water using units with equal time length, establishing a mapping relationship between each basic water using unit and a binary bit in a storage space, and storing water using records of each basic water using unit in each day in a data frame with a preset byte length; determining whether the corresponding basic water using unit is a valid water using unit according to the cumulative water using time length in each basic water using unit; generating a next day reservation time period based on the valid water using unit in the water using records of at least one day, starting a circulating pump in the gas water heater to preheat when the current time scale of the gas water heater reaches the starting scale of the next day reservation time period, and controlling the circulating pump to stop working when the current time scale of the gas water heater reaches the end scale of the next day reservation time period. The application realizes accurate user water using habit matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart home technology, and in particular to a gas water heater control method, device, gas water heater and storage medium. Background Technology

[0002] With the development of smart home products and the improvement of users' living standards, gas water heaters with zero-cold-water function are becoming increasingly popular. The zero-cold-water function uses a circulating pump to preheat the cold water in the pipes, achieving an "instant hot water" experience and significantly improving user comfort. However, while improving comfort, the zero-cold-water function also brings the problem of increased energy consumption.

[0003] To reduce energy consumption, existing gas water heaters typically support remote control via an app and timed preheating. However, the fixed-time preheating method cannot match the dynamic changes in users' actual water usage habits, resulting in ineffective heating during non-water usage periods and energy waste. Summary of the Invention

[0004] This invention provides a gas water heater control method, device, gas water heater and storage medium to solve the problems of existing technologies that rely on a single dimension of water usage time recording, have low reservation accuracy, and are prone to hot water supply delays or premature preheating.

[0005] According to one aspect of the present invention, a gas water heater control method is provided, the gas water heater control method comprising: The entire day is divided into N basic water use units of equal duration. A mapping relationship is established between each basic water use unit and binary bits in the storage space. The water use records of each basic water use unit are stored in a data frame of preset byte length. Based on the cumulative water usage time within each basic water unit, determine whether the corresponding basic water unit is a valid water unit, and set the binary bit corresponding to the basic water unit that is determined to be a valid water unit as the first value. The system generates a scheduled time slot for the next day based on valid water usage units from at least one day's water usage records. When the current time scale of the gas water heater reaches the start scale of the scheduled time slot for the next day, the circulation pump in the gas water heater is started to preheat the water. When the current time scale of the gas water heater reaches the end scale of the scheduled time slot for the next day, the circulation pump is controlled to stop working.

[0006] Optionally, the determination of whether a basic water-using unit is a valid water-using unit can be based on the cumulative water usage time within each basic water-using unit, including: If the cumulative water usage time in each basic water usage unit is greater than or equal to the preset time threshold, then the corresponding basic water usage unit is determined to be a valid water usage unit. If the cumulative water usage time in each basic water unit is less than the preset time threshold, the corresponding basic water unit is determined to be an invalid water unit, and the binary bit corresponding to the basic water unit determined to be an invalid water unit is set to the second value.

[0007] Optionally, a reservation time slot for the next day can be generated based on valid water usage units in at least one day's water usage records, including: Retrieve the number of days of historical water usage records that have been stored, starting from the current date. If the number of historical water usage records is less than the set number of records, then all valid water usage units identified in the historical water usage records will be extracted to generate a reservation time slot for the next day. If the number of historical water usage records exceeds the set number of records, all valid water usage units identified in the most recent set number of records will be extracted to generate a reservation time slot for the next day.

[0008] Optionally, extract all valid water usage units identified in the most recently set record days to generate the reservation time slot for the next day, including: The earliest historical record days in the set record days are merged and analyzed, and the remaining record days are analyzed independently. All valid water use units identified in the merged historical record days and all valid water use units identified in the independent record days are extracted. The next day's appointment time slot is generated based on the extracted results.

[0009] Optionally, a reservation time slot for the next day can be generated based on valid water usage units in at least one day's water usage records, including: Extend K basic water-using units before and after each effective water-using unit; The next day's reservation time slot is generated based on the valid water usage units in at least one day's water usage records and the K basic water usage units before and after them.

[0010] Optionally, the formula for calculating the starting scale of the next day's reservation time period is: T1 = (K1 - K) × T0, where T1 is the starting scale, K1 is the minimum sequence number of the effective water unit, K is the number of extensions of the basic water unit, and T0 is the duration of a single basic water unit. The formula for calculating the end mark of the next day's reserved time slot is: T2 = (K2 + K + 1) × T0, where T2 is the end mark and K2 is the maximum sequence number of the effective water use unit.

[0011] Optionally, before dividing the entire day into N equal-length basic water use units, the following may also be included: Get the current device time of the gas water heater; If the gas water heater is connected to the network, the current device time is calibrated using the Network Time Protocol and then converted into an absolute time scale in minutes. If the gas water heater is not connected to the network, the initial time when the gas water heater is powered on is set to 0, and the time increments through the built-in clock and other means are used to obtain the time for each basic water unit.

[0012] According to another aspect of the present invention, a gas water heater control device is provided, the gas water heater control device comprising: The water usage record establishment module is used to divide the entire day into N basic water usage units of equal duration, establish the mapping relationship between each basic water usage unit and binary bits in the storage space, and store the water usage records of each basic water usage unit for each day in a data frame of preset byte length. The effective water use unit determination module is used to determine whether the corresponding basic water use unit is an effective water use unit based on the cumulative water use time in each basic water use unit, and set the binary bit corresponding to the basic water use unit that is determined to be an effective water use unit to the first value. The gas water heater control module is used to generate a scheduled time period for the next day based on valid water usage units in at least one day's water usage records, and to start the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, and to control the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day.

[0013] According to another aspect of the present invention, a gas water heater is provided, the gas water heater including a circulation pump for circulating and preheating hot water in the gas water heater pipes; Gas water heaters also include: At least one processor; and, A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the gas water heater control method of any embodiment of the present invention.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the gas water heater control method of any embodiment of the present invention.

[0015] The technical solution of this invention divides the entire day into N basic water usage units of equal duration, establishes a mapping relationship between each basic water usage unit and binary bits in the storage space, and stores the daily water usage records of each basic water usage unit in a data frame of preset byte length, achieving low storage resource consumption and reducing hardware costs. Furthermore, it determines whether a basic water usage unit is a valid water usage unit based on the cumulative water usage duration within each unit, and sets the binary bit corresponding to the valid water usage unit as a first value, thereby dynamically capturing the periodic changes in user water usage habits and accurately matching user water usage habits. In addition, it generates a scheduled time slot for the next day based on the valid water usage units in at least one day's water usage records, and starts the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time slot for the next day, and controls the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time slot for the next day, achieving heating only during the scheduled time slot, avoiding invalid circulation, and significantly reducing energy consumption.

[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a gas water heater control method according to an embodiment of the present invention; Figure 2 This is an exemplary schematic diagram of the division of basic water-using units provided in an embodiment of the present invention; Figure 3 This is a flowchart of a gas water heater control method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a gas water heater control device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a gas water heater that implements the gas water heater control method of this invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] Figure 1 This invention provides a flowchart of a gas water heater control method. This embodiment is applicable to situations where pre-heating control of a gas water heater is achieved based on multi-dimensional water usage data. This gas water heater control method can be executed by a gas water heater control device, which can be implemented in hardware and / or software. The gas water heater control device can be configured within the gas water heater or its main controller. Figure 1 As shown, the control method for this gas water heater includes: S110. Divide the entire day into N basic water use units of equal duration, establish a mapping relationship between each basic water use unit and binary bits in the storage space, and store the water use records of each basic water use unit for each day in a data frame of preset byte length.

[0022] The basic water usage unit is considered to be measured in minutes. The main controller discretizes the total duration of 24 hours (1440 minutes) into multiple consecutive basic water usage units according to a preset time granularity, that is, divides the entire day into N basic water usage units of equal duration. In this embodiment, see [link to implementation details]. Figure 2 The diagram shown illustrates the division of basic water use units. Taking a duration of 5 minutes as an example, each basic water use unit lasts for 5 minutes, and the entire day is divided into 288 basic water use units.

[0023] It is known that the basic water usage unit duration can be adjusted to 1 minute, 3 minutes, 10 minutes or 15 minutes, etc., depending on the actual application scenario. The shorter the basic water usage unit duration, the higher the reservation accuracy, but the data storage volume increases accordingly. The longer the basic water usage unit duration, the less data storage volume, but the reservation accuracy decreases accordingly.

[0024] Understandably, the basic water usage units are arranged continuously along the timeline throughout the day, covering all time periods of the 24 hours to ensure that user water usage behavior is collected without any omissions.

[0025] Furthermore, the main controller establishes a mapping relationship between each basic water usage unit and binary bits in the storage space. Specifically, each basic water usage unit corresponds to 1 bit of binary data in the storage space. All 288 basic water usage units require a total of 288 bits of storage space, or 36 bytes, significantly reducing the consumption of storage resources and eliminating the need for high-capacity chips, thus saving hardware costs. It is known that daily water usage records are stored in the storage module as 36-byte data frames. The storage module has multiple storage areas, which can be used to store water usage records for multiple days.

[0026] For example, taking the storage of 7 days of water usage records as an example, the storage module is set up with 7 storage areas of 36 bytes each. In this embodiment, the storage areas can use a cyclic overwrite method to store water usage records for multiple days. Specifically, when the water usage record of the 8th day is recorded, the storage area where the water usage record of the 1st day is located is overwritten. Similarly, when the water usage record of the 9th day is recorded, the storage area where the water usage record of the 2nd day is located is overwritten, and so on. The water usage records of the most recent 7 days are always retained. The storage space is fixed and predictable, which is beneficial to the resource management of the embedded system.

[0027] Based on the above embodiments, this embodiment controls the user's water usage data for multiple days of gas water heater use and the scheduled heating for the next day. Therefore, the main controller needs to obtain the current device time of the gas water heater through the clock module when it is powered on, so as to control the subsequent start and stop during the scheduled time period.

[0028] It is known that when the gas water heater is connected to the network, the current device time is calibrated through the Network Time Protocol and converted into an absolute time scale in minutes. For example, if the time is 2:15, the current device time after calibration through the Network Time Protocol is 135.

[0029] If the gas water heater is not connected to the network, since the network time cannot be obtained, the main controller sets the initial time of the gas water heater to 0 when it is powered on, and obtains the time of each basic water unit by incrementing the time through the built-in clock.

[0030] S120. Determine whether the corresponding basic water use unit is a valid water use unit based on the cumulative water use duration in each basic water use unit, and set the binary bit corresponding to the basic water use unit that is determined to be a valid water use unit as the first value.

[0031] As is known, a water flow sensor can be installed in a gas water heater. The water flow sensor detects the water flow signal in the pipeline in real time. When the water flow sensor detects the water flow signal, it starts timing. When the water flow signal is interrupted, the timing stops and continues to accumulate when the water flow signal reappears, until the current basic water use unit ends. The main controller uses this to count the water use time detected by the water flow sensor in the basic water use unit as the cumulative water use time in the basic water use unit. Based on this, the main controller obtains the cumulative water use time in each basic water use unit.

[0032] Furthermore, the main controller determines the effective water usage of each basic water unit by setting a preset duration threshold, which improves the accuracy and reliability of subsequent reservation time slot generation. Specifically, if the cumulative water usage time within each basic water unit is greater than or equal to the preset duration threshold, the corresponding basic water unit is determined to be a valid water unit, and the binary bit corresponding to the determined valid water unit is set to the first value; if the cumulative water usage time within each basic water unit is less than the preset duration threshold, the corresponding basic water unit is determined to be an invalid water unit, and the binary bit corresponding to the determined invalid water unit is set to the second value.

[0033] As can be seen, the selection of the first and second values ​​can be arbitrarily chosen based on the settings of the main controller. Optionally, the first value can be 1 and the second value can be 0, or other numbers or symbols can be used instead. This embodiment does not impose any restrictions on this.

[0034] The preset duration threshold can be selected and set based on the duration contained in the basic water use unit. The smaller the preset duration threshold, the more sensitive it is to capturing user water use behavior. Conversely, the larger the preset duration threshold, the more conservative it is to capture user water use behavior. This embodiment does not impose any special restrictions on its specific value. Optionally, the preset duration threshold can be 20 seconds, 30 seconds, 40 seconds, or 60 seconds, etc.

[0035] For example, taking a duration of 5 minutes and a preset duration threshold of 30 seconds as an example, that is, the duration of each basic water unit is 5 minutes. If the cumulative water usage time in the basic water unit is greater than or equal to 30 seconds, that is, if the cumulative water usage time in the 5-minute basic water unit is greater than or equal to 30 seconds, then the basic water unit is determined to be a valid water unit, and the corresponding binary bit is set to the first value. Conversely, if the cumulative water usage time in the 5-minute basic water unit is less than 30 seconds, then the basic water unit is determined to be an invalid water unit, and the corresponding binary bit is set to the second value.

[0036] It is understandable that the cumulative water usage time within a basic water unit can be a continuous duration (e.g., the cumulative water usage time within a basic water unit is 35 seconds) or multiple durations within a basic water unit (e.g., the cumulative water usage time within a basic water unit is 10 seconds + 20 seconds + 15 seconds).

[0037] Furthermore, for continuous water usage scenarios spanning multiple basic water usage units, the main controller separately calculates the water usage duration within each basic water usage unit and independently determines the validity of each usage. For example, if a user's total continuous water usage duration is 60 seconds, with 10 seconds of water usage in the first basic water usage unit and 50 seconds of water usage in the second basic water usage unit, then the cumulative water usage duration in the first basic water usage unit is 10 seconds, and the cumulative water usage duration in the second basic water usage unit is 50 seconds. This ensures the accuracy of water usage determination and avoids misjudgments caused by water usage behavior crossing unit boundaries.

[0038] S130. Generate a scheduled time period for the next day based on the valid water usage units in at least one day's water usage records, and start the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, and control the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day.

[0039] In this embodiment, the main controller obtains the number of historical water usage records stored from the current date backward, compares the number of historical water usage records with the set number of records, selects different methods to generate the next day's reservation time slot, and improves the accuracy of the reservation time slot.

[0040] If the number of historical water usage records is less than the set number of records, it indicates that the gas water heater is in the data accumulation stage and the available historical water usage data is not yet sufficient. Therefore, all identified valid water usage units from the historical water usage records are extracted to generate the reservation time slot for the next day. For example, if the historical water usage records only contain records for day 1, the valid water usage units corresponding to the first binary value in that day's records are extracted to generate the reservation time slot for day 2. Similarly, if the historical water usage records contain records for days 1 and 2, the valid water usage units corresponding to the first binary value in those days are extracted to generate the reservation time slot for day 3. And so on. If the historical water usage records contain records for days 1 through 6, the valid water usage units corresponding to the first binary value in those days are extracted to generate the reservation time slot for day 7.

[0041] The number of days for recording can be adjusted to 5 days, 7 days, 10 days, 14 days or 30 days, depending on the actual application scenario. This embodiment does not impose any special restrictions on its specific value. The more days the set number of recording days is retained, the more sufficient the learning samples are. The fewer days the set number of recording days is retained, the less storage resources are consumed.

[0042] If the number of historical water usage records exceeds the set number of records, it indicates that the gas water heater has accumulated enough historical water usage data and can enter the stable analysis stage. In this case, all valid water usage units identified in the most recent set number of records will be extracted to generate the reservation time slot for the next day.

[0043] In one embodiment, the main controller merges and analyzes the earliest historical record days in the set record days, and analyzes the remaining record days independently. It extracts all the valid water use units determined in the merged historical record days and all the valid water use units determined in the remaining record days that are analyzed independently; and generates the next day's reservation time slot based on the extraction results.

[0044] Based on the above, after extracting all valid water units, the main controller extends K basic water units before and after each valid water unit. That is, it extends K basic water units in front of each valid water unit and K basic water units behind each valid water unit. Furthermore, it generates the next day's reservation time slot based on the valid water units in at least one day's water usage records and the K basic water units extended before and after them. This improves the timeliness of hot water supply and user experience, while the extension range is small, avoiding energy waste caused by excessive preheating.

[0045] Understandably, the main controller will use the time periods corresponding to all the expanded basic water units as the reservation time periods for the next day. However, if the expanded effective water units exceed the entire day's range (e.g., expansion before the 1st unit or expansion after the 288th unit), only the effective portion within the entire day's range will be selected.

[0046] In this embodiment, the start and end times of the reservation time period are determined by a unified mathematical calculation formula, achieving a precise conversion from effective water use units to specific reservation times. This ensures the calculability and reproducibility of the control method, and the generation of reservation time periods can be completed automatically without manual intervention. Specifically, the calculation formula for the starting scale of the reservation time period for the next day is: T1 = (K1 - K) × T0, where T1 is the starting scale, K1 is the minimum sequence number of the effective water use unit, K is the number of extensions of the basic water use unit, and T0 is the duration of a single basic water use unit; the calculation formula for the ending scale of the reservation time period for the next day is: T2 = (K2 + K + 1) × T0, where T2 is the ending scale, and K2 is the maximum sequence number of the effective water use unit.

[0047] The gas water heater control method provided in this embodiment only activates the circulation pump for preheating during the scheduled time period, avoiding energy waste caused by continuous 24-hour circulating heating. When the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, the main controller sends a start signal to the circulation pump, and the circulation pump starts working, circulating the cold water in the pipes to the heat exchanger for heating, thus achieving pipe preheating. The main controller continuously monitors the current time scale of the gas water heater. When the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day, the main controller sends a stop signal to the circulation pump, the circulation pump stops working, and the water heater enters standby mode, further reducing unnecessary energy consumption.

[0048] Furthermore, if the user actually uses water during the scheduled time slot the following day, the circulation pump will continue to operate until the user finishes using the water. This mechanism ensures that the user experience is not affected by the end of the scheduled time slot. Additionally, if the user continues to use water after the scheduled time slot ends the following day, the circulation pump will remain operational until the user finishes using the water, and then enter standby mode.

[0049] The technical solution of this invention divides the entire day into N basic water usage units of equal duration, establishes a mapping relationship between each basic water usage unit and binary bits in the storage space, and stores the daily water usage records of each basic water usage unit in a data frame of preset byte length, achieving low storage resource consumption and reducing hardware costs. Furthermore, it determines whether a basic water usage unit is a valid water usage unit based on the cumulative water usage duration within each unit, and sets the binary bit corresponding to the valid water usage unit as a first value, thereby dynamically capturing the periodic changes in user water usage habits and accurately matching user water usage habits. In addition, it generates a scheduled time slot for the next day based on the valid water usage units in at least one day's water usage records, and starts the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time slot for the next day, and controls the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time slot for the next day, achieving heating only during the scheduled time slot, avoiding invalid circulation, and significantly reducing energy consumption.

[0050] Based on the same inventive concept Figure 3 This is a flowchart illustrating a gas water heater control method provided in an embodiment of the present invention. Based on the previous embodiments, this embodiment automatically generates precise hot water reservation time slots by dynamically analyzing the user's recent water usage patterns. This ensures an "instant hot water" experience while minimizing energy consumption, providing an optional implementation method. Figure 3 As shown, the control method for this gas water heater includes: S210, Obtain the current device time of the gas water heater.

[0051] S211. If the gas water heater is connected to the network, calibrate the current device time through the network time protocol and convert the calibrated current device time into an absolute time scale in minutes.

[0052] S212. If the gas water heater is not connected to the network, set the initial time when the gas water heater is powered on to 0, and obtain each basic water unit by increasing the time through the built-in clock and other means.

[0053] It is understandable that regardless of whether the gas water heater is connected to the network or not, the basic water use units can be accurately divided. Based on this, the daily water use records of each basic water use unit are further recorded. That is, step S220 can be executed after steps S211 and S212.

[0054] S220. Divide the entire day into N basic water use units of equal duration, establish a mapping relationship between each basic water use unit and binary bits in the storage space, and store the water use records of each basic water use unit for each day in a data frame of preset byte length.

[0055] S231. If the cumulative water usage time in each basic water unit is greater than or equal to the preset time threshold, the corresponding basic water unit is determined to be a valid water unit, and the binary bit corresponding to the basic water unit determined to be a valid water unit is set to the first value.

[0056] S232. If the cumulative water usage time in each basic water unit is less than the preset time threshold, the corresponding basic water unit is determined to be an invalid water unit, and the binary bit corresponding to the basic water unit determined to be an invalid water unit is set to the second value.

[0057] S240. Obtain the number of days of historical water usage records that have been stored, starting from the current date.

[0058] S251. If the number of historical water usage records is less than the set number of records, then extract all the valid water usage units identified in the historical water usage records and generate the reservation time slot for the next day.

[0059] S252. If the number of historical water usage records exceeds the set number of records, then extract all valid water usage units identified in the most recent set number of records and generate a reservation time slot for the next day.

[0060] For example, taking a 7-day record period as an example, the earliest historical records within the set record period (e.g., the earliest water usage records of day 1 and day 2 in the last 7 days) are merged for analysis, while the remaining record days are analyzed independently (e.g., the water usage records of day 3, day 4, day 5, day 6, and day 7 in the last 7 days are each treated as five independent analysis dimensions). All valid water usage units identified in the merged historical records and all valid water usage units identified in the independent remaining record days are extracted. This preserves the overall 7-day analysis window while avoiding over-reliance on earlier single-day data, improving the robustness and accuracy of water usage behavior analysis. Furthermore, the next day's reservation time slot is generated based on the extracted results.

[0061] Understandably, the earliest historical record from the set record period is merged for analysis. This involves performing a logical OR operation on the binary bits of the same basic water use unit position on day 1 and day 2. For example, if the binary bit corresponding to the 20th basic water use unit on day 1 is the first value (i.e., a valid water use unit), and the binary bit corresponding to the 20th basic water use unit on day 2 is the second value (i.e., an invalid water use unit), then after merging, the binary bit corresponding to the 20th basic water use unit will be the first value, indicating a valid water use unit. Conversely, if the binary bits corresponding to the 20th basic water use unit on both day 1 and day 2 are the second value, then after merging, the binary bit corresponding to the 20th basic water use unit will be the second value, indicating an invalid water use unit.

[0062] Based on this, referring to Table 1 below, taking the expansion of each effective water use unit by K=2 basic water use units before and after it as an example, the effective water use units extracted on the seventh day are the 7th and 8th positions. Then, the 5th and 6th positions are expanded before the 7th position, and the 8th and 9th positions are expanded after it. The 6th and 7th positions are expanded before the 8th position, and the 9th and 10th positions are expanded after it. Thus, the effective water use units corresponding to the reservation time period on the eighth day are expanded to the 5th to the 10th positions. In this embodiment, the effective water use units from the second to the sixth day also need to be considered. Finally, the effective water use units corresponding to the reservation time period on the eighth day are expanded to the 4th to the 10th positions.

[0063] Table 1. Example of determining the next day's reservation time slot S260. When the current time scale of the gas water heater reaches the beginning scale of the scheduled time period for the next day, the circulation pump in the gas water heater is started for preheating, and when the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day, the circulation pump is controlled to stop working.

[0064] In this embodiment, the start and end times of the reservation time period are determined by a unified mathematical calculation formula, which realizes the accurate conversion from effective water use unit to specific reservation time, ensuring the computability and reproducibility of the control method, and automatically completing the generation of reservation time periods without manual intervention. For example, taking the 20th and 21st effective water units as an example, K1=20, K2=21, K=2, T0=5 minutes, then the starting scale of the next day's reservation time period T1=(20-2)×5=90 (minutes), that is, a 90-minute scale, corresponding to the time 1:30. The ending scale of the next day's reservation time period T2=(21+2+1)×5=120 (minutes), that is, a 120-minute scale, corresponding to the time 2:00. Thus, the reservation time period for the next day is from 1:30 to 2:00. That is, when the current time scale of the gas water heater reaches 1:30, the circulation pump in the gas water heater is started for preheating. Preheating is carried out from 1:30 to 2:00, and the circulation pump is controlled to stop working when the current time scale of the gas water heater reaches 2:00.

[0065] Based on the same inventive concept Figure 4 This is a schematic diagram of a gas water heater control device provided in an embodiment of the present invention. Figure 4 As shown, the gas water heater control device includes: The water usage record establishment module 310 is used to divide the entire day into N basic water usage units of equal duration, establish the mapping relationship between each basic water usage unit and binary bits in the storage space, and store the water usage records of each basic water usage unit for each day in a data frame of preset byte length. The effective water use unit determination module 320 is used to determine whether the corresponding basic water use unit is an effective water use unit based on the cumulative water use time in each basic water use unit, and set the binary bit corresponding to the basic water use unit that is determined to be an effective water use unit to the first value. The gas water heater control module 330 is used to generate a scheduled time period for the next day based on valid water usage units in at least one day's water usage records, and to start the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, and to control the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day.

[0066] Optionally, the validity of a basic water-using unit can be determined based on the cumulative water usage time within each basic water-using unit. Specifically, this can be used for: If the cumulative water usage time in each basic water usage unit is greater than or equal to the preset time threshold, then the corresponding basic water usage unit is determined to be a valid water usage unit. If the cumulative water usage time in each basic water unit is less than the preset time threshold, the corresponding basic water unit is determined to be an invalid water unit, and the binary bit corresponding to the basic water unit determined to be an invalid water unit is set to the second value.

[0067] Optionally, a reservation time slot for the next day can be generated based on valid water usage units from at least one day's water usage records, specifically for: Retrieve the number of days of historical water usage records that have been stored, starting from the current date. If the number of historical water usage records is less than the set number of records, then all valid water usage units identified in the historical water usage records will be extracted to generate a reservation time slot for the next day. If the number of historical water usage records exceeds the set number of records, all valid water usage units identified in the most recent set number of records will be extracted to generate a reservation time slot for the next day.

[0068] Optionally, all valid water usage units identified in the most recently set record days can be extracted to generate a reservation time slot for the next day, specifically for: The earliest historical record days in the set record days are merged and analyzed, and the remaining record days are analyzed independently. All valid water use units identified in the merged historical record days and all valid water use units identified in the independent record days are extracted. The next day's appointment time slot is generated based on the extracted results.

[0069] Optionally, a reservation time slot for the next day can be generated based on valid water usage units from at least one day's water usage records, specifically for: Extend K basic water-using units before and after each effective water-using unit; The next day's reservation time slot is generated based on the valid water usage units in at least one day's water usage records and the K basic water usage units before and after them.

[0070] Optionally, the formula for calculating the starting scale of the next day's reservation time period is: T1 = (K1 - K) × T0, where T1 is the starting scale, K1 is the minimum sequence number of the effective water unit, K is the number of extensions of the basic water unit, and T0 is the duration of a single basic water unit. The formula for calculating the end mark of the next day's reserved time slot is: T2 = (K2 + K + 1) × T0, where T2 is the end mark and K2 is the maximum sequence number of the effective water use unit.

[0071] Optionally, the gas water heater control device may also include: The time control module is used to obtain the current device time of the gas water heater; If the gas water heater is connected to the network, the current device time is calibrated using the Network Time Protocol and then converted into an absolute time scale in minutes. If the gas water heater is not connected to the network, the initial time when the gas water heater is powered on is set to 0, and the time increments through the built-in clock and other means are used to obtain the time for each basic water unit.

[0072] The gas water heater control device provided in the embodiments of the present invention can execute the gas water heater control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the gas water heater control method.

[0073] Based on the same inventive concept, this invention provides a gas water heater, which includes a circulation pump for circulating and preheating hot water in the gas water heater pipes. The gas water heater also includes a main controller, a water flow sensor, a timer, a clock module, and a storage module. The main controller is electrically connected to the circulation pump, the water flow sensor, the timer, the clock module, and the storage module, respectively. The main controller is used to execute the gas water heater control method provided in this invention.

[0074] Figure 5 A schematic diagram of the structure of a gas water heater 410 that can be used to implement an embodiment of the present invention is shown. Figure 5 As shown, the gas water heater 410 also includes at least one processor 411 and a memory, such as a read-only memory (ROM 412) or a random access memory (RAM 413), communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 can also store various programs and data required for the operation of the gas water heater 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An I / O (input / output) interface 415 is also connected to the bus 414.

[0075] Multiple components in the gas water heater 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, optical disk, etc.; and a communication unit 419, such as a network card, modem, wireless transceiver, etc. The communication unit 419 allows the gas water heater 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0076] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as gas water heater control methods.

[0077] In some embodiments, the gas water heater control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded into and / or installed on the gas water heater 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the gas water heater control method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to perform the gas water heater control method by any other suitable means (e.g., by means of firmware).

[0078] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0079] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0080] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0081] To provide interaction with the user, the systems and techniques described herein can be implemented on a gas water heater having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the gas water heater. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0082] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0083] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0084] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0085] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for controlling a gas water heater, characterized in that, include: The entire day is divided into N basic water use units of equal duration. A mapping relationship is established between each basic water use unit and binary bits in the storage space. The water use records of each basic water use unit are stored in a data frame of preset byte length. Based on the cumulative water usage time within each basic water unit, determine whether the corresponding basic water unit is a valid water unit, and set the binary bit corresponding to the basic water unit that is determined to be a valid water unit to the first value. The system generates a scheduled time period for the next day based on valid water usage units from at least one day's water usage records. When the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, the system starts the circulation pump in the gas water heater for preheating. When the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day, the system controls the circulation pump to stop working.

2. The gas water heater control method according to claim 1, characterized in that, Determining whether a basic water-using unit is a valid water-using unit based on the cumulative water usage time within each basic water-using unit includes: If the cumulative water usage time in each of the basic water usage units is greater than or equal to a preset time threshold, then the corresponding basic water usage unit is determined to be a valid water usage unit. If the cumulative water usage time in each of the basic water usage units is less than the preset time threshold, then the corresponding basic water usage unit is determined to be an invalid water usage unit, and the binary bit corresponding to the basic water usage unit determined to be an invalid water usage unit is set to the second value.

3. The gas water heater control method according to claim 1, characterized in that, The next day's reservation time slot is generated based on valid water usage units from at least one day's water usage records, including: Retrieve the number of days of historical water usage records that have been stored, starting from the current date. If the number of historical water usage records is less than the set number of records, then all valid water usage units identified in the historical water usage records will be extracted to generate a reservation time slot for the next day. If the number of historical water usage records exceeds the set number of records, then all valid water usage units identified in the most recent set number of records will be extracted to generate a reservation time slot for the next day.

4. The gas water heater control method according to claim 3, characterized in that, Extract all valid water usage units identified from the most recently set record days and generate the reservation time slots for the next day, including: The earliest historical record days in the set record days are merged and analyzed, and the remaining record days are analyzed independently. All valid water use units identified in the merged historical record days and all valid water use units identified in the independent record days are extracted. The next day's appointment time slot is generated based on the extracted results.

5. The gas water heater control method according to claim 1, characterized in that, The next day's reservation time slot is generated based on valid water usage units from at least one day's water usage records, including: Each effective water-using unit is extended by K basic water-using units before and after it; The next day's reservation time slot is generated based on the valid water usage units in at least one day's water usage records and the K basic water usage units before and after them.

6. The gas water heater control method according to claim 5, characterized in that, The formula for calculating the starting scale of the next day's reservation time period is: T1 = (K1 - K) × T0, where T1 is the starting scale, K1 is the minimum sequence number of the effective water unit, K is the number of basic water units, and T0 is the duration of a single basic water unit. The formula for calculating the end mark of the next day's reservation time period is: T2 = (K2 + K + 1) × T0, where T2 is the end mark and K2 is the maximum sequence number of the effective water use unit.

7. The gas water heater control method according to claim 1, characterized in that, Before dividing the entire day into N equal-length basic water usage units, the following is also included: Obtain the current device time of the gas water heater; If the gas water heater is connected to the network, the current device time is calibrated using the Network Time Protocol and the calibrated current device time is converted into an absolute time scale in minutes. If the gas water heater is not connected to the network, the initial time when the gas water heater is powered on is set to 0, and the duration of each basic water unit is obtained by incrementing the time through the built-in clock.

8. A control device for a gas water heater, characterized in that, include: The water usage record establishment module is used to divide the entire day into N basic water usage units of equal duration, establish a mapping relationship between each basic water usage unit and binary bits in the storage space, and store the water usage records of each basic water usage unit for each day in a data frame of preset byte length. The effective water use unit determination module is used to determine whether the corresponding basic water use unit is an effective water use unit based on the cumulative water use time in each basic water use unit, and set the binary bit corresponding to the basic water use unit that is determined to be an effective water use unit to a first value. A gas water heater control module is used to generate a scheduled time period for the next day based on valid water usage units in at least one day's water usage records, and to start the circulation pump in the gas water heater for preheating when the current time scale of the gas water heater reaches the start scale of the scheduled time period for the next day, and to control the circulation pump to stop working when the current time scale of the gas water heater reaches the end scale of the scheduled time period for the next day.

9. A gas water heater, characterized in that, The gas water heater includes a circulation pump, which is used to circulate and preheat the hot water in the gas water heater pipes. The gas water heater also includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the gas water heater control method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the gas water heater control method according to any one of claims 1-7.