A data processing method, device and storage medium
By comparing the current electronic reading with the last correct reading in the database, and using a correction process involving difference judgment and misreading cause analysis, the problem of data loss caused by inaccurate instrument readings was solved, reducing costs and improving the accuracy and efficiency of data processing.
Patent Information
- Application Number
- CN202210896562.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-07-28
AI Technical Summary
In the existing technology, inaccurate instrument readings frequently lead to misreading, resulting in data loss, increased cost of replacing parts, and inconvenience in subsequent analysis.
By comparing the current electronic reading with the last correct reading in the database, the erroneous readings are corrected using appropriate correction steps, including determining the range of the difference and the cause of the misreading, and making targeted data corrections to ensure the accuracy and efficiency of the correction.
This effectively avoids the inconvenience of subsequent analysis due to missing data, reduces the time, manpower and material costs of replacing parts, and improves the accuracy and efficiency of data processing.
Smart Images

Figure CN115203291B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, in particular, to a data processing method and device and storage medium. BACKGROUND
[0002] An instrument is a device for displaying numerical values, including pressure instruments, flow instruments, and various analytical instruments, etc. The instruments for measuring flow include water meters, gas meters, etc. Such instruments display the measured values by the cooperation of moving elements and the encoding of mechanical parts.
[0003] In order to facilitate the collection, storage and statistics of instrument readings, a collection and transmission module is installed on the instrument to automatically collect, process and store the measured data of the instrument, replacing the traditional manual meter reading and data recording method. The remote water meter and remote gas meter currently used are based on the above principle.
[0004] In the prior art, when the mechanical and electrical conversion is performed, some inaccurate readings will inevitably occur. Taking a remote water meter as an example, due to water quality, bubbles or mechanical dial angle problems, misreading will inevitably occur. These abnormal data will bring many interference factors to water analysis work. When the system maintenance personnel find that the mechanical and electrical readings of the instrument are inconsistent, the usual treatment method is to exclude the abnormal data and replace the mechanical and electrical conversion components (meter head) of the water meter. Some wet-type water meters even need to stop water supply to replace the meter head.
[0005] In such a treatment method, the replacement of parts increases the cost of time, labor and materials. Moreover, it is extremely inconvenient to analyze the measured data of the instrument in the later stage. SUMMARY
[0006] The purpose of the embodiments of the present application is a data processing method, device and storage medium applied to instrument misreading correction. The method compares the current electronic reading obtained with the last correct reading in the database, and uses the corresponding reading correction method to accurately correct the misreading, so as to avoid the problem that it is extremely inconvenient to analyze the measured data of the instrument in the later stage due to data loss. At the same time, it also solves the problem of waste of time, labor and material costs caused by the replacement of instrument parts when the reading error occurs.
[0007] In a first aspect, the embodiments of the present application provide a data processing method, which is applied to meter misreading correction. The method comprises: obtaining a current electronic reading of the meter; comparing the current electronic reading with a last correct reading in a database; if the current electronic reading is less than the last correct reading in the database, performing a first correction step; in the first correction step, if it is determined that a difference between the current electronic reading and the last correct reading in the database is not greater than a preset difference, performing a second correction step; if it is determined that the difference between the current electronic reading and the last correct reading in the database is greater than the preset difference, performing a third correction step.
[0008] The data processing method described above, when obtaining a current reading of the meter, compares the current reading with a last correct reading in a database. If the current reading is less than the last correct reading, it indicates that the current reading is incorrect and needs to be corrected. When correcting, according to whether the difference between the current reading and the last correct reading exceeds a preset difference, the corresponding second correction step or third correction step is performed, which ensures the accuracy of correction and avoids the problem that it is extremely inconvenient to analyze metering data of the meter in the later period due to data loss.
[0009] In combination with the first aspect, the preset difference can be determined according to a nominal flow of the meter.
[0010] The data processing method described above, when the meter does not have a check valve, due to changes in pipeline pressure, water, gas and other reverse flows may occasionally occur, which causes the meter to reverse. The preset difference is determined according to the nominal flow of the meter and the time difference between the current electronic reading and the last correct reading. If the difference between the current electronic reading and the last correct reading is within the preset difference range, it indicates that the current electronic reading is caused by meter reversal. Further, by determining the cause of misreading, the data is corrected in a targeted manner, which further ensures the accuracy of correction.
[0011] In combination with the first aspect, the second correction step can comprise: determining that the current electronic reading is a reverse reading caused by meter reversal, and not storing the current electronic reading.
[0012] The data processing method described above, when it is determined that the incorrect current electronic reading is caused by meter reversal, the mechanical reading of the current water meter is consistent. However, by discarding the current electronic reading, the readability of the historical data of the meter saved in the database is maintained, and the convenience when analyzing the metering data of the meter in the later period is improved.
[0013] Optionally, the third correction step comprises: judging whether the last correct reading has a marked corrected weight digit; if yes, performing a fourth correction step; if no, performing a fifth correction step; wherein the fourth correction step comprises: replacing the digit on the weight digit corresponding to the current electronic reading with the digit of the corrected weight digit to obtain a replacement correction reading; comparing the replacement correction reading with the last correct reading in the database; if the replacement correction reading is less than the last correct reading in the database, judging whether the difference between the replacement correction reading and the last correct reading is less than the preset difference; if yes, determining that the replacement correction reading is a reverse reading caused by the meter reverse, if no, performing the fifth correction step; if the replacement correction reading is not less than the last correct reading in the database, judging whether the difference between the replacement correction reading and the last correct reading is less than the preset difference; if yes, the replacement correction reading will be used as the corrected reading of the current electronic reading, and the corrected weight digit is marked and stored in the database; if no, performing the fifth correction step.
[0014] The above data processing method, when performing the third correction step to correct the data, can know whether the last correct reading is corrected by judging whether the last correct reading has a marked corrected weight digit, if yes, the digit on the weight digit corresponding to the current electronic reading is directly replaced with the digit of the corrected weight digit of the last correct reading, and the replacement correction reading is obtained. Then, the replacement correction reading is verified by comparing the size of the replacement correction reading with the last correct reading and comparing the difference between the two with the preset difference, to determine whether the replacement correction reading is correct. The verified data is stored in the database as the corrected correct reading, and the corrected weight digit is marked, so as to be used in the next data correction. Therefore, the correction method of directly replacing the digits on the same weight digits is simple and fast, and the efficiency of data processing is improved. Meanwhile, before the replacement correction reading is used as the corrected correct reading, the correctness of the replacement correction reading is verified, so as to ensure the accuracy of data processing.
[0015] Optionally, the fifth correction step comprises: calculating the readings possibly appearing between the two time points of the last correct reading and the current electronic reading as a set of pending current electronic readings; matching the digit on each weight digit of each of the set of pending current electronic readings with the digit on the same weight digit of the current electronic reading to obtain the matching degree of each of the set of pending current electronic readings with the current electronic reading; and taking the set of pending current electronic readings with the highest matching degree as the matching correction reading of the current electronic reading, marking the corrected weight digit, and storing in the database.
[0016] The data processing method can ensure the accuracy of the reading correction, because when the current electronic reading to be corrected meets the condition of the fifth correction step, the reading of the instrument is a discrete number, the time length from the last correct reading to the current electronic reading can be used to determine all possible readings in the time period, and the correct reading must exist in the readings. In addition, the current electronic reading is a misreading based on the correct reading, and the misreading is caused by the partial weight digits not meeting the condition. Therefore, compared with the last correct reading, the current electronic reading has a higher matching degree with the correct reading. Conversely, the correct reading is naturally the reading with the highest matching degree when the possible readings are matched with the current electronic reading one by one. Therefore, the accuracy of the reading correction is ensured.
[0017] With reference to the first aspect, optionally, the calculation of the possible readings between the two time points of the last correct reading and the current electronic reading as the set of undetermined current electronic readings comprises: calculating a maximum theoretical value at the current time point according to the nominal flow of the instrument and the time length between the two time points; and taking all readings between the maximum theoretical value and the last correct reading as the set of undetermined current electronic readings.
[0018] The data processing method can further ensure the accuracy of the reading correction, by determining the maximum theoretical value at the current time point according to the nominal flow of the instrument, taking all possible readings between the last correct reading and the maximum theoretical value as the set of readings, and taking the possible reading with the highest matching degree as the correct reading.
[0019] With reference to the first aspect, optionally, the taking of the undetermined current electronic reading with the highest matching degree as the first corrected reading of the current electronic reading and the marking of the corrected weight digits comprises: if there are two or more undetermined current electronic readings with the highest matching degree, obtaining a set of instrument change values in the same time period within a preset period and calculating a tail-cut mean value, and selecting one closest to the sum of the last correct reading and the tail-cut mean value as the matching corrected reading.
[0020] The data processing method can still accurately correct the current electronic reading to be corrected in the special case, by obtaining the instrument change values in the same time period within a preset period as a set of change values and calculating a tail-cut mean value, and selecting one closest to the sum of the last correct reading and the tail-cut mean value as the corrected correct reading.
[0021] With reference to the first aspect, optionally, if the current electronic reading is not less than the last correct reading in the database, it is determined whether the difference between the current electronic reading and the last correct reading in the database is greater than a preset difference value, and if yes, the first correction step is performed.
[0022] The data processing method further judges whether the difference between the current electronic reading and the last correct reading exceeds a preset difference value, to determine whether the current electronic reading needs to be corrected, thereby further ensuring the accuracy of the correction of the instrument reading.
[0023] In a second aspect, the embodiments of the present application further provide a data processing device applied to correction of an incorrect instrument reading, which comprises: an acquisition module configured to acquire a current electronic reading of the instrument; a comparison module configured to compare the current electronic reading with a last correct reading in a database; and a first execution module configured to execute a first correction step when the current electronic reading is less than the last correct reading in the database, wherein in the first correction step, if it is determined that the difference between the current electronic reading and the last correct reading in the database is not greater than a preset difference value, a second correction step is executed; and if it is determined that the difference between the current electronic reading and the last correct reading in the database is less than the preset difference value, a third correction step is executed.
[0024] The data processing device provided by the embodiments has the same beneficial effects as the data processing method provided by the first aspect or any one of the optional implementation manners of the first aspect, which will not be repeated here.
[0025] In a third aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the method described above is executed.
[0026] The computer readable storage medium provided by the embodiments has the same beneficial effects as the data processing method provided by the first aspect or any one of the optional implementation manners of the first aspect, which will not be repeated here.
[0027] In summary, the data processing method, device and storage medium provided by the application ensure the accuracy of the correction by taking different correction methods according to the size relationship between the current electronic reading and the last correct reading and the size relationship between the difference between the two and the preset difference, thereby avoiding the problem that it is extremely inconvenient to analyze the metering data in the later period due to data loss. At the same time, the problem of waste of time, labor and material costs caused by the need to replace the meter parts when the reading error occurs is solved. In the specific correction method, all possible readings between the current time and the last correct reading are obtained through the nominal flow of the meter, and the correct reading after correction is selected as the one with the highest matching degree, ensuring the accuracy of the correction. At the same time, the efficiency of data processing is further improved by judging that the last correct reading can be replaced by the number of the weight digit marked. The weight digit of the correct reading after each correction is marked in the method, so as to be used for the next reading correction. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments of the application. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0029] Figure 1 The existing mechanical and electrical reading comparison chart provided by the application;
[0030] Figure 2 The flowchart of the data processing method provided by the embodiment of the application;
[0031] Figure 3 The detailed flowchart of the third correction step provided by the embodiment of the application;
[0032] Figure 4 The detailed flowchart of the fourth correction step provided by the embodiment of the application;
[0033] Figure 5 The detailed flowchart of the fifth correction step provided by the embodiment of the application;
[0034] Figure 6 The flowchart of the water meter misreading correction method provided by the embodiment of the application;
[0035] Figure 7 The functional module schematic diagram of the data processing device provided by the embodiment of the application. DETAILED DESCRIPTION
[0036] The embodiments of the technical solutions of the present application will be described in detail below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0038] In the description of the embodiments of the present application, the technical terms "first", "second" and the like are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the technical features indicated. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.
[0039] In the prior art, when the maintenance personnel find that the instrument electromechanical reading is inconsistent, the usual treatment is to exclude the abnormal data, and replace the electromechanical conversion part (meter head) of the water meter. Some wet-type water meters even need to stop water to replace the meter head. Such treatment method leads to the problems of time, labor, material cost waste caused by replacing instrument parts and inconvenience for analyzing instrument data in later period.
[0040] Therefore, the applicant takes the water meter as an example, and makes statistics on the electromechanical reading of the water meter in the prior art. Please see Figure 1 , Figure 1 The electromechanical reading comparison chart in the prior art provided by the present application. Among them, the system water consumption refers to the electronic reading of the water meter, and the actual water consumption refers to the mechanical reading of the water meter. As can be seen from the figure, in the electromechanical reading comparison of the applicant in the time period of 10:00-20:00, the time period of 11:00-17:00 lacks electronic reading. In view of this problem, the applicant finds that due to the lack of a method for correcting the instrument electronic reading, when the electromechanical reading error occurs, the instrument parts need to be replaced, and the abnormal data is excluded, thereby increasing the labor, time, material cost, and lacking data when analyzing the instrument data in later period. Therefore, the present application provides a data processing method, device and storage medium to solve the problems existing in the prior art.
[0041] In order to facilitate the understanding of the embodiments provided by the present application, first, still taking the water meter as an example, a set of water meter electromechanical readings are provided, as shown in Table 1. As can be seen from Table 1, the abnormal data of inconsistent electromechanical readings are in the rows of serial numbers 3-9, and the rest are normal data of consistent electromechanical readings.
[0042] Table 1
[0043]
[0044]
[0045] Based on the above prior art, there is a lack of correction means for instrument readings. The present application provides a data processing method, device and storage medium to solve the above technical problems. Specifically, please refer to the embodiments and drawings provided by the present application.
[0046] Please refer to Figure 2 , Figure 2 is a flowchart of the data processing method provided by the embodiments of the present application. The specific process shown in Figure 2 will be described in detail below.
[0047] Step S220: Obtain the current electronic reading of the instrument.
[0048] In the above step S220, a collection and transmission module can be installed on the instrument to convert the mechanical reading of the instrument into an electronic reading through electromechanical conversion.
[0049] After step S220, step S240 is performed: compare the current electronic reading with the last correct reading in the database.
[0050] In the above step S240, by accessing the database, the last correct reading before the current electronic reading can be retrieved from the database, and the last correct reading is derived from the reading corrected or confirmed by the data processing method provided by the present application last time. It should be understood that the correct reading before the last correct reading is used for correction by the data processing method provided by the present application last time, and so on. Therefore, before implementing the data processing method provided by the present application, a preparation work needs to be completed. The content is: by artificial reading and checking, compare the first or several electronic readings of the instrument with the mechanical readings of the instrument, and store the consistent mechanical and electronic readings in the database; if the mechanical and electronic readings are inconsistent, manually correct and mark the corrected weight digits, and store in the database.
[0051] In step S240, if the current electronic reading is less than the last correct reading in the database, a first correction step is performed.
[0052] The first correction step includes:
[0053] Step S260: Determine whether the difference between the current electronic reading and the last correct reading in the database is not greater than a preset difference; if not, perform a second correction step; if yes, perform a third correction step.
[0054] In step S260, if it is determined that the difference between the previous electronic reading and the last correct reading in the database is not greater than the preset difference, it is indicated that the difference between the current electronic reading and the last correct reading is within the preset difference range, and then the second correction step is performed; if it is determined that the difference between the previous electronic reading and the last correct reading in the database is greater than the preset difference, it is indicated that the difference between the current electronic reading and the last correct reading is not within the preset difference range, and then the third correction step is performed.
[0055] In the above implementation process, when the current reading of the meter is obtained, if the current reading is smaller than the last correct reading in the database, it is indicated that the current reading is incorrect and needs to be corrected. In the correction, according to whether the difference between the current reading and the last correct reading exceeds the preset difference, the second correction step or the third correction step is performed respectively, so as to ensure the accuracy of the correction, and further avoid the problem that it is extremely inconvenient to analyze the metering data of the meter in the later period due to data loss. At the same time, the problems of time, labor and material cost waste caused by replacing meter parts when the reading error occurs are solved.
[0056] In a possible implementation, the preset difference in step S260 is determined according to the nominal flow of the meter.
[0057] Specifically, the time difference between the collection time of the current electronic reading and the collection time of the last correct reading is determined, and the preset difference is obtained according to the product of the time difference and the nominal flow of the meter.
[0058] In the above implementation process, when the meter does not have a check valve, due to the change of pipeline pressure, water, gas and other reverse flows may occasionally occur, causing the meter to reverse. The preset difference is determined according to the nominal flow of the meter and the time difference between the current electronic reading and the last correct reading. If the difference between the current electronic reading and the last correct reading is within the preset difference range, it is indicated that the current electronic reading is caused by meter reversal. Further, by determining the cause of the reading error, the data is corrected in a targeted manner, further ensuring the accuracy of the correction.
[0059] In a possible implementation, please refer to Figure 3 , Figure 3 is a detailed flowchart of the third correction step provided by the embodiment of the present application, and the second correction step in step S260 includes:
[0060] Step S261: determining that the current electronic reading is a reverse reading caused by meter reversal, and not storing the current electronic reading.
[0061] When it is determined in step S261 that the current electronic reading is caused by the meter inversion, the electromechanical reading of the current water meter is consistent. However, the current electronic reading is not stored because it does not have enough substantial meaning for measuring the actual flow used by the user. Of course, the skilled in the art can store the inverted reading according to the actual needs. However, in order to avoid the interference of the data to the data processing method provided by the embodiments of the present application, a specific identifier can be added when the inverted reading is stored.
[0062] In the above implementation process, by discarding the current electronic reading, the readability of the meter history data stored in the database is maintained, and the convenience in analyzing the metering data of the meter at a later time is improved.
[0063] In an embodiment, please refer to Figure 3 , Figure 3 is a detailed flowchart of the third correction step provided by the embodiments of the present application, and the third correction step in step S260 includes:
[0064] Step S262: judging whether the last correct reading is marked with the corrected weight digit.
[0065] If yes, the fourth correction step is executed; if no, the fifth correction step is executed.
[0066] In step S262, whether the last correct reading is marked with the corrected weight digit is derived from the relevant information confirmed or stored in the database during the last correction.
[0067] In an embodiment, please refer to Figure 4 , Figure 4 is a detailed flowchart of the fourth correction step provided by the embodiments of the present application, and the fourth correction step in step S262 includes:
[0068] Step S2621: replacing the digit on the weight digit corresponding to the current electronic reading with the digit of the corrected weight digit of the last correct reading to obtain a replaced correction reading.
[0069] In step S2621, because the last correct reading is marked with the corrected weight digit, the digit on the weight digit corresponding to the current electronic reading is directly replaced with the digit of the corrected weight digit of the last correct reading.
[0070] For example, taking the data in Table 1 above with serial numbers 3 and 4, in serial number 3, the electronic reading of the water meter is "10024", while the mechanical reading of the water meter, i.e. the correct reading, is "10924". Then "10024" should be corrected to "10924", and when the correction is completed, "10924" is taken as the last correct reading, and the corrected weight digit is marked: the difference between the correct reading "10924" and the abnormal reading "10024" is that the digit in the hundreds place is "9" and "0" respectively. The digit "9" in the hundreds place of the corrected correct reading "10924" is marked as the corrected weight digit, and is stored in the database. In serial number 4, the electronic reading is "10025", and when it is judged that it is abnormal data and the correction mode in step S2621 is met, the last correct reading "10924" is obtained from the database, and the marked corrected weight digit is the digit "9" in the hundreds place. Therefore, the digit "9" in the hundreds place is used to replace the digit in the hundreds place in the electronic reading "10025" in serial number 4, and the corrected replacement corrected reading "10925" is obtained.
[0071] Step S2622: The replacement corrected reading is compared with the last correct reading in the database.
[0072] If the replacement corrected reading is less than the last correct reading in the database, step S2623 is performed: whether the difference between the replacement corrected reading and the last correct reading is less than a preset difference value.
[0073] If yes, step S2624 is performed: the replacement corrected reading is determined to be a reverse reading caused by meter reversal.
[0074] In step S2624, the replacement corrected reading obtained by S2621 is a reverse reading caused by meter reversal, and the reverse reading also does not have sufficient substantive meaning for the measurement of the actual flow used by the user, and therefore the replacement corrected reading is not stored.
[0075] If no, the fifth correction step is performed.
[0076] If the replacement corrected reading is not less than the last correct reading in the database, step S2625 is performed: whether the difference between the replacement corrected reading and the last correct reading is less than a preset difference value.
[0077] If yes, step S2626 is performed: the replacement corrected reading is taken as the corrected reading of the current electronic reading, the corrected weight digit is marked, and is stored in the database.
[0078] If no, the fifth correction step is performed.
[0079] The steps S2622 to S2626 are essentially the same as the steps S240 to S261, and thus are not described herein.
[0080] In the implementation process, when the third correction step is performed to correct the data, whether the last correct reading is corrected can be known by judging whether the last correct reading is marked with the corrected weight digit. If yes, the number of the corrected weight digit of the last correct reading is directly used to replace the number of the weight digit corresponding to the current electronic reading, so that the replacement correction reading is obtained. Then, the replacement correction reading is verified by comparing the replacement correction reading with the last correct reading and comparing the difference between the two readings with the preset difference, to determine whether the replacement correction reading is correct. The verified data is stored in the database as the corrected correct reading, and the corrected weight digit is marked, so as to be used in the next data correction. Therefore, the correction method of directly replacing the number of the same weight digit is simple and fast, and the efficiency of data processing is improved. Meanwhile, before the replacement correction reading is used as the corrected correct reading, the replacement correction reading is verified to be correct, so that the accuracy of data processing is ensured.
[0081] In one embodiment, please refer to Figure 5 , Figure 5 is a detailed flowchart of the fifth correction step provided by the embodiment of the present application, wherein the fifth correction step includes:
[0082] Step S2627: calculate the readings that may occur between the two time points of the last correct reading and the current electronic reading as the current electronic reading set to be determined.
[0083] In the step S2627, since the readings of the instrument are discrete numbers, the readings that may occur in the time period between the last correct reading and the current electronic reading can be determined according to the time length of the last correct reading.
[0084] For example, the water meter caliber is 32 mm, the data on the water meter is received at 12:00 on March 20, 2022, the current electronic reading is 10024, and the last correct reading is 10921. According to the time length (1 hour) and the nominal flow rate (10 tons / hour) of the two readings, the theoretical maximum reading 10931 can be calculated. All the readings in the interval from the last correct reading to the theoretical maximum reading are taken as the current electronic reading set to be determined, as shown in Table 2.
[0085] Table 2
[0086] Serial number Pending current electronic reading Current electronic reading Matching degree 1 10921 10024 3 2 10922 10024 3 3 10923 10024 3 4 10924 10024 4 5 10925 10024 3 6 10926 10024 3 7 10927 10024 3 8 10928 10024 3 9 10929 10024 3 10 10930 10024 2 11 10931 10024 2
[0087] Step S2628: match the number on each weight digit of each tentative current electronic reading with the number on the same weight digit of the current electronic reading to obtain the matching degree of each tentative current electronic reading with the current electronic reading.
[0088] In step S2628, the tentative current electronic reading is compared with the current electronic reading to determine whether the numbers on the same weight digit are the same. For example, if the numbers on only one weight digit are the same, the matching degree is "1"; if the numbers on two weight digits are the same, the matching degree is "2"; if the numbers on three weight digits are the same, the matching degree is "3"; and so on. The matching degree of each tentative current electronic reading with the current electronic reading is obtained. The relationship between the tentative current electronic readings and the matching degrees is shown in Table 2.
[0089] Step S2629: the tentative current electronic reading with the highest matching degree is taken as the matching correction reading of the current electronic reading and the corrected weight digit is marked and stored in the database.
[0090] For example, as shown in Table 2, the data with the highest matching degree is "10924" with a matching degree of "4" in sequence number 4. Therefore, "10924" is taken as the matching correction reading and the corrected weight digit is marked and stored in the database.
[0091] In the above implementation process, when the current electronic reading to be corrected meets the condition of the fifth correction step, since the readings of the meter are discrete numbers, the possible readings in the time period can be determined according to the time length from the last correct reading to the current electronic reading, and the correct reading of the current electronic reading must exist in these readings. Moreover, the misreading of the current electronic reading is based on the correct reading and is formed by the partial weight digits not meeting the condition. Therefore, compared with the last correct reading, the current electronic reading has a higher matching degree with the correct reading. Therefore, the possible readings are matched with the current electronic reading one by one, and the correct reading with the highest matching degree is naturally obtained.
[0092] In one embodiment, step S2627 includes:
[0093] Step S2627a: calculate the maximum theoretical value at the current time according to the nominal flow of the meter and the time length between the two times.
[0094] In step S2627a, specifically, the time length between the two times is determined according to the collection time of the current electronic reading and the collection time of the last correct reading, the maximum theoretical change value of the meter reading in the time period is determined according to the product of the nominal flow of the meter and the time length, and finally the sum of the last correct reading and the maximum theoretical change value is obtained to obtain the maximum theoretical value at the current time.
[0095] Step S2627b: all the readings between the maximum theoretical value and the last correct reading are taken as the current electronic reading set to be determined.
[0096] In step S2627b, since the instantaneous flow rate of the gas, liquid, etc. flowing through the meter will not exceed the nominal flow rate of the meter when the meter is working, all the readings between the maximum theoretical value obtained in step S2627a and the last correct reading are theoretically possible to be the correct reading at the current time.
[0097] In the above implementation process, the maximum theoretical value at the current time is determined by the nominal flow rate of the meter, all the possible readings between the last correct reading and the maximum theoretical value are taken as the reading set, and the most likely appearing reading with the highest matching degree is taken as the correct reading, which further ensures the accuracy of the reading correction.
[0098] In one embodiment, the fifth correction step further comprises:
[0099] If there are two or more current electronic readings to be determined with the highest matching degree, step S2630 is performed to obtain the set of meter change values in the same time period within the preset period to calculate the trimmed mean, and select one closest to the sum of the last correct reading and the trimmed mean as the matching correction reading.
[0100] In step S2630, for example, taking the data with serial numbers 2 and 3 in Table 1 above as an example, the collection time of the current reading is "2022-3-20 12:00" in serial number 3, and the time of the last correct reading is "2022-3-20 11:00" in serial number 2. The preset period can be the last 7 weeks, and 2022-3-20 is Sunday. The change value of the meter reading, i.e. the water consumption, in the period "11:00-12:00" of each Sunday in the last 7 weeks is obtained as the set of meter change values. After removing the maximum and minimum values in the set of change values, the average value is calculated, and finally one closest to the sum of the last correct reading and the trimmed mean is selected as the matching correction reading.
[0101] Specifically, in order to fully illustrate the data processing method used when there are two or more current electronic readings to be determined with the highest matching degree in the embodiments of the present application, the current electronic reading is taken as "10984" again for illustration. The meter size is 40 mm, and the nominal flow rate is 16 tons / hour. The set of current electronic readings to be determined obtained by the foregoing method is shown in Table 3.
[0102] Table 3
[0103]
[0104]
[0105] As can be seen in Table 4, the highest matching degree is “4”, and the two data of “10924” and “10934” are the pending current electronic readings with a matching degree of 4. At this time, the acquisition time of the current electronic reading is “2022-3-20 12:00”, the time of the last correct reading is “2022-3-20 11:00”, and 2022-3-20 is Sunday. The water consumption data in the period from 11:00 to 12:00 on all Sundays in the last 7 weeks is obtained from the water meter historical data, as shown in Table 4.
[0106] Table 4
[0107]
[0108]
[0109] After removing the maximum value and the minimum value, the average value PGross = 2.6 is obtained. The data “10924” has a water consumption of 3 tons in the period from 11:00 to 12:00, and the data “10934” has a water consumption of 13 tons in the period from 11:00 to 12:00. According to the method in step S2630, “10924” with a water consumption closer to the average value is taken as the matching corrected reading.
[0110] In the above implementation process, when there are two or more pending current electronic readings with the highest matching degree, the meter change value in the same time period within the preset period is obtained as a change value set, and the tail cut mean value is calculated, and the one closest to the sum of the last correct reading and the tail cut mean value is selected as the corrected correct reading, so that for this special case, the above correction steps can still accurately correct the current electronic readings that need to be corrected.
[0111] In one embodiment, the data processing method further comprises:
[0112] If the current electronic reading is not less than the last correct reading in the database, step S280 is performed: determining whether the difference between the current electronic reading and the last correct reading in the database is greater than a preset difference.
[0113] If yes, the first correction step is performed.
[0114] In the above step S280, whether the difference between the current electronic reading and the last correct reading in the database is greater than a preset difference is determined to determine whether the current electronic reading is within the range of the theoretical value determined according to the parameters of the meter itself.
[0115] The implementation process further judges whether the difference between the current electronic reading and the last correct reading exceeds a preset difference value when the current electronic reading is not less than the last correct reading, to determine whether the current electronic reading needs to be corrected, thereby further ensuring the accuracy of the correction of the meter reading.
[0116] For further understanding of the data processing method provided by the embodiments of the present application, please refer to Figure 6 Taking a water meter as an example, Figure 6 A flowchart of the water meter misreading correction method provided by the embodiments of the present application.
[0117] First, the water meter profile is input, including the caliber of the water meter and the current dial reading. The water meter caliber information can be used to query the nominal flow of the table according to the Water Meter Caliber and Corresponding Flow Table shown in Table 5, as the calculation parameters of the flow verification model and the water meter reverse flow model; the current dial reading is manually read and checked, which can be used as the first trusted data of the meter.
[0118] Table 5
[0119] Water meter diameter / mm Minimum flow rate / m 3 ]] Overload traffic / m 3 ]] Nominal flow rate / m 3 ]] 15 0.03 3.125 2.5 20 0.05 5 4 25 0.07 7.87 6.3 32 12.5 10 40 0.2 20 16 50 0.45 31.25 25 80 0.9 50 40 100 1.5 78.75 63
[0120] There are two models to determine whether the data is abnormal data.
[0121] The first one is the flow verification model. When the current reading is greater than the last valid data, the difference between the two readings / the time difference between the two readings is the instantaneous flow. If the calculated instantaneous flow is within the nominal flow range of the water meter, the flow verification of the current reading is passed, the data is valid, otherwise, it is not passed, and the data is abnormal;
[0122] The second one is the water meter reverse flow model. When the current reading is less than the last valid reading, the difference between the two readings / the time difference between the two readings is the reverse instantaneous flow. If the reverse instantaneous flow is within the nominal flow range of the water meter, the current reading is valid data, but in order to maintain the readability of the data, the reverse flow data is not saved. If the data does not meet the reverse flow model, the current reading is determined as abnormal data.
[0123] Next, the system receives the latest current electronic reading newValue of the water meter, and enters the data processing flow.
[0124] Step 1: Obtain the last valid reading LastValue of the water meter, and compare the current reading newValue with the last valid reading LastValue;
[0125] Step 2: The current reading newValue is greater than the last valid reading LastValue, and the flow verification is performed on the two readings;
[0126] Step 3: The flow verification is passed, the current reading is normal data, and is marked as a reliable reading without correction, and the data is saved;
[0127] Step 4: The flow verification in Step 2 is not passed, and the data is determined to be abnormal data, and the correction process is entered;
[0128] Step 5: The current reading newValue in Step 1 is less than the last valid reading LastValue, and the water meter reverse flow determination is performed. If the determination is a reverse flow condition, the reading is not a misreading data and does not need to be repaired, and the reverse flow data does not need to be saved;
[0129] Step 6: Check whether the last valid data LastValue is reliable data;
[0130] Step 7: LastValue is reliable data, and LastValue is the last reliable data assigned to LastValueT;
[0131] Step 8: According to the instantaneous flow rule, the last reliable data LastValueT and the current collection data newValue in the two time periods are arranged to obtain an array List1;
[0132] Step 9: The digits of each digit of newValue are compared with the digits of the same digit in the array List1 in turn. If the digits of the same digit are the same, the matching value is increased by 1;
[0133] Step 10: Whether there is a data item with a matching value greater than 0 in List1, if not, determine that newValue is random code data and does not need to be repaired;
[0134] Step 11: If there is a matching data item in Step 10, take the one with the most matching items as the valid data. If there are multiple valid data, Step 19 is executed;
[0135] Step 12: Save the valid data Fvalue, mark it as valid data, record the difference part, and the original data newValue;
[0136] Step 13: In Step 6, check whether the last valid data LastValue is reliable data. Check whether the saved difference part of newValue and the last valid data LastValue is the same;
[0137] Step 14: The difference between the new value and the last valid data LastValue is the same as the difference position, and the same position of the new value is replaced by the difference position of the LastValue, to obtain the new repaired data FValue;
[0138] Step 15: FValue is compared with LastValue to determine the size of the reading;
[0139] Step 16: FValue is smaller than the reading of LastValue, and it is verified whether FValue meets the water meter reverse flow condition, if it is the water meter reverse flow condition, the data does not need to be saved;
[0140] Step 17: FValue is greater than or equal to the reading of LastValue in step 15, and flow verification is performed, if the flow verification is passed, step 12 is entered;
[0141] Step 18: The modified FValue is still abnormal data, so it is necessary to re-correct the new value, to obtain the last trusted data LastValueT, and step 8 is entered;
[0142] Step 19: The usage in the same day and the same period in the last 7 weeks is obtained from the water meter historical data, and the average value PGross is obtained after removing the maximum value and the minimum value; the usage closest to Pgross in the highest matching degree is taken as the effective data Fvalue.
[0143] Please refer to Figure 7 , Figure 7 is a functional module schematic diagram of the data processing apparatus 700 provided in the embodiment. Each module in the data processing apparatus 700 in the embodiment is used to execute each step in the processing method embodiment of the transaction dispute. The data processing apparatus 700 includes an acquisition module 710, a comparison module 720, and a first execution module 730, and a pushing module; wherein the acquisition module 710 is used to acquire the current electronic reading of the instrument; the comparison module 720 is used to compare the current electronic reading with the last correct reading in the database; the first execution module 730 is used to execute the first correction step when the current electronic reading is smaller than the last correct reading in the database; wherein in the first correction step, if it is determined that the difference between the current electronic reading and the last correct reading in the database is not greater than a preset difference, the second correction step is executed; if it is determined that the difference between the current electronic reading and the last correct reading in the database is less than the preset difference, the third correction step is executed.
[0144] In one embodiment, the first execution module 730 is specifically configured to determine that the current electronic reading is a reverse reading caused by the meter reverse if it is determined that the difference between the current electronic reading and the last correct reading in the database is not greater than the preset difference, and not store the current electronic reading.
[0145] In one embodiment, the first execution module 730 is further specifically configured to determine whether the last correct reading has a marked corrected weight digit if it is determined that the difference between the current electronic reading and the last correct reading in the database is greater than the preset difference, execute a fourth correction step if the last correct reading has the marked corrected weight digit, and execute a fifth correction step if the last correct reading does not have the marked corrected weight digit. The fourth correction step includes replacing the digit in the corresponding weight digit of the current electronic reading with the digit in the corrected weight digit to obtain a replacement correction reading, comparing the replacement correction reading with the last correct reading in the database, determining whether the difference between the replacement correction reading and the last correct reading is less than the preset difference if the replacement correction reading is less than the last correct reading in the database, determining that the replacement correction reading is a reverse reading caused by the meter reverse if the difference between the replacement correction reading and the last correct reading is less than the preset difference, and executing the fifth correction step if the difference between the replacement correction reading and the last correct reading is not less than the preset difference.
[0146] In one embodiment, the first execution module 730 is further specifically configured to calculate the readings that can occur between the two time points of the last correct reading and the current electronic reading as the set of pending current electronic readings when the fifth correction step is executed, match the digit in each weight digit of each pending current electronic reading with the digit in the same weight digit of the current electronic reading to obtain the matching degree of each pending current electronic reading with the current electronic reading, and store the pending current electronic reading with the highest matching degree as the matching correction reading of the current electronic reading and mark the corrected weight digit in the database.
[0147] In one embodiment, the first execution module 730 is further specifically configured to calculate the maximum theoretical value at the current time point according to the nominal flow of the meter and the time length between the two time points when the set of pending current electronic readings is calculated, and take all the readings between the maximum theoretical value and the last correct reading as the set of pending current electronic readings.
[0148] In one embodiment, the first execution module 730 is further specifically configured to obtain the set of meter change values in the same time period within the preset period of time to calculate the trimmed mean when the pending current electronic reading with the highest matching degree is taken as the first correction reading of the current electronic reading and the corrected weight digit is marked, select one of the trimmed mean and the last correct reading that is closest to the sum of the last correct reading and the trimmed mean as the matching correction reading if there are two or more pending current electronic readings with the highest matching degree.
[0149] In one embodiment, please continue to refer toFigure 7 The data processing apparatus 700 further comprises a second execution module 740, wherein the second execution module 740 is configured to: if the current electronic reading is not less than the last correct reading in the database, determine whether a difference between the current electronic reading and the last correct reading in the database is greater than a preset difference; and if yes, execute the first correction step.
[0150] It should be understood that the apparatus corresponds to the data processing method embodiments described above, and can execute each step involved in the method embodiments described above. The specific functions of the apparatus can be referred to the description above. To avoid repetition, the detailed description is appropriately omitted here. The apparatus comprises at least one software function module which can be stored in the form of software or firmware in the memory or solidified in the operating system (OS) of the apparatus.
[0151] The embodiments of the present application further provide a storage medium, and the storage medium stores a computer program. The computer program is run by a processor to execute the method described above.
[0152] The storage medium can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk.
[0153] It should be understood that the disclosed apparatus and method can also be implemented in other manners. The embodiments described above are merely exemplary embodiments of the present application. In the embodiments of the present application, the described apparatus embodiments are merely schematic, and the functions of the flowcharts and the block diagrams can be implemented in other manners. For example, the flowcharts and the block diagrams can be implemented by using a computer program, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, a processor, a controller, another hardware device, or a combination thereof. In this case, the disclosed apparatus and method can be implemented in a form of a computer program product. The computer program product is directly downloadable from a network, or stored in a computer-readable storage medium, and includes a plurality of instructions. When the instructions are executed by a processor, the processor performs the method according to the embodiments of the present application.
[0154] In addition, each functional module in each of the embodiments of the present application can be integrated together to form a separate part, or each module can exist independently, or two or more modules can be integrated to form a separate part.
[0155] The above description is merely optional implementation of the embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.
Claims
1. A data processing method, characterized by, The method is applied to meter misreading correction; the method comprises: acquiring a current electronic reading of the meter; comparing the current electronic reading with a last correct reading in a database; if the current electronic reading is less than the last correct reading in the database, performing a first correction step; wherein, in the first correction step, if it is determined that a difference between the current electronic reading and the last correct reading in the database is not greater than a preset difference, performing a second correction step; if it is determined that the difference between the current electronic reading and the last correct reading in the database is greater than the preset difference, performing a third correction step; wherein, the second correction step comprises: determining that the current electronic reading is a reverse reading caused by meter reversal, and not storing the current electronic reading; the third correction step comprises: judging whether the last correct reading has a marked corrected weight digit; if yes, performing a fourth correction step; if no, performing a fifth correction step; wherein, the fourth correction step comprises: replacing a digit in a corresponding weight digit of the current electronic reading with a digit in the corrected weight digit to obtain a replacement correction reading; comparing the replacement correction reading with the last correct reading in the database; if the replacement correction reading is less than the last correct reading in the database, judging whether a difference between the replacement correction reading and the last correct reading is less than the preset difference; if yes, determining that the replacement correction reading is a reverse reading caused by meter reversal, if no, performing the fifth correction step; if the replacement correction reading is not less than the last correct reading in the database, judging whether a difference between the replacement correction reading and the last correct reading is less than the preset difference; if yes, taking the replacement correction reading as a corrected reading of the current electronic reading, marking the corrected weight digit, and storing in the database; if no, performing the fifth correction step; wherein, the fifth correction step comprises: calculating readings possibly occurring between two time points of the last correct reading and the current electronic reading as a set of pending current electronic readings; matching a digit in each weight digit of each of the set of pending current electronic readings with a digit in the same weight digit of the current electronic reading to obtain a matching degree of each of the set of pending current electronic readings with the current electronic reading; taking the set of pending current electronic reading with the highest matching degree as a matching correction reading of the current electronic reading, marking the corrected weight digit, and storing in the database.
2. The data processing method according to claim 1, characterized in that, wherein, the preset difference is determined according to a nominal flow of the meter.
3. The data processing method of claim 1, wherein, the calculation of the readings possibly occurring between the two time points of the last correct reading and the current electronic reading as the set of pending current electronic readings comprises: calculating a maximum theoretical value of the current time point according to a nominal flow of the meter and a time length between the two time points; taking all readings between the maximum theoretical value and the last correct reading as the set of pending current electronic readings.
4. The data processing method of claim 1, wherein, The first correction read of the current electronic read is obtained by comparing the current electronic read with the last correct read in the database. If there are two or more of the current electronic reads with the highest matching degree, the tail-cut mean value of the instrument change value set in the same time period within a preset period is obtained, and one closest to the sum of the last correct read and the tail-cut mean value is selected as the matching correction read.
5. The data processing method of claim 1, wherein, The method further comprises: If the current electronic read is not less than the last correct read in the database; If the difference between the current electronic read and the last correct read in the database is greater than a preset difference value, the first correction step is performed. The device is applied to instrument read correction, and comprises:
6. A data processing apparatus, characterized by, An acquisition module is configured to acquire the current electronic read of the instrument. A comparison module is configured to compare the current electronic read with the last correct read in the database. A first execution module is configured to perform the first correction step when the current electronic read is less than the last correct read in the database. If the difference between the current electronic read and the last correct read in the database is not greater than a preset difference value, a second correction step is performed. If the difference between the current electronic read and the last correct read in the database is less than a preset difference value, a third correction step is performed. The second correction step comprises determining the current electronic read as a reverse read caused by instrument reverse, and not storing the current electronic read. The third correction step comprises determining whether the last correct read has a marked corrected weight digit, and performing a fourth correction step if the last correct read has the marked corrected weight digit, or performing a fifth correction step if the last correct read does not have the marked corrected weight digit. The fourth correction step comprises replacing the digit of the current electronic read with the digit of the corrected weight digit to obtain a replacement correction read, comparing the replacement correction read with the last correct read in the database, determining the replacement correction read as a reverse read caused by instrument reverse if the replacement correction read is less than the last correct read in the database, performing the fifth correction step if the replacement correction read is not less than the last correct read in the database, determining the replacement correction read as a reverse read caused by instrument reverse if the difference between the replacement correction read and the last correct read in the database is less than the preset difference value, or performing the fifth correction step if the difference between the replacement correction read and the last correct read in the database is not less than the preset difference value. The device is applied to instrument read correction, and comprises: An acquisition module is configured to acquire the current electronic read of the instrument. A comparison module is configured to compare the current electronic read with the last correct read in the database. A first execution module is configured to perform the first correction step when the current electronic read is less than the last correct read in the database. If the difference between the current electronic read and the last correct read in the database is not greater than a preset difference value, a second correction step is performed. If the difference between the current electronic read and the last correct read in the database is less than a preset difference value, a third correction step is performed. The second correction step comprises determining the current electronic read as a reverse read caused by instrument reverse, and not storing the current electronic read. The third correction step comprises determining whether the last correct read has a marked corrected weight digit, and performing a fourth correction step if the last correct read has the marked corrected weight digit, or performing a fifth correction step if the last correct read does not have the marked corrected weight digit. The fourth correction step comprises replacing the digit of the current electronic read with the digit of the corrected weight digit to obtain a replacement correction read, comparing the replacement correction read with the last correct read in the database, determining the replacement correction read as a reverse read caused by instrument reverse if the replacement correction read is less than the last correct read in the database, performing the fifth correction step if the replacement correction read is not less than the last correct read in the database, determining the replacement correction read as a reverse read caused by instrument reverse if the difference between the replacement correction read and the last correct read in the database is less than the preset difference value, or performing the fifth correction step if the difference between the replacement correction read and the last correct read in the database is not less than the preset difference value. The fifth modification step includes: calculating the possible readings between the time of the last correct reading and the time of the current electronic reading as the set of pending current electronic readings; matching the number on each weight digit of each of the set of pending current electronic readings with the number on the same weight digit of the current electronic reading to obtain the matching degree of each of the set of pending current electronic readings with the current electronic reading; taking the set of pending current electronic reading with the highest matching degree as the matching modified reading of the current electronic reading and marking the modified weight digit, and storing in the database.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the method in any one of claims 1 to 5.
Citation Information
Patent Citations
System calibration method of gas flowmeter
CN107421608A
Data processing method and device
WO2016206191A1