Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) related to one or more embodiments of the present disclosure are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data is required to comply with related laws and regulations and standards, and is provided with a corresponding operation portal for the user to select authorization or rejection.
In a gas transmission system (such as an oil-gas pipe network system), a sensor bears important functions of data acquisition, information generation and the like. Sensor abnormality or sensor attack (such as forging, altering or replaying routing information attack, witch attack, sewage pool attack, flooding (Hello) attack, blocking service DoS attack, distributed denial of service DDoS attack, etc.) can cause risks of abnormal data transmission, information leakage, etc. of the gas transmission system, and thus cause great influence on the current production node, and even possibly cause abnormality to other production nodes.
Related sensor fault detection methods (such as a distributed filter, an improved fusion algorithm based on historical measurement, an improved quasi-Newton sensor network and the like) generally utilize simulation analog sensor signals, and use devices such as a filter, a state detector and the like to perform sensor attack detection, and have the characteristics of single detection mode, dependence on external conditions such as sensor signals, operation logs and the like. In general, the operation log is mainly an alarm record and a state parameter record, and only includes some discrete data, so that the operation log is difficult to be suitable for practical application scenes, the matching degree of the detection result of the method is low, and the safety problem of accidents of a gas transmission system caused by sensor faults or attacks still exists.
Aiming at the problems, the application provides an intelligent fault identification method and device for an oil-gas pipe network sensor and storage equipment. The method comprises the steps of determining a safe production process data threshold interval of a target oil-gas medium based on physical parameters of the target oil-gas medium, acquiring operation parameters, determining a mutation time point when the operation parameters are located in the safe production process data threshold interval, and determining the abnormal type of the sensor based on the mutation time point, such as physical fault of the sensor or network attack of the sensor. Therefore, whether the sensor has a problem or not can be determined based on the safety production process data threshold interval, and when the operation parameters are located in the safety production process data threshold interval, the potential sensor abnormality type is identified, the sensor abnormality detection method is applicable to a plurality of application scenes, the matching degree between an abnormality identification result and the scenes is improved, the distinction between sensor network attack and physical faults is realized, and therefore the accuracy of the abnormality identification result is improved.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic architecture diagram of an intelligent fault recognition system for an oil-gas pipe network sensor according to an embodiment of the present application.
Taking the oil-gas pipe network sensor fault intelligent recognition system as an oil-gas pipe network system and taking a sensor as a pressure sensor as an example, referring to fig. 1, the oil-gas pipe network sensor fault intelligent recognition system comprises a server and a control unit, wherein the control unit comprises an electric valve, a pressure sensor, data collection equipment, first equipment, second equipment and a PI controller. The pressure sensor is used for collecting pressure data of the target oil gas medium passing through the filtering separator and transmitting the pressure data to the first equipment and the second equipment through the data collecting equipment. In the operation process of the oil-gas pipe network system, the first equipment is used as operation control equipment, and the processed data is input to the PI controller. The PI controller is used for generating feedback control instructions (such as feedback adjustment increasing instructions, feedback adjustment descending instructions or non-adjustment instructions and the like) based on pressure data transmitted by the first equipment so as to control the electric valve to transmit and control the target oil gas medium and adjust the pressure of the target oil gas medium in the oil gas pipe network system. The second device is used for controlling redundancy and monitoring abnormal conditions.
The server is in communication connection with the first device and the second device in the control unit, and is used for acquiring operation parameters (such as pressure data or temperature data) in the first device and the second device, determining whether a system abnormality exists based on a comparison result between the operation parameters and a safety production process data threshold interval, generating alarm information when the operation parameters are not located in the safety production process data threshold interval, determining data mutation time points in the first device and the second device when the operation parameters in the first device and the second device are located in the safety production process data threshold interval, and further determining the abnormality type of the sensor.
The control principle of the PI controller is shown as 102, and the control unit includes a plurality of electrically operated valves (only 2 are shown in fig. 1, including VLV-103 and VLV-104 shown as 102 in fig. 1). PIC-100 is a pressure sensing controller (the sensing-control feedback is integrated together, which may be simply referred to as a controller), LIC-100 is a liquid level sensing controller (the sensing-control feedback is integrated together, which may be simply referred to as a controller)
The PI controller comprises a separator (V-100 shown as 102 in figure 1), when the separator V-100 separates the data of the target oil and gas medium, the pressure value is regulated to be reduced through a control valve VLV-104 if the pressure data is detected to be too large through a pressure sensing controller PIC-100 (the sensing-control feedback is integrated together and can be simply called a pressure sensing controller), and the pressure value is regulated to be increased through a control valve VLV-103 if the pressure data is detected to be too effective. Similarly, if the liquid level sensing controller LIC-100 detects that the liquid level data is too large, the liquid level value is regulated by the control valve VLV-103 to be reduced, and if the liquid level data is detected to be too small, the liquid level value is regulated by the control valve VLV-103 to be increased.
Taking pressure data as an example, as shown at 103 in fig. 1, when the control valve VLV-104 receives the PV process value (also the pressure data after the separator V-100 separates), it compares it with the PID set value (the target value to which the PID regulator is expected to be tuned) SP, generates a corresponding OP output value (including but not limited to an increase value or a decrease value) based on the comparison result, and adjusts the pressure value to increase or decrease based on the OP output value.
Based on the above, the output flow of the intelligent recognition system for the oil and gas pipe network sensor faults is shown as 104 in fig. 1, and the intelligent recognition system for the oil and gas pipe network sensor faults comprises a mixer MIX-100, a separator V-100, a control valve VLV-101, a control valve VLV-102, a control valve VLV-103, a control valve VLV-104, a compressor K-100 and the like.
The target oil-gas medium is input into the mixer MIX-100 through the control valve VLV-100, then is input into the separator V-100 through the control valve VLV-104, and after the separator V-100 separates, the temperature, pressure and other data of the target oil-gas medium are regulated through the control valve VLV-102, the control valve VLV-103 and the control valve VLV-104.
Alternatively, when pressure adjustment is performed on the target oil-gas medium, the pressure adjustment can be achieved through a compressor K-100, and Q-100 represents heat energy required by the compressor.
Fig. 2 is a schematic flow chart of an intelligent fault recognition method for an oil-gas pipe network sensor according to an embodiment of the present application. Referring to fig. 2, the method comprises the steps of:
S101, determining a safe production process data threshold interval of a target oil-gas medium based on physical parameters of the target oil-gas medium.
Optionally, the method for intelligently identifying the fault of the oil and gas pipe network sensor provided in the embodiment of the application can be applied to a storage device (for example, a server shown in fig. 1) in communication connection with a first device, a second device and the like, and the embodiment of the application is not limited herein.
Specifically, physical parameters of a target oil-gas medium are obtained, wherein the target oil-gas medium is used for indicating the oil-gas medium transmitted in a gas transmission system (such as an oil-gas pipe network system), and the target oil-gas medium can be an oil-gas medium formed by single substances (or called components) or can be a mixed oil-gas medium formed by two or more substances.
And determining a safe production process data threshold interval of the target oil-gas medium based on the physical parameters of the target oil-gas medium. It is understood that the safe production process data threshold interval of the single-substance oil and gas medium is directly determined by the physical parameters of the single-substance oil and gas medium, and the safe production process data threshold interval of the mixed oil and gas medium is determined by the fusion of the physical parameters of each substance in the mixed oil and gas medium.
S102, acquiring an operation parameter, and determining a mutation time point based on the operation parameter when the operation parameter is within the safety production process data threshold interval.
Specifically, the operation parameters of the target oil-gas medium are obtained, and the operation parameters are compared with the safe production process data threshold interval of the target oil-gas medium. When the operation parameter is smaller than or equal to the upper boundary in the safety production process data threshold interval and larger than or equal to the lower boundary of the safety production process data threshold interval, determining that the operation parameter is located in the safety production process data threshold interval, wherein the sensor may not be abnormal, or the sensor is abnormal but the abnormality does not influence the normal operation of the gas transmission system, and determining the data mutation time point based on the operation parameter of the target oil gas medium.
Wherein the abrupt time point is used for indicating the moment when the data suddenly changes (such as suddenly increases and/or suddenly decreases) in the operation parameter.
S103, determining an abnormal type based on the abrupt change time point, wherein the abnormal type comprises sensor faults or network attacks on the sensor.
Specifically, based on the point in time of the abrupt change in the operating parameter, the type of anomaly present at the sensor is determined, wherein the type of anomaly includes, but is not limited to, a sensor failure (or sensor physical failure) or a sensor being under network attack.
It will be appreciated that network attacks on sensors are one type of anomaly that involves a broader scope, greater potential harm, and greater difficulty in maintenance. Physical layer vulnerabilities and faults require certain conditions and time from the occurrence of a security vulnerability to the occurrence of an incident. Once an external attacker successfully attacks or invades the sensor when it is under network attack, the fault/anomaly may propagate to the physical core devices in the system. Based on the method, when the operation parameters are located in the safety production process data threshold value interval, potential sensor faults or abnormal conditions of the sensor under network attack are efficiently and rapidly identified, and therefore the safety of the system is improved.
In some embodiments, the target hydrocarbon medium includes a first substance and a second substance, the physical parameters include a first physical parameter of the first substance and a second physical parameter of the second substance, and the determining the safe production process data threshold interval for the target hydrocarbon medium based on the physical parameters of the target hydrocarbon medium includes:
calculating to obtain the mixing parameter of the target oil-gas medium based on the first physical parameter and the second physical parameter;
determining a relationship ratio of temperature and pressure based on the mixing parameters;
and when the relation ratio of the temperature and the pressure is smaller than a first threshold value, determining a safe production process data threshold value interval of the target oil and gas medium, wherein the safe production process data threshold value interval comprises at least one of a target temperature interval and a target pressure interval.
Optionally, when the target oil-gas medium is a mixed oil-gas medium, the safe production process data threshold interval of the target oil-gas medium is determined by physical parameters of each substance in the mixed oil-gas medium, and in the embodiment of the application, the determination mode of the safe production process data threshold interval is described mainly by taking the target oil-gas medium as the mixed oil-gas medium composed of two substances (such as a first substance and a second substance).
Specifically, when the target hydrocarbon medium includes a first substance and a second substance, the physical parameters of the target hydrocarbon medium include a first physical parameter of the first substance and a second physical parameter of the second substance. Wherein the physical parameter includes, but is not limited to, at least one of a critical temperature, a critical pressure, a relative gas temperature, etc. of the substance.
Specifically, based on the first physical parameter and the second physical parameter, calculating to obtain a mixed parameter of the target oil-gas medium, based on the mixed parameter of the target oil-gas medium, determining a relationship ratio of temperature and pressure in the target oil-gas medium, determining algorithm convergence when the relationship ratio of temperature and pressure is smaller than a first threshold, and determining a safe production process data threshold interval of the target oil-gas medium based on equipment parameters in a gas transmission system and the relationship ratio of temperature and pressure.
The safety production process data threshold interval comprises at least one of a target temperature interval and a target pressure interval.
Optionally, the safety production process data threshold interval comprises an upper boundary and a lower boundary.
The target temperature interval is exemplified by [ target temperature lower boundary, target temperature upper boundary ], and the target pressure interval is exemplified by [ target pressure lower boundary, target pressure upper boundary ].
Taking the intelligent recognition system of the oil-gas pipe network sensor fault as shown in fig. 1, taking a mixed oil-gas medium consisting of two substances of i and j as a target oil-gas medium as an example, adopting a Peng-Luo Binsen (Peng-Robinson) equation to determine the boundary value of pressure data, as shown in a formula (1):
Wherein R represents a general gas constant (8.314J/(mol.K)), T represents the temperature of the target oil-gas medium, a represents the attraction constant of the target oil-gas medium, and b represents the volume constant of the target oil-gas medium. Alpha represents a temperature dependent factor for adjusting the attraction force constant a. The calculation modes of the attraction constant a and the volume constant b in any substance (i or j) in the target oil-gas medium are shown as the following formula:
Wherein T c represents the critical temperature, P C represents the critical pressure, T r represents the relative temperature of the target oil and gas medium, and is the ratio of the actual temperature to the critical temperature.
Α represents a temperature dependent factor for adjusting the attractive force constant a, see the formula:
Based on this, the attraction constant a mix and the volume constant b mix of the target oil and gas medium are calculated as follows:
Where x i represents the mole fraction of the i-th substance of the target hydrocarbon medium in the mixture, a i represents the attraction constant of the i-th substance in the target hydrocarbon medium, b i represents the volume constant of the i-th substance of the target hydrocarbon medium, and k ij represents the factor of the secondary interaction between the i-and j-th substances.
It can be understood that the formula (1) may also be referred to as a relationship ratio of temperature and pressure of the target oil-gas medium, and the formulas (1) - (6) are used for determining whether the simulated simulation flow meets the criterion of actual production, and when the difference value of the relationship ratio calculation result of the temperature and the pressure is smaller than the first threshold value, the simulation flow converges and is determined. Based on the equipment parameters in the gas transmission system and the relation ratio of the temperature and the pressure, the safe production process data threshold interval of the target oil-gas medium is determined, the dynamic conditions of the valve are defined, and controllers and control expressions of liquid level, pressure and the like are designed (shown as 102 and 103 in fig. 1). The first threshold may be specifically set according to practical situations, for example, the first threshold is set to 0.01 or 0.001.
Optionally, the safe production process data threshold interval of the target oil and gas medium further comprises a liquid level upper and lower limit threshold.
Illustratively, the safe production process data threshold interval of the target hydrocarbon medium is primarily used to indicate safe production upper and lower thresholds for the inlet and outlet of the filter separator. For example, the target pressure interval at the inlet of the filter separator is [7,8.95], the target pressure interval at the outlet of the filter separator is [7,11.8], the target temperature interval at the inlet of the filter separator is [11,12], and the target temperature interval at the outlet of the filter separator is [11,50].
In some embodiments, after the obtaining the operating parameters, comprising:
and generating alarm information when the operation parameter is smaller than the lower boundary or larger than the upper boundary, wherein the alarm information is used for indicating abnormal operation of the sensor.
Specifically, when the operation parameter of the target oil gas medium is smaller than the lower boundary in the safety production process data threshold interval, or when the operation parameter of the target oil gas medium is larger than the upper boundary in the safety production process data threshold interval, determining that the sensor has a fault or is attacked and influences the normal operation in the oil gas network system, and generating alarm information based on the operation parameter of the target oil gas medium, wherein the alarm information is used for indicating that the sensor is abnormal in operation.
Optionally, the alert information includes, but is not limited to, at least one of a type of operating parameter in the target hydrocarbon medium, a value of the operating parameter, and the like.
Fig. 3 is another flow chart of an intelligent fault recognition method for an oil-gas pipe network sensor according to an embodiment of the present application. Referring to fig. 3, the method step S102 includes the steps of:
S1021, acquiring operation parameters.
And S1022, calculating to obtain the accumulated sum of the log likelihood ratios at each moment according to each operation parameter in a preset time period when the operation parameter is positioned in the safety production process data threshold value interval.
Specifically, the operation parameters of the target oil-gas medium are obtained, the operation parameters of the target oil-gas medium are compared with the upper boundary and the lower boundary of the safety production process data threshold interval, and when the operation parameters of the target oil-gas medium are located in the upper boundary and the lower boundary of the safety production process data threshold interval, the fact that the sensor is abnormal or the sensor is abnormal but the normal operation of the gas transmission system is not affected is determined. And calculating to obtain the accumulated sum of the log likelihood ratios at each time according to the operation parameters in the preset time period.
Optionally, the operating parameters include, but are not limited to, at least one of temperature, air pressure.
It can be appreciated that when the operating parameters of the target hydrocarbon medium include multiple types, when the operating parameters of each type are within the upper and lower boundaries of the safety production process data threshold interval, it is determined that there is no anomaly in the sensor or that there is an anomaly in the sensor but the anomaly does not affect the normal operation of the gas delivery system. When one or more operation parameters in the operation parameters of each type are not located in the corresponding safety production process data threshold value interval, determining that the sensor is abnormal, and generating corresponding alarm information.
Exemplary operating parameters for the target hydrocarbon medium include operating temperature and operating pressure. When the operating temperature is within the upper and lower boundaries of the target temperature interval and the operating air pressure is within the upper and lower boundaries of the target air pressure interval, determining that no abnormality exists in the sensor or that the abnormality exists in the sensor but does not affect the normal operation of the gas transmission system. When any one of the upper boundary of the interval with the running temperature being larger than the target temperature, the lower boundary of the interval with the running temperature being smaller than the target temperature, the upper boundary of the interval with the running air pressure being larger than the target air pressure and the lower boundary of the interval with the running air pressure being smaller than the target air pressure exists, the sensor is determined to have abnormality, and corresponding alarm information is generated.
By way of example and not limitation, the number of operating parameters per unit time may include one or more, and the corresponding preset time period may be specifically set according to the number of operating parameters per unit time.
For example, the number of the operation parameters of 1s is 2, the preset time period is set to be 5s, and the log likelihood ratio accumulation sum of the operation parameters every 0.5 seconds is calculated according to 15 groups of operation parameters in the preset time period.
Also for example, the number of operation parameters of 1s is 1, the preset time period is set to be 10s, and the cumulative sum of log likelihood ratios of the operation parameters every 1 second is calculated according to 10 groups of operation parameters in the preset time period.
S1023, determining the mutation time point based on the accumulated sum of the log likelihood ratios at each time point.
Specifically, the data mutation time point is determined based on the change of the cumulative sum of log likelihood ratios at each time point.
Alternatively, the mutation time point is determined based on the difference between the cumulative sum of log likelihood ratios at each time point and the cumulative sum of log likelihood ratios at the previous time point.
For example, the accumulated sum of log likelihood ratios at the time e is S e, the accumulated sum of log likelihood ratios at the time e-1 is S e-1, the difference between S e and S e-1 is calculated, and when the difference is greater than or equal to the second threshold, the point of time of the data mutation at the time e is determined.
According to the embodiment of the application, the association rule between the abnormal data and the abnormal type can be determined based on the time sequence characteristics of different safety level controllers (such as the application of the first equipment and the redundancy of the second equipment) of the system under different abnormal data factors by pre-determining the data threshold interval of the safety production process of the target oil-gas medium, the operation parameters of the equipment are monitored in real time, the data deviation of the sensor is detected by utilizing the non-parameter accumulation sum, the abrupt change data exceeding the data threshold interval of the safety production process of the target oil-gas medium is identified as the abnormal data, and the abnormal type of the sensor is efficiently, quickly and accurately identified based on the association rule as a criterion based on the abrupt change time point of the data.
In some embodiments, the operating parameters include a first operating parameter of the first device and a second operating parameter of the second device, and the abrupt change time point includes a first abrupt change time point of the first device and a second abrupt change time point of the second device.
Specifically, in the case that the sensor may have a fault or be attacked by the network, the data collected by the sensor may not be real data or erroneous data, based on which whether the sensor has an abnormality may be detected by the operation parameters of the first device and the second device, the operation parameters including the first operation parameter of the first device and the second operation parameter of the second device. The corresponding mutation time points comprise a first mutation time point when the data are mutated in the first device and a second mutation time point when the data are mutated in the second device.
Taking the intelligent recognition system of the oil-gas pipe network sensor fault shown in 101 in fig. 1 as an example, fig. 4 is a schematic diagram of sensor data transmission application provided in an embodiment of the present application.
As shown in fig. 4, during the process of transmitting data from the sensor to the first device, the sensor is attacked by the network, and false data is injected, so that the first device receives abnormal data, and the PI controller issues an error feedback control command. During operation, the data collected by the second device is normal data.
Based on the above, with the real pressure data transmitted by the filtering separator being P real (t), the pressure data acquired by the sensor being P sensor (t), the pressure data acquired by the first device being P feed (t), the pressure data acquired by the second device being P monitor (t), a first abrupt change time point when an abrupt change occurs in the first device and a second abrupt change time point when an abrupt change occurs in the second device are calculated, respectively.
Optionally, a change point statistics (NP-CUSUM) algorithm is used to construct a real-time monitoring model of abnormal sensor data, so as to calculate a cumulative sum of log likelihood ratios at each time in a preset time period, and identify a first mutation time point and a second mutation time point.
The operation parameter sequence Y e collected in the preset time period is Y 1,y2......yt, wherein Y e represents the operation parameter at the time e. For each time point e, an up-accumulation sum and a down-accumulation sum are calculated to detect up-and-down floating of the data transmission process in a preset time period, and the calculation manner of the up-and-down accumulation sum is as shown in the following formula.
Wherein, the Representing the sum of the up-accumulation and,And the lower cumulative sum is represented, h represents a decision value used for determining the mutation time point, and the specific setting can be carried out according to the actual situation. Mu 0 represents an expected value (reference value) of the data transmission process, and can be specifically set according to actual conditions. If the offset is large, it is determined that the data has changed, and max (0,) represents the larger of the zero and current values so that the result of the calculation is not negative.
Alternatively, the mutation time point is detected by log likelihood ratio. Assuming that H0 indicates that clock data is not changed in the data transmission process and the data accords with normal distribution, assuming that H1 indicates that data is changed in the data transmission process and the distribution of the data is deviated, the calculation mode of the log likelihood ratio is shown as follows:
Where Λ (y e) represents the log-likelihood ratio of the e-th data, Λ (y e) is large, indicating that the data is more consistent with the assumption H 1, i.e., the data has significantly shifted. L (H 1|ye) represents the likelihood function of data y e under assumption H1, L (H 0|ye) represents the likelihood function of data y e under assumption H 0, and the normal distribution likelihood function is represented by the following formula:
Wherein μ represents a sample mean value of the operation parameter sequence acquired in the preset time period, σ 2 represents a variance of the operation parameter sequence acquired in the preset time period, and Y represents the operation parameter sequence acquired in the preset time period.
The log-likelihood ratio of the data at each time instant is calculated and the cumulative sum of each data point is calculated S e as shown in the following equation:
Se=max(0,Se-1+Λ(ye)-h) (11);
Thus, the difference between the cumulative sum of log likelihood ratios at time t 0 and the minimum value of the cumulative sum of log likelihood ratios before time t 0 Can be used to describe the course of the sequence of operating parameters, that is to sayIs a judging basis for judging whether the data change exceeds a threshold value, and the following formula is adopted:
wherein, the The cumulative sum of log likelihood ratios at time t 0 is shown.
It will be appreciated that in the case ofWhen the data is larger than the decision value h, indicating that the data at the time t 0 is changed in the operation parameter sequence acquired in the preset time period. At the position ofAnd when the data is smaller than or equal to h, indicating that the data is not changed in the operation parameter sequence acquired in the preset time period.
The method has the advantages that from the angle of sensor abnormal data, the data fitting function processing step is removed while the method is suitable for field discrete process data, and the cause and the corresponding abnormal type of the sensor abnormal data are efficiently and timely identified by adopting a data-driven sensor abnormal identification mode, so that the accuracy of sensor abnormal identification is improved, and equipment maintenance is facilitated.
Fig. 5 is a schematic diagram of monitoring an operation parameter according to an embodiment of the present application.
As shown in FIG. 5, the abscissa represents time in ms, and the ordinate represents pressure value in Mpa. The pressure safety operation threshold of the target oil-gas medium is 0-11.8Mpa. When 527ms, the pressure of the target oil gas medium is greater than the pressure safety operation upper limit value by 11.8Mpa, and the control unit can recognize that the data is abnormal and send out an abnormal control instruction.
However, when the sensor fails or the sensor is attacked by the network, and the temperature and pressure of the collected target oil-gas medium do not exceed the corresponding upper limit values, the PI controller may not perform feedback control. The anomalous data has no physical impact on the system itself at this time. At this time, the sensor failure cannot be detected, and the north of the network attack on the sensor is regarded as an invalid attack. Thus, the influence of the abnormal data on the system itself may become larger and larger with time, thereby causing a security accident.
In view of the above, sensor abnormal data timing characteristics may be extracted, and an abnormality type may be determined based on the abnormal data timing characteristics. In the intelligent identification system of oil and gas pipe network sensor faults shown at 101 in fig. 1, the data obtained by the second device is redundant of the data in the first device. During network attacks received by the sensor, the injected dummy data is performed during the transmission of data by the sensor to the first device. Therefore, under the condition that the sensor is normal in function, the second device can output data similar to the real data, namely the real data is obtained when the sensor is attacked by the network. Based on the above, the basis for distinguishing the sensor attack from the sensor fault can be that when the sensor is attacked by the network, the first device obtains false data and the second device obtains real data. When the sensor fails, the first device and the second device both acquire abnormal data. That is, the point in time at which the abnormal data occurs is a key factor in judging the type of abnormality.
Fig. 6 is another flow chart of an intelligent fault recognition method for an oil-gas pipe network sensor according to an embodiment of the present application. Referring to fig. 6, the method step S103 includes the steps of:
S1031, when the first mutation time point and the second mutation time point are not empty, calculating to obtain the absolute value of the time difference between the first mutation time point and the second mutation time point.
Specifically, when neither the first abrupt change time point of the first device nor the second abrupt change time point of the second device is empty, determining that there is an abnormality in the sensor, and calculating to obtain the absolute value of the time difference between the first abrupt change time point and the second abrupt change time point.
S1032, when the absolute value of the time difference is smaller than a second threshold value, determining that the abnormal type is a sensor fault.
Specifically, comparing the absolute value of the time difference between the first abrupt change time point and the second abrupt change time point with a second threshold value, and determining that the abnormal type of the sensor is a sensor fault when the absolute value of the time difference is smaller than the second threshold value.
S1033, when the absolute value of the time difference is larger than or equal to the second threshold value, determining that the abnormal type is that the sensor is attacked by the network.
Specifically, when the absolute value of the time difference between the first abrupt change time point and the second abrupt change time point is greater than or equal to a second threshold value, determining that the abnormal type of the sensor is that the sensor is attacked by the network.
Setting the system operation time as T', setting the sampling frequency of the sensor as f, taking the operation parameter of the first equipment as P feed (T), taking the operation parameter of the second equipment as P monitor (T), introducing P feed (T) and P monitor (T) into a change point statistics (NP-CUSUM) model, outputting the accumulated sum of log likelihood ratios of the first equipment and the second equipment as S feed(t)、Smonitor (T), determining a first mutation time point T 1 and a second mutation time point T 2 based on the accumulated sum of the log likelihood ratios S feed(t)、Smonitor (T), and calculating the absolute value delta, delta= |T 1-T2 | of the time difference between the first mutation time point and the second mutation time point.
Specifically, the second threshold is set as sigma, the abnormal type is determined as sensor fault when the absolute value delta of the time difference is less than sigma, and the abnormal type is determined as that the sensor is attacked by the network when the absolute value delta of the time difference is more than or equal to sigma. Wherein, sigma can be specifically set according to actual conditions. For example, the σ value is set to 0.1T.
It is understood that when the operation parameters of the first device and the second device do not have the data mutation time points, it is determined that no abnormality exists.
Each time the model simulation can obtain T'/f pressure transient values (may also be referred to as pressure operation parameters), when the sensor fails, the first device and the second device both obtain abnormal data, the abrupt change time points T 1、T2 of the first device and the second device must exist, and the abrupt change time points delta of the first device and the second device are not greatly different. When the sensor is attacked by the network, the operation parameter of the second device can be considered as normal data, and the operation parameter of the first device can be greatly suddenly changed at a certain moment, so that the difference delta between the first suddenly changed time point T 1 and the second suddenly changed time point T 2 is larger.
The embodiment of the application can model the sensor attack and the fault, extract the time sequence characteristics of the output data of the controller, determine the intelligent recognition of the abnormal type based on the real-time discrete operation parameters, further improve the information safety of the gas transmission system and provide data basis for the maintenance of the sensor.
Fig. 7 is an application scenario diagram of an intelligent fault recognition method for an oil-gas pipe network sensor provided by an embodiment of the application.
Referring to fig. 7, the abscissa represents time in ms, the ordinate represents a pressure value in Mpa, and the pressure safety operation threshold is 0-11.8Mpa. At 527ms, the cumulative sum of log likelihood ratios calculated based on the operating parameters in the first device, S feed (t), is abrupt, since the pressure value is greater than the upper pressure limit value, 11.8 KPa. When the pressure value is greater than the pressure safety operation upper limit value of 11.8KPa at 589ms, the log likelihood ratio cumulative sum S monitor (t) calculated based on the operation parameters in the second device is suddenly changed. The abnormality type may be determined as a physical failure of the sensor based on the first abrupt change time point of the first device and the second abrupt change time point of the second device.
Fig. 8 is another application scenario diagram of the intelligent fault recognition method for the oil-gas pipe network sensor provided by the embodiment of the application.
Referring to fig. 8, the abscissa represents time in ms, the ordinate represents a pressure value in Kpa, and the pressure safety operation threshold is 0 to 11.8MPa. At 378ms, the cumulative sum of log likelihood ratios calculated based on the operating parameters in the first device, S feed (t), is abrupt because the pressure value is greater than the upper pressure limit value of 11.8 KPa. And the accumulated sum S feed (t) of log likelihood ratios calculated based on the operation parameters in the second device is that the mutation occurs after the system is started, and the abnormal type can be determined as that the sensor is attacked by the network based on the first mutation time point of the first device and the second mutation time point of the second device.
In some embodiments, the determining the type of abnormality based on the mutation time point further comprises:
and determining that the sensor normally operates when the first mutation time point and the second mutation time point are both empty.
Specifically, when the first abrupt change time point determined based on the first operation parameter of the first device and the second abrupt change time point determined based on the second operation parameter of the second device are both empty, a time point when no data abrupt change occurs in the operation parameters of the first device and the second device, that is, a time point when the sensor operates normally is determined.
According to the embodiment of the application, the cause of the abnormal type is determined by identifying the time sequence characteristics of the abnormal data of the sensor, so that the abnormal type of the sensor is rapidly and accurately identified based on the difference value of the data mutation time points of the two devices, and the safety of the system is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are alternative embodiments, and that the acts and modules referred to are not necessarily required for the present application.
It should be further noted that, although the steps in the flowchart are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Fig. 9 is a schematic structural diagram of an intelligent fault recognition device for an oil-gas pipe network sensor according to an embodiment of the present application. Referring to fig. 9, the intelligent fault recognition device for the oil and gas pipe network sensor comprises:
A first determining module 901, configured to determine a safe production process data threshold interval of a target oil-gas medium based on a physical parameter of the target oil-gas medium;
A second determining module 902, configured to obtain an operation parameter, and determine a mutation time point based on the operation parameter when the operation parameter is within the safe production process data threshold interval;
And a third determining module 903, configured to determine an anomaly type based on the abrupt change time point, where the anomaly type includes a sensor failure or a sensor attack by a network.
In some embodiments, the target hydrocarbon medium comprises a first substance and a second substance, the physical parameters comprise a first physical parameter of the first substance and a second physical parameter of the second substance, and the first determination module 901 comprises:
The first calculation unit is used for calculating and obtaining the mixing parameter of the target oil-gas medium based on the first physical parameter and the second physical parameter;
A first determining unit configured to determine a relationship ratio of temperature and pressure based on the mixing parameter;
And the second determining unit is used for determining a safe production process data threshold interval of the target oil-gas medium when the relation ratio of the temperature and the pressure is smaller than a first threshold value, wherein the safe production process data threshold interval comprises at least one of a target temperature interval and a target pressure interval.
Optionally, the second determining module 902 includes:
An acquisition unit for acquiring an operation parameter;
The second calculation unit is used for calculating and obtaining the accumulated sum of log likelihood ratios at each moment according to each operation parameter in a preset time period when the operation parameter is positioned in the safety production process data threshold value interval;
and a third determining unit, configured to determine the mutation time point based on a cumulative sum of log likelihood ratios at the respective moments.
Optionally, the operation parameters comprise a first operation parameter of the first device and a second operation parameter of the second device, wherein the abrupt change time point comprises a first abrupt change time point of the first device and a second abrupt change time point of the second device;
The third determining module 903 includes:
a third calculation unit, configured to calculate, when neither the first mutation time point nor the second mutation time point is empty, a time difference absolute value between the first mutation time point and the second mutation time point;
a fourth determining unit configured to determine that the abnormality type is a sensor failure when the absolute value of the time difference is smaller than a second threshold;
Or alternatively
And a fifth determining unit, configured to determine that the anomaly type is that the sensor is under network attack when the absolute value of the time difference is greater than or equal to the second threshold.
Optionally, the third determining module 903 further includes:
And the sixth determining unit is used for determining that the sensor normally operates when the first mutation time point and the second mutation time point are both empty.
Optionally, the safe production process data threshold interval includes an upper boundary and a lower boundary, a second determination module 902 comprising:
And the generating unit is used for generating alarm information when the operation parameter is smaller than the lower boundary or larger than the upper boundary, wherein the alarm information is used for indicating abnormal operation of the sensor.
It will be appreciated that the device embodiments described above are merely illustrative and that the device of the application may be implemented in other ways. For example, the division of the units/modules in the above embodiments is merely a logic function division, and there may be another division manner in actual implementation. For example, multiple units, modules, or components may be combined, or may be integrated into another system, or some features may be omitted or not performed.
Fig. 10 is a schematic structural diagram of a memory device according to an embodiment of the present application. As shown in fig. 10, the storage device may include a transceiver 1001, a processor 1002, and a memory 1003.
Wherein the processor 1002 executes computer-executable instructions stored in the memory, such that the processor 1002 performs the aspects of the embodiments described above. The processor 1002 may be a general purpose processor including a central processing unit CPU, a network processor (network processor, NP), etc., or may be a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The memory 1003 is connected to the processor 1002 through a system bus and performs communication with each other, and the memory 1003 is used for storing computer program instructions.
Transceiver 1001 may be used for physical parameters, operating parameters, etc. of the target hydrocarbon medium.
The system bus may be a peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The system bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). The memory may include random access memory (random access memory, RAM) and may also include non-volatile memory (non-volatile memory).
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is enabled to execute the technical scheme of the intelligent fault identification method for the oil and gas pipeline network sensor in the embodiment.
The embodiment of the application also provides a computer program product, which comprises a computer program stored in a computer readable storage medium, wherein at least one processor can read the computer program from the computer readable storage medium, and the technical scheme of the intelligent fault identification method for the oil and gas pipeline network sensor in the embodiment can be realized when the at least one processor executes the computer program.
In addition, each functional unit/module in each embodiment of the present application may be integrated into one unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated together, unless otherwise specified. The integrated units/modules described above may be implemented either in hardware or in software program modules.
The integrated units/modules, if implemented in hardware, may be digital circuits, analog circuits, etc. Physical implementations of hardware structures include, but are not limited to, transistors, memristors, and the like. The processor may be any suitable hardware processor, such as CPU, GPU, FPGA, DSP and an ASIC, etc., unless otherwise specified. Unless otherwise indicated, the storage elements may be any suitable magnetic or magneto-optical storage medium, such as resistive Random Access Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random-Access Memory), enhanced dynamic Random Access Memory EDRAM (ENHANCED DYNAMIC Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid storage cube HMC (Hybrid Memory Cube), etc.
The integrated units/modules may be stored in a computer readable memory if implemented in the form of software program modules and sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. The Memory includes a U disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, etc. which can store the program codes.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments. The technical features of the above embodiments may be combined in any way, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, but should be considered as the scope of the description
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.