Gradient color turntable signal acquisition meter and automatic calibration method and system thereof

By obtaining the AD sampling value of the gradient color turntable reflection and calculating the number of air-running pulses, the critical threshold is automatically calibrated, which solves the metering problem caused by ambient temperature changes and improves the measurement accuracy of the gas meter.

CN119245776APending Publication Date: 2025-01-03ZHEJIANG WEIXING INTELLIGENT METER STOCK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411329350.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The gradient color turntable meter is misaligned due to changes in ambient temperature, which affects the measurement accuracy of the gas meter.

Method used

By obtaining the AD sample values ​​of the periodic variation of the reflectance amount of the gradient color turntable, the number of air-flow pulses is calculated, and the refining threshold is obtained based on these values, and the critical threshold is automatically calibrated to improve metrological accuracy.

Benefits of technology

Automatic calibration of the gradient color turntable meter is realized, reducing the impact of ambient temperature changes on the measurement accuracy, and improving the measurement accuracy of the gas meter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119245776A_ABST
    Figure CN119245776A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a gradient color rotating disc signal acquisition meter and an automatic calibration method and system thereof. The automatic calibration method comprises the following steps: acquiring a critical threshold value; acquiring a plurality of first AD sampling values which are periodically changed and correspond to the reflection quantity of the gradient color turntable within a first preset time; obtaining a first gas passing pulse number based on a plurality of first AD sampling values which change periodically in a first preset time and a critical threshold value; when the first gas passing pulse number is larger than a first preset value, an AD sampling maximum value and an AD sampling minimum value corresponding to each periodic change in first preset time are obtained, and a first refinement threshold value is obtained based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change; and taking the first refinement threshold value as a new critical threshold value. The critical threshold value can be automatically calibrated, so that the metering error generated by the AD sampling value interval along with the change of the environment temperature is eliminated, and the metering accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Multiple embodiments of the present specification relate to the field of meter measurement technology, and specifically to a gradient color dial signal meter and an automatic calibration method and system thereof. Background Art

[0002] With the popularization of smart gas meters, higher requirements are put forward for the accuracy of smart gas meter readings and the performance of gas meters. At present, there are three main ways for smart diaphragm gas meters to measure and sample: Hall signal acquisition, reed switch signal acquisition and photoelectric direct reading counter signal acquisition. However, the above three methods are easily affected by the outside world. Hall signal acquisition and reed switch signal acquisition are easily affected by external magnetic fields, resulting in sampling problems; photoelectric direct reading counter signal acquisition is easily affected by external ambient light, resulting in sampling problems.

[0003] In the prior art, in order to avoid the interference problems existing in the above sampling methods, intelligent membrane gas meters that use gradient color dials to obtain signals have emerged. For example, the Chinese invention patent with patent number CN113819961A counts the gas flow rate through a gradient color dial. The gradient color dial is usually a round disc with gradient color marks on it. One or more optical sensors are installed inside the gas meter, which usually include a light emitting tube and a light receiving tube. The light emitting tube emits light, and the light receiving tube receives light reflected or transmitted by the gradient color dial. When the gas passes through the gas meter, it drives the gradient color dial to rotate. As the gradient color dial rotates, the light signal received by the light emitting tube will change according to the different colors or patterns on the gradient color dial. For example, when the sensor is aimed at the white area, the received light intensity is stronger; when it is aimed at the black area, the received light intensity is weaker. The light emitting tube converts the optical signal into an electrical signal, and after the electrical signal is amplified and processed, a pulse signal can be obtained. Each transition of the color boundary will generate a pulse. Based on the number of pulses and the pulse amplitude, the angle of the gradient color turntable can be accurately known, and the gas usage can be calculated.

[0004] However, since the principle of the gradient color dial to obtain signals is based on the light receiving tube receiving the changes in the reflection amount of different positions of the gradient color dial, and the sampling value of the light receiving tube is also affected by the ambient temperature, this will cause problems in the calculated rotation angle of the gradient color dial, thereby affecting the accuracy of the gas meter measurement. Summary of the invention

[0005] The embodiment of this specification provides a meter with a gradient color dial for obtaining information and an automatic calibration method and system thereof, which solves the problem of meter inaccuracy caused by ambient temperature changes in meters using a gradient color dial for obtaining information. The technical solution is as follows: In a first aspect, an embodiment of the present specification provides an automatic calibration method for a gradient color dial signal meter, comprising: Get critical threshold value; Acquire a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; Acquire the first number of gas leakage pulses based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold; When the first number of gas pulses is greater than the first preset value, the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time are obtained, and the first fine-tuning threshold is obtained based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and the first fine-tuning threshold is used as the new critical threshold.

[0006] As a preferred solution, before obtaining a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within the first preset time and showing periodic changes, the method further includes: Acquire multiple second AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a second preset time and showing periodic changes; Acquire the second gas leakage pulse quantity based on a plurality of second AD sampling values ​​that change periodically within a second preset time and a critical threshold; When the number of the second gas pulses is zero, and the difference between the maximum AD sampling value and the minimum AD sampling value of all the second AD sampling values ​​that change periodically within the second preset time is greater than the first preset difference, a rough trimming threshold is obtained based on the maximum AD sampling value and the minimum AD sampling value, and the rough trimming threshold is used as a new critical threshold; The second preset time is shorter than the first preset time.

[0007] As a preferred solution, when the number of the first gas pulses is zero, the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time are obtained; Based on the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change, the extreme value difference corresponding to each periodic change is obtained; When the number of differences greater than the first preset difference among all extreme value differences is greater than the second preset value, a second refined threshold is obtained based on the AD sampling maximum and AD sampling minimum corresponding to each periodic change, and the second refined threshold is used as the new critical threshold.

[0008] As a preferred solution, the method of obtaining the first number of gas leakage pulses based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold value includes: Respectively obtain the magnitude relationship between a plurality of first AD sampling values ​​and the critical threshold value; Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, the first gas leakage pulse quantity is obtained.

[0009] As a preferred solution, the method of obtaining the first number of gas leakage pulses based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold value includes: Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, obtaining a change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold; The number of first gas leakage pulses is obtained based on the change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold.

[0010] As a preferred solution, the method of obtaining a first refined threshold value based on the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change, and using the first refined threshold value as a new critical threshold value, includes: The maximum average value is obtained based on the maximum AD sampling value corresponding to each periodic change; The minimum average value is obtained based on the minimum AD sampling value corresponding to each periodic change; A first refined threshold is obtained based on the maximum average value and the minimum average value, and the first refined threshold is used as a new critical threshold.

[0011] As a preferred solution, obtaining the first refinement threshold based on the maximum average value and the minimum average value includes: Calculate the average of the maximum mean value and the minimum mean value to obtain the corrected target value; Calculate the average of the AD sampling maximum value and the AD sampling minimum value corresponding to the last periodic change among the plurality of first AD sampling values ​​that change periodically within the first preset time to obtain a corrected control value; When the difference between the corrected target value and the corrected control value is greater than the third preset difference, the first fine-tuning threshold is the corrected control value; When the difference between the corrected target value and the corrected control value is less than or equal to the third preset difference, the first fine-tuning threshold is the corrected target value.

[0012] As a preferred solution, when the number of the first gas leakage pulses is less than or equal to the first preset value and is not zero, the critical threshold is kept unchanged.

[0013] In a second aspect, the embodiments of this specification provide an automatic calibration system for a gradient color dial signal meter, comprising: an acquisition unit, a counting unit, and a correction unit; The acquisition unit acquires a critical threshold and a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; The counting unit obtains the first gas leakage pulse quantity based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold value; The correction unit, when the first gas pulse number is greater than the first preset value, obtains the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time, and obtains the first refined threshold value based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and uses the first refined threshold value as the new critical threshold value.

[0014] In a third aspect, the embodiments of this specification provide a gradient color dial signal meter, including: Calibration module and metrology module; The calibration module adopts the automatic calibration method of the gradient color dial signal meter as described in the first aspect of the embodiment to obtain a first refined threshold value, and uses the first refined threshold value as a new critical threshold value; The metering module counts the gas flow rate based on the new critical threshold.

[0015] In a fourth aspect, an embodiment of this specification provides an electronic device, comprising a processor and a memory; the processor is connected to the memory; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps described in the first aspect of the above embodiment.

[0016] In a fifth aspect, an embodiment of this specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps described in the first aspect of the above embodiment.

[0017] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: According to the multiple first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable in the first preset time and the current critical threshold, the first number of gas pulses is obtained. When the first number of gas pulses meets the correction condition, the first fine-tuning threshold is obtained based on the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change, and the first fine-tuning threshold is used as the new critical threshold. The angle of the gradient color turntable is judged by the corrected critical threshold as a reference, and when the AD sampling value fluctuation problem of the gradient color turntable is caused by the change of ambient temperature, it can make an automatic judgment and automatically calibrate, so as to improve the measurement accuracy of the gradient color turntable.

[0018] According to the multiple second AD sampling values ​​corresponding to the periodic change of the reflection amount of the gradient color dial within the second preset time shorter than the first preset time and the current critical threshold, the second gas pulse number is obtained. When the second gas pulse number is zero, a rough adjustment threshold is obtained based on the maximum AD sampling value and the minimum AD sampling value, and the rough adjustment threshold is used as the new critical threshold. First, ensure that the gradient color dial signal meter can correctly collect the meter pulse (that is, the critical threshold is within the AD sampling value interval) and count, and then perform the above-mentioned step of fine adjustment of the critical threshold, so as to quickly resolve the situation where the gradient color dial signal meter cannot collect the meter pulse and count when the ambient temperature changes greatly. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 It is a comparison chart of the AD sampling value curves showing periodic changes obtained by sampling the reflection amount of the gradient color turntable at two different temperatures when the user uses gas; Figure 2 It is a schematic diagram of the case where the AD sampling value interval obtained by the light receiving tube changes with the temperature, and the critical threshold value is still within the AD sampling value interval but is not the median value of the AD sampling value interval; Figure 3 It is a flow chart of an automatic calibration method of a gradient color dial signal meter provided in an embodiment of this specification; Figure 4 It is a schematic diagram of the AD sampling value interval obtained by the light receiving tube after it changes with temperature, and the critical threshold is outside the AD sampling value interval; Figure 5 It is a structural schematic diagram of an automatic calibration system for a gradient color dial signal meter provided in an embodiment of this specification; Figure 6 It is a structural schematic diagram of a gradient color turntable signal meter provided in an embodiment of this specification; Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of this specification will be described clearly and completely below in conjunction with the drawings in the embodiments of this specification.

[0022] The terms "first", "second", "third", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0023] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present specification. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described with respect to some examples may be combined in other examples.

[0024] The principle of the gradient color dial signal meter is to use a light receiving tube to sample the reflection of the gradient color dial to obtain an AD sampling value curve, and judge the angle of rotation of the corresponding gradient color dial according to the periodic AD sampling value curve to achieve the measurement of the gas flow. However, the AD sampling value actually sampled by the light receiving tube will be affected by the ambient temperature, that is, the AD sampling value range obtained by the light receiving tube sampling the reflection of the gradient color dial under different ambient temperatures will change, resulting in problems with the calculated rotation angle of the gradient color dial, thereby affecting the accuracy of the gas flow measurement. Figure 1 As shown, Figure 1 This is a comparison chart of the AD sampling value curves showing periodic changes obtained by sampling the reflection amount of the gradient color turntable at two different temperatures when the user uses gas.

[0025] In multiple embodiments of the present specification: a critical threshold is set in advance as a reference for the AD sampling value to determine the rotation angle of the gradient color turntable. Ideally, the size of the critical threshold is set to the median of the AD sampling value interval obtained by sampling the light receiving tube. When the ambient temperature changes, the AD sampling value interval obtained by sampling the light receiving tube changes accordingly, while the critical threshold remains unchanged. The critical threshold deviates from the median position of the AD sampling value interval, resulting in an error in determining the rotation angle of the gradient color turntable, thereby causing a deviation in the gas flow measured by the gradient color turntable signal meter.

[0026] Reference Figure 2 As shown, Figure 2This is a schematic diagram of a situation where the AD sampling value interval obtained by sampling the light receiving tube changes with temperature, and the critical threshold is still within the AD sampling value interval but is not the median of the AD sampling value interval. At this time, the critical threshold needs to be corrected.

[0027] Reference Figure 3 As shown, Figure 3 A flowchart of an automatic calibration method for a gradient color dial signal meter provided in one embodiment of the present specification may include at least the following steps: Step 202: Obtain a critical threshold value; Step 204, obtaining a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; Step 206, obtaining the first gas leakage pulse quantity based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold; Step 208, when the first number of gas pulses is greater than the first preset value, obtain the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time, and obtain a first refined threshold based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and use the first refined threshold as the new critical threshold.

[0028] For illustration, the gradient dial signal meter is configured with a critical threshold value by default when it leaves the factory. After the gradient dial signal meter is turned on, the above automatic calibration steps are automatically performed, and the above automatic calibration steps can be repeated when the preset time interval is reached to achieve dynamic calibration.

[0029] In a complete automatic calibration step, the current critical threshold of the gradient color dial signal meter is first obtained. If the critical threshold has not been corrected, it is the critical threshold configured by default at the factory. If it has been corrected, it is the new critical threshold after correction.

[0030] According to the solution disclosed in the Chinese invention patent with patent number CN113819961A, the light receiving tube continuously samples the reflection amount of the gradient color turntable for a first preset time to obtain a plurality of first AD sampling values ​​that change periodically.

[0031] According to the multiple first AD sampling values ​​that change periodically within the first preset time and the critical threshold, the first gas leakage pulse number can be obtained, and the size of the first gas leakage pulse number compared with the first preset value can be judged. Among them, the first preset value is set according to the length of the set first preset time, and is used to judge whether the number of collected samples is sufficient. When the first gas leakage pulse number is greater than the first preset value, it is considered that the collected sample data is sufficient, and the automatic calibration step can continue to be performed. For example: within the first preset time, the user continues to use gas, and the number of gas leakage pulses that can be collected is 50, and when the number of gas leakage pulses that is more than 60% of the collectible amount is collected, it is considered that the number of samples is sufficient, and the first preset value is set to a value less than 30.

[0032] When the first number of gas pulses is less than or equal to the first preset value, it is considered that the collected sample data is too little and not representative. If too little sampling data is used as the basis for subsequent correction of the critical threshold, it is likely to fail to achieve the expected correction effect, so the first preset value is set.

[0033] Specifically, when the number of first gas pulses is greater than the first preset value, the multiple first AD sampling values ​​that change periodically are divided into multiple single-period first AD sampling value groups according to the periodic changes, and each first AD sampling value group includes an AD sampling maximum value and an AD sampling minimum value. The first fine-tuning threshold is calculated based on the AD sampling maximum values ​​and AD sampling minimum values ​​included in all first AD sampling value groups, and the critical threshold is corrected with the first fine-tuning threshold to obtain a new critical threshold, and the automatic calibration is completed. After that, wait for the preset time interval to be set, and re-execute the above automatic calibration steps.

[0034] In one embodiment of the present specification: before obtaining a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within the first preset time and changing periodically, the method further includes: Step 2032, obtaining a plurality of second AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a second preset time and showing periodic changes; Step 2034, obtaining the second gas leakage pulse quantity based on a plurality of second AD sampling values ​​that change periodically within a second preset time and a critical threshold; Step 2036: when the number of second air-flow pulses is zero and the difference between the maximum AD sampling value and the minimum AD sampling value of all the second AD sampling values ​​that change periodically within the second preset time is greater than the first preset difference, a rough trimming threshold is obtained based on the maximum AD sampling value and the minimum AD sampling value, and the rough trimming threshold is used as a new critical threshold; The second preset time is shorter than the first preset time.

[0035] Reference Figure 4 As shown, Figure 4This is a schematic diagram of the AD sampling value interval obtained by the light receiving tube sampling changing with temperature, when the critical threshold is outside the AD sampling value interval. At this time, the gradient color dial signal meter can no longer correctly collect the meter pulse.

[0036] Illustratively, under normal circumstances, the ambient temperature does not change much, the AD sampling value interval changes slightly, and the critical threshold value has only a small deviation from the median of the AD sampling value interval. The gradient color dial trust meter can still correctly collect the meter pulses for counting, but the obtained gradient color dial angle is inaccurate. However, when the external ambient temperature is in extreme conditions, such as 50° or -10°, the AD sampling value interval varies greatly, and coupled with individual differences between devices, it will cause the critical threshold value to be outside the AD sampling value interval, and the gradient color dial trust meter cannot collect the meter pulses for counting. Therefore, the above steps are set to roughly adjust the critical threshold value to first ensure that the gradient color dial trust meter counts correctly, and then continue to execute step 204.

[0037] Specifically, multiple second AD sampling values ​​that periodically change and correspond to the reflection amount of the gradient color turntable within a second preset time that is less than the first preset time are obtained. Similarly, the number of second air leakage pulses can be obtained based on the multiple second AD sampling values ​​that periodically change within the second preset time and the critical threshold, and it is determined whether the number of second air leakage pulses is zero.

[0038] When the number of the second gas pulses is not zero, it means that the critical threshold is still within the AD sampling value range, and no rough adjustment is required at this time. The rough adjustment step is directly terminated and step 204 is continued. When the number of the second gas pulses is zero, it is continued to determine whether the difference between the maximum AD sampling value and the minimum AD sampling value among all the second AD sampling values ​​is greater than the first preset difference.

[0039] Illustratively, the purpose of setting the first preset difference is to eliminate the correction interference caused by the AD sampling value jitter, and the size of the first preset difference is set according to the maximum and minimum values ​​of the AD sampling value interval under the pre-tested extreme ambient temperature. For example: when the ambient temperature reaches 50° or -10°, the difference between the maximum and minimum values ​​of the AD sampling value interval is only 250, then the first preset value is set to a value less than 250 to ensure that the meter pulse under the extreme ambient temperature is not missed, and the interference of the AD sampling value jitter is eliminated at the same time.

[0040] When the difference between the maximum AD sampling value and the minimum AD sampling value among all the second AD sampling values ​​is greater than the first preset difference, it is considered that there is a meter pulse, and the critical threshold is judged to be outside the AD sampling value range at this time. A coarse trimming threshold is obtained according to the maximum AD sampling value and the minimum AD sampling value. For example: the maximum AD sampling value is 800, and the minimum AD sampling value is 300. (800+300) / 2=550 is used as the coarse trimming threshold, and the coarse trimming threshold is used as the new critical threshold.

[0041] It should be noted that, because the second preset time is set to be less than the first preset time, the critical threshold can be quickly roughly trimmed before the first fine trimming is performed, thereby achieving the effect of quickly restoring the correct counting of the gradient color turntable signal meter.

[0042] In one or more embodiments of the present specification: the starting time of the second preset time and the first preset time can be the same time, and the multiple first AD sampling values ​​obtained include all the second AD sampling values, thereby reducing the total time spent on rough trimming and the first fine trimming critical threshold, and at the same time can also reduce the total amount of sample data required to be collected.

[0043] In one embodiment of the present specification, there is another situation listed in step 208: When the number of the first gas pulses is zero, the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time are obtained; Based on the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change, the extreme value difference corresponding to each periodic change is obtained; When the number of differences greater than the first preset difference among all extreme value differences is greater than the second preset value, a second refined threshold is obtained based on the AD sampling maximum and AD sampling minimum corresponding to each periodic change, and the second refined threshold is used as the new critical threshold.

[0044] Illustratively, when the number of the first gas pulse is zero, on the one hand, it may be because there is indeed no meter pulse, and on the other hand, it may be that there is a meter pulse, but the critical threshold is outside the AD sampling value range. Therefore, referring to the method described in step 208, obtain the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change within the first preset time. Referring to the method described in step 2036, compare the magnitude of the extreme value difference with the first preset difference. Obtain the number of differences greater than the first preset difference among all extreme value differences, and then refer to the method described in step 208. When the number of differences is greater than the second preset value, determine the second fine-tuning threshold, correct the critical threshold, obtain a new critical threshold, and complete the automatic calibration. In this way, when the critical threshold is outside the AD sampling value range, the critical threshold can be directly fine-tuned according to the first AD sampling value, avoiding the cumbersomeness of the rough trimming plus the first fine-tuning method, and it is done in one step. After that, wait for the preset time interval set, and re-execute the above automatic calibration steps.

[0045] The second preset value is set for the same purpose as the first preset value and is set accordingly according to the length of the first preset time.

[0046] In one embodiment of the present specification, the method of obtaining the first number of gas leakage pulses based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold value includes: Respectively obtain the magnitude relationship between a plurality of first AD sampling values ​​and the critical threshold value; Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, the first gas leakage pulse quantity is obtained.

[0047] Explanatory, some of the multiple first AD sampling values ​​obtained are greater than the critical threshold, and some are less than the critical threshold. All the first AD sampling values ​​are compared with the critical threshold in turn to obtain a size relationship sequence. A continuous string of large values ​​and an adjacent continuous string of small values ​​in the size relationship sequence are a first gas leakage pulse, thereby the number of first gas leakage pulses can be obtained.

[0048] In one embodiment of the present specification: the obtaining of the first number of gas pulses based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold value includes: Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, obtaining a change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold; The number of first gas leakage pulses is obtained based on the change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold.

[0049] Explanatory, the size relationship changes are greater than to less than and less than to greater than. According to the size relationship sequence, two comparisons are made in turn to obtain the size relationship changes, which can greatly compress the data volume. The number of first gas pulses is calculated based on the size relationship changes.

[0050] It can be understood that when the relationship between the multiple first AD sampling values ​​and the critical threshold value changes alternately at least 3 times, it means that the multiple first AD sampling values ​​must contain a complete cycle, and the first first gas pulse is recorded at this time. M represents the number of times the relationship between the multiple first AD sampling values ​​and the critical threshold value changes alternately, and the number of first gas pulses can be calculated to be (M-1) / 2.

[0051] Therefore, when the first gas pulse number is zero, it is determined that the user is not using gas or the user is using gas but the critical threshold is outside the AD sampling value range. When the first gas pulse number is not zero, it is determined whether the sample data is sufficient based on the size of the first gas pulse number compared to the first preset value.

[0052] In one embodiment of the present specification, the step of obtaining a first refined threshold based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and using the first refined threshold as a new critical threshold, includes: The maximum average value is obtained based on the maximum AD sampling value corresponding to each periodic change; The minimum average value is obtained based on the minimum AD sampling value corresponding to each periodic change; A first refined threshold is obtained based on the maximum average value and the minimum average value, and the first refined threshold is used as a new critical threshold.

[0053] Specifically, multiple first AD sampling values ​​that change periodically are divided into multiple single-period first AD sampling value groups according to the periodic changes, and each first AD sampling value group includes an AD sampling maximum value and an AD sampling minimum value. The average value of the AD sampling maximum values ​​in all first AD sampling value groups is calculated as the maximum average value, and the average value of the AD sampling minimum values ​​in all first AD sampling value groups is calculated as the minimum average value. The first refined threshold is obtained according to the maximum average value and the minimum average value, thereby reducing the deviation of the first refined threshold and increasing the correction accuracy.

[0054] In one embodiment of the present specification: obtaining a first refinement threshold based on the maximum average value and the minimum average value comprises: Calculate the average of the maximum mean value and the minimum mean value to obtain the corrected target value; Calculate the average of the AD sampling maximum value and the AD sampling minimum value corresponding to the last periodic change among the plurality of first AD sampling values ​​that change periodically within the first preset time to obtain a corrected control value; When the difference between the corrected target value and the corrected control value is greater than the third preset difference, the first fine-tuning threshold is the corrected control value; When the difference between the corrected target value and the corrected control value is less than or equal to the third preset difference, the first fine-tuning threshold is the corrected target value.

[0055] Explanatory, if the ambient temperature changes drastically within the first preset time, the AD sampling value intervals of each first AD sampling value group may be different. The AD sampling value interval corresponding to the first AD sampling value group at the end of the first preset time can theoretically better reflect the current ambient temperature. Therefore, the average value of the AD sampling maximum value and the AD sampling minimum value corresponding to the last periodic change is used as a control group to judge the reliability of the corrected target value, thereby determining the final first fine-tuning threshold. Further reduce the deviation of the first fine-tuning threshold and increase the accuracy of correction.

[0056] In the multiple embodiments of this specification, there is another situation listed in step 208: When the first gas leakage pulse quantity is less than or equal to the first preset value and is not zero, the critical threshold is kept unchanged.

[0057] Illustratively, when the number of the first gas pulses is less than or equal to the first preset value and is not zero, it is considered that there are meter pulses, but the user is using gas for only a short period of time within the first preset time, resulting in too little sample data collected. Because the sample data is too little, the first refined threshold obtained is not representative, so the critical threshold is not corrected, and the automatic calibration step is directly terminated at this time.

[0058] In multiple embodiments of the present specification: when the critical threshold is corrected in two automatic calibration steps before and after a preset time interval, and the difference between the two corrected critical thresholds is greater than a fourth preset difference, it is considered that the ambient temperature changes dramatically. At this time, the preset time interval between each automatic calibration step is reduced to increase the automatic calibration frequency, and it can also effectively avoid the situation where the critical threshold is outside the AD sampling value interval due to excessive changes in the AD sampling value interval with the ambient temperature.

[0059] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0060] See next Figure 5 , Figure 5 A schematic diagram of the structure of an automatic calibration system for a gradient color dial signal meter provided in an embodiment of the present specification is shown.

[0061] like Figure 5 As shown, the automatic calibration system 500 of the gradient color dial signal meter includes an acquisition unit 501, a counting unit 502 and a correction unit 503; The acquisition unit 501 acquires a critical threshold and a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; The counting unit 502 obtains the first gas leakage pulse quantity based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold; The correction unit 503 obtains the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time when the first gas pulse number is greater than the first preset value, and obtains the first refined threshold value based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and uses the first refined threshold value as the new critical threshold value.

[0062] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the automatic calibration system embodiment, since it is basically similar to the automatic calibration method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the automatic calibration method embodiment.

[0063] See also Figure 6 A schematic diagram of the structure of a gradient color turntable signal meter provided in an embodiment of the present specification is shown.

[0064] like Figure 6 As shown, the gradient color turntable signal meter 600 includes a calibration module 601 and a metering module 602; The calibration module 601 adopts the above-mentioned automatic calibration method of a gradient color dial signal meter to obtain a first refined threshold value, and uses the first refined threshold value as a new critical threshold value; The metering module 602 counts the gas flow rate based on the new critical threshold.

[0065] See also Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification is shown.

[0066] like Figure 7 As shown, the electronic device 700 may include: at least one processor 701 , at least one network interface 704 , a user interface 703 , a memory 705 , and at least one communication bus 702 .

[0067] The communication bus 702 may be used to realize the connection and communication among the above-mentioned components.

[0068] The user interface 703 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0069] The network interface 704 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0070] Among them, the processor 701 may include one or more processing cores. The processor 701 uses various interfaces and lines to connect the various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 705, and calling data stored in the memory 705. Optionally, the processor 701 can be implemented in at least one hardware form of DSP, FPGA, and PLC. The processor 701 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 701, and it can be implemented separately through a chip.

[0071] Among them, the memory 705 may include RAM or ROM. Optionally, the memory 705 includes a non-transitory computer-readable medium. The memory 705 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 705 may also be at least one storage device located away from the aforementioned processor 701. The memory 705 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an automatic calibration application. The processor 701 may be used to call the automatic calibration application stored in the memory 705 and execute the steps of the automatic calibration method mentioned in the above-mentioned embodiment.

[0072] The embodiments of this specification also provide a computer-readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in the above-mentioned automatic calibration method embodiment. If the components of the above-mentioned electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0073] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of this specification is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).

[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0075] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims of this specification.

Claims

1. An automatic calibration method for a gradient color dial signal meter, characterized in that: include: Get critical threshold value; Acquire a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; Acquire the first number of gas leakage pulses based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold; When the first number of gas pulses is greater than the first preset value, the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time are obtained, and the first fine-tuning threshold is obtained based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and the first fine-tuning threshold is used as the new critical threshold.

2. The automatic calibration method of a gradient color dial signal meter according to claim 1, characterized in that: Before obtaining a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within the first preset time and showing periodic changes, the method further includes: Acquire multiple second AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a second preset time and showing periodic changes; Acquire the second gas leakage pulse quantity based on a plurality of second AD sampling values ​​that change periodically within a second preset time and a critical threshold; When the number of the second gas pulses is zero, and the difference between the maximum AD sampling value and the minimum AD sampling value of all the second AD sampling values ​​that change periodically within the second preset time is greater than the first preset difference, a rough trimming threshold is obtained based on the maximum AD sampling value and the minimum AD sampling value, and the rough trimming threshold is used as a new critical threshold; The second preset time is shorter than the first preset time.

3. The automatic calibration method of a gradient color dial signal meter according to claim 1, characterized in that: When the number of the first gas pulses is zero, the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time are obtained; Based on the AD sampling maximum value and AD sampling minimum value corresponding to each periodic change, the extreme value difference corresponding to each periodic change is obtained; When the number of differences greater than the first preset difference among all extreme value differences is greater than the second preset value, a second refined threshold is obtained based on the AD sampling maximum and AD sampling minimum corresponding to each periodic change, and the second refined threshold is used as the new critical threshold.

4. The automatic calibration method of a gradient color dial signal meter according to claim 1, characterized in that: The method of obtaining the first number of gas leakage pulses based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold value includes: Respectively obtain the magnitude relationship between a plurality of first AD sampling values ​​and the critical threshold value; Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, the first gas leakage pulse quantity is obtained.

5. The automatic calibration method of a gradient color dial signal meter according to claim 4, characterized in that: The obtaining of the first number of gas pulses based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold value comprises: Based on the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold, obtaining a change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold; The number of first gas leakage pulses is obtained based on the change in the magnitude relationship between the plurality of first AD sampling values ​​and the critical threshold.

6. The automatic calibration method of a gradient color dial signal meter according to claim 1, characterized in that: The step of obtaining a first refined threshold value based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and using the first refined threshold value as a new critical threshold value, comprises: The maximum average value is obtained based on the maximum AD sampling value corresponding to each periodic change; The minimum average value is obtained based on the minimum AD sampling value corresponding to each periodic change; A first refined threshold is obtained based on the maximum average value and the minimum average value, and the first refined threshold is used as a new critical threshold.

7. The automatic calibration method of a gradient color dial signal meter according to claim 6, characterized in that: The obtaining of the first refinement threshold based on the maximum average value and the minimum average value comprises: Calculate the average of the maximum mean value and the minimum mean value to obtain the corrected target value; Calculate the average of the AD sampling maximum value and the AD sampling minimum value corresponding to the last periodic change among the plurality of first AD sampling values ​​that change periodically within the first preset time to obtain a corrected control value; When the difference between the corrected target value and the corrected control value is greater than the third preset difference, the first fine-tuning threshold is the corrected control value; When the difference between the corrected target value and the corrected control value is less than or equal to the third preset difference, the first fine-tuning threshold is the corrected target value.

8. The automatic calibration method of a gradient color dial signal meter according to any one of claims 1 to 7, characterized in that: When the first gas leakage pulse quantity is less than or equal to the first preset value and is not zero, the critical threshold is kept unchanged.

9. An automatic calibration system for a gradient color dial signal meter, characterized in that: It includes an acquisition unit, a counting unit and a correction unit; The acquisition unit acquires a critical threshold and a plurality of first AD sampling values ​​corresponding to the reflection amount of the gradient color turntable within a first preset time and showing periodic changes; The counting unit obtains the first gas leakage pulse quantity based on a plurality of first AD sampling values ​​that change periodically within a first preset time and a critical threshold value; The correction unit, when the first gas pulse number is greater than the first preset value, obtains the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change within the first preset time, and obtains the first refined threshold value based on the AD sampling maximum value and the AD sampling minimum value corresponding to each periodic change, and uses the first refined threshold value as the new critical threshold value.

10. A gradient color dial signal meter, characterized in that: Including calibration module and measurement module; The calibration module adopts the automatic calibration method of the gradient color dial signal meter according to any one of claims 1 to 8 to obtain a first refined threshold value, and uses the first refined threshold value as a new critical threshold value; The metering module counts the gas flow rate based on the new critical threshold.

Citation Information

Patent Citations

  • Gradient color turntable signal acquisition device, meter and signal acquisition method

    CN113819961A