Water softener outlet water hardness control method and device, water softener and storage medium
By combining a water hardness prediction model and an inlet water mixing control valve, the hardness of the water output from the water softener is dynamically adjusted, solving the problem that the fixed hardness of the output water in the existing technology cannot meet diverse needs, and realizing precise adjustment and personalized control of the hardness of the water output from the water softener.
Patent Information
- Application Number
- CN202510847917.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-11-11
AI Technical Summary
Existing water softener output hardness control schemes are fixed and cannot meet the diverse needs of different users for water hardness, especially the differentiated requirements of industrial and household users in different usage scenarios.
By using the total dissolved solids in the water entering the water softener and the water exiting the softening unit, the hardness of the water exiting the softener is predicted in real time using a softened water hardness prediction model. The hardness of the water exiting the softener is then dynamically controlled by adjusting the water entering ratio through an inlet mixing control valve.
It enables precise adjustment of the hardness of the water output from the water softener, meeting the personalized needs of different users for hardness, and improving user experience and water usage efficiency.
Smart Images

Figure CN120922937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water softener technology, and in particular to a method, device, water softener, and storage medium for controlling the hardness of water output from a water softener. Background Technology
[0002] A water softener is an electrical device that softens hard tap water. Current water softeners typically control the hardness of the output water within a pre-defined range by the manufacturer through fixed-cycle regeneration. However, different users, or even the same user with different usage scenarios, have varying requirements for the hardness of the output water. For example, industrial users and residential users often have different requirements, and even within residential settings, the requirements differ between drinking and bathing. Therefore, existing fixed-range hardness control schemes cannot meet users' needs for water with varying hardness levels. Summary of the Invention
[0003] This invention provides a method, device, water softener, and storage medium for controlling the hardness of water output from a water softener, which can meet users' water needs for water with different hardness levels.
[0004] In a first aspect, embodiments of the present invention provide a method for controlling the hardness of water output from a water softener. The water softener includes a first connecting pipe and a second connecting pipe. The water inlet pipe of the water softener is connected to the water outlet pipe of the water softener through the first connecting pipe. An inlet mixing control valve is provided on the first connecting pipe. The outlet of the softening unit of the water softener is connected to the water outlet pipe of the water softener through the second connecting pipe. The method includes: predicting the hardness of the water output from the softening unit of the water softener based on the total dissolved solids in the water inlet of the water softener and the total dissolved solids in the water output of the corresponding softening unit using a softened water hardness prediction model.
[0005] Obtain the user-set target effluent hardness, and determine the target state of the inlet mixing control valve based on the inlet hardness of the water softener, the effluent hardness of the softening unit, and the target effluent hardness to obtain the target inlet valve state; and
[0006] The valve state of the inlet water mixing control valve is set to the target inlet water valve state to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
[0007] Secondly, embodiments of the present invention provide a water softener outlet water hardness control device. The water softener includes a first connecting pipe and a second connecting pipe. The water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe. An inlet mixing control valve is provided on the first connecting pipe. The water softener softening unit outlet is connected to the water softener outlet pipe through the second connecting pipe. The device includes:
[0008] The softening unit outlet water hardness acquisition module is used to predict the softening unit outlet water hardness of the water softener based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the outlet water of the corresponding softening unit through a softened water hardness prediction model.
[0009] The target inlet valve status acquisition module is used to acquire the user-set target outlet water hardness, and determine the target status of the inlet mixing control valve based on the inlet water hardness of the water softener, the outlet water hardness of the softening unit, and the target outlet water hardness; and
[0010] The water outlet control module is used to set the valve state of the inlet water mixing control valve to the target inlet water valve state, so as to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
[0011] Thirdly, embodiments of the present invention also provide a water softener, including: a first connecting pipe and a second connecting pipe; the water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe, the first connecting pipe is provided with an inlet mixing control valve, and the water softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe; the water softener further includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the water softener outlet hardness control method as described in any embodiment of the present invention.
[0012] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the water softener outlet hardness control method as described in any of the embodiments of the present invention.
[0013] This invention provides a method, device, water softener, and storage medium for controlling the hardness of water from a water softener. First, based on the total dissolved solids in the water entering the water softener and the total dissolved solids in the water leaving the corresponding softening unit, a water hardness prediction model is used to predict the hardness of the water leaving the softening unit. This model can accurately determine the hardness of the water leaving the softening unit in real time based on the relationship between the total dissolved solids in the water entering the water softener, the total dissolved solids in the water leaving the softening unit, and the hardness of the water leaving the softening unit. Further, this invention obtains the user-set target hardness of the water leaving the softener and determines the target state of the inlet mixing control valve based on the hardness of the water entering the water softener, the hardness of the water leaving the softening unit, and the target hardness of the water leaving the softener. The valve state of the inlet mixing control valve is then set to the target inlet valve state. This allows for real-time adjustment of the valve state of the inlet mixing valve based on changes in the total dissolved solids in the water entering the water softener and the total dissolved solids in the water leaving the softening unit, thereby ensuring that the hardness of the water leaving the softener reaches the user-set target hardness and meeting the water usage needs for water with different hardness levels. Attached Figure Description
[0014] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating a method for controlling the hardness of water output from a water softener provided in an embodiment of the present invention.
[0016] Figure 2 This is another flowchart illustrating the water hardness control method for a water softener provided in this embodiment of the invention;
[0017] Figure 3 This is another flowchart illustrating the water hardness control method for a water softener provided in this embodiment of the invention;
[0018] Figure 4 This is another flowchart illustrating the water hardness control method for a water softener provided in this embodiment of the invention;
[0019] Figure 5 This is a schematic diagram of a water softener outlet hardness control device provided in an embodiment of the present invention;
[0020] Figure 6 This is a schematic diagram of a water softener provided in an embodiment of the present invention;
[0021] Figure 7This is another structural schematic diagram of the water softener provided in an embodiment of the present invention. Detailed Implementation
[0022] 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.
[0023] 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 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.
[0024] Figure 1 This is a flowchart illustrating a method for controlling the hardness of water output from a water softener according to an embodiment of the present invention. This method can be executed by a water softener hardness control device provided in this embodiment, which can be implemented using software and / or hardware. In a specific embodiment, the device is integrated into a water softener, which includes a first connecting pipe and a second connecting pipe. The water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe. An inlet mixing control valve is installed on the first connecting pipe. The softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe. The following embodiments will illustrate this using the integration of the device into a water softener as an example. (Reference) Figure 1 The method may specifically include the following steps:
[0025] Step 101: Based on the total dissolved solids in the water entering the water softener and the total dissolved solids in the water leaving the corresponding softening unit, the hardness of the softened water leaving the softening unit is predicted using a softened water hardness prediction model. This step can accurately determine the hardness of the softened water leaving the unit in real time based on the relationship between the total dissolved solids in the water entering the water softener, the total dissolved solids in the water leaving the softening unit, and the hardness of the softened water leaving the unit. This facilitates determining the target state of the inlet mixing control valve based on the hardness of the softened water leaving the unit, combined with the target hardness of the water leaving the unit and the hardness of the water softener.
[0026] Specifically, the water softener in this embodiment of the invention can be a water softener for household users to optimize daily water use, or a water softener for industrial users to optimize industrial water use to improve product quality and protect production equipment.
[0027] Specifically, step 101 can be initiated in response to a user's water usage command or in response to a user's target water hardness setting command.
[0028] Specifically, the total dissolved solids (TDS) in the inlet water of the aforementioned water softener is the total dissolved solids (TDS) in the inlet water of the water softener, and the total dissolved solids in the outlet water of the corresponding outlet unit is the total dissolved solids in the outlet water of the water softener unit.
[0029] It is understandable that the total dissolved solids (DSS) in water refers to the total amount of all dissolved inorganic salts (such as calcium, magnesium, sodium, potassium, chloride ions, sulfate ions, etc.) and a small amount of organic matter in the water. Water hardness specifically refers to the total concentration of calcium and magnesium ions in the water, and water hardness is a part of the total DSS. In high-water-consumption scenarios, such as daily drinking water, water hardness is positively correlated with the total DSS. Therefore, changes in the total DSS in the influent of a water softener and the total DSS in the effluent from the softening unit can reflect the water purification effect of the softening unit. Thus, the hardness of the effluent from the softening unit can be calculated based on the total DSS in the influent of the water softener and the effluent from the softening unit.
[0030] Specifically, before step 101, the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit can be determined by methods such as conductivity method, ion-selective electrode method, optical method, and microwave method.
[0031] Specifically, based on the usage scenario of the water softener, one of the above methods can be selected to calculate the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit. For example, when treating the daily water used by household users, the conductivity method can be used for calculation.
[0032] Optionally, the softened water hardness prediction model includes a first softened water hardness prediction model based on a linear regression algorithm.
[0033] Optionally, the process of predicting the hardness of the softening unit's outlet water based on the total dissolved solids in the water softener's inlet and the total dissolved solids in the corresponding softening unit's outlet water using a softened water hardness prediction model includes: predicting the hardness of the softening unit's outlet water based on the water softener's inlet hardness, the total dissolved solids in the inlet water, and the total dissolved solids in the outlet water using a first softened water hardness prediction model.
[0034] Specifically, before predicting the hardness of the softening unit's output water based on the hardness of the water entering the softener, the hardness can be determined using methods such as ion-selective electrode method, automatic titration method, or spectrophotometry, based on the hardness of the water entering the softener, the total dissolved solids in the water entering the softener, and the total dissolved solids in the output water.
[0035] It is understandable that, because water softeners utilize the ion exchange reaction of sodium ions in resin to replace calcium and magnesium ions in the water, which follows the law of mass action, the higher the hardness of the incoming water, the greater the concentration of calcium and magnesium ions in the solution. This requires the resin to adsorb more ions, and even if it is not saturated, more calcium and magnesium ions will remain due to reaction equilibrium, leading to increased hardness of the output water. Therefore, the hardness of the water output from the softening unit is closely related to the hardness of the water entering the softener. By using a linear regression model to learn the relationship between the hardness of the water output from the softening unit and the hardness of the water entering the softener, the total dissolved solids in the water entering the softener, and the total dissolved solids in the water output from the softening unit, the hardness of the water output from the softening unit can be efficiently determined based on these factors.
[0036] Optionally, the softened water hardness prediction model includes a second softened water hardness prediction model based on the gradient boosting regression tree algorithm.
[0037] Optionally, the process of obtaining the hardness of the softening unit's effluent based on the total dissolved solids in the water softener's influent and the total dissolved solids in the corresponding softening unit's effluent through a softened water hardness prediction model includes: predicting the hardness of the softening unit's effluent based on the water softener's instantaneous influent flow rate, water softener's influent temperature, the softening unit's cumulative softened water volume in this cycle, the total dissolved solids in the influent, and the total dissolved solids in the effluent through a second softened water hardness prediction model.
[0038] Specifically, the aforementioned cycle can be understood as the entire working phase of the softening unit from the completion of the last resin regeneration to the triggering of the next regeneration procedure.
[0039] Specifically, before predicting the hardness of the softened water output by the second softened water hardness prediction model based on the instantaneous inlet flow rate of the water softener, the inlet temperature of the water softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the inlet water, and the total dissolved solids in the outlet water, the instantaneous inlet flow rate of the water softener and the cumulative softened water volume of the softening unit in this cycle can be obtained by a flow meter or a water flow sensor.
[0040] It is understandable that water softeners use sodium ions (Na+) in the resin to soften water. + ) and calcium and magnesium ions in water (Ca2) + Mg2 +Softening occurs through an ion exchange reaction, which requires sufficient contact time for ions to fully exchange. Therefore, the instantaneous flow rate of the inlet water in a water softener affects the hardness of the water output from the softening unit. The resin layer of a water softener has a fixed ion exchange capacity, meaning the total amount of calcium and magnesium ions that the resin can adsorb is limited. The sodium ions (Na+) in the resin after regeneration... + When the resin is fully filled, its exchange capacity is close to 100%, resulting in the highest softening efficiency in the initial stage. As the resin continuously adsorbs calcium and magnesium ions, sodium ions are gradually replaced, leading to an increase in resin saturation and a decrease in the remaining exchange capacity. Therefore, the hardness of the water effluent from the softening unit is closely related to the cumulative amount of softened water in this cycle. In addition, the water temperature also affects the exchange reaction. Specifically, higher water temperatures result in higher ion activity, better softening effect, and lower water hardness, while lower temperatures result in poor softening effect and higher water hardness. Therefore, the hardness of the water effluent from the softening unit is related to the inlet water temperature.
[0041] Therefore, based on the instantaneous inlet flow rate of the water softener, the inlet temperature of the water softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the inlet water, and the total dissolved solids in the outlet water, the embodiments of the present invention can more accurately determine the outlet water hardness of the softening unit through gradient boosting regression tree, so as to better meet the target outlet water hardness required by customers.
[0042] Step 102: Obtain the user-set target outlet water hardness, and determine the target state of the inlet water mixing control valve based on the softener inlet water hardness, softening unit outlet water hardness, and target outlet water hardness. This step can determine the valve state of the inlet water mixing control valve in real time to meet the target outlet water hardness requirements based on the changes in the total dissolved solids in the softener inlet water and the total dissolved solids in the softening unit outlet water, the softener inlet water hardness, and the target outlet water hardness. This facilitates setting the inlet water mixing control valve to the target state to control the proportion of softener inlet water mixed in the softener outlet water.
[0043] Specifically, after each softening regeneration cycle, the user can fill in the target effluent hardness through the client's user interface; the process of obtaining the user-set target effluent hardness includes obtaining the target effluent hardness filled in by the user through the user interface.
[0044] Optionally, the inlet mixing control valve is a ball valve.
[0045] Optionally, the process of determining the target state of the inlet water mixing control valve based on the inlet water hardness of the water softener, the outlet water hardness of the softening unit, and the target outlet water hardness includes:
[0046] The target flow area ratio of the ball valve is determined based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water hardness, and the cross-sectional areas of the first connecting pipe and the water softener outlet pipe.
[0047] Specifically, the process of determining the target flow area ratio of the ball valve based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water hardness, and the cross-sectional areas of the first connecting pipe and the water softener outlet pipe can be based on the following formula:
[0048]
[0049] Where K represents the flow area ratio, D1 represents the cross-sectional area of the first connecting pipe, D2 represents the cross-sectional area of the second connecting pipe, and H... o1 H represents the hardness of the water output from the softening unit. o2 This indicates the target water hardness.
[0050] Specifically, the flow area ratio of the ball valve can be determined based on the water pressure of the first connecting pipe and the second connecting pipe, the cross-sectional area of the first connecting pipe and the water softener outlet pipe, the hardness of the water inlet of the water softener, the hardness of the water outlet of the softening unit, and the target water outlet hardness.
[0051] Specifically, the aforementioned inlet mixing control valve can also be other types of valves, such as butterfly valves, gate valves, or stop valves.
[0052] Specifically, when the aforementioned inlet water mixing control valve is another type of valve, the process of determining the target state of the inlet water mixing control valve based on the hardness of the water inlet of the water softener, the hardness of the water outlet of the softening unit, and the target water outlet hardness can also include: determining the valve opening of the inlet water mixing control valve based on the hardness of the water inlet of the water softener, the hardness of the water outlet of the softening unit, and the target water outlet hardness.
[0053] Step 103: Set the inlet mixing control valve to the target inlet valve state to control the ratio of inlet water to outlet water, ensuring the outlet water hardness reaches the target hardness. Building upon steps 101 and 102, this step adjusts the inlet mixing valve in real-time based on changes in the total dissolved solids in the inlet water and the total dissolved solids in the outlet water, thereby achieving the user-set target hardness and meeting water usage needs for different hardness levels.
[0054] Optionally, the process of setting the valve state of the inlet mixing control valve to the target inlet valve state includes setting the flow area ratio of the ball valve to the target flow area ratio.
[0055] Specifically, when the aforementioned inlet mixing control valve is another type of valve, the process of setting the valve state of the inlet mixing control valve to the target inlet valve state may include: setting the valve opening degree of the inlet mixing control valve to the target opening degree.
[0056] The following further describes the method for controlling the hardness of water output from a water softener provided in the embodiments of the present invention.
[0057] Optionally, the target effluent hardness is a hardness range.
[0058] Optional, such as Figure 2 As shown, the water hardness control method for a water softener provided in this embodiment of the invention includes the following steps:
[0059] Step 201: Based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit, the hardness of the effluent from the softening unit is predicted using a softened water hardness prediction model.
[0060] Step 202: Obtain the target hardness of the outlet water set by the user, and determine whether the hardness range of the target outlet water hardness is less than the hardness range threshold.
[0061] Specifically, the aforementioned hardness range threshold can be determined based on the prediction accuracy of the first and second softened water hardness prediction models.
[0062] Step 203: When the hardness range of the target effluent hardness is less than the hardness range threshold, the hardness of the effluent from the softening unit is predicted by the second softened water hardness prediction model based on the instantaneous influent flow rate of the softener, the influent temperature of the softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the influent, and the total dissolved solids in the effluent.
[0063] Step 204: When the hardness range of the target effluent hardness is not less than the hardness range threshold, the hardness of the effluent from the softening unit is predicted by the first softened water hardness prediction model based on the hardness of the water entering the softener, the total amount of dissolved solids in the water entering the softener, and the total amount of dissolved solids in the effluent.
[0064] It is understandable that the first softened water hardness prediction model based on linear regression algorithm has high prediction efficiency when predicting the hardness of the softened water output, while the second softened water hardness prediction model based on gradient boosting regression tree algorithm has high prediction accuracy. In this embodiment of the invention, when the target hardness range of the softened water is large and the prediction result does not need to be overly precise, the first softened water hardness prediction model can be used to predict the hardness of the softened water output. This can improve prediction efficiency while meeting user hardness requirements, thereby improving overall mixing efficiency and user experience. When the target hardness range of the softened water is small and the prediction result requires higher precision, the second softened water hardness prediction model can be used to predict the hardness of the softened water output. This allows for more accurate prediction of the softened water output hardness, resulting in a control result that is closer to the target hardness when controlling the hardness of the water softener, thus improving user experience.
[0065] The following further describes the water hardness control method for the water softener provided in the embodiments of the present invention, such as... Figure 3 As shown, the following steps may be included:
[0066] Step 301: Establish the water-soluble solids change term based on the total dissolved solids in the influent, the total dissolved solids in the effluent, and the solids change coefficient.
[0067] Specifically, the coefficient of variation of the total amount of solids mentioned above is a constant, and its value range can be [0,3].
[0068] Specifically, the specific value of the coefficient of variation of total solids can be determined within the above-mentioned range based on the duration of the current cycle or the estimated remaining duration.
[0069] Specifically, the change in water-soluble solids mentioned above can be expressed as:
[0070] α(TDS o -TDS i )
[0071] Where α represents the coefficient of variation of total solids, TDS o TDS represents the total dissolved solids in the effluent. i This indicates the total amount of dissolved solids in the influent.
[0072] Step 302: Establish a first softened water hardness prediction model based on the change in hardness of the water entering the water softener and the change in dissolved solids in water.
[0073] Specifically, the aforementioned first softening hardness prediction model can be expressed as:
[0074] H o1 =H i -α(TDS o -TDS i )
[0075] Among them, H o1 Indicates the hardness of the water output from the softening unit; H i This indicates the hardness of the incoming water.
[0076] Specifically, one can directly establish the total dissolved solids in the influent, the total dissolved solids in the effluent, and the hardness of the water entering the water softener, and then sum these items to establish the first softening hardness prediction model.
[0077] Step 303: Based on the hardness of the water entering the water softener, the total amount of dissolved solids in the water entering the water, and the total amount of dissolved solids in the water leaving the water, the hardness of the water leaving the softening unit is predicted using the first softened water hardness prediction model.
[0078] Step 304: Obtain the target outlet water hardness set by the user, and determine the target state of the inlet water mixing control valve based on the inlet water hardness of the water softener, the outlet water hardness of the softening unit, and the target outlet water hardness to obtain the target inlet water valve state.
[0079] Step 305: Set the valve state of the inlet water mixing control valve to the target inlet water valve state to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
[0080] The embodiments of the present invention provide a specific expression for the first softening hardness prediction model. Based on the first softening hardness prediction model provided by the embodiments of the present invention, the hardness of the effluent from the softening unit can be predicted relatively accurately.
[0081] The following further describes the method for controlling the hardness of water output from a water softener provided in the embodiments of the present invention.
[0082] Optionally, a softened water mixing control valve is installed on the softening unit connecting pipeline.
[0083] Optional, such as Figure 4 As shown, the following steps may be included:
[0084] Step 401: Based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit, the hardness of the effluent from the softening unit is predicted using a softened water hardness prediction model.
[0085] Step 402: Obtain the target outlet water hardness set by the user, and determine the target state of the inlet water mixing control valve based on the inlet water hardness of the water softener, the outlet water hardness of the softening unit and the target outlet water hardness to obtain the target inlet water valve state.
[0086] Step 403: Based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water hardness, the instantaneous flow rate of the water entering the water softener, and the state of the target water inlet valve, determine the target state of the softened water mixing control valve to obtain the target softened water valve state.
[0087] Specifically, the softened water mixing control valve mentioned above can be a ball valve, a butterfly valve, a gate valve, or a stop valve, or other types of valves.
[0088] Step 404: Set the valve state of the inlet water mixing control valve to the target inlet water valve state, so as to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
[0089] It is understandable that water pressure is often unstable in actual water use scenarios, such as during peak water usage times in the morning and evening (e.g., 7:00-9:00, 18:00-21:00), when water pressure drops significantly in top-floor or high-rise residential buildings. Therefore, this embodiment of the invention adjusts the valve state of the inlet water mixing control valve based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, and the target water hardness. It also adjusts the valve state of the softened water mixing control valve based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water hardness, the instantaneous flow rate of the water entering the water softener, and the target inlet valve state. This allows for precise control of the ratio of water entering the water softener and water exiting the softening unit mixed in the water exiting the water softener when the water pressure entering the water softener is unstable.
[0090] Figure 5 This is a structural diagram of a water softener outlet hardness control device provided in an embodiment of the present invention. The water softener includes a first connecting pipe and a second connecting pipe. The water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe. An inlet mixing control valve is provided on the first connecting pipe. The water softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe. This device is suitable for implementing the water softener outlet hardness control method provided in an embodiment of the present invention. Figure 5 As shown, the device may specifically include:
[0091] The softening unit outlet water hardness acquisition module 501 is used to predict the softening unit outlet water hardness based on the total dissolved solids in the water softener's inlet and the corresponding dissolved solids in the softening unit's outlet water using a softened water hardness prediction model. This module can accurately determine the softening unit outlet water hardness in real time based on the relationship between the total dissolved solids in the water softener's inlet and outlet water hardness, thus facilitating the determination of the target state of the inlet mixing control valve based on the softening unit outlet water hardness, combined with the target outlet water hardness and the water softener's hardness settings.
[0092] Optionally, the softened water hardness prediction model includes a first softened water hardness prediction model based on a linear regression algorithm.
[0093] Optionally, the softened water hardness prediction model includes a second softened water hardness prediction model based on the gradient boosting regression tree algorithm.
[0094] Optionally, the softening unit outlet water hardness acquisition module 501 can be specifically used to predict the softening unit outlet water hardness based on the softener inlet water hardness, inlet water total dissolved solids, and outlet water total dissolved solids through a first softened water hardness prediction model.
[0095] Optionally, the softening unit outlet water hardness acquisition module 501 can be specifically used to predict the softening unit outlet water hardness based on the instantaneous inlet flow rate of the water softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the inlet water, and the total dissolved solids in the outlet water, using a second softened water hardness prediction model.
[0096] The target inlet valve status acquisition module 502 is used to acquire the user-set target outlet water hardness and determine the target status of the inlet water mixing control valve based on the softener inlet water hardness, the softening unit outlet water hardness, and the target outlet water hardness. This module can determine the target status of the inlet water mixing control valve based on the softener inlet water hardness, the softening unit outlet water hardness, and the target outlet water hardness, thereby facilitating the setting of the inlet water mixing control valve to the target status to control the proportion of softener inlet water mixed in the softener outlet water.
[0097] Optionally, the inlet mixing control valve is a ball valve.
[0098] Optionally, the aforementioned target inlet valve status acquisition module 502 can be specifically used to determine the target flow area ratio of the ball valve based on the hardness of the water inlet of the water softener, the hardness of the water outlet of the softening unit, the target water outlet hardness, and the cross-sectional areas of the first connecting pipe and the water outlet pipe of the water softener.
[0099] Optionally, the target effluent hardness is a hardness range.
[0100] Optionally, the water softener outlet hardness control device provided in this embodiment of the invention further includes a judgment module for judging whether the hardness range of the target outlet water hardness is less than a hardness range threshold.
[0101] Optionally, the target inlet valve status acquisition module 502 can be specifically used to predict the hardness of the softening unit's outlet water based on the instantaneous inlet flow rate of the softener, the inlet temperature of the softener, the cumulative softened water volume of the softening unit in this cycle, the total amount of dissolved solids in the inlet water, and the total amount of dissolved solids in the outlet water when the hardness range of the target outlet water hardness is less than the hardness range threshold.
[0102] Optionally, the target inlet valve status acquisition module 502 can be specifically used to predict the hardness of the softening unit's outlet water based on the hardness of the softener's inlet water, the total amount of dissolved solids in the inlet water, and the total amount of dissolved solids in the outlet water when the hardness range of the target outlet water hardness is not less than the hardness range threshold.
[0103] Optionally, a softened water mixing control valve is provided on the softening unit connecting pipeline in this embodiment of the invention.
[0104] Optionally, the target inlet valve status acquisition module 502 can be specifically used to determine the target status of the softened water mixing control valve and obtain the target softened water valve status based on the hardness of the water entering the softener, the hardness of the water exiting the softening unit, the target water hardness, the instantaneous flow rate of the water entering the softener, and the target inlet valve status.
[0105] The water outlet control module 503 is used to set the valve state of the inlet mixing control valve to the target inlet valve state, thereby controlling the ratio of water entering the water softener to water exiting the water softener, ensuring that the hardness of the water softener outlet is the target hardness. This module, in conjunction with modules 501 and 502, can accurately set the valve state of the inlet mixing control valve connected to the water softener inlet, thus controlling the ratio of water from the softener unit to the water entering the water softener. This ensures that the hardness of the water softener outlet reaches the user-set target hardness, thereby meeting the water usage needs for water softener outlets with different hardness levels.
[0106] Optionally, the aforementioned water outlet control module 503 can be specifically used to set the flow area ratio of the ball valve to the target flow area ratio.
[0107] Optionally, the aforementioned water outlet control module 503 can be specifically used to set the water valve state of the softened water mixing control valve to the target softened water valve state.
[0108] Optionally, the water softener outlet hardness control device provided in this embodiment of the invention further includes a model building module, used to establish a water dissolved solids variation term based on the influent dissolved solids, the total dissolved solids in the influent, and the total dissolved solids in the outlet, before predicting the water softening unit outlet hardness using a first softened water hardness prediction model based on the influent dissolved solids, the total dissolved solids in the outlet, and the solids variation coefficient; and
[0109] A first model for predicting the hardness of softened water is established based on the changes in the hardness of the water entering the water softener and the amount of dissolved solids in the water.
[0110] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0111] This invention also provides a water softener, such as... Figure 6As shown, it includes a first connecting pipe and a second connecting pipe; the water inlet pipe of the water softener is connected to the water outlet pipe of the water softener through the first connecting pipe, and an inlet mixing control valve is provided on the first connecting pipe; the water outlet of the softening unit of the water softener is connected to the water outlet pipe of the water softener through the second connecting pipe.
[0112] Specifically, the water softener further includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the water hardness control method of the water softener provided in any of the above embodiments.
[0113] This invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the water hardness control method for a water softener provided in any of the above embodiments.
[0114] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the water hardness control method for a water softener as described in any of the embodiments of this invention.
[0115] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing embodiments of the present invention. Figure 7 The water softener shown is merely an example and should not be construed as limiting the functionality and scope of application of the embodiments of the present invention.
[0116] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0117] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0118] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0119] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0121] The modules and / or units described in the embodiments of this invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor may include a water hardness acquisition module for a water softening unit, a target inlet valve status acquisition module, and an outlet water control module. The names of these modules do not necessarily limit the functionality of the module itself.
[0122] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to: predict the hardness of the softening unit's effluent based on the total dissolved solids in the water softener's inlet and the total dissolved solids in the corresponding softening unit's effluent using a softened water hardness prediction model; obtain the user-set target effluent hardness, and determine the target state of the inlet mixing control valve based on the water softener's inlet hardness, the softening unit's effluent hardness, and the target effluent hardness to obtain the target inlet valve state; and set the valve state of the inlet mixing control valve to the target inlet valve state to control the ratio of water softener inlet to water softener effluent, so that the water softener effluent hardness is the target effluent hardness.
[0123] 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 occur depending on 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 the hardness of water output from a water softener, characterized in that, The water softener includes a first connecting pipe and a second connecting pipe. The water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe. An inlet mixing control valve is installed on the first connecting pipe. The water softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe. The method includes: The hardness of the softening unit's output water is predicted by a softened water hardness prediction model based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the output water of the corresponding softening unit. Obtain the user-set target effluent hardness, and determine the target state of the inlet mixing control valve based on the inlet hardness of the water softener, the effluent hardness of the softening unit, and the target effluent hardness to obtain the target inlet valve state; and The valve state of the inlet water mixing control valve is set to the target inlet water valve state to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
2. The method for controlling the hardness of water output from a water softener according to claim 1, characterized in that, The softened water hardness prediction model includes a first softened water hardness prediction model based on a linear regression algorithm. The hardness of the softening unit's effluent is obtained through a softened water hardness prediction model based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit. This includes: Based on the hardness of the water entering the water softener, the total amount of dissolved solids in the water entering the water, and the total amount of dissolved solids in the water leaving the water, the hardness of the water leaving the softening unit is predicted using a first softened water hardness prediction model.
3. The method for controlling the hardness of water output from a water softener according to claim 2, characterized in that, The softened water hardness prediction model includes a second softened water hardness prediction model based on the gradient boosting regression tree algorithm; The hardness of the softening unit's effluent is obtained through a softened water hardness prediction model based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit. This includes: Based on the instantaneous inlet flow rate of the water softener, the inlet temperature of the water softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the inlet water, and the total dissolved solids in the outlet water, the hardness of the outlet water of the softening unit is predicted by the second softened water hardness prediction model.
4. The method for controlling the hardness of water output from a water softener according to claim 3, characterized in that, The target effluent hardness is a hardness range; before the method predicts the effluent hardness of the softening unit based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit using a softened water hardness prediction model, the method further includes: Determine whether the hardness range of the target effluent is less than a hardness range threshold; The method of predicting the hardness of the softening unit's effluent based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the effluent of the corresponding softening unit using a softened water hardness prediction model includes: When the hardness range of the target effluent hardness is less than the hardness range threshold, the hardness of the effluent from the softening unit is predicted by a second softened water hardness prediction model based on the instantaneous influent flow rate of the softener, the influent temperature of the softener, the cumulative softened water volume of the softening unit in this cycle, the total dissolved solids in the influent, and the total dissolved solids in the effluent. When the hardness range of the target effluent hardness is not less than the hardness range threshold, the hardness of the effluent from the softening unit is predicted by a first softened water hardness prediction model based on the hardness of the water entering the softener, the total amount of dissolved solids in the water entering the softener, and the total amount of dissolved solids in the effluent.
5. The method for controlling the hardness of water output from a water softener according to claim 1, characterized in that, The inlet water mixing control valve is a ball valve. The process of determining the target state of the inlet water mixing control valve based on the hardness of the water softener inlet water, the hardness of the softening unit outlet water, and the target outlet water hardness includes: The target flow area ratio of the ball valve is determined based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water exit hardness, and the cross-sectional areas of the first connecting pipe and the water softener outlet pipe. Setting the valve state of the inlet mixing control valve to the target inlet valve state includes: Set the flow area ratio of the ball valve to the target flow area ratio.
6. The method for controlling the hardness of water output from a water softener according to claim 1, characterized in that, A softened water mixing control valve is installed on the connecting pipeline of the softening unit; The method further includes: Based on the hardness of the water entering the water softener, the hardness of the water exiting the softening unit, the target water exit hardness, the instantaneous flow rate of the water entering the water softener, and the state of the target water inlet valve, the target state of the softened water mixing control valve is determined to obtain the target softened water valve state. Set the water valve state of the softened water mixing control valve to the target softened water valve state.
7. The method for controlling the hardness of water output from a water softener according to claim 2, characterized in that, Before predicting the hardness of the softening unit's effluent based on the hardness of the water entering the softener, the total dissolved solids in the water entering the softener, and the total dissolved solids in the effluent, using a first softened water hardness prediction model, the method further includes: A water-soluble solids variation term is established based on the total dissolved solids in the influent, the total dissolved solids in the effluent, and the solids variation coefficient; and The first softened water hardness prediction model is established based on the hardness of the water entering the water softener and the change in dissolved solids in water.
8. A device for controlling the hardness of water output from a water softener, characterized in that, The water softener includes a first connecting pipe and a second connecting pipe. The water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe. An inlet mixing control valve is installed on the first connecting pipe. The water softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe. The device includes: The softening unit outlet water hardness acquisition module is used to predict the softening unit outlet water hardness of the water softener based on the total dissolved solids in the influent of the water softener and the total dissolved solids in the outlet water of the corresponding softening unit through a softened water hardness prediction model. The target inlet valve status acquisition module is used to acquire the user-set target outlet water hardness, and determine the target status of the inlet mixing control valve based on the inlet water hardness of the water softener, the outlet water hardness of the softening unit, and the target outlet water hardness; and The water outlet control module is used to set the valve state of the inlet water mixing control valve to the target inlet water valve state, so as to control the ratio of water entering the water softener to water exiting the water softener, so that the hardness of the water exiting the water softener is the target hardness.
9. A water softener, characterized in that, include: First connecting pipe and second connecting pipe; the water softener inlet pipe is connected to the water softener outlet pipe through the first connecting pipe, and an inlet mixing control valve is provided on the first connecting pipe; the water softening unit outlet of the water softener is connected to the water softener outlet pipe through the second connecting pipe. The water softener further includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the water hardness control method of the water softener as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the water hardness control method for the output water of the water softener as described in any one of claims 1 to 7.