CN111327493A - Data acquisition method and device - Google Patents
Data acquisition method and device Download PDFInfo
- Publication number
- CN111327493A CN111327493A CN202010076393.XA CN202010076393A CN111327493A CN 111327493 A CN111327493 A CN 111327493A CN 202010076393 A CN202010076393 A CN 202010076393A CN 111327493 A CN111327493 A CN 111327493A
- Authority
- CN
- China
- Prior art keywords
- data acquisition
- data
- result
- acquisition
- point
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004891 communication Methods 0.000 claims description 36
- 238000012545 processing Methods 0.000 claims description 24
- 230000002159 abnormal effect Effects 0.000 claims description 17
- 238000013480 data collection Methods 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 238000007796 conventional method Methods 0.000 description 5
- 230000001186 cumulative effect Effects 0.000 description 5
- 238000012795 verification Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 241000251468 Actinopterygii Species 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 239000004575 stone Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 101001081590 Homo sapiens DNA-binding protein inhibitor ID-1 Proteins 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 102000049143 human ID1 Human genes 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/04—Processing captured monitoring data, e.g. for logfile generation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0631—Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a data acquisition method, which comprises the following steps of carrying out data acquisition on data acquisition points for N times when acquisition conditions are met, wherein N is an integer greater than 1; determining the data acquisition result of the current round of the data acquisition points according to the result of the N times of data acquisition, wherein the data acquisition result comprises the following steps: and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point. The invention also discloses a data acquisition device.
Description
Technical Field
The present invention relates to the field of device communication, and in particular, to a method and an apparatus for preventing jitter in data acquisition.
Background
In the era of interconnection of everything, interface communication is a bridge and a foundation stone of an interconnection system, the interconnection of everything cannot be separated from the interface communication, and stable and reliable interface communication is the foundation stone of the interconnection system. The essence of interface communication is data acquisition and interaction between two parties of the interface.
The interface communication parties realize data acquisition and interaction according to a specific communication protocol agreed by the two parties in advance. One side of the interface can collect data of the other side unilaterally, and the data of the other side can be collected mutually. The data collection mode can be a periodic calling mode, an active uploading mode or a combination mode of the two modes.
In the field of industrial automation, in order to improve communication efficiency, a communication packet usually includes a plurality of data points, where each data point corresponds to its own data address (as with a human ID), and the data addresses are different in specific expression due to different communication protocols, for example, a data address in a Modbus protocol usually refers to a register address or a coil (bit) address; in the IEC60870-5-104 (104 for short), data addresses are represented by information addresses; in the IEC60870-5-103 (103 for short), in general specifications, a data address is jointly represented by a function type and an information sequence number, and in general classification service, a data address is jointly represented by a group number and an entry number.
In order to improve the reliability of data, the conventional method considers each layer of the OSI seven-layer model, for example, measures such as communication cable with strong electromagnetic interference resistance and access terminal resistance are selected in the physical layer; selecting parity at the data link layer; selecting a TCP transmission mode with CRC32 checksum from a transmission layer; on the communication protocol of an application layer, the protocol message is provided with various types of checksums; or adding a credit granting mechanism to the communication access person, and the like. By one or more of the above measures, the reliability of the data is substantially guaranteed. Under traditional methods, MTBF (mean time between failure) is expected to reach 5000 hours or more.
However, even if all the measures are taken, in some cases, unexpected error data which is uniformly called dirty data can still be collected by the upper computer.
The traditional method has the following defects or loopholes:
one, conventional methods have difficulty filtering dirty data from the source of the device. When a data provider (equipment) collects data by itself, a dirty data point may be collected accidentally once (in the field of industrial automation, the data point collected by the equipment often comes from an equipment I/O module and internal calculation). We do not call this type of error the source error.
And secondly, data generates errors in the transmission process and becomes dirty data, most of the dirty data is expected to be intercepted by the traditional method, but a small part of the dirty data successfully passes through the traditional protective net to become net-leaking fish. For example, some serial communication protocols, such as IEC60870-5-101 (abbreviated as 101) and 103, adopt cumulative algebraic sums for checksums, and when one byte of a data area is more than 1 and another byte is less than 1, obviously, the cumulative algebraic sum will not change, so that such errors cannot be effectively filtered under the conventional method. We do not refer to such errors as escape errors that arise during transmission but can escape from transmission as well as from various conventional checks at the receiving terminal (e.g., checksum, message key check, etc.).
It can be seen that the above-mentioned source errors and escape errors are difficult to solve in the processing schemes related to data acquisition in the prior art solutions.
Disclosure of Invention
Aiming at the defect that the source error and the escape error are difficult to solve in a processing scheme related to data acquisition, the invention provides a data processing method and a data processing device to achieve the technical aim of preventing jitter in data acquisition.
The invention provides a data acquisition method, which comprises the following steps,
when the acquisition condition is met, carrying out N times of data acquisition on the data acquisition points, wherein N is an integer greater than 1;
determining the data acquisition result of the current round of the data acquisition points according to the result of the N times of data acquisition, wherein the data acquisition result comprises the following steps:
and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
Optionally, determining a data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition;
after discarding the results of the N times of data acquisition, performing M times of data acquisition on the data acquisition points, wherein M is an integer greater than 1;
and determining the data acquisition result of the current round of the data acquisition points according to the result of the M times of data acquisition.
Optionally, after determining the data acquisition result of the current round of the data acquisition point, the method further comprises: and storing the determined data acquisition result of the current round.
Optionally, before performing data acquisition N times on the data acquisition point, the method further includes:
determining whether anti-jitter processing is performed according to preset configuration parameters; and if the anti-shaking processing is not carried out, carrying out primary data acquisition on the data acquisition point, and determining the result of the primary data acquisition as the data acquisition result of the data acquisition point in the current round.
Optionally, wherein the performing of one data acquisition on the data acquisition point comprises:
and receiving a communication data message, and reading data in the communication data message according to the corresponding address of the data acquisition point in the communication data message, wherein the read data is the result of one-time data acquisition.
Optionally, wherein the acquiring conditions include: a preset acquisition period is reached;
alternatively, a preset acquisition trigger event occurs.
Optionally, the method further includes initializing a number of consecutive acquisition error rounds to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition, and adding 1 to the number of the continuous acquisition error rounds;
then executing next round of data acquisition, wherein each round of data acquisition comprises at least 2 times of data acquisition;
if the results of all data acquisition in the next round are not completely the same, adding 1 to the number of the continuous acquisition error rounds; judging whether the number of the continuous acquisition error rounds is greater than or equal to a preset alarm threshold value; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all data acquisition in the next round are completely the same, adopting the result of any data acquisition as the data acquisition result of the data acquisition point, and clearing the number of the continuous acquisition error rounds to 0.
Optionally, the method further includes initializing the cumulative acquisition error round number to be 0, and initializing the total acquisition round number to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the N times of data acquisition results are not completely the same, discarding the N times of data acquisition results, adding 1 to the accumulated acquisition error round number, and adding 1 to the total acquisition error round number;
performing a next round of data acquisition, wherein each round of data acquisition comprises at least 2 data acquisitions
If the results of all data acquisition in the next round are not completely the same, adding 1 to the accumulated number of acquisition error rounds and adding 1 to the total number of acquisition error rounds; judging whether the accumulated collection error round number is divided by the total collection error round number to be greater than or equal to a preset alarm ratio or not; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all the data acquisition in the next round are completely the same, adopting the result of any one data acquisition as the data acquisition result of the data acquisition point.
Optionally, the method further includes, after determining that the data collection point is abnormal, producing an alarm message to prompt that the equipment \ the line is abnormal.
The invention also provides a data acquisition device, comprising,
the acquisition module is set to acquire data for N times on the data acquisition points when the acquisition conditions are met, wherein N is an integer greater than 1;
the acquisition result determining module is configured to determine the data acquisition result of the current round of the data acquisition point according to the result of the N times of data acquisition, and includes: and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
When the scheme of the invention is adopted to collect data, aiming at the conditions of source errors and/or escape errors, the strategy of filtering abnormal data jitter, namely N beats of collected data, is adopted to increase the caching and comparison of external data, thereby effectively improving the MTBF.
Drawings
FIG. 1 is a data acquisition process of a prior art arrangement;
FIG. 2 is a flow chart of a data acquisition scheme in a first embodiment of the present invention;
FIG. 3 is a flow chart of a data acquisition scheme in example 1 of a first embodiment of the present invention
FIG. 4 is a flow chart of a data acquisition scheme in a second embodiment of the present invention;
FIG. 5 is a flow chart of a data acquisition scheme in a third embodiment of the present invention;
FIG. 6 is a flow chart of a data acquisition scheme in a fourth embodiment of the present invention;
fig. 7 is a structural diagram of a data acquisition apparatus in a fifth embodiment of 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 and specific embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
First, the conventional method has difficulty in solving the above-mentioned drawbacks of source errors and escape errors. Secondly, the source error and the escape error are determined to happen accidentally in terms of behavior, otherwise, the source error frequently happens and belongs to equipment failure, and the correct processing mode is to firstly suspend or shield communication with the equipment until the equipment failure is solved; if the escape error frequently occurs, the communication cable should be checked or the protocol should be replaced due to a serious line fault or a serious defect of the protocol. Then, in return, the incident occurs by chance, in other words, belongs to a small probability event. Mathematically, the small probability event has two characteristics, one is that the small probability event does not occur continuously, for example, the data point a is found to be a fault after the first data acquisition, and then the data point a is found to be a fault for the second time, the third time, … …, and the nth time. If so, then data point A is true failure; the second is that the small probability event is a necessary event as long as it is repeated enough times, i.e. it is necessary to occur. In industrial automation, the period of data collection is often in the order of milliseconds, for example, 50 milliseconds, and the data collection is 173 ten thousand times a day and 6.3 hundred million times a year.
In short, the source error and/or escape error will not occur for n consecutive acquisitions on the one hand, and will inevitably occur for a long-term continuous operation on the other hand.
In the prior art, a scheme shown in fig. 1 is generally adopted for collecting interface data: after the message is successfully received and verified according to the communication protocols of the two parties and passes the verification, the external data processing link is started; firstly, obtaining a data address and a corresponding numerical value, and then updating an external data value to a local database to finish data acquisition of the data point.
It can be seen that the prior art scheme is difficult to effectively filter source errors and escape errors, and both the source errors and the escape errors belong to small-probability events under the condition that equipment and lines are basically normal. Data errors or anomalies due to small probability events during data acquisition or/and transmission and then immediately restoring data normality are often referred to in the industry as data jitter. Aiming at the characteristic that small-probability events cannot occur continuously, the method and the device increase the caching processing of external data on the basis of the original data acquisition technical scheme, effectively capture the fish with net leakage in the traditional method and further improve the MTBF.
Example one
In this embodiment, a data acquisition method is provided to effectively prevent data jitter and reduce source errors and/or escape errors, as shown in fig. 2:
step 200: determining a data acquisition point, determining whether to perform data anti-shake processing according to preset parameters, and if so, executing step 201: initializing the acquired times of the round to be 0, and then executing step 202; if not, go to step 211;
step 202: receiving a data message, and checking the message according to a communication protocol of both parties;
step 203: after the verification is passed, performing one-time data acquisition according to the data address corresponding to the data acquisition point, and caching the result of the data acquisition; adding 1 to the number of acquired times in the current round;
step 204: judging whether the number of acquired times of the current round is greater than or equal to a preset parameter N, wherein N is greater than 1; if greater than or equal to N, go to step 205; otherwise, returning to step 202;
step 205: judging whether the cached results of the data acquisition for multiple times are the same or not; if so, go to step 206; if the difference is not the same, discarding the data collected in the round, and jumping to step 207; or if the difference is not the same, discarding the data acquired in the current round, and jumping to step 201 to perform a new round of data acquisition;
step 206: selecting one of the cached results of the multiple data acquisition as a result of the data acquisition in the current round, and storing the result in a local database;
step 207: and waiting for the next round of data acquisition time, and returning to the step 200.
Step 211: receiving a data message, and checking the message according to a communication protocol of both parties;
step 212: after the verification is passed, performing data acquisition once according to the data address corresponding to the data acquisition point, and storing the result of the data acquisition to a local database;
step 213: and waiting for the next round of data acquisition time, and returning to the step 200.
Alternatively, whether or not the different data acquisition points are subjected to the anti-shake processing may be configured separately.
Optionally, the data packet received at one time may include one or more data acquisition points, and whether anti-jitter processing is performed may be configured separately.
Optionally, when the data packet received at a time includes a plurality of data acquisition points, the entire data packet may be checked first, and then whether each data acquisition point performs anti-shake processing is determined according to the configuration of the different data acquisition points, which is not limited to the sequence of the execution steps shown in fig. 2.
Optionally, the message received in step 202 or 211 may be a response message after receiving the active request, or a message actively reported by the sender; alternatively, a register, a memory, or other data address of the device to be acquired is read, and each data acquisition is performed.
Example 1:
in the anti-shake processing, it is assumed that each round needs to be acquired n (n >1) times, taking the acquired data as an integer as an example, a next structural body is established (allocated) to each data acquisition point, and the acquisition results of the n times are cached. The buffering and processing flow is shown in fig. 3.
struct SampleBuf{
int Value[n];
int CNT;
}Buf
The method comprises the steps of enabling Value [ n ] to be a data cache region for caching n (n >1) sampling values of a certain data point, enabling Value [0], Value [1], … …, Value [ n-1] to respectively represent values of 1 st, 2 nd, … … th and n th sampling of the data point, wherein the data type int is schematic, and in the actual situation, other data types can be obtained according to different data acquisition points, CNT represents the number of sampling times of the data point at present, CNT ∈ [0, n ], the initial Value of CNT is 0, 0 represents that the data point does not start a new data acquisition round, n represents that the data acquisition round is full of n, after the data is acquired once by a certain point, the acquired external data Value is cached in the Value [ CNT ], then, one is added to the CNT, whether the CNT is larger than or equal to n is checked, if the CNT is not, the point is not full of n, the data acquisition round of the data is not required to be updated to the local database, if the data acquisition round of the CNT is not equal to n, the Value of the data acquisition round, the data acquisition round is not required to be updated, the data is considered to be completely consistent, if the data acquisition round, the data is not required to be updated, the data acquired by the local database, the data is not required to be updated, the data is considered, the data acquired by the local database, and the data is considered to be completely, if the data acquired by the data is not considered, the data is not required to be consistent, the data acquired by the data of n, the data of the data is not considered, and the data is not required to be consistent, if the data acquired by the data of the local database, the data is not considered, the data of the.
Example two
In this embodiment, a data acquisition method is provided to effectively prevent data jitter and reduce source errors and/or escape errors, and if a determined data acquisition point is preset to be subjected to data anti-jitter processing, the flow is as shown in fig. 4:
step 401: initializing the number of continuous acquisition error rounds to be 0;
step 402: initializing the acquired times of the current round to be 0;
step 403: receiving a data message, and checking the message according to a communication protocol of both parties;
step 404: after the verification is passed, performing one-time data acquisition according to the data address corresponding to the data acquisition point, and caching the result of the data acquisition; adding 1 to the number of acquired times in the current round;
step 405: judging whether the number of acquired times of the current round is greater than or equal to a preset parameter N, wherein N is greater than 1; if so, go to step 406; otherwise, returning to step 403;
step 406: judging whether the cached results of the data acquisition for multiple times are the same or not; if so, go to step 411; if not, the step 407 is executed after discarding the data collected in the current round
Step 411: selecting one of the cached results of the multiple data acquisition as a result of the data acquisition in the current round, and storing the result in a local database; the number of the continuous acquisition error rounds is 0;
step 412: and waiting for the next round of data acquisition time, and returning to the step 402.
Step 407: continuously collecting the number of error rounds and adding 1;
step 408: judging whether the number of the continuous acquisition error rounds is greater than or equal to a preset alarm threshold value; if so, go to step 409; otherwise, go to step 412;
step 409: and ending after the alarm information is generated.
Wherein the alarm threshold is an integer greater than 1; assuming that the preset alarm threshold is 3, it means that: if data jitter exists in 3 continuous rounds, the situation that the collected equipment or the communication line has faults is indicated, alarm information is generated, and the current data collection process of the data point is exited.
EXAMPLE III
In this embodiment, a data acquisition method is provided to effectively prevent data jitter and reduce source errors and/or escape errors, and if a determined data acquisition point is preset to be subjected to data anti-jitter processing, the flow is as shown in fig. 5:
step 501: initializing the number of accumulated collection error rounds to be 0, and initializing the number of total collection rounds to be 0;
step 502: initializing the acquired times of the current round to be 0;
step 503: receiving a data message, and checking the message according to a communication protocol of both parties;
step 504: after the verification is passed, performing one-time data acquisition according to the data address corresponding to the data acquisition point, and caching the result of the data acquisition; adding 1 to the number of acquired times in the current round;
step 505: judging whether the number of acquired times of the current round is greater than or equal to a preset parameter N, wherein N is greater than 1; if so, go to step 506; otherwise, return to step 503;
step 506: judging whether the cached results of the data acquisition for multiple times are the same or not; if so, go to step 511; if not, discarding the data collected in the current round, and executing step 507
Step 511: selecting one of the cached results of the multiple data acquisition as a result of the data acquisition in the current round, and storing the result in a local database; adding 1 to the total number of collection rounds;
step 512: and waiting for the next round of data acquisition time, and returning to the step 502.
Step 507: adding 1 to the accumulated number of collection error rounds and adding 1 to the total number of collection rounds;
step 508: judging whether the accumulated collection error round number is divided by the total collection round number to be greater than or equal to a preset alarm ratio or not; if so, go to step 509; otherwise, go to step 512;
step 509: and ending after the alarm information is generated.
Wherein the alarm ratio is a number greater than 0 and less than or equal to 1; assuming that the preset alarm ratio is ten percent, it represents that: if data jitter exists in ten cumulative acquisition wheel number wheels, the situation that the acquired equipment or the communication line has faults is indicated, alarm information is generated, and the current data acquisition processing flow of the data point is exited.
Optionally, the foregoing scheme may further include the steps of: and when the total collection round number reaches a certain preset total number zero clearing threshold, the accumulated collection error round number is returned to 0, and the total collection round number is returned to 0.
Example four
In this embodiment, a data acquisition method is provided to effectively prevent data jitter and reduce source errors and/or escape errors, as shown in fig. 6, and includes:
step 601: when the acquisition condition is met, carrying out N times of data acquisition on the data acquisition points, wherein N is an integer greater than 1;
step 602: determining the data acquisition result of the current round of the data acquisition points according to the result of the N times of data acquisition, wherein the data acquisition result comprises the following steps: and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
Optionally, in step 602, determining a data acquisition result of the current round of the data acquisition point according to the result of the N times of data acquisition, further including:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition;
after discarding the results of the N times of data acquisition, performing M times of data acquisition on the data acquisition points, wherein M is an integer greater than 1;
and determining the data acquisition result of the current round of the data acquisition points according to the result of the M times of data acquisition. Wherein, M can be equal to N, and can also be larger or smaller than N, and both M and N are larger than 1.
Optionally, after determining the data acquisition result of the current round of the data acquisition point, the method further comprises: and storing the determined data acquisition result of the current round.
Optionally, before performing data acquisition N times on the data acquisition point, the method further includes:
determining whether anti-jitter processing is performed according to preset configuration parameters; and if the anti-shaking processing is not carried out, carrying out primary data acquisition on the data acquisition point, and determining the result of the primary data acquisition as the data acquisition result of the data acquisition point in the current round.
Optionally, wherein the performing of one data acquisition on the data acquisition point comprises:
and receiving a communication data message, and reading data in the communication data message according to the corresponding address of the data acquisition point in the communication data message, wherein the read data is the result of one-time data acquisition. The method for reading data according to the data address is not limited to the specific manner described in the embodiments of the present specification, and those skilled in the art can perform this step according to the related technical solutions.
Optionally, wherein the acquiring conditions include: a preset acquisition period is reached; alternatively, a preset acquisition trigger event occurs.
Optionally, the method further includes initializing a number of consecutive acquisition error rounds to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition, and adding 1 to the number of the continuous acquisition error rounds;
then executing next round of data acquisition, wherein each round of data acquisition comprises at least 2 times of data acquisition;
if the results of all data acquisition in the next round are not completely the same, adding 1 to the number of the continuous acquisition error rounds; judging whether the number of the continuous acquisition error rounds is greater than or equal to a preset alarm threshold value; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all data acquisition in the next round are completely the same, adopting the result of any data acquisition as the data acquisition result of the data acquisition point, and clearing the number of the continuous acquisition error rounds to 0.
Optionally, the method further includes initializing the cumulative acquisition error round number to be 0, and initializing the total acquisition round number to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the N times of data acquisition results are not completely the same, discarding the N times of data acquisition results, adding 1 to the accumulated acquisition error round number, and adding 1 to the total acquisition error round number;
performing a next round of data acquisition, wherein each round of data acquisition comprises at least 2 data acquisitions
If the results of all data acquisition in the next round are not completely the same, adding 1 to the accumulated number of acquisition error rounds and adding 1 to the total number of acquisition error rounds; judging whether the accumulated collection error round number is divided by the total collection error round number to be greater than or equal to a preset alarm ratio or not; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all the data acquisition in the next round are completely the same, adopting the result of any one data acquisition as the data acquisition result of the data acquisition point.
Optionally, the method further includes, after determining that the data collection point is abnormal, producing an alarm message to prompt that the equipment \ the line is abnormal.
EXAMPLE five
In this embodiment, a data acquisition device 70 is provided to effectively prevent data jitter and reduce source errors and/or escape errors, as shown in fig. 7, including:
the acquisition module 701 is set as: when the acquisition condition is met, carrying out N times of data acquisition on the data acquisition points, wherein N is an integer greater than 1;
the acquisition result determining module 702 is configured to determine, according to the result of the N times of data acquisition, a data acquisition result of the current round of the data acquisition point, and includes: and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
Optionally, the acquisition result determining module 702 is configured to discard the N times of data acquisition results if the N times of data acquisition results are not completely the same;
after discarding the results of the N times of data acquisition, performing M times of data acquisition on the data acquisition points, wherein M is an integer greater than 1;
and determining the data acquisition result of the current round of the data acquisition points according to the result of the M times of data acquisition. Wherein, M can be equal to N, and can also be larger or smaller than N, and both M and N are larger than 1.
Optionally, the apparatus further comprises: the saving module 703 is configured to save the determined data acquisition result of the current round.
Optionally, the apparatus further comprises: the anti-jitter judging module 704 is configured to determine whether anti-jitter processing is performed according to preset configuration parameters before performing data acquisition on the data acquisition point for N times; and if the anti-shaking processing is not carried out, carrying out primary data acquisition on the data acquisition point, and determining the result of the primary data acquisition as the data acquisition result of the data acquisition point in the current round.
Optionally, the acquiring module 701 is further configured to perform data acquisition on the data acquisition point once, including: and receiving a communication data message, and reading data in the communication data message according to the corresponding address of the data acquisition point in the communication data message, wherein the read data is the result of one-time data acquisition. The method for reading data according to the data address is not limited to the specific manner described in the embodiments of the present specification, and those skilled in the art can perform this step according to the related technical solutions.
Optionally, wherein the acquiring conditions include: a preset acquisition period is reached; alternatively, a preset acquisition trigger event occurs.
Optionally, the acquiring module 701 is further configured to: initializing the number of continuous acquisition error rounds to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition, and adding 1 to the number of the continuous acquisition error rounds;
then executing next round of data acquisition, wherein each round of data acquisition comprises at least 2 times of data acquisition;
if the results of all data acquisition in the next round are not completely the same, adding 1 to the number of the continuous acquisition error rounds; judging whether the number of the continuous acquisition error rounds is greater than or equal to a preset alarm threshold value; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all data acquisition in the next round are completely the same, adopting the result of any data acquisition as the data acquisition result of the data acquisition point, and clearing the number of the continuous acquisition error rounds to 0.
Optionally, the acquiring module 701 is further configured to: initializing the number of accumulated collection error rounds to be 0, and initializing the number of total collection rounds to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the N times of data acquisition results are not completely the same, discarding the N times of data acquisition results, adding 1 to the accumulated acquisition error round number, and adding 1 to the total acquisition error round number;
performing a next round of data acquisition, wherein each round of data acquisition comprises at least 2 data acquisitions
If the results of all data acquisition in the next round are not completely the same, adding 1 to the accumulated number of acquisition error rounds and adding 1 to the total number of acquisition error rounds; judging whether the accumulated collection error round number is divided by the total collection error round number to be greater than or equal to a preset alarm ratio or not; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all the data acquisition in the next round are completely the same, adopting the result of any one data acquisition as the data acquisition result of the data acquisition point.
Optionally, the apparatus further comprises: the alarm module 705 is configured to produce alarm information to prompt that equipment/a line is abnormal after the data collection point is determined to be abnormal.
According to the technical scheme of the invention, when the upper computer collects the data of the lower computer through a communication protocol, aiming at the conditions of source errors and/or escape errors, the strategy of filtering abnormal data jitter, namely N-beat collected data, is adopted to increase the caching and comparison of external data, so that the missed-net fish in the traditional method is effectively captured, and the MTBF is effectively improved. The technology proposed by the invention is used for a polling response protocol (master station challenge, slave station response): only if the data point values of the polling N times (N is more than or equal to 2) are consistent, the credit is collected. When the equipment side uploads data periodically and actively, the equipment collects the information only when the data point values of N times of continuous and active uploading (N is more than or equal to 2) times are consistent. When the device side actively uploads changes, if the changes are transmitted only once (N ═ 1), the method is not suitable for the technical scheme of the application.
The application technology is very useful in very important fields, critical changes (application technology supports anti-shake configuration from data acquisition point to data acquisition point).
For example, the DI (Digital Input) of a train automatic control system, the DI of an aircraft autopilot, the DI important in the industrial automation industry may be very serious if the DI misreports and registers its triggered consequences. The technology of the application only needs to collect once or several times additionally, the jitter can be filtered out frequently, and the cost is not too much for one or several times of collecting cycles (generally, the collecting time for one time is 0.5-1 second).
Optionally, n (n) in the solution of the present invention is configurable, and usually n (n) can meet the industrial automation requirement. Obviously, when n (n) is 1, the scheme of the present invention is equivalent to the prior art scheme. The larger N (n), the stronger the anti-shake capability of the upper computer, and the higher the data reliability, but the longer the data updating period of the upper computer; the anti-shake data points (data acquisition points) can be configured point by point, namely, part of the data points (data acquisition points) are allowed to adopt the technical scheme of the invention, and other data points (data acquisition points) adopt a conventional method to acquire data and update.
Optionally, the scheme of the present invention may be laid out in different layers of the system, and may be adopted in the front-end data processing layer, or may perform anti-shake filtering on part of the data points in the specific application of the terminal data application layer.
It will be understood by those of ordinary skill in the art that all or part of the steps of the above embodiments may be implemented using a computer program flow, which may be stored in a computer readable storage medium and executed on a corresponding hardware platform (e.g., system, apparatus, device, etc.), and when executed, includes one or a combination of the steps of the method embodiments.
Alternatively, all or part of the steps of the above embodiments may be implemented by using an integrated circuit, and the steps may be respectively manufactured as an integrated circuit module, or a plurality of the blocks or steps may be manufactured as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The devices/functional modules/functional units in the above embodiments may be implemented by general-purpose computing devices, and they may be centralized on a single computing device or distributed on a network formed by a plurality of computing devices.
Each device/function module/function unit in the above embodiments may be implemented in the form of a software function module and may be stored in a computer-readable storage medium when being sold or used as a separate product. The computer readable storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A data acquisition method is characterized by comprising the following steps,
when the acquisition condition is met, carrying out N times of data acquisition on the data acquisition points, wherein N is an integer greater than 1;
determining the data acquisition result of the current round of the data acquisition points according to the result of the N times of data acquisition, wherein the data acquisition result comprises the following steps:
and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
2. The method of claim 1,
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition;
after discarding the results of the N times of data acquisition, performing M times of data acquisition on the data acquisition points, wherein M is an integer greater than 1;
and determining the data acquisition result of the current round of the data acquisition points according to the result of the M times of data acquisition.
3. The method of claim 1,
after determining the data acquisition result of the current round of the data acquisition point, the method further comprises: and storing the determined data acquisition result of the current round.
4. The method of claim 1,
before performing data acquisition for N times on a data acquisition point, the method further comprises:
determining whether anti-jitter processing is performed according to preset configuration parameters; and if the anti-shaking processing is not carried out, carrying out primary data acquisition on the data acquisition point, and determining the result of the primary data acquisition as the data acquisition result of the data acquisition point in the current round.
5. The method according to claim 1, 2 or 4,
wherein performing a data acquisition on the data acquisition site comprises:
and receiving a communication data message, and reading data in the communication data message according to the corresponding address of the data acquisition point in the communication data message, wherein the read data is the result of one-time data acquisition.
6. The method of claim 1,
wherein, the collection condition comprises: a preset acquisition period is reached;
alternatively, a preset acquisition trigger event occurs.
7. The method of claim 1,
the method also comprises initializing the number of continuous acquisition error rounds to be 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the results of the N times of data acquisition are not completely the same, discarding the results of the N times of data acquisition, and adding 1 to the number of the continuous acquisition error rounds;
then executing next round of data acquisition, wherein each round of data acquisition comprises at least 2 times of data acquisition;
if the results of all data acquisition in the next round are not completely the same, adding 1 to the number of the continuous acquisition error rounds; judging whether the number of the continuous acquisition error rounds is greater than or equal to a preset alarm threshold value; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all data acquisition in the next round are completely the same, adopting the result of any data acquisition as the data acquisition result of the data acquisition point, and clearing the number of the continuous acquisition error rounds to 0.
8. The method of claim 1,
the method also comprises the steps that the number of the initial accumulated collection error rounds is 0, and the number of the initial total collection rounds is 0;
determining the data acquisition result of the data acquisition point in the current round according to the result of the N times of data acquisition, and further comprising:
if the N times of data acquisition results are not completely the same, discarding the N times of data acquisition results, adding 1 to the accumulated acquisition error round number, and adding 1 to the total acquisition error round number;
performing a next round of data acquisition, wherein each round of data acquisition comprises at least 2 data acquisitions
If the results of all data acquisition in the next round are not completely the same, adding 1 to the accumulated number of acquisition error rounds and adding 1 to the total number of acquisition error rounds; judging whether the accumulated collection error round number is divided by the total collection error round number to be greater than or equal to a preset alarm ratio or not; if the data acquisition point is larger than or equal to the preset data acquisition point, determining that the data acquisition point is abnormal, and quitting data acquisition;
and if the results of all the data acquisition in the next round are completely the same, adopting the result of any one data acquisition as the data acquisition result of the data acquisition point.
9. The method according to claim 7 or 8,
the method also comprises the step of producing alarm information to prompt equipment \ line abnormity after the data acquisition point is determined to be abnormal.
10. A data acquisition device, comprising,
the acquisition module is set to acquire data for N times on the data acquisition points when the acquisition conditions are met, wherein N is an integer greater than 1;
the acquisition result determining module is configured to determine the data acquisition result of the current round of the data acquisition point according to the result of the N times of data acquisition, and includes: and if the N times of data acquisition results are the same, adopting the result of any one time of data acquisition as the current data acquisition result of the data acquisition point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010076393.XA CN111327493B (en) | 2020-01-23 | 2020-01-23 | Data acquisition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010076393.XA CN111327493B (en) | 2020-01-23 | 2020-01-23 | Data acquisition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111327493A true CN111327493A (en) | 2020-06-23 |
CN111327493B CN111327493B (en) | 2022-02-01 |
Family
ID=71165227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010076393.XA Active CN111327493B (en) | 2020-01-23 | 2020-01-23 | Data acquisition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111327493B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378830A (en) * | 2022-08-19 | 2022-11-22 | 百倍云(浙江)物联科技有限公司 | Stability monitoring method for ecological environment monitoring system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425125A (en) * | 2007-11-02 | 2009-05-06 | 王志明 | Double-face and double-reading optical mark reader |
CN104580187A (en) * | 2014-12-31 | 2015-04-29 | 厦门为那通信科技有限公司 | Method for achieving interaction of external devices of different MODULEBUS protocols and server |
CN106557652A (en) * | 2016-11-14 | 2017-04-05 | 攀钢集团攀枝花钢铁研究院有限公司 | The method of judgement sample detection data dubious value |
CN107426013A (en) * | 2017-05-27 | 2017-12-01 | 重庆交通开投科技发展有限公司 | Facility information monitoring method, apparatus and system |
CN107994975A (en) * | 2018-01-30 | 2018-05-04 | 深圳和而泰智能控制股份有限公司 | Radio frequency data transmission optimization method, radio frequency data transmission equipment and radio frequency reception end |
CN109141585A (en) * | 2018-08-09 | 2019-01-04 | 安徽省锐凌计量器制造有限公司 | A kind of flow sensor that can improve accuracy of measurement |
-
2020
- 2020-01-23 CN CN202010076393.XA patent/CN111327493B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425125A (en) * | 2007-11-02 | 2009-05-06 | 王志明 | Double-face and double-reading optical mark reader |
CN104580187A (en) * | 2014-12-31 | 2015-04-29 | 厦门为那通信科技有限公司 | Method for achieving interaction of external devices of different MODULEBUS protocols and server |
CN106557652A (en) * | 2016-11-14 | 2017-04-05 | 攀钢集团攀枝花钢铁研究院有限公司 | The method of judgement sample detection data dubious value |
CN107426013A (en) * | 2017-05-27 | 2017-12-01 | 重庆交通开投科技发展有限公司 | Facility information monitoring method, apparatus and system |
CN107994975A (en) * | 2018-01-30 | 2018-05-04 | 深圳和而泰智能控制股份有限公司 | Radio frequency data transmission optimization method, radio frequency data transmission equipment and radio frequency reception end |
CN109141585A (en) * | 2018-08-09 | 2019-01-04 | 安徽省锐凌计量器制造有限公司 | A kind of flow sensor that can improve accuracy of measurement |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378830A (en) * | 2022-08-19 | 2022-11-22 | 百倍云(浙江)物联科技有限公司 | Stability monitoring method for ecological environment monitoring system |
CN115378830B (en) * | 2022-08-19 | 2024-03-26 | 百倍云(浙江)物联科技有限公司 | Ecological environment monitoring system stability monitoring method |
Also Published As
Publication number | Publication date |
---|---|
CN111327493B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107832355B (en) | A kind of method and device that the agency of crawlers obtains | |
CN110213068B (en) | Message middleware monitoring method and related equipment | |
CN108011925A (en) | A kind of operating audit system and method | |
CN113590429A (en) | Server fault diagnosis method and device and electronic equipment | |
CN114338372A (en) | Network information security monitoring method and system | |
CN111327493B (en) | Data acquisition method and device | |
CN107204875A (en) | Data reporting links monitoring method, device, electronic equipment and storage medium | |
CN115460251B (en) | Cloud edge cooperation-based equipment data acquisition method, device, equipment and medium | |
CN107222497B (en) | Network flow abnormity monitoring method and electronic equipment | |
CN110659147B (en) | Self-repairing method and system based on module self-checking behavior | |
JP7291909B2 (en) | Information processing device, information processing method and program | |
US8136012B2 (en) | Method and system for updating topology changes of a computer network | |
CN108248641A (en) | A kind of urban track traffic data processing method and device | |
CN106846142B (en) | Information processing method and server | |
CN111586129A (en) | Alarm method and device for data synchronization, electronic equipment and storage medium | |
CN115314289A (en) | Attacked executor identifying method, output voter, equipment and storage medium | |
CN114090293A (en) | Service providing method and electronic equipment | |
CN115904772A (en) | Error determination method, device, equipment and storage medium for PCIe link | |
JP3221538B2 (en) | Network operation information collection system | |
CN115129508B (en) | Out-of-band processing method, device, equipment and medium for memory correctable errors | |
CN112463521B (en) | Fault-tolerant method and device for improving reliability of serial high-speed bus equipment | |
CN114024777B (en) | Method and device for detecting whether fingerprints of equipment collide | |
Catania et al. | A modeling framework to evaluate performability parameters in gracefully degrading systems | |
JP3454747B2 (en) | Empty buffer management method | |
JP4864755B2 (en) | Data processing system and diagnostic method |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211124 Address after: 100176 room 3412, floor 4, building 3, yard 2, Desheng Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing Applicant after: Beijing Helishi system integration Co.,Ltd. Address before: 100176 No.2, Disheng Middle Road, Yizhuang Economic and Technological Development Zone, Daxing District, Beijing Applicant before: BEIJING HOLLYSYS Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |