Water outlet amount control method and device, computer device and storage medium
Patent Information
- Application Number
- CN202310232850.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-03-01
AI Technical Summary
[0004]本申请的主要目的为提供一种出水量控制方法、装置、计算机设备和存储介质,旨在解决流量计在检测出水总量时存在误差的问题
Smart Images

Figure CN116221989B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of water heater technology, and in particular to a method, apparatus, computer equipment, and storage medium for controlling water output. Background Technology
[0002] Flow meters are widely used in water heaters. As a precise measuring instrument, the flow meter's measurement error must be within the specified range (e.g., ±1%), otherwise the product quality will be substandard.
[0003] Currently, standard flow measurement devices are commonly used to test flow meter errors. However, after prolonged use, these devices are prone to clogging with dust and / or impurities, which can affect the high accuracy of flow meter testing and cause measurement errors. Therefore, reducing the error in detecting the total output water volume by flow meters has become an urgent problem to be solved. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, computer equipment, and storage medium for controlling water output, aiming to solve the problem of errors in flow meters when detecting total water output.
[0005] To achieve the aforementioned objective, this application proposes a water flow control method applied to a water heater. The water heater is equipped with a detection mechanism for detecting the total fluid volume of the water heater within a preset time period. The method includes:
[0006] The system acquires total data sent by the testing agency in real time, and obtains first target data and second target data based on the total data.
[0007] A relationship curve is determined based on the first target data and the second target data, and extreme values are obtained based on the relationship curve.
[0008] Based on the extreme value and the relationship curve, a tangent line is determined, and the tangent line is translated to the first position of the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain the first coordinate and the second coordinate.
[0009] The first coordinate and the second coordinate are calculated to obtain a ratio, and it is determined whether the ratio is greater than a preset first threshold.
[0010] If the ratio is not greater than the first threshold, the first target data is controlled within the numerical range of the first coordinate and the second coordinate so that the weight data of the fluid is within the error range.
[0011] Further, the first coordinate is (X1, Y1), the second coordinate is (X2, Y2), X1 is the x-coordinate of the first coordinate, Y1 is the y-coordinate of the first coordinate, X2 is the x-coordinate of the second coordinate, and Y2 is the y-coordinate of the second coordinate.
[0012] The step of calculating the ratio between the first coordinate and the second coordinate, and determining whether the ratio is greater than a preset first threshold, includes:
[0013] Substituting Y1 and Y2 into the function, we obtain |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2;
[0014] Calculate |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2 to obtain the first ratio and / or the second ratio;
[0015] Determine whether the first ratio and / or the second ratio are greater than a preset first threshold.
[0016] Furthermore, the first target data is water velocity data, and the second target data is pulse weight data;
[0017] The step of determining the relationship curve based on the first target data and the second target data, and obtaining the extreme value according to the relationship curve, includes:
[0018] A relationship curve was established based on the changes in water velocity data and pulse weight data.
[0019] Sample the points on the relationship curve corresponding to the appropriate water velocity region in the historical water velocity data;
[0020] The point set is tested, and the optimal point of the test is selected as the extreme value.
[0021] Further, the step of determining a tangent line based on the extreme value and the relationship curve, and translating the tangent line according to a preset rule to a first position on the relationship curve so that the tangent line intersects the relationship curve to obtain a first coordinate and a second coordinate, includes:
[0022] Obtain the slope of the tangent line at the extreme value;
[0023] Based on the slope and extrema of the tangent, the equation of the tangent is obtained as y = kx + b, where k ≠ 0;
[0024] The tangent is translated to the first position according to a preset rule, so that the equation of the tangent after the translation is y=kx+b1;
[0025] Calculate the intersection point of the equation of the tangent after the movement and the relationship curve to obtain the first coordinate and the second coordinate.
[0026] Further, after the step of controlling the first target data within the numerical range of the first and second coordinates so that the fluid weight data is within the error range if the ratio is not greater than the first threshold, the method includes:
[0027] By controlling the water velocity data to correspond to the numerical range of X1-X2, the pulse weight data is kept within the numerical range of Y1-Y2, thus preventing errors in the total fluid volume data.
[0028] Further, after the step of calculating the ratio between the first coordinate and the second coordinate, and determining whether the ratio is greater than a preset first threshold, the method further includes:
[0029] If the ratio is greater than the preset first threshold, the extreme value needs to be obtained again.
[0030] Furthermore, the detection mechanism is a flow meter, which is installed inside the water heater and is used to detect the total amount of fluid in the water heater within a preset time.
[0031] This application embodiment also provides a water output control device, including:
[0032] The first acquisition module is used to acquire total data sent by the testing agency in real time, and to acquire first target data and second target data based on the total data;
[0033] The second acquisition module is used to determine a relationship curve based on the first target data and the second target data, and to obtain extreme values based on the relationship curve.
[0034] The formulation module is used to formulate a tangent line based on the extreme value and the relationship curve, and to translate the tangent line to a first position of the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain a first coordinate and a second coordinate.
[0035] The calculation module is used to calculate the ratio between the first coordinate and the second coordinate, and determine whether the ratio is greater than a preset first threshold.
[0036] The control module is used to control the first target data within the numerical range of the first coordinate and the second coordinate if the ratio is not greater than a first threshold, so that the weight data of the fluid is within the error range.
[0037] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-described water output control methods.
[0038] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described water output control methods.
[0039] The water output control method, device, computer equipment, and storage medium of this application acquire total output data sent by a detection agency in real time. By analyzing this total output data, first target data and second target data are obtained. A relationship curve between the first target data and the second target data can be constructed. Since the changes in the first target data and the second target data within a preset time period are considered, the relationship curve can be constructed by collecting data. Extreme values are then obtained from the relationship curve. Based on the selected extreme values and the relationship curve, a tangent line to the relationship curve can be determined from the extreme values. This tangent line is then directed towards the relationship curve according to a preset rule. The line is shifted to one side, causing the tangent to intersect the relationship curve and obtain two intersection points, which are the first coordinate and the second coordinate, respectively. The first coordinate and the second coordinate are calculated to obtain a ratio, and it is determined whether the ratio is greater than a preset first threshold. If the result of the calculation of the first coordinate and the second coordinate does not exceed the preset first threshold, it proves that the selection of the first coordinate and the second coordinate is within the usable error range. Then, the data corresponding to the first coordinate and the second coordinate in the first target data can be used as the total data within the error range. The detection mechanism is continuously corrected by the first target data within the error range to stabilize the water volume within the error range. Attached Figure Description
[0040] Figure 1 This is a schematic flowchart of a water output control method according to an embodiment of this application;
[0041] Figure 2 This is a schematic block diagram of the water output control device according to an embodiment of this application;
[0042] Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.
[0043] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0045] Reference Figure 1 This application provides a water output control method applied to a water heater. The water heater is equipped with a detection mechanism for detecting the total fluid volume of the water heater within a preset time period. The method includes:
[0046] S1. Obtain the total data sent by the testing agency in real time, and obtain the first target data and the second target data based on the total data.
[0047] As described in step S1 above, in a water heater, the detection mechanism is prone to errors when detecting the total amount of water output. Therefore, it is necessary to continuously correct and reduce these errors. The total amount of water output = pulse weight × number of pulses. Thus, it is necessary to correct and control the water output to reduce the problems caused by these errors. By acquiring the total volume data sent by the detection mechanism in real time and analyzing this data, first target data and second target data are obtained. The detection mechanism can be a flow meter or other detector capable of detecting the weight of the flowing water. The first and second target data may include pulse weight or flow rate data within a preset time period.
[0048] S2. Determine the relationship curve based on the first target data and the second target data, and obtain the extreme value according to the relationship curve.
[0049] As described in step S2 above, a relationship curve between the first target data and the second target data can be constructed using the first target data and the second target data. Since the first target data and the second target data change within a preset time period, the relationship curve can be constructed by collecting data, and then the extreme value can be obtained from the relationship curve. The extreme value is generally the middle position of the relationship curve, which is the most suitable extreme value. The selection of this extreme value is the best position obtained by conducting multiple actual tests.
[0050] S3. Based on the extreme value and the relationship curve, determine the tangent line, and translate the tangent line to the first position of the relationship curve according to the preset rules, so that the tangent line intersects the relationship curve to obtain the first coordinate and the second coordinate.
[0051] As described in step S3 above, based on the selected extreme values and the relationship curve, a tangent line that is tangent to the relationship curve can be determined from the extreme values. The tangent line is then shifted to one side of the relationship curve according to a preset rule so that the tangent line intersects the relationship curve and two intersection points are obtained. The two intersection points are the first coordinate and the second coordinate, respectively.
[0052] S4. Calculate the ratio between the first coordinate and the second coordinate, and determine whether the ratio is greater than a preset first threshold.
[0053] As described in step S4 above, a ratio can be obtained by calculating the first coordinate and the second coordinate, and it is determined whether the ratio is greater than a preset first threshold, wherein the first threshold can be set to 5%.
[0054] S5. If the ratio is not greater than the first threshold, the first target data is controlled within the numerical range of the first coordinate and the second coordinate so that the weight data of the fluid is within the error range.
[0055] As described in step S5 above, if the calculated result of the first coordinate and the second coordinate does not exceed a preset first threshold of 5%, it proves that the selection of the first coordinate and the second coordinate is within the usable error range. Therefore, the data within the numerical range of the first and second coordinates in the first target data can be considered the total data within the error range. For example, if the first target data represents the horizontal axis and the second target data represents the vertical axis, and the first coordinate corresponds to position 3 on the horizontal axis while the second coordinate corresponds to position 7, then the data within the range of 3-7 in the first target data is within the error range. The detection mechanism is continuously corrected using the first target data within the error range to stabilize the water volume within the error range.
[0056] As described above, by acquiring the total data sent by the testing agency in real time and analyzing the total data, the first target data and the second target data are obtained. A relationship curve between the first target data and the second target data can be constructed. Since the changes in the first target data and the second target data within a preset time period are calculated, the relationship curve can be constructed by collecting data. The extreme values are then obtained from the relationship curve. Based on the selected extreme values and the relationship curve, a tangent line that is tangent to the relationship curve can be determined from the extreme values. The tangent line is shifted to one side of the relationship curve according to a preset rule so that the tangent line intersects the relationship curve and obtains two intersection points, which are the first coordinate and the second coordinate, respectively. A ratio can be obtained by calculating the first coordinate and the second coordinate, and it is determined whether the ratio is greater than a preset first threshold. If the result of calculating the first coordinate and the second coordinate does not exceed the preset first threshold, it proves that the selection of the first coordinate and the second coordinate is within the usable error range. The data within the numerical range of the first coordinate and the second coordinate in the first target data can be used as the total data within the error range. The testing agency is continuously corrected using the first target data within the error range to stabilize the water volume within the error range.
[0057] In one embodiment, the first coordinate is (X1, Y1), the second coordinate is (X2, Y2), X1 is the x-coordinate of the first coordinate, Y1 is the y-coordinate of the first coordinate, X2 is the x-coordinate of the second coordinate, and Y2 is the y-coordinate of the second coordinate.
[0058] The step of calculating the ratio between the first coordinate and the second coordinate, and determining whether the ratio is greater than a preset first threshold, includes:
[0059] Substituting Y1 and Y2 into the function, we obtain |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2;
[0060] Calculate |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2 to obtain the first ratio and / or the second ratio;
[0061] Determine whether the first ratio and / or the second ratio are greater than a preset first threshold.
[0062] As described above, the first coordinate is set as (X1, Y1), and the second coordinate is set as (X2, Y2). The ordinates of the first and second coordinates are substituted into the function for calculation, and it is determined whether they are greater than the preset first threshold.
[0063] In one embodiment, the ordinate Y1 in the first coordinate system and the ordinate Y2 in the second coordinate system are substituted into the function to obtain the function |Y2-Y1| / Y1. The first ratio can be calculated, and it is determined whether the first ratio is greater than a preset first threshold.
[0064] In another embodiment, the ordinate Y1 in the first coordinate system and the ordinate Y2 in the second coordinate system are substituted into the function to obtain the function |Y2-Y1| / Y2. The second ratio can be calculated, and it is determined whether the second ratio is greater than the preset first threshold.
[0065] In another embodiment, the ordinate Y1 in the first coordinate system and the ordinate Y2 in the second coordinate system are substituted into the function to obtain the functions |Y2-Y1| / Y1 and |Y2-Y1| / Y2. The first ratio and the second ratio can be calculated, and it is determined whether the first ratio and the second ratio are greater than a preset first threshold.
[0066] In one embodiment, the first target data is water velocity data, and the second target data is pulse weight data;
[0067] The step of determining the relationship curve based on the first target data and the second target data, and obtaining the extreme value according to the relationship curve, includes:
[0068] A relationship curve was established based on the changes in water velocity data and pulse weight data.
[0069] Sample the points on the relationship curve corresponding to the appropriate water velocity region in the historical water velocity data;
[0070] The point set is tested, and the optimal point of the test is selected as the extreme value.
[0071] As mentioned above, the first target data is water velocity data, and the second target data is pulse weight data. A larger water velocity corresponds to a smaller pulse weight. Pulse weight refers to the process by which the weight of a water abruptly changes within a short period and then quickly returns to its initial state. A pulse is a signal that occurs for a short time within the entire signal cycle, unlike a continuous signal, where there is no signal for most of the signal cycle, much like a human pulse. A relationship curve is established by determining the pulse weight data and water velocity data. Extreme values are then obtained from the obtained curve, where the extreme value is the extreme point. This point can be selected from several suitable regions based on previous or historical data. Testing is then performed on these multiple points to select the optimal extreme value. The testing method involves setting the water velocity and pulse weight data corresponding to the selected points within a water heater, thus selecting the point with the most stable water velocity as the extreme value.
[0072] In one embodiment, the step of determining a tangent line based on the extreme value and the relationship curve, and translating the tangent line to a first position on the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain a first coordinate and a second coordinate, includes:
[0073] Obtain the slope of the tangent line at the extreme value;
[0074] Based on the slope and extrema of the tangent, the equation of the tangent is obtained as y = kx + b, where k ≠ 0;
[0075] The tangent is translated to the first position according to a preset rule, so that the equation of the tangent after the translation is y=kx+b1;
[0076] Calculate the intersection point of the equation of the tangent after the movement and the relationship curve to obtain the first coordinate and the second coordinate.
[0077] As described above, in calculating the first and second coordinates, the slope k of the tangent line can be obtained by substituting the coordinates of the extreme point into the equation y = kx + b, based on the slope of the tangent line at the extreme point. Then, by translating the original tangent line, we obtain y = kx + b1. Finally, we calculate the first and second coordinates of the two intersection points between the translated tangent line y = kx + b1 and the relationship curve. Here, x is the independent variable, y is the dependent variable, k is the slope, and b is the intercept.
[0078] In one embodiment, after the step of controlling the first target data within the numerical range of the first and second coordinates so that the fluid weight data is within the error range if the ratio is not greater than a first threshold, the method further includes:
[0079] By controlling the water velocity data to correspond to the numerical range of X1-X2, the pulse weight data is kept within the numerical range of Y1-Y2, thus preventing errors in the total fluid volume data.
[0080] As described above, by controlling the water velocity data within the range of X1-X2, the pulse weight data can be made to correspond to this range, thus preventing errors in the total data. For example, if the horizontal axis X1 corresponds to the water velocity coordinate of 3 and the horizontal axis X2 corresponds to the water velocity coordinate of 5, then controlling the water velocity within the range of 3-5 in the total data can reduce the error in the output water.
[0081] In one embodiment, after the steps of calculating the ratio between the first coordinate and the second coordinate and determining whether the ratio is greater than a preset first threshold, the method further includes:
[0082] If the ratio is greater than the preset first threshold, the extreme value needs to be obtained again.
[0083] As mentioned above, when the calculated ratio is greater than the first threshold, it indicates that the water velocity has exceeded the range, and there will be an error in the water output. Therefore, it is necessary to recalculate the tangent line by finding a new or more suitable extreme value.
[0084] In one embodiment, the detection mechanism is a flow meter, which is installed inside the water heater and is used to detect the total amount of fluid in the water heater within a preset time.
[0085] Reference Figure 2 This application also provides a water output control device, including:
[0086] The first acquisition module 1 is used to acquire the total data sent by the testing agency in real time, and to acquire the first target data and the second target data based on the total data;
[0087] The second acquisition module 2 is used to determine a relationship curve based on the first target data and the second target data, and to obtain extreme values according to the relationship curve.
[0088] The formulation module 3 is used to formulate a tangent line based on the extreme value and the relationship curve, and to translate the tangent line to the first position of the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain the first coordinate and the second coordinate;
[0089] The calculation module 4 is used to calculate the ratio between the first coordinate and the second coordinate, and determine whether the ratio is greater than a preset first threshold.
[0090] The control module 5 is used to control the first target data within the numerical range of the first coordinate and the second coordinate if the ratio is not greater than the first threshold, so that the weight data of the fluid is within the error range.
[0091] As described above, it is understood that each component of the water output control device proposed in this application can realize the function of any of the water output control methods described above, and the specific structure will not be described in detail.
[0092] Reference Figure 3 The present invention also provides a computer device, the internal structure of which can be as follows: Figure 3 As shown, this computer device includes a processor, memory, network interface, and data connected via a system bus. The processor is designed to provide computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores operating devices, computer programs, and data. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The computer device's database is used to store data, etc. The network interface is used for communication with external terminals via a network connection. The processor described above executes the water output control method, including: acquiring total volume data sent by the detection agency in real time; acquiring first target data and second target data based on the total volume data; determining a relationship curve based on the first target data and second target data; acquiring extreme values based on the relationship curve; determining a tangent line based on the extreme values and the relationship curve; translating the tangent line to a first position on the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain first coordinates and second coordinates; calculating the ratio between the first coordinates and the second coordinates, and determining whether the ratio is greater than a preset first threshold; if the ratio is not greater than the first threshold, controlling the first target data within the numerical range of the first coordinates and the second coordinates, so that the fluid weight data is within the error range.
[0093] One embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a water output control method, including: acquiring total volume data sent by a detection agency in real time; acquiring first target data and second target data based on the total volume data; determining a relationship curve based on the first target data and second target data; acquiring extreme values based on the relationship curve; determining a tangent line based on the extreme values and the relationship curve; translating the tangent line to a first position on the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain first coordinates and second coordinates; calculating the ratio between the first coordinates and the second coordinates, and determining whether the ratio is greater than a preset first threshold; if the ratio is not greater than the first threshold, controlling the first target data within the numerical range of the first coordinates and the second coordinates, so that the fluid weight data is within the error range.
[0094] The aforementioned method, device, computer equipment, and storage medium for controlling water output allow the terminal to acquire total volume data sent by the detection agency in real time. By analyzing this total volume data, a first target data and a second target data are obtained. A relationship curve between the first and second target data can be constructed. Since the first and second target data change over a preset time period, the relationship curve can be constructed by collecting data. Extreme values are then obtained from the relationship curve. Based on the selected extreme values and the relationship curve, a tangent line to the relationship curve can be determined from the extreme values. This tangent line is then directed towards the relationship curve according to a preset rule. The tangent is shifted to one side so that it intersects the relationship curve and two intersection points are obtained. The two intersection points are the first coordinate and the second coordinate, respectively. The first coordinate and the second coordinate are calculated to obtain a ratio. It is then determined whether the ratio is greater than a preset first threshold. If the result of the calculation of the first coordinate and the second coordinate does not exceed the preset first threshold, it is proven that the selection of the first coordinate and the second coordinate is within the usable error range. The data corresponding to the first coordinate and the second coordinate in the first target data can be used as the total data within the error range. The detection mechanism is continuously corrected by the first target data within the error range so that the water volume is stabilized within the error range.
[0095] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0096] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0097] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for controlling water output, applied to a water heater, characterized in that, The water heater is equipped with a detection mechanism, which is used to detect the total amount of fluid in the water heater within a preset time. The method includes: The system acquires total data sent by the testing agency in real time, and obtains first target data and second target data based on the total data. A relationship curve is determined based on the first target data and the second target data, and extreme values are obtained based on the relationship curve. Based on the extreme value and the relationship curve, a tangent line is determined, and the tangent line is translated to the first position of the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain the first coordinate and the second coordinate. The first coordinate and the second coordinate are calculated to obtain a ratio, and it is determined whether the ratio is greater than a preset first threshold. The first coordinate is (X1, Y1), the second coordinate is (X2, Y2), X1 is the abscissa of the first coordinate, Y1 is the ordinate of the first coordinate, X2 is the abscissa of the second coordinate, and Y2 is the ordinate of the second coordinate. The step of calculating the ratio between the first coordinate and the second coordinate, and determining whether the ratio is greater than a preset first threshold, includes: Substituting Y1 and Y2 into the function, we obtain |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2; Calculate |Y2-Y1| / Y1 and / or |Y2-Y1| / Y2 to obtain the first ratio and / or the second ratio; Determine whether the first ratio and / or the second ratio are greater than a preset first threshold. The first target data is water velocity data, which is the horizontal axis, and the second target data is pulse weight data, which is the vertical axis. The step of determining the relationship curve based on the first target data and the second target data, and obtaining the extreme value according to the relationship curve, includes: A relationship curve was established based on the changes in water velocity data and pulse weight data. Sample the points on the relationship curve corresponding to the appropriate water velocity region in the historical water velocity data; The set of points is tested, and the optimal point of the test is selected as the extreme value. The data of water velocity and pulse weight corresponding to the selected points are set in the water heater for testing, so as to select the point with the most stable water velocity as the extreme value point. After the step of calculating the ratio between the first coordinate and the second coordinate, and determining whether the ratio is greater than a preset first threshold, the method further includes: If the ratio is greater than the preset first threshold, the extreme value needs to be obtained again; If the ratio is not greater than the first threshold, the first target data is controlled within the numerical range of the first coordinate and the second coordinate so that the weight data of the fluid is within the error range.
2. The method for controlling water output according to claim 1, characterized in that, The step of determining a tangent line based on the extreme value and the relationship curve, and translating the tangent line to a first position on the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain a first coordinate and a second coordinate, includes: Obtain the slope of the tangent line at the extreme value; Based on the slope and extrema of the tangent, the equation of the tangent is obtained as y=kx+b, where k≠0; The tangent is translated to the first position according to a preset rule, so that the equation of the tangent after the translation is y=kx+b1; The first coordinate and the second coordinate are obtained by calculating the intersection point of the equation of the tangent after the movement and the relationship curve.
3. The method for controlling water output according to claim 1, characterized in that, After the step of controlling the first target data within the numerical range of the first and second coordinates so that the fluid weight data is within the error range if the ratio is not greater than the first threshold, the method includes: By controlling the water velocity data to correspond to the numerical range of X1-X2, the pulse weight data is kept within the numerical range of Y1-Y2, thus preventing errors in the total fluid volume data.
4. The method for controlling water output according to claim 1, characterized in that, The detection mechanism is a flow meter, which is installed inside the water heater and is used to detect the total amount of fluid in the water heater within a preset time.
5. A water output control device, employing the water output control method according to any one of claims 1-4, characterized in that, include: The first acquisition module is used to acquire total data sent by the testing agency in real time, and to acquire first target data and second target data based on the total data; The second acquisition module is used to determine a relationship curve based on the first target data and the second target data, and to obtain extreme values based on the relationship curve. The formulation module is used to formulate a tangent line based on the extreme value and the relationship curve, and to translate the tangent line to a first position of the relationship curve according to a preset rule, so that the tangent line intersects the relationship curve to obtain a first coordinate and a second coordinate; The calculation module is used to calculate the ratio between the first coordinate and the second coordinate, and determine whether the ratio is greater than a preset first threshold. The control module is used to control the first target data within the numerical range of the first coordinate and the second coordinate if the ratio is not greater than the first threshold, so that the weight data of the fluid is within the error range.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the water output control method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the water output control method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fluid flow meter with linearization
US10126152B1