RTU data acquisition method for gas industry

文档序号:1364121 发布日期:2020-08-11 浏览:21次 中文

阅读说明:本技术 一种燃气行业rtu数据采集方法 (RTU data acquisition method for gas industry ) 是由 王晨 张静 孟伟 杨光 王文想 付京波 刘攀 黄志勇 杨秀平 郭涛 于 2020-03-19 设计创作,主要内容包括:本发明公开了一种燃气行业RTU数据采集方法,所述方法通过若干路采集通道分别采集预设数据测量区域的RTU数据;检测采集到的各RTU数据的有效性,以选取若干RTU数据中的有效RTU数据;基于选取到的有效RTU数据确定所述预设测量区域的目标RTU数据,并将所述目标RTU数据发送至燃气SCADA系统。本发明通过若干路采集通道采集到多个RTU数据,并对各RTU数据的有效性验证,提高了发送至SCADA系统的RTU数据的准确性,进而提高了SCADA系统决策的准确性。(The invention discloses a method for acquiring RTU data in the gas industry, which respectively acquires the RTU data of a preset data measurement area through a plurality of acquisition channels; detecting the effectiveness of each acquired RTU data to select effective RTU data in the RTU data; and determining target RTU data of the preset measurement area based on the selected effective RTU data, and sending the target RTU data to a gas SCADA system. According to the invention, a plurality of RTU data are acquired through a plurality of acquisition channels, and the validity of each RTU data is verified, so that the accuracy of the RTU data sent to the SCADA system is improved, and the decision accuracy of the SCADA system is further improved.)

1. A method for acquiring RTU data in a gas industry is characterized by comprising the following steps:

respectively acquiring RTU data of a preset data measurement area through a plurality of acquisition channels;

detecting the effectiveness of each acquired RTU data to select effective RTU data in the RTU data;

and determining target RTU data of the preset measurement area based on the selected effective RTU data, and sending the target RTU data to a gas SCADA system.

2. The gas industry RTU data acquisition method of claim 1, wherein said determining target RTU data for said predetermined measurement area based on said selected valid RTU data specifically comprises:

when at least two effective RTU data are selected, calculating the average value of all effective RTU data, and taking the average value as the target RTU data of the preset measurement area;

and when the selected effective RTU data is one, taking the effective RTU data as the target RTU data of the preset measurement area.

3. The gas industry RTU data acquisition method of claim 1, wherein when the target RTU data sent to the gas SCADA system reaches a preset amount; the detecting the validity of each acquired RTU data specifically includes:

acquiring a preset number of reference RTU data, wherein the reference RTU data are target RTU data with the acquisition time earlier than that of the RTU data;

determining RTU data reference values according to the obtained reference RTU data with preset quantity;

respectively calculating first difference absolute values of each RTU data and RTU data reference values, and respectively comparing each first difference absolute value with a preset difference threshold;

and if the absolute value of each first difference is smaller than the preset difference threshold, judging that each RTU data in the RTU data is valid RTU data.

4. The gas industry RTU data acquisition method of claim 3, wherein if each first difference absolute value is less than a preset difference threshold, then determining that each RTU data in the plurality of RTU data is valid RTU data specifically comprises:

if the first difference absolute values are smaller than a preset difference threshold, respectively calculating second difference absolute values of every two RTU data in the plurality of RTU data, and respectively comparing the calculated second difference absolute values with the preset difference threshold;

and if the absolute value of each second difference value is smaller than the preset difference value threshold, judging that each RTU data in the plurality of RTU data is valid RTU data.

5. The gas industry RTU data collection method of claim 3, wherein said detecting validity of each RTU data collected comprises:

and if the second difference absolute value which is greater than or equal to the preset difference threshold exists in the second difference absolute values, discarding all RTU data and re-executing the step of respectively acquiring the RTU data of the preset data measurement area through a plurality of acquisition channels.

6. The gas industry RTU data collection method of claim 3, wherein said detecting validity of each RTU data collected comprises:

if the first difference absolute values are greater than or equal to a preset difference threshold, acquiring first RTU data corresponding to the first difference absolute values smaller than the preset difference threshold in all the first difference absolute values, and judging that all the acquired first RTU data are valid RTU data;

and acquiring second RTU data corresponding to the first difference absolute value which is greater than or equal to the preset difference threshold value in all the first difference absolute values, and prompting that an acquisition channel corresponding to the second RTU data is abnormal.

7. The gas industry RTU data acquisition method of claim 1, wherein when the target RTU data sent to the gas SCADA system reaches a preset amount; the detecting the validity of each acquired RTU data specifically includes:

respectively calculating second difference absolute values of every two RTU data in the plurality of RTU data, and respectively comparing the calculated second difference absolute values with a preset difference threshold;

and if the absolute value of each second difference value is smaller than the preset difference value threshold, judging that each RTU data in the plurality of RTU data is valid RTU data.

8. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the gas industry RTU data collection method of any one of claims 1-7.

9. An RTU device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;

the communication bus realizes connection communication between the processor and the memory;

the processor, when executing the computer readable program, implements the steps in the gas industry RTU data collection method of any one of claims 1-7.

Technical Field

The invention relates to the technical field of remote monitoring, in particular to a method for acquiring RTU data in the gas industry.

Background

An RTU (Remote Terminal Unit) device is widely used in Data Acquisition and Remote control in the oil and gas industry, and has gradually become a main Data Acquisition source of a natural gas SCADA (Supervisory control and Data Acquisition system, Data Acquisition and monitoring control system). Therefore, the stability of the RTU equipment and the accuracy of data acquisition directly relate to the data accuracy of the SCADA system, and the correctness of system data analysis and decision making is influenced.

The RTU equipment adopted by the existing natural gas industry directly sends data read by a sensor to an SCADA system for judgment and analysis in the aspect of data acquisition. The acquisition process is that the sensor signals of the site are acquired to RTU equipment through analog quantity signals or digital quantity signals, and then the acquired data are transmitted to the SCADA system through a corresponding communication protocol for decision making. And after the SCADA system decides, sending the decided execution action to the RTU equipment, and sending the SCADA system action command received through communication to the field execution equipment by the RTU equipment through an analog quantity signal or a digital quantity signal for execution. Therefore, all decisions generated by the SCADA system depend on the accuracy of data acquisition of the RTU equipment, and the current RTU equipment may have the problem of signal interference or sensor damage in the data acquisition process, so that the data acquired by the RTU is distorted, and further, the decision error of the SCADA system is caused to generate a serious safety accident.

Disclosure of Invention

The invention aims to solve the technical problem of providing a method for acquiring RTU data in the gas industry aiming at the defects of the prior art.

In order to solve the technical problems, the technical scheme adopted by the invention is as follows:

a gas industry RTU data acquisition method, the method comprising:

respectively acquiring RTU data of a preset data measurement area through a plurality of acquisition channels;

detecting the effectiveness of each acquired RTU data to select effective RTU data in the RTU data;

and determining target RTU data of the preset measurement area based on the selected effective RTU data, and sending the target RTU data to a gas SCADA system.

The gas industry RTU data acquisition method, wherein the determining of the target RTU data of the preset measurement area based on the selected effective RTU data specifically includes:

when at least two effective RTU data are selected, calculating the average value of all effective RTU data, and taking the average value as the target RTU data of the preset measurement area;

and when the selected effective RTU data is one, taking the effective RTU data as the target RTU data of the preset measurement area.

According to the RTU data acquisition method in the gas industry, when target RTU data sent to a gas SCADA system reach a preset number; the detecting the validity of each acquired RTU data specifically includes:

acquiring a preset number of reference RTU data, wherein the reference RTU data are target RTU data with the acquisition time earlier than that of the RTU data;

determining RTU data reference values according to the obtained reference RTU data with preset quantity;

respectively calculating first difference absolute values of each RTU data and RTU data reference values, and respectively comparing each first difference absolute value with a preset difference threshold;

and if the absolute value of each first difference is smaller than the preset difference threshold, judging that each RTU data in the RTU data is valid RTU data.

The gas industry RTU data acquisition method, wherein if each first difference absolute value is smaller than a preset difference threshold, then determining that each RTU data in the plurality of RTU data is valid RTU data specifically includes:

if the first difference absolute values are smaller than a preset difference threshold, respectively calculating second difference absolute values of every two RTU data in the plurality of RTU data, and respectively comparing the calculated second difference absolute values with the preset difference threshold;

and if the absolute value of each second difference value is smaller than the preset difference value threshold, judging that each RTU data in the plurality of RTU data is valid RTU data.

The gas industry RTU data acquisition method, wherein the detecting validity of each RTU data acquired comprises:

and if the second difference absolute value which is greater than or equal to the preset difference threshold exists in the second difference absolute values, discarding all RTU data and re-executing the step of respectively acquiring the RTU data of the preset data measurement area through a plurality of acquisition channels.

The gas industry RTU data acquisition method, wherein the detecting validity of each RTU data acquired comprises:

if the first difference absolute values are greater than or equal to a preset difference threshold, acquiring first RTU data corresponding to the first difference absolute values smaller than the preset difference threshold in all the first difference absolute values, and judging that all the acquired first RTU data are valid RTU data;

and acquiring second RTU data corresponding to the first difference absolute value which is greater than or equal to the preset difference threshold value in all the first difference absolute values, and prompting that an acquisition channel corresponding to the second RTU data is abnormal.

According to the RTU data acquisition method in the gas industry, when target RTU data sent to a gas SCADA system reach a preset number; the detecting the validity of each acquired RTU data specifically includes:

respectively calculating second difference absolute values of every two RTU data in the plurality of RTU data, and respectively comparing the calculated second difference absolute values with a preset difference threshold;

and if the absolute value of each second difference value is smaller than the preset difference value threshold, judging that each RTU data in the plurality of RTU data is valid RTU data.

A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the gas industry RTU data collection method as any one of the above.

An RTU apparatus, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;

the communication bus realizes connection communication between the processor and the memory;

the processor, when executing the computer readable program, implements the steps in the gas industry RTU data collection method as described in any one of the above.

Has the advantages that: compared with the prior art, the invention provides a method for acquiring RTU data in the gas industry, which is characterized in that the method respectively acquires the RTU data in a preset data measurement area through a plurality of acquisition channels; detecting the effectiveness of each acquired RTU data to select effective RTU data in the RTU data; and determining target RTU data of the preset measurement area based on the selected effective RTU data, and sending the target RTU data to a gas SCADA system. According to the invention, a plurality of RTU data are acquired through a plurality of acquisition channels, and the validity of each RTU data is verified, so that the accuracy of the RTU data sent to the SCADA system is improved, and the decision accuracy of the SCADA system is further improved.

Drawings

Fig. 1 is a flowchart of a gas industry RTU data acquisition method provided by the invention.

Fig. 2 is a schematic structural diagram of an RTU device provided in the present invention.

Detailed Description

The invention provides a method for acquiring RTU data in the gas industry, which is further described in detail below by referring to the attached drawings and embodiments in order to make the purpose, technical scheme and effect of the invention clearer and clearer. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.

It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

The embodiment provides a method for acquiring RTU data in the gas industry, which can be applied to RTU equipment, wherein the RTU equipment is provided with a plurality of acquisition channels so as to synchronously acquire a plurality of RTU data through the plurality of acquisition channels. Wherein, the collection channel can be a sensor and the like. In addition, the functions realized by the method can be realized by calling a program code by a processor in the RTU device, and the program code can be saved in a computer storage medium.

As shown in fig. 1, the present implementation provides a method for acquiring RTU data in a gas industry, which may include the following steps:

and S10, respectively acquiring RTU data of the preset data measurement area through a plurality of acquisition channels.

Specifically, the plurality of acquisition channels are configured in the RTU device and configured to measure the same preset data measurement area to obtain a plurality of RTU data, where the plurality of acquisition channels are acquisition channels that acquire the same data, and the plurality of acquisition channels acquire the preset data measurement area synchronously. It can be understood that the RTU data acquired by each of the plurality of acquisition channels is the RTU data of the same parameter of the preset data measurement area, for example, the temperature, the natural gas concentration, the humidity, and the like of the preset number of measurement areas are acquired by the plurality of acquisition channels. In addition, the acquisition frequency of the acquisition channels for acquiring the preset data measurement area is the same, and the acquisition time of the acquisition channels for starting acquisition of the preset data measurement area is the same, so that the acquisition channels can acquire the RTU data of the preset data measurement area at the same time.

Further, the plurality of acquisition channels may be any plurality of acquisition channels of a plurality of acquisition channel terminals configured for the RTU device, for example, the plurality of acquisition channels are three acquisition channels, and thus can be determined by configuring any three channels in the RTU device, thereby realizing more flexible and changeable application modes and meeting various field requirements. Such as: the RTU data detection method comprises the steps of randomly selecting three channel combinations from AI0-AI8 channels of the RTU, or randomly selecting three channel access signals according to on-site wiring and using convenience, and then directly determining RTU data for detecting a preset measurement area according to channel identifiers when configuring corresponding channel identifiers. Therefore, important data can be configured, unimportant data can be collected through a common single channel, the occupation amount and cost of equipment channels are reduced, and the stability and reliability of the system are improved.

Further, the RTU equipment is arranged in the preset data measurement area, the RTU data of the preset data measurement area are collected through the RTU equipment, and the RTU equipment can collect a plurality of RTU data at the same collection time. It can be understood that the preset data measurement area can acquire a plurality of RTU data at the same time, and the RTU data are independent from each other. That is to say, the acquisition channels are independent from each other, and do not affect or communicate with each other. Therefore, the RTU data of the preset data measurement area are synchronously acquired through the plurality of acquisition channels, the redundant configuration of the plurality of acquisition channels can be realized, the correctness of the RTU data is ensured, and when part of the acquisition channels are damaged, the RTU equipment can still work, so that the service life of the RTU equipment is prolonged.

And S20, detecting the validity of each RTU data to select valid RTU data in the RTU data.

Specifically, the validity refers to correctness of the RTU data, and it can be understood that, when the RTU data is correct data, the validity of the RTU data is valid, that is, the RTU data is valid data; on the contrary, when the RTU data is error data, the validity of the RTU data is invalid, i.e. the RTU data is invalid data. In addition, the detecting the validity of each collected RTU data means that, for each of all the collected RTU data, the validity of the RTU data is detected to obtain the validity of each of all the RTU data.

Further, the RTU equipment stores the target RTU data while sending the target RTU data to the SCADA system, and takes the target RTU data stored by the RTU equipment as historical RTU data. Therefore, after a plurality of RTU data are collected, the number of the target RTU data stored by the RTU data detection device can be detected, and the detection mode of the effectiveness of each RTU data is determined according to the number of the detected target RTU data. The detection mode of the validity of each RTU data may be a first detection mode based on target RTU data stored by the RTU device itself, or a second detection mode based on the RTU data itself collected at the present time. Of course, it should be noted that the method for detecting the validity of each RTU data may also adopt other manners, for example, a manner of adopting a preset data threshold.

In addition, the judgment basis adopting the first detection mode or the second detection mode may be the number of target RTU data stored by the RTU device itself, for example, when the number of target RTU data stored by the RTU device itself reaches a preset number, the first detection mode is adopted; otherwise, when the quantity of the target RTU data stored by the RTU equipment does not reach the preset quantity, a second detection mode is adopted. Correspondingly, in an implementation manner of this embodiment, before detecting validity of each acquired RTU data, the method may include: reading the quantity of target RTU data stored in RTU equipment, judging whether the quantity reaches a preset quantity, and adopting a first detection mode when the quantity reaches the preset quantity; and when the number does not reach the preset number, adopting a second detection mode. Wherein the preset number is preset, for example, 10.

In one implementation manner of this embodiment, when the target RTU data sent to the gas SCADA system reaches a preset number; the detecting the validity of each acquired RTU data specifically includes:

h10, acquiring reference RTU data of a preset number, wherein the reference RTU data are target RTU data with the acquisition time earlier than that of the RTU data;

h20, determining RTU data reference values according to the obtained reference RTU data with preset quantity;

h30, respectively calculating first difference absolute values of each RTU data and RTU data reference values, and respectively comparing each first difference absolute value with a preset difference threshold;

h40, if the absolute value of each first difference is smaller than a preset difference threshold, judging that each RTU data in the RTU data is valid RTU data.

Specifically, in step H10, the reference RTU data is included in the target RTU data stored by the RTU device itself, and the reference RTU data may be all the target RTU data stored by the RTU device itself or may be a part of the target RTU data stored by the RTU device itself. For example, when the number of target RTU data stored by the RTU device is a preset number, the reference RTU data is the full target RTU data stored by the RTU device; when the number of the target RTU data stored by the RTU equipment exceeds the preset number, the reference RTU data is part of the target RTU data stored by the RTU equipment. In addition, the collection time of the reference RTU data is earlier than that of the RTU data to be detected (i.e. one of the plurality of RTU data collected by the current time of the plurality of collection channels), and the collection time of the reference RTU data and the RTU data to be detected is continuous RTU data. It can be understood that the acquisition times of two adjacent reference RTU data in the preset number of reference RTU data are adjacent, and the acquisition time of the reference RTU data with the latest acquisition time in the preset number of reference RTU data is adjacent to the acquisition time of the RTU data to be detected. For example, the reference RTU data includes RTU data a and RTU data B, and the acquisition time of the RTU data a is earlier than the acquisition time of the RTU data B, then the acquisition time of the RTU data a is adjacent to the acquisition time of the RTU data B, and the acquisition time of the RTU data B is adjacent to the detection time of the RTU data to be detected.

Further, in the step H20, the RTU data reference value is a reference value calculated according to a preset number of acquired reference RTU data and used for verifying the validity of each RTU data. The RTU data reference value may be an average value of a preset number of reference RTU data, a maximum value of the preset number of reference RTU data, a minimum value of the preset number of reference RTU data, and the like. In a specific implementation manner of this embodiment, the RTU data reference value is a numerical value calculated by a linear regression analysis algorithm based on a preset number of reference RTU data. Correspondingly, the determining the reference value of the RTU data according to the obtained reference RTU data of the preset number specifically includes: and calculating and obtaining the data prediction values of the reference RTU data in a preset number by using a linear regression analysis algorithm, and taking the calculated data prediction values as RTU data reference values. Of course, it is worth to be noted that the RTU data reference value is a reference value of a plurality of RTU data acquired through a plurality of acquisition channels, that is, each RTU data of the plurality of RTU data takes the RTU data reference value as a reference value for verifying validity. In one implementation of the present implementation, the linear regression analysis algorithm may employ a least squares method.

Further, in the step H30, the preset difference threshold is preset and is used for determining whether the RTU data reaches the reference value of the RTU data. The preset difference threshold may be set according to empirical data of field operation, for example, when it is determined that one of the two acquisition channels fails to transmit, the difference between the RTU data acquired by the two acquisition channels is determined on the field, and the difference is used as the preset difference threshold. In addition, the step of calculating the first absolute difference value between each RTU data and the reference value of the RTU data means that, for each RTU data of the plurality of RTU data, the difference value between the RTU data and the reference value of the RTU data is calculated, and the absolute difference value is taken to obtain the first absolute difference value.

Further, in the step H40, that each first difference absolute value is smaller than the preset difference threshold means that the first difference absolute value corresponding to each RTU data in the plurality of RTU data is smaller than the preset difference threshold, which indicates that the error of each RTU data in the RTU data reference value meets the preset difference threshold, at this time, it may be directly determined that all the acquisition channels are not abnormal, and each RTU data is valid RTU data. In addition, in practical application, in order to further improve the correctness of the RTU data, after the first absolute difference values corresponding to the RTU data are all smaller than the preset difference threshold, the second method may be adopted to verify the plurality of data.

In an implementation manner of this embodiment, if each of the first difference absolute values is smaller than the preset difference threshold, the determining that each of the plurality of RTU data is valid RTU data specifically includes:

h41, if the first difference absolute values are smaller than a preset difference threshold, respectively calculating second difference absolute values of every two RTU data in the plurality of RTU data, and respectively comparing the calculated second difference absolute values with the preset difference threshold;

h42, if the absolute value of each second difference is smaller than the preset difference threshold, judging that each RTU data in the RTU data is valid RTU data

H43, if a second difference absolute value greater than or equal to the preset difference threshold exists in the second difference absolute values, discarding all RTU data and re-executing the step of respectively acquiring the RTU data of the preset data measurement area through a plurality of acquisition channels.

Specifically, the calculating of the second absolute difference value of every two RTU data in the plurality of RTU data means that two RTU data in the plurality of RTU data are arbitrarily selected to form a data pair, and the difference value of the two RTU data in each data pair is respectively calculated to obtain the second absolute difference value corresponding to every two RTU data. For example, the plurality of RTU data includes the RTU data A, RTU data B and the RTU data C, and then the pair of the RTU data A, RTU data B and the RTU data C is the RTU data a and the RTU data B, the RTU data B and the RTU data C, and the RTU data a and the RTU data C, and the calculated second absolute difference values are the absolute difference values of the RTU data a and the RTU data B, the absolute difference values of the RTU data a and the RTU data C, and the absolute difference values of the RTU data B and the RTU data C, respectively.

Further, the second absolute difference value represents an error of RTU data acquired by two acquisition channels, and since the same measurement data of the same prediction data measurement region should be theoretically equal, although there may be an error in different acquisition channels, the error in each acquisition channel needs to be within a set range. Therefore, when the two acquisition channels acquire the same parameters of the same prediction data measurement area, the error of the acquired two RTU data needs to be within a specified range, namely the absolute value of the second difference calculated by the two RTU data needs to be smaller than the preset difference threshold. When the second absolute difference value of the two RTU data is greater than the preset difference threshold, it indicates that the error between the two RTU data is satisfactory, and at this time, the two RTU data need to be discarded. In addition, in order to ensure the synchronism of each RTU data, all RTU data can be discarded simultaneously, and the RTU data of the preset data measurement area can be collected again through a plurality of collecting channels.

Further, when each first difference absolute value is compared with a preset difference threshold, a part of the first difference absolute values may be smaller than the preset difference threshold, and a part of the first difference absolute values may be greater than or equal to the preset difference threshold. Thus, in an implementation manner of this embodiment, the detecting validity of each acquired RTU data includes:

h50, if the first difference absolute values are larger than or equal to a preset difference threshold, acquiring first RTU data corresponding to the first difference absolute values smaller than the preset difference threshold in all the first difference absolute values, and judging that all the acquired first RTU data are valid RTU data;

h60, acquiring second RTU data corresponding to the first difference absolute value which is greater than or equal to the preset difference threshold value in all the first difference absolute values, and prompting that the acquisition channel corresponding to the second RTU data is abnormal.

Specifically, the existence of the first difference absolute values each being greater than or equal to the preset difference threshold means that at least one of the first difference absolute values is greater than or equal to the preset difference. For example, the plurality of RTU data includes RTU data A, RTU data B and RTU data C, an RTU data reference value P, then the first absolute difference value includes an absolute difference value of the RTU data a and the RTU data reference value P, an absolute difference value of the RTU data B and the RTU data reference value P, and an absolute difference value of the RTU data C and the RTU data reference value P; if the absolute value of the difference between the RTU data A and the RTU data reference value P is smaller than the preset threshold, it indicates that the first absolute values of the difference are larger than or equal to the preset threshold.

Further, for a first difference absolute value which is greater than or equal to a preset difference threshold, judging that the RTU data corresponding to the first difference absolute value is abnormal RTU data, judging that an acquisition channel corresponding to the abnormal RTU data is abnormal, and performing abnormal prompt. In addition, for a first difference absolute value smaller than a preset difference threshold, the RTU data corresponding to the first difference absolute value is determined to be valid RTU data, and the target RTU data can be directly calculated according to all the valid RTU data obtained. Of course, in practical applications, when a part of the first difference absolute values is smaller than the preset difference threshold, second difference absolute values of every two RTU data in the RTU data corresponding to the part of the first difference absolute values may be calculated, and the step of comparing each calculated second difference absolute value with the preset difference threshold is performed, so as to verify an error between the RTU data. It should be noted that, when the absolute value of the first difference corresponding to only one RTU data is smaller than the preset difference threshold, the RTU data is directly used as the target RTU data.

Further, after second RTU data corresponding to the first difference absolute value greater than or equal to the preset difference threshold among all the first difference absolute values are acquired, corresponding warning information may be generated according to the number of the acquired second RTU data. For example, the RTU device is configured with three acquisition channels, and when the second RTU is one (that is, the RTU data acquired by one acquisition channel fails), the failure information is reported to the SCADA system for alarming, the alarm level is yellow to warn, and the other acquisition channels work normally; when the number of the second RTUs is two (namely, RTU data acquired by the two acquisition channels have faults), reporting fault information to the SCADA system for alarming, wherein the alarm level is orange for alarming, and the remaining acquisition channel works normally; when the number of the second RTUs is three (namely, RTU data acquired by the three acquisition channels have faults), reporting the fault information to the SCADA system for alarming, wherein the alarm level is red for alarming, and stopping the field logic control to reach a safe stop state until the fault is relieved.

In one implementation manner of this embodiment, when the target RTU data sent to the gas SCADA system reaches a preset number; the detecting the validity of each acquired RTU data specifically includes:

l10, respectively calculating second difference absolute values of every two RTU data in the RTU data, and respectively comparing the calculated second difference absolute values with a preset difference threshold;

and L20, if the absolute value of each second difference is smaller than the preset difference threshold, judging that each RTU data in the plurality of RTU data is valid RTU data.

Specifically, the steps L10 and L20 are the same as the steps H41, H42, and H43, and may specifically join the descriptions of the steps H41, H42, and H43, which are not described herein again. The above completes the description of step S20, and the following steps of step S20 are described below.

And S30, determining target RTU data of the preset measurement area based on the selected effective RTU data, and sending the target RTU data to a gas SCADA system.

Specifically, the target RTU data is calculated according to the selected valid RTU data and is used for sending to the SCADA system, so that the SCADA system makes a decision based on the target RTU data. The target RTU data may be an average value of the selected valid RTU data, or one of the selected valid RTU data. In an embodiment of this embodiment, the target RTU data is an average value of all selected RTU data, and accordingly, the determining the target RTU data of the preset measurement area based on the selected valid RTU data specifically includes: when at least two effective RTU data are selected, calculating the average value of all effective RTU data, and taking the average value as the target RTU data of the preset measurement area; and when the selected effective RTU data is one, taking the effective RTU data as the target RTU data of the preset measurement area.

Based on the gas industry RTU data collection method, the present embodiment provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement the steps in the gas industry RTU data collection method according to the above embodiment.

Based on the RTU data acquisition method in the gas industry, the invention also provides RTU equipment which comprises a processor, a memory and a communication bus; the memory has stored thereon a computer readable program executable by the processor;

the communication bus realizes connection communication between the processor and the memory;

the processor, when executing the computer readable program, implements the steps in the gas industry RTU data collection method as described in any one of the above.

In addition, the specific processes loaded and executed by the storage medium and the instruction processors in the RTU device are described in detail in the method, and are not stated herein.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:红外遥控设备测试装置及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!