A method and system for identifying fluctuations in oil and gas production data based on three-engine cooperation
The data fluctuation and static identification method using a three-engine collaborative approach solves the data stasis problem caused by sensor jamming and communication interruption in the Internet of Things for oil and gas production. It achieves efficient identification of highly concealed faults and continuous online detection, and is suitable for monitoring parameters at oil and gas stations.
Patent Information
- Application Number
- CN202611413122.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-24
AI Technical Summary
In the Internet of Things (IoT) of oil and gas production, data stagnation caused by sensor jamming or communication link interruption cannot be detected in a timely manner, resulting in the station operating based on distorted data, which poses hidden safety hazards. Furthermore, out-of-order data arriving in online detection scenarios can disrupt the consistency of window timing.
A three-engine collaborative data fluctuation static identification method is adopted, including data acquisition and dual sequence construction, constant short circuit and semantic differentiation, data volume gating and three-engine parallel detection, score fusion and alarm classification, online incremental detection and window operation and maintenance, combined with sliding window snapshot persistence, to identify highly concealed static faults.
It achieves efficient identification of faults such as sensor jamming and communication interruption, adapts to arbitrary sampling rates and ranges, ensures the continuity of online detection, requires no distribution assumptions or manual threshold calibration, and is suitable for static monitoring of parameters at oil and gas stations.
Smart Images

Figure CN123158045A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) monitoring technology for oil and gas production, specifically to a method and system for identifying fluctuations and static states in oil and gas production data based on three-engine collaboration. Background Technology
[0002] In the Internet of Things (IoT) of oil and gas production, key parameters such as station pressure, instantaneous flow rate, and separator level are collected by transmitters and uploaded to the production data acquisition and monitoring system via remote terminal units. When faults such as sensor jamming or communication link interruption occur, the data does not show excessive limits or drastic fluctuations, but rather appears "completely static": when the transmitter is jammed, the reading freezes at a certain constant value; when communication is interrupted, the data source stops pushing data and the timestamp stops. If such "data stagnation" faults are not detected in time, the station will operate based on distorted data for up to several hours, masking the deterioration of the actual operating conditions and posing a safety hazard.
[0003] In addition, in online detection scenarios, data arriving point by point needs to be cached for a sufficient window before it can be detected. If the window state is lost after the service restarts, it will lead to re-warming and long-term interruption of detection. If out-of-order or repeatedly pushed data is written directly into the window without protection, it will destroy the window's timing consistency. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a method and system for identifying static fluctuations in oil and gas production data based on three-engine collaboration.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for identifying static fluctuations in oil and gas production data based on three-engine coordination, comprising the following steps:
[0006] Step S1, Data Acquisition and Dual Sequence Construction: Acquire time-series data of key parameters, and construct an original sequence that retains the true timestamp interval and a preprocessed sequence obtained through frequency inference, resampling, and amplitude limiting interpolation; the original sequence is used for communication interruption detection, and the preprocessed sequence is used for variance and change point detection.
[0007] Step S2, Constant Short Circuit and Semantic Distinction: When there are no less than two data points and all values are exactly the same, the short circuit exits. The point is determined according to the semantic distinction. The communication status point is always 1 to determine online, always 0 to determine interruption, and non-binary values are determined according to the service limit. The production parameter point is always valued to determine sensor jamming, and the alarm conclusion is directly output.
[0008] Step S3, Data volume gating and three-engine parallel detection: Detection items are enabled in stages according to the number of data points; the sliding window variance engine uses an adaptive window and adaptive variance threshold to count the proportion of static data; the timestamp interval engine determines abnormal intervals by the median interval multiple and determines communication interruptions by the proportion of abnormal data; the variable point localization engine performs optimal segmentation variable point search on the preprocessed sequence as auxiliary evidence.
[0009] Step S4, Score Fusion and Alarm Classification: The base score is based on the percentage of static points when the variance engine is triggered. The incremental score is further supported by the dual triggers of variable points and variance. The incremental score is further supported by the dual triggers of timestamp and variance. Only the timestamp trigger is used to obtain the minimum warning score. The alarm is output as a normal, warning, or severe alarm based on the comprehensive score.
[0010] Step S5, Multi-mode Joint Judgment: Single-index mode outputs directly; Multi-index mode performs independent detection on multiple points of the same source and then votes and grades them according to the proportion of static points; Dual-channel mode compares the static states of the two channels to locate the faulty channel, and exempts it from benign shutdown scenarios; Scenario switching mode loads parameters to cover or suspend detection according to the process scenario.
[0011] Step S6, Online Incremental Detection and Window Maintenance: Bounded sliding windows support preheating batch replacement and incremental single-point appending, rejecting out-of-order points and idempotent skipping of duplicate points; window snapshots are persisted in an atomic writing manner and periodically written to disk, and the window is restored to continue detection after the service restarts.
[0012] On the other hand, the present invention also provides a three-engine coordinated oil and gas production data fluctuation static identification system for implementing the above method, comprising:
[0013] The data access module is used to access key parameter time-series data and dual-channel data, and to route single-indicator, multi-indicator, or dual-channel execution modes according to the number of points.
[0014] The data preprocessing module is used to construct the original sequence that retains the true timestamp interval and the resampled preprocessed sequence;
[0015] The detection engine module is used to perform constant short circuit detection, sliding window variance detection, timestamp interval detection, and change point location detection.
[0016] The fusion judgment module is used for data volume gating, score fusion, and multi-mode joint judgment.
[0017] The alarm decision module is used for three-state alarm output, alarm message generation, and handling suggestion push.
[0018] The window management and persistence module is used for incremental access via sliding windows, protection against out-of-order duplicate points, and persistent recovery of snapshots.
[0019] The application demonstration module is used for parameter trend and variance rendering, change point annotation, alarm push notifications, and work order linkage.
[0020] The beneficial effects of this invention are:
[0021] This invention provides a method and system for identifying static fluctuations in oil and gas production data based on a three-engine collaborative approach. It employs a dual-track construction of the original sequence and preprocessed sequence to prevent communication interruption features from being masked by interpolation. It eliminates false alarms of constant values by semantically distinguishing between constant short circuits and communication status points. It adapts to arbitrary sampling rates and ranges using adaptive windows and adaptive variance thresholds. It identifies highly concealed static faults through parallel detection and scoring fusion of the three engines. It achieves joint judgment and fault location through multi-index voting, dual-channel comparison, and scene switching. It ensures continuous online detection through sliding window snapshot persistence. It eliminates the need for distribution assumptions and manual threshold calibration, and can identify highly concealed faults such as transmitter jamming and communication interruptions. It is suitable for static monitoring of parameters at oil and gas stations. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method of the present invention;
[0023] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0024] like Figure 1 As shown, this embodiment uses the separator liquid level, communication status points, and HART-SCADA dual-channel pressure measurement points at an oil and gas station as examples to illustrate the implementation process of the method of the present invention. Other analog parameters such as pressure, flow rate, and temperature are the same; only the input data source and threshold configuration need to be changed according to the parameter type. For ease of reproduction, the numerical examples in this embodiment are constructed with a 1-minute sampling period; the production environment is configured with a 5-second to 5-minute sampling period, and all judgment thresholds remain unchanged.
[0025] In this embodiment, several points are constructed as numerical examples throughout the entire text, and their configuration is shown in Table 1.
[0026] Table 1. Locations and Configurations of Examples
[0027] Points Monitoring objects Sampling period Data composition and uses Point A Water level in the separator of the water transfer station 1 minute 70 points: 700mm superimposed random noise with a standard deviation of 15; 1320mm constant value added for the stuck segment. Used for three-engine detection, four-scene integrated detection, and scene switching examples. Point B Separator liquid level (stuck condition) 1 minute 50 points, constant value 1320mm. Used for constant short-circuit calculation examples. Point C Communication status point (signal strength) 1 minute 50 constant values (4 forms: 1, 0, 55, and 88). Used for semantic differentiation of communication status points in the calculation case; service upper and lower limits are configured separately for each calculation case. Multi-indicator group 3-5 production parameter points from the same source 1 minute Some data points are static, while others show normal fluctuations. This is used in a multi-indicator joint judgment example. Dual-channel group HART and SCADA channels at the same pressure measurement point 1 minute Channel A (HART) and Channel B (SCADA) are constructed independently, with static / normal configurations combined according to the calculation examples. This is used for dual-channel alignment calculation examples. Window Group Arbitrary production parameter points 1 minute Alternating arrival times of batch and single points. Used for sliding window, out-of-order duplicate protection, snapshot persistence, and incremental evolution examples.
[0028] S10. Data Acquisition and Dual Sequence Construction. The input for this step is the time-series data of key parameters and algorithm configuration from the production data acquisition and monitoring system. The two core characteristics of static faults, numerical freezing and timestamp stagnation, exist in different forms of sequences, so this step constructs both the original sequence and the preprocessed sequence.
[0029] S101, Data Acquisition. Read time-series data X = {(τ) by point location. k , x k )}, where τ k For timestamp, x kThis is the measured value at that moment. The data is pushed and accessed through the oil and gas production IoT data platform, and sorted in ascending order by timestamp. For duplicate reports with the same timestamp, only the last one is retained. If the data is empty, a preheating prompt is returned: The fluctuation-static algorithm requires 50 data points for preheating, which takes approximately 17 minutes at a 20-second sampling interval.
[0030] S102. Construction of the original sequence. Sort the time-series data by timestamp and remove null values, then construct the original sequence X using the timestamp as the index. raw The original sequence is not resampled or interpolated, preserving the true timestamp interval caused by communication interruption. This is a prerequisite for the timestamp interval engine to recognize communication interruption.
[0031] S103. Preprocessing sequence construction. Inferring the sampling frequency from the original sequence: taking the median interval Δt between adjacent timestamps. med According to f = 1 / Δt med The resampling frequency is obtained; the original sequence is resampled and aggregated into an equally spaced sequence according to this frequency; amplitude-limited linear interpolation is performed on the missing buckets generated by resampling; missing segments with consecutive missing values exceeding the interpolation upper limit (two buckets in this embodiment) are not interpolated and are directly discarded; finally, the preprocessed sequence X is obtained after temporal validity verification (type, index, deduplication, sorting, frequency check). pre ;
[0032] Amplitude-limited interpolation is a key design feature to prevent communication interruption characteristics from being masked. Taking a communication interruption as an example: the original data consists of 61 points, with 39 normal intervals of 60 seconds and 21 interruption intervals of 5-15 minutes; after resampling to a 1-minute grid, 250 grid points are obtained, a large number of which fall within the long interruption intervals; after amplitude-limited interpolation (up to 2 buckets), only 103 valid points are retained. The long intervals during the interruption are neither filled in by linear interpolation nor treated as valid data for statistical analysis, and the communication interruption remains visible in the original sequence. Without an interpolation upper limit, 147 of the 250 grid points would be filled in by interpolation, and the interruption segment would be completely invisible in the preprocessed sequence.
[0033] S20. Constant Short Circuit and Semantic Differentiation. The input to this step is the preprocessed sequence output from step S103. Complete constant value is the most significant form of static fault, which is directly determined with the lowest computational cost: when the number of data points is not less than 2 and the number of values after deduplication of the sequence does not exceed 1 (all values are exactly the same), the short circuit exits the three-engine detection, and the conclusion is directly output according to the semantics of the point.
[0034] S201. Point Semantic Determination. Determine whether a point is a communication status point based on the naming pattern of the point code or the point metadata. The value of a communication status point is itself a status variable, and its constant value has special semantics, which must be distinguished from production parameter points.
[0035] S202, Semantic Branch Determination. For production parameter points, a constant value is determined as a sensor malfunction, outputting a severity level, a score of 1.0, and the current constant value. Communication status points are differentiated based on their constant value content: a constant value of 1 indicates online communication, outputting a normal level; a constant value of 0 indicates communication interruption, outputting a severity level; when the constant value is a non-binary signal (e.g., signal strength), it is compared with the service upper and lower limits of that point. If it falls within the service upper and lower limits, the signal is considered stable and outputs a normal level; if it exceeds the service upper and lower limits, the signal is considered abnormal and outputs a severity level; if no service upper and lower limits are configured, it is conservatively determined as a communication interruption. See Table 2 for semantic differentiation examples.
[0036] Table 2. Examples of semantic distinction between constant short circuits and communication state points
[0037] Calculation example constant value Point semantics Judgment Conclusion Level / Rating Alarm message Liquid level stuck 1320.0 Production parameter points Sensor stuck critical / 1.0 The data is completely frozen, with a current value of 1320.00, suggesting a possible sensor malfunction. Communication status is always 1 1.0 Communication status points Online communication normal / 0.0 Communication is normal, data remains at 1 (communication is online). Communication status is always 0 0.0 Communication status points Communication interruption critical / 1.0 Communication status remains unchanged for an extended period, resulting in communication interruption. Signal strength 55 55.0 Communication status points The signal is stable within the service limit [0, 100]. normal / 0.0 The communication status value of 55.00 is within the normal range (0.0~100.0), indicating a stable signal. Signal strength 88 88.0 Communication status points Outside of service limits [0,60], signal abnormality. critical / 1.0 The communication status value of 88.00 is outside the normal range (0.0~60.0), indicating an abnormal signal.
[0038] As shown in Table 2, even with the same sequence of 50 completely constant values, the five semantic morphologies yield four different conclusions. A constant communication status point of 1 indicates a normal online state, which would be falsely reported as a stuck state without semantic differentiation. A constant signal strength of 55 is a stable and normal state within the service limits, while a constant signal strength of 88 definitely indicates a signal anomaly. The constant short circuit not only handles the most prominent stuck state at the lowest cost but also eliminates systematic false alarms of status point values through semantic differentiation.
[0039] S30. Data volume gating and parallel detection by three engines. When a short circuit miss occurs (sequence fluctuations or insufficient points), multi-engine detection is initiated. The input to this step is the original sequence from step S102 and the preprocessed sequence from step S103, and the output is the detection results of each of the three engines.
[0040] S301, Data Volume Gating. Different engines have different minimum data volume requirements, enabled in stages based on the number of preprocessed sequence points (n):
[0041] E(n) = { timestamp: n ≥ c ts variance: n ≥ c var ; ruptures: n ≥ c rpt};
[0042] Where c ts = 2、c var = 20、c rpt = 40, and c ts < c var < c rpt Detection items that do not meet the threshold are skipped, and the enabled items are continued to be executed, so that usable conclusions can still be output under small sample conditions. Gating examples are shown in Table 3.
[0043] Table 3 Data volume gating examples
[0044] Number of data points n Enable detection items illustrate 1 (none) Single-point intervals and variances cannot be calculated; only constant short-circuit operations are available. 2 timestamp Exactly one interval can be calculated. 19 timestamp The variance test did not reach the 20-point threshold. 20 timestamp + variance Variance detection enabled 39 timestamp + variance Change point detection did not reach the 40-point threshold 40 timestamp + variance + ruptures All three engines are in operation.
[0045] As shown in Table 3, the gating ensures that the detection capability gradually increases with the amount of data. Communication interruption monitoring can begin at 2 points, variance detection capability is available from 20 points, and change point verification capability is available from 40 points. In online incremental scenarios, the window grows point by point, and each engine enters naturally in sequence without waiting for all the data to be available.
[0046] S302, Adaptive Window Calculation. The window for sliding window variance detection is fundamentally determined by the time span rather than the number of points: the window should cover a complete process fluctuation cycle (in this embodiment, the target time span is L). span = 300 seconds). Calculate the adaptive window points using the following formula:
[0047] W = clamp( L span / Δt med W min W max );
[0048] Where Δt med To preprocess the median interval between adjacent timestamps in the sequence, W min = 5、W max = 200 represents the lower and upper limits of the window size. When the number of data points is less than 2 or the median interval is not positive, the window size is downgraded to a fixed window (10 points in this example). See Table 4 for window calculation examples.
[0049] Table 4 Adaptive Window Case Study (Target Time Span 300 Seconds)
[0050] Sampling interval Calculation process Window points illustrate 5 seconds clamp(300 / 5, 5, 200) 60 Increase the number of sampling points in the high-frequency sampling window 10 seconds clamp(300 / 10, 5, 200) 30 — 20 seconds clamp(300 / 20, 5, 200) 15 — 60 seconds clamp(300 / 60, 5, 200) 5 Reaching the lower limit of window points 120 seconds clamp(300 / 120, 5, 200) 5 Lower limit cutoff 300 seconds clamp(300 / 300, 5, 200) 5 Lower limit cutoff Only 2 points downgrade path 10 Insufficient data, fixed window
[0051] As shown in Table 4, the number of points in the window scales inversely with the sampling interval. 60 points are taken with a 5-second sampling interval and 5 points are taken with a 60-second sampling interval. The window time span for both is about 300 seconds. Points with different sampling rates are detected to be stationary on the same time scale, and the window no longer needs to be calibrated one by one for each point.
[0052] S303. Adaptive Variance Threshold Calculation. The variance magnitudes of signals with different ranges vary significantly, making a fixed threshold unsuitable. The historical rolling variance is calculated for the preprocessed sequence using a window W (15 in this example), and the set V of valid variance points with strictly positive values is selected. hist When |V hist | ≥ n base (When 20 is used in this embodiment), the adaptive variance threshold is calculated using the following formula:
[0053] θ var = min( max( P5(V hist ) × r θ , θabs ), 0.01 × Var(X pre ) );
[0054] Among them, P5(V) hist ) represents the 5th percentile of the effective variance point set, r θ = 0.1 is the threshold scaling factor, θ abs =10-12 is the absolute lower bound; the number of effective variance points is less than n. base The threshold is then reduced to a fixed threshold (10⁻⁶ in this embodiment). Threshold examples are shown in Table 5.
[0055] Table 5. Adaptive variance thresholding example (window=15, r_θ=0.1)
[0056] project numerical values illustrate Normal fluctuation sequence statistics n=120, mean 698.5632, standard deviation 14.3437 1-minute sampled simulation data Effective variance points 119 Points with strictly greater than 0 rolling variance P5 quantiles 112.3983 5th percentile of the effective variance point set Initial value P5 × 0.1 11.2398 Threshold scaling factor: 0.1 Relative upper limit The variance of the entire sequence is 205.7416 × 1% = 2.0574 The threshold should not exceed 1% of the total sequence variance. Final adaptive threshold min(11.2398, 2.0574) = 2.0574 Relative upper limit constraint takes effect Absolute lower limit 1e-12 Preventing the threshold from degrading to zero Short sequence control n=15, effective variance point 14 (<20) Downgraded to a fixed threshold 1e-6
[0057] As shown in Table 5, the threshold automatically scales with the variance distribution of the signal itself. Under normal circumstances, only 5% of the time variance is lower than the P5 quantile. After multiplying by the scaling factor of 0.1, the threshold is much lower than the normal fluctuation level but higher than the zero variance of a completely stationary signal, leaving a margin of one order of magnitude between the two. The relative upper limit constrains the threshold to within 1% of the total sequence variance, preventing long stationary segments from raising the threshold too high and causing missed detections of true stationary signals. Short sequences (effective variance points less than 20) are downgraded to a fixed threshold, preferring a coarse sensitivity rather than providing an adaptive value that causes distortion.
[0058] S304. Sliding window variance detection. Calculate the rolling variance (unbiased estimate) point-by-point on the preprocessed sequence using an adaptive window W:
[0059] var t = 1 / (W-1) × Σ i=t-W+1 t (x) i -x̄' t )²;
[0060] Where x̄' t This is the mean value within the window. Determine stationary points and calculate the percentage of stationary points using the following formula:
[0061] s t = 1( var t ≤ θ var ), r static = Σ s t / n;
[0062] When r static ≥ r th(In this embodiment, a value of 0.8) is used to determine a variance quiescent anomaly. When the sensor is stuck, all values within the window are the same, and the variance is strictly zero, far below any adaptive threshold; the variance of the window for normal fluctuation sequences is mostly higher than the threshold, and the proportion of quiescent states is close to zero. Detection examples are shown in Table 6.
[0063] Table 6. Sliding window variance test example (1 minute sampling, static percentage threshold 0.8)
[0064] Calculation example Data composition window Variance threshold stationary point / total point static proportion determination Stuck in A (threshold degradation) 10 normal + 60 constant value 1320, n=70 5 1e-6 (downgrade) 57 / 70 0.8143 Static anomaly Stuck at B (adaptive threshold) 24 (normal) + 130 (constant value) = 1320, n = 154 5 5.8096 127 / 154 0.8247 Static anomaly Partial static control 10 normal + 50 constant value 1320, n=60 5 1e-6 (downgrade) 47 / 60 0.7833 Not reached the threshold, normal Normal control 70 points is a normal fluctuation 5 2.4015 1 / 70 0.0143 normal
[0065] As shown in Table 6, the stuck cases A and B followed two paths: the degradation threshold and the adaptive threshold, respectively. The proportion of static states in both cases exceeded the 0.8 threshold and was judged as abnormal. The proportion of static states in some static controls (constant value segment accounting for 5 / 6) was 0.7833, which did not reach the threshold and remained normal. Brief static segments (such as stable process segments) did not trigger alarms. Only static states that lasted for a sufficiently long time were confirmed. The proportion of static states in the normal controls was only 1.43%, which is more than an order of magnitude away from the threshold and has a safety margin.
[0066] S305, Timestamp Interval Detection. Performed on the original sequence before resampling. Calculate the adjacent timestamp interval and median interval for the original sequence:
[0067] Δt i = τ i - τ i-1 , Δt med = median(Δt i ), g i = Δt i / Δt med ;
[0068] g i g th (In this embodiment, 3.0 is used, meaning an interval exceeding three times the median interval) is considered an abnormal interval, and the percentage of abnormal intervals is calculated:
[0069] r gap = Σ 1( g i g th ) / (n -1);
[0070] When r gap ≥ r gap,th (In this embodiment, the value is 0.20) when a communication interruption is detected. No abnormality is detected if the number of intervals is insufficient or the median interval is not positive. See Table 7 for detection examples.
[0071] Table 7. Timestamp Interval Detection Examples (Interval Multiple Threshold 3.0, Abnormality Percentage Threshold 0.20)
[0072] Calculation example Interval composition Median Interval Maximum interval Maximum multiple Abnormal interval Abnormal percentage determination Normal control 60 60-second intervals 60 seconds 60 seconds 1.00 0 0.0000 normal Communication interruption 39 60-second intervals + 21 5 / 10 / 15-minute intervals 60 seconds 900 seconds 15.00 21 0.3500 Communication interruption Short-term jitter comparison 3 sets of 120 seconds each + 57 sets of 60-second intervals 60 seconds 120 seconds 2.00 0 0.0000 normal
[0073] As shown in Table 7, when the SCADA link fails, the data source stops pushing data periodically, and the interval becomes 5-15 minutes, with a maximum multiple of 15. The percentage of abnormal intervals is 0.35, exceeding the 0.20 threshold for interruption. Short-term jitter (occasional 120-second intervals) has a multiple of only 2.0, not exceeding the 3x threshold, and does not generate false alarms. The multiple determination based on the median interval naturally adapts to different sampling periods, eliminating the need to configure absolute interval thresholds for each sampling point.
[0074] S306. Change Point Location Detection. Perform optimal segmentation change point search on the preprocessed sequence: using the squared error as the segmentation cost, and balancing fitting accuracy and segmentation complexity with a penalty coefficient, find the segmentation scheme that minimizes the total cost.
[0075] V(Π) = Σ k c(y k ) + pen × K;
[0076] Where c(y) k ) = Σ i∈y_{k} ( x i - μ k )² represents the squared error cost of the k-th segment, K is the number of segments, and pen is the penalty coefficient (10 in this embodiment). The search employs a pruning-based optimal segmentation algorithm, using the minimum segment length (20 in this embodiment) to prevent overly fragmented segments and a downsampling step size (5 in this embodiment) to control computational overhead; the downsampling step size is automatically increased when the number of data points exceeds the large data volume threshold (100,000 points in this embodiment). After filtering out fixed return points located at the end of the sequence in the search results, if the number of remaining variable points is greater than zero, a variable point is determined to exist, and the time of the first variable point and the number of segments are output. Localization examples are shown in Table 8.
[0077] Table 8 Variable point positioning example (pen=10, jump=5, min_size=20)
[0078] Calculation example Data composition Change point position First turning point Number of segments determination Mean shift The first 60 points are 700±10, and the last 60 points are 760±10. [30, 60, 80, 100] 2026-08-20 00:30:00 5 There are variable points Stuck and changed point 10 normal + 60 constant value 1320
[20] 2026-08-20 00:20:00 2 There are variable points Stable control 70-point stable random fluctuation [30, 50] — 3 There is a variable point (noise level).
[0079] As shown in Table 8, the mean shift example locates the first change point near the start of the shift, while the stuck example locates the only change point at the boundary between the normal segment and the constant value segment. The change point time can be directly used to trace back the fault start time. The stationary control may still detect noise-level change points at pen=10 (the slight difference in the mean of adjacent stationary segments can cross the penalty threshold). This is why the change point engine is designed as an auxiliary evidence engine and does not trigger alarms independently. Its value lies in providing evidence that "the data pattern has indeed changed abruptly" and tracing back the fault time for the already triggered variance alarm, rather than making an independent judgment.
[0080] S40. Score Fusion and Alarm Leveling. The input to this step is the three-engine detection result output from step S30, and the output is a comprehensive score and alarm level. The scoring rule uses the variance engine as the primary engine.
[0081] base = r static × 1( A var );
[0082] score = min(base + Δ) rpt × 1( A var ∧ A rpt ) + Δ ts × 1( A var ∧ A ts ),1 );
[0083] Where A var A ts A rpt These are exception detection methods for variance, timestamp, and variable point engine, respectively. rpt = 0.1 serves as evidence of the increment at the point of change, Δ ts = 0.1 represents the increment for strong evidence based on timestamps.
[0084] Timestamp engine triggered separately (A) ts ∧ ¬A var When the base score is triggered, a minimum warning score of 0.5 is assigned; when the variable point engine is triggered alone, the score is zero and no anomaly is determined. Alarm levels are mapped according to the score: a score of 0.9 or higher is considered severe, a score of 0.5 or higher is considered a warning, and the rest are considered normal. See Table 9 for a score fusion example.
[0085] Table 9. Examples of Scoring Fusion Formulas
[0086] situation Variance Engine Timestamp Engine Variable Point Engine Overall score Trigger item determination 1. Variance-only trigger Triggered (0.85%) Not triggered Not triggered 0.85 variance abnormal 2. Variance + Variable Point Evidence Triggered (0.85%) Not triggered trigger 0.95 variance, ruptures abnormal 3. Variance + Timestamp Triggered (0.85%) trigger Not triggered 0.95 timestamp, variance abnormal 4. Triple Engines Triggered Simultaneously Triggered (0.85%) trigger trigger 1.00 All three engines Abnormal (saturation) 5. Timestamp-only trigger Not triggered trigger Not triggered 0.50 timestamp Abnormal (Warning with a minimum guarantee) 6. Only triggering the point change Not triggered Not triggered trigger 0.00 (none) No abnormality is determined 7. Variance not reached + timestamp Not triggered (0.60%) trigger Not triggered 0.50 timestamp Abnormal (Warning with a minimum guarantee) 8. Low proportion of variance-triggered events Triggered (0.60%) Not triggered Not triggered 0.60 variance abnormal
[0087] As shown in Table 9, the scoring design reflects the division of responsibilities among the three engines. The variance engine is the sole primary judgment engine, and its scoring is based on the static percentage itself; the higher the percentage, the more definitive the alarm. The variable point engine only adds 0.1 as evidence when variance has already been triggered (scenario 6, triggered alone, does not determine an anomaly). The timestamp engine has independent triggering capabilities but only provides a minimum warning score of 0.5 (scenarios 5 and 7). When triggered simultaneously with variance, it indicates that "numerical values are static and timestamps are stagnant," constituting strong evidence of communication interruption, and adds 0.1 (scenarios 3 and 4). Scenario 8 corresponds to a scenario where the threshold is relaxed (e.g., the static percentage threshold is increased in a pipeline switching scenario), and variance is triggered with a percentage of 0.60; the score is based on the percentage itself.
[0088] Under the complete detection entry point, the end-to-end judgment results for four typical scenarios are shown in Table 10.
[0089] Table 10 Comprehensive Detection and Judgment for Four Scenarios (Complete Detection Entry)
[0090] Scene Data composition Enable engine determination score grade Alarm message A normal control 70 points is a normal fluctuation Timestamp / variance / change point were not triggered (change point detection showed noise level change point). 0.0000 normal Data change point detected, working conditions may have changed B Sensor stuck 10 normal + 60 constant value 1320 Variance triggered (proportion 0.914) + change point corroboration, timestamp not triggered 0.9143 critical Data fluctuation static, suspected sensor or communication abnormality; data change point detected, working conditions may have changed C SCADA communication interruption Contains 5-15 minute long gaps Timestamp triggered (abnormality proportion 0.35), variance not triggered (continuous after interpolation), change point detected 0.5000 warning Abnormal timestamp interval, suspected communication interruption; data change point detected, working conditions may have changed D Full-range constant value 50-point constant value 1320 Constant value short circuit (did not enter triple engine) 1.0000 critical Data completely static, current value 1320.00, suspected sensor stuck
[0091] As shown in Table 10, each of the four fault types hits the most suitable detection path: the constant value in scenario D is intercepted at the entry point by the constant short circuit; the numerical freeze in scenario B is captured by the variance engine and verified by the variable point engine, and the stuck moment is traced back; the communication interruption in scenario C is only reflected in the original timestamp - the values of the preprocessed sequence are continuous after amplitude limiting interpolation, which cannot be detected by the variance engine, but can only be identified by the timestamp engine, which verifies the necessity of dual sequence construction; normal data in scenario A does not generate any alarms, and noise-level variable points are only revealed by prompt messages.
[0092] S50, Multi-mode Joint Judgment. This step routes the execution mode according to the number of input points and request parameters: single point performs single index detection; multiple points perform multi-index joint judgment; when requesting dual-channel mode and there are exactly two points, dual-channel comparison is performed; in any mode, scene switching check is performed first.
[0093] S501, Single-Indicator Mode. Directly outputs the score and grade of step S40 for a single location, consistent with multi-engine detection.
[0094] S502, Multi-indicator Joint Judgment Mode. For M points originating from the same source, three-engine detection is performed independently, and the number of points (ms) and the percentage of points deemed static (ρ = m) are statistically determined. s / M, categorized by voting level:
[0095] ρ = 1 → critical (communication link interruption);
[0096] ρ ≥ ρ w = 0.8 → warning;
[0097] ρ ≥ ρ p = 0.5 → warning;
[0098] ρ < 0.5 → No upgrade;
[0099] The overall score is the maximum score of each location, and is increased according to the joint judgment level (joint severity is increased to no less than 0.9, joint warning is increased to no less than 0.7); the joint judgment message and the alarm messages of each location are output together. See Table 11 for joint judgment examples.
[0100] Table 11 Examples of Multi-Indicator Joint Judgment
[0101] Example Static / total points Static proportion Joint level Joint message All static 5 / 5 1.00 critical 5 out of 5 points from the same source are static, determined as communication link interruption Highly suspected 4 / 5 0.80 warning 4 out of 5 points from the same source are static, determined as communication link abnormality Partial abnormality 3 / 5 0.60 warning 3 out of 5 points from the same source are static, determined as communication link abnormality Sporadic static 2 / 5 0.40 (No escalation) 2 out of 5 points from the same source are static, joint judgment threshold not reached
[0102] The complete call example involves three points from the same source (points 1 and 2 are stationary, point 3 is normal). Points 1 and 2 are each judged as critical (score 0.9143, variance + change-point trigger), while point 3 is judged as normal. A joint judgment indicates that 2 / 3 are stationary, a percentage of 0.667, reaching the partial warning threshold. A warning-level joint message is output: "Two of the three points from the same source are stationary, indicating a communication link anomaly." The overall score is the maximum value of 0.9143, resulting in an overall critical level. The simultaneous stationary status of multiple points indicates a shared communication link rather than individual sensors. The voting-based grading of the joint judgment utilizes this redundant information to distinguish between single-point faults and link faults.
[0103] S503, Dual-channel comparison mode. Acquire the first and second channels of time-series data at the same measurement point, and perform the sliding window variance detection respectively to obtain the static determination and static percentage of each channel;
[0104] When the first channel is stationary and the second channel fluctuates normally, a communication failure is determined for the first channel and a warning level is output; when the first channel fluctuates normally and the second channel is stationary, a communication failure is determined for the second channel and a warning level is output.
[0105] When both channels are stationary: if it is a benign shutdown scenario, it is judged as a normal shutdown and no alarm is triggered; otherwise, it is judged as a station-level communication interruption and a severe level is output; when both channels fluctuate normally, communication is judged as normal.
[0106] When the same measurement point is acquired via both HART and SCADA channels, the static state combination of the two data streams can pinpoint the fault location. Sliding window variance detection is performed on both sequences separately, and the result is determined using a 2×2 combination matrix.
[0107] Table 12 Dual-channel alignment decision matrix (HART-SCADA)
[0108] Scenario Channel A (HART) Channel B (SCADA) Faulty channel Score / level Judgment message 1 Static (proportion 0.814) Normal (proportion 0.029) A 0.7 / warning HART channel data static, SCADA normal, HART communication fault 2 Normal (proportion 0.014) Static (proportion 0.814) B 0.7 / warning SCADA channel data static, HART normal, SCADA communication fault 3 Static (proportion 0.814) Static (proportion 0.814) both 1.0 / critical Both HART and SCADA channels are static, suspected station-level communication interruption 4 (Benign scenario) Static (proportion 0.814) Static (proportion 0.814) both 0.0 / normal Both channels static, currently normal production shutdown, not determined as communication fault 5 Normal (proportion 0.014) Normal (proportion 0.029) (None) 0.0 / normal Both channels data fluctuate normally, communication normal
[0109] As shown in Table 12, if only one channel is stationary, it indicates that the fault is limited to that channel (loose HART cable or SCADA collector failure), and a warning level is output, specifying the faulty channel; if both channels are stationary in a non-benign scenario, it indicates a station-level communication interruption (the simultaneous failure of two independent links can only be due to a common cause), and a severe level is output; while if both channels are stationary in benign shutdown scenarios such as maintenance or well shutdown, it indicates normal process operation, and an alarm is exempted. The distinction between "fault stationary" and "process stationary" that cannot be distinguished from a single-channel perspective can be made through dual-channel redundancy and scenario linkage.
[0110] S504, Scene Switching Mode. Multiple process scenarios are pre-configured, each scenario configuration including a static percentage threshold coverage value and a detection enable flag; the process scenarios include at least normal production scenarios, maintenance scenarios, pipeline switching scenarios, well start-up scenarios, and well shut-down scenarios.
[0111] Load the corresponding scenario configuration according to the scenario identifier; fields with the same name in the request parameters can further override the scenario configuration.
[0112] When the detection enable flag is disabled, the normal level and scene pause message are output directly, and all detections are skipped; the maintenance scene and the well shut-in scene are disabled by default, and the pipeline switching scene and the well start-up scene have the static percentage threshold increased by default to relax the judgment.
[0113] Pre-configured process scenario settings are provided, with each scenario including a static percentage threshold coverage value and a detection enable flag. Configurations are loaded according to the scenario identifier in the request; fields with the same name in the request parameters can further override scenario configurations (priority: default configuration < scenario configuration < request parameters). A comparison of the five scenarios' handling of the same stuck data is shown in Table 13.
[0114] Table 13 Scene switching examples (the same stuck data in different scenes)
[0115] Scenario Detection enable Static proportion threshold Score Level Scenario description normal (Normal production) Enable 0.8 (Default) 0.9143 critical Standard threshold, stuck detected maintenance (Overhaul) Disable — 0.0 normal Data naturally static during overhaul, detection suspended pipeline_switch (Pipeline switching) Enable 0.95 (Relaxed) 0.0 normal Data mode changes drastically during switching, threshold increased to prevent false alarms startup (Well startup) Enable 0.9 (Relaxed) 0.0 normal Large fluctuation during startup, threshold increased to prevent false alarms shutdown (Well shutdown) Disable — 0.0 normal Data naturally static after well shutdown, detection suspended
[0116] As shown in Table 13, during maintenance and well shut-in scenarios, detection is directly suspended, as process-related stillness is expected rather than a fault. For pipeline switching and well start-up scenarios, detection is maintained, but the threshold for the percentage of stillness is relaxed. Brief periods of stability during the switching process should not trigger alarms, while continuous stalling (with a percentage close to 1%) will still be detected. Scenario switching explicitly encodes the domain knowledge that "the same data has different meanings under different process backgrounds" into the detection process, eliminating background false alarms.
[0117] S60, Online Incremental Detection and Window Maintenance. In batch processing mode, each call carries complete time window data; in online mode, data arrives point by point, requiring a sliding window to buffer sufficient detection input and maintain state continuity.
[0118] A bounded sliding window is maintained for each point; when the number of data points reached in a single instance reaches the preheating threshold, the window content is replaced with the full amount of data and the preheating mode is entered; when a data point is reached in a single instance, the data point is appended to the end of the window, and incremental detection is performed using the window snapshot as the detection input.
[0119] If the timestamp of a data point arrives earlier than the last timestamp of the window, it is considered an out-of-order point and is rejected from being appended; if the timestamp is the same as the last timestamp of the window and has the same value, it is idempotently skipped; if the timestamps are the same but the values are different, it is rejected from being overwritten and the window remains unchanged.
[0120] After the window content is changed, the window snapshot is persisted to the disk by first writing a temporary file and then atomically replacing it, and periodically forced to be written to the disk; when the service restarts, the window snapshots at each point are restored from the disk, and incremental detection continues after restoration to ensure the continuity of detection.
[0121] S601, Sliding Window and Pattern Determination. The maintenance capacity for each point is N. win A bounded sliding window (50 points in this embodiment) is used. When the number of data points reached in a single instance is not less than the preheating threshold (2 in this embodiment), the window enters preheating mode: the entire window content is replaced, and detection is performed on the original input data. When only one data point is reached in a single instance, the window enters incremental mode: the point is appended to the end of the window, using a window snapshot as the detection input, and the detection conclusion covers the entire window. The appending protection rules are as follows: if the new point's timestamp is earlier than the window's last timestamp, it is considered an out-of-order point and appending is rejected; if the timestamps are the same and the values are the same, it is considered a duplicate point and is skipped idempotently; if the timestamps are the same but the values are different, it is considered a conflict point, and overwriting is rejected while keeping the window unchanged. Window examples are shown in Table 14.
[0122] Table 14 Sliding Window Mode and Out-of-Order / Duplicate Point Protection Examples
[0123] Operation Mode Window points Protection behavior Batch arrival of 10 points warmup 10 (Full replacement) Warm-up mode, detecting execution on incoming data. Single-point addition incremental 11 Normal appending, using window snapshot as detection input. Continue to add incremental 12 Final value: 1320.0 Out-of-order point (t is earlier than the end of the window) incremental 12 (unchanged) Refuse to add more Duplicate points (same timestamp and same value) incremental 12 (unchanged) Idempotency skip Conflict point (different values for the same timestamp) incremental 12 (unchanged) Reject overwrite; the final value remains 1320.0.
[0124] As shown in Table 14, the three protection rules ensure that the timestamps within the window are strictly monotonous and there are no two values with the same timestamp. Out-of-order points (such as late-arriving old data caused by network latency) and duplicate pushes will not disrupt the window's temporal consistency. Conflict points will not cover confirmed historical values. All subsequent detections are based on clean window data.
[0125] S602, Snapshot Persistence and Recovery. After window content changes, snapshots are written to disk atomically: a temporary file is written first, then flushed to disk, and finally the target file is overwritten atomically to avoid file corruption due to errors during the write process. Except when the service shuts down, periodic forced disk writes are performed to prevent loss of the latest state in case of a crash. Snapshot content includes point codes, window data, and update time. When the service restarts, snapshots of each point window are restored from disk, and incremental detection continues after restoration. Persistence examples are shown in Table 15.
[0126] Table 15 Window Snapshot Persistence and Recovery Examples
[0127] step result illustrate Snapshot Write PATENT_WIN_A.json exists The 12 o'clock window uses atomic write to write data to disk. Snapshot content code=PATENT_WIN_A, window count 12, including update timestamp JSON format, readable and verifiable New process recovery + additional single point mode=incremental, window 13 lines Restore 12 points + add 1 point, check for continuity
[0128] As shown in Table 15, after the new process loads the snapshot, the window immediately returns to the 12-point state before the crash. Adding 1 point allows the detection to continue. Without the snapshot mechanism, after the service restarts, each point needs to accumulate 50 points of the window again (approximately 17 minutes under 20-second sampling), during which the detection is completely interrupted.
[0129] S603, Incremental Online Detection Evolution. Starting with 10 normal points after preheating, a constant value of 1320 is added point by point to simulate the process of getting stuck. The evolution of the window and judgment over time is shown in Table 16.
[0130] Table 16 Incremental Single-Point Online Detection Evolution Examples (Window Capacity 50 Points)
[0131] Constant value point number Window points Enable detection items static proportion score grade Trigger item Point 5 15 timestamp 0.0000 0.0000 normal (none) Point 10 20 timestamp + variance 0.3500 0.0000 normal (none) Point 15 25 timestamp + variance 0.4800 0.0000 normal (none) Point 20 30 timestamp + variance 0.5667 0.0000 normal (none) Point 30 40 All three engines 0.6750 0.0000 normal (none) Point 40 50 All three engines 0.7400 0.0000 normal (none) Point 42 50 All three engines 0.7800 0.0000 normal (none) Point 43 50 All three engines 0.8000 0.9000 critical variance, ruptures Point 45 50 All three engines 0.8400 0.9400 critical variance, ruptures Point 48 50 All three engines 0.9000 1.0000 critical variance, ruptures Point 50 50 constant (short circuit) — 1.0000 critical constant
[0132] As shown in Table 16, the incremental detection evolves in three stages: In the early stage of the stuck phase (points 5-42), normal segments still account for a considerable proportion within the window, and the static percentage gradually increases from 0.35 to 0.78, maintaining a normal status – a brief period of stability prevents false alarms; after crossing the confirmation line (point 43, static percentage reaches 0.80), the variance engine is triggered, and the variable point engine provides further evidence, resulting in a score of 0.90 indicating a severe situation; after the stuck phase has fully developed (point 50, the 10 pre-warmed normal points within the window are completely squeezed out, and all 50 points are constant values), the constant short-circuit takes over, and the score saturates to 1.0. After the number of points in the window increases from 15 to 50, it remains at 50 points due to bounded capacity constraints. Data volume gating activates each engine sequentially as the window grows (15 points only timestamps, 20 points onwards with variance, and 40 points onwards with variable points), completely consistent with the gating design in Table 3.
[0133] like Figure 2 As shown, this embodiment provides implementation details of each layer of the system of the present invention and the data flow between layers.
[0134] Data access layer: Subscribes to historical time-series data and real-time data of points via the oil and gas production IoT data platform, maintains a receiving buffer for each point, and supports two access methods: batch request (batch processing detection) and single point request (online incremental detection); routes single indicator, multi-indicator joint or dual-channel comparison execution mode according to the number of input points and request parameters (step S50), and the scene identifier is passed through to the fusion judgment layer with the request; returns a preheating prompt when the data is empty.
[0135] Data preprocessing layer: Performs time sequence alignment and retention processing for repeated reporting of the same timestamp, constructs the original sequence that retains the real timestamp interval and the preprocessed sequence that has undergone frequency inference, resampling, amplitude-limited linear interpolation and time sequence validity verification (steps S101~S103); the amplitude-limited interpolation upper limit (2 consecutive missing buckets) ensures that the long gap of communication interruption is not filled, and the original sequence is dedicated to the use of the timestamp interval engine.
[0136] Detection engine layer: Perform constant short-circuit check and semantic distinction of communication state points (step S20), sliding window variance detection (steps S302~S304, including adaptive window based on sampling rate and adaptive threshold based on historical variance quantile), timestamp interval detection (step S305, performed on the original sequence) and change point location detection (step S306); each engine is enabled sequentially according to data volume gating (step S301), detection items that do not reach the threshold are skipped, and enabled items continue to be executed.
[0137] Fusion Judgment Layer: Perform score fusion and three-state alarm classification (step S40), output normal, warning and severe three-state levels according to score mapping; perform multi-indicator voting classification, dual-channel comparison fault location and scene switching exemption multi-mode joint judgment (steps S501~S504), and fuse the joint judgment result with the independent judgment result of each point into an overall conclusion.
[0138] Alarm Decision Layer: Outputs final alarm level, comprehensive score, trigger engine details, first change point time, static percentage, and alarm message; generates handling suggestions based on trigger engine—variance trigger suggestions check transmitters and signal loops, timestamp trigger suggestions check communication links and data acquisition devices, and dual-channel positioning trigger suggestions inspect the specified channel; alarm details are revealed with the response, supporting alarm platform display and work order dispatch.
[0139] Window Management and Persistence Layer: Maintain a bounded sliding window with a capacity of 50 points for each location, perform preheating batch replacement and incremental single-point appending, implement out-of-order point rejection, idempotent skipping of duplicate points and conflict point protection (step S601); after the window content is changed, a snapshot is written to disk by first writing a temporary file and then atomically replacing it, and periodically forced to write to disk, and restore the window snapshots of each location from the disk when the service restarts (step S602) to ensure the continuity of online detection.
[0140] Application presentation layer: Renders monitoring charts of "parameter trend + sliding window variance curve + adaptive threshold reference line", highlighting the moment of change and the static segment; displays alarms of each point in descending order of comprehensive score, and alarm details include point name, current value, trigger engine, static percentage, moment of change and suggested action; links the work order system to generate handling work orders and fill in the handling results, forming an alarm-handling-feedback closed loop.
[0141] The above layers can be deployed on the same computing node, or they can be split and deployed on multiple nodes, with the layers interacting with each other through a standard interface. When deployed separately, window snapshot files are stored on shared storage media to ensure that the same window state can be loaded after any node restarts.
[0142] Example 1
[0143] The method of this invention was applied to the liquid level points of a separator at a certain water transfer station (point A, sampling every 1 minute, operational limits [100, 1500] mm). On a certain day, the diaphragm of the liquid level transmitter jammed, and the reading froze at 1320.00 mm from point 11. The frozen value was within the normal operational range, and the over-limit monitoring did not detect this at all. The fluctuation monitoring regarded it as the "most stable" apparent state. 70 data points (10 points of normal fluctuation + 60 points of constant value) are sent for detection: data volume gating is enabled with three engines; adaptive window sampling is performed at 5 points every 60 seconds (target span 300 seconds); if the effective variance points are less than 20, the threshold is downgraded to 1e-6; sliding window variance detection statistics show that the static point is 57 / 70, with a static percentage of 0.8143, exceeding the 0.8 threshold and triggering the detection; the variable point engine locates the unique variable point at the boundary between the normal segment and the constant value segment (time 2026-08-20 00:20:00), and adds 0.1 for corroboration; the comprehensive score of 0.8143+0.1=0.9143 is judged as severe, and the outputs "data fluctuation is static, suspected sensor or communication abnormality" and "data variable point detected, operating conditions may change" (Table 8, Table 10 Scenario B). The first variable point time accurately traces back the fault start time to the minute when the jam occurred, and the operation and maintenance personnel can retrieve the operation records before and after that time to pinpoint the cause.
[0144] Example 2
[0145] The method of this invention was applied to liquid level points during a SCADA link failure period at a certain station. The original sequence consisted of 61 points: 39 normal intervals of 60 seconds and 21 interruption intervals of 5-15 minutes. Resampling to a 1-minute grid yielded 250 grid points. After amplitude-limited interpolation (up to 2 buckets), only 103 valid points were retained. The long gaps during the interruption were neither filled by linear interpolation nor included as valid data in the statistics (if no interpolation upper limit was set, 147 of the 250 grid points would be filled, and the interruption would be completely invisible in the preprocessed sequence). The timestamp interval engine was applied to the original sequence: median interval 60 seconds, maximum interval 900 seconds (15 times), 21 abnormal intervals, and an abnormality rate of 0.35 exceeding the 0.20 threshold, indicating a communication interruption. The variance engine showed continuous values in the preprocessed sequence after interpolation, making the interruption imperceptible. The variable point engine detected pattern changes before and after the interruption. The overall score is set at a minimum warning level of 0.5, and a warning level "Abnormal timestamp interval, suspected communication interruption" is output (Tables 7 and 10, Scenario C). This example verifies the necessity of constructing dual sequences. Communication interruption is only reflected in the original timestamps, and any detection method working on the preprocessed sequence will be blind to this.
[0146] Example 3
[0147] For communication status points, constant short-circuiting and semantic differentiation are performed (Table 2). For production parameter point 50, a constant value of 1320.0 indicates sensor jamming, severity level 1.0; for communication status points, a constant value of 1 indicates online communication, normal level. Without semantic differentiation, this point would be falsely reported as jammed by the naive constant value rule; a constant value of 0 indicates communication interruption, severity level; a constant value of 55.0 indicates signal stability, normal level, within the service limit [0, 100]; a constant value of 88.0 indicates signal abnormality, severity level, exceeding the service limit [0, 60]. Even with the same "completely constant value" data format, the five semantic categories yield four different conclusions. Constant value semantics automatically routes based on point type and service upper and lower limits, eliminating systematic false alarms for status point values, while accurately capturing status word jamming and signal strength abnormalities.
[0148] Example 4
[0149] For three production parameter points (separator level, separator pressure, and output temperature) at a certain station, a multi-index joint judgment was performed (Table 11): Points 1 and 2 were each judged to be severely static (score 0.9143, variance + change point trigger), while point 3 was judged to be normal; the joint judgment determined that 2 / 3 of the points were static, accounting for 0.667, exceeding the partial warning line of 0.5, and outputting a warning-level joint message "Two of the three points are static, judged as communication link abnormality"; the overall score was the maximum value of each point, 0.9143, indicating an overall severe level. The simultaneous static status of multiple points points indicates a shared remote terminal unit or communication link rather than individual sensors. Three "independent faults" that would need to be checked one by one from the perspective of a single point are converged into a single link fault location by the joint judgment. In the comparison example, when only 2 out of 5 points were static (accounting for 0.40), no escalation was performed, and sporadic static status did not trigger a link-level alarm, avoiding the amplification of individual sensor jams into link faults.
[0150] Example 5
[0151] A dual-channel comparison was performed on HART channel A and SCADA channel B at the same pressure measurement point (Table 12): If channel A was stationary (0.814%) and channel B fluctuated normally (0.029%), the faulty channel was identified as A, with a score of 0.7 and a warning level. The message indicated "HART channel data is stationary, SCADA is normal, HART communication is faulty." The fault was located in the HART cable or its acquisition unit, and the scope of maintenance was narrowed from the entire station to a single channel. When both channels were stationary and the scenario was not benign, the simultaneous failure of the two independent links could only be a common cause fault, and the station-level communication was interrupted, with a score of 1.0 and a severe level. However, in the case of maintenance shutdown, when both channels were stationary, it was judged as a normal process, with a score of 0 and a normal level. The message clearly stated "Currently, it is a normal shutdown and is not judged as a communication fault." The distinction between "fault stationary" and "process stationary" that could not be distinguished from a single-channel perspective was achieved through dual-channel redundancy and scenario linkage.
[0152] Example 6
[0153] For the same stuck data (10 normal + 60 constant values, judged as severe in normal scenarios, score 0.9143), five process scenarios are switched for detection (Table 13): Maintenance scenario detection is enabled but disabled, directly returning to the normal level and "pause fluctuation and static detection in maintenance scenario," as data naturally stagnating during maintenance is expected; well shut-in scenario detection is also disabled; pipeline switching scenario detection is maintained but the static percentage threshold is relaxed to 0.95, brief stable periods during switching (usually below 0.9%) no longer trigger alarms, while continuous stuck data (approximately close to 1%) will still be detected; well start-up scenario threshold is relaxed to 0.9 to accommodate startup fluctuations. Scenario configuration priority is default configuration < scenario configuration < request parameters, which can be temporarily overridden during operation via request parameters. Switching instructions are triggered by the station operation ticket process. Process background knowledge is explicitly encoded into the detection process, and background false alarms are systematically eliminated.
[0154] Example 7
[0155] Online incremental detection was performed on the liquid level jamming process at point A (Table 16): After preheating 10 normal points, a constant value of 1320 was added point by point. The window increased from 15 points to 50 points and was then maintained at 50 points due to bounded capacity constraints. In the early stage of jamming (points 5 to 42), the static percentage gradually climbed from 0.35 to 0.78, and the judgment remained normal throughout. The brief stable period was not falsely reported. At point 43, the static percentage reached the confirmation line of 0.80. The variance engine was triggered and the variable point engine was used to confirm the result. The score was 0.90, indicating a severe condition. At point 48, the percentage was 0.90, and the score saturated to 1.0. At point 50, the preheated normal points within the window were completely squeezed out, and all 50 points were constant values. The constant short-circuit control directly output a score of 1.0. Out-of-order points (timestamps earlier than the end of the window) that arrived during the period were rejected from being added, duplicate points (same timestamp and same value) were idempotently skipped, and conflicting points (same timestamp but different value) were rejected from being covered. The window timing consistency was always maintained (Table 14). After the service restarts, the 12-point window is restored from the disk snapshot, and 1 point is added to continue the detection (Table 15). If there is no snapshot mechanism, after restarting, 50 points need to be accumulated again (about 17 minutes at 20-second sampling), during which the detection of this point is completely interrupted. The snapshot is written to the disk by writing a temporary file first and then atomically replacing it. If the writing process crashes, no corrupted files will be generated.
[0156] The method of this invention has been applied on a large scale in the upgrade project of the Internet of Things platform for oil and gas production in the Northwest Sichuan Gas Field of the Southwest Oil and Gas Field Company. It covers 96 production stations of various types across three operating areas (83 in Jiangyou, 8 in Guangyuan, and 5 in Qionglai). Station types include single-well stations, gas gathering stations, gas distribution stations, valve chambers, water transfer stations, booster stations, first-stage export stations, and distribution stations. Gas-producing wells include both continuous production wells and intermittent wells. The platform accesses approximately 30,000 real-time production data points. The fluctuation-static identification method is used at these points for static monitoring of analog parameters such as pressure (oil pressure, casing pressure, export pressure, separator pressure), instantaneous flow rate, and separator liquid level, and also covers semantic determination of communication status points. Online incremental detection maintains a bounded sliding window of 50 points for each monitoring point, and snapshot persistence supports the continuity of detection after service upgrades and unexpected restarts.
[0157] The system is deployed in a domestically developed information technology environment: the server operating system is Galaxy Kylin V10-SP3, the relational database is Renmin University Kingbase V8R6, the big data module is BlueZhuo X-BigData, and it adopts Docker containerization deployment. The server hardware consists of a 24-core / 48-thread CPU, 32GB of memory, and 960GB of SSD storage (all three engines of detection are lightweight computing, and single-point incremental detection is completed in milliseconds, without the need for GPU resources). The network environment is a physically isolated oil and gas production network, which meets the requirements for continuous operation 24 / 7.
[0158] Taking the Jiangyou operating area as an example, the average detection delay of static faults has been reduced from about 4 hours, which relied on manual inspection, to minutes. In the first half of 2026, a total of 23 transmitter jams and 41 communication link interruptions were identified. More than 60% of the faults were discovered at night and during unattended periods, which prevented distorted data from driving production decisions for a long time. Based on the calculation that data reliability is restored 3 hours earlier for each fault and the risk of measurement inaccuracies and misoperations is reduced, the annualized benefit is about 300,000 yuan.
[0159] Test case
[0160] To verify the effectiveness of the method of the present invention, quantitative experiments were conducted on a simulated dataset.
[0161] Experimental setup:
[0162] Dataset: Based on pressure, flow and liquid level data of a certain work area from January to June 2026, the following abnormalities were identified: manual injection transmitter jamming (12 instances), SCADA communication interruption (10 instances), communication status word jamming and abnormal signal strength (6 instances), dual-channel single-path fault (4 instances), maintenance and well shut-in shutdown section (8 instances), pipeline switching and well start-up transition section (5 instances). In addition, 18 instances of short-term stable process sections were selected as negative samples prone to false alarms.
[0163] Evaluation metrics: Accuracy, Precision, Recall, F1, False Alarm Rate (FAR), and False Negative Rate (MDR), with anomaly labels covering the entire time period from the time of fault injection to the end of the event;
[0164] Comparison methods: fixed threshold over-limit monitoring, watchdog heartbeat mechanism, sliding window fixed variance threshold (fixed window, no original sequence detection), and the three-engine collaborative method of this invention.
[0165] Table 17 Ablation Experiment Results
[0166] Configuration Accuracy↑ Precision↑ Recall↑ F1↑ FAR↓ MDR↓ w / o constant short-circuiting and semantic distinction 0.806 0.762 0.834 0.796 0.156 0.166 w / o original sequence construction 0.792 0.816 0.759 0.786 0.097 0.241 w / o adaptive window 0.849 0.803 0.871 0.835 0.121 0.129 w / o adaptive threshold 0.833 0.781 0.852 0.815 0.148 0.148 w / o change point evidence 0.897 0.918 0.911 0.914 0.046 0.089 w / o multi-mode joint determination 0.858 0.794 0.855 0.823 0.134 0.145 w / o scene switching 0.821 0.768 0.887 0.824 0.172 0.113 w / o snapshot persistence 0.854 0.883 0.809 0.844 0.062 0.191 Complete Method (This Invention) 0.931 0.923 0.917 0.920 0.042 0.083
[0167] As shown in Table 17, removing any one of the components leads to a performance decrease:
[0168] After removing the original sequence, communication interruptions were filled in by interpolation and the timestamp engine failed, raising the false negative rate to 24.1%, which had the greatest impact.
[0169] After removing constant short circuits and semantic distinctions, the constant value of the communication status point was falsely reported as stuck, with a false alarm rate of 15.6%. Furthermore, the constant value stuck problem throughout the process was replaced by the variance engine, which increased the detection latency.
[0170] After removing the process-related static conditions during scene switching, maintenance, and well closure all triggered alarms, resulting in a false alarm rate of 17.2%.
[0171] After removing the adaptive threshold, the quantization noise variance of the extremely stable channel is lower than the fixed threshold, resulting in both false alarms and near-static micro-jitter missed detections, with both the false alarm rate and the missed detection rate being 14.8%.
[0172] After removing the adaptive window, high-frequency points have excessively short windows, resulting in brief and stable false alarms, while low-frequency points have excessively long windows, leading to delayed detection.
[0173] After removing the multi-mode joint judgment, false alarms about production stoppages cannot be exempted, and link failures are confused with single-point failures.
[0174] Removing the window reconstruction during service restart after snapshot persistence creates a detection blind spot, resulting in a false negative rate of 19.1%.
[0175] Even after removing changepoint evidence, the variance engine can still independently detect stationary events, but the score decreases by 0.1, reducing the severity level of events with a stationary proportion in the 0.80-0.90 range from severe to warning. Furthermore, it loses the ability to backtrack to changepoint moments, and all indicators show a slight decrease—consistent with the changepoint engine's design as an auxiliary evidence engine. The complete method achieves an F1 score of 0.920 and a false positive rate of 4.2%.
[0176] Table 18 Comparative Experiment Results
[0177] method Accuracy↑ Precision↑ Recall↑ F1↑ FAR↓ MDR↓ Average detection delay ↓ Fixed threshold over-limit monitoring 0.704 0.892 0.538 0.674 0.031 0.462 178 minutes Watchdog heartbeat mechanism 0.766 0.874 0.628 0.731 0.052 0.372 46 minutes Sliding window fixed variance threshold 0.809 0.776 0.817 0.796 0.141 0.183 22 minutes This invention features a three-engine synergy. 0.931 0.923 0.917 0.920 0.042 0.083 3.8 minutes
[0178] As shown in Table 18, the fixed threshold over-limit monitoring remains silent for frozen readings within the normal range, with a false detection rate of 46.2% and an average detection delay of 178 minutes, relying mainly on manual inspection to detect faults.
[0179] The watchdog heartbeat mechanism can only monitor specific device links bound to the configuration, and cannot be bound to arbitrary production parameter points. It is also unaware of value freeze-type stuck situations.
[0180] The sliding window fixed variance threshold has the ability to detect numerical static data, but it lacks adaptive parameters and original sequence detection. The extremely stable channel quantization noise false alarms and communication interruption missed detections coexist (false alarm rate 14.1%).
[0181] This invention uses dual-sequence construction to ensure the visibility of communication interruptions, adaptive windows and thresholds to adapt to arbitrary sampling rates and ranges, constant short-circuiting and semantic differentiation to eliminate false alarms of constant values, and multi-mode joint judgment and scenario exemption to improve alarm credibility. The F1 (0.920), false alarm rate (4.2%) and average detection latency (3.8 minutes) are significantly better than the comparison methods, verifying the effectiveness of the overall architecture.
[0182] It should be noted that the indicators in Tables 17 and 18 are based on the labeled dataset of simulated injection anomalies. In actual field applications, the anomaly labeling is incomplete. In engineering, the "alarm confirmation rate" and "false alarm appeal rate" are used for indirect evaluation. Since large-scale application, both indicators have been better than other static and communication detection methods on the same platform, which is consistent with the trend of experimental results.
[0183] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying static fluctuations in oil and gas production data based on three-engine synergy, characterized in that, Includes the following steps: Step S1: Obtain time series data of key parameters of oil and gas stations from the production data acquisition and monitoring system, and construct the original sequence and the preprocessed sequence. The original sequence retains the real timestamp interval, and the preprocessed sequence is an equally spaced sequence obtained by frequency inference and resampling. Step S2: Perform a constant short-circuit check on the preprocessed sequence. When there are no fewer than two data points and all values are exactly the same, directly determine that the data is stationary and output an alarm conclusion, skipping subsequent detection. Step S3: Gated detection items are enabled according to the number of data points. Sliding window variance detection is performed on the preprocessed sequence to obtain a static variance determination. Perform timestamp interval detection on the original sequence to determine the communication interruption. Change point location detection is performed on the preprocessed sequence to obtain data pattern change determination, and three engines are used for parallel detection; Step S4: Integrate the detection results from the three engines and calculate the comprehensive score; The alarm level is determined based on the comprehensive score, and the results of fluctuation and stillness identification, trigger engine details and alarm messages are output.
2. The method according to claim 1, characterized in that, In step S1, the original sequence and the preprocessed sequence are constructed, including: The time series data is sorted by timestamp and null values are removed. An original sequence is constructed using timestamp as index and measurement value as sequence value. The original sequence is not resampled or interpolated, and the real timestamp interval caused by communication interruption is retained. The sampling frequency is inferred from the original sequence. The sequences are then resampled and aggregated into equally spaced sequences according to the inferred frequency. Amplitude-limited linear interpolation is performed on the missing buckets generated by resampling. Buckets with consecutive missing values exceeding the interpolation upper limit are not interpolated and are discarded. The preprocessed sequence is then obtained after time sequence validity verification.
3. The method according to claim 2, characterized in that, In step S2, during the constant short-circuit check, the completely constant sequence is distinguished according to the point semantics, specifically including: Determine whether the point corresponding to the constant value sequence is a communication status point; When the point is a communication status point and its value is always 1, it is determined that the communication is online and a normal level is output; when the point is a communication status point and its value is always 0, it is determined that the communication is interrupted and a severe level is output. When the point is a communication status point and the constant value is a non-binary signal, the constant value is compared with the service upper and lower limits of the point: if it is within the service upper and lower limits, the signal is determined to be stable and a normal level is output; if it exceeds the service upper and lower limits, the signal is determined to be abnormal and a severe level is output. When the location is a production parameter point, it is determined that the sensor is stuck, and the severity level and the current constant value are output.
4. The method according to claim 3, characterized in that, In step S3, the detection items are enabled by gating based on the number of data points, including: Set the minimum number of points for timestamp interval detection, sliding window variance detection, and variable point location detection, and the minimum number of points for variable point location detection is greater than the minimum number of points for sliding window variance detection, and the minimum number of points for sliding window variance detection is greater than the minimum number of points for timestamp interval detection. When the number of data points in the preprocessed sequence reaches the minimum number of points for the corresponding detection item, the detection item is enabled. If the minimum number of points is not reached, the detection item is skipped and the already enabled detection items are executed, so that usable conclusions can be output under different data volume conditions.
5. The method according to claim 4, characterized in that, In step S3, a sliding window variance detection is performed on the preprocessed sequence, specifically including: Calculate the median interval Δt between adjacent timestamps in the preprocessed sequence. med The adaptive window number of points is calculated using the following formula: W = clamp(L span / Δt med W min W max ), where L span For the target time span, W min W max These are the lower and upper limits of the window points, respectively; The target time span covers a complete process fluctuation cycle. If the number of data points is less than two or the median interval is not positive, it is downgraded to a preset fixed window. The denser the sampling interval, the larger the number of points in the adaptive window, so as to keep the time span of the window consistent. The historical rolling variance of the preprocessed sequence is calculated using an adaptive window, and the effective variance points with strictly positive values are selected. When the number of effective variance points is not less than the minimum number of baseline points, the p-th point of the effective variance point set is taken. low quantile P p The adaptive variance threshold is calculated using the following formula: θ var = P p × r θ , where r θ This is the threshold scaling factor; A two-way constraint is applied to the adaptive variance threshold, ensuring it is not lower than the absolute lower limit θ. abs And not exceeding the preset proportion of the total series variance; when the number of effective variance points is less than the minimum number of baseline points, it is downgraded to the preset fixed variance threshold; Calculate the rolling variance var point-by-point on the preprocessed sequence using an adaptive window. t Determine the stationary point using the following formula: our t ≤ θ var ; The percentage of stationary points r static = n static / n, where n static Let r be the number of stationary points and n be the total number of points; when r static ≥r th When determining the variance stationary anomaly, where r th This is the threshold for the percentage of stationary areas.
6. The method according to claim 5, characterized in that, In step S3, timestamp interval detection is performed on the original sequence, specifically including: Calculate the adjacent timestamp interval sequence {Δt} from the original sequence. i } and its median interval Δt med Calculate the interval multiples of each interval using the following formula: g i = Δt i / Δt med ; g i Intervals exceeding the interval multiple threshold are considered abnormal intervals, and the percentage of abnormal intervals is calculated: r gap = m gap / (n-1); When r gap ≥ r gap,th The communication interruption is detected in time; If the median interval is not positive or the number of intervals is insufficient, it is determined that there is no abnormality.
7. The method according to claim 6, characterized in that, In step S3, change point localization detection is performed on the preprocessed sequence, specifically including: Using the squared error as the cost function, the penalty coefficient to control the number of segments, the minimum segment length to prevent overly fragmented segments, and the downsampling step size to control computational overhead, the optimal segmentation change point search is performed on the preprocessed sequence to locate the change point where the mean has shifted significantly. Filter out fixed return points located at the end of the sequence in the search results. If the number of remaining variable points is greater than zero, determine that there is a variable point and output the time of the first variable point and the number of segments. When the number of data points in the preprocessed sequence exceeds the large data volume threshold, the downsampling step size is automatically increased to control computational overhead; the variable point localization engine serves as an auxiliary verification engine and does not trigger alarms independently.
8. The method according to claim 7, characterized in that, In step S4, the detection results of the three engines are fused to calculate a comprehensive score, which specifically includes: The base score is the percentage of stationary points when the sliding window variance detection is triggered. When the variable point positioning detection and the sliding window variance detection are triggered simultaneously, a first corroboration increment is added to the base score. When the timestamp interval detection and the sliding window variance detection are triggered simultaneously, a second corroboration increment is added to the base score. When the timestamp interval detection is triggered alone while the sliding window variance detection is not triggered, the overall score is a minimum warning score; when the change point location detection is triggered alone, the overall score is zero and no abnormality is determined. The comprehensive score is truncated to the upper limit of 1. Based on the comparison results of the comprehensive score with the warning score threshold and the severity score threshold, the three-state alarm levels of normal, warning and severity are determined.
9. The method according to claim 8, characterized in that, It also includes step S5, a multi-indicator joint judgment mode: Three-engine detection is performed independently on multiple points from the same source to statistically determine the number of points and the percentage of points that are considered to be static. When the static percentage reaches the combined severe percentage threshold, the communication link is determined to be interrupted and a severe level is output; when the combined warning percentage threshold is reached but the combined severe percentage threshold is not reached, the communication link is determined to be abnormal and a warning level is output; when the combined partial warning percentage threshold is not reached, the level is not escalated, and the independent judgment results of each point are maintained. The overall score is the maximum score of each point, and a minimum improvement is applied to the overall score based on the joint judgment level.
10. A system for identifying fluctuations and static states in oil and gas production data based on three-engine coordination, used to implement the method described in any one of claims 1-9, characterized in that, include: The data access module is used to access key parameter time-series data and dual-channel data, and to route single-indicator, multi-indicator, or dual-channel execution modes according to the number of points. The data preprocessing module is used to construct the original sequence that retains the true timestamp interval and the resampled preprocessed sequence; The detection engine module is used to perform constant short circuit detection, sliding window variance detection, timestamp interval detection, and change point location detection. The fusion judgment module is used for data volume gating, score fusion, and multi-mode joint judgment. The alarm decision module is used for three-state alarm output, alarm message generation, and handling suggestion push. The window management and persistence module is used for incremental access via sliding windows, protection against out-of-order duplicate points, and persistent recovery of snapshots. The application display module is used for parameter trend and variance rendering, variable point annotation, alarm push and work order linkage.
