CN113873350A - Data acquisition method and system - Google Patents

Data acquisition method and system Download PDF

Info

Publication number
CN113873350A
CN113873350A CN202110956277.1A CN202110956277A CN113873350A CN 113873350 A CN113873350 A CN 113873350A CN 202110956277 A CN202110956277 A CN 202110956277A CN 113873350 A CN113873350 A CN 113873350A
Authority
CN
China
Prior art keywords
data
meter
instrument
reading
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110956277.1A
Other languages
Chinese (zh)
Other versions
CN113873350B (en
Inventor
周毅荣
曾文康
邓焯升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ake Technology Co ltd
Original Assignee
Guangdong Ake Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Ake Technology Co ltd filed Critical Guangdong Ake Technology Co ltd
Priority to CN202110956277.1A priority Critical patent/CN113873350B/en
Publication of CN113873350A publication Critical patent/CN113873350A/en
Application granted granted Critical
Publication of CN113873350B publication Critical patent/CN113873350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/80Arrangements in the sub-station, i.e. sensing device
    • H04Q2209/82Arrangements in the sub-station, i.e. sensing device where the sensing device takes the initiative of sending data
    • H04Q2209/823Arrangements in the sub-station, i.e. sensing device where the sensing device takes the initiative of sending data where the data is sent when the measured values exceed a threshold, e.g. sending an alarm

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The invention discloses a data acquisition method, which is used for preliminarily checking uploaded meter reading data; traversing the type data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the type of the meter; traversing the instrument data of various types of instrument data; and traversing fields in the instrument data, and classifying the fields according to the data types. The invention also discloses a data acquisition system, which comprises a data preliminary verification module, a model data traversal module, an instrument data traversal module and a field data traversal module: the data preliminary verification module is used for preliminarily verifying the uploaded meter reading data; the model data traversal module is used for traversing the model data of the preliminarily verified meter reading data, and sorting and classifying the meter reading data according to the model of the meter. The invention can solve the problem that the data acquisition and processing are difficult due to different data models or protocols of the existing instrument.

Description

Data acquisition method and system
Technical Field
The invention relates to the field of meter reading data acquisition, in particular to a data acquisition method and a data acquisition system.
Background
In recent years, with the rapid development of information technology, the increase of chip processing capacity and the reduction of cost, more and more traditional mechanical electricity meters, water meters, gas meters, energy meters and the like are replaced by intelligent meters. Because the intelligent instrument has the capability of data transmission, the intelligent instrument can replace the original complicated manual meter reading link, and the water fee, the electricity fee and the like used by a user can be calculated more timely and accurately. And with the wide popularization of intelligent mobile terminals, more and more users love paying the water and electricity charges at the intelligent mobile terminals.
The market has very many intelligent manufacturers of water, electricity, gas, steam, energy meters and other instruments, but the data protocols adopted by the instruments produced by different manufacturers are different from each other. Even if the meters are produced by the same manufacturer, the data protocols of the meters may have some differences due to different models. The calculation principles used by different meters are approximately the same, the user consumption is calculated by subtracting the meter reading collected last time from the meter reading collected this time, but some meters still have their special data processing and checking methods, such as: the reading of the electric meter needs to be multiplied by the set mutual inductance coefficient, the usage amount of the time method meter needs to be compared with the time interval between the current time and the last time, and the like.
Disclosure of Invention
The invention aims to provide a data acquisition method and a data acquisition system, which can solve the problem that the data acquisition and processing are difficult due to different data models or protocols of the existing instruments.
In order to solve the above technical problem, the present invention provides a data acquisition method, including: performing preliminary verification on the uploaded meter reading data; traversing the type data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the type of the meter; traversing the instrument data of various types of instrument data; and traversing fields in the instrument data, and classifying the fields according to the data types.
Preferably, the step of performing preliminary verification on the uploaded meter reading data comprises; carrying out sequence check and necessary field check on the uploaded data packet of the meter reading data; comparing the basic data of the data packet with the data in the system; and cleaning unauthorized instrument models in the data packet.
Preferably, the step of traversing the model data of the preliminarily verified meter reading data, and performing sorting and classification processing according to the model of the meter comprises: traversing the meter data of different models in the collected meter reading data; and inquiring the data structure record, the data table structure and the field of the uploaded data of the model, comparing the data of the three parties, and taking the intersection of the data.
Preferably, the step of traversing the meter data of each type of meter data includes: acquiring basic information of a meter, wherein the basic information comprises a meter model, a meter code and a meter address; inquiring the basic information of the instrument in a database, comparing the basic information with the basic information of the acquired instrument and judging whether the comparison is passed; if not, registering and alarming the error data; if the data is judged to be invalid, the gateway clock transaction sub-process is entered, in the process, the time of the meter reading data is taken and compared with the current system time data, if the comparison is not passed, the data is marked as invalid data, and the data is registered and alarmed.
Preferably, the step of traversing the fields in the meter data and classifying the fields according to the data types includes:
s501, classifying the fields according to data types, and screening out the fields for metering;
s502, judging whether the reading of the field for metering is negative or not,
if yes, S503 marks the data as invalid data, and executes S506,
s504, if not, then judging whether the corresponding meter is an ammeter or not,
s505, if yes, multiplying the reading by a mutual inductance coefficient, and then executing S506, otherwise, directly executing S506;
s506, judging whether the reading exceeds the maximum storage value of the data table field, and if the reading exceeds the maximum storage value, registering and alarming the data.
The invention also provides a data acquisition system, which comprises a data preliminary verification module, a model data traversal module, an instrument data traversal module and a field data traversal module: the data preliminary verification module is used for preliminarily verifying the uploaded meter reading data; the model data traversing module is used for traversing the model data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the model of the instrument; the instrument data traversal module is used for performing instrument data traversal on instrument data of various types; the field data traversal module is used for traversing fields in the instrument data and classifying the fields according to data types.
Preferably, the data preliminary verification module includes: the verification unit is used for performing sequence verification and necessary field verification on the uploaded data packet of the meter reading data; the comparison unit is used for comparing the basic data of the data packet with the data in the system; and the cleaning unit is used for cleaning unauthorized instrument models in the data packet.
Preferably, the model data traversal module includes: the model data traversing unit is used for traversing the meter data of different models in the collected meter reading data; and the query comparison unit is used for querying the data structure record, the data table structure and the field of the uploaded data of the model, comparing the data of the three parties and taking the intersection of the data.
Preferably, the meter data traversal module includes: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring basic information of a meter, and the basic information comprises a meter model, a meter code and a meter address; and the comparison and judgment unit is used for inquiring the basic information of the instrument in the database, comparing the basic information with the basic information of the acquired instrument and judging whether the comparison is passed, if not, registering and alarming the error data, if so, entering a gateway clock transaction sub-process, and in the process, taking the time of the meter reading data, comparing the time with the current system time data, if not, marking the data as invalid data, and registering and alarming the data.
Preferably, the field data traversal module includes: the classification screening unit is used for classifying the fields according to the data types and screening out the fields for metering; the reading judging unit is used for judging whether the reading of the field for metering is negative, if so, marking the data as invalid data, and entering the storage value judging unit, if not, judging whether the corresponding meter is an electric meter, if so, multiplying the reading by the mutual inductance coefficient and then entering the storage value judging unit, otherwise, directly entering the storage value judging unit; and the storage value judging unit is used for judging whether the reading value exceeds the maximum storage value of the data table field, and if the reading value exceeds the maximum storage value, the data is registered and alarmed.
The beneficial effects of the implementation of the invention are as follows:
according to the method, the uploaded meter reading data is preliminarily verified, the meter reading data after preliminary verification is subjected to model data traversal, sorting and classification processing according to the model of the meter, the meter data of various models is subjected to instrument data traversal, fields in the instrument data are traversed, and the fields are classified according to the data types. The invention can process the data of different types of water, electricity, gas, steam, energy type and time method instruments, covers most abnormal conditions and processes the abnormal conditions respectively. If a new instrument model is accessed into the platform, the invention can change the condition that one model corresponds to one data interface, greatly reduce the development amount of codes, reduce the development pressure of developers, and simultaneously can access the new instrument model very quickly and improve the experience of customers.
Drawings
FIG. 1 is a flow chart of a data collection method provided by the present invention;
FIG. 2 is a flow chart of a method of preliminary verification provided by the present invention;
FIG. 3 is a logical schematic of the preliminary verification provided by the present invention;
FIG. 4 is a sub-flow diagram of model data cleansing for preliminary verification provided by the present invention;
FIG. 5 is a flow chart of a method of model data traversal provided by the present invention;
FIG. 6 is a logical schematic of model data traversal provided by the present invention;
FIG. 7 is a field sifter flow diagram for model data traversal provided by the present invention;
FIG. 8 is a flow chart of a method of traversing meter data provided by the present invention;
FIG. 9 is a logical schematic of a meter data traversal provided by the present invention;
FIG. 10 is a gateway clock transaction sub-flow diagram for instrument data traversal provided by the present invention;
FIG. 11 is a quantum flow diagram of meter data traversal provided by the present invention;
FIG. 12 is a flow chart of a method for field data traversal provided by the present invention;
FIG. 13 is a logical schematic of field data traversal provided by the present invention;
FIG. 14 is a field data sort process sub-flow of field data traversal provided by the present invention;
FIG. 15 is a functional block diagram of a data acquisition system provided by the present invention;
FIG. 16 is a functional block diagram of a data preliminary verification module provided by the present invention;
FIG. 17 is a functional block diagram of a model data traversal module provided by the present invention;
FIG. 18 is a functional block diagram of a meter data traversal module provided by the present invention;
FIG. 19 is a functional block diagram of a field data traversal module provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings. It is only noted that the invention is intended to be limited to the specific forms set forth herein, including any reference to the drawings, as well as any other specific forms of embodiments of the invention.
As shown in fig. 1, the present invention provides a data acquisition method, including:
s101, performing primary verification on the uploaded meter reading data;
s102, traversing the type data of the preliminarily verified meter reading data, and sequencing and classifying the meter reading data according to the type of the meter;
s103, traversing the instrument data of various types of instrument data;
and S104, traversing the fields in the instrument data, and classifying according to the data types.
According to the method and the device, the uploaded meter reading data is preliminarily verified, the meter reading data after preliminary verification is subjected to model data traversal and is sorted and classified according to the model of the meter, the meter data of various models is subjected to meter data traversal, fields in the meter data are traversed, and the fields are classified according to the data types. The invention can process the data of different types of water, electricity, gas, steam, energy type and time method instruments, covers most abnormal conditions and processes the abnormal conditions respectively. If a new instrument model is accessed into the platform, the invention can change the condition that one model corresponds to one data interface, greatly reduces the development amount of codes, lightens the development pressure of developers, and simultaneously can access the new instrument model very quickly and improve the experience of customers.
As shown in fig. 2, preferably, the step of performing preliminary verification on the uploaded meter reading data includes;
s201, carrying out sequence check and necessary field check on the uploaded data packet of the meter reading data;
s202, comparing the basic data of the data packet with the data in the system;
and S203, cleaning the unauthorized instrument models in the data packet.
It should be noted that, first, the data uploaded by the data collector is preliminarily verified, and the data format is the JSON format, but is not limited thereto. The primary data verification mainly achieves the following purposes: 1. data loss caused by network fluctuation can be prevented; 2. attack of malicious data can be resisted to a certain extent, and the correctness of database data is ensured; 3. the storage of unauthorized models and instruments exceeding the authorized number in a warehouse can be prevented, and the benefit of a user is guaranteed.
Specifically, as shown in fig. 3 to 4, the data preliminary examination steps are described as follows:
judging whether the message data is empty; trying to carry out serialized JSON processing on the message data; after serialization, checking whether a data key exists, and the value is not null; inquiring basic information of the platform project, and if the project is in an expired state, discarding the data; and entering a model data cleaning sub-process, wherein the instrument model contained in the message data is compared with authorized instrument model information in the platform, so that the step can prevent dirty data from being put in storage due to the asymmetry of the instrument data of the cloud platform and the data acquisition unit. And after the model data are cleaned, entering a model data traversal process, and after the traversal is finished, finishing the data inspection, data processing, data alarm and data storage processes.
As shown in fig. 5, preferably, the step of traversing the model data of the preliminarily verified meter reading data, and performing sorting and classification processing according to the model of the meter includes:
s301, traversing the meter data of different models in the collected meter reading data;
s302, inquiring the data structure record, the data table structure and the field of the uploaded data of the model, comparing the data of the three parties, and taking the intersection of the data.
It should be noted that, the cleaned meter model data enters a model number traversal step. The JSON format message uploaded by the data acquisition unit contains a plurality of instrument data of different models, and all the model data in the message need to be traversed sequentially.
Specifically, as shown in fig. 6 to 7, the steps of traversing the model data are described as follows: beginning to traverse the instrument model in the data message; entering a field screen sub-process, wherein three types of data are compared: all fields of the model, all fields forming the structure of the model data table and all fields of the model in the data message are inquired in the field table; after comparing the three types of data fields, taking all fields forming the model data table structure as a reference, and filtering other fields; the filtered fields will alarm; the process can effectively prevent the problem that the data cannot be put in storage under the condition that the field data of the platform and the data collector do not correspond, and can ensure the storage of the data to the maximum extent. And after the sub-process of the field sieve, entering the instrument data traversal step of the model.
As shown in fig. 8, preferably, the step of traversing the meter data of each type of meter data includes:
s401, acquiring basic information of a meter, wherein the basic information comprises a meter model, a meter code and a meter address;
s402, inquiring the basic information of the instrument in a database, comparing the basic information with the basic information of the acquired instrument and judging whether the comparison is passed;
s403, if the judgment result is no, registering and alarming the error data;
s404, if yes, entering a gateway clock transaction sub-process, in the process, taking the time of the meter reading data, comparing the time with the current system time data, if the comparison does not pass, marking the data as invalid data, and registering and alarming the data.
It should be noted that the instrument data traversal step is nested in the model data traversal step, and one of the instrument model data is obtained in the model data traversal. In the meter model data, a plurality of meter data of the model are included, and in this step, the plurality of meter data are traversed sequentially.
Specifically, as shown in fig. 9-11, the steps of traversing the meter data are described as follows:
in the meter data message, the basic data of the meter is acquired: instrument model, instrument code, instrument address. And inquiring the meter information in the platform database, and comparing the basic information one by one. If the comparison fails, the error data is registered and alarmed. The process can effectively prevent the dirty and messy data from being put into a warehouse under the condition that the data of the platform and the data collector instrument do not correspond.
And after the data comparison is passed, entering a gateway clock transaction sub-process. In the process, the time of meter reading data is taken and compared with the current system data. Because the clock of the data collector device depends on the clock chip, there may be some error from the correct time. The maximum value of this error is set to 10 seconds, i.e., the data collector device can only be 10 seconds faster than the correct time at most. If the comparison is not passed, the data is marked as invalid data, and the data is registered and alarmed.
Entering a field step of traversing the meter data, inquiring the last meter reading record of the meter from a database, and entering the following judgment:
if the table has no last table reading record, judging whether the table is a table just changed; if the meter is just changed, storing the meter reading data of the meter into a historical data meter and a last meter reading data meter; if the meter is not changed, generating initialization data as the last meter reading record of the meter, namely the initial record with the reading number of 0; entering a dosage calculation sub-process;
if the meter has the last meter reading record, if the meter reading time is less than or equal to the last meter reading time, marking the meter reading record as invalid data, and merging the invalid data into the database to the historical data table; and if the meter reading time is longer than the last meter reading time, entering a dosage calculation sub-process.
In the sub-process of the quantity calculation, the quantity calculation is carried out, all fields used for metering are taken, and partial data are not included in the quantity calculation, such as voltage and current data in an electric meter, and the data are instantaneous values. The formula for calculating the dosage is as follows: the dosage is the reading of the time-the last reading;
if the calculated usage is less than 0, registering and alarming the data and marking the data as invalid data;
if the calculated usage is greater than or equal to 0, special treatment needs to be carried out on the instrument of the time method; the usage of the time-method instrument is time, and the usage to be calculated is smaller than the time of reading the meter at this time minus the actual time of reading the meter at the last time.
As shown in fig. 12, preferably, the step of traversing the fields in the meter data and classifying the fields according to the data types includes:
s501, classifying the fields according to data types, and screening out the fields for metering;
s502, judging whether the reading of the field for metering is negative or not,
if yes, S503 marks the data as invalid data, and executes S506,
s504, if not, then judging whether the corresponding meter is an ammeter or not,
s505, if yes, multiplying the reading by a mutual inductance coefficient, and then executing S506, otherwise, directly executing S506;
s506, judging whether the reading exceeds the maximum storage value of the data table field, and if the reading exceeds the maximum storage value, registering and alarming the data.
It should be noted that the field data traversal step is nested in the instrument data traversal step, one piece of instrument data of the type is obtained, in the field data traversal step, the fields in the instrument data are sequentially traversed, the data are classified according to types, and the instrument data traversal step is conveniently executed.
Specifically, as shown in fig. 13 to 14, the steps of traversing the field data are described as follows:
in the field screen sub-process, obtaining fields to be filtered, and in the field data traversal step, filtering the fields;
entering a field data classification processing sub-process, wherein in the process, the purpose is to classify and temporarily store the data according to types, and the process is as follows:
if the field is not the field for metering, the process is ended;
if the field is used for metering, judging whether the reading is negative; if the data is negative, marking the data as invalid data, and entering the step c; if the reading is greater than or equal to 0, the following judgments are made:
if the meter is an ammeter, multiplying the reading by the mutual inductance coefficient, and entering the step c;
if the meter is not an ammeter, entering the step c;
and judging whether the reading exceeds the maximum storage value of the data table field, wherein the judgment can effectively prevent the data from being put into a warehouse and causing data problems. If the maximum stored value is exceeded, this data is registered and alarmed.
The processed data is divided into four types according to the data types: shaping, character type, floating point type (rounding and reserving 6 decimal places), time, and temporarily storing data, so that the execution of the instrument data traversal step is facilitated.
As shown in fig. 15, the present invention further provides a data acquisition system 100, which includes a data preliminary verification module 1, a model data traversal module 2, an instrument data traversal module 3, and a field data traversal module 4: the data preliminary verification module 1 is used for preliminarily verifying the uploaded meter reading data; the model data traversing module 2 is used for traversing the model data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the model of the instrument; the instrument data traversal module 3 is used for performing instrument data traversal on instrument data of various types; the field data traversal module 4 is used for traversing fields in the instrument data and classifying the fields according to data types.
According to the invention, the uploaded meter reading data is preliminarily verified through the data preliminary verification module 1, the model data traversal module 2 is used for traversing the model data of the preliminarily verified meter reading data, the sorting and classification processing are carried out according to the model of the meter, the instrument data traversal module 3 is used for traversing the instrument data of various models, and the field data traversal module 4 is used for traversing the fields in the instrument data and classifying the fields according to the data types. The invention can process the data of different types of water, electricity, gas, steam, energy type and time method instruments, covers most abnormal conditions and processes the abnormal conditions respectively. If a new instrument model is accessed into the platform, the invention can change the condition that one model corresponds to one data interface, greatly reduces the development amount of codes, lightens the development pressure of developers, and simultaneously can access the new instrument model very quickly and improve the experience of customers.
As shown in fig. 16, preferably, the data preliminary verification module 1 includes: the verification unit 11 is configured to perform sequence verification and necessary field verification on the uploaded data packet of the meter reading data; a comparing unit 12, configured to compare the basic data of the data packet with data in the system; and the cleaning unit 13 is used for cleaning unauthorized instrument models in the data packet.
It should be noted that, first, the data uploaded by the data collector is preliminarily verified, and the data format is the JSON format, but is not limited thereto. The primary data verification mainly achieves the following purposes: 1. data loss caused by network fluctuation can be prevented; 2. attack of malicious data can be resisted to a certain extent, and the correctness of database data is ensured; 3. the storage of unauthorized models and instruments exceeding the authorized number in a warehouse can be prevented, and the benefit of a user is guaranteed.
Specifically, as shown in fig. 3 to 4, the data preliminary examination steps are described as follows:
judging whether the message data is empty; trying to carry out serialized JSON processing on the message data; after serialization, checking whether a data key exists, and the value is not null; inquiring basic information of the platform project, and if the project is in an expired state, discarding the data; and entering a model data cleaning sub-process, wherein the instrument model contained in the message data is compared with authorized instrument model information in the platform, so that the step can prevent dirty data from being put in storage due to the asymmetry of the instrument data of the cloud platform and the data acquisition unit. And after the model data are cleaned, entering a model data traversal process, and after the traversal is finished, finishing the data inspection, data processing, data alarm and data storage processes.
As shown in fig. 17, preferably, the model data traversing module 2 includes: the model data traversing unit 21 is used for traversing the meter data of different models in the collected meter reading data; and the query comparison unit 22 is configured to query the data structure record, the data table structure, and the field of the uploaded data of the model, perform data comparison between three parties, and obtain an intersection of the three parties.
It should be noted that, the cleaned meter model data enters a model number traversal step. The JSON format message uploaded by the data acquisition unit contains a plurality of instrument data of different models, and all the model data in the message need to be traversed sequentially.
Specifically, as shown in fig. 6 to 7, the steps of traversing the model data are described as follows: beginning to traverse the instrument model in the data message; entering a field screen sub-process, wherein three types of data are compared: all fields of the model, all fields forming the structure of the model data table and all fields of the model in the data message are inquired in the field table; after comparing the three types of data fields, taking all fields forming the model data table structure as a reference, and filtering other fields; the filtered fields will alarm; the process can effectively prevent the problem that the data cannot be put in storage under the condition that the field data of the platform and the data collector do not correspond, and can ensure the storage of the data to the maximum extent. And after the sub-process of the field sieve, entering the instrument data traversal step of the model.
As shown in fig. 18, preferably, the meter data traversing module 3 includes: the acquiring unit 31 is configured to acquire basic information of a meter, where the basic information includes a meter model, a meter code, and a meter address; a comparison and judgment unit 32, configured to query the basic information of the meter in the database, compare the basic information with the basic information of the acquired meter, and judge whether the comparison is passed, if the comparison is not passed, register and alarm the error data, if the comparison is passed, enter a gateway clock transaction sub-process, in this process, the time of the meter reading data is taken and compared with the current system time data, and if the comparison is not passed, the data is marked as invalid data, and the data is registered and alarm.
It should be noted that the instrument data traversal step is nested in the model data traversal step, and one of the instrument model data is obtained in the model data traversal. In the meter model data, a plurality of meter data of the model are included, and in this step, the plurality of meter data are traversed sequentially.
Specifically, as shown in fig. 9-11, the steps of traversing the meter data are described as follows:
in the meter data message, the basic data of the meter is acquired: instrument model, instrument code, instrument address. And inquiring the meter information in the platform database, and comparing the basic information one by one. If the comparison fails, the error data is registered and alarmed. The process can effectively prevent the dirty and messy data from being put into a warehouse under the condition that the data of the platform and the data collector instrument do not correspond.
And after the data comparison is passed, entering a gateway clock transaction sub-process. In the process, the time of meter reading data is taken and compared with the current system data. Because the clock of the data collector device depends on the clock chip, there may be some error from the correct time. The maximum value of this error is set to 10 seconds, i.e., the data collector device can only be 10 seconds faster than the correct time at most. If the comparison is not passed, the data is marked as invalid data, and the data is registered and alarmed.
Entering a field step of traversing the meter data, inquiring the last meter reading record of the meter from a database, and entering the following judgment:
if the table has no last table reading record, judging whether the table is a table just changed; if the meter is just changed, storing the meter reading data of the meter into a historical data meter and a last meter reading data meter; if the meter is not changed, generating initialization data as the last meter reading record of the meter, namely the initial record with the reading number of 0; entering a dosage calculation sub-process;
if the meter has the last meter reading record, if the meter reading time is less than or equal to the last meter reading time, marking the meter reading record as invalid data, and merging the invalid data into the database to the historical data table; and if the meter reading time is longer than the last meter reading time, entering a dosage calculation sub-process.
In the sub-process of the quantity calculation, the quantity calculation is carried out, all fields used for metering are taken, and partial data are not included in the quantity calculation, such as voltage and current data in an electric meter, and the data are instantaneous values. The formula for calculating the dosage is as follows: the dosage is the reading of the time-the last reading;
if the calculated usage is less than 0, registering and alarming the data and marking the data as invalid data;
if the calculated usage is greater than or equal to 0, special treatment needs to be carried out on the instrument of the time method; the usage of the time-method instrument is time, and the usage to be calculated is smaller than the time of reading the meter at this time minus the actual time of reading the meter at the last time.
As shown in fig. 19, preferably, the field data traversal module 4 includes: a classification screening unit 41, configured to classify the fields according to data types and screen out the fields for metering; a reading judging unit 42, configured to judge whether a reading of a field used for metering is a negative number, and when the reading is judged to be a positive number, mark the data as invalid data, and enter the stored value judging unit 43, and when the reading is judged to be a negative number, judge whether a corresponding meter is an electricity meter, if so, multiply the reading by a mutual inductance coefficient and then enter the stored value judging unit 43, otherwise, directly enter the stored value judging unit 43; and a storage value judging unit 43, configured to judge whether the reading exceeds the maximum storage value of the data table field, and if the reading exceeds the maximum storage value, register and alarm the data.
It should be noted that the field data traversal step is nested in the instrument data traversal step, one piece of instrument data of the type is obtained, in the field data traversal step, the fields in the instrument data are sequentially traversed, the data are classified according to types, and the instrument data traversal step is conveniently executed.
Specifically, as shown in fig. 13 to 14, the steps of traversing the field data are described as follows:
in the field screen sub-process, obtaining fields to be filtered, and in the field data traversal step, filtering the fields;
entering a field data classification processing sub-process, wherein in the process, the purpose is to classify and temporarily store the data according to types, and the process is as follows:
if the field is not the field for metering, the process is ended;
if the field is used for metering, judging whether the reading is negative; if the data is negative, marking the data as invalid data, and entering the step c; if the reading is greater than or equal to 0, the following judgments are made:
if the meter is an ammeter, multiplying the reading by the mutual inductance coefficient, and entering the step c;
if the meter is not an ammeter, entering the step c;
and judging whether the reading exceeds the maximum storage value of the data table field, wherein the judgment can effectively prevent the data from being put into a warehouse and causing data problems. If the maximum stored value is exceeded, this data is registered and alarmed.
The processed data is divided into four types according to the data types: shaping, character type, floating point type (rounding and reserving 6 decimal places), time, and temporarily storing data, so that the execution of the instrument data traversal step is facilitated.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A method of data acquisition, comprising:
performing preliminary verification on the uploaded meter reading data;
traversing the type data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the type of the meter;
traversing the instrument data of various types of instrument data;
and traversing fields in the instrument data, and classifying the fields according to the data types.
2. The data collection method of claim 1, wherein the step of preliminarily verifying the uploaded meter reading data comprises;
carrying out sequence check and necessary field check on the uploaded data packet of the meter reading data;
comparing the basic data of the data packet with the data in the system;
and cleaning unauthorized instrument models in the data packet.
3. The data acquisition method as claimed in claim 2, wherein the step of traversing the model data of the preliminarily verified meter reading data, sorting and classifying the meter reading data according to the model of the meter comprises the following steps:
traversing the meter data of different models in the collected meter reading data;
and inquiring the data structure record, the data table structure and the field of the uploaded data of the model, comparing the data of the three parties, and taking the intersection of the data.
4. The data collection method of claim 3, wherein the step of traversing the meter data for each type of meter data comprises:
acquiring basic information of a meter, wherein the basic information comprises a meter model, a meter code and a meter address;
inquiring the basic information of the instrument in a database, comparing the basic information with the basic information of the acquired instrument and judging whether the comparison is passed;
if not, registering and alarming the error data;
if the data is judged to be invalid, the gateway clock transaction sub-process is entered, in the process, the time of the meter reading data is taken and compared with the current system time data, if the comparison is not passed, the data is marked as invalid data, and the data is registered and alarmed.
5. The data collection method of claim 4, wherein traversing fields in the meter data and categorizing by data type comprises:
s501, classifying the fields according to data types, and screening out the fields for metering;
s502, judging whether the reading of the field for metering is negative or not,
if yes, S503 marks the data as invalid data, and executes S506,
s504, if not, then judging whether the corresponding meter is an ammeter or not,
s505, if yes, multiplying the reading by a mutual inductance coefficient, and then executing S506, otherwise, directly executing S506;
s506, judging whether the reading exceeds the maximum storage value of the data table field, and if the reading exceeds the maximum storage value, registering and alarming the data.
6. The data acquisition system is characterized by comprising a data preliminary verification module, a model data traversal module, an instrument data traversal module and a field data traversal module:
the data preliminary verification module is used for preliminarily verifying the uploaded meter reading data;
the model data traversing module is used for traversing the model data of the preliminarily verified meter reading data, and performing sequencing and classification processing according to the model of the instrument;
the instrument data traversal module is used for performing instrument data traversal on instrument data of various types;
the field data traversal module is used for traversing fields in the instrument data and classifying the fields according to data types.
7. The data acquisition system of claim 6 wherein the data preliminary verification module comprises:
the verification unit is used for performing sequence verification and necessary field verification on the uploaded data packet of the meter reading data;
the comparison unit is used for comparing the basic data of the data packet with the data in the system;
and the cleaning unit is used for cleaning unauthorized instrument models in the data packet.
8. The data acquisition system of claim 6 wherein the model data traversal module comprises:
the model data traversing unit is used for traversing the meter data of different models in the collected meter reading data;
and the query comparison unit is used for querying the data structure record, the data table structure and the field of the uploaded data of the model, comparing the data of the three parties and taking the intersection of the data.
9. The data collection system of claim 6, wherein the meter data traversal module comprises:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring basic information of a meter, and the basic information comprises a meter model, a meter code and a meter address;
a comparison and judgment unit for inquiring the basic information of the instrument in the database, comparing the basic information with the basic information of the acquired instrument and judging whether the comparison is passed,
if not, registering and alarming the error data,
if the data is judged to be invalid, the gateway clock transaction sub-process is entered, in the process, the time of the meter reading data is taken and compared with the current system time data, if the comparison is not passed, the data is marked as invalid data, and the data is registered and alarmed.
10. The data acquisition system of claim 6 wherein the field data traversal module comprises:
the classification screening unit is used for classifying the fields according to the data types and screening out the fields for metering;
a reading judgment unit for judging whether the reading of the field for metering is negative or not,
if yes, the data is marked as invalid data and enters a stored value judging unit,
if not, judging whether the corresponding meter is an ammeter or not, if so, multiplying the reading by the mutual inductance coefficient and then entering a storage value judging unit, otherwise, directly entering the storage value judging unit;
and the storage value judging unit is used for judging whether the reading value exceeds the maximum storage value of the data table field, and if the reading value exceeds the maximum storage value, the data is registered and alarmed.
CN202110956277.1A 2021-08-19 2021-08-19 Data acquisition method and system Active CN113873350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110956277.1A CN113873350B (en) 2021-08-19 2021-08-19 Data acquisition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110956277.1A CN113873350B (en) 2021-08-19 2021-08-19 Data acquisition method and system

Publications (2)

Publication Number Publication Date
CN113873350A true CN113873350A (en) 2021-12-31
CN113873350B CN113873350B (en) 2024-03-22

Family

ID=78990731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110956277.1A Active CN113873350B (en) 2021-08-19 2021-08-19 Data acquisition method and system

Country Status (1)

Country Link
CN (1) CN113873350B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106652415A (en) * 2016-12-30 2017-05-10 武汉盛帆智能科技有限公司 Processing method and device of protocol for concentrated reading of multiple meters
CN111813773A (en) * 2020-04-22 2020-10-23 深圳市科陆电子科技股份有限公司 Power grid meter reading data storage method, uploading method, device and storage device
CN112382007A (en) * 2020-11-03 2021-02-19 广州燃气集团有限公司 Mobile meter reading method and system for multiple types of gas meters
CN112988480A (en) * 2021-02-09 2021-06-18 山东英信计算机技术有限公司 Server memory model verification system and method based on cloud platform and storage medium
CN115623358A (en) * 2022-09-22 2023-01-17 深圳市思达仪表有限公司 Meter reading method, meter reading device and meter reading system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106652415A (en) * 2016-12-30 2017-05-10 武汉盛帆智能科技有限公司 Processing method and device of protocol for concentrated reading of multiple meters
CN111813773A (en) * 2020-04-22 2020-10-23 深圳市科陆电子科技股份有限公司 Power grid meter reading data storage method, uploading method, device and storage device
CN112382007A (en) * 2020-11-03 2021-02-19 广州燃气集团有限公司 Mobile meter reading method and system for multiple types of gas meters
CN112988480A (en) * 2021-02-09 2021-06-18 山东英信计算机技术有限公司 Server memory model verification system and method based on cloud platform and storage medium
CN115623358A (en) * 2022-09-22 2023-01-17 深圳市思达仪表有限公司 Meter reading method, meter reading device and meter reading system

Also Published As

Publication number Publication date
CN113873350B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN114298863B (en) Data acquisition method and system of intelligent meter reading terminal
Jiang et al. Wavelet based feature extraction and multiple classifiers for electricity fraud detection
CN106384273A (en) Malicious order scalping detection system and method
CN109191605B (en) Highway charging rate accuracy evaluation method considering charging path
CN106548343A (en) A kind of illegal transaction detection method and device
CN111967512A (en) Abnormal electricity utilization detection method, system and storage medium
CN113591393A (en) Fault diagnosis method, device, equipment and storage medium of intelligent substation
CN108802535A (en) Screening technique, dominant interferer recognition methods and device, server and storage medium
CN115222303B (en) Industry risk data analysis method and system based on big data and storage medium
CN105574666A (en) Method and device for evaluating credit level of enterprise based on key data modeling
CN114912787A (en) Intelligent assessment method for enterprise dangerous waste concealing, reporting and missing reporting risks
CN107589391A (en) A kind of methods, devices and systems for detecting electric power meter global error
CN109933605A (en) Electricity charge mistake checks method, apparatus and electronic equipment
CN110738415A (en) Electricity stealing user analysis method based on electricity utilization acquisition system and outlier algorithm
CN113391256A (en) Electric energy meter metering fault analysis method and system of field operation terminal
CN113516192A (en) Method, system, device and storage medium for identifying user electricity consumption transaction
CN111626360B (en) Method, apparatus, device and storage medium for detecting boiler fault type
CN113873350B (en) Data acquisition method and system
CN112446601A (en) Data diagnosis method and system for non-computable region
CN110287114B (en) Method and device for testing performance of database script
CN117034115A (en) CNN-Bagging-based electricity stealing detection method and system
CN106847306A (en) The detection method and device of a kind of abnormal sound signal
CN109739840A (en) Data processing empty value method, apparatus and terminal device
CN115951295A (en) Automatic identification method and system for daily clear power abnormity
CN116249186A (en) Data processing method and device of wireless network equipment, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant