An adaptive metering method
By adaptively switching the gas meter's metering mode and combining photoelectric direct reading and ultrasonic metering, the problems of gas meter metering accuracy and power consumption have been solved, extending battery life and improving metering accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2026-03-03
AI Technical Summary
Existing gas meters struggle to balance metering accuracy and power consumption. Ultrasonic gas meters offer high accuracy but consume a lot of power, while photoelectric direct-reading gas meters cannot detect instantaneous flow in real time, resulting in short battery life and inaccurate metering.
An adaptive metering method is adopted, which switches modes according to the gas usage status. When the gas is not used for a long time, low-power photoelectric direct-reading metering is used, and ultrasonic metering is used when it is used frequently. Combined with environmental adaptation and zero-point switching, the metering accuracy is ensured to be unaffected.
Without compromising metering accuracy, this method reduces the power consumption of gas meters, extends battery life, and improves the stability and accuracy of gas meter usage.
Smart Images

Figure CN118397756B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas management equipment technology, and in particular to an adaptive metering method. Background Technology
[0002] Gas meters are instruments used to measure gas consumption and are essential to every household's daily life. Inaccurate gas meter readings can lead to excessively high gas bills and even pose safety hazards. Therefore, the accuracy of gas meter readings is paramount. Furthermore, the battery life of a gas meter typically ranges from 1 to 10 years, and this lifespan directly impacts the meter's accuracy. Short battery life can affect the meter's normal operation and may even result in data loss.
[0003] Currently, there are two common gas metering methods, specifically:
[0004] The first type is the ultrasonic gas meter. The ultrasonic gas meter measures the gas flow rate by utilizing the relationship between the speed of ultrasonic wave propagation and the gas flow rate.
[0005] The second type is the photoelectric direct-reading gas meter. The photoelectric direct-reading gas meter uses optical digit recognition technology and photoelectric direct-reading sensor to periodically obtain the reading on the digit wheel to achieve the metering effect.
[0006] In the use of the two types of gas meters, the photoelectric direct-reading gas meter has low power consumption, requiring only a momentary power supply for reading, but it cannot obtain real-time instantaneous flow for accurate flow detection. On the other hand, the ultrasonic gas meter has high accuracy, but also high power consumption and requires a long-term power supply. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention provides an adaptive metering method that can switch to the appropriate mode for metering under different conditions. This reduces the overall power consumption of the gas meter without affecting the accuracy of the metering, while also improving the lifespan of the gas meter battery.
[0008] The technical solution to the problem solved by this invention is to provide an adaptive metering method for metering the total flow rate of gas, the method comprising:
[0009] Step S1: When an activation signal is received, enter a preset first mode, acquire and store a first real-time reading, where the first real-time reading is the real-time flow rate of the gas in the first mode;
[0010] Step S2: Determine whether the first real-time reading has changed within the first unit time. If the first real-time reading has not changed, then enter the preset second mode.
[0011] Step S3: Acquire and store a node reading at every second unit time interval, arrange the node readings in order of acquisition time from first to last and output them as a second sequence, wherein the node reading is the instantaneous cumulative gas volume of the gas acquired at every second unit time interval;
[0012] Step S4: Determine whether the readings of adjacent nodes in the second sequence are the same. If the readings of adjacent nodes are different, then proceed to the first mode.
[0013] Preferably, the unit of measurement for the first real-time reading is the same as the unit of measurement for the node reading, and the data detected in the first mode and the data detected in the second mode are accumulated synchronously.
[0014] Preferably, the step of acquiring and storing the first real-time reading specifically includes:
[0015] Starting from the time point when the first mode is entered, the first real-time reading is acquired and stored;
[0016] The first real-time readings are arranged in chronological order to form a first sequence.
[0017] Preferably, the step of determining whether the first real-time reading changes within a first unit time period, and if the first real-time reading does not change, then entering a preset second mode, specifically includes:
[0018] Extract the determination reading, which is the reading that comes first among two adjacent and equal readings in the first sequence;
[0019] Starting with the determined reading, determine whether the determined reading changes within the first unit of time:
[0020] If the determination reading does not change within the first unit time period, then proceed to the second mode;
[0021] If the determination reading changes within the first unit time period, return to step S1.
[0022] Preferably, determining whether the reading changes within the first unit time period further includes:
[0023] A first error value is preset, and the first error value is positive.
[0024] Determine whether the change in the judgment reading is less than the first error value:
[0025] If the change in the determination reading is less than the first error value, then the determination reading is determined to have not changed.
[0026] If the change in the determination reading is not less than the first error value, then the determination reading is determined to have changed.
[0027] Preferably, step S4 specifically includes:
[0028] Based on each of the second sequences, a first instantaneous reading is extracted and marked as a reference reading. The first instantaneous reading is the first node reading obtained after entering the second mode.
[0029] Determine whether the second instantaneous reading is equal to the first instantaneous reading, wherein the second instantaneous reading is the node reading obtained after the first instantaneous reading:
[0030] If the second instantaneous reading is equal to the first instantaneous reading, then return to step S3;
[0031] If the second instantaneous reading is not equal to the first instantaneous reading, then enter the first mode.
[0032] Preferably, determining whether the second instantaneous reading is equal to the first instantaneous reading specifically includes:
[0033] A second error value is preset, and the second error value is positive.
[0034] Determine whether the second flow rate difference between the second instantaneous reading and the first instantaneous reading is less than the second error value:
[0035] If the second flow rate difference is less than the second error value, then the second instantaneous reading is determined to be equal to the first instantaneous reading, and the process returns to step S3;
[0036] If the second flow rate difference is not less than the second error value, then it is determined that the second instantaneous reading is not equal to the first instantaneous reading, and the system enters the first mode.
[0037] Preferably, before determining whether the second instantaneous reading is equal to the first instantaneous reading, the method further includes:
[0038] Determine whether the second instantaneous reading is less than the first instantaneous reading:
[0039] If the second instantaneous reading is not less than the first instantaneous reading, then determine whether the second instantaneous reading is equal to the first instantaneous reading;
[0040] If the second instantaneous reading is less than the first instantaneous reading, a warning message will be issued and the gas supply will be stopped.
[0041] Preferably, upon receiving the start signal, zero-point intervention is also included:
[0042] Step S5: Obtain the real-time time;
[0043] Step S6: Determine whether the real-time time has reached zero.
[0044] Step S61: If the real-time time reaches zero, then send out zero-point information and switch the current mode to the first mode;
[0045] Step S62: If the real-time time has not reached zero, return to step S5 and maintain the current mode.
[0046] Preferably, upon receiving the activation signal, environmental adaptation intervention is also included:
[0047] Obtain current environmental information;
[0048] Determine whether the current noise level exceeds the standard decibel level. If the current noise level exceeds the standard decibel level, switch the current mode to the second mode.
[0049] Determine whether electromagnetic interference exists in the current environment. If electromagnetic interference exists in the current environment, switch the current mode to the second mode.
[0050] Determine whether there is light interference in the current environment. If light interference exists in the current environment, switch the current mode to the first mode.
[0051] The beneficial effects of this invention are as follows: This invention can switch between different modes according to different usage states, reduce the power consumption of the gas meter without affecting the detection accuracy of the gas meter, thereby extending the battery life of the gas meter.
[0052] This invention features two modes that can be switched according to different gas usage conditions to achieve the desired effect. When gas is not used for extended periods, precise instantaneous flow rate is not required, and the second mode can be used to acquire the instantaneous flow rate at regular intervals, thereby saving power consumption. When gas is frequently used, the first mode can be used to acquire real-time instantaneous flow rate for accurate measurement. Attached Figure Description
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. In these drawings, similar reference numerals are used to denote similar elements. The drawings described below are some embodiments of the invention, but not all embodiments. Other drawings will be readily available to those skilled in the art based on these drawings without any inventive effort.
[0054] Figure 1 A flowchart illustrating the execution of an adaptive measurement method provided in this application embodiment;
[0055] Figure 2 A schematic flowchart of an adaptive measurement method provided in an embodiment of this application;
[0056] Figure 3 A schematic diagram of the structure of a control device for an adaptive metering method provided in an embodiment of this application;
[0057] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0059] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0060] 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 function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0061] It should be noted that the method of this application is mainly applicable to detecting gas flow rate in pipelines. Next, this application will use the detection of gas consumption as an example, with the first mode using ultrasonic metering and the second mode using photoelectric direct-reading metering, to explain the method of this application.
[0062] Please see Figure 1 and Figure 2 , Figure 1 This application provides an implementation flowchart of an adaptive measurement method. Figure 2 A flowchart illustrating an adaptive measurement method provided in this application embodiment. In this application embodiment, the method includes:
[0063] Step S1: When an activation signal is received, the system enters a preset first mode, acquires and stores a first real-time reading, which is the real-time flow rate of the gas in the first mode.
[0064] In one embodiment of this application, after the gas meter is installed and the power is turned on, the control system receives an activation signal and then directly enters the first mode to begin metering. The control system acquires and stores the first real-time reading, which is the real-time instantaneous flow rate of the gas acquired in the first mode. In the first mode, the control system acquires the real-time instantaneous flow rate of the gas, indicating that the gas meter will accurately measure the amount of gas used in real time.
[0065] In one possible implementation, the step S1 of acquiring and storing the first real-time reading specifically includes:
[0066] Starting from the time point when the first mode is entered, the first real-time reading is acquired and stored;
[0067] The first real-time readings are arranged in chronological order to form a first sequence.
[0068] In one embodiment of this application, the control system begins acquiring and storing real-time instantaneous traffic flow, starting from the time of entering the first mode. The stored instantaneous traffic flows are arranged chronologically from first to last and output as a first sequence. The real-time acquisition times of each instantaneous traffic flow are also arranged chronologically from first to last and output as a first time sequence for later retrieval. If it is detected that the real-time instantaneous traffic flow is constantly changing, the elements in the first sequence and the elements in the first time sequence will correspond one-to-one and continuously increase chronologically from first to last.
[0069] For example, if the control system enters the first mode at 01:00 and the reading is 1, obtains the second reading of 1.5 at 01:01, and obtains the third reading of 2 at 01:02, then the current first sequence includes 1, 1.5 and 2, and the current first time sequence includes 01:00, 01:01 and 01:02.
[0070] As a feasible implementation method, the first mode takes the ultrasonic metering mode as an example. The ultrasonic metering mode obtains the current instantaneous flow rate, but the current instantaneous cumulative gas volume can be calculated by the current instantaneous flow rate and the unit time.
[0071] Step S2: Determine whether the first real-time reading has changed within the first unit time. If the first real-time reading has not changed, then enter the preset second mode.
[0072] In one embodiment of this application, if the readings obtained within a certain period of time do not change, it can be determined that the gas is not flowing out. Therefore, precise real-time measurement is no longer required, and the system can switch to a more energy-efficient second mode. Thus, a first unit time can be preset as a judgment condition. If no gas flows out within the first unit time, the system enters the more energy-efficient second mode; otherwise, the first mode is maintained.
[0073] In one possible implementation, step S2 may include:
[0074] Extract the determination reading, which is the reading that comes first among two adjacent and equal readings in the first sequence;
[0075] Starting with the determined reading, determine whether the determined reading changes within the first unit of time:
[0076] If the determination reading does not change within the first unit time period, then proceed to the second mode;
[0077] If the determination reading changes within the first unit time period, return to step S1.
[0078] In one embodiment of this application, a time range for determining whether gas is leaking is preset, namely a first unit time. Starting from the first of two adjacent and equal readings in the first sequence, i.e., starting from the determination reading, it is determined whether the readings obtained in the first unit time are all equal to the determination reading. If they are all equal to the determination reading, it means that the determination reading has not changed, i.e., gas is not leaking, and the second mode is entered. If a reading that is not equal to the determination reading is detected, it means that the determination reading has changed, i.e., gas is still leaking, and the first mode is maintained, and the first real-time reading is continued to be obtained.
[0079] For example, if 1 hour is preset as the first unit of time, and the control system obtains a reading of 2 at 02:00 and a reading of 2 at 02:01, then it can be determined that the reading is 2 and the acquisition time corresponding to the reading is 02:00. Therefore, starting the time calculation from 02:00, the following two situations may occur:
[0080] In the first scenario, if the control system continuously obtains a reading of 2 between 02:00 and 03:00, it is determined that the gas is not flowing and enters the second mode.
[0081] In the second scenario, if the control system obtains a reading of 2 between 02:00 and 02:30, but obtains a reading of 3 at 02:31, it is determined that the system is still in the gas leakage state, and the first mode is maintained without performing any other operations.
[0082] In one possible implementation, determining whether the reading changes within the first unit time period further includes:
[0083] A first error value is preset, and the first error value is positive.
[0084] Determine whether the change in the judgment reading is less than the first error value:
[0085] If the change in the determination reading is less than the first error value, then the determination reading is determined to have not changed.
[0086] If the change in the determination reading is not less than the first error value, then the determination reading is determined to have changed.
[0087] In one embodiment of this application, since the gas meter is not in an absolutely constant environment, ambient light, noise, or electromagnetic fields may cause slight fluctuations in the gas meter reading. However, such changes are generally small. Therefore, a first error value, specifically defined in the first mode, can be preset to determine whether the change in the current reading is a normal fluctuation or a change in the gas flow rate. Specifically, when the detected current reading changes compared to the previous reading, the absolute value of the difference between the current and previous readings is calculated, and compared to see if the absolute value of the difference is less than the first error value: if the absolute value of the difference is not less than the first error value, it is determined that the gas flow rate is changing; if the absolute value of the difference is less than the first error value, it is determined to be a normal fluctuation.
[0088] Understandably, the magnitude of the first error value can be adaptively adjusted according to the actual application. It can be put into practical use after multiple tests, or it can be continuously modified and debugged during use.
[0089] Step S3: Acquire and store a node reading at every second unit time interval, arrange the node readings in order of acquisition time from first to last and output them as a second sequence, wherein the node reading is the instantaneous cumulative gas volume acquired at every second unit time interval.
[0090] In one embodiment of this application, when it is determined that the gas supply has been suspended for an extended period, a second mode is entered. The second mode has a lower reading frequency; that is, the instantaneous flow rate is detected at regular intervals, and power is only supplied momentarily during the reading. Specifically, in the second mode, to save power, a reading interval, i.e., a second unit of time, can be preset. The reading method involves taking a number every second unit of time. The obtained readings are the node readings, and the node readings are arranged in chronological order to form a second sequence. The acquisition times corresponding to each node reading are also arranged in chronological order to form a second time series for easy subsequent retrieval.
[0091] The second mode takes the photoelectric direct reading metering mode as an example. The photoelectric direct reading metering mode obtains the instantaneous cumulative gas volume, and the obtained readings can be stored directly.
[0092] Step S4: Determine whether the readings of adjacent nodes in the second sequence are the same. If the readings of adjacent nodes are different, then proceed to the first mode.
[0093] In one embodiment of this application, since the gas has not been released for a long time, the system switches to the second mode. Therefore, the reading obtained in the second mode should be a stable value, and all elements in the second sequence should be equal. When adjacent and unequal elements appear in the second sequence, it indicates that the gas started to flow when a different reading was obtained. Therefore, it is necessary to switch to the first mode with higher metering accuracy to measure the real-time instantaneous flow rate of the gas.
[0094] In one possible implementation, step S4 specifically includes:
[0095] Based on each of the second sequences, a first instantaneous reading is extracted and marked as a reference reading. The first instantaneous reading is the first node reading obtained after entering the second mode.
[0096] Determine whether the second instantaneous reading is equal to the first instantaneous reading, wherein the second instantaneous reading is the node reading obtained after the first instantaneous reading:
[0097] If the second instantaneous reading is equal to the first instantaneous reading, then return to step S3;
[0098] If the second instantaneous reading is not equal to the first instantaneous reading, then enter the first mode.
[0099] In one embodiment of this application, the gas leakage status can be determined by judging whether adjacent elements in the second sequence are the same. Specifically, after entering the second mode, the first instantaneous reading is acquired and stored, and the first instantaneous reading is marked as the reference reading. All subsequent readings acquired in the second mode are compared with the reference reading to determine whether there is a change. If the subsequent instantaneous readings are all the same as the reference reading, it is determined that the gas has not leaked, and the second mode is maintained, that is, an instantaneous reading is acquired every second unit of time. If a reading different from the reference reading appears in the subsequent instantaneous readings, it is determined that the gas started to leak at the acquisition time corresponding to the instantaneous reading that changed, and the first mode is entered, that is, real-time instantaneous readings are acquired.
[0100] For example, if 0.1 hours is preset as the second unit of time, the first reading obtained after entering the second mode is 2, which serves as the reference reading. Subsequently, an instantaneous reading will be obtained every 0.1 hours. Each instantaneous reading needs to be compared with the reference reading, i.e., 2, to determine whether a change has occurred. Therefore, the following two situations will occur:
[0101] In the first mode, if the instantaneous reading obtained every 0.1 hours is 2, it is determined that there has been no change, and the second mode is maintained to save power consumption.
[0102] The second method involves taking instantaneous readings at 0.1-hour intervals. If a reading other than 2 appears in the subsequent instantaneous readings (e.g., the second instantaneous reading is 2, but the third instantaneous reading is 3), then it is determined that gas leakage began when the reading was 3. Simultaneously, the second mode is switched back to the first mode for high-precision real-time metering.
[0103] In one possible implementation, determining whether the second instantaneous reading is equal to the first instantaneous reading specifically includes:
[0104] A second error value is preset, and the second error value is positive.
[0105] Determine whether the second flow rate difference between the second instantaneous reading and the first instantaneous reading is less than the second error value:
[0106] If the second flow rate difference is less than the second error value, then the second instantaneous reading is determined to be equal to the first instantaneous reading, and the process returns to step S3;
[0107] If the second flow rate difference is not less than the second error value, then it is determined that the second instantaneous reading is not equal to the first instantaneous reading, and the system enters the first mode.
[0108] In one embodiment of this application, the instantaneous readings acquired in the second mode may fluctuate slightly due to environmental influences. Such fluctuations are clearly not considered gas leakage. Therefore, a preset error value, namely the second error value, is needed to determine whether the change between the second and first instantaneous readings is due to environmental fluctuations or gas leakage. Specifically, in the second mode, when an instantaneous reading different from the reference reading (i.e., the first instantaneous reading) is acquired, the absolute value of the difference between the acquired instantaneous reading and the reference reading is first calculated. Then, it is determined whether the absolute value of the difference is less than the second error value. If the absolute value of the difference is less than the second error value, the change between the acquired instantaneous reading and the reference reading is determined to be due to environmental fluctuations, and the second mode is maintained. If the absolute value of the difference is not less than the second error value, the change between the acquired instantaneous reading and the reference reading is determined to be due to gas leakage, and the first mode is entered.
[0109] Understandably, the magnitude of the second error value can be adaptively adjusted according to the actual application. It can be put into practical use after multiple tests, or it can be continuously modified and debugged during use.
[0110] In one possible implementation, the unit of measurement for the first real-time reading is the same as the unit of measurement for the node reading, and the data detected in the first mode and the data detected in the second mode are accumulated synchronously.
[0111] In one embodiment of this application, in order to facilitate the cumulative counting of the gas meter, the units of measurement for the readings in the first mode and the readings in the second mode are the same. That is, the units of measurement for the first real-time readings and the units of measurement for the node readings are the same, and the units of time for the acquisition time corresponding to each first real-time reading and the units of time for the acquisition time corresponding to each node reading are also the same.
[0112] As a feasible implementation method, the first mode takes the ultrasonic metering mode as an example, and the second mode takes the photoelectric direct reading metering mode as an example. The first real-time reading is the current instantaneous flow rate obtained in the ultrasonic metering mode, but the current instantaneous cumulative gas volume can be calculated by the current instantaneous flow rate and the unit time; the node reading is the current instantaneous cumulative gas volume obtained in the photoelectric direct reading mode.
[0113] In one possible implementation, the first sequence and the second sequence are arranged in chronological order from first to last, which can form a complete reading sequence.
[0114] In one embodiment of this application, when switching modes multiple times, multiple first sequences and multiple second sequences will appear. Each first sequence and each second sequence is arranged in chronological order of output time, forming a complete reading sequence. This reading sequence includes all readings acquired in both the first and second modes. Similarly, each first time sequence and each second time sequence is arranged in chronological order of output time, forming a complete acquisition time sequence. This acquisition time sequence includes the acquisition time corresponding to each reading acquired in both the first and second modes. By binding each element in the reading sequence to each element in the acquisition time sequence, it is possible to extract the acquisition time point of a given reading, or extract the corresponding reading from a given time point.
[0115] In one possible implementation, after receiving the activation signal, zero-point intervention is also included:
[0116] Step S5: Obtain the real-time time;
[0117] Step S6: Determine whether the real-time time has reached zero.
[0118] Step S61: If the real-time time reaches zero, then send out zero-point information and switch the current mode to the first mode;
[0119] Step S62: If the real-time time has not reached zero, return to step S5 and maintain the current mode.
[0120] In one embodiment of this application, to improve measurement accuracy, the measurement mode is updated once daily at midnight. Specifically, the control system acquires the real-time time. If it detects that the current time is midnight, it switches the current mode to the first mode, but this does not affect subsequent determinations regarding switching between the two modes. If it detects that the current time is not midnight, it does not interfere with other steps and continues to acquire the next time point. This includes two specific scenarios:
[0121] In the first scenario, the current mode is the first mode. When the current time point is detected to be zero, the current mode should be switched to the first mode. However, since the current mode is already the first mode, the control system does not interfere with the current step and simply maintains the first mode.
[0122] In the second scenario, the current mode is the second mode. When the current time point is detected to be zero, the current second mode is switched to the first mode. After switching to the first mode, the acquired instantaneous readings are analyzed and judged according to the normal process. That is, it is judged whether each instantaneous reading has changed in the first unit of time. If it has changed, the first mode is maintained; if it has not changed, the second mode is entered.
[0123] It should be noted that this application's Figure 1 and Figure 2 All flowcharts are based on normal conditions, i.e., without environmental interference. In cases of environmental interference, this application has an alternative execution plan, the flow and decision-making methods of which will be explained below.
[0124] In one possible implementation, after receiving the activation signal, environmental adaptation intervention is also included:
[0125] Obtain current environmental information;
[0126] Determine whether the current noise level exceeds the standard decibel level. If the current noise level exceeds the standard decibel level, switch the current mode to the second mode.
[0127] Determine whether electromagnetic interference exists in the current environment. If electromagnetic interference exists in the current environment, switch the current mode to the second mode.
[0128] Determine whether there is light interference in the current environment. If light interference exists in the current environment, switch the current mode to the first mode.
[0129] In one embodiment of this application, since the accuracy of measurement may be affected when the two modes are in different environments, environmental adaptation is given the highest priority. When extreme environments occur, the measurement method will change from switching modes based on readings to a fixed mode. Specifically, the first mode may result in inaccurate measurements in extreme environments with high noise levels, strong electromagnetic interference, or both. Therefore, in such extreme environments, the measurement method will switch from switching modes based on readings to a fixed second mode. Subsequently, the acquired readings will no longer be analyzed or judged according to the usual procedures until the extreme environment becomes a normal environment, i.e., the noise level decreases to the standard level and the electromagnetic interference weakens to the point where it does not affect the measurement of the first mode. Then, the fixed second mode will be switched back to the measurement method of switching modes based on readings, and the acquired data will be analyzed and judged according to the usual procedures. In extreme environments with strong light interference, the second mode may result in inaccurate measurements. Therefore, in such environments, the measurement method will switch to the fixed first mode based on the readings. Subsequently, the acquired readings will no longer be analyzed or judged according to the usual procedures until the extreme environment becomes normal, that is, the light interference weakens to the point that it no longer interferes with the second mode measurement. Then, the fixed first mode will be switched back to the measurement method of switching modes based on the readings, and the acquired data will be analyzed and judged according to the usual procedures.
[0130] In one feasible implementation, when extreme environments that simultaneously affect the measurement accuracy of the first mode and the measurement accuracy of the second mode occur, such as simultaneous occurrence of excessively high noise levels and strong light interference, simultaneous occurrence of strong electromagnetic interference and strong light interference, or all three, the influence coefficients of the above conditions on the first mode and the second mode are detected and compared. The measurement method with the smaller influence coefficient is selected to fix the measurement mode until the extreme environment returns to normal. Then, the fixed mode is changed to a measurement method that switches modes based on readings, and the acquired data is analyzed and judged according to the conventional process.
[0131] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an adaptive metering device provided in an embodiment of this application. Figure 3 As shown, the device includes:
[0132] The first acquisition module 201 is used in step S1: when an activation signal is received, it enters a preset first mode, acquires and stores a first real-time reading, wherein the first real-time reading is the real-time flow rate of the gas in the first mode.
[0133] The first determination module 202 is used in step S2 to determine whether the first real-time reading has changed within a first unit time. If the first real-time reading has not changed, then the preset second mode is entered.
[0134] The second acquisition module 203 is used in step S3: acquiring and storing a node reading at a second unit time interval, arranging the node readings in the order of acquisition time from first to last and outputting them as a second sequence, wherein the node reading is the instantaneous flow rate of the gas acquired at a second unit time interval;
[0135] The second determination module 204 is used in step S4 to determine whether the readings of adjacent nodes in the second sequence are the same. If the readings of adjacent nodes are different, then the first mode is entered.
[0136] In one possible implementation, the unit of measurement for the first real-time reading is the same as the unit of measurement for the node reading, and the data detected in the first mode and the data detected in the second mode are accumulated synchronously.
[0137] In one possible implementation, the first acquisition module 201 specifically includes:
[0138] The first storage unit is used to acquire and store the first real-time reading starting from the time point when the first mode is entered.
[0139] The first arrangement unit is used to arrange each of the first real-time readings into a first sequence based on time order.
[0140] In one possible implementation, the first sequence and the second sequence are arranged in chronological order from first to last, which can form a complete reading sequence.
[0141] In one possible implementation, the first determination module 202 specifically includes:
[0142] The first extraction unit is used to extract the judgment reading, wherein the judgment reading is the reading that is first among two adjacent and equal readings in the first sequence;
[0143] The first analysis unit is used to determine, starting from the determined reading, whether the determined reading changes within the first unit time period:
[0144] If the determination reading does not change within the first unit time period, then proceed to the second mode;
[0145] If the determination reading changes within the first unit time period, return to step S1.
[0146] In one possible implementation, the first determining module 202 further includes:
[0147] The first preset unit is used to preset a first error value, wherein the first error value is a positive value;
[0148] The first comparison unit is used to determine whether the change in the judgment reading is less than the first error value:
[0149] If the change in the determination reading is less than the first error value, then the determination reading is determined to have not changed.
[0150] If the change in the determination reading is not less than the first error value, then the determination reading is determined to have changed.
[0151] In one possible implementation, the second determination module 204 specifically includes:
[0152] The second arrangement unit is used to extract a first instantaneous reading based on each of the second sequences and mark it as a reference reading, wherein the first instantaneous reading is the first node reading obtained after entering the second mode;
[0153] The second analysis unit is used to determine whether the second instantaneous reading is equal to the first instantaneous reading, wherein the second instantaneous reading is the node reading obtained after the first instantaneous reading.
[0154] If the second instantaneous reading is equal to the first instantaneous reading, then return to step S3;
[0155] If the second instantaneous reading is not equal to the first instantaneous reading, then enter the first mode.
[0156] In one possible implementation, the second analysis unit specifically includes:
[0157] The second preset element is used to preset a second error value, wherein the second error value is a positive value;
[0158] The second comparison element is used to determine whether the second flow rate difference between the second instantaneous reading and the first instantaneous reading is less than the second error value:
[0159] If the second flow rate difference is less than the second error value, then the second instantaneous reading is determined to be equal to the first instantaneous reading, and the process returns to step S3;
[0160] If the second flow rate difference is not less than the second error value, then it is determined that the second instantaneous reading is not equal to the first instantaneous reading, and the system enters the first mode.
[0161] In one possible implementation, the apparatus of this application further includes a zero-point module:
[0162] Time acquisition unit, used in step S5: acquire real-time time;
[0163] A time determination unit is used in step S6 to determine whether the real-time time has reached zero.
[0164] Step S61: If the real-time time reaches zero, then send out zero-point information and switch the current mode to the first mode;
[0165] Step S62: If the real-time time has not reached zero, return to step S5 and maintain the current mode.
[0166] In one possible implementation, the apparatus of this application further includes an environment adaptation module:
[0167] The environment acquisition unit is used to acquire current environmental information;
[0168] The first environmental analysis unit is used to determine whether the current noise level exceeds the standard decibel level. If the current noise level exceeds the standard decibel level, the current mode is switched to the second mode.
[0169] The second environmental analysis unit is used to determine whether there is electromagnetic interference in the current environment. If the electromagnetic interference exists in the current environment, the current mode is switched to the second mode.
[0170] The third environmental analysis unit is used to determine whether there is light interference in the current environment. If light interference exists in the current environment, the current mode is switched to the first mode.
[0171] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.
[0172] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.
[0173] See Figure 4 It shows a schematic diagram of the structure of an electronic device according to an embodiment of this application, which can be used to implement... Figure 1 and Figure 2 The method in the illustrated embodiment. (As shown) Figure 4As shown, the electronic device 300 may include: at least one central processing unit 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.
[0174] The communication bus 302 is used to enable communication between these components.
[0175] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0176] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0177] The central processing unit 301 may include one or more processing cores. The central processing unit 301 connects to various parts within the electronic device 300 using various interfaces and lines. It executes various functions of the terminal 300 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the central processing unit 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The central processing unit 301 may integrate one or a combination of several of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the central processing unit 301 and may be implemented as a separate chip.
[0178] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 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 touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned central processing unit 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0179] exist Figure 4 In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and to acquire user input data; while the central processing unit 301 can be used to call the application program corresponding to the adaptive metering method stored in the memory 305, and specifically perform the following operations:
[0180] Step S1: When an activation signal is received, enter a preset first mode, acquire and store a first real-time reading, where the first real-time reading is the real-time flow rate of the gas in the first mode;
[0181] Step S2: Determine whether the first real-time reading has changed within the first unit time. If the first real-time reading has not changed, then enter the preset second mode.
[0182] Step S3: Acquire and store a node reading at every second unit time interval, arrange the node readings in order of acquisition time from first to last and output them as a second sequence, wherein the node reading is the instantaneous flow rate of the gas acquired at every second unit time interval;
[0183] Step S4: Determine whether the readings of adjacent nodes in the second sequence are the same. If the readings of adjacent nodes are different, then proceed to the first mode.
[0184] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0185] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0186] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0187] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0188] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0189] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0190] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0191] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0192] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. An adaptive metering method for metering a total flow of a gas, characterized in that, The method comprises: Step S1: when receiving an opening signal, entering a preset first mode, obtaining and storing a first real-time reading, the first real-time reading being a real-time flow of the gas in the first mode; Step S2: judging whether the first real-time reading in a first unit time changes, if the first real-time reading does not change, entering a preset second mode; Step S3: obtaining and storing a node reading every second unit time, arranging the node readings in the order of time from early to late and outputting as a second sequence, the node reading being a momentary cumulative gas volume of the gas obtained every second unit time; Step S4: judging whether adjacent node readings in the second sequence are the same, if the adjacent node readings are different, entering the first mode; After receiving the opening signal, further comprising environmental adaptation intervention: Obtaining current environmental information; Judging whether the current noise decibel exceeds the standard decibel, if the current noise decibel exceeds the standard decibel, switching the current mode to the second mode; Judging whether the current environment exists electromagnetic interference, if the current environment exists the electromagnetic interference, switching the current mode to the second mode; Judging whether the current environment exists light interference, if the current environment exists the light interference, switching the current mode to the first mode.
2. The method of claim 1, wherein, The measurement unit of the first real-time reading and the measurement unit of the node reading are the same, and the data detected in the first mode and the data detected in the second mode are synchronously accumulated.
3. The method of claim 1, wherein, The obtaining and storing of the first real-time reading specifically comprises: Taking the time point of entering the first mode as a starting point, obtaining and storing the first real-time reading; Arranging the first real-time readings in the order of time from early to late as a first sequence.
4. The method of claim 3, wherein, The first sequence and the second sequence arranged in the order of time from early to late can constitute a complete reading sequence.
5. The method of claim 3, wherein, The judgment of whether the first real-time reading in the first unit time changes, if the first real-time reading does not change, entering the second mode, specifically comprises: Extracting a judgment reading, the judgment reading being a reading in front of two adjacent and equal readings in the first sequence; Taking the judgment reading as a starting point, judging whether the judgment reading in the first unit time changes: If the judgment reading in the first unit time does not change, entering the second mode; If the judgment reading in the first unit time changes, returning to step S1.
6. The method of claim 5, wherein, The judgment of whether the judgment reading in the first unit time changes further comprises: Predefining a first error value, the first error value being a positive value; Judging whether the change amount of the judgment reading is less than the first error value: If the change amount of the judgment reading is less than the first error value, judging that the judgment reading does not change; If the change amount of the judgment reading is not less than the first error value, judging that the judgment reading changes.
7. The method of claim 1, wherein, The step S4 specifically comprises: extracting a first instantaneous reading as a reference reading based on each of the second sequences, the first instantaneous reading being a first node reading taken after entering the second mode; determining whether a second instantaneous reading is equal to the first instantaneous reading, the second instantaneous reading being a node reading taken after the first instantaneous reading: if the second instantaneous reading is equal to the first instantaneous reading, returning to step S3; if the second instantaneous reading is not equal to the first instantaneous reading, entering the first mode.
8. The method of claim 7, wherein, The determination of whether the second instantaneous reading is equal to the first instantaneous reading specifically includes: presetting a second error value, the second error value being a positive value; determining whether a second flow difference between the second instantaneous reading and the first instantaneous reading is less than the second error value: if the second flow difference is less than the second error value, determining that the second instantaneous reading is equal to the first instantaneous reading, and returning to step S3; if the second flow difference is not less than the second error value, determining that the second instantaneous reading is not equal to the first instantaneous reading, and entering the first mode.
9. The method of claim 1, wherein, When the start signal is received, further comprising zero point intervention: step S5: acquiring a real-time time; step S6: determining whether the real-time time reaches a zero point; step S61: if the real-time time reaches the zero point, issuing zero point information, and switching a current mode to the first mode; step S62: if the real-time time does not reach the zero point, returning to step S5, and maintaining the current mode.
Citation Information
Patent Citations
Flow metering method and device, and meter
CN112649060A