A flow detection method, device and storage medium

By detecting the time difference change rate of the ultrasonic flowmeter and using different noise covariance filtering, distinguishing between the sudden flow rate caused by valve switching and noise interference, the problem of the ultrasonic flowmeter degradation in the noise interference is solved, and a higher metering accuracy is achieved.

CN114674385BActive Publication Date: 2025-08-05GOLDEN CARD WATER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011555859.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2025-08-05
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

It is difficult for existing ultrasonic flowmeters to accurately distinguish between sudden flow caused by valve switching operations and sudden flow caused by noise under noise interference, resulting in a decrease in metering accuracy.

Method used

By detecting the time difference change rate of the ultrasonic flowmeter, we judge whether the sudden change in the flow rate is caused by the valve switching operation, and filter the time difference with different noise covariances, and process the time difference under valve switching and non-switching operations respectively to improve the metering accuracy.

Benefits of technology

It realizes rapid response and accurate counting of flow rate sudden changes caused by valve switching operations, reduces the impact of flow rate sudden changes caused by noise interference, and improves the metering accuracy of the ultrasonic flowmeter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114674385B_ABST
    Figure CN114674385B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a flow detection method, device and storage medium. When detecting the flow, when it is detected that the first change rate of the first time difference of the ultrasonic flowmeter at the current moment and the second time difference at the previous moment at the first sampling frequency is greater than a preset value, it is determined whether the flow mutation in the pipeline is caused by the switching operation of the valve in the pipeline. If the flow mutation in the pipeline is caused by the switching operation of the valve in the pipeline, the first noise covariance and the second noise covariance are respectively used to filter the time differences of the valve performing the switching and non-switching operations, and the corresponding first filtered time difference and second filtered time difference are obtained, so as to detect the flow in the pipeline. After determining the cause of the flow mutation, the technical solution respectively uses two different noise covariances to filter the time difference of the ultrasonic flowmeter caused by the flow mutation, improving the accuracy of the ultrasonic flowmeter flow detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of flow detection, and particularly to a flow detection method, device, and storage medium. Background Art

[0002] In recent years, with the progress of technology and the improvement of people's living standards, flow detection is required in many places of people's daily life and industrial production. For example, the water flow rate of tap water and the natural gas flow rate commonly used in daily life. Ultrasonic flowmeters stand out among many flowmeters due to their advantages of high measurement accuracy and easy installation and use. An ultrasonic flowmeter utilizes the time difference generated when sound waves propagate in the downstream and upstream directions to detect the flow rate in a pipeline. However, during the use of an ultrasonic flowmeter, it is inevitable that other sounds will affect its accuracy.

[0003] In the prior art, in order to avoid the interference of noise on the ultrasonic flowmeter, a Kalman filter is usually used for filtering. By using an adaptive Kalman filter to filter the time difference changes caused by other sounds, the accuracy of the ultrasonic flowmeter is improved. However, when using this technical solution to filter the time difference of the ultrasonic flowmeter, the ultrasonic flowmeter will mistake the time difference mutation caused by noise for the real time difference mutation, resulting in a flow mutation, and record the non-real flow generated by noise as the real flow, and perform cumulative counting on the ultrasonic flowmeter, reducing the accuracy of the ultrasonic flowmeter. Summary of the Invention

[0004] Embodiments of this application provide a flow detection method, device, and storage medium, which can determine the cause of the flow mutation, and perform targeted filtering on the time difference mutations caused by different reasons, thereby improving the accuracy of the ultrasonic flowmeter.

[0005] In a first aspect, an embodiment of this application provides a flow detection method, and the flow detection method includes:

[0006] Collect a first time difference of an ultrasonic flowmeter at the current moment according to a first sampling frequency.

[0007] If a first change rate of the first time difference and a second time difference at the previous moment is greater than a preset value, determine whether a flow mutation in the pipeline is caused by performing a switching operation on a valve of the pipeline; wherein, the sampling frequency of the second time difference is the same as the sampling frequency of the first time difference.

[0008] If the flow rate in the pipeline suddenly changes due to a switching operation performed on the valve of the pipeline, filter the time difference of the switching operation performed on the valve using the first noise covariance to obtain a first filtered time difference; and filter the time difference of the non-switching operation performed on the valve using the second noise covariance to obtain a second filtered time difference; the first noise covariance is different from the second noise covariance.

[0009] Detect the flow rate in the pipeline according to the first filtered time difference and the second filtered time difference.

[0010] In a possible implementation manner, determining whether the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline includes:

[0011] Continuously collect multiple third time differences at a second sampling frequency; wherein, the second sampling frequency is greater than the first sampling frequency.

[0012] Determine whether the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline according to the multiple third time differences and the second time difference.

[0013] In a possible implementation manner, determining whether the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline according to the multiple third time differences and the second time difference includes:

[0014] Respectively calculate the second change rates of each of the third time differences in the multiple third time differences with respect to the second time difference;

[0015] Respectively calculate the third change rates between adjacent two of the third time differences in the multiple third time differences;

[0016] Determine whether the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline according to the second change rates of each of the third time differences with respect to the second time difference, and the third change rates between adjacent two of the third time differences.

[0017] In a possible implementation manner, determining whether the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline according to the second change rates of each of the third time differences with respect to the second time difference, and the third change rates between adjacent two of the third time differences includes:

[0018] If the second change rates of each of the third time differences with respect to the second time difference are all greater than a preset value, and the third change rates between adjacent two of the third time differences are all less than or equal to the preset value, determine that the sudden change in the flow rate in the pipeline is caused by a switching operation performed on the valve of the pipeline.

[0019] In a possible implementation, the time difference is filtered using the noise covariance to obtain a filtered time difference, including:

[0020] The noise covariance is used to filter the first time difference and the multiple third time differences to obtain a filtered time difference.

[0021] In a possible implementation, the method further includes:

[0022] If the first change rate of the first time difference and the second time difference at the previous moment is less than or equal to a preset value, the second noise covariance is used to filter the time difference.

[0023] In a second aspect, an embodiment of the present application provides a flow detection device, where the flow detection device includes:

[0024] An acquisition unit, configured to acquire the first time difference of the ultrasonic flowmeter at the current moment according to the first sampling frequency;

[0025] A judgment unit, configured to judge whether a sudden change in the flow rate in the pipeline is caused by a switching operation on the valve of the pipeline when the first change rate of the first time difference and the second time difference at the previous moment is greater than a preset value;

[0026] A processing unit, configured to, when the judgment unit judges that the sudden change in the flow rate in the pipeline is caused by a switching operation on the valve of the pipeline, filter the time difference of the switching operation on the valve using the first noise covariance to obtain a first filtered time difference; and filter the time difference of the non-switching operation on the valve using the second noise covariance to obtain a second filtered time difference; the first noise covariance is different from the second noise covariance;

[0027] The acquisition unit is further configured to detect the flow rate in the pipeline according to the first filtered time difference and the second filtered time difference.

[0028] In a possible implementation, the acquisition unit is further configured to continuously acquire multiple third time differences according to the second sampling frequency; where the second sampling frequency is greater than the first sampling frequency.

[0029] The judgment unit is specifically configured to judge whether a sudden change in the flow rate in the pipeline is caused by a switching operation on the valve of the pipeline according to the multiple third time differences and the second time difference.

[0030] In a possible implementation, the processing unit is further configured to calculate the second change rate between each third time difference and the second time difference among the multiple third time differences respectively; and calculate the third change rate between adjacent two third time differences among the multiple third time differences respectively.

[0031] The determining unit is specifically configured to determine whether the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline according to the second change rate of each of the third time differences and the second time difference, and the third change rate between two adjacent third time differences.

[0032] In a possible implementation manner, the determining unit is specifically configured to determine that the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline when the second change rate of each of the third time differences and the second time difference is greater than a preset value, and the third change rate between two adjacent third time differences is less than or equal to the preset value.

[0033] In a possible implementation manner, the processing unit is specifically configured to filter the first time difference and the multiple third time differences by using a noise covariance to obtain filtered time differences.

[0034] In a possible implementation manner, the processing unit is specifically configured to filter the time difference by using the second noise covariance when the first change rate of the first time difference and the second time difference at the previous moment is less than or equal to a preset value.

[0035] In a third aspect, an embodiment of the present application further provides a flow rate detection device, which may include a memory and a processor; wherein,

[0036] The memory is used to store a computer program.

[0037] The processor is configured to read the computer program stored in the memory and execute the flow rate detection method described in any possible implementation manner of the first aspect according to the computer program in the memory.

[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the flow rate detection method described in any possible implementation manner of the first aspect is implemented.

[0039] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the flow rate detection method described in any possible implementation manner of the first aspect is implemented.

[0040] It can be seen that the embodiments of the present application provide a flow detection method, device and storage medium. When using an ultrasonic flowmeter to detect the flow in a pipeline, by detecting that the first change rate of the first time difference of the ultrasonic flowmeter at the current moment and the second time difference at the previous moment at the first sampling frequency is greater than a preset value, it is judged whether the flow mutation in the pipeline is caused by the execution of a valve switching operation in the pipeline, so as to distinguish the cause of the flow mutation. In addition, by using the first noise covariance and the second noise covariance to filter the time differences of the ultrasonic flowmeter performing valve switching and non-switching operations respectively, targeted filtering for different time difference mutations is achieved, and the flow in the pipeline is detected by the first filtered time difference and the second filtered time difference obtained after filtering, so that a rapid response to the flow mutation caused by the execution of the valve switching operation is made and recorded as a real flow mutation, and cumulative counting is performed by the ultrasonic flowmeter. The flow mutation caused by the valve performing a non-switching operation, that is, the flow mutation caused by noise, is recorded as an unreal flow mutation, and the ultrasonic flowmeter does not count this, thereby improving the accuracy of the ultrasonic flowmeter. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 FIG. is a schematic diagram of the working principle of an ultrasonic flow provided by an embodiment of the present application;

[0042] Figure 2 FIG. is a schematic diagram of the effect after filtering by an adaptive Kalman filter provided by an embodiment of the present application;

[0043] Figure 3 FIG. is a partial effect schematic diagram of the filtering by an adaptive Kalman filter provided by an embodiment of the present application;

[0044] Figure 4 FIG. is a schematic flowchart of a flow detection method provided by an embodiment of the present application;

[0045] Figure 5 FIG. is a schematic flowchart of another flow detection method provided by an embodiment of the present application;

[0046] Figure 6 FIG. is a timing schematic diagram of an ultrasonic flowmeter provided by an embodiment of the present application;

[0047] Figure 7 FIG. is a schematic diagram of the Kalman filtering effect using the second covariance filtering provided by an embodiment of the present application;

[0048] Figure 8 FIG. is a schematic diagram of the Kalman filtering effect provided by an embodiment of the present application;

[0049] Figure 9 FIG. is a partial schematic diagram of the Kalman filtering effect provided by an embodiment of the present application;

[0050] Figure 10 The structural schematic diagram of a flow detection device provided by an embodiment of the present application;

[0051] Figure 11 The structural schematic diagram of another flow detection device provided by an embodiment of the present application.

[0052] Through the above-mentioned drawings, specific embodiments of the present disclosure have been shown, and more detailed descriptions will be provided hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. Specific Embodiments

[0053] Exemplary embodiments will be described in detail herein, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. In the textual description of the present application, the character " / " generally represents an "or" relationship between the associated objects before and after.

[0055] The technical solutions provided by the embodiments of the present application can be applied to scenarios where an ultrasonic flowmeter is used for flow detection, such as the detection of water flow or natural gas flow, etc. An ultrasonic flowmeter detects the flow in a pipeline by detecting the effect of the fluid flow on an ultrasonic beam. In the embodiments of the present application, the detection principle of the ultrasonic flowmeter is described by taking the time difference method as an example. Specifically, reference can be made to Figure 1 as shown Figure 1 The schematic diagram of the working principle of an ultrasonic flow provided by an embodiment of the present application. According to Figure 1 as shown, the upstream sensor and the downstream sensor of the ultrasonic flowmeter are not installed opposite to each other on both sides of the pipe wall, but are installed at a certain inclination angle, that is, the angle between the connecting line of the upstream sensor and the downstream sensor and the horizontal direction is θ. The embodiments of the present application do not impose any limitations on the specific angle. Figure 1Among them, L is the straight-line distance between the upstream sensor and the downstream sensor, T1 is the time required for the signal sent by the upstream sensor to be received by the downstream sensor, T2 is the time required for the signal sent by the downstream sensor to be received by the upstream sensor, the diameter of the pipeline and the distance between the upstream sensor and the downstream sensor along the pipeline direction are the installation distances. According to Figure 1 the shown flow direction, it can be known that T1 is the downstream propagation time and T2 is the upstream propagation time. Through the time difference between the downstream propagation time and the upstream propagation time, the sound speed of ultrasonic waves in a non-flowing medium, the flow velocity of the fluid medium, the installation distance, and the diameter of the pipeline, the flow rate of the fluid can be calculated and displayed by an ultrasonic flowmeter. In addition, the ultrasonic flowmeter also includes components such as a control circuit, a display screen, and a transducer, which are not limited in the embodiments of this application.

[0056] During the use of the ultrasonic flowmeter, due to interference such as fouling on the surface of the transducer, more impurities, and noise, it will cause a change in the signal amplitude of the transducer, resulting in a sudden change in the time difference. In addition, when the user switches the valve in the pipeline, a sudden change in the time difference will also occur, resulting in a sudden change in the flow rate, which will reduce the accuracy of the ultrasonic flowmeter.

[0057] In order to improve the accuracy of the ultrasonic flowmeter, an adaptive Kalman filter is usually used to filter the time difference generated during the use of the ultrasonic flowmeter, and correct the sudden change in the time difference caused by external interference of the ultrasonic flowmeter, so as to ensure the measurement accuracy of the ultrasonic flowmeter.

[0058] Figure 2 This is a schematic diagram of the effect after filtering by an adaptive Kalman filter provided by an embodiment of this application. Figure 3 This is a partial schematic diagram of the effect after filtering by an adaptive Kalman filter provided by an embodiment of this application. Figure 2 The solid line in represents the original flow rate of the ultrasonic flowmeter before filtering, and the dotted line is the flow rate after filtering by the adaptive Kalman filter. From Figure 2 it can be seen that when the true flow rate of the ultrasonic flowmeter is at the 5th second, the flow rate value increases from 0 L / h to about 1050 L / h, and this flow rate value continues until the 17th second when the flow rate value drops back to 0 L / h again. That is to say, the valve of the pipeline is opened at the 5th second and the valve of the pipeline is closed at the 17th second. When the pipeline valve is opened and the pipeline valve is closed, the adaptive Kalman filter adjusts its noise covariance in real time and uses the adjusted noise covariance to filter the sudden change in the time difference of the ultrasonic flowmeter, so that the ultrasonic flowmeter makes a timely response to the sudden change in the flow rate in the pipeline, that is, there appears Figure 2At the 5th second and the 17th second, the solid line and the dashed line coincide exactly. After the 17th second, the valve of the pipeline has been in a closed state, that is, there is no flow in the pipeline, and the flow value of the ultrasonic flowmeter should remain unchanged at 0 L / h. However Figure 2 In the original flow rate of the ultrasonic flowmeter shown, sudden changes in flow rate occur at approximately the 30th second, the 36th second, and the 39.5th second, and the duration of the sudden change in flow rate is extremely short. That is to say, these three sudden changes in flow rate are all caused by noise interference. Since Figure 2 The acquisition time is relatively long, and it is impossible to clearly see the specific change situation. Therefore, for the sudden change in flow rate at the 30th second, please refer to Figure 3 shown. According to Figure 3 shown, the adaptive Kalman filter filters the sudden change in time difference caused by noise, causing the ultrasonic flowmeter to record the sudden change in flow rate caused by noise as a real sudden change in flow rate and accumulate the generated flow value in the ultrasonic flowmeter, resulting in a flow deviation of the ultrasonic flowmeter and thus reducing the accuracy of the ultrasonic flowmeter. That is to say, using the adaptive Kalman filter to filter the ultrasonic flowmeter does not improve the measurement accuracy of the ultrasonic flowmeter.

[0059] Based on the above technical problems, the embodiment of the present application provides a flow detection method. Since the ultrasonic flowmeter determines the flow rate in the pipeline according to the time difference it generates, and sudden changes in time difference will occur in the ultrasonic flowmeter when the valve of the pipeline performs a switching operation and there is noise interference, and the sudden changes in time difference in the two cases are different. The sudden change in time caused by the valve of the pipeline performing a switching operation is caused by a real sudden change in flow rate, while the sudden change in time difference caused by noise interference is not a change in the flow rate in the pipeline. Therefore, it is possible to determine the reason for the sudden change in time difference of the ultrasonic flowmeter by comparing the change rate of the time difference between the first time difference at the current moment collected by the ultrasonic flowmeter and the second time difference at the previous moment with a preset value. In addition, since the prior art regards the sudden change in flow rate caused by noise interference as a real sudden change in flow rate and accumulates it in the ultrasonic flowmeter, resulting in low measurement accuracy of the ultrasonic flowmeter, the Kalman filter filters the sudden change in time difference of the ultrasonic flowmeter by using different noise covariances and obtains different filtered time differences according to different noise covariances, thereby detecting the flow rate in the pipeline and improving the measurement accuracy of the ultrasonic flowmeter.

[0060] Next, the flow detection method provided by the present application will be described in detail through specific embodiments. It can be understood that these specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0061] Figure 4Schematic flowchart of a flow rate detection method provided by an embodiment of the present application. This flow rate detection method can be executed by software and / or hardware devices. For example, the hardware device can be a flow rate detection device, and the flow rate detection device can be a terminal or a processing chip in the terminal. Exemplarily, please refer to Figure 4 As shown, the flow rate detection method may include:

[0062] S401. Collect the first time difference of the ultrasonic flowmeter at the current moment according to the first sampling frequency.

[0063] According to the schematic diagram of the ultrasonic flowmeter shown above Figure 1 As shown, the time difference of the ultrasonic flowmeter is the time difference between the downstream propagation time and the upstream propagation time. When collecting the time difference of the ultrasonic flowmeter, the first time difference at the current moment is collected according to the first sampling frequency. Here, the first sampling frequency is the number of times of collecting the time difference per unit time, and the embodiment of the present application does not make specific limitations on the first sampling frequency.

[0064] It can be understood that after collecting the time difference of the ultrasonic flowmeter, the time difference of the ultrasonic flowmeter collected each time can be stored, so that when calculating the flow rate change through the time difference, the ultrasonic flowmeter can perform cumulative measurement of the flow rate according to the continuous time differences.

[0065] Exemplarily, when the first time difference of the ultrasonic flowmeter at the current moment is collected, according to the first time difference and the second time difference at the previous moment stored, the time difference change rate is calculated by the following formula (1), denoted as the first change rate, and the first change rate is a percentage. In formula (1), R represents the time difference change rate, and the time difference change rate is set in the form of a percentage through formula (1). The embodiment of the present application only takes the time difference change rate in the form of a percentage as an example for illustration, and the present application does not limit other forms of the time difference change rate.

[0066]

[0067] After calculating the first change rate of the first time difference and the second time difference at the previous moment, the following S402 can be executed:

[0068] S402. If the first change rate of the first time difference and the second time difference at the previous moment is greater than the preset value, determine whether the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline.

[0069] Among them, the sampling frequencies of the first time difference and the second time difference are the same.

[0070] Specifically, by judging the magnitude relationship between the first change rate of the first time difference and the second time difference at the previous moment and a preset value, it is determined whether there is a sudden change in the time difference of the ultrasonic flowmeter, that is, whether there is a sudden change in the flow rate in the pipeline, so as to further determine whether the sudden change in the flow rate in the pipeline is caused by the operation of switching the valve of the pipeline. Among them, the specific value of the preset value can be determined according to the specific model of the ultrasonic flowmeter and the specific application scenario in the actual use process. The embodiments of the present application do not limit this, and the magnitude of the preset value should be in the same form as the first change rate. That is, when the first change rate is a percentage, the preset value should also be in the form of a percentage. For example, the preset value can be 50% or the like.

[0071] Specifically, if the first change rate of the first time difference and the second time difference at the previous moment is less than or equal to the preset value, it is determined that there is no sudden change in the flow rate in the pipeline; if the first change rate of the first time difference and the second time difference at the previous moment is greater than the preset value, it is determined that there is a sudden change in the flow rate in the pipeline. This sudden change in the flow rate may be a real sudden change in the flow rate or a sudden change in the flow rate caused by noise. Therefore, it is necessary to further determine whether the sudden change in the flow rate in the pipeline is caused by the operation of switching the valve of the pipeline.

[0072] Further, if it is determined that there is a sudden change in the flow rate in the pipeline, the sampling frequency of the time difference of the ultrasonic flowmeter is increased, that is, the number of times of collecting the time difference per unit time is increased, and after the sampling frequency is increased, the time interval between every two collections of the time difference is the same. Specifically, the sampling frequency is increased to the second sampling frequency. Obviously, the second sampling frequency is greater than the first sampling frequency. For example, the first sampling frequency is to collect the time difference once per unit time, that is, to collect the time difference once per second, and the second sampling frequency is to collect the time difference five times per unit time, that is, to collect the time difference five times per second. That is to say, the time difference needs to be stimulated once every 0.2 seconds. Continuously collect multiple third time differences according to the second sampling frequency, and judge whether the sudden change in the flow rate in the pipeline is caused by the operation of switching the valve of the pipeline based on the multiple collected time differences and the second time difference.

[0073] It can be understood that both the increased second sampling frequency and the first sampling frequency are the number of times of collecting the time difference per unit time, which can ensure that the time intervals of the time differences obtained by the ultrasonic flowmeter are the same, so as to facilitate its accumulation of the flow rate according to the time difference.

[0074] In this method, since the sudden change in the time difference caused by the valve of the pipeline, that is, the sudden change in the flow rate, is continuous, by collecting multiple third time differences and combining the second time difference, it can be judged whether the reason for the sudden change in the flow rate in the pipeline is caused by the operation of switching the valve of the pipeline, making the judgment result more accurate and avoiding misjudging the short-term sudden change in the time difference caused by noise as being caused by the operation of switching the valve of the pipeline.

[0075] Specifically, calculate the second change rate of each third time difference and the second time difference among multiple third time differences, and the third change rate between adjacent third time differences among multiple third time differences; and determine whether the flow rate mutation in the pipeline is caused by switching the valve of the pipeline according to the second change rate of each third time difference and the second time difference, and the third change rate between adjacent third time differences. Among them, when calculating the second change rate of each third time difference and the second time difference, multiple second change rates can be obtained by respectively replacing the first time difference in formula (1) with multiple third time differences; when calculating the third change rate between adjacent third time differences, the first time difference and the second time difference in formula (1) can be respectively replaced with the latter third time difference and the former third time difference of adjacent two time differences among multiple third time differences, so as to obtain multiple third change rates. For example, if 3 third time differences are obtained, which are the third time difference 1, the third time difference 2, and the third time difference 3 in the order of collection time, and the second change rates are respectively represented by R1, R2, and R3, then R1 = |third time difference 1 - second time difference| / second time difference × 100%, R2 = |third time difference 2 - second time difference| / second time difference × 100%, R3 = |third time difference 3 - second time difference| / second time difference × 100%. Assuming that the third change rates are respectively represented by R4 and R5, then R4 = |third time difference 2 - third time difference 1| / third time difference 1 × 100%, R5 = |third time difference 3 - third time difference 2| / third time difference 2 × 100%. Obviously, both the second change rate and the third change rate are in the form of percentages.

[0076] In this method, by calculating the second change rate and the third change rate of multiple time differences, it is further determined whether the flow rate mutation generated in the pipeline is caused by switching the valve of the pipeline, so as to exclude the flow rate mutation caused by other noise interference and improve the accuracy of the judgment result.

[0077] Furthermore, when determining whether the flow rate mutation in the pipeline is caused by switching the valve of the pipeline through the second change rate, the third change rate, and the magnitude of the preset value, it mainly includes: if the second change rate of each third time difference and the second time difference is greater than the preset value, and the third change rate between adjacent third time differences is less than or equal to the preset value, it is determined that the flow rate mutation in the pipeline is caused by switching the valve of the pipeline; otherwise, it is determined that the flow rate mutation in the pipeline is caused by noise interference.

[0078] In this method, it is determined that the sudden change in the flow rate in the pipeline is caused by performing a switching operation on the valve of the pipeline only when all the second change rates are greater than the preset value and all the third change rates are less than or equal to the preset value. This can ensure that the sudden change in the flow rate is continuous within a certain period of time rather than an accidental sudden change in the flow rate, thereby avoiding misjudging the sudden change in the flow rate caused by other noise interference as being caused by performing a switching operation on the valve of the pipeline, and improving the measurement accuracy of the ultrasonic flowmeter.

[0079] After determining whether the sudden change in the flow rate in the pipeline is caused by performing a switching operation on the valve of the pipeline, the following S403 can be executed:

[0080] S403. If the sudden change in the flow rate in the pipeline is caused by performing a switching operation on the valve of the pipeline, then filter the time difference of performing the switching operation on the valve using the first noise covariance to obtain the first filtered time difference; and filter the time difference of performing a non-switching operation on the valve using the second noise covariance to obtain the second filtered time difference.

[0081] Specifically, if the sudden change in the flow rate in the pipeline is caused by performing a switching operation on the valve of the pipeline, then filter the first time difference and multiple third time differences using the first noise covariance to obtain the filtered time difference, that is, the first filtered time difference; and filter the time difference collected at the first sampling frequency using the second noise covariance to obtain the second filtered time difference, that is, correct the sudden change in the flow rate caused by noise interference; where the first noise covariance is different from the second noise covariance.

[0082] In this method, by filtering the first time difference and multiple third time differences, the ultrasonic flowmeter can respond in a timely manner to the sudden change in the flow rate caused by performing a switching operation on the valve of the pipeline.

[0083] Furthermore, for S402 above, if the first change rate of the first time difference and the second time difference at the previous moment is less than or equal to the preset value, it is determined that no sudden change in the flow rate has occurred in the pipeline. At this time, the second noise covariance can be used to filter the collected time difference. That is to say, during the use of the ultrasonic flowmeter, except for using the first noise covariance for filtering when the valve of the pipeline performs a switching operation, the second noise covariance is used to filter the time difference in other cases, thereby avoiding the problem that the measurement accuracy of the ultrasonic flowmeter is low due to other noise interference during the process of flow rate measurement.

[0084] In addition, when the Kalman filter filters the time difference using the first noise covariance, the frequency of collecting the time difference of the ultrasonic flowmeter can be adjusted to the first sampling frequency to avoid wasting the power of the ultrasonic flowmeter due to a high sampling frequency.

[0085] S404. Detect the flow rate in the pipeline according to the first filtered time difference and the second filtered time difference.

[0086] Specifically, the filtered first filtered time difference and the second filtered time difference are used to replace the corresponding time differences before filtering, so as to ensure the temporal continuity of the time differences of the ultrasonic flowmeter. And according to the filtered first filtered time difference and the second filtered time difference, calculate the flow rate of the fluid in the pipeline recorded by the ultrasonic flowmeter. The specific calculation method can refer to the method described in the working principle of the ultrasonic flowmeter, which will not be elaborated in this embodiment of the present application.

[0087] In another possible implementation, after obtaining the first filtered time difference, the time differences of the ultrasonic flowmeter stored by the Kalman filter before the first filtered time difference can be eliminated, and the average value of the obtained multiple first filtered time differences can be used as the initial value of the Kalman filter, so as to detect the flow rate in the pipeline. It can save the storage space of the Kalman filter, thereby improving the response time of the Kalman filter to the flow rate mutation caused by the switching operation of the pipeline valve.

[0088] In another embodiment of the present application, when determining that a flow rate mutation occurs in the pipeline and increasing the sampling frequency of the time differences collected by the ultrasonic flowmeter, the difference from the above embodiment is that after increasing the sampling frequency to the second sampling frequency, the time interval between every two collections of the time differences by the second sampling frequency is different, that is, the fixed sampling frequency is changed to a variable sampling frequency. This scheme is more flexible in collecting the time differences of the ultrasonic flowmeter and can more accurately determine whether the flow rate mutation in the pipeline is caused by the switching operation of the pipeline valve.

[0089] Next, the flow rate detection method provided by the present application will be described through another embodiment. Specifically, it can be seen Figure 5 as shown Figure 5 is a schematic flowchart of another flow rate detection method provided by the embodiment of the present application. According to Figure 5 as shown, collect the time differences generated by the ultrasonic flowmeter at the first sampling frequency. Assume that the first sampling frequency is to collect the time differences of the ultrasonic flowmeter once per second, and store the collected time differences. The current first time difference of the collected ultrasonic flowmeter is t1, and calculate the time difference change rate, that is, the first change rate R, of the current first time difference t1 and the previous second time difference t0 through the following formula (2) 10 , and determine whether a time difference mutation occurs. Assume that the preset value is 50%. Then, if the first change rate R 10 is less than or equal to the preset value of 50%, it is determined that no time difference mutation occurs; if the first change rate R 10 is greater than the preset value of 50%, it is determined that a time difference mutation occurs.

[0090]

[0091] Further, if it is determined that a time difference mutation occurs, the frequency of the ultrasonic flowmeter is increased to the second sampling frequency. Assume that the second sampling frequency is to collect the time difference of the ultrasonic flowmeter 5 times per second. At this time, in order to further determine the reason for the time difference mutation, 5 third time difference data are continuously collected, which are t2, t3, t4, t5, and t6 respectively. The time difference change rates of the 5 collected third time differences and the second time difference t0, as well as the time difference change rates of every two adjacent time differences among t2, t3, t4, t5, and t6, that is, the second change rate and the third change rate, are calculated through formula (2), and the corresponding second change rates are respectively R 20 、R 30 、R 40 、R 50 、R 60 , and the third change rates are respectively R 32 、R 43 、R 54 、R 65 . According to the obtained time difference change rates, the reason for the time difference mutation is determined. Specifically: if the second change rates are R 20 、R 30 、R 40 、R 50 、R 60 are all greater than the preset value of 50%, and the third difference change rates are R 32 、R 43 、R 54 、R 65 are all less than or equal to the preset value of 50%, it is determined that the time difference mutation generated is caused by the valve of the pipeline performing a switching operation, that is, it is determined that a real flow mutation occurs; otherwise, it is determined that no real flow mutation occurs, that is, the flow mutation is caused by noise.

[0092] Specifically, according to Figure 5 , it can be known that if it is determined that the reason for the flow mutation is caused by the valve of the pipeline performing a switching operation, the first noise covariance Q1 is used for filtering; if it is determined that the reason for the flow mutation is caused by noise, the second noise covariance Q2 is used for filtering. In addition, when no time difference mutation occurs, that is, when a flow mutation occurs, the second noise covariance Q2 is still used for filtering, so as to ensure that the flow mutation caused by noise is filtered in real time during the use of the ultrasonic flowmeter and improve the accuracy of the ultrasonic flowmeter.

[0093] Exemplarily, after determining the noise covariance used by the Kalman filter, the time differences t1, t2, t3, t4, t5, and t6 that cause flow rate mutations are transmitted to the Kalman filter. Since the magnitude of the sampling frequency is directly proportional to the power consumption of the ultrasonic flowmeter, after transmitting the collected time differences to the Kalman filter, the second sampling frequency can be adjusted to the first sampling frequency, thereby reducing the power consumption of the ultrasonic flowmeter and avoiding waste of electricity. The Kalman filter receives the time differences and filters them using the first noise covariance Q1. In addition, the Kalman filter uses the second noise covariance Q2 to filter the time difference mutations caused by noise interference, that is, to correct the unreal flow rate mutations caused by noise interference. The time differences filtered by the Kalman filter are saved, and the ultrasonic flowmeter accumulates and settles all the time differences, so that as the fluid flow rate in the channel increases, the indication of the ultrasonic flowmeter gradually increases.

[0094] Assume that a time difference mutation occurs in the above process, that is, the first change rate R 10 is greater than the preset value of 50%, then the time difference timing diagram generated by the ultrasonic flowmeter in the above process can be seen in Figure 6 shown in Figure 6 which is a timing schematic diagram of an ultrasonic flowmeter provided by an embodiment of the present application. According to Figure 6 shown, the time interval for collecting the second time difference and the first time difference is 1 s. After determining that the first change rate R 10 is greater than the preset value of 50%, the sampling frequency is increased to the second sampling frequency, that is, the time difference of the ultrasonic flowmeter is collected every 0.2 s. After collecting the time difference, it returns to the first sampling frequency. Among them, t7 is a time difference collected after the sampling frequency is restored. In the embodiment of the present application, Figure 6 only represents the sampling intervals of a small part of the time differences of the ultrasonic flowmeter. In the actual use process of the ultrasonic flowmeter, its time differences are arranged in sequence according to the Figure 6 shown time sequence. In addition, the time differences are sequentially converted into flow rates through calculation and accumulated, so as to realize the detection of the flow rate in the pipeline by the ultrasonic flowmeter.

[0095] Exemplarily, if the time differences generated by the ultrasonic flowmeter are not processed and the first noise covariance is used for filtering, the Kalman filter effect diagram obtained is as shown in Figure 7 shown in Figure 7 which is a schematic diagram of the Kalman filter effect using the second covariance filtering provided by an embodiment of the present application. Figure 7The solid line in the figure represents the change of the original flow rate detected by the ultrasonic flowmeter over time without filtering, and the dashed line represents the change of the flow rate of the ultrasonic flowmeter over time after being processed by a conventional Kalman filter. Obviously, at 13 s, the valve of the pipeline is opened, and the original flow rate of the ultrasonic flowmeter suddenly increases. However, the flow rate after Kalman filtering cannot respond promptly to the sudden change in flow rate, but increases slowly. In addition, at 30 s, the valve in the pipeline is closed, and the original flow rate of the ultrasonic flowmeter suddenly decreases. At this time, the flow rate after Kalman filtering still cannot respond in time, resulting in the phenomenon that after the valve in the pipeline is closed, that is, when there is no fluid flow in the pipeline, the flow rate of the ultrasonic flowmeter still increases. If this flowmeter is used in a water meter, there will be a phenomenon that the reading of the water meter still increases after the user turns off the faucet, which reduces the user experience. The embodiments of the present application are only described by taking the use of this ultrasonic flowmeter in a water meter as an example, but it does not mean that the embodiments of the present application are only limited to this.

[0096] By using the technical solution provided by the embodiments of the present application to filter the time difference of the ultrasonic flowmeter, the obtained filtered effect diagram is as Figure 8 and Figure 9 shown. Among them, Figure 8 is a schematic diagram of the Kalman filtering effect provided by the embodiments of the present application, Figure 9 is a partial schematic diagram of the Kalman filtering effect provided by the embodiments of the present application, Figure 8 and Figure 9 The solid lines in both figures represent the change of the original flow rate detected by the ultrasonic flowmeter over time without filtering, and the dashed lines represent the change of the flow rate of the ultrasonic wave over time after Kalman filtering is performed using the technical solution provided by the embodiments of the present application. According to Figure 8 the solid line in the figure, that is, the change of the flow rate detected by the ultrasonic flowmeter without filtering, when the time is 7 s, the valve of the pipeline is opened. Between 6 s and 7.5 s, the original flow rate gradually increases with the change of time, that is, the valve of the pipeline is gradually opened between 6 s and 7.5 s, that is, the opening degree of the valve is gradually increased during the opening process. Between 6 s and 27 s, there are always slight fluctuations in the original flow rate. Specifically, it can be seen from Figure 9 shown, and there is a change in which the flow rate suddenly decreases below 0 at 9.5 s, and a change in which the flow rate suddenly increases to 2000 L / h at 23 s. That is, between 6 s and 27 s, the ultrasonic flowmeter is affected by noise and fluctuates. The specific influence is related to the frequency of the noise. The embodiments of the present application do not limit this. When the time is 27 s, the valve of the pipeline is closed, and at this time, the flow rate of the ultrasonic flowmeter quickly decreases to 0. However, at 41 s, there is a change in which the flow rate suddenly increases to about 800 L / h, that is, the interference of the noise causes a change in the flow rate detected by the ultrasonic flowmeter. According to Figure 8As shown by the dashed line in the figure, after Kalman filtering, the flow rate of the ultrasonic flowmeter can respond in a timely manner to the opening and closing of the pipeline valve, and can correct the flow rate mutation caused by noise interference, thereby improving the accuracy of the ultrasonic flowmeter.

[0097] Through Figure 8 and Figure 9 It can be seen that for the technical solution provided by the embodiment of the present application, after determining the cause of the flow rate mutation, the flow rate mutation caused by noise interference is corrected through the first noise covariance, and the ultrasonic flowmeter can respond in a timely manner to the opening and closing of the pipeline valve through the second noise covariance, thereby improving the accuracy of the ultrasonic flowmeter.

[0098] Figure 10 FIG. 11 is a schematic structural diagram of a flow rate detection device 100 provided by an embodiment of the present application. For example, please refer to Figure 10 As shown, the flow rate detection device 100 may include:

[0099] An acquisition unit 1001, configured to acquire the first time difference of the ultrasonic flowmeter at the current moment according to the first sampling frequency;

[0100] A judgment unit 1002, configured to judge whether the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline when the first change rate between the first time difference and the second time difference at the previous moment is greater than a preset value;

[0101] A processing unit 1003, configured to, when the judgment unit judges that the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline, filter the time difference of the switching operation of the valve by using the first noise covariance to obtain a first filtered time difference; and filter the time difference of the non-switching operation of the valve by using the second noise covariance to obtain a second filtered time difference; the first noise covariance is different from the second noise covariance;

[0102] A detection unit 1004, further configured to detect the flow rate in the pipeline according to the first filtered time difference and the second filtered time difference.

[0103] Optionally, the acquisition unit 1001 is further configured to continuously acquire a plurality of third time differences according to the second sampling frequency; wherein, the second sampling frequency is greater than the first sampling frequency.

[0104] The judgment unit 1002 is specifically configured to judge whether the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline according to the plurality of third time differences and the second time difference.

[0105] Optionally, the processing unit 1003 is further configured to calculate, respectively, the second change rates of each of the multiple third time differences with respect to the second time difference; and calculate, respectively, the third change rates between adjacent third time differences among the multiple third time differences.

[0106] The determination unit 1002 is specifically configured to determine whether the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline according to the second change rates of each of the third time differences with respect to the second time difference, and the third change rates between adjacent third time differences.

[0107] Optionally, the determination unit 1002 is specifically configured to determine that the flow rate mutation in the pipeline is caused by performing a switching operation on the valve of the pipeline when the second change rates of each of the third time differences with respect to the second time difference are greater than a preset value, and the third change rates between adjacent third time differences are less than or equal to the preset value.

[0108] Optionally, the processing unit 1003 is specifically configured to filter the first time difference and the multiple third time differences by using the noise covariance to obtain the filtered time difference.

[0109] Optionally, the processing unit 1003 is specifically configured to filter the time difference by using the second noise covariance when the first change rate of the first time difference with respect to the second time difference at the previous moment is less than or equal to the preset value.

[0110] The flow rate detection device 100 shown in the embodiments of the present application can execute the technical solutions of the flow rate detection method in any of the above embodiments. The implementation principle and the beneficial effects are similar to those of the flow rate detection method. For details, please refer to the implementation principle and the beneficial effects of the flow rate detection method, which will not be elaborated here.

[0111] Figure 11 FIG. is a schematic structural diagram of another flow rate detection device 110 provided by the embodiments of the present application. For example, please refer to Figure 11 As shown, the flow rate detection device 110 may include a processor 1101 and a memory 1102; wherein,

[0112] The memory 1102 is configured to store a computer program.

[0113] The processor 1101 is configured to read the computer program stored in the memory 1102 and execute the technical solutions of the flow rate detection method in any of the above embodiments according to the computer program in the memory 1102.

[0114] Optionally, the memory 1102 can be either independent or integrated with the processor 1101. When the memory 1102 is a device independent of the processor 1101, the traffic detection device 110 can further include: a bus for connecting the memory 1102 and the processor 1101.

[0115] Optionally, this embodiment further includes: a communication interface, which can be connected to the processor 1101 through a bus. The processor 1101 can control the communication interface to implement the receiving and sending functions of the above-mentioned traffic detection device 110.

[0116] The traffic detection device 110 shown in the embodiments of the present application can execute the technical solutions of the traffic detection methods in any of the above embodiments. The implementation principles and beneficial effects are similar to those of the traffic detection methods. For details, refer to the implementation principles and beneficial effects of the traffic detection methods, which will not be elaborated here.

[0117] The embodiments of the present application further provide a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the technical solutions of the traffic detection methods in any of the above embodiments are implemented. The implementation principles and beneficial effects are similar to those of the traffic detection methods. For details, refer to the implementation principles and beneficial effects of the traffic detection methods, which will not be elaborated here.

[0118] The embodiments of the present application further provide a computer program product, including a computer program. When the computer program is executed by the processor, the technical solutions of the traffic detection methods in any of the above embodiments are implemented. The implementation principles and beneficial effects are similar to those of the traffic detection methods. For details, refer to the implementation principles and beneficial effects of the traffic detection methods, which will not be elaborated here.

[0119] In the several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0120] The unit described as a separation component may or may not be physically separated. The component presented as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0121] The above integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above software functional module stored in a storage medium includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods in each embodiment of this application.

[0122] It should be understood that the above processor can be a central processing unit (English: Central Processing Unit, abbreviated as: CPU), or can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated as: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or by a combination of hardware and software modules in the processor.

[0123] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk, or an optical disc, etc.

[0124] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0125] The above computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disk. The storage medium may be any available medium accessible by a general-purpose or special-purpose computer.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A flow detection method, characterized in that: include: collecting a first time difference of the ultrasonic flowmeter at the current moment according to a first sampling frequency; If a first rate of change between the first time difference and a second time difference at a previous moment is greater than a preset value, determining whether the sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline; wherein the sampling frequency of the second time difference is the same as the sampling frequency of the first time difference; If the sudden change in the flow rate in the pipeline is caused by a switching operation on a valve of the pipeline, filtering the time difference of the valve switching operation using the first noise covariance to obtain a first filtered time difference; and filtering the time difference of the valve performing a non-switching operation using a second noise covariance to obtain a second filtered time difference; wherein the first noise covariance is different from the second noise covariance; The flow rate in the pipeline is detected according to the first filtering time difference and the second filtering time difference.

2. The method according to claim 1, characterized in that The determining whether the sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline includes: Continuously collecting a plurality of third time differences according to a second sampling frequency; wherein the second sampling frequency is greater than the first sampling frequency; It is determined, based on the plurality of third time differences and the second time difference, whether the sudden change in flow in the pipeline is caused by a switching operation performed on a valve of the pipeline.

3. The method according to claim 2, characterized in that Determining, based on the plurality of third time differences and the second time difference, whether a sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline includes: respectively calculating a second change rate of each third time difference with respect to the second time difference among a plurality of third time differences; respectively calculating a third change rate between two adjacent third time differences among the plurality of third time differences; According to the second change rate between each third time difference and the second time difference, and the third change rate between two adjacent third time differences, it is determined whether the sudden flow rate change in the pipeline is caused by a switching operation on a valve of the pipeline.

4. The method according to claim 3, characterized in that The determining, based on the second change rate of each of the third time differences and the second time difference, and the third change rate between two adjacent third time differences, whether the sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline includes: If the second change rates of each of the third time differences and the second time difference are greater than a preset value, and the third change rates between two adjacent third time differences are less than or equal to the preset value, it is determined that the sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline.

5. The method according to any one of claims 2 to 4, characterized in that: The time difference is filtered using the noise covariance to obtain the filtered time difference, including: The first time difference and the multiple third time differences are filtered using noise covariance to obtain filtered time differences.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If a first change rate between the first time difference and the second time difference at a previous moment is less than or equal to a preset value, the time difference is filtered using the second noise covariance.

7. A flow detection device, characterized in that: include: An acquisition unit, configured to acquire a first time difference of the ultrasonic flowmeter at a current moment according to a first sampling frequency; a judging unit, configured to judge whether the sudden change in flow in the pipeline is caused by a switching operation on a valve of the pipeline when a first change rate between the first time difference and a second time difference at a previous moment is greater than a preset value; a processing unit configured to, when the determination unit determines that the sudden change in the flow rate in the pipeline is caused by a switching operation on a valve of the pipeline, filter the time difference of the valve switching operation using the first noise covariance to obtain a first filtered time difference; and filtering the time difference of executing the non-switching operation of the valve using a second noise covariance to obtain a second filtered time difference; the first noise covariance is different from the second noise covariance; A detection unit is used to detect the flow in the pipeline according to the first filtering time difference and the second filtering time difference.

8. A flow detection device, characterized in that: comprising a memory and a processor; wherein, The memory is used to store computer programs; The processor is configured to read the computer program stored in the memory and execute the flow detection method according to any one of claims 1 to 6 according to the computer program in the memory.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the flow detection method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the flow detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Fluid flow measuring system

    CN108007509A

  • Novel self-adaptation measuring method for ultrasonic flowmeter

    CN108444557A