Flow detection method, device, flow meter, storage medium and program product

By automatically detecting the stability level of the fluid flow and adjusting the sampling frequency, the problems of high power consumption and insufficient measurement accuracy of the flow meter when the flow rate changes rapidly are solved, achieving high accuracy and low power consumption when the flow rate changes, and reducing gas theft.

CN115790754BActive Publication Date: 2026-01-16GOLDCARD HIGH TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111057846.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-09
Publication Date
2026-01-16
Estimated Expiration
2041-09-09

AI Technical Summary

Technical Problem

Existing flow meters struggle to reduce power consumption while maintaining measurement accuracy when flow rates change rapidly. Electronic flow meters, in particular, consume a lot of power at high sampling frequencies, and existing methods for adjusting the sampling frequency are insufficient in terms of measurement accuracy when the flow rate is unstable.

Method used

By automatically detecting the stability level of the fluid flow and adjusting the sampling frequency according to the stability level, the flow meter achieves adaptive frequency adjustment, reducing power consumption while ensuring measurement accuracy.

Benefits of technology

When the flow rate changes rapidly, the sampling frequency is adaptively adjusted to reduce the power consumption of the flow meter and ensure the metering accuracy, thereby reducing the occurrence of gas theft.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115790754B_ABST
    Figure CN115790754B_ABST
Patent Text Reader

Abstract

The application provides a flow detection method and device, a flow meter, a storage medium and a program product. The method comprises the following steps: acquiring a current sampling frequency, and detecting instantaneous flow data of a fluid according to the current sampling frequency; acquiring a plurality of instantaneous flow data in a preset time period, and determining a flow state stability level of the fluid according to the acquired plurality of instantaneous flow data; the flow state stability level is used to represent the stability of the flow state of the fluid; and the sampling frequency is adjusted according to the flow state stability level, so that the fluid is detected according to the adjusted sampling frequency. By automatically detecting the flow state stability level of the fluid and adjusting the sampling frequency according to the flow state stability level, the guarantee of the measurement accuracy and the reduction of the power consumption of the flow meter can be realized at the same time when the flow changes rapidly.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of flow measurement, and in particular to a flow detection method and device, a flow meter, a storage medium and a program product. BACKGROUND

[0002] The existing flow meters can be divided into electronic meters and mechanical meters according to detection principles. Common electronic meters include ultrasonic meters and electromagnetic meters.

[0003] The measurement accuracy of an electronic meter is affected by the flow state of fluid in a measurement pipeline. Generally, the higher the sampling frequency, the more specific the description of the fluid flow in the pipeline, and the higher the measurement accuracy. However, the higher the sampling frequency, the greater the power consumption of the flow meter. One implementation is to adjust the sampling frequency according to the fluid flow, and to reduce the sampling frequency when the flow is low and to increase the sampling frequency when the flow is high, thereby reducing power consumption. However, this method can only ensure the accuracy of measurement under the premise of reducing power consumption when the flow is stable.

[0004] Therefore, when the flow changes rapidly, how to reduce the power consumption of the flow meter under the premise of ensuring the measurement accuracy is a problem to be solved. SUMMARY

[0005] The present application provides a flow detection method and device, a flow meter, a storage medium and a program product, which automatically detect the flow state stability level of fluid and adjust the sampling frequency, thereby reducing the power consumption of the flow meter under the premise of ensuring the measurement accuracy.

[0006] In a first aspect, the present application provides a flow detection method, which comprises:

[0007] obtaining a current sampling frequency and detecting instantaneous flow data of fluid according to the current sampling frequency;

[0008] obtaining a plurality of instantaneous flow data in a preset time period, and determining a flow state stability level of fluid according to the obtained plurality of instantaneous flow data; the flow state stability level is used to represent the stability of the flow state of the fluid;

[0009] adjusting the sampling frequency according to the flow state stability level, so as to detect the fluid according to the adjusted sampling frequency.

[0010] Optionally, the sampling frequency is positively correlated with the flow state stability level.

[0011] Optionally, the determination of the flow state stability level of fluid according to the obtained plurality of instantaneous flow data comprises:

[0012] determining a flow state stability index of fluid according to the plurality of instantaneous flow data;

[0013] comparing the flow state stability index with a plurality of threshold intervals divided in advance to determine a threshold interval corresponding to the flow state stability index; wherein different threshold intervals correspond to different flow state stability levels;

[0014] determining the flow state stability level corresponding to the determined threshold interval as the flow state stability level of the fluid in the preset time period.

[0015] Optionally, the flow state stability index comprises at least one of the following: standard deviation, variance and range.

[0016] Optionally, when the flow state stability index is the standard deviation or the variance, the method further comprises:

[0017] calculating the average value of the plurality of instantaneous flow data, and determining a threshold value according to the average value and a preset coefficient; the number of threshold values corresponds to the number of preset coefficients;

[0018] determining a threshold interval according to the threshold value, and determining the threshold interval as a threshold interval divided in advance; the number of threshold intervals corresponds to the number of threshold values.

[0019] Optionally, adjusting the sampling frequency according to the flow state stability level comprises:

[0020] determining a target flow state stability level according to the current sampling frequency; and determining whether the current flow state stability level is consistent with the target flow state stability level;

[0021] when the current flow state stability level is not consistent with the target flow state stability level, determining the sampling frequency corresponding to the current flow state stability level as the adjusted sampling frequency according to the corresponding relationship between the flow state stability level and the sampling frequency.

[0022] Optionally, the method further comprises:

[0023] acquiring a predetermined timing period;

[0024] determining the time difference between the current time and a first time; the first time is the time when the flow state stability level of the fluid is determined last time;

[0025] when the time difference is equal to the timing period, triggering the operation of acquiring the plurality of instantaneous flow data in the preset time period, and determining the flow state stability level of the fluid according to the acquired plurality of instantaneous flow data.

[0026] Optionally, the method further comprises adjusting the timing period according to the flow state stability level; wherein the timing period is negatively correlated with the flow state stability level.

[0027] Optionally, the timing period is adjusted according to the flow state stability level, comprising:

[0028] determining a target flow state stability level according to the current timing period;

[0029] judging whether the current flow state stability level is consistent with the target flow state stability level;

[0030] when not consistent, determining the timing period corresponding to the current flow state stability level as the adjusted timing period according to the correspondence between the flow state stability level and the timing period.

[0031] Optionally, after detecting the instantaneous flow data of the fluid according to the sampling frequency, the method further comprises:

[0032] saving the detected multiple instantaneous flow data and detection time in a preset storage space;

[0033] Correspondingly, obtaining multiple instantaneous flow data in a preset time period comprises:

[0034] obtaining multiple instantaneous flow data meeting the condition from the preset storage space, the condition being that the detection time of the instantaneous flow data is in the preset time period.

[0035] Optionally, the method further comprises: performing timed cleaning on the data saved in the preset storage space based on a cleaning period; wherein the cleaning period is greater than the maximum value of the timing period.

[0036] In a second aspect, the application provides a flow detection device, comprising:

[0037] a detection module, configured to obtain a current sampling frequency and detect instantaneous flow data of a fluid according to the sampling frequency;

[0038] a determination module, configured to obtain multiple instantaneous flow data in a preset time period and determine a flow state stability level of the fluid according to the obtained multiple instantaneous flow data; the flow state stability level is used to represent the stability of the flow state of the fluid;

[0039] an adjustment module, configured to adjust the sampling frequency according to the flow state stability level, so as to detect the fluid according to the adjusted sampling frequency.

[0040] In a third aspect, the application provides a flow meter, comprising:

[0041] a memory, configured to store program instructions;

[0042] a processor, configured to invoke and execute the program instructions in the memory, and execute the method according to any one of the first aspect.

[0043] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the method according to any one of the first aspect.

[0044] In a fifth aspect, the present application provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions, when executed by a processor, implement the method according to any one of the first aspect.

[0045] The present application provides a flow detection method and device, a flow meter, a storage medium and a program product. The method comprises: acquiring a current sampling frequency, and detecting instantaneous flow data of a fluid according to the current sampling frequency; acquiring a plurality of instantaneous flow data in a preset time period, and determining a flow state stability level of the fluid according to the acquired plurality of instantaneous flow data; the flow state stability level is used to represent the stability of the flow state of the fluid; and the sampling frequency is adjusted according to the flow state stability level, so as to detect the fluid according to the adjusted sampling frequency. The present application can automatically detect the flow state stability level of the fluid, and adjust the sampling frequency according to the flow state stability level, so as to realize the guarantee of the metering accuracy and the reduction of the power consumption of the flow meter at the same time when the flow changes rapidly. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative labor.

[0047] Figure 1 An application scenario schematic diagram provided for an embodiment of the present application;

[0048] Figure 2 A flow detection method flow schematic diagram provided for an embodiment of the present application;

[0049] Figure 3 Another flow detection method flow schematic diagram provided for an embodiment of the present application;

[0050] Figure 4 A flow detection method flow schematic diagram provided for an embodiment of the present application; Figure 3 A process flow schematic diagram of steps S305 and S306;

[0051] Figure 5 A detection principle diagram provided for an embodiment of the present application;

[0052] Figure 6 A schematic diagram of a flow detection device provided by an embodiment of the present application is shown in FIG. 1.

[0053] Figure 7 A structural schematic diagram of a flow meter provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0055] The terms "first", "second", "third", "fourth" and the like (if any) in the description, claims, and drawings of the present application are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.

[0056] Figure 1 An application scenario schematic diagram provided by an embodiment of the present application is shown in FIG. 3. Figure 1 As shown in FIG. 3, a flow meter is used to measure the instantaneous flow or cumulative flow of a liquid or gas, where the cumulative flow can be cumulative volume flow or cumulative mass flow. For an electronic meter, according to the different detection media, it can be divided into an electronic water meter and an electronic gas meter. The fluid can flow into the flow meter from the inlet and flow out of the flow meter from the outlet. When the fluid flows through the flow meter, the flow passing through can be collected, and the instantaneous flow value is output, and then the cumulative flow is obtained according to the instantaneous flow value.

[0057] When collecting the instantaneous flow, it can be collected according to the sampling frequency, where the higher the sampling frequency, the higher the measurement accuracy. However, when the flow is collected at a high sampling frequency all the time, it will result in high power consumption, and it is impossible to frequently replace the battery in actual use. How to solve the contradiction between improving the measurement accuracy and reducing the power consumption is a problem to be solved.

[0058] Based on the above problems, one prior art is to detect fluid flow, adjust the sampling frequency according to the size of the fluid flow, reduce the sampling frequency when the flow is small, and increase the sampling frequency when the flow is large, which can reduce power consumption to a certain extent. And the use of the above method has certain limitations, only when the flow is stable at large or small flow can the fluid measurement accuracy be guaranteed. When the flow changes rapidly, the adjustment of the sampling frequency is not reasonable, which will cause the deviation of the measurement accuracy. When the flow of the fluid is pulsating flow, that is, the outlet flow signal is in pulse form, the output flow value will change constantly.

[0059] Based on the above problems, the flow detection method provided by the present application can automatically detect the stability of the flow state of the fluid according to the detected instantaneous flow data, and adjust the detection frequency according to the stability of the flow state of the fluid, so as to realize adaptive adjustment of the fluid sampling frequency, thereby selecting a suitable sampling frequency to detect the current fluid.

[0060] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0061] Figure 2 A flow detection method provided by an embodiment of the present application is shown in the flowchart. The method provided by the present application can be executed by a flowmeter, as shown in Figure 2 The method of the present embodiment can include:

[0062] S201, acquiring the current sampling frequency, and detecting the instantaneous flow data of the fluid according to the current sampling frequency.

[0063] The sampling frequency refers to the frequency of detecting the instantaneous flow of the fluid. The sampling frequency can be obtained from the adjustment module. The instantaneous flow data refers to the flow data of the fluid at a certain time. When the sampling frequency is the first sampling frequency, the instantaneous flow is collected at the first time interval; when the sampling frequency is the second sampling frequency, the instantaneous flow is collected at the second time interval.

[0064] For example, when the sampling frequency is 10 times per minute, the instantaneous flow is collected every 6 seconds; when the sampling frequency is 5 times per minute, the instantaneous flow is collected every 12 seconds.

[0065] S202, acquiring a plurality of instantaneous flow data in a preset time period, and determining the flow state stability level of the fluid according to the acquired plurality of instantaneous flow data; the flow state stability level is used to represent the stability of the flow state of the fluid.

[0066] Wherein, when the instantaneous flow data of a period of time is collected, a plurality of instantaneous flow data can be obtained. The plurality of instantaneous flow data in a preset time period can be extracted from the obtained instantaneous flow data, wherein the instantaneous flow data in the preset time period can be the instantaneous flow data collected in the recent time T.

[0067] After obtaining the plurality of instantaneous flow data in the recent time T, the stability level of the flow state of the fluid can be obtained according to the plurality of instantaneous flow data. The stability level of the flow state of the fluid can represent the stability of the flow state of the fluid. Specifically, the stability level of the flow state of the fluid can be divided in advance.

[0068] For example, when the instantaneous flow data of the fluid frequently changes and changes greatly, it is considered that the flow state of the fluid is unstable; when the instantaneous flow data of the fluid does not frequently change and changes slightly, it is considered that the flow state of the fluid is relatively stable.

[0069] Further, in order to more intuitively determine the stability of the flow state of the fluid, the flow state of the fluid can be divided into a plurality of flow state stability levels.

[0070] S203, adjusting the sampling frequency according to the flow state stability level, so as to detect the fluid according to the adjusted sampling frequency.

[0071] Wherein, different sampling frequencies can be set according to different flow state stability levels of the fluid, and the sampling frequency can be adjusted according to the flow state stability level.

[0072] The flow detection method provided by the embodiment can be applied to a flow meter. The method comprises: determining the stability level of the flow state of the fluid by analyzing the obtained instantaneous flow data, and selecting different sampling frequencies according to the stability level of the flow state of the fluid, so that the determined sampling frequency can adapt to the current flow state stability level, thereby reducing power consumption while ensuring the measurement accuracy under pulsating flow.

[0073] In addition, if the sampling frequency is constant, the gas thief can use special equipment to steal gas at non-sampling time, and stop stealing gas by closing the special equipment at sampling time, so that it is impossible to detect whether the user steals gas. In the prior art, in order to prevent gas stealing, a pressure fluctuation detection device is added, which costs a lot. If the above method of the application is applied to a gas meter, the sampling frequency will change, so the gas thief cannot determine when the flow meter collects instantaneous flow data. If the gas thief steals gas when the flow meter collects instantaneous flow data, the gas thief can be identified by analyzing the collected instantaneous flow data. Therefore, the possibility of detecting the gas stealing behavior can be improved, and the occurrence of the gas stealing behavior can be reduced to a certain extent.

[0074] The processes of the flow detection method are described in detail as follows.

[0075] Figure 3 Another flow detection method provided by an embodiment of the present application is shown in the flowchart of FIG. 3, which comprises the following steps. Figure 3

[0076] In step S301, the current instantaneous flow data is detected.

[0077] In the step of detecting the current instantaneous flow data, the sampling frequency is acquired first, and then the instantaneous flow data of the fluid is detected according to the acquired sampling frequency. Details are not described herein.

[0078] In step S302, the current instantaneous flow data is saved.

[0079] The acquired instantaneous flow data can be saved, and sent to other modules when needed.

[0080] Optionally, the detected multiple instantaneous flow data and detection time are saved in a preset storage space.

[0081] In the step of detecting the current instantaneous flow data, a detection data is generated according to the detection time and the detected instantaneous flow data when an instantaneous flow data is detected, and the generated detection data is stored in the storage space. In one implementation, a storage chip is arranged in the flow meter, and the generated detection data is saved in the storage chip.

[0082] In step S303, it is determined whether the flow state stability level needs to be detected. If yes, step S304 is executed; if no, step S301 is executed.

[0083] Before the flow state stability level is detected, it is further determined whether the operation needs to be triggered.

[0084] Optionally, the method further comprises:

[0085] The predetermined timing period is acquired; the time difference between the current time and the first time is determined; the first time is the time when the flow state stability level of the fluid is determined last time; when the time difference is equal to the timing period, the operation of acquiring the multiple instantaneous flow data in the preset time period and determining the flow state stability level of the fluid according to the acquired multiple instantaneous flow data is triggered.

[0086] ​The timing period is determined according to the last determined flow state stability level. In addition, it is also necessary to determine the first time, and determine whether the time difference between the current time and the first time reaches the timing period. For example, when the first time is 12:05:30, the timing period is 20 seconds, if the current time is 12:05:40, it does not reach the timing period; if the current time is 12:05:50, it reaches the timing period, then the operation of acquiring a plurality of instantaneous flow data in a preset time period and determining the flow state stability level of the fluid can be triggered.

[0087] The timing period can facilitate determining when to trigger the operation of acquiring instantaneous flow data and determining the flow state stability level of the fluid.

[0088] In step S304, a plurality of instantaneous flow data in the current time T is acquired.

[0089] Before determining the flow state stability level of the fluid according to the plurality of instantaneous flow data, the plurality of instantaneous flow data needs to be acquired first.

[0090] Optionally, the plurality of instantaneous flow data meeting the condition is acquired from the preset storage space, and the condition means that the detection time of the instantaneous flow data is within the preset time period.

[0091] In order to ensure that the acquired instantaneous flow data is the flow state of the current fluid, the preset time period can be the current time T, that is, the acquired instantaneous flow data is the data in the last T time period. For example, when T is 2 minutes, the acquired instantaneous flow data is the instantaneous flow data in the last 2 minutes. When acquiring data from the storage chip, it is necessary to determine the detection time of each instantaneous flow data stored in the chip. When the detection time is within the preset time period, for example, the detection time is within the last 2 minutes, it means that the detection data meets the condition.

[0092] In addition, in order to quickly acquire the instantaneous flow data meeting the condition, when saving the detected instantaneous flow data in the preset storage space, the instantaneous flow data can be stored in time sequence, and when screening the instantaneous flow data meeting the condition, the last saved instantaneous flow data can be judged, and when the instantaneous flow data not meeting the condition is detected, the detection can be stopped, without the need to determine whether each instantaneous flow data meets the condition.

[0093] The above method saves the detected instantaneous flow data in the preset storage space, reduces the number of data transmission times, and saves the operation process.

[0094] Optionally, the method further comprises: performing timing cleaning on the data saved in the preset storage space based on a cleaning period; wherein the cleaning period is greater than the maximum value of the timing period.

[0095] When there is a large amount of data in the storage space, it can affect data storage capacity. Therefore, the data stored in the preset storage space can be periodically cleared. This clearing can be based on a clearing cycle. Here, the clearing cycle needs to be greater than the maximum value of the timing cycle, where the timing cycle is the time at which the flow stability level needs to be detected. By making the clearing cycle greater than the maximum value of the timing cycle, multiple instantaneous flow rate data points within a preset time period can be stored in the storage space when the flow stability level of the fluid needs to be detected.

[0096] For example, if the maximum timer period is 5 minutes, then the clearing period needs to be greater than 5 minutes.

[0097] By periodically clearing the instantaneous traffic data in the preset storage space, it can be ensured that the preset storage space has sufficient capacity to save the instantaneous traffic data.

[0098] Step S305: Calculate the flow state stability index of all instantaneous flow data within the current time T.

[0099] Step S306: Determine the current flow stability level.

[0100] Figure 4 A method provided by an embodiment of the present invention Figure 3 The flowchart of steps S305 and S306 is shown below. Steps S305 and S306 are explained in detail below.

[0101] Optionally, determining the flow stability level of the fluid based on multiple acquired instantaneous flow rate data includes:

[0102] Step S401: Determine the fluid flow state stability index based on the multiple instantaneous flow rate data.

[0103] Among them, after acquiring multiple instantaneous flow rate data, the flow state stability index of the fluid can be determined, which can be used to measure the stability of the fluid flow state.

[0104] After acquiring multiple instantaneous flow data points, these data points can be combined into an array Q = {Q1Q2Q3…Q}. n The flow stability index is calculated based on this array.

[0105] Optionally, the flow stability index includes at least one of the following: standard deviation, variance, and range.

[0106] The variance and the standard deviation can be used to measure the dispersion degree of a group of data. The smaller the variance value is, the closer the data is to the average value, the smaller the dispersion degree is, and the more stable the flow state is. The larger the variance value is, the farther the data is from the average value, the larger the dispersion degree is, and the less stable the flow state is. In addition, the relationship between the size of the standard deviation and the stability of the flow state is similar to that of the variance, which will not be described here.

[0107] The range is used to represent the difference between the maximum value and the minimum value in a group of data, and can also reflect the stability of the flow state of the fluid to some extent. When the value is large, it indicates that the flow state is unstable, and when the value is small, it indicates that the flow state is relatively stable.

[0108] By calculating the above-mentioned several flow state stability indexes, the stability of the flow state of the fluid can be conveniently measured.

[0109] In step S402, the flow state stability index is compared with a plurality of threshold intervals divided in advance to determine the threshold interval corresponding to the flow state stability index. Different threshold intervals correspond to different flow state stability levels.

[0110] For different flow state stability indexes, appropriate threshold intervals can be set to determine the threshold interval to which the value of the flow state stability index belongs. For example, when three threshold intervals are set, such as the first threshold interval [S1, S2), the second threshold interval [S2, S3), and the third threshold interval [S3, S4), if the flow state stability index is S0, and S0 is between S2 and S3, then the threshold interval corresponding to the flow state stability index S0 is determined to be the second threshold interval.

[0111] The flow state stability levels corresponding to each threshold interval can be divided in advance, and different threshold intervals correspond to different flow state stability levels, so as to determine the flow state stability levels corresponding to a plurality of instantaneous flow data.

[0112] Optionally, when the flow state stability index is the standard deviation or the variance, the method further comprises:

[0113] The average value of the plurality of instantaneous flow data is calculated, and a threshold value is determined according to the average value and a preset coefficient. The number of threshold values corresponds to the number of preset coefficients. The threshold interval is determined according to the threshold value, and the threshold interval is determined as the threshold interval divided in advance. The number of threshold intervals corresponds to the number of threshold values.

[0114] Wherein, in the threshold interval division, in order to more accurately determine the stability level of the flow state, the average value E of the plurality of instantaneous flow data can be obtained first, and the plurality of threshold values are set based on the average value. Because for larger instantaneous flow data and smaller instantaneous flow data, the stability of the flow state is also related to the average value, so the threshold values can be set based on the average value, and then the plurality of threshold intervals are set. Specifically, one or more preset coefficients m can be set, and the preset coefficient is multiplied by the average value to obtain one or more threshold values, that is, S=m×E.

[0115] After determining the threshold value, the threshold interval can be determined according to the threshold value. If there is one threshold value, two threshold intervals can be obtained; if there are n threshold values, n+1 threshold intervals can be obtained.

[0116] Wherein, in the determination of the threshold value, the average value E of the plurality of instantaneous flow data is determined, because for two groups of instantaneous flow data of different flow types, such as one group of large flow data and the other group of small flow data, when the standard deviation or variance is the same, the stability level of the flow state is different. As shown in the following table:

[0117]

[0118] From the above table, it can be seen that although the variances are consistent, for large flow (5m 3 / h), the fluctuation has little effect, the fluctuation range is ±1m 3 / h, and the maximum deviation is 20%; for small flow (1m 3 / h), the same variance, the fluctuation range is ±1m 3 / h, and the maximum deviation is 100%. Therefore, the threshold value is not only related to the variance (standard deviation), but also related to the average flow value and the fluctuation range and other factors, so different average flow values will adopt different threshold values.

[0119] The preset coefficient m here is to consider other factors in addition to the variance (standard deviation), and E here is to consider the flow average value when dividing the threshold value.

[0120] By setting the threshold interval based on the average value, the stability level of the flow state can be more accurately determined.

[0121] Step S403, determining the flow state stability level corresponding to the determined threshold interval as the flow state stability level of the fluid in the preset time period.

[0122] Because different threshold intervals correspond to different flow state stability levels, after determining the threshold interval corresponding to the flow state stability index, the flow state stability level corresponding to the threshold interval is directly determined as the flow state stability level corresponding to the group of data.

[0123] The method can accurately determine the flow state stability level of the fluid by determining the flow state stability index first and then determining the flow state stability level according to the relationship between the flow state stability index and the threshold interval.

[0124] In step S307, it is determined whether the sampling frequency needs to be adjusted. If yes, steps S308 and S309 are performed. If no, step S301 is performed.

[0125] In step S308, the sampling frequency is adjusted.

[0126] The process of determining whether the sampling frequency needs to be adjusted and the adjustment process are described in detail below.

[0127] Optionally, the sampling frequency is adjusted according to the flow state stability level, including: determining a target flow state stability level according to the current sampling frequency; determining whether the current flow state stability level is consistent with the target flow state stability level; and when the current flow state stability level is not consistent with the target flow state stability level, determining the sampling frequency corresponding to the current flow state stability level as the adjusted sampling frequency according to the correspondence between the flow state stability level and the sampling frequency.

[0128] After the flow state stability level is determined, the sampling frequency can be adjusted according to the flow state stability level. Because different sampling frequencies can be selected when the flow state stability level is different, so that the detection accuracy is ensured and the power consumption is reduced.

[0129] The target flow state stability level can be determined according to the current sampling frequency first. For example, when the current sampling frequency is f1, the corresponding flow state stability level is L1, and the target flow state stability level is L1.

[0130] After the target flow state stability level is determined, the current flow state stability level and the target flow state stability level are compared to determine whether they are consistent. If they are consistent, it means that the sampling frequency does not need to be adjusted, and the current sampling frequency is suitable for the current flow state stability level. When they are not consistent, the sampling frequency needs to be adjusted. If the current flow state stability level is L2 and is not consistent with the target flow state stability level L1, the sampling frequency needs to be adjusted.

[0131] Specifically, when the sampling frequency is adjusted, the correspondence between the flow state stability level and the sampling frequency can be set in advance and can be stored in the form of a correspondence table, so that the adjusted sampling frequency can be determined by looking up the table. For example, when the flow state stability level is L2, the corresponding sampling frequency is f2, and f2 is determined as the adjusted sampling frequency.

[0132] By setting the corresponding relationship between the flow state stability level and the sampling frequency in advance, the adjusted sampling frequency can be determined quickly and conveniently.

[0133] Optionally, the sampling frequency is positively correlated with the flow state stability level.

[0134] The sampling frequency is positively correlated with the flow state stability level, wherein the positive correlation means that when the flow state stability level is higher, the stability level number is larger, the flow state of the fluid is less stable, and the sampling frequency is higher; when the flow state stability level is lower, the stability level number is smaller, the flow state of the fluid is more stable, and the sampling frequency is lower. That is, when the flow state is stable, the sampling frequency can be reduced, and the detection accuracy can be ensured; when the flow state is unstable, the sampling frequency needs to be increased to ensure the detection accuracy. The corresponding relationship table of the flow state stability level and the sampling frequency is shown in Table 1. The levels L1 to Ln are sequentially increased, and the higher the level, the less stable the flow state, and f1 < f2 <... < fn.

[0135] Table 1: Corresponding relationship table of flow state stability level and sampling frequency

[0136] Flow state stability level L1 L2 ...... Ln Sampling frequency f1 f2 ...... fn

[0137] By setting the sampling frequency and the flow state stability level in a positively correlated relationship, the detection accuracy can be ensured while the power consumption is reduced.

[0138] Step S309: Adjust the timing period.

[0139] Optionally, the method further comprises adjusting the timing period according to the flow state stability level; wherein the timing period is negatively correlated with the flow state stability level.

[0140] After determining the flow state stability level of the fluid, the timing period needs to be adjusted, because different timing periods are used when the flow state stability level of the fluid is different, so that the flow state stability level of the next time can be determined as soon as possible. Specifically, the timing period is negatively correlated with the flow state stability level. The negative correlation means that when the flow state stability level is higher, that is, unstable, the timing period is smaller; when the flow state stability level is lower, that is, more stable, the timing period is longer.

[0141] After adjusting the timing period, the operation of acquiring a plurality of instantaneous flow data and determining the flow state stability level can be triggered according to the adjusted timing period.

[0142] For example, if the current flow state stability level is in a less stable state, the timing period can be reduced to detect the flow state stability level at the next time as soon as possible, and if the flow state stability level at the next time is reduced, the sampling frequency can be reduced in time to further reduce power consumption.

[0143] The above process can realize timely exiting the mode of collecting instantaneous flow data at a high sampling frequency by adjusting the timing period, and can reduce power consumption.

[0144] Optionally, the timing period is adjusted according to the flow state stability level, and the adjusting comprises:

[0145] The target flow state stability level is determined according to the current timing period, it is judged whether the current flow state stability level is consistent with the target flow state stability level, and when the current flow state stability level is not consistent with the target flow state stability level, the timing period corresponding to the current flow state stability level is determined as the adjusted timing period according to the corresponding relationship between the flow state stability level and the timing period.

[0146] In the embodiment, the timing period can be determined according to the current flow state stability level when the timing period is adjusted. Specifically, the target flow state stability level is determined first, and the target flow state stability level refers to the flow state stability level corresponding to the current timing period. For example, when the timing period is T1, the corresponding flow state stability level is L1, and the target flow state stability level is L1.

[0147] When the current flow state stability level is consistent with the target flow state stability level, the timing period does not need to be adjusted, and when the current flow state stability level is not consistent with the target flow state stability level, the timing period needs to be adjusted. When the current flow state stability level is L2, the target flow state stability level L1 is not consistent, and the timing period needs to be adjusted.

[0148] Specifically, the corresponding relationship between the flow state stability level and the timing period can be set in advance, and the corresponding relationship table can be stored in the form of a table, and the adjusted timing period can be determined by looking up the table. For example, when the flow state stability level is L2, the corresponding timing period is T2, and T2 is determined as the adjusted timing period.

[0149] The corresponding relationship table between the flow state stability level and the timing period is shown in Table 2. The levels L1 to Ln are in ascending order, and the higher the level, the more unstable the flow state, and T1>T2>......>Tn.

[0150] Table 2: Corresponding relationship table between flow state stability level and timing period

[0151] Flow state stability level L1 L2 ...... Ln Timing period T1 T2 ...... Tn

[0152] By the correspondence between the preset flow state stability level and the timing period, the adjusted timing period can be determined quickly and conveniently.

[0153] Figure 5 A detection schematic diagram provided for the embodiment of the application is shown in FIG. 1. Figure 5 When the fluid flows through the flowmeter, the detection module detects the instantaneous flow of the fluid according to the sampling frequency, and stores the detected instantaneous flow data in the storage module. The timing module determines whether the determination module can be triggered to obtain the instantaneous flow data according to the timing period, and outputs the flow state stability level. When the triggering condition is met, the determination module obtains the data and outputs the flow state stability level, and transmits the flow state stability level to the adjustment module, so that the adjustment module can output the corresponding sampling frequency and timing period according to different flow state stability levels. The flow state stability level can be automatically detected based on the collected instantaneous flow data, and the sampling frequency can be automatically adjusted without increasing the equipment. By adjusting the sampling frequency, the power consumption can be reduced, and the measurement accuracy can be ensured when the flow rate changes rapidly.

[0154] On the basis of the above embodiment, by setting the sampling frequency and the flow state stability level in a positive correlation, the detection accuracy can be further improved. By calculating the flow state stability index and the threshold interval, the flow state stability level of the fluid can be accurately determined. By adjusting the sampling frequency or the timing period through the correspondence table, the method has the advantages of simplicity and convenience. By adjusting the timing period and setting the timing period and the flow state stability level in a negative correlation, the flow state stability level can be adjusted in time, and the power consumption can be further reduced.

[0155] In addition, since the sampling frequency changes with the change of the flow state stability level, the user cannot determine the sampling time of the fluid, and the occurrence of gas stealing behavior can be reduced to a certain extent.

[0156] Figure 6 A structure schematic diagram of the flow detection device provided for the embodiment of the application is shown in FIG. 2. Figure 6 As shown in FIG. 2, the flow detection device 60 of the embodiment can include:

[0157] The detection module 601 obtains the current sampling frequency, and detects the instantaneous flow data of the fluid according to the sampling frequency.

[0158] The determination module 602 is configured to obtain a plurality of instantaneous flow data in a preset time period, and determine the flow state stability level of the fluid according to the obtained plurality of instantaneous flow data. The flow state stability level is used to indicate the stability of the flow state of the fluid.

[0159] The adjusting module 603 is configured to adjust the sampling frequency according to the flow state stability level, so as to detect the fluid according to the adjusted sampling frequency.

[0160] Optionally, the sampling frequency is positively correlated with the flow state stability level.

[0161] Optionally, when determining the flow state stability level of the fluid according to the obtained plurality of instantaneous flow data, the determining module 602 is specifically configured to:

[0162] determine a flow state stability index of the fluid according to the plurality of instantaneous flow data;

[0163] compare the flow state stability index with a plurality of threshold intervals divided in advance, to determine a threshold interval corresponding to the flow state stability index; wherein different threshold intervals correspond to different flow state stability levels;

[0164] determine the flow state stability level corresponding to the determined threshold interval as the flow state stability level of the fluid in a preset time period.

[0165] Optionally, the flow state stability index comprises at least one of the following: standard deviation, variance and range.

[0166] Optionally, when the flow state stability index is the standard deviation, the determining module 602 is further configured to:

[0167] calculate the average value of the plurality of instantaneous flow data, and determine a plurality of thresholds according to the average value and a plurality of preset coefficients;

[0168] determine a plurality of threshold intervals according to the plurality of thresholds, and determine the plurality of threshold intervals as the plurality of threshold intervals divided in advance.

[0169] Optionally, when adjusting the sampling frequency according to the flow state stability level, the adjusting module 603 is specifically configured to:

[0170] determine a target flow state stability level according to the current sampling frequency;

[0171] determine whether the current flow state stability level is consistent with the target flow state stability level;

[0172] when the current flow state stability level is inconsistent with the target flow state stability level, determine the sampling frequency corresponding to the current flow state stability level as the adjusted sampling frequency according to the correspondence between the flow state stability level and the sampling frequency.

[0173] Optionally, the device further comprises a timing module configured to:

[0174] obtain a predetermined timing period;

[0175] determining a time difference between the current time and a first time; the first time is a time when a flow state stability level of the fluid is determined last time;

[0176] when the time difference is equal to the timing period, triggering an operation of acquiring a plurality of instantaneous flow data in a preset time period and determining the flow state stability level of the fluid according to the acquired plurality of instantaneous flow data.

[0177] Optionally, the adjusting module 603 is further configured to:

[0178] adjust the timing period according to the flow state stability level; wherein the timing period is negatively correlated with the flow state stability level.

[0179] Optionally, when adjusting the timing period according to the flow state stability level, the adjusting module 603 is specifically configured to:

[0180] determine a target flow state stability level according to the current timing period;

[0181] determine whether the current flow state stability level is consistent with the target flow state stability level;

[0182] when the current flow state stability level is not consistent with the target flow state stability level, determine a timing period corresponding to the current flow state stability level as an adjusted timing period according to a corresponding relationship between the flow state stability level and the timing period.

[0183] Optionally, the device further comprises a storage module configured to save the detected plurality of instantaneous flow data and detection time in a preset storage space.

[0184] Correspondingly, the determining module 602 is specifically configured to: acquire a plurality of instantaneous flow data meeting a condition from the preset storage space, wherein the condition refers to that the detection time of the instantaneous flow data is within a preset time period.

[0185] Optionally, the device further comprises a clearing module configured to:

[0186] perform timing clearing on the data saved in the preset storage space based on a clearing period; wherein the clearing period is greater than a maximum value of the timing period.

[0187] The flow detection device provided by the embodiment of the application can implement the flow detection method of the embodiments shown in Figure 2 , Figure 3 , Figure 4 and Figure 5 , and has similar implementation principles and technical effects, which will not be described herein again.

[0188] Figure 7A hardware structure schematic diagram of a flow meter is provided for an embodiment of the present application. As shown in the figure, Figure 7 The flow meter 70 provided by the embodiment includes at least one processor 701 and a memory 702. The processor 701 and the memory 702 are connected through a bus 703.

[0189] In the specific implementation process, the at least one processor 701 executes the computer execution instructions stored in the memory 702, so that the at least one processor 701 executes the flow detection method in the above method embodiment.

[0190] The specific implementation process of the processor 701 can refer to the above method embodiment, which has similar implementation principles and technical effects, and will not be described here in detail.

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

[0192] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, for example, at least one disk memory.

[0193] The bus can be an industry standard architecture (Industry Standard Architecture, for short: ISA) bus, a peripheral component interconnect (Peripheral Component, for short: PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, for short: EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, the bus in the drawings of the present application does not limit only one bus or one type of bus.

[0194] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When the processor executes the computer execution instructions, the flow detection method of the above method embodiment is realized.

[0195] The computer readable storage medium described above can be implemented by any type of volatile or nonvolatile storage devices 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 storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0196] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium, and can write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.

[0197] One embodiment of the present application provides a computer program product comprising a computer program, which, when executed by a processor, implements the flow detection method according to any of the embodiments corresponding to the computer program. Figures 2 to 5 The flow detection method according to any of the embodiments corresponding to the computer program.

[0198] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction-related hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes ROM, RAM, magnetic disk or optical disk and various storage media that can store program codes.

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

Claims

1. A method of flow detection, characterized by, The method comprises: acquiring a current sampling frequency, and detecting instantaneous flow data of the fluid according to the current sampling frequency; acquiring a plurality of instantaneous flow data within a preset time period; determining a flow state stability index of the fluid according to the plurality of instantaneous flow data; comparing the flow state stability index with a plurality of threshold intervals divided in advance to determine a threshold interval corresponding to the flow state stability index; wherein different threshold intervals correspond to different flow state stability levels; when the flow state stability index is a standard deviation or a variance, the plurality of threshold intervals are determined based on a threshold determined by an average value of the plurality of instantaneous flow data and a preset coefficient; determining a flow state stability level corresponding to the determined threshold interval as a flow state stability level of the fluid within the preset time period; the flow state stability level is used to represent the stability of the flow state of the fluid; adjusting the sampling frequency according to the flow state stability level to detect the fluid according to the adjusted sampling frequency.

2. The method of claim 1, wherein, The sampling frequency is positively correlated with the flow state stability level.

3. The method of claim 1, wherein, The flow state stability index comprises at least one of the following: a standard deviation, a variance and a range.

4. The method of claim 3, wherein, The method further comprises: calculating an average value of the plurality of instantaneous flow data, and determining a threshold according to the average value and a preset coefficient; the number of the thresholds corresponds to the number of the preset coefficients; determining a threshold interval according to the threshold, and determining the threshold interval as a threshold interval divided in advance; the number of the threshold intervals corresponds to the number of the thresholds.

5. The method of claim 1, wherein, Adjusting the sampling frequency according to the flow state stability level comprises: determining a target flow state stability level according to the current sampling frequency; determining whether the current flow state stability level is consistent with the target flow state stability level; when the current flow state stability level is not consistent with the target flow state stability level, determining a sampling frequency corresponding to the current flow state stability level as an adjusted sampling frequency according to a corresponding relationship between the flow state stability level and the sampling frequency.

6. The method of claim 1, wherein, The method further comprises: acquiring a predetermined timing period; determining a time difference between a current time and a first time; the first time is a time when the flow state stability level of the fluid is determined last time; when the time difference is equal to the timing period, triggering the operation of acquiring a plurality of instantaneous flow data within a preset time period, and determining a flow state stability level of the fluid according to the acquired plurality of instantaneous flow data.

7. The method of claim 6, wherein, The method further comprises: adjusting the timing period according to the flow state stability level; wherein the timing period is negatively correlated with the flow state stability level.

8. The method of claim 7, wherein, Adjusting the timing period according to the flow state stability level comprises: determining a target flow state stability level according to the current timing period; determining whether the current flow state stability level is consistent with the target flow state stability level; when the current flow state stability level is not consistent with the target flow state stability level, determining a timing period corresponding to the current flow state stability level as an adjusted timing period according to a corresponding relationship between the flow state stability level and the timing period.

9. The method according to any one of claims 1 to 8, characterized in that, After detecting the instantaneous flow data of the fluid according to the sampling frequency, the method further comprises: Save the detected multiple instantaneous flow data and detection time in a preset storage space; Correspondingly, the multiple instantaneous flow data in the preset time period are acquired, including: The multiple instantaneous flow data meeting the condition are acquired from the preset storage space, and the condition refers to that the detection time of the instantaneous flow data is in the preset time period.

10. The method of claim 9, wherein, The method further includes: performing timed cleaning on the data saved in the preset storage space based on a cleaning period; and the cleaning period is greater than the maximum value of the timing period.

11. A flow detection device, characterized by The method includes: The detection module acquires the current sampling frequency and detects the instantaneous flow data of the fluid according to the sampling frequency; The determination module is configured to acquire the multiple instantaneous flow data in the preset time period; determine the flow state stability index of the fluid according to the multiple instantaneous flow data; compare the flow state stability index with multiple threshold intervals divided in advance to determine the threshold interval corresponding to the flow state stability index; different threshold intervals correspond to different flow state stability levels; when the flow state stability index is a standard deviation or a variance, the multiple threshold intervals are determined based on a threshold determined by an average value of the multiple instantaneous flow data and a preset coefficient; the flow state stability level corresponding to the determined threshold interval is determined as the flow state stability level of the fluid in the preset time period; and the flow state stability level is used to represent the stability of the flow state of the fluid. The adjustment module is configured to adjust the sampling frequency according to the flow state stability level to detect the fluid according to the adjusted sampling frequency.

12. A flow meter, characterized by, The method includes: The memory is configured to store program instructions; The processor is configured to call and execute the program instructions in the memory to execute the method in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-10.

14. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1-10.

Citation Information

Patent Citations

  • Novel self-adaptation measuring method for ultrasonic flowmeter

    CN108444557A

  • Control method for automatically adjusting sampling frequency of flow meter

    CN110617860A