Flow measurement method, device and meter

By using a combination of fine sampling and rough sampling in gas meter, using fine sampling data for accurate measurement, and monitoring flow fluctuations through rough sampling, the problem of shortening battery life in the prior art is solved, and high-precision flow metering and Low power balance.

CN112649060BActive Publication Date: 2024-12-10GOLDCARD HIGH TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011469247.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-14
Publication Date
2024-12-10
Estimated Expiration
2040-12-14

AI Technical Summary

Technical Problem

While improving the flow metering accuracy, the problem of shortening the battery life is that existing gas metering tools have improved. How to improve the metering accuracy while ensuring the service life of the metering tools has become an urgent problem.

Method used

Using a combination of fine sampling and rough sampling, the fine sampling data is obtained by performing a fine sampling in each data sampling cycle, and the fluctuation difference value is calculated based on the rough sampling data. When the fluctuation difference value is greater than the threshold, the cycle is ended and the work is reduced. Consume, extend battery life.

Benefits of technology

It realizes that on the basis of ensuring the service life of the meter, improves the flow meter measurement accuracy, reduces the power consumption of the meter, and avoids the problem of shortening the battery life caused by frequent sampling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112649060B_ABST
    Figure CN112649060B_ABST
Patent Text Reader

Abstract

The present application provides a flow metering method, device and meter. The method includes: in each data sampling cycle, the meter performs a fine sampling at the beginning of the data sampling cycle to obtain fine sampling data. After completing the fine sampling, the meter starts to perform coarse sampling according to the coarse sampling frequency to obtain coarse sampling data. After each acquisition of coarse sampling data, the meter uses the fine sampling data and the coarse sampling data to calculate the fluctuation difference. When the fluctuation difference is greater than the fluctuation threshold, the meter ends the current data sampling cycle and starts the next data sampling cycle. When the fluctuation difference is less than or equal to the fluctuation threshold, the meter performs the next coarse sampling. The meter can measure the flow of the meter based on the fine sampling data determined in the above steps. The method of the present application improves the measurement accuracy of the flow and reduces the power consumption of the meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data acquisition technology, and in particular to a flow metering method, device and meter. Background Art

[0002] As gasification projects continue to expand, the popularity of gas meters is gradually increasing. At present, the most commonly used gas meters include membrane meters and electronic meters. Thermal meters are a type of electronic meter. During the use of gas meters, the time when users start or end use is usually random. Therefore, in order to accurately obtain the amount of natural gas used, it is usually necessary to obtain the flow rate flowing through the gas meter at each moment through continuous sampling, and then calculate the total flow rate through accumulation.

[0003] Thermal meters usually use the thermal principle to measure the gas flow through the meter. The meter can be a gas meter, etc. Based on the thermal principle, the meter uses a heat source to heat the gas, thereby generating a thermal field. The meter measures the temperature difference by using a high-precision temperature sensor installed upstream and downstream of the thermal field. The meter can determine the current flow value based on the temperature difference and the flow change law. In the prior art, in order to improve the accuracy of flow measurement, the meter usually increases the sampling frequency to improve the accuracy of flow measurement.

[0004] However, in the prior art, meters are usually powered by lithium batteries or alkaline batteries, so the service life of the meter is limited by the amount of electricity. Increasing the sampling frequency will inevitably increase the power consumption of the meter and reduce the battery life. Therefore, how to improve the metering accuracy while ensuring the service life of the meter has become an urgent problem to be solved. Summary of the invention

[0005] The present application provides a flow metering method, device and meter to solve the problem of how to improve the sampling accuracy of the meter while ensuring the service life of the meter, which has become an urgent problem to be solved.

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

[0007] S1, obtaining fine sampling data, wherein the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling cycle;

[0008] S2, obtaining coarse sampling data, wherein the coarse sampling data is determined by coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period includes at least one coarse sampling;

[0009] S3, after obtaining the coarse sampling data each time, determining the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period;

[0010] S4, when the fluctuation difference is greater than the fluctuation threshold, end the data sampling period and start the next data sampling period; when the fluctuation difference is less than or equal to the fluctuation threshold, return to S2;

[0011] S5. Measure the flow rate according to the fine sampling data.

[0012] Optionally, S3 includes:

[0013] Determine a coarse sampling average value based on all coarse sampling data within the data sampling period;

[0014] The fluctuation difference is determined according to the fine sampling data within the data sampling period and the coarse sampling average value.

[0015] Optionally, the S3 further includes:

[0016] Determine the maximum coarse sampling data and the minimum coarse sampling data according to all coarse sampling data in the data sampling period;

[0017] A fluctuation difference is determined according to the maximum coarse sampling data and the minimum coarse sampling data.

[0018] Optionally, the S5 further includes:

[0019] The flow rate is measured according to the preset metering frequency and the fine sampling data.

[0020] Optionally, the metering flow rate according to the preset metering frequency and the fine sampling data includes:

[0021] Determining the metering time and metering interval according to the preset metering frequency;

[0022] According to the metering moment, determining a data sampling period corresponding to the metering moment, wherein the metering moment is a moment in the data sampling period;

[0023] The flow rate is measured according to the fine sampling data in the data sampling period and the measurement interval.

[0024] Optionally, the method further includes:

[0025] Obtaining the duration of the data sampling period;

[0026] When the duration is greater than a preset duration, the data sampling period ends and the next data sampling period begins.

[0027] Optionally, also include:

[0028] When the fine sampling data is less than the first flow threshold, increasing the preset time length according to a preset algorithm;

[0029] When the fine sampling data is greater than a second flow threshold, the preset time length is shortened according to a preset algorithm.

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

[0031] A first acquisition module is used to acquire fine sampling data, wherein the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling period;

[0032] A second acquisition module is used to acquire coarse sampling data, wherein the coarse sampling data is determined by coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period includes at least one coarse sampling;

[0033] A determination module, configured to determine the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period after acquiring the coarse sampling data each time;

[0034] A judgment module, configured to end the data sampling period and start the next data sampling period when the fluctuation difference is greater than the fluctuation threshold; or return to S2 when the fluctuation difference is less than or equal to the fluctuation threshold;

[0035] The metering module is used to measure the flow rate according to the fine sampling data.

[0036] Optionally, the determination module is specifically used to determine a coarse sampling average value based on all coarse sampling data within the data sampling period; and determine a fluctuation difference based on the fine sampling data within the data sampling period and the coarse sampling average value.

[0037] Optionally, the determination module is specifically used to determine maximum coarse sampling data and minimum coarse sampling data according to all coarse sampling data in the data sampling period; and determine the fluctuation difference according to the maximum coarse sampling data and the minimum coarse sampling data.

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

[0039] Optionally, the metering module comprises:

[0040] A first determination submodule, used to determine the metering time and metering interval according to the preset metering frequency;

[0041] A second determining submodule is used to determine a data sampling period corresponding to the metering moment according to the metering moment, wherein the metering moment is a moment in the data sampling period;

[0042] The metering submodule is used to meter the flow rate according to the fine sampling data in the data sampling period and the metering interval.

[0043] Optionally, the device further includes:

[0044] A third acquisition module, used to acquire the duration of the data sampling period;

[0045] The judgment module is further configured to end the data sampling cycle and start the next data sampling cycle when the duration is greater than a preset duration.

[0046] Optionally, the judging module further includes:

[0047] An increasing submodule, when the fine sampling data is less than the first flow threshold, increasing the preset time length according to a preset algorithm;

[0048] The reduction submodule reduces the preset time length according to a preset algorithm when the fine sampling data is greater than a second flow threshold.

[0049] In a third aspect, the present application provides a meter, comprising: a memory and a processor, wherein the memory stores flow metering instructions, and when the flow metering instructions are executed by the processor, the steps of the flow metering method in the first aspect and any possible design of the first aspect are implemented.

[0050] In a fourth aspect, the present application provides a readable storage medium, in which execution instructions are stored. When at least one processor of the meter executes the execution instruction, the meter executes the flow metering method in the first aspect and any possible design of the first aspect.

[0051] In a fifth aspect, the present application provides a computer instruction, which, when executed by a processor, is used to implement the flow metering method in the first aspect and any possible design of the first aspect.

[0052] The flow metering method, device and meter provided in the present application perform a fine sampling at the beginning of each data sampling cycle; the fine sampling obtains fine sampling data; the fine sampling data is used to accurately measure the flow at that moment; after the fine sampling is completed, coarse sampling is performed according to the coarse sampling frequency of coarse sampling; coarse sampling data is obtained through coarse sampling; after each acquisition of coarse sampling data, the fluctuation difference is calculated using the fine sampling data and the coarse sampling data; the fluctuation difference and the fluctuation threshold are compared; when it is determined after comparison that the fluctuation difference is greater than the fluctuation threshold, the current data sampling cycle is ended and the next data sampling cycle is started; when the fluctuation difference is less than or equal to the fluctuation threshold, the data sampling cycle is stayed and the next coarse sampling is performed according to the coarse sampling frequency; the total flow is updated according to the preset metering frequency and the fine sampling data, so as to reduce the power consumption of the meter on the basis of ensuring the measurement accuracy of the flow value. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0054] Figure 1 A schematic diagram of the measurement principle of a thermal meter provided in one embodiment of the present application;

[0055] Figure 2 A flow chart of a flow metering method provided in one embodiment of the present application;

[0056] Figure 3 A schematic diagram of a first sampling period provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of the structure of a flow metering device provided in one embodiment of the present application;

[0058] Figure 5 A schematic diagram of the structure of another flow metering device provided in one embodiment of the present application;

[0059] Figure 6 A schematic diagram of the hardware structure of a meter provided in one embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] As gasification projects continue to expand, the popularity of gas meters is gradually increasing. The most commonly used gas meters include membrane meters and electronic meters. A thermal meter is an electronic meter that uses the thermal principle for measurement. For gas meters, water meters, flow meters and other meters, when the flow measurement principle is the thermal principle, the meter can heat the surrounding gas through a heat source to generate a thermal field, and then measure the temperature difference through high-precision temperature sensors upstream and downstream. The thermal meter can calculate the current flow value based on the temperature difference and the change law of the flow.

[0062] During the use of the meter, the time when the user starts or ends the use is usually random. Therefore, in order to accurately obtain the amount of natural gas used, continuous sampling is usually used to obtain the gas flow in the meter at each moment, thereby cumulatively measuring the amount of natural gas used. During the natural gas metering process, the higher the sampling frequency, the higher the accuracy of the flow measurement. If the frequency is reduced, the corresponding flow measurement accuracy will decrease.

[0063] However, currently, the energy source of the meter is usually lithium battery or alkaline battery. That is to say, the energy of the meter is usually limited. In other words, during the use of the meter, as the sampling frequency increases, the service life of the battery in the meter will also be shortened. Therefore, how to balance the battery life and the sampling frequency of the meter has become a concern. In view of this concern, how to improve the metering sampling accuracy of the meter while ensuring the battery life has become an urgent problem to be solved.

[0064] In response to this problem, the present application proposes a flow metering method. In the present application, according to the flow metering characteristics of the thermal meter, engineers divide the flow collection methods of the thermal meter into two types: fine sampling and coarse sampling. Among them, fine sampling is a conventional sampling method. During the sampling process, the heating time of its heating element is determined according to the standard time. Among them, coarse sampling reduces the power consumption of sampling by reducing the heating time of the heating element. Inevitably, coarse sampling sacrifices the accuracy of measurement while achieving low power consumption. In the present application, engineers set up fine sampling so that the meter can accurately obtain the gas flow through fine sampling. The meter uses the fine sampling data to measure the flow. At the same time, by setting up coarse sampling, engineers can achieve high-frequency monitoring of the gas flow, and judge whether there is a large fluctuation in the flow in the meter and whether the fine sampling data needs to be re-measured.

[0065] The technical solution of the present application is described in detail with specific embodiments below. 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.

[0066] Figure 1 A schematic diagram of the metering principle of a thermal meter provided by an embodiment of the present application is shown. As shown in the figure, a section of a gas pipeline in a thermal meter is installed with a flow test assembly. A sensor is installed below the gas pipeline, and each element in the sensor is installed on a sensor substrate. The sensor includes an upstream temperature measuring element, a downstream temperature measuring element and a heating element.

[0067] Thermal meters usually use the thermal principle to measure the gas flow through the meter. The meter heats the heating element to increase the temperature in the pipeline. The meter measures the change in 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 there is no gas flowing through the gas pipeline, the two temperature sensors are in the same temperature field and measure the same temperature. When gas flows through the gas pipeline, the temperature field will shift with the flow of gas. At this time, there is a difference in the temperature measured by the two temperature sensors. After obtaining the temperature of the two temperature sensors, the meter can calculate the current flow value based on the temperature difference and the change law of the flow.

[0068] In this application, engineers divide the sampling of gas flow into fine sampling and coarse sampling. Among them, the heating time of fine sampling is determined according to the standard data of the thermal meter. The heating time of coarse sampling is determined by engineers according to the working conditions of the thermal meter. The heating time of coarse sampling is shorter than that of fine sampling. Coarse sampling achieves the effect of reducing power consumption by reducing the heating time.

[0069] In this application, the flow metering method of the following embodiments is executed with the meter as the execution subject. Specifically, the meter may include a thermal gas meter, a thermal flow meter and other instruments, and the execution subject may be a hardware device of the meter, or a processor in the meter that implements the following embodiments.

[0070] Figure 2 A flow chart of a flow metering method provided by an embodiment of the present application is shown. Figure 1 Based on the embodiment shown, Figure 2 As shown, with the meter as the execution subject, the method of this embodiment may include the following steps:

[0071] S101, obtaining 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 cycle.

[0072] In this embodiment, during the use of the meter, accurate measurement of the flow in the meter is achieved through fine sampling. The sampling period of the fine sampling is the data sampling period. The data sampling period is a dynamically changing range. The range is determined based on experience, for example, the range can be 30 seconds to 3 minutes.

[0073] In each data sampling cycle, a fine sampling is performed at the beginning of the data sampling cycle. The data sampling cycle and its fine sampling can be as follows: Figure 3 As shown. This fine sampling obtains fine sampling data. The fine sampling data is used to accurately measure the flow in the meter at that time.

[0074] S102, obtaining coarse sampling data, the coarse sampling data is determined by coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period includes at least one coarse sampling.

[0075] In this embodiment, after completing the fine sampling of S101, the meter starts to perform coarse sampling according to the coarse sampling frequency of coarse sampling. The execution of the coarse sampling can be as follows: Figure 3 The coarse sampling frequency is a fixed value, and its specific value is determined based on experience. For example, when the coarse sampling period is 2 seconds, the meter performs coarse sampling 2 seconds after the fine sampling ends. Alternatively, the meter starts the next coarse sampling 2 seconds after the last coarse sampling ends.

[0076] The meter obtains coarse sampling data through coarse sampling. The coarse sampling data is used to measure the flow in the meter at that time. Compared with the fine sampling data, the coarse sampling data has a certain error, so the coarse sampling data is used to monitor whether the flow of the meter changes.

[0077] S103 , after obtaining the coarse sampling data each time, determine the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period.

[0078] In this embodiment, after the meter obtains 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 uses the fine sampling data and the coarse sampling data to calculate the fluctuation difference, and makes a judgment based on the fluctuation difference.

[0079] The calculation method of the fluctuation difference may include the following examples:

[0080] In one example, the fluctuation difference can be calculated based on the coarse sampling average value and the fine sampling data, and the calculation process may include the following steps:

[0081] Step 1: Determine the rough sampling average value based on all rough sampling data within the data sampling period.

[0082] Step 2: Determine the fluctuation difference based on the fine sampling data and the coarse sampling average value within the data sampling period.

[0083] In this step, the meter calculates the absolute value of the difference between the fine sampling data and the rough sampling average value, and determines the absolute value of the difference as the fluctuation difference.

[0084] In another example, the fluctuation difference may be calculated based on the maximum and minimum values ​​in the coarse sampling data, and the process may include:

[0085] Step 1: Determine the maximum coarse sampling data and the minimum coarse sampling data according to all coarse sampling data in the data sampling period.

[0086] Step 2: Determine the fluctuation difference based on the maximum coarse sampling data and the minimum coarse sampling data.

[0087] In this step, the meter calculates the absolute value of the difference between the maximum coarse sampling data and the minimum coarse sampling data, and determines the absolute value of the difference as the fluctuation difference.

[0088] In another example, the meter may use the above two methods to calculate the fluctuation difference of the data sampling period. When one of the two fluctuation differences is greater than the fluctuation threshold, the meter may execute the step shown in S104.

[0089] S104: When the fluctuation difference is greater than the fluctuation threshold, the data sampling period ends and the next data sampling period begins. When the fluctuation difference is less than or equal to the fluctuation threshold, the process returns to S102.

[0090] In this embodiment, after determining the fluctuation difference, the meter compares the fluctuation difference with the fluctuation threshold. The fluctuation threshold is an empirical value. When the fluctuation difference is greater than the fluctuation threshold, the cause of the fluctuation difference is no longer the error of coarse sampling, but the flow change in the meter.

[0091] When the meter determines that the fluctuation difference is greater than the fluctuation threshold after comparison, the meter ends the current data sampling cycle and starts the next data sampling cycle. When the fluctuation difference is less than or equal to the fluctuation threshold, the meter stays in the data sampling cycle and performs the next coarse sampling according to the coarse sampling frequency.

[0092] S105. Measure the flow rate according to the precise sampling data.

[0093] In this embodiment, the meter can measure the flow of the meter according to the precise sampling data determined in the above steps.

[0094] In one example, the meter can measure flow rate according to a preset metering frequency and precise sampling data.

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

[0096] Step 1: Determine the metering time and metering interval according to the preset metering frequency.

[0097] In this step, the preset metering frequency is an empirical value, and engineers can adjust the preset metering frequency according to actual needs. For example, the preset metering frequency is 2 seconds / time, the metering time can be the 2nd second, the 4th second, the 6th second, the 8th second, and the metering interval is 2 seconds.

[0098] Step 2: Determine the data sampling period corresponding to the metering time according to the metering time, where the metering time is a moment in the data sampling period.

[0099] In this step, the meter starts to perform the flow metering operation when the metering time is reached. After reaching the metering time, the meter first determines the data collection cycle of the metering time. For example, the first data collection cycle starts at the 0th second, the second data collection cycle starts at the 7th second, and the third data collection cycle starts at the 15th second. Among them, the metering times of the 2nd, 4th, and 6th seconds are in the first data sampling cycle, the 8th, 10th, 12th, and 14th seconds are in the second data sampling cycle, and the 16th second is in the third data sampling cycle.

[0100] Step 3: Measure the flow rate according to the precise sampling data and the metering interval in the data sampling period.

[0101] In this step, the meter determines the fine sampling data corresponding to the data sampling period according to the data sampling period. Then, the meter calculates the flow rate flowing through the meter within the metering interval according to the fine sampling data and the metering interval. The meter accumulates the flow rate flowing through the meter within the metering interval on the basis of the total flow rate of the meter when the metering moment is reached, and obtains the updated total flow rate of the meter at the metering moment. The meter updates the updated total flow rate to the display interface of the meter to realize the metering of the flow rate.

[0102] The flow metering method provided by the present application is that in each data sampling cycle, the meter performs a fine sampling at the moment when the data sampling cycle starts. This fine sampling obtains fine sampling data. The fine sampling data is used to accurately measure the flow in the meter at that moment. After completing the fine sampling, the meter starts to perform coarse sampling according to the coarse sampling frequency of coarse sampling. The meter obtains coarse sampling data through coarse sampling. After each acquisition of coarse sampling data, the meter uses the fine sampling data and the coarse sampling data to calculate the fluctuation difference. The meter compares the fluctuation difference with the fluctuation threshold. When the meter determines that the fluctuation difference is greater than the fluctuation threshold after comparison, the meter ends the current data sampling cycle and starts the next data sampling cycle. When the fluctuation difference is less than or equal to the fluctuation threshold, the meter stays in the data sampling cycle and performs the next coarse sampling according to the coarse sampling frequency. The meter can realize the meter flow measurement based on the fine sampling data determined in the above steps. In the present application, the flow of the meter is accurately obtained by using fine sampling, and the change of the flow in the meter is monitored by coarse sampling, so that the power consumption of the meter is reduced on the basis of ensuring the measurement accuracy of the flow value, so that the meter only needs to accurately measure the flow value when the flow changes, without the need to obtain the precise flow value in real time.

[0103] On the basis of the above embodiments, this embodiment can also end the data sampling cycle when the data sampling cycle reaches a preset time length, so as to improve the validity of the fine sampling data and achieve the effect of improving the calculation accuracy of the total flow. With the meter as the execution subject, the specific steps may include:

[0104] Step 1: Get the duration of the data sampling period.

[0105] In this step, the meter can also monitor the duration of each data sampling cycle.

[0106] Step 2: When the duration is greater than the preset duration, the data sampling cycle ends and the next data sampling cycle begins.

[0107] In this step, the meter can compare the duration with the preset duration according to the preset frequency. When the meter determines that the duration of the data sampling period is greater than the preset duration, the data sampling period ends. The meter starts the next data sampling period, thereby ensuring the effective duration of the fine sampling data and improving the effectiveness of the fine sampling data.

[0108] The preset frequency may be a comparison frequency determined by engineers based on experience.

[0109] The preset duration is the sampling period of the data sampling period. Since the sampling period is a dynamically changing range, the preset duration is an adjustable duration. The duration can be adjusted according to the following steps:

[0110] Step 2.1: When the fine sampling data is less than the first flow threshold, increase the preset time length according to the preset algorithm.

[0111] In this step, the meter can also increase the preset time when the flow is small or there is no flow. At this time, the meter increases the preset time to reduce the number of fine sampling executions and reduce the power consumption of the meter.

[0112] The first flow threshold is a relatively small flow value. When the fine sampling data is smaller than the first flow threshold, the meter may consider that the flow is almost zero.

[0113] The preset algorithm may be to increase the preset duration in proportion. For example, when the preset duration needs to be increased, the calculation formula for the new preset duration may be:

[0114] Preset duration = Preset duration × a

[0115] Here, a is a value greater than 1, for example, 1.1.

[0116] Alternatively, the preset algorithm may be to quantitatively increase the preset duration. For example, when the preset duration needs to be increased, the calculation formula for the new preset duration may be:

[0117] Preset duration = preset duration + b

[0118] Here, b is a positive number, such as 2 seconds, 1 minute, etc.

[0119] Step 2.1: When the fine sampling data is greater than the second flow threshold, the preset time length is shortened according to a preset algorithm.

[0120] In this step, when the flow rate of the meter is large, the meter can also shorten the preset time. At this time, shortening the preset time can increase the fine sampling frequency of the meter when the flow rate is large, and improve the metering accuracy of the meter during this period.

[0121] The second flow threshold is a relatively large flow value.

[0122] The preset algorithm may be to reduce the preset duration in proportion. For example, when the preset duration needs to be increased, the calculation formula for the new preset duration may be:

[0123] Preset duration = Preset duration × a

[0124] Here, a is a value less than 1, such as 0.8.

[0125] Alternatively, the preset algorithm may be to quantitatively reduce the preset duration. For example, when the preset duration needs to be reduced, the calculation formula for the new preset duration may be:

[0126] Preset duration = Preset duration - b

[0127] Here, b is a positive number, such as 2 seconds, 1 minute, etc.

[0128] In the flow metering method provided by the present application, the meter can also monitor the duration of each data sampling cycle. The meter can compare the duration and the preset duration according to the preset frequency. When the meter determines that the duration of the data sampling cycle is greater than the preset duration, the data sampling cycle is ended. The meter can also increase the preset duration when the flow is small or there is no flow. When the flow of the meter is large, the meter can also reduce the preset duration. In the present application, by comparing the duration of the data sampling cycle with the preset duration, the sampling frequency of the data sampling cycle is ensured, the continuous use time of a fine sampling data is avoided, and the validity of the fine sampling data is improved. At the same time, the present application adjusts the preset duration according to the fine sampling data, so that the meter reduces the fine sampling frequency at a lower flow rate, thereby further reducing power consumption. When the flow rate is high, the meter increases the fine sampling frequency to reduce it, thereby further improving the accuracy of measurement.

[0129] Figure 4 A schematic diagram of the structure of a flow metering device provided in an embodiment of the present application is shown. Figure 4 As shown, the flow metering device 10 of this embodiment is used to implement the operation corresponding to the meter in any of the above method embodiments. The flow metering device 10 of this embodiment includes:

[0130] The first acquisition module 11 is used to acquire fine sampling data. The fine sampling data is determined by fine sampling. Fine sampling is performed once at the beginning of each data sampling period.

[0131] The second acquisition module 12 is used to acquire coarse sampling data. The coarse sampling data is determined by coarse sampling. The sampling frequency of the coarse sampling is determined according to the coarse sampling frequency. The data sampling period includes at least one coarse sampling.

[0132] The determination module 13 is used to determine the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period after acquiring the coarse sampling data each time.

[0133] The judgment module 14 is used to end the data sampling cycle and start the next data sampling cycle when the fluctuation difference is greater than the fluctuation threshold, or return to S2 when the fluctuation difference is less than or equal to the fluctuation threshold.

[0134] The metering module 15 measures the flow rate according to the fine sampling data.

[0135] In one example, the determination module 13 is specifically used to determine the coarse sampling average value according to all the coarse sampling data in the data sampling period, and to determine the fluctuation difference according to the fine sampling data and the coarse sampling average value in the data sampling period.

[0136] In another example, the determination module 13 is specifically used 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 to determine the fluctuation difference according to the maximum coarse sampling data and the minimum coarse sampling data.

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

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

[0139] The first determination submodule 151 is used to determine the metering time and metering interval according to a preset metering frequency.

[0140] The second determining submodule 152 is used to determine the data sampling period corresponding to the metering time according to the metering time, where the metering time is a moment in the data sampling period.

[0141] The metering submodule 153 is used to meter the flow rate according to the fine sampling data and the metering interval in the data sampling period.

[0142] The flow metering device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.

[0143] Figure 5 A schematic diagram of the structure of another flow metering device provided in an embodiment of the present application is shown. Figure 4 Based on the embodiment shown, Figure 5 As shown, the flow metering device 10 of this embodiment is used to implement the operation corresponding to the meter in any of the above method embodiments. The flow metering device 10 of this embodiment also includes:

[0144] The third acquisition module 16 is used to acquire the duration of the data sampling period.

[0145] The judgment module 14 is further configured to end the data sampling cycle and start the next data sampling cycle when the duration is greater than a preset duration.

[0146] In one example, the determination module 14 further includes:

[0147] The increasing submodule 141 is used to increase the preset time length according to a preset algorithm when the fine sampling data is less than the first flow threshold.

[0148] The reduction submodule 142 is used to reduce the preset time length according to a preset algorithm when the fine sampling data is greater than the second flow threshold.

[0149] The flow metering device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.

[0150] Figure 6 FIG. 1 shows a schematic diagram of the hardware structure of a meter provided in an embodiment of the present application. Figure 6 As shown, the meter 20 is used to implement the operation corresponding to the meter in any of the above method embodiments. The meter 20 of this embodiment may include: a memory 21 and a processor 22.

[0151] The memory 21 is used to store computer programs. The memory 21 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk.

[0152] The processor 22 is used to execute the computer program stored in the memory to implement the flow metering method in the above embodiment. For details, please refer to the relevant description in the above method embodiment.

[0153] Optionally, the memory 21 may be independent or integrated with the processor 22 .

[0154] The meter provided in this embodiment can be used to execute the above-mentioned flow metering method, and its implementation method and technical effect are similar, which will not be described in detail in this embodiment.

[0155] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the methods provided in the various embodiments described above.

[0156] The present application also provides a program product, which includes an execution instruction, which is stored in a computer-readable storage medium. At least one processor of the device can read the execution instruction from the computer-readable storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the various embodiments described above.

[0157] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0158] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0160] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0161] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned 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. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments can still be modified, or some or all of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A flow metering method, applied to a thermal meter, wherein the flow collection method of the thermal meter is divided into two types: coarse sampling and fine sampling, and the heating time of the coarse sampling is shorter than the heating time of the fine sampling, characterized in that: The method comprises: S1, obtaining fine sampling data, wherein the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling cycle; S2, obtaining coarse sampling data, wherein the coarse sampling data is determined by coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period includes at least one coarse sampling; S3, after obtaining the coarse sampling data each time, determining the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period; S4, when the fluctuation difference is greater than the fluctuation threshold, end the data sampling period and start the next data sampling period; when the fluctuation difference is less than or equal to the fluctuation threshold, return to S2; S5. Measuring flow rate according to the fine sampling data; The method further comprises: When the fine sampling data is less than the first flow threshold, according to a preset algorithm, the preset time length is increased, and the preset time length is the sampling period of the data sampling period; When the fine sampling data is greater than a second flow threshold, the preset time length is shortened according to a preset algorithm.

2. The method according to claim 1, characterized in that The S3 includes: Determine a coarse sampling average value based on all coarse sampling data within the data sampling period; The fluctuation difference is determined according to the fine sampling data within the data sampling period and the coarse sampling average value.

3. The method according to claim 1, characterized in that: The S3 further includes: Determine the maximum coarse sampling data and the minimum coarse sampling data according to all coarse sampling data in the data sampling period; A fluctuation difference is determined according to the maximum coarse sampling data and the minimum coarse sampling data.

4. The method according to claim 1, characterized in that: The S5 further includes: The flow rate is measured according to the preset metering frequency and the fine sampling data.

5. The method according to claim 4, characterized in that Measuring the flow rate according to the preset metering frequency and the fine sampling data includes: Determining the metering time and metering interval according to the preset metering frequency; According to the metering moment, determining a data sampling period corresponding to the metering moment, wherein the metering moment is a moment in the data sampling period; The flow rate is measured according to the fine sampling data in the data sampling period and the measurement interval.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining the duration of the data sampling period; When the duration is greater than a preset duration, the data sampling period ends and the next data sampling period begins.

7. A flow metering device, applied to a thermal meter, wherein the flow collection mode of the thermal meter is divided into two types: coarse sampling and fine sampling, and the heating time of the coarse sampling is shorter than the heating time of the fine sampling, characterized in that: The device comprises: A first acquisition module is used to acquire fine sampling data, wherein the fine sampling data is determined by fine sampling, and fine sampling is performed once at the beginning of each data sampling period; A second acquisition module is used to acquire coarse sampling data, wherein the coarse sampling data is determined by coarse sampling, the sampling frequency of the coarse sampling is determined according to the coarse sampling frequency, and the data sampling period includes at least one coarse sampling; A determination module, configured to determine the fluctuation difference according to the fine sampling data and / or the coarse sampling data within the data sampling period after acquiring the coarse sampling data each time; A judgment module, configured to end the data sampling period and start the next data sampling period when the fluctuation difference is greater than the fluctuation threshold; and return to S2 when the fluctuation difference is less than or equal to the fluctuation threshold; A metering module, used for measuring flow rate according to the fine sampling data; The judgment module is also used to increase the preset time length according to a preset algorithm when the fine sampling data is less than the first flow threshold, and the preset time length is the sampling period of the data sampling period; when the fine sampling data is greater than the second flow threshold, the preset time length is shortened according to the preset algorithm.

8. A meter, characterized in that: The meter comprises: a memory and a processor, wherein the memory stores flow metering instructions, and the flow metering instructions are used to implement the steps of the flow metering method according to any one of claims 1 to 6 when executed by the processor.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the flow metering method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises computer instructions, which are used to implement the flow metering method according to any one of claims 1 to 6 when executed by a processor.