Ultrasonic-based liquid flow measurement and control method, device, equipment and medium
By dynamically adjusting the frequency of the ultrasonic water meter and combining flow velocity and pressure changes, the problem of reduced accuracy and short service life of the ultrasonic water meter during peak water use is solved, achieving higher measurement accuracy and longer service life.
Patent Information
- Application Number
- CN202411081141.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-08
AI Technical Summary
The existing ultrasonic water meter is difficult to adapt to sudden changes during peak water use, resulting in a decrease in accuracy and a short service life, which cannot be effectively extended.
By obtaining the average flow rate and flow rate change rate of the target main pipe section, dynamically adjusting the frequency of the ultrasonic water meter, combining historical water data and pressure changes, adaptive measurement frequency control is achieved, avoid meaningless work and extending service life.
It improves the measurement accuracy of ultrasonic water meter, extends the service life, avoids equipment damage, and improves calculation efficiency.
Smart Images

Figure CN118670486B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ultrasonic water meter measurement, and in particular to an ultrasonic-based liquid flow measurement and control method, device, equipment and medium. Background Art
[0002] A water meter is an instrument used to measure the amount of water used in a home or building. Water meters are usually installed on water supply pipes to record the amount of water flowing through the pipes. Water meters can accurately record water usage; by regularly checking the meter readings, water meters can understand the water usage of homes or buildings, which helps to detect potential water leaks or abnormal water use behaviors and take timely measures to reduce waste; water meter data can help water supply companies manage water resources, plan supply and demand balance, and optimize the operation of water supply networks. Water meters play an important role in modern life, not only helping users manage water use, but also helping to protect the environment and optimize water resource utilization.
[0003] Ultrasonic water meter is an advanced technology, a meter used to measure water flow. Ultrasonic water meter uses ultrasonic technology to achieve accurate measurement of water flow, and has higher accuracy and stability than traditional mechanical water meter. Ultrasonic water meter is equipped with ultrasonic sensor inside, which measures water flow velocity by reflecting ultrasonic wave in water flow process; ultrasonic sensor transmits ultrasonic signal and calculates the time difference from transmission to reception of ultrasonic wave, and the water flow velocity and flow rate can be determined by this time difference. Ultrasonic water meter has high accuracy and strong measurement stability. Ultrasonic water meter is usually divided into user mode and verification mode. User mode has low sampling frequency and low accuracy. User mode sacrifices accuracy in exchange for the continuation of ultrasonic water meter life; verification mode has high sampling frequency and high accuracy, and ultrasonic water meter has short life. However, for residential water use, water use period is relatively concentrated, and water use is low or even no water use in some periods, but both user mode and verification mode will maintain a certain measurement frequency, resulting in the loss of ultrasonic water meter; water use is very high in some periods, and it is difficult to adapt to the sudden peak of water use regardless of user mode or verification mode, and its accuracy will decrease. In view of this, there is an urgent need to propose an ultrasonic-based liquid flow measurement and control method to improve the above situation. Summary of the invention
[0004] The embodiments of the present application solve the technical problems in the prior art that ultrasonic water meters can only measure at a fixed frequency and their service life is difficult to guarantee by providing an ultrasonic-based liquid flow measurement and control method, device, equipment and medium, thereby achieving the technical effect of improving the measurement accuracy of ultrasonic water meters and extending their service life.
[0005] In a first aspect, the present application provides a liquid flow measurement and control method based on ultrasound, the method comprising:
[0006] The average flow velocity and flow velocity change rate of the target main pipe section within the first preset time length are obtained. If the average flow velocity is higher than the flow velocity threshold and the flow velocity change rate is higher than the flow velocity change rate threshold, the following steps are performed;
[0007] Obtaining a preset sound wave frequency of a target ultrasonic water meter, wherein the target ultrasonic water meter corresponds to the target main pipe section one by one;
[0008] Determining a plurality of sets of transit time difference values according to a preset sound wave frequency of a target ultrasonic water meter and a second preset time length;
[0009] For each set of transit time differences, steps S141-S142 are performed, including:
[0010] Step S141, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences according to the transit time differences;
[0011] Step S142, determining the pipe section pressure corresponding to the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters at least include an average cross-sectional area, a pipe section resistance loss coefficient, a pipe section length, and a pipe section elevation difference;
[0012] Determine the minimum average pressure deviation within the second preset time length according to the corresponding pipe section pressures under the plurality of groups of transit time differences and the average pressure of the target total pipe section within the second preset time length;
[0013] Determine the first sound wave frequency according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences, and the preset sound wave frequency;
[0014] Determining whether the difference between the first sound wave frequency and the preset sound wave frequency is within a preset sound wave variation range;
[0015] If yes, the first sound wave frequency is used as the target sound wave frequency of the target ultrasonic water meter, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0016] Furthermore, the method further comprises:
[0017] Determine whether the average flow velocity of the target main pipe section within a first preset time period is lower than a flow velocity threshold, and whether the flow velocity change rate is lower than a flow velocity change rate threshold;
[0018] If both are lower than, then determine whether the average flow rate of the target main pipe section within the first preset time period is 0;
[0019] If it is 0, the historical water consumption data of the target user corresponding to the target ultrasonic water meter is obtained;
[0020] Based on historical water use data, the target user's water use time periods and the water use probability corresponding to each water use time period are obtained;
[0021] Determine the water use probability at the current moment in the corresponding water use period, if the water use probability is lower than a preset water use probability threshold;
[0022] Then determine the time length from the current moment to the next water use period;
[0023] If the duration of the next water use period is less than the preset duration, determining whether the water use probability of the next water use period is also less than the water use probability threshold;
[0024] If it is also lower than, the target ultrasonic water meter is controlled to remain silent.
[0025] Further, if the difference is not within the preset sound wave variation range, the method includes:
[0026] Determine the range extremes of the preset sound wave variation range, the range extremes including the range maximum value and the range minimum value;
[0027] Determine the absolute value of the difference between the first difference and the maximum value of the range, and the absolute value of the difference between the first difference and the minimum value of the range, wherein the first difference is the absolute value difference between the first sound wave frequency and the preset sound wave frequency;
[0028] According to the range extreme value corresponding to the smaller absolute value of the two difference absolute values and the preset sound wave frequency, the target sound wave frequency is determined, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0029] Further, according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences, and the preset sound wave frequency, the first sound wave frequency is determined, including:
[0030] Determine the pressure difference according to the maximum value of the pipe section pressure under several groups of transit time differences and the minimum value of the pipe section pressure under several groups of transit time differences;
[0031] Determine the pressure fluctuation rate based on the pressure difference and the minimum average pressure deviation;
[0032] The first sound wave frequency is determined according to the pressure fluctuation rate and the preset sound wave frequency.
[0033] Furthermore, based on the historical water use data, the water use time periods of the target users and the water use probability corresponding to each water use time period are obtained, including:
[0034] According to the historical water use data, the concentrated water use period, silent water use period and scattered water use period are divided;
[0035] The historical water use data, including the water consumption during the concentrated water use period of each day, the water consumption during the silent water use period of each day, and the water consumption during the scattered water use period of each day, are input into the preset neural network model to obtain the water use probability during the concentrated water use period, the water use probability during the silent water use period, and the water use probability during the scattered water use period.
[0036] Further, after obtaining several groups of transit time difference values, the method further includes:
[0037] Determine the standard transit time difference according to the preset sound wave frequency;
[0038] Determine the minimum mean time deviation according to the standard transit time difference, several groups of transit time difference values and the number of groups;
[0039] According to the maximum value among several groups of transit time differences, the minimum value among several groups of transit time differences, the minimum mean time deviation and the preset sound wave frequency, the target sound wave frequency is determined, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0040] Furthermore, the method further comprises:
[0041] If the average flow rate of the target main pipe section within the first preset time period is lower than the flow rate threshold, or the flow rate change rate of the target main pipe section within the first preset time period is lower than the flow rate change rate threshold, the target ultrasonic water meter is controlled to operate at a preset sound wave frequency.
[0042] In a second aspect, the present application provides an ultrasonic-based liquid flow measurement and control device, the device comprising:
[0043] A judgment module is used to obtain the average flow velocity and flow velocity change rate of the target main pipe section within a first preset time length, and if the average flow velocity is higher than the flow velocity threshold, and the flow velocity change rate is higher than the flow velocity change rate threshold, the following steps are executed;
[0044] An acquisition module, used to acquire a preset sound wave frequency of a target ultrasonic water meter, wherein the target ultrasonic water meter corresponds to the target main pipe section one by one;
[0045] A difference determination module, used to determine a plurality of groups of transit time differences according to a preset sound wave frequency and a second preset duration of a target ultrasonic water meter;
[0046] The pressure determination module is used to execute steps S141-S142 for each set of transit time differences, including:
[0047] Step S141, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences according to the transit time differences;
[0048] Step S142, determining the pipe section pressure corresponding to the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters at least include an average cross-sectional area, a pipe section resistance loss coefficient, a pipe section length, and a pipe section elevation difference;
[0049] A deviation determination module, used to determine a minimum average pressure deviation within a second preset time length according to the corresponding pipe section pressures under a plurality of groups of transit time differences and the average pressure of the target total pipe section within a second preset time length;
[0050] A frequency determination module, used to determine the first sound wave frequency according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences, and the preset sound wave frequency;
[0051] A range determination module, used to determine whether the difference between the first sound wave frequency and the preset sound wave frequency is within a preset sound wave variation range;
[0052] The control operation module is used to use the first sound wave frequency as the target sound wave frequency of the target ultrasonic water meter if the first sound wave frequency is within the preset sound wave variation range, and control the target ultrasonic water meter to operate at the target sound wave frequency.
[0053] In a third aspect, the present application provides an electronic device, including:
[0054] processor;
[0055] a memory for storing processor-executable instructions;
[0056] The processor is configured to execute to implement the ultrasonic-based liquid flow measurement and control method provided in the first aspect.
[0057] In a fourth aspect, the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement the ultrasonic-based liquid flow measurement and control method provided in the first aspect.
[0058] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0059] Based on the average flow velocity and flow velocity change rate within a first preset time period, the present application can distinguish the mode of the target ultrasonic water meter into a fixed frequency mode or a variable frequency mode, thereby ensuring the measurement accuracy of the ultrasonic water meter and extending the service life of the target ultrasonic water meter; the present application directly associates the pressure change in the target main pipe section with the measurement frequency of the target ultrasonic water meter by determining the minimum average pressure deviation, so that the measurement frequency of the target ultrasonic water meter can completely match the pressure change, flow velocity change and flow rate change in the target main pipe section, thereby making the measurement accuracy of the target ultrasonic water meter higher, and the present application also limits the amplitude of the first sound wave frequency change by presetting the sound wave change range, thereby avoiding damage to the target ultrasonic water meter and extending the service life.
[0060] Furthermore, the present application can accurately determine whether the target ultrasonic water meter needs to remain silent by dividing the water use time and obtaining the water use probability of each time period, as well as judging the flow rate, the water use period of the current time period, and the water use probability of the next time period, thereby avoiding meaningless work of the target ultrasonic water meter, extending its service life, and limiting the target ultrasonic water meter from remaining silent at will; it also extends the service life of the target ultrasonic water meter.
[0061] Furthermore, after obtaining several groups of transit time differences, the present application directly uses the preset sound wave frequency and several transit time differences to directly determine the target sound wave frequency. This has smaller calculation amount and higher calculation efficiency, and can more quickly determine the target sound wave frequency of the target ultrasonic water meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 A schematic flow chart of a method for measuring and controlling liquid flow based on ultrasonic waves provided in this application;
[0064] Figure 2 A schematic diagram of the structure of the ultrasonic-based liquid flow measurement and control device provided in this application;
[0065] Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0066] The embodiment of the present application solves the technical problem in the prior art that ultrasonic water meters can only measure at a fixed frequency and their service life is difficult to guarantee by providing an ultrasonic-based liquid flow measurement and control method.
[0067] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0068] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0069] The ultrasonic-based liquid flow measurement and control method comprises: obtaining the average flow velocity and flow velocity change rate of the target main pipe section within a first preset time length, and if the average flow velocity is higher than the flow velocity threshold value, and the flow velocity change rate is higher than the flow velocity change rate threshold value, executing the following steps: obtaining the preset sound wave frequency of the target ultrasonic water meter, the target ultrasonic water meter corresponds to the target main pipe section one by one; determining a plurality of groups of transit time differences according to the preset sound wave frequency of the target ultrasonic water meter and the second preset time length; executing steps S141-S142 for each group of transit time differences, including: step S141, determining the pipe section flow corresponding to the target main pipe section under the group of transit time differences according to the transit time differences; step S142, determining the pipe section flow corresponding to the target main pipe section under the group of transit time differences according to the group of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the group of transit time differences, and the pipe section pressure of the target main pipe section The pipe section parameters are used to determine the corresponding pipe section pressure under the group of transit time differences, and the pipe section parameters at least include the average cross-sectional area, the pipe section resistance loss coefficient, the pipe section length and the pipe section elevation difference; according to the pipe section pressures corresponding to the several groups of transit time differences and the average pressure of the target total pipe section within the second preset time, the minimum average pressure deviation within the second preset time is determined; according to the minimum average pressure deviation of the second preset time, the maximum value of the pipe section pressure under the several groups of transit time differences, the minimum value of the pipe section pressure under the several groups of transit time differences and the preset sound wave frequency, the first sound wave frequency is determined; it is judged whether the difference between the first sound wave frequency and the preset sound wave frequency is within the preset sound wave variation range; if so, the first sound wave frequency is used as the target sound wave frequency of the target ultrasonic water meter, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0070] First of all, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0071] This application provides Figure 1 The ultrasonic-based liquid flow measurement and control method shown includes steps S11-S18.
[0072] Regarding step S11, the average flow velocity and flow velocity change rate of the target main pipe section within the first preset time length are obtained. If the average flow velocity is higher than the flow velocity threshold and the flow velocity change rate is higher than the flow velocity change rate threshold, step S12 is executed.
[0073] The target main pipe section refers to the pipe section where the flow rate is measured using a target ultrasonic water meter. Generally speaking, one target user can correspond to a target main pipe section (the target main pipe section is connected to several water supply branches), and the target ultrasonic water meter can be used to measure the flow rate of the target main pipe section.
[0074] The first preset time length can be determined according to actual conditions, such as 2s, 3s or 5s, etc. The flow rate threshold and the flow rate change rate threshold can be determined comprehensively according to the pipe diameter of the target main pipe section, the service life of the target main pipe section, and the age of the residential building, and are not limited here.
[0075] The average flow rate within the first preset time period can be determined based on the flow rate within the first preset time period and the first preset time period; the flow rate change rate can be determined according to the flow rate at the beginning of the first preset time period and the flow rate at the end of the first preset time period.
[0076] In order to minimize damage to the target ultrasonic water meter and enable the target ultrasonic water meter to maintain a certain working accuracy, this application distinguishes the working modes of the target ultrasonic water meter based on the average flow rate and the flow rate change rate within the first preset time period, as follows:
[0077] When the average flow velocity is higher than the flow velocity threshold and the flow velocity change rate is higher than the flow velocity change rate threshold, it means that the flow in the target main pipe section changes rapidly within the first preset time period and the flow rate is large. At this time, the original preset sound wave frequency corresponding to the target ultrasonic water meter is not sufficient to cope with the change in flow rate, resulting in lower measurement accuracy. At this time, the target ultrasonic water meter can be controlled to enter the variable frequency mode, that is, execute steps S12-S18.
[0078] If the average flow rate of the target main pipe section within the first preset time period is lower than the flow rate threshold, or the flow rate change rate of the target main pipe section within the first preset time period is lower than the flow rate change rate threshold, the target ultrasonic water meter is controlled to operate at a preset sound wave frequency.
[0079] The above means that there may be scenarios where the flow velocity changes greatly but the flow rate changes little; or the flow rate changes little but the flow rate is large. At this time, the preset sound wave frequency of the target ultrasonic water meter can ensure the measurement accuracy. If the preset sound wave frequency is updated at this time, the measurement accuracy is improved little, but the service life of the ultrasonic water meter will be reduced.
[0080] Therefore, the present application controls the working mode of the ultrasonic water meter based on the average flow velocity and the flow velocity change rate within the first preset time period, which can ensure the measurement accuracy while extending the service life of the ultrasonic water meter as much as possible.
[0081] On this basis, when the conditions of "the average flow velocity is not higher than the flow velocity threshold, and the flow velocity change rate is not higher than the flow velocity change rate threshold" are met at the same time, the following description can be continued: "Then determine whether the average flow velocity of the target main pipe section within the first preset time period is 0...then control the target ultrasonic water meter to remain silent."
[0082] Of course, if the conditions of "the average flow velocity is not higher than the flow velocity threshold, and the flow velocity change rate is not higher than the flow velocity change rate threshold" are met at the same time, the following description can also be directly executed: "Then determine whether the average flow velocity of the target main pipe section within the first preset time period is 0...then control the target ultrasonic water meter to remain silent."
[0083] Regarding step S12, a preset sound wave frequency of a target ultrasonic water meter is obtained, and the target ultrasonic water meter corresponds to the target main pipe section one by one.
[0084] When the target ultrasonic water meter is in fixed frequency mode, it can always run at the preset sound wave frequency; when the target ultrasonic water meter is in variable frequency mode, the preset sound wave frequency can be updated in real time. The target ultrasonic water meter measures the flow of the target main pipe section at the updated frequency to ensure the measurement accuracy. Please refer to the following instructions for details.
[0085] Regarding step S13, a plurality of groups of transit time difference values are determined according to the preset sound wave frequency and the second preset time length of the target ultrasonic water meter.
[0086] The transit time difference refers to the difference between the time required for the upstream signal to travel downstream and the time required for the downstream signal to return to the upstream signal.
[0087] The preset sound wave frequency may generally be 20000 Hz, and the second preset duration may be determined according to the magnitude of the preset sound wave frequency, and may specifically be 0.01 s or 0.001 s, etc.
[0088] For example, when the preset sound wave frequency is 20000 Hz and the second preset time length is 0.001 s, 20 sets of transit time differences can be determined. It is understandable that the magnitudes of the 20 sets of transit time differences are all different (because the water flow and flow rate are changing).
[0089] Regarding step S14, for each set of transit time differences, steps S141-S142 are executed, including:
[0090] Step S141, according to the transit time difference, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences.
[0091] The liquid flow rate in the target main pipe section can be determined by the transit time difference of each group, and then converted into the flow rate of the target main pipe section.
[0092] Step S142, determining the corresponding pipe section pressure under the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow rate corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters include at least the average cross-sectional area, the pipe section resistance loss coefficient, the pipe section length, and the pipe section elevation difference.
[0093]
[0094] in, is the initial pipe section pressure of the target total pipe section, is the pipe section pressure, is the pipe section resistance loss coefficient, is the liquid density, is the elevation difference of the pipe section, Q is the flow rate of the pipe section, A is the average cross-sectional area, is the pipe diameter, is the length of the pipe section.
[0095] Regarding step S15, the minimum average pressure deviation within the second preset time length is determined according to the corresponding pipe section pressures under the plurality of groups of transit time differences and the average pressure of the target total pipe section within the second preset time length.
[0096] Specifically, it includes:
[0097]
[0098] in, is the minimum mean pressure deviation, n is the number of groups of transit time differences, is the pressure of the jth group of pipe sections, is the average pressure (the average value of the pipe section pressure corresponding to several groups of transit time differences).
[0099] The present application can accurately reflect the rate of change of the pressure difference and the stability of the liquid flow in the target main pipe section through the minimum average pressure deviation. The larger the value, the greater the change in liquid flow. The smaller it is, the smaller the change in liquid flow.
[0100] Regarding step S16, the first sound wave frequency is determined according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences and the preset sound wave frequency.
[0101] Specifically, it includes: determining the pressure difference according to the maximum value of the pipe section pressure under several groups of transit time differences and the minimum value of the pipe section pressure under several groups of transit time differences; determining the pressure fluctuation rate according to the pressure difference and the minimum average pressure deviation; determining the first sound wave frequency according to the pressure fluctuation rate and the preset sound wave frequency.
[0102] Specifically include:
[0103]
[0104] in, is the first sound wave frequency, To preset the sound wave frequency, is the maximum value of the pipe section pressure, is the minimum value of the pipe section pressure.
[0105] The present application determines the first sound wave frequency based on the minimum average pressure deviation, the minimum value of the pipe section pressure, the maximum value of the pipe section pressure and the preset sound wave frequency, which means that the present application determines the first sound wave frequency by the degree of pressure change, which can make the measurement frequency of the target ultrasonic water meter adaptive, thereby reducing the power consumption of the target ultrasonic water meter and increasing the measurement accuracy, thereby achieving the purpose of variable frequency adaptive measurement.
[0106] Regarding step S17, it is determined whether the difference between the first sound wave frequency and the preset sound wave frequency is within the preset sound wave variation range.
[0107] The difference between the first sound wave frequency and the preset sound wave frequency refers to the absolute value difference between the first sound wave frequency and the preset sound wave frequency.
[0108] The preset sound wave variation range can be determined according to the specific usage of the target ultrasonic water meter, and there is no restriction here. By setting the preset sound wave variation range, the service life of the ultrasonic water meter can be increased. When the absolute value difference between the first sound wave frequency and the preset sound wave frequency is not within the preset sound wave variation range, it means that the change between the first sound wave frequency and the preset sound wave frequency is too small or too large. When the change is too large, the service life of the target ultrasonic water meter will be reduced; when the change is too small, it has little effect on the accuracy. At this time, frequency conversion is meaningless and will reduce the service life of the target ultrasonic water meter.
[0109] When the absolute value difference between the first sound wave frequency and the preset sound wave frequency is within the preset sound wave variation range, step S18 may be executed.
[0110] When the absolute value difference between the first sound wave frequency and the preset sound wave frequency is not within the preset sound wave variation range, the range extreme value of the preset sound wave variation range can be determined, and the range extreme value includes the range maximum value and the range minimum value; the absolute value of the difference between the first difference and the range maximum value, and the absolute value of the difference between the first difference and the range minimum value are determined, wherein the first difference is the absolute value difference between the first sound wave frequency and the preset sound wave frequency; the target sound wave frequency is determined according to the range extreme value and the preset sound wave frequency corresponding to the smaller absolute value of the two difference absolute values, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0111] Specifically, after determining the range extreme value, the target sound wave frequency is determined based on the sum of the range extreme value and the preset sound wave frequency.
[0112] The present application increases the service life of a target sonic wave water meter by limiting the change of a preset sonic wave frequency of the target sonic wave water meter.
[0113] Regarding step S18, if yes, the first sound wave frequency is used as the target sound wave frequency of the target ultrasonic water meter, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
[0114] If the absolute value difference between the first sound wave frequency and the preset sound wave frequency is within the preset sound wave variation range, it means that the variation amplitude of the first sound wave frequency can simultaneously meet the measurement accuracy and extend the service life of the target ultrasonic water meter as much as possible.
[0115] Furthermore, in order to achieve more precise control of the target ultrasonic water meter, extend the service life of the target ultrasonic water meter as much as possible, and save the use cost, when the average flow rate is not higher than the flow rate threshold, and the flow rate change rate is not higher than the flow rate change rate threshold:
[0116] Determine whether the average flow velocity of the target main pipe section within the first preset time period is lower than the flow velocity threshold, and whether the flow velocity change rate is lower than the flow velocity change rate threshold; if both are lower, determine whether the average flow velocity of the target main pipe section within the first preset time period is 0; if it is 0, obtain the historical water use data of the target user corresponding to the target ultrasonic water meter; according to the historical water use data, divide the water use time period of the target user and the water use probability corresponding to each water use time period; determine the water use probability in the corresponding water use time period at the current moment, if the water use probability is lower than the preset water use probability threshold; then determine the time length from the current moment to the next water use time period; if the time length of the next water use time period is lower than the preset time length, determine whether the water use probability of the next water use time period is also lower than the water use probability threshold; if it is also lower, control the target ultrasonic water meter to remain silent.
[0117] Specifically, when the average flow velocity is lower than the flow velocity threshold, and the flow velocity change rate is lower than the flow velocity change rate threshold, it indicates that the flow velocity and flow rate in the target main pipe section are both low. It is then further determined whether the average flow velocity within the first preset time period is 0. If it is 0, it can be determined whether the target ultrasonic water meter can be controlled to remain silent.
[0118] It is understandable that for most residential users, their water usage periods are relatively concentrated. Based on the historical water usage data of the residential users, several relatively concentrated water usage periods can be divided, and the water usage probability of each period can be determined (this can be achieved based on a variety of methods, such as statistics, neural network prediction, etc.).
[0119] Among them, the methods of dividing water use periods by using preset neural network prediction include:
[0120] According to the historical water use data, the concentrated water use period, silent water use period and scattered water use period are obtained; the water consumption in the concentrated water use period of each day, the water consumption in the silent water use period of each day and the water consumption in the scattered water use period of each day in the historical water use data are input into the preset neural network model to obtain the water use probability in the concentrated water use period, the water use probability in the silent water use period and the water use probability in the scattered water use period respectively.
[0121] For example, user A’s water usage history data for a month is divided into water usage time periods and water usage probabilities, as shown in Table 1:
[0122] Table 1
[0123]
[0124] It is understandable that this is just an example and a more detailed division can be made.
[0125] The preset water use probability threshold can be set according to actual conditions, such as 5%, 3% or 1.5%. If the water use probability is lower than the preset water use probability threshold, it means that the probability of water use in this water use period is very low, and then it is further judged whether the time length to the next water use period is lower than the preset time length. If it is lower, it means that there is still a certain time length from the target ultrasonic water meter to the next water use period, and the water use probability will not change suddenly, then the target ultrasonic water meter can be controlled to remain silent.
[0126] Through the above multiple judgment steps, the target ultrasonic water meter can be kept silent for a certain period of time when the water use probability is 0. In other words, the target ultrasonic water meter remains silent when it does not need to work, which in disguise increases the service life of the target ultrasonic water meter. In addition, by judging whether the time length to the next water use period is less than the preset time length, it can also ensure that the target ultrasonic water meter does not remain silent at will, avoid the target ultrasonic water meter from remaining silent frequently, and also increase the service life of the target ultrasonic water meter.
[0127] In addition, after obtaining several groups of transit time differences, the present application also provides another faster, more convenient and less computationally intensive method for determining the target sound wave frequency, including: determining the standard transit time difference based on a preset sound wave frequency; determining the minimum mean time deviation based on the standard transit time difference, several groups of transit time differences and the number of groups; determining the target sound wave frequency based on the maximum value among several groups of transit time differences, the minimum value among several groups of transit time differences, the minimum mean time deviation and the preset sound wave frequency, and controlling the target ultrasonic water meter to operate at the target sound wave frequency.
[0128] Among them, the reciprocal of the preset sound wave frequency is the value of the standard transit time difference, and the formula for determining the minimum mean time deviation includes:
[0129]
[0130] in, is the minimum mean time deviation, n is the number of groups of transit time differences, is the transit time difference of the gth group, is the standard transit time difference.
[0131] Determine the target sound wave frequency, including:
[0132]
[0133] in, is the target sound wave frequency, To preset the sound wave frequency, is the maximum value among several groups of transit time differences, It is the minimum value among several groups of transit time differences.
[0134] By directly associating the target sound wave frequency with time, the amount of calculation is reduced and the efficiency of determining the target sound wave frequency is higher.
[0135] To summarize, the present application can distinguish the mode of the target ultrasonic water meter into a fixed frequency mode or a variable frequency mode based on the average flow velocity and the flow velocity change rate within a first preset time period, thereby ensuring the measurement accuracy of the ultrasonic water meter while extending the service life of the target ultrasonic water meter; the present application directly associates the pressure change in the target main pipe section with the measurement frequency of the target ultrasonic water meter by determining the minimum average pressure deviation, so that the measurement frequency of the target ultrasonic water meter can completely match the pressure change, flow velocity change and flow rate change in the target main pipe section, thereby making the measurement accuracy of the target ultrasonic water meter higher, and the present application also limits the amplitude of the first sound wave frequency change by presetting the sound wave change range, thereby avoiding damage to the target ultrasonic water meter and extending the service life.
[0136] Furthermore, the present application can accurately determine whether the target ultrasonic water meter needs to remain silent by dividing the water use time and obtaining the water use probability of each time period, as well as judging the flow rate, the water use period of the current time period, and the water use probability of the next time period, thereby avoiding meaningless work of the target ultrasonic water meter, extending its service life, and limiting the target ultrasonic water meter from remaining silent at will; it also extends the service life of the target ultrasonic water meter.
[0137] Furthermore, after obtaining several groups of transit time differences, the present application directly uses the preset sound wave frequency and several transit time differences to directly determine the target sound wave frequency. This has smaller calculation amount and higher calculation efficiency, and can more quickly determine the target sound wave frequency of the target ultrasonic water meter.
[0138] Based on the same inventive concept, the present application provides Figure 2 The ultrasonic-based liquid flow measurement and control device shown comprises:
[0139] The judgment module 21 is used to obtain the average flow velocity and flow velocity change rate of the target main pipe section within the first preset time length. If the average flow velocity is higher than the flow velocity threshold and the flow velocity change rate is higher than the flow velocity change rate threshold, the following steps are performed;
[0140] An acquisition module 22, used to acquire a preset sound wave frequency of a target ultrasonic water meter, wherein the target ultrasonic water meter corresponds to the target main pipe section in a one-to-one manner;
[0141] A difference determination module 23, used to determine a plurality of groups of transit time differences according to a preset sound wave frequency and a second preset duration of a target ultrasonic water meter;
[0142] The pressure determination module 24 is used to execute steps S141-S142 for each set of transit time differences, including:
[0143] Step S141, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences according to the transit time differences;
[0144] Step S142, determining the pipe section pressure corresponding to the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters at least include an average cross-sectional area, a pipe section resistance loss coefficient, a pipe section length, and a pipe section elevation difference;
[0145] The deviation determination module 25 is used to determine the minimum average pressure deviation within the second preset time length according to the corresponding pipe section pressures under the plurality of groups of transit time differences and the average pressure of the target total pipe section within the second preset time length;
[0146] A frequency determination module 26, configured to determine a first sound wave frequency according to a minimum average pressure deviation of a second preset time length, a maximum value of a pipe section pressure under a plurality of sets of transit time differences, a minimum value of a pipe section pressure under a plurality of sets of transit time differences, and a preset sound wave frequency;
[0147] A range determination module 27, used to determine whether the difference between the first sound wave frequency and the preset sound wave frequency is within a preset sound wave variation range;
[0148] The control operation module 28 is used to use the first sound wave frequency as the target sound wave frequency of the target ultrasonic water meter if the first sound wave frequency is within the preset sound wave variation range, and control the target ultrasonic water meter to operate at the target sound wave frequency.
[0149] Based on the same inventive concept, the present application also provides Figure 3 An electronic device as shown includes:
[0150] Processor 31;
[0151] a memory 32 for storing processor executable instructions;
[0152] The processor is configured to execute to implement the ultrasonic-based liquid flow measurement and control method as provided above.
[0153] Based on the same inventive concept, the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor 31 of the electronic device, the electronic device can implement the ultrasonic-based liquid flow measurement and control method as provided above.
[0154] Since the electronic device introduced in this embodiment is an electronic device used to implement the information processing method in the embodiment of the present application, based on the information processing method introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the electronic device used by the information processing method in the embodiment of the present application, it belongs to the scope of protection of this application.
[0155] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0159] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0160] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A liquid flow measurement and control method based on ultrasonic wave, characterized in that: The method comprises: The average flow velocity and flow velocity change rate of the target main pipe section within the first preset time length are obtained. If the average flow velocity is higher than the flow velocity threshold and the flow velocity change rate is higher than the flow velocity change rate threshold, the following steps are performed; Acquiring a preset sound wave frequency of a target ultrasonic water meter, wherein the target ultrasonic water meter corresponds to the target main pipe section in a one-to-one manner; Determining a plurality of groups of transit time differences according to a preset sound wave frequency and a second preset duration of the target ultrasonic water meter; For each set of transit time differences, steps S141-S142 are performed, including: Step S141, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences according to the transit time differences; Step S142, determining the pipe section pressure corresponding to the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters include an average cross-sectional area, a pipe section resistance loss coefficient, a pipe section length, and a pipe section elevation difference; Determining the minimum average pressure deviation within the second preset time length according to the pipe section pressures corresponding to the plurality of groups of transit time differences and the average pressure of the target total pipe section within the second preset time length includes: in, is the minimum mean pressure deviation, n is the number of groups of transit time differences, is the pressure of the jth group of pipe sections, is the average pressure; Determining the first sound wave frequency according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences, and the preset sound wave frequency, comprising: in, is the first sound wave frequency, To preset the sound wave frequency, is the maximum value of the pipe section pressure, is the minimum value of the pipe section pressure; Determining whether the difference between the first sound wave frequency and the preset sound wave frequency is within a preset sound wave variation range; If so, the first sound wave frequency is used as the target sound wave frequency of the target ultrasonic water meter, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency; if the difference is not within the preset sound wave variation range, the method includes: determining the range extreme value of the preset sound wave variation range, the range extreme value includes the range maximum value and the range minimum value; determining the absolute value of the difference between the first difference and the range maximum value, and the absolute value of the difference between the first difference and the range minimum value, respectively, wherein the first difference is the absolute value difference between the first sound wave frequency and the preset sound wave frequency; determining the target sound wave frequency according to the range extreme value corresponding to the smaller absolute value of the two difference absolute values and the preset sound wave frequency, and controlling the target ultrasonic water meter to operate at the target sound wave frequency; The method further includes: if the average flow rate of the target main pipe section within the first preset time length is lower than the flow rate threshold, or the flow rate change rate of the target main pipe section within the first preset time length is lower than the flow rate change rate threshold, then controlling the target ultrasonic water meter to operate at the preset sound wave frequency, wherein the method further includes: judging whether the average flow rate of the target main pipe section within the first preset time length is lower than the flow rate threshold, and whether the flow rate change rate is lower than the flow rate change rate threshold; if both are lower, then judging whether the average flow rate of the target main pipe section within the first preset time length is 0; if it is 0, obtaining the historical water use data of the target user corresponding to the target ultrasonic water meter; according to the historical water use data, dividing the water use time period of the target user and the water use probability corresponding to each water use time period; determining the water use probability of the current moment in the corresponding water use time period, if the water use probability is lower than the preset water use probability threshold; then determining the time length from the current moment to the next water use time period; if the time length of the next water use time period is lower than the preset time length, then judging whether the water use probability of the next water use time period is also lower than the water use probability threshold; if it is also lower, then controlling the target ultrasonic water meter to remain silent.
2. The ultrasonic-based liquid flow measurement and control method according to claim 1, characterized in that: The determining of the first sound wave frequency according to the minimum average pressure deviation of the second preset time length, the maximum value of the pipe section pressure under several groups of transit time differences, the minimum value of the pipe section pressure under several groups of transit time differences, and the preset sound wave frequency comprises: Determine the pressure difference according to the maximum value of the pipe section pressure under several groups of transit time differences and the minimum value of the pipe section pressure under several groups of transit time differences; Determining a pressure fluctuation rate according to the pressure difference and the minimum average pressure deviation; The first sound wave frequency is determined according to the pressure fluctuation rate and the preset sound wave frequency.
3. The ultrasonic-based liquid flow measurement and control method according to claim 1, characterized in that: The step of obtaining the water use time periods of the target user and the water use probability corresponding to each water use time period according to the historical water use data includes: According to the historical water use data, concentrated water use period, silent water use period and scattered water use period are obtained; The water consumption during the concentrated water use period of each day in history, the water consumption during the silent water use period of each day in history, and the water consumption during the scattered water use period of each day in history in the historical water use data are input into a preset neural network model to obtain the water consumption probability during the concentrated water use period, the water consumption probability during the silent water use period, and the water consumption probability during the scattered water use period, respectively.
4. The ultrasonic-based liquid flow measurement and control method according to claim 1, characterized in that: After obtaining a plurality of sets of transit time difference values, the method further comprises: Determining a standard transit time difference according to the preset sound wave frequency; Determining a minimum mean time deviation according to the standard transit time difference, a plurality of groups of transit time difference values, and the number of groups; According to the maximum value among several groups of transit time differences, the minimum value among several groups of transit time differences, the minimum mean time deviation and the preset sound wave frequency, the target sound wave frequency is determined, and the target ultrasonic water meter is controlled to operate at the target sound wave frequency.
5. An ultrasonic-based liquid flow measurement and control device, characterized in that: The ultrasonic-based liquid flow measurement and control method applied to any one of claims 1 to 4, the device comprising: A judgment module is used to obtain the average flow velocity and flow velocity change rate of the target main pipe section within a first preset time length, and if the average flow velocity is higher than the flow velocity threshold, and the flow velocity change rate is higher than the flow velocity change rate threshold, the following steps are performed; An acquisition module, used to acquire a preset sound wave frequency of a target ultrasonic water meter, wherein the target ultrasonic water meter corresponds to the target main pipe section in a one-to-one manner; A difference determination module, used to determine a plurality of groups of transit time differences according to a preset sound wave frequency and a second preset duration of the target ultrasonic water meter; The pressure determination module is used to execute steps S141-S142 for each set of transit time differences, including: Step S141, determining the pipe section flow rate corresponding to the target main pipe section under the set of transit time differences according to the transit time differences; Step S142, determining the pipe section pressure corresponding to the set of transit time differences according to the set of transit time differences, the initial pipe section pressure, the pipe section flow corresponding to the set of transit time differences, and the pipe section parameters of the target total pipe section, wherein the pipe section parameters include an average cross-sectional area, a pipe section resistance loss coefficient, a pipe section length, and a pipe section elevation difference; A deviation determination module, configured to determine a minimum average pressure deviation within a second preset time period according to the corresponding pipe section pressures under a plurality of groups of transit time differences and the average pressure of the target total pipe section within a second preset time period; A frequency determination module, configured to determine a first sound wave frequency according to a minimum average pressure deviation of the second preset time length, a maximum value of a pipe section pressure under a plurality of sets of transit time differences, a minimum value of a pipe section pressure under a plurality of sets of transit time differences, and the preset sound wave frequency; A range determination module, used to determine whether the difference between the first sound wave frequency and the preset sound wave frequency is within a preset sound wave variation range; A control operation module is used to use the first sound wave frequency as the target sound wave frequency of the target ultrasonic water meter if the first sound wave frequency is within the preset sound wave variation range, and control the target ultrasonic water meter to operate at the target sound wave frequency.
6. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute to implement the ultrasonic-based liquid flow measurement and control method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement the ultrasonic-based liquid flow measurement and control method as described in any one of claims 1 to 4.
