Flow metering method and device and meter

文档序号:798839 发布日期:2021-04-13 浏览:25次 中文

阅读说明:本技术 流量计量方法、装置和表具 (Flow metering method and device and meter ) 是由 林上玉 张礼 钭伟明 于 2020-12-14 设计创作,主要内容包括:本申请提供一种流量计量方法、装置和表具。该方法包括:在每一个数据采样周期中,表具在该数据采样周期开始的时刻执行一次精采样,获取精采样数据。在完成精采样后,表具根据粗采样频率开始执行粗采样,得到粗采样数据。表具在每次获取粗采样数据后,使用精采样数据和粗采样数据计算得到波动差值。当波动差值大于波动阈值时,表具结束当前的数据采样周期,并开始下一数据采样周期。当波动差值小于等于波动阈值时,表具执行下一次粗采样。表具可以根据上述步骤确定的精采样数据,实现表具流量的计量。本申请的方法,提高了流量的测量准确性,降低了表具的功耗。(The application provides a flow metering method, a flow metering device and a meter. The method comprises the following steps: in each data sampling period, the table implements one-time fine sampling at the beginning of the data sampling period to obtain fine sampling data. And after finishing the fine sampling, starting to perform coarse sampling by the meter according to the coarse sampling frequency to obtain coarse sampling data. And after the table tool acquires the rough sampling data each time, calculating to obtain a fluctuation difference value by using the fine sampling data and the rough sampling data. And when the fluctuation difference value is larger than the fluctuation threshold value, the meter finishes the current data sampling period and starts the next data sampling period. And when the fluctuation difference value is less than or equal to the fluctuation threshold value, the table carries out the next coarse sampling. The meter can realize the metering of the flow of the meter according to the fine sampling data determined by the steps. The method improves the flow measurement accuracy and reduces the power consumption of the meter.)

1. A flow metering method, characterized in that the method comprises:

s1, acquiring fine sampling data, wherein the fine sampling data are determined through fine sampling, and fine sampling is performed once at the beginning of each data sampling period;

s2, acquiring coarse sampling data, wherein the coarse sampling data are determined through coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period comprises at least one coarse sampling;

s3, after coarse sampling data are obtained each time, determining a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period;

s4, when the fluctuation difference value is larger than the fluctuation threshold value, ending the data sampling period and starting the next data sampling period; when the fluctuation difference value is equal to or less than the fluctuation threshold value, returning to S2;

and S5, measuring the flow according to the fine sampling data.

2. The method according to claim 1, wherein the S3 includes:

determining a coarse sampling average value according to all coarse sampling data in the data sampling period;

and determining a fluctuation difference value according to the fine sampling data and the coarse sampling average value in the data sampling period.

3. The method according to claim 1, wherein the S3 further comprises:

determining maximum coarse sampling data and minimum coarse sampling data according to all coarse sampling data in the data sampling period;

and determining a fluctuation difference value according to the maximum coarse sampling data and the minimum coarse sampling data.

4. The method 5, according to claim 1, wherein the S5, further includes:

and measuring the flow according to a preset measuring frequency and the fine sampling data.

5. The method of claim 4, wherein the metering flow based on a preset metering frequency and the fine sample data comprises:

determining a metering time and a metering interval according to the preset metering frequency;

determining a data sampling period corresponding to the metering time according to the metering time, wherein the metering time is one time in the data sampling period;

and metering the flow according to the fine sampling data in the data sampling period and the metering interval.

6. The method according to any one of claims 1-5, further comprising:

acquiring the duration of the data sampling period;

and when the duration is longer than the preset duration, ending the data sampling period and starting the next data sampling period.

7. The method of claim 6, further comprising:

when the fine sampling data is smaller than a first flow threshold, increasing the preset duration according to a preset algorithm;

and when the fine sampling data is larger than a second flow threshold, reducing the preset time according to a preset algorithm.

8. A flow metering device, the device comprising:

the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring fine sampling data, the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling period;

the second acquisition module is used for acquiring coarse sampling data, the coarse sampling data is determined through coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and at least one coarse sampling is included in the data sampling period;

the determining module is used for determining a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period after the coarse sampling data is obtained each time;

the judging module is used for ending the data sampling period and starting the next data sampling period when the fluctuation difference value is larger than a fluctuation threshold value; when the fluctuation difference value is equal to or less than the fluctuation threshold value, returning to S2;

and the metering module is used for metering flow according to the fine sampling data.

9. A watch, characterized in that it comprises: memory, a processor, wherein the memory has stored thereon flow metering instructions, which when executed by the processor, are adapted to implement the steps of the flow metering method according to any of claims 1 to 7.

10. A computer-readable storage medium having computer-executable instructions stored thereon for implementing a flow metering method as claimed in any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that it comprises computer instructions for implementing a flow metering method according to any one of claims 1 to 7 when executed by a processor.

Technical Field

The present application relates to data acquisition technologies, and in particular, to a flow measurement method, a flow measurement device, and a meter.

Background

Along with the continuous expansion of the gas engineering, the popularization rate of the gas meter is gradually increased. Currently, many gas meters are used including membrane meters and electronic watches. Thermal watches are one type of electronic watch. In the using process of the gas meter, the time when a user starts using or finishes using is generally random. Therefore, in order to accurately obtain the usage amount of the natural gas, the flow rate flowing through the gas meter at each time is generally obtained by a continuous sampling method, and the total flow rate is calculated by an accumulation method.

Thermal meters typically use the thermal principle to meter the flow of gas through the meter. The meter can be a gas meter and the like. Based on the thermal principle, the gauge heats gas by using a heat source, and further generates a thermal field. The gauge measures the temperature difference by using high-precision temperature sensors installed upstream and downstream of the thermal field. The meter can determine the current flow value through the temperature difference and the flow change rule. In the prior art, in order to improve the accuracy of flow measurement, a meter generally adopts a mode of increasing sampling frequency to improve the accuracy of flow measurement.

However, in the prior art, the meter is usually powered by a lithium battery or an alkaline battery, so the service life of the meter is limited by the amount of electricity. Increasing the sampling frequency inevitably increases the power consumption of the meter and reduces the service life of the battery. Therefore, how to improve the metering accuracy of the gauge under the condition of ensuring the service life of the gauge becomes an urgent problem to be solved.

Disclosure of Invention

The application provides a flow measuring method, a flow measuring device and a meter, which are used for solving the problem that how to improve the sampling precision of the meter becomes urgent to solve under the condition of ensuring the service life of the meter.

In a first aspect, the present application provides a flow metering method comprising:

s1, acquiring fine sampling data, wherein the fine sampling data are determined through fine sampling, and fine sampling is performed once at the beginning of each data sampling period;

s2, acquiring coarse sampling data, wherein the coarse sampling data are determined through coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period comprises at least one coarse sampling;

s3, after coarse sampling data are obtained each time, determining a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period;

s4, when the fluctuation difference value is larger than the fluctuation threshold value, ending the data sampling period and starting the next data sampling period; when the fluctuation difference value is equal to or less than the fluctuation threshold value, returning to S2;

and S5, measuring the flow according to the fine sampling data.

Optionally, the S3 includes:

determining a coarse sampling average value according to all coarse sampling data in the data sampling period;

and determining a fluctuation difference value according to the fine sampling data and the coarse sampling average value in the data sampling period.

Optionally, the S3 further includes:

determining maximum coarse sampling data and minimum coarse sampling data according to all coarse sampling data in the data sampling period;

and determining a fluctuation difference value according to the maximum coarse sampling data and the minimum coarse sampling data.

Optionally, the S5, further includes:

and measuring the flow according to a preset measuring frequency and the fine sampling data.

Optionally, the measuring the flow according to the preset measuring frequency and the fine sampling data includes:

determining a metering time and a metering interval according to the preset metering frequency;

determining a data sampling period corresponding to the metering time according to the metering time, wherein the metering time is one time in the data sampling period;

and metering the flow according to the fine sampling data in the data sampling period and the metering interval.

Optionally, the method further includes:

acquiring the duration of the data sampling period;

and when the duration is longer than the preset duration, ending the data sampling period and starting the next data sampling period.

Optionally, the method further includes:

when the fine sampling data is smaller than a first flow threshold, increasing the preset duration according to a preset algorithm;

and when the fine sampling data is larger than a second flow threshold, reducing the preset time according to a preset algorithm.

In a second aspect, the present application provides a flow metering device comprising:

the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring fine sampling data, the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling period;

the second acquisition module is used for acquiring coarse sampling data, the coarse sampling data is determined through coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and at least one coarse sampling is included in the data sampling period;

the determining module is used for determining a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period after the coarse sampling data is obtained each time;

the judging module is used for ending the data sampling period and starting the next data sampling period when the fluctuation difference value is larger than a fluctuation threshold value; alternatively, when the fluctuation difference is equal to or less than the fluctuation threshold, the flow returns to S2;

and the metering module is used for metering flow according to the fine sampling data.

Optionally, the determining module is specifically configured to determine a coarse sampling average value according to all coarse sampling data in the data sampling period; and determining a fluctuation difference value according to the fine sampling data and the coarse sampling average value in the data sampling period.

Optionally, the determining module is specifically configured to determine the maximum coarse sampling data and the minimum coarse sampling data according to all coarse sampling data in the data sampling period; and determining a fluctuation difference value according to the maximum coarse sampling data and the minimum coarse sampling data.

Optionally, the metering module is specifically configured to meter a flow rate according to a preset metering frequency and the fine sampling data.

Optionally, the metering module includes:

the first determining submodule is used for determining the metering time and the metering interval according to the preset metering frequency;

the second determining submodule is used for determining a data sampling period corresponding to the metering time according to the metering time, wherein the metering time is one time in the data sampling period;

and the metering submodule is used for metering flow according to the fine sampling data in the data sampling period and the metering interval.

Optionally, the apparatus further includes:

a third obtaining module, configured to obtain a duration of the data sampling period;

the judging module is further configured to end the data sampling period and start a next data sampling period when the duration is longer than a preset duration.

Optionally, the determining module further includes:

the increasing submodule is used for increasing the preset duration according to a preset algorithm when the fine sampling data is smaller than a first flow threshold;

and the reduction submodule reduces the preset duration according to a preset algorithm when the fine sampling data is larger than a second flow threshold.

In a third aspect, the present application provides a watch, comprising: memory, a processor, wherein the memory has stored thereon flow metering instructions that when executed by the processor implement the steps of a flow metering method as in any one of the possible designs of the first aspect and the first aspect.

In a fourth aspect, the present application provides a readable storage medium having stored thereon instructions for execution, which when executed by at least one processor of a meter, cause the meter to perform the flow metering method of the first aspect and any one of the possible designs of the first aspect.

In a fifth aspect, the present application provides computer instructions which, when executed by a processor, are adapted to implement the flow metering method of the first aspect and any one of the possible designs of the first aspect.

According to the flow measuring method, the flow measuring device and the meter, in each data sampling period, fine sampling is performed once at the beginning of the data sampling period; the secondary fine sampling obtains fine sampling data; the fine sampling data is used for accurately measuring the flow at the moment; after finishing the fine sampling, starting to execute the coarse sampling according to the coarse sampling frequency of the coarse sampling; obtaining coarse sampling data through coarse sampling; after coarse sampling data are obtained each time, calculating by using the fine sampling data and the coarse sampling data to obtain a fluctuation difference value; comparing the fluctuation difference value with a fluctuation threshold value; when the fluctuation difference value is determined to be larger than the fluctuation threshold value after comparison, ending the current data sampling period and starting the next data sampling period; when the fluctuation difference value is less than or equal to the fluctuation threshold value, staying in the data sampling period, and executing next coarse sampling according to the coarse sampling frequency; and the power consumption effect of the meter is reduced on the basis of ensuring the measurement accuracy of the flow value by means of updating the total flow according to the preset metering frequency and the fine sampling data.

Drawings

In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

Fig. 1 is a schematic view illustrating a metering principle of a thermal type meter according to an embodiment of the present application;

FIG. 2 is a flow chart of a flow measurement method provided by an embodiment of the present application;

fig. 3 is a schematic diagram of a first sampling period according to an embodiment of the present application;

fig. 4 is a schematic structural diagram of a flow metering device according to an embodiment of the present disclosure;

FIG. 5 is a schematic structural diagram of another flow metering device provided in an embodiment of the present application;

fig. 6 is a schematic diagram of a hardware structure of a watch according to an embodiment of the present application.

Detailed Description

To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Along with the continuous expansion of the gas engineering, the popularization rate of the gas meter is gradually increased. Gas meters in many uses include membrane meters and electronic watches. The thermal meter is an electronic meter which measures by adopting a thermal principle. When the flow measurement principle of the meter such as a gas meter, a water meter, a flowmeter is a thermal principle, the meter can heat surrounding gas through a heat source to generate a thermal field, and then the temperature difference of the meter is measured through a high-precision temperature sensor at the upstream and the downstream. The thermal meter can calculate the current flow value through the temperature difference and the change rule of the flow.

In the process of using the watch, the time when the user starts using or finishes using is generally random. Therefore, in order to accurately obtain the usage amount of the natural gas, the gas flow rate in the meter at each time is generally obtained by means of continuous sampling, so as to cumulatively measure the usage amount of the natural gas. In the metering process of the natural gas, the higher the sampling frequency is, the higher the accuracy of the flow metering is. If the frequency is reduced, the accuracy of the corresponding flow metering is reduced.

However, currently, the energy source of the watch is usually a lithium battery or an alkaline battery. That is to say the energy source of the watch is generally limited. That is, as the sampling frequency increases during the use of the watch, the service life of the battery in the watch is also shortened. Therefore, how to balance the battery life and the sampling frequency of the meter becomes a concern. Aiming at the concern, how to improve the metering sampling precision of the meter becomes an urgent problem to be solved on the basis of ensuring the service life of the battery.

To address this problem, the present application proposes a flow measurement method. In this application, according to the flow measurement characteristics of hot type meter, the engineer divides the flow acquisition mode of hot type meter into two kinds of accurate sampling and coarse sampling. Wherein, the accurate sampling is the conventional sampling mode, and in the sampling process, the heating time of the heating element is determined according to the standard time. Wherein the coarse sampling reduces power consumption of the sampling by reducing heating time to the heating member. Inevitably, the coarse sampling sacrifices the accuracy of measurement while realizing low power consumption. In this application, the engineer makes the table utensil can accurately obtain gas flow through the accurate sampling through setting up the accurate sampling. The meter uses the fine sampling data to realize the flow measurement. Meanwhile, an engineer realizes high-frequency monitoring of gas flow by setting coarse sampling, and judges whether the flow in the meter fluctuates greatly or not and whether fine sampling data needs to be measured again or not.

The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.

Fig. 1 shows a schematic diagram of a metering principle of a thermal meter according to an embodiment of the present application. Shown is a section of gas piping in which a flow measurement assembly is installed in a thermal meter. A sensor is installed below the gas pipe, and each element in the sensor is installed on a sensor substrate. The sensor includes an upstream temperature sensing element, a downstream temperature sensing element, and a heating element.

Thermal meters typically use the thermal principle to meter the flow of gas through the meter. The gauge raises the temperature in the pipeline by heating the heating element. The gauge measures the change of the temperature field in the pipeline through the upstream temperature measuring element and the downstream temperature measuring element. The temperature field has a corresponding relationship with the gas flow. For example, when no gas flows through the gas pipeline, the two temperature sensors are in the same temperature field, and the measured temperatures are the same. When gas flows through the gas pipeline, the temperature field can deviate along with the flowing of the gas, and at the moment, the temperatures measured by the two temperature sensors are different. The meter can calculate the current flow value according to the temperature difference and the change rule of the flow after acquiring the temperatures of the two temperature sensors.

In this application, engineers divide the sampling of gas flow into fine sampling and coarse sampling. Wherein, the heating time of the fine sampling is determined according to the standard data of the thermal meter. The heating time for the coarse sampling is determined by the engineer based on the behavior of the thermal meter. The heating time for the coarse sampling is shorter than the heating time for the fine sampling. The coarse sampling realizes the effect of reducing power consumption by reducing heating time.

In the present application, the meter is used as an execution subject to execute the flow measurement method of the following embodiment. Specifically, the meter may include a thermal gas meter, a thermal flow meter, and the like, and the execution body may be a hardware device of the meter or a processor in the meter, which implements the following embodiments.

Fig. 2 shows a flow chart of a flow measurement method provided by an embodiment of the present application. On the basis of the embodiment shown in fig. 1, as shown in fig. 2, with a meter as an execution subject, the method of the embodiment may include the following steps:

s101, acquiring fine sampling data, wherein the fine sampling data is determined through fine sampling, and fine sampling is performed once at the beginning of each data sampling period.

In the embodiment, during the use of the meter, the accurate metering of the flow in the meter is realized through the fine sampling. The sampling period of the fine sampling is a data sampling period. The data sampling period is a dynamically varying range. The range is empirically determined, and may be, for example, 30 seconds to 3 minutes.

In each data sample period, a fine sampling is performed at the beginning of the data sample period, and the data sample period and its fine sampling may be as shown in fig. 3. The fine sampling acquires fine sampling data. The fine sampling data is used to accurately meter the flow in the timetable.

S102, coarse sampling data are obtained, the coarse sampling data are determined through coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and at least one coarse sampling is included in a data sampling period.

In this embodiment, after finishing the fine sampling of S101, the table starts to perform the coarse sampling according to the coarse sampling frequency of the coarse sampling, which may be performed as the coarse sampling shown in fig. 3. The coarse sampling frequency is a fixed value, and the specific numerical value is determined empirically. For example, when the coarse sampling period is 2 seconds, the table performs coarse sampling 2 seconds after the fine sampling is finished. Or, the table shows that the next coarse sampling is started 2 seconds after the last coarse sampling is finished.

And the table tool obtains coarse sampling data through coarse sampling. The raw sample data is used to meter the flow in the timetable. The coarse sampling data has a certain error compared with the fine sampling data, so that the coarse sampling data is applied to a table for monitoring whether the flow of the table changes or not.

And S103, after the coarse sampling data are obtained each time, determining a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period.

In this embodiment, after the meter acquires the coarse sampling data each time, the meter monitors whether the fine sampling data changes according to the coarse sampling data in the sampling period. In order to accurately measure whether the flow in the meter changes, the meter calculates to obtain a fluctuation difference value by using the fine sampling data and the coarse sampling data, and judges according to the fluctuation difference value.

The calculation manner of the fluctuation difference value may include the following examples:

in one example, the fluctuation difference value can be calculated from the average value of the coarse samples and the fine sample data, and the calculation process can include the following steps:

step 1, determining a coarse sampling average value according to all coarse sampling data in a data sampling period.

And 2, determining a fluctuation difference value according to the fine sampling data and the coarse sampling average value in the data sampling period.

In this step, the table calculates the absolute value of the difference between the average values of the fine sample data and the coarse sample data. The table determines the absolute value of the difference as the fluctuation difference.

In another example, the fluctuation difference value may be calculated according to a maximum value and a minimum value in the coarse sampling data, and the process may include:

step 1, determining maximum coarse sampling data and minimum coarse sampling data according to all coarse sampling data in a data sampling period.

And 2, determining a fluctuation difference value according to the maximum coarse sampling data and the minimum coarse sampling data.

In this step, the table calculates the absolute value of the difference between the maximum coarse sampling data and the minimum coarse sampling data. The table determines the absolute value of the difference as the fluctuation difference.

In yet another example, the table may calculate the fluctuation difference of the data sampling period using the two methods described above. When one of the two fluctuation differences is greater than the fluctuation threshold, the meter performs the step shown in S104.

And S104, when the fluctuation difference value is larger than the fluctuation threshold value, ending the data sampling period and starting the next data sampling period. When the fluctuation difference is equal to or less than the fluctuation threshold, the process returns to S102.

In this embodiment, the table compares the fluctuation difference value with the fluctuation threshold value after determining the fluctuation difference value. The fluctuation threshold is an empirical value. When the fluctuation difference is larger than the fluctuation threshold, the fluctuation difference is generated no longer due to the error of the rough sampling but due to the flow change in the meter.

And when the fluctuation difference value is larger than the fluctuation threshold value after the comparison of the meters, ending the current data sampling period by the meters and starting the next data sampling period. And when the fluctuation difference value is less than or equal to the fluctuation threshold value, the meter stays in the data sampling period, and the next coarse sampling is executed according to the coarse sampling frequency.

And S105, measuring the flow according to the fine sampling data.

In this embodiment, the meter can measure the flow of the meter according to the fine sampling data determined in the above steps.

In one example, the meter may meter the flow based on a preset metering frequency and the fine sample data.

In this example, the meter includes a preset metering frequency, and the preset metering frequency is independent of the data sampling period. For example, the meter performs flow metering every 2 seconds, starting at second 0. At the same time, the meter starts a data sampling period from the 0 th second, which has a duration of 7 seconds. At this time, the meter starts the second data sampling period at the 7 th second, and the meter performs flow rate measurement at the 2 nd, 4 th, 6 th, and 8 th seconds, respectively. The metering time of the flow is independent of the data sampling period. At this time, the specific steps of flow metering may include:

step 1, determining a metering time and a metering interval according to a preset metering frequency.

In this step, the preset metering frequency is an empirical value, and an engineer can adjust the preset metering frequency according to actual needs. For example, the preset metering frequency is 2 seconds/time, the metering time may be 2 seconds, 4 seconds, 6 seconds, and 8 seconds, and the metering interval is 2 seconds.

And 2, determining a data sampling period corresponding to the metering time according to the metering time, wherein the metering time is one time in the data sampling period.

In this step, the meter starts to perform the flow metering operation when the metering time is reached. After the metering time is reached, the meter first determines the data acquisition period in which the metering time is located. For example, the 0 th second starts a first data acquisition cycle, the 7 th second starts a second data acquisition cycle, and the 15 th second starts a third data acquisition cycle. The metering time of the 2 nd, 4 th and 6 th seconds is in the first data sampling period, the metering time of the 8 th, 10 th, 12 th and 14 th seconds is in the second data sampling period, and the metering time of the 16 th second is in the third data sampling period.

And 3, metering the flow according to the fine sampling data and the metering interval in the data sampling period.

In this step, the meter determines the fine sampling data corresponding to the data sampling period according to the data sampling period. And then, the meter calculates the flow passing through the meter in the metering interval according to the fine sampling data and the metering interval. And accumulating the flow passing through the meter in the metering interval on the basis of the total flow of the meter when the metering time is reached by the meter, so as to obtain the updated total flow of the meter when the metering time is reached. And the meter updates the updated total flow into a display interface of the meter to realize the metering of the flow.

In the flow measurement method provided by the application, in each data sampling period, the meter performs one-time fine sampling at the beginning of the data sampling period. The fine sampling acquires fine sampling data. The fine sampling data is used to accurately meter the flow in the timetable. After the fine sampling is completed, the gauge starts to perform coarse sampling according to the coarse sampling frequency of the coarse sampling. And the table tool obtains coarse sampling data through coarse sampling. And after the table tool acquires the rough sampling data each time, calculating to obtain a fluctuation difference value by using the fine sampling data and the rough sampling data. The table compares the fluctuation difference value with a fluctuation threshold value. And when the fluctuation difference value is larger than the fluctuation threshold value after the comparison of the meters, ending the current data sampling period by the meters and starting the next data sampling period. And when the fluctuation difference value is less than or equal to the fluctuation threshold value, the meter stays in the data sampling period, and the next coarse sampling is executed according to the coarse sampling frequency. The meter can realize the metering of the flow of the meter according to the fine sampling data determined by the steps. In the application, the flow of the meter is accurately acquired by using the fine sampling, and the change of the flow in the meter is monitored by using the coarse sampling, so that the power consumption of the meter is reduced on the basis of ensuring the measurement accuracy of the flow value, the meter only needs to accurately measure the flow value when the flow changes, and the accurate flow value does not need to be acquired in real time.

On the basis of the foregoing embodiments, this embodiment can also end the data sampling period when the data sampling period reaches a preset duration to improve the effectiveness of the fine sampling data and achieve the effect of improving the calculation accuracy of the total flow rate, and the table is taken as an execution main body, and the specific steps may include:

step 1, obtaining the duration of a data sampling period.

In this step, the meter may also monitor the duration of each data sampling period.

And step 2, ending the data sampling period and starting the next data sampling period when the duration is longer than the preset duration.

In this step, the meter may compare the duration with a preset duration according to a preset frequency. And when the meter area determines that the duration of the data sampling period is longer than the preset duration, ending the data sampling period. The meter starts the next data sampling period, so that the effective duration of the fine sampling data is ensured, and the effectiveness of the fine sampling data is improved.

The preset frequency may be a comparison frequency determined by an engineer according to experience.

Wherein, the preset duration is the sampling period of the data sampling period. Since the sampling period is a dynamically varying range. Thus, the preset duration is an adjustable duration. The time period can be adjusted according to the following steps:

and 2.1, when the fine sampling data is smaller than the first flow threshold, increasing the preset time according to a preset algorithm.

In this step, the meter may also increase the preset duration when the flow rate is small or no flow rate is present. At this time, the gauge increases the preset duration to reduce the number of times of fine sampling execution and reduce the power consumption of the gauge.

The first flow threshold is a small flow value, and when the fine sampling data is smaller than the first flow threshold, the table can be regarded as the flow rate is almost 0.

The preset algorithm may be to increase the preset duration proportionally, for example, when the preset duration needs to be increased, the new calculation formula of the preset duration may be:

the preset time length is equal to the preset time length × a

Wherein a is a number greater than 1, for example 1.1.

Alternatively, the preset algorithm may be a quantitative increase of the preset duration, for example, when the preset duration needs to be increased, the new preset duration may be calculated by:

the preset time length is equal to the preset time length + b

Where b is a positive number, e.g., 2 seconds, 1 minute, etc.

And 2.1, when the fine sampling data is larger than the second flow threshold, reducing the preset time according to a preset algorithm.

In this step, when the flow rate of the meter is large, the meter can also shorten the preset time. At this time, the meter shortens the preset time length, so that the precision sampling frequency of the meter when the flow is large can be improved, and the metering accuracy of the meter in the time period is improved.

Wherein the second flow threshold is a larger flow value.

The preset algorithm may be to scale down the preset duration, for example, when the preset duration needs to be increased, the new calculation formula of the preset duration may be:

the preset time length is equal to the preset time length × a

Where a is a number less than 1, for example 0.8.

Alternatively, the preset algorithm may be a quantitative reduction of the preset duration, for example, when the preset duration needs to be reduced, the new preset duration may be calculated by:

the preset time length is equal to the preset time length-b

Where b is a positive number, e.g., 2 seconds, 1 minute, etc.

In the flow measurement method provided by the application, the meter can also monitor the duration of each data sampling period. The meter may compare the duration with a preset duration according to a preset frequency. And when the meter area determines that the duration of the data sampling period is longer than the preset duration, ending the data sampling period. The meter may also increase the preset duration when there is little or no flow. When the flow of the meter is larger, the meter can also shorten the preset time. In the application, the sampling frequency of the data sampling period is ensured by comparing the duration of the data sampling period with the preset duration, the continuous service time process of the fine sampling data is avoided, and the effectiveness of the fine sampling data is improved. Meanwhile, the preset time is adjusted according to the fine sampling data, so that the fine sampling frequency is reduced when the meter is at a lower flow, and the power consumption is further reduced. And when the flow is higher, the high-precision sampling frequency of the meter is reduced, so that the metering accuracy is further improved.

Fig. 4 is a schematic structural diagram of a flow rate metering device according to an embodiment of the present application, and as shown in fig. 4, the flow rate metering device 10 according to the present embodiment is used for implementing operations corresponding to a meter in any one of the method embodiments, where the flow rate metering device 10 according to the present embodiment includes:

the first obtaining module 11 is configured to obtain fine sampling data, where the fine sampling data is determined by fine sampling, and fine sampling is performed once at a start time of each data sampling period.

The second obtaining module 12 is configured to obtain coarse sampling data, where the coarse sampling data is determined by coarse sampling, a sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and a data sampling period includes at least one coarse sampling.

And the determining module 13 is configured to determine a fluctuation difference value according to the fine sampling data and/or the coarse sampling data in the data sampling period after the coarse sampling data is obtained each time.

And the judging module 14 is configured to end the data sampling period and start a next data sampling period when the fluctuation difference is greater than the fluctuation threshold. Alternatively, when the fluctuation difference is equal to or smaller than the fluctuation threshold, the flow returns to S2.

And the metering module 15 is used for metering the flow according to the fine sampling data.

In one example, the determining module 13 is specifically configured to determine a coarse sampling average value according to all coarse sampling data in a data sampling period. And determining a fluctuation difference value according to the fine sampling data and the coarse sampling average value in the data sampling period.

In another example, the determining module 13 is specifically configured to determine the maximum coarse sampling data and the minimum coarse sampling data according to all coarse sampling data in a data sampling period. And determining a fluctuation difference value according to the maximum coarse sampling data and the minimum coarse sampling data.

In one example, the metering module 15 is specifically configured to meter the flow rate according to a preset metering frequency and the fine sampling data.

In one example, the metering module 15 may further include:

the first determining submodule 151 is configured to determine a metering time and a metering interval according to a preset metering frequency.

The second determining submodule 152 is configured to determine, according to the metering time, a data sampling period corresponding to the metering time, where the metering time is one time in the data sampling period.

And the metering submodule 153 is used for metering the flow according to the fine sampling data and the metering interval in the data sampling period.

The flow metering device 10 provided in the embodiment of the present application may implement the above method embodiment, and specific implementation principles and technical effects thereof may be referred to the above method embodiment, which is not described herein again.

Fig. 5 shows a schematic structural diagram of another flow rate metering device provided in an embodiment of the present application, and based on the embodiment shown in fig. 4, as shown in fig. 5, the flow rate metering device 10 of the present embodiment is used for implementing operations corresponding to a meter in any one of the method embodiments described above, and the flow rate metering device 10 of the present embodiment further includes:

a third acquisition module 16 for acquiring the duration of the data sampling period.

The determining module 14 is further configured to end the data sampling period and start the next data sampling period when the duration is longer than the preset duration.

In one example, the determining module 14 further includes:

the increasing submodule 141 is configured to increase the preset duration according to a preset algorithm when the fine sampling data is smaller than the first flow threshold.

And a reduction submodule 142, configured to reduce the preset duration according to a preset algorithm when the fine sampling data is greater than the second flow threshold.

The flow metering device 10 provided in the embodiment of the present application may implement the above method embodiment, and specific implementation principles and technical effects thereof may be referred to the above method embodiment, which is not described herein again.

Fig. 6 shows a hardware structure diagram of a watch provided in an embodiment of the present application. As shown in fig. 6, the meter 20 is configured to implement operations corresponding to the meter in any of the above method embodiments, where the meter 20 of this embodiment may include: memory 21, processor 22.

A memory 21 for storing a computer program. The Memory 21 may include a Random Access Memory (RAM), a Non-Volatile Memory (NVM), at least one disk Memory, a usb disk, a removable hard disk, a read-only Memory, a magnetic disk or an optical disk.

A processor 22 for executing a computer program stored in the memory for implementing the flow metering method in the above embodiments. Reference may be made in particular to the description relating to the method embodiments described above.

Alternatively, the memory 21 may be separate or integrated with the processor 22.

The meter provided by this embodiment can be used to perform the above-mentioned flow measurement method, and its implementation and technical effects are similar, and this embodiment is not described herein again.

The present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the methods provided by the above-mentioned various embodiments when being executed by a processor.

The present application also provides a program product comprising execution instructions stored in a computer-readable storage medium. The at least one processor of the device may read the execution instructions from the computer-readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the methods provided by the various embodiments described above.

In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.

Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.

The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor to execute some steps of the methods according to the embodiments of the present application.

Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. Which when executed performs steps comprising the method embodiments described above. And the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

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 the same. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: it is also possible to modify the solutions described in the previous embodiments or to substitute some or all of them with equivalents. And the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种具备漏气报警功能的过滤式气体涡轮流量计

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!