Water quantity determination method and apparatus, electronic device, and storage medium
By installing pressure sensors on the outside of the pipeline and using the modified Bernoulli equation to calculate the flow velocity and integral the water volume, the problem of high construction costs in existing technologies is solved. This enables water volume monitoring without cutting off the pipeline, improving monitoring accuracy and reducing construction impact.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ANSO IOT CO LTD
- Filing Date
- 2025-10-13
- Publication Date
- 2026-07-24
AI Technical Summary
Existing methods for determining water volume require cutting off pipes to install mechanical water meters or electromagnetic flow meters, which are costly to construct and disrupt water supply.
By non-invasively installing pressure sensors on the outside of the pipe, the measured pressure is obtained, and the flow velocity is calculated using the modified Bernoulli equation and the water volume is obtained through integration.
It enables accurate water volume monitoring without cutting off pipelines, reducing construction costs and water supply disruptions, and is suitable for scenarios such as municipal water supply networks, industrial water use, and fire hydrants.
Smart Images

Figure CN121475343B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of water technology, and in particular relates to methods, devices, electronic equipment and storage media for determining water volume. Background Technology
[0002] In smart water management systems, monitoring the water volume in pipelines is a core component for leakage early warning and resource allocation. Current methods for determining water volume typically use mechanical water meters or electromagnetic flow meters, both of which require contact with the water in the pipeline. During the renovation of older pipeline networks, installing mechanical water meters or electromagnetic flow meters necessitates disconnecting the pipeline, resulting in high construction costs and disruptions to water supply. Summary of the Invention
[0003] In view of this, embodiments of this application provide a method, apparatus, electronic device and storage medium for determining water volume, which determines water volume by non-invasively installing a pressure sensor on the outside of the pipe.
[0004] The first aspect of this application provides a method for determining water volume, including: The measured pressure of the pipe is obtained from the pressure sensor clamped to the pipe. The flow velocity of the water in the pipe is calculated based on the measured pressure. Based on the current pipe diameter, the flow rate within a preset time period is integrated to obtain the water volume in the pipe.
[0005] In one embodiment, calculating the water flow velocity in the pipe based on the measured pressure includes: The flow velocity of water in the pipe is calculated based on the modified Bernoulli equation and the measured pressure. The modification term of the modified Bernoulli equation is determined based on the roughness of the inner wall of the pipe.
[0006] In one embodiment, the method further includes: The historical pipe diameter of the pipeline is calibrated to obtain the current pipe diameter.
[0007] In one embodiment, calibrating the historical pipe diameter to obtain the current pipe diameter includes: The theoretical pressure is calculated based on the flow velocity and the historical pipe diameter. The historical pipe diameter is calibrated based on the theoretical pressure and the measured pressure to obtain the current pipe diameter.
[0008] In one embodiment, the method further includes: The pipe attenuation rate is calculated and output based on the initial pipe diameter and the current pipe diameter.
[0009] In one embodiment, obtaining the measured pressure of the pipe detected by a pressure sensor clamped to the pipe includes: The initial pressure detected by the pressure sensor is obtained, and the initial pressure is a continuous value within a preset time period; The initial pressure is filtered to remove water hammer noise, thus obtaining the measured pressure.
[0010] In one embodiment, the method further includes: When an abnormality is detected in the measured pressure, the flow rate, or the current pipe diameter, a corresponding early warning message is generated.
[0011] A second aspect of this application provides a water volume determination device, comprising: The acquisition module is used to acquire the measured pressure of the pipe detected by the pressure sensor clamped on the pipe; The calculation module is used to calculate the flow velocity of the water in the pipe based on the measured pressure. The output module is used to perform an integral calculation on the flow rate within a preset time period based on the current pipe diameter of the pipe to obtain the water volume in the pipe.
[0012] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the water quantity determination method as described in the first aspect above.
[0013] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the water quantity determination method as described in the first aspect above.
[0014] The fifth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the water quantity determination method described in any of the first aspects above.
[0015] The beneficial effects of this application embodiment compared to the prior art are as follows: By acquiring the measured pressure of the pipe detected by a pressure sensor clamped on the pipe, the flow velocity of the water in the pipe is calculated based on the measured pressure. Then, based on the current pipe diameter, the flow velocity over a preset time period is integrated to obtain the water volume in the pipe. Since the water volume in the pipe is calculated based on the measured pressure of the pipe, and the pressure sensor is clamped on the pipe, installation can be performed without cutting off the pipe and stopping the water supply, thus achieving water volume monitoring in a non-invasive manner. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0017] Figure 1 This is a schematic diagram illustrating the implementation process of a water quantity determination method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the water volume determination device provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0019] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0022] The method for determining water volume provided in this application is illustrated below.
[0023] Please see the appendix Figure 1 The water quantity determination method provided in one embodiment of this application includes steps S101-S103.
[0024] S101: Obtain the measured pressure of the pipe detected by the pressure sensor clamped on the pipe.
[0025] The measured pressure is the water pressure acting on the pipe wall. The pressure sensor can be installed at a preset distance from the pipe bend or valve to improve measurement accuracy.
[0026] In one embodiment, the initial pressure detected by the pressure sensor is acquired, and the initial pressure is a continuous value within a preset time period. For example, the pressure sensor collects data at a frequency of 100Hz, and the data collected by the pressure sensor is processed using a sliding window method with a sliding window size of 500ms. The initial pressure is the correspondence between pressure and time within the preset time period. A Fourier transform is performed on the initial pressure to obtain frequency domain data. For the frequency domain data, data within a preset frequency range (e.g., 20-200Hz) is detected to obtain valid data. Then, noise identification is performed on the valid data to remove the identified noise signals. For example, the noise includes noise generated when the pump starts and stops and noise generated by valve operation. The frequency corresponding to pump start is 30-50Hz, and the frequency corresponding to valve operation is 80-120Hz. Threshold suppression can be applied to the frequency range corresponding to the noise, and then the valid data after threshold suppression is smoothed using a Kalman filter algorithm to obtain valid data with noise signals removed, thereby reducing the impact of random noise on the true data collected by the pressure sensor.
[0027] In one embodiment, after obtaining the effective data with noise removed, the data is further filtered. For example, for the effective data after noise removal, the frequencies corresponding to water hammer (e.g., 150-200Hz) are filtered to obtain the frequency domain data corresponding to the measured pressure. A Fourier transform is then performed on the frequency domain data corresponding to the measured pressure to obtain the measured pressure. Therefore, the measured pressure is also a continuous value within a preset time period. It can be understood that the frequencies corresponding to noise and water hammer are different in different application scenarios or under different pipeline operating conditions.
[0028] In one embodiment, the initial pressure detected by the pressure sensor is corrected according to the material of the pipe, and the corrected initial pressure is used for subsequent calculations. For example, the initial pressure is corrected according to the elastic coefficient corresponding to the pipe material to obtain the corrected initial pressure.
[0029] In one embodiment, during the detection of actual pressure, if the actual pressure is detected to be outside a preset range or the change in actual pressure is greater than a preset range, an abnormality in the actual pressure is determined, and a corresponding early warning message is generated. For example, if the change in actual pressure is greater than a preset range, a leakage warning is triggered. If the actual pressure remains abnormal within a preset time period, a pressure sensor malfunction warning message is output.
[0030] In one embodiment, when it is determined that the measured pressure remains abnormal within a preset time period, the type of abnormality is further determined. For example, if abnormal information persists within the preset time period, the abnormality type is determined to be a pressure sensor malfunction. If no response signal from the pressure sensor is received for a preset number of consecutive times within the preset time period, the abnormality type is determined to be a communication interruption. In the case of a pressure sensor malfunction, historical data can be used for signal compensation to obtain the measured pressure. For example, the signal detected by the pressure sensor can be compensated based on the pressure change pattern over time in historical data to obtain the measured pressure. In the case of a communication interruption, the data collected by the pressure sensor can be cached and re-uploaded when communication is restored.
[0031] It is understandable that for the same pipeline, multiple pressure sensors can be clamped onto the pipeline to detect pressure. The average pressure detected by multiple pressure sensors at the same time can be used to obtain the actual pressure of the pipeline, thereby improving the accuracy of the obtained actual pressure. For each pressure sensor, a torque sensor can be used to detect the clamping force of the pressure sensor on the pipeline, keeping the clamping force within a preset range (e.g., 50-80N), thereby improving the accuracy of the detected actual pressure.
[0032] S102: Calculate the flow velocity of the water in the pipe based on the measured pressure.
[0033] Specifically, Bernoulli's equation is: ,in It represents the pressure at a point in a fluid. This indicates the fluid velocity at that point. Indicates the density of the fluid. Represents gravitational acceleration. This indicates the height of the point. This represents a constant. It can be seen that there is a corresponding relationship between the pressure on the pipe wall and the water flow velocity. The corresponding pressure can be calculated based on the measured pressure in the pipe, and then the water flow velocity in the pipe can be calculated using Bernoulli's equation and the pressure.
[0034] Bernoulli's equation neglects pipe resistance losses, leading to an overestimation of flow velocity when used directly. In one embodiment, a modified Bernoulli equation and measured pressure are used to calculate the flow velocity. Specifically, based on the modified Bernoulli equation, the flow velocity calculation formula is as follows: ,in, Indicates a correction term. , This represents the coefficient of friction of the pipe, which is related to the roughness of the inner wall of the pipe. Indicates the length of the pipe. Indicates the pipe diameter.
[0035] In one embodiment, the correction term is obtained through iterative calculation. For example, the initial value of the correction term is 0, and an initial correction term is calculated based on the initial flow velocity. Then, the correction term at the current time step is calculated based on the flow velocity at the previous time step, and the correction term at the previous time step is used to calculate the flow velocity at the current time step. This process is repeated iteratively to calculate the flow velocity at each time step. In one embodiment, the pipe friction coefficient is also related to the pipe material and the pipe's service life, and can be corrected based on the pipe material or service life. The density of the water inside the pipe is also related to the water temperature, and can be corrected based on the water temperature. For example, the water density can be corrected based on the temperature collected by a temperature sensor, which can be integrated into a pressure sensor.
[0036] By using the modified Bernoulli equation to calculate the flow velocity of water in a pipe, the problem of changes in the roughness of the pipe wall caused by scaling or corrosion, which in turn affects the accuracy of the flow velocity calculation, can be reduced.
[0037] In one embodiment, the measured pressure is also a continuous value within a preset time period, and correspondingly, the flow rate is also a continuous value within a preset time period. If the flow rate is greater than a preset threshold or less than 0, an abnormal flow rate is determined, and a corresponding warning message is generated. For example, when the flow rate is detected to be greater than the threshold, a fault message is output for the device (pressure sensor).
[0038] S103: Based on the current pipe diameter, perform an integral calculation on the flow rate within a preset time period to obtain the water volume in the pipe.
[0039] Specifically, according to the formula calculate arrive The water volume Q in the pipeline during the time period. Wherein, express arrive At any point during the period, Indicates time interval, Indicates the current pipe diameter.
[0040] In one embodiment, if a flow velocity less than a preset velocity (e.g., 5 m / s) is detected before calculating the water volume, it is determined that the water supply is currently interrupted, and the water volume calculation is stopped. If a flow velocity greater than the preset velocity is detected, the water volume is then calculated based on the flow velocity.
[0041] In one embodiment, in high-flow-rate impact scenarios (such as fire hydrant activation or industrial equipment start-up and shutdown), if the detected change in flow velocity is greater than a preset range, it is determined that the current period is an impact period. A smaller time interval is used to calculate the water volume, while a larger time interval is used to calculate the water volume during non-impact periods. This ensures the accuracy of water volume calculation during impact periods.
[0042] After obtaining the water volume, if the volume is not within the preset range, the water volume can be adjusted by adjusting the valve on the water pipe. For example, if the water volume exceeds the upper limit of the preset threshold, a pressure reduction and flow restriction mechanism is triggered. For instance, the valve opening is first reduced by 5%, while monitoring the change in measured pressure. If the recalculated water volume is still greater than the preset threshold, the valve opening is further reduced by 2% until the water volume is less than the upper limit of the preset threshold. If the water volume is less than the lower limit of the preset threshold, a pressure boosting and flow increasing mechanism is triggered. For instance, the valve opening is increased by 1%, while monitoring the measured pressure in the pipeline. When the measured pressure exceeds the preset pressure or the water volume exceeds the lower limit of the threshold, the valve opening adjustment stops.
[0043] In one embodiment, the current pipe diameter is obtained by calibrating the pipe's historical diameter, thereby improving the accuracy of the calculated water volume.
[0044] In one embodiment, the theoretical pressure is calculated based on the flow velocity and historical pipe diameter. The historical pipe diameter is then calibrated using both the theoretical and measured pressures to obtain the current pipe diameter. Specifically, the most recently calculated flow velocity and historical pipe diameter are substituted into the modified Bernoulli equation to obtain the theoretical pressure. Then, according to the formula... Calculate the current pipe diameter. Wherein, This indicates the historical pipe diameter, i.e., the pipe diameter obtained from the most recent calibration. Indicates theoretical pressure, This indicates the measured pressure.
[0045] Specifically, the modified Bernoulli equation is used to calculate both theoretical pressure and flow velocity. If the pipe friction coefficient changes, the relationship between pressure and flow velocity will also change, causing the measured pressure to differ from the calculated theoretical pressure. This indicates that the roughness inside the pipe has changed, leading to a change in pipe diameter. Therefore, by calibrating historical pipe diameters using theoretical and measured pressures, an accurate current pipe diameter can be obtained.
[0046] In one embodiment, after calibrating the historical pipe diameter to obtain the calibrated pipe diameter, it is determined whether the error between the calibrated pipe diameter and the historical pipe diameter is greater than a preset value (e.g., 1%). If the error between the calibrated pipe diameter and the historical pipe diameter is greater than the preset value, the calibrated pipe diameter is used as the current pipe diameter, and the friction coefficient is adjusted to enter the next round of calibration until the difference between the calibrated error and the historical pipe diameter is less than or equal to the preset value. The adjustment range of the friction coefficient can be determined based on the error between the calibrated pipe diameter and the historical pipe diameter. For example, if the error is 1%-2%, the friction coefficient adjustment step is 0.001; if the error is 2%-3%, the friction coefficient adjustment step is 0.02; and if the error is greater than 3%, the friction coefficient adjustment step is 0.03. If the difference between the calibrated error and the historical pipe diameter is less than or equal to the preset value, the calibrated pipe diameter is used as the current pipe diameter, and the calibration cycle of the pipe diameter is adjusted. For example, the calibration cycle is adjusted from 1 day to 3 days.
[0047] In one embodiment, if a change in pipe diameter is detected to exceed a preset range, the historical pipe diameter is used as the current pipe diameter, and a corresponding warning message is generated. For example, if the decrease in pipe diameter is greater than a first preset value, a pipe blockage warning message is generated; if the increase in pipe diameter is greater than a second preset value, a pipe burst warning message is generated.
[0048] In one embodiment, pipe change information is determined based on the change in pipe diameter before and after calibration. For example, if the cumulative reduction in pipe diameter after a preset number of calibrations is greater than 5%, it is determined that the pipe has a scaling tendency.
[0049] In another embodiment, the current pipe diameter can also be determined based on historical pipe diameters and preset pipe diameter change patterns over time.
[0050] In one embodiment, after obtaining the current pipe diameter, the pipe attenuation rate can be calculated and output based on the initial and current pipe diameters. For example, the pipe diameter attenuation rate is the ratio of the difference between the initial and current pipe diameters to the number of years of operation. Based on the pipe diameter attenuation rate, a pipe diameter health index can be further calculated, for example, 100-20*β, where β represents the pipe diameter attenuation rate. After obtaining the pipe diameter attenuation rate, the service life of the pipeline can be predicted based on the pipe's service life, and maintenance recommendations can be output.
[0051] In one embodiment, historical pipe diameters can be calibrated during low-flow periods. For example, historical pipe diameters can be calibrated when the water volume is less than a preset value, or when the flow rate is less than a preset speed for a continuous preset duration, or during preset low-flow periods (e.g., 0:00-4:00 daily for municipal pipelines, and 22:00-6:00 the next day for industrial pipelines), thereby improving the timeliness of the calibration data.
[0052] In another embodiment, the historical pipe diameter can also be calibrated when preset calibration conditions are met. For example, if the deviation between the measured pressure and the theoretical pressure is greater than a preset deviation, or when the pipeline is restarted after maintenance, the historical pipe diameter can be calibrated.
[0053] In one embodiment, the water volume determination method provided in this application is executed in an electronic device. The electronic device includes an edge computing layer and a cloud platform layer. The edge computing layer is used to collect initial pressure data detected by a pressure sensor through an edge gateway, and dynamically filter the initial pressure data to obtain the measured pressure. Then, it calibrates the historical pipe diameter based on the measured pressure and theoretical pressure to obtain the current pipe diameter. Afterward, the edge computing layer calculates the water flow velocity in the pipe based on the measured pressure and sends the flow velocity to the cloud platform layer. The cloud platform layer is used to perform integral calculations based on the flow velocity to obtain the water volume. Simultaneously, the cloud platform layer can monitor the water volume and generate early warning information when abnormal water volume is detected. The cloud platform layer can also receive information such as the current pipe diameter, flow velocity, and measured pressure sent by the edge computing layer, and generate corresponding early warning information when abnormal pipe diameter, abnormal flow velocity, or abnormal measured pressure is detected. The cloud platform layer can communicate with terminal devices. By accessing the cloud platform, terminal devices can view information such as water volume, pipe diameter, pressure, and flow velocity in real time and receive early warning information.
[0054] In one embodiment, the cloud platform determines the anomaly level based on monitored water volume, pipe diameter, pressure, or flow rate. For example, if the measured pressure change is less than a first-level change, the anomaly level is Level 1; if the measured pressure change is greater than the first level but less than a second level, the anomaly level is Level 2; and if the measured pressure change is greater than the second level, the anomaly level is Level 3. If the anomaly level is Level 1, an alert can be pushed to the terminal devices of platform maintenance personnel, enabling them to record data and monitor in real time. If the anomaly level is Level 2, an alert can be pushed to the terminal devices of inspection personnel, enabling them to locate leaks. If the anomaly level is Level 3, an alert can be pushed to the terminal devices of the monitoring department, enabling them to close valves and initiate emergency repairs.
[0055] In one embodiment, the cloud platform records anomaly logs, which include information on anomalies in water volume, pipe diameter, pressure, or flow rate, as well as the time of occurrence. Maintenance personnel can access the anomaly logs through a terminal device accessing the cloud platform.
[0056] In the above embodiments, a pressure sensor clamped to the pipe detects the actual pressure in the pipe, calculates the water flow velocity based on the measured pressure, and then calculates the water volume based on the current pipe diameter and flow velocity. This allows for non-invasive determination of the water volume. Simultaneously, dynamic pipe diameter calibration adapts to scenarios where pipe scaling and corrosion cause diameter changes, improving anti-interference capabilities and providing highly accurate water volume readings. This provides data support for pipe network leakage analysis, reduces maintenance costs, and is suitable for municipal water supply systems, industrial water use, and fire hydrants.
[0057] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0058] Corresponding to the water quantity determination method described in the above embodiments, Figure 2 A structural block diagram of the water volume determination device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0059] like Figure 2 As shown, the water volume determination device includes an acquisition module 21, a calculation module 22, and an output module 23.
[0060] The acquisition module 21 is used to acquire the measured pressure of the pipe detected by the pressure sensor clamped on the pipe; The calculation module 22 is used to calculate the flow velocity of the water in the pipe based on the measured pressure; The output module 23 is used to perform an integral calculation on the flow rate within a preset time period based on the current pipe diameter of the pipe to obtain the water volume in the pipe.
[0061] In one embodiment, the calculation module 22 is specifically used for: The flow velocity of water in the pipe is calculated based on the modified Bernoulli equation and the measured pressure. The modification term of the modified Bernoulli equation is determined based on the roughness of the inner wall of the pipe.
[0062] In one embodiment, the calculation module 22 is further configured to: The historical pipe diameter of the pipeline is calibrated to obtain the current pipe diameter.
[0063] In one embodiment, the calculation module 22 is further configured to: The theoretical pressure is calculated based on the flow velocity and the historical pipe diameter. The historical pipe diameter is calibrated based on the theoretical pressure and the measured pressure to obtain the current pipe diameter.
[0064] In one embodiment, the output module 23 is further configured to: The pipe attenuation rate is calculated and output based on the initial pipe diameter and the current pipe diameter.
[0065] In one embodiment, the acquisition module 21 is specifically used for: The initial pressure detected by the pressure sensor is obtained, and the initial pressure is a continuous value within a preset time period; The initial pressure is filtered to remove water hammer noise, thus obtaining the measured pressure.
[0066] In one embodiment, the output module 23 is further configured to: When an abnormality is detected in the measured pressure, the flow rate, or the current pipe diameter, a corresponding early warning message is generated.
[0067] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0068] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.
[0069] like Figure 3 As shown, the electronic device in this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. When the processor 31 executes the computer program 33, it implements the steps in the above-described water quantity determination method embodiment, for example... Figure 1 The steps S101 to S103 are shown. Alternatively, when the processor 31 executes the computer program 33, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of the acquisition module 21 to the output module 23 are shown.
[0070] For example, the computer program 33 may be divided into one or more modules / units, which are stored in the memory 32 and executed by the processor 31 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 33 in the electronic device.
[0071] Those skilled in the art will understand that Figure 3 This is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0072] The processor 31 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0073] The memory 32 can be an internal storage unit of the electronic device, such as a hard drive or memory. The memory 32 can also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 32 can include both internal and external storage units. The memory 32 is used to store the computer program and other programs and data required by the electronic device. The memory 32 can also be used to temporarily store data that has been output or will be output.
[0074] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0075] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0076] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0077] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0078] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0079] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0080] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for determining water volume, characterized in that, include: The measured pressure of the pipe is obtained from the pressure sensor clamped to the pipe. The pressure on the pipe wall is calculated based on the measured pressure, and the pressure on the pipe wall is calculated using the formula. and formula Calculate the flow velocity of the water in the pipe, where, Indicates flow rate, Indicates density, This indicates the pressure on the pipe wall. Indicates a correction term. Indicates the coefficient of friction of the pipe. Indicates the length of the pipe. Indicates the theoretical pipe diameter; The theoretical pressure is calculated based on the flow velocity and the historical pipe diameter. Based on the theoretical pressure and formula Calculate the current pipe diameter, where, Indicates historical pipe diameter, Indicates theoretical pressure, Indicates the measured pressure; Based on the current pipe diameter, the flow rate within a preset time period is integrated to obtain the water volume in the pipe.
2. The method for determining water quantity according to claim 1, characterized in that, The method further includes: The pipe attenuation rate is calculated and output based on the initial pipe diameter and the current pipe diameter.
3. The method for determining water quantity according to claim 1, characterized in that, Obtaining the measured pressure of the pipe detected by a pressure sensor clamped to the pipe includes: The initial pressure detected by the pressure sensor is obtained, and the initial pressure is a continuous value within a preset time period; The initial pressure is filtered to remove water hammer noise, thus obtaining the measured pressure.
4. The method for determining water quantity according to claim 1, characterized in that, The method further includes: When an abnormality is detected in the measured pressure, the flow rate, or the current pipe diameter, a corresponding early warning message is generated.
5. A water volume determination device, characterized in that, include: The acquisition module is used to acquire the measured pressure of the pipe detected by the pressure sensor clamped on the pipe; The calculation module is used to calculate the pressure of the pipe wall based on the measured pressure, and based on the pressure of the pipe wall and the formula... and formula Calculate the flow velocity of the water in the pipe, where, Indicates flow rate, Indicates density, This indicates the pressure on the pipe wall. Indicates a correction term. Indicates the coefficient of friction of the pipe. Indicates the length of the pipe. Indicates the theoretical pipe diameter; The theoretical pressure is calculated based on the flow velocity and the historical pipe diameter. Based on the theoretical pressure and formula Calculate the current pipe diameter, where, Indicates historical pipe diameter, Indicates theoretical pressure, Indicates the measured pressure; The output module is used to perform an integral calculation on the flow rate within a preset time period based on the current pipe diameter to obtain the water volume in the pipe.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the water quantity determination method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the water quantity determination method as described in any one of claims 1 to 4.