A deep learning-based oil well pressure anomaly detection method and system
By introducing pump start/stop signals and valve control command timestamps into oil well pressure anomaly detection, a multi-dimensional time series feature group is constructed and a deep learning network is used to solve the problem of insufficient modeling of the linkage between control signals and pressure response in existing technologies. This enables efficient and accurate detection of oil well pressure anomalies and improves the stability and immediacy of detection.
Patent Information
- Application Number
- CN202510446509.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Existing oil well pressure anomaly detection methods lack modeling of the linkage between control signals and pressure responses, resulting in fuzzy attribution of abnormal fluctuations, difficulty in distinguishing between expected fluctuations caused by intervention and abnormal states, insufficient feature representation capabilities, inability to effectively identify microscopic abnormal structures in complex sequences, and limited generalization ability during model training, which cannot support rapid judgment and accurate location of sudden events.
By acquiring the pump start/stop signals and valve control command timestamps, the slope difference and fluctuation of the pressure sequence are calculated, abrupt change points are marked, a multi-dimensional time series feature set is constructed, and a control-related differential pressure label set is generated by combining control behavior. The internal change patterns are extracted using a deep learning network, and a differential pressure identification model is established to achieve real-time detection of oil well pressure anomalies.
It improves the stability and accuracy of oil well pressure anomaly detection, effectively identifies pressure change characteristics under operation-driven conditions, enhances the identification of the source of abnormal fluctuations, improves the immediacy of abnormal response and the accuracy of location, and makes pressure safety monitoring more reliable and practical in actual oil production.
Smart Images

Figure CN120372481B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pressure detection, and particularly relates to an oil well pressure anomaly detection method and system based on deep learning. BACKGROUND
[0002] The technical field of pressure detection includes the technical content of real-time monitoring, recording and analyzing the fluid pressure in a closed system or an open system, and is widely used in many industries such as petrochemical industry, mechanical manufacturing and energy transportation. The core content is to obtain the physical pressure data of the target medium under specific time and space conditions through a pressure sensor, and to realize accurate description and tracking of the pressure state by combining with the links of electric signal conversion, data acquisition and data analysis. The whole pressure detection technology system includes the implementation methods of pressure measurement principles such as strain type, capacitance type and piezoresistive pressure sensing mechanism, signal conditioning circuit, data acquisition terminal and pressure analysis method matched therewith, and constitutes a complete system covering physical acquisition, numerical conversion and data interpretation, aiming to serve the needs of industrial safety, process control and equipment operation and maintenance.
[0003] Among them, the oil well pressure anomaly detection method based on deep learning refers to using an artificial neural network model to model and analyze the pressure data sequence of the oil well in the oil production process to identify the potential abnormal fluctuations therein, covering historical data collection of wellhead or downhole pressure values, time series arrangement and numerical normalization processing of pressure data, construction of a feature extraction structure based on a convolutional neural network, and use of a long short-term memory network for state judgment and classification labeling in the time dimension. Through the error optimization process of the training set and the validation set, the network model is adjusted to realize the state discrimination of the input pressure data.
[0004] In the existing oil well pressure anomaly detection process, the pressure value itself is taken as the analysis object, without introducing external behavior events, lacking modeling of the linkage relationship between control signals and pressure responses, leading to ambiguous abnormal fluctuation attribution and difficulty in distinguishing between expected fluctuations caused by intervention and abnormal states. In the sample generation process, the overall sliding window processing strategy is adopted, which cannot be combined with the actual section positioning of abnormal behaviors, so that the labeling process lacks accuracy and affects the training effect. The feature representation level relies on limited basic statistical indicators, and the response capability to nonlinear fluctuation trends and periodic disturbances is insufficient, which cannot effectively identify the micro abnormal structure in complex sequences. In the model training process, it is mainly based on static labels and single classification targets, and lacks label refinement for control behavior differences, causing the model to be incomplete in covering abnormal forms and limited in generalization ability. In the actual running environment, because the prediction output relies on static structure and fixed time window scale, there is a response delay and identification interval mismatch phenomenon, which cannot support rapid judgment and accurate positioning of sudden events, especially in continuous high-frequency sampling scenarios, which is more prone to misidentification and missed judgment. SUMMARY
[0005] The application aims to solve the problems existing in the prior art and proposes an oil well pressure anomaly detection method based on deep learning.
[0006] In order to achieve the above-mentioned purpose, the application adopts the following technical scheme: an oil well pressure anomaly detection method based on deep learning, comprising the following steps:
[0007] S1: acquiring pump control start-stop signals and valve control instruction time stamps, calculating slope difference and fluctuation in combination with pressure sequence, labeling mutation points, and generating control associated pressure difference labeling set in combination with control behavior;
[0008] S2: based on the control associated pressure difference labeling set, extracting pressure sequence window, calculating first-order difference, trend slope, sliding standard deviation and fluctuation interval average, and constructing multi-dimensional time sequence feature group;
[0009] S3: based on the multi-dimensional time sequence feature group, respectively assigning labels according to control type information of corresponding samples in the control associated pressure difference labeling set, and pairing feature vectors with corresponding labels, and constructing control behavior training sample set;
[0010] S4: based on the feature vectors and category labels of the control behavior training sample set, inputting the neural units in the deep learning network structure in turn, extracting internal change pattern and establishing classification boundary mapping, selecting network weight parameters, and generating pressure difference recognition model parameter group;
[0011] S5: acquiring real-time pressure sampling data in the oil well operation process, extracting feature vectors from real-time data, performing prediction calculation using the pressure difference recognition model parameter group, identifying pressure anomaly category time period, and generating oil well pressure anomaly real-time detection result.
[0012] As a further scheme of the application, the control associated pressure difference labeling set includes pressure difference mutation section, mutation position label, control response type, control time index, the multi-dimensional time sequence feature group includes time sequence structure feature, statistical change index, difference feature vector, local trend expression record, the control behavior training sample set includes behavior category label, feature representation combination, classification sample unit, the pressure difference recognition model parameter group includes deep feature mapping parameter, classification boundary function, optimization objective function, and the oil well pressure anomaly real-time detection result includes anomaly recognition interval, corresponding category identification, anomaly time positioning, and pressure difference anomaly amplitude.
[0013] As a further scheme of the application, the acquisition step of the control associated pressure difference labeling set is specifically:
[0014] S111: Based on the pump control start and stop signal and the valve control instruction timestamp, the pressure sampling sequence time points corresponding thereto are extracted, the pressure difference value change sequence between adjacent sampling points in the continuous time period is calculated, whether the difference between adjacent pressure difference values falls within the pump control response threshold interval is judged, the continuous interval satisfying the threshold interval constraint condition is marked, and the pressure difference response interval segment is obtained;
[0015] S112: According to the pressure difference response interval segment, the corresponding time points are extracted according to the extreme value position of the pressure difference value fluctuation, the pressure difference jump discrimination processing is performed on the continuous pressure difference sequence, the jump points are extracted according to the sign direction of the pressure difference sequence mutation and the numerical fluctuation rate calculation method, and the pressure difference mutation time point set is generated;
[0016] S113: According to the pressure difference mutation time point set, the pressure difference response interval segment to which each jump point belongs is found, and the formula:
[0017]
[0018] The control associated pressure difference strength value L of the interval corresponding to the pressure difference mutation point is calculated, the jump point and the interval information are bound by taking the control associated pressure difference strength value as the index, and the control associated pressure difference labeling set is obtained, wherein ΔP k represents the pressure difference value at the kth time point, T k is the sampling timestamp corresponding to the pressure difference value, and K represents the total number of pressure difference jump segments participating in the calculation in the current pressure difference interval segment.
[0019] As a further scheme of the present application, the acquisition step of the multi-dimensional time sequence feature group is specifically:
[0020] S211: According to the pressure difference mutation section labeled in the control associated pressure difference labeling set, the pressure original sampling value in the corresponding time range is obtained, the extracted sequence is divided into multiple overlapping segments according to the time axis, and the sliding time segment sequence is obtained;
[0021] S212: Based on the sliding time segment sequence, the pressure original sampling value in each time segment is respectively processed by first-order difference processing, trend slope calculation, sliding standard deviation calculation and fluctuation interval mean calculation, and the pressure fluctuation feature value group corresponding to each time segment is generated;
[0022] S213: According to the pressure fluctuation feature value group, the time sequence order corresponding to each group of features is taken as the index, and the formula:
[0023]
[0024] The multi-dimensional time sequence feature value F is calculated, all feature values are spliced into a vector structure in sequence, and the multi-dimensional time sequence feature group is established, wherein ΔSq denotes the qth first-order difference, M q denotes the qth trend slope, V q denotes the qth sliding standard deviation, A q denotes the qth fluctuation interval average, Q represents the number of feature items in each sliding time segment.
[0025] As a further scheme of the present application, the step of acquiring the control behavior training sample set is specifically:
[0026] S311: Based on the multi-dimensional time series feature group, the control type label information of each time series feature in the control associated pressure difference label set is compared, the corresponding control behavior attribute is identified, the label type is normal control or abnormal mutation, the control behavior label sequence is generated;
[0027] S312: According to the multi-dimensional time series feature group and the control behavior label sequence, the corresponding positions of the feature vector and the label are extracted item by item, and the sample unit is established in order, using the formula:
[0028]
[0029] Calculate the paired deviation combination value Z of the ith sample i , depict the structural difference and deviation relationship between the feature dimensions, generate the feature label pairing group, wherein X1, X2, X3, X4 represent the numerical values of the first four dimensions in the feature vector, Y1, Y2, Y3 represent the label quantization values in the corresponding dimensions;
[0030] S313: Based on the feature label pairing group, all feature vectors and corresponding control behavior labels are combined according to the pairing results to establish a data structure that can be used for training tasks, and a control behavior training sample set is acquired.
[0031] As a further scheme of the present application, the step of acquiring the pressure difference recognition model parameter set is specifically:
[0032] S411: Based on the control behavior training sample set, the feature vector and the corresponding category label in the sample are extracted in turn, and each level of neural unit in the neural network structure is input in order, a data structure of step-by-step conduction is constructed, and a neuron input vector set is acquired.
[0033] S412: According to the neuron input vector set, the output results of the input features after the activation of each layer of the network are compared item by item, the neural response change trend under different category labels is analyzed, the internal structure mode of the sequence is extracted, and the classification boundary response feature is acquired.
[0034] S413: According to the classification boundary response feature, the error value between the network output and the true label is compared, the network weight combination corresponding to the minimum error is screened in each sample training round, the weight structure with the highest matching degree is extracted, and the differential pressure recognition model parameter set is obtained.
[0035] As a further scheme of the present application, the step of obtaining the oil well pressure anomaly real-time detection result is specifically:
[0036] S511: Obtain real-time pressure sampling data in the oil well operation process, according to the sliding window structure set in the control correlation differential pressure label set, divide the real-time data into continuous window segments in the same window mode, and construct a time index structure for each segment to obtain a real-time sliding subsequence set;
[0037] S512: Based on the real-time sliding subsequence set, the pressure feature of each subsequence is extracted in time sequence, a feature vector set consistent with the training stage structure is constructed, and the differential pressure recognition model parameter set is input for forward prediction to identify the abnormal category time period in the prediction result, establish an abnormal time point index set, and calculate the amplitude of the differential pressure extreme value fluctuation in the window where the abnormal sample is located to obtain the abnormal prediction differential pressure amplitude value;
[0038] S513: According to the abnormal prediction differential pressure amplitude value and the corresponding abnormal time point index set, the abnormal segment range is summarized and classified in time sequence to generate an abnormal segment list structure and obtain the oil well pressure anomaly real-time detection result.
[0039] An oil well pressure anomaly detection system based on deep learning, comprising:
[0040] The data processing module obtains the pump control start-stop signal and the valve control instruction timestamp, combines the time points in the pressure sampling sequence, calculates the differential pressure fluctuation value of adjacent sampling points, judges whether the differential pressure fluctuation is in the pump control response threshold interval, identifies the mutation position and marks the differential pressure mutation segment, and obtains the control correlation differential pressure label set;
[0041] The feature extraction module obtains the pressure original sampling value in the corresponding time range according to the differential pressure mutation segment in the control correlation differential pressure label set, constructs a sliding analysis window and calculates the first-order difference, trend slope, sliding standard deviation and fluctuation interval average value, and generates a multi-dimensional time sequence feature set.
[0042] The sample construction module is based on the multi-dimensional time sequence feature set, combines the control type information, assigns labels to normal control and abnormal mutation behavior respectively, and pairs the feature vector with the label to obtain a control behavior training sample set.
[0043] The deep learning training module inputs the feature vector into a neural unit in a deep learning network based on a control behavior training sample set, extracts internal change patterns of the sequence, performs classification boundary mapping, selects network weight parameters according to a minimum loss value, and obtains a differential pressure recognition model parameter set;
[0044] The real-time detection module obtains real-time pressure sampling data in the oil well operation process, extracts a real-time data feature vector in combination with a sliding window structure in the control associated differential pressure label set, performs forward prediction calculation by using the differential pressure recognition model parameter set, marks an abnormal category time period, and generates an oil well pressure abnormality real-time detection result.
[0045] Compared with the prior art, the advantages and positive effects of the present application are that:
[0046] In the present application, by introducing the pump control start-stop signal and the valve control instruction timestamp into the analysis of pressure change, the direct correspondence between the control behavior and the differential pressure fluctuation under the oil well operation state is realized, the abnormality detection has the working condition perception ability, the pressure change characteristics driven by the operation can be effectively identified, the source identification of abnormal fluctuation is strengthened, the dynamic labeling of the differential pressure mutation section and the time sequence binding of the mutation position are introduced, the label precision and sample semantic integrity are improved, the interference of noise labels in the training stage is avoided, the first-order difference, the trend slope and the local fluctuation index are integrated by using the sliding window structure in the feature construction stage, the short-term change trend and the local abnormal signal of the pressure sequence in the oil extraction process of the oil well are fully described, the hidden abnormal starting point in the complex downhole environment is effectively captured, the multi-class labels are set in combination with the control response type in the training sample organization, the distinguishing ability of the model to the fluctuation caused by the operation and the equipment abnormality is enhanced, the high-frequency disturbance and the unplanned event in the oil well working condition can be separated and identified, the neural network forms the high-sensitivity expression ability to the downhole pressure dynamic pattern through the hierarchical extraction of the sequence features and the target optimization of the model parameters, the stability and the discrimination precision of the abnormality detection are improved, the feature generation and the prediction output are completed in combination with the unified sliding structure in the real-time sampling process, the continuous abnormality detection mechanism facing the dynamic pressure change of the oil well is constructed, the immediacy, the coverage and the positioning accuracy of the abnormal response are improved, and the pressure safety monitoring has higher reliability and practicality in the actual oil extraction process. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 It is a main step flowchart of the present application;
[0048] Figure 2 It is a control associated differential pressure label set acquisition flowchart of the present application;
[0049] Figure 3 It is a multi-dimensional time sequence feature group acquisition flowchart of the present application;
[0050] Figure 4A control behavior training sample set acquisition flowchart of the present application;
[0051] Figure 5 A differential pressure recognition model parameter set acquisition flowchart of the present application;
[0052] Figure 6 A well pressure anomaly real-time detection result acquisition flowchart of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical scheme and advantages of the present application clearer and more apparent, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0054] In the description of the present application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, in the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.
[0055] Please refer to Figure 1 A deep learning-based oil well pressure anomaly detection method, comprising the following steps:
[0056] S1: Obtain the pump control start-stop signal and the valve control instruction timestamp, combine the time points corresponding to the control instruction in the pressure sampling sequence, generate a continuous pressure segment and calculate the pressure difference fluctuation value of adjacent sampling points, judge whether the pressure difference fluctuation is located in the pump control response threshold interval, identify the mutation position and mark the pressure difference mutation section, bind the section meeting the conditions and the mutation position as a training label to generate a control-associated pressure difference annotation set;
[0057] S2: According to the pressure difference mutation section marked in the control-associated pressure difference annotation set, obtain the pressure original sampling value in the corresponding time range, construct a sliding analysis window and calculate the first-order difference, trend slope, sliding standard deviation and fluctuation interval average value, and splice each group of features into a vector structure in time sequence to generate a multi-dimensional time sequence feature group;
[0058] S3: Based on the multi-dimensional time sequence feature group, according to the control type information of the corresponding sample in the control-associated pressure difference annotation set, respectively give normal control induced change and abnormal mutation behavior labels, and pair the feature vector with the corresponding label to construct a control behavior training sample set;
[0059] S4: Based on the feature vector of the control behavior training sample set and the category label, input the neural unit in the deep learning network structure in turn, extract the internal change pattern and establish the classification boundary mapping relationship, select the network weight parameter by the minimum loss value as the criterion, and generate the differential pressure recognition model parameter group;
[0060] S5: Obtain real-time pressure sampling data in the operation process of the oil well, create a sliding sub-sequence for real-time data combined with the same window structure in the control associated differential pressure annotation set, extract the feature vector, use the differential pressure recognition model parameter group for forward prediction calculation, mark the time period identified as an abnormal category, establish an abnormal list combined with the actual sampling time index and the differential pressure amplitude result, and generate the oil well pressure abnormal real-time detection result.
[0061] The control associated differential pressure annotation set includes the differential pressure mutation section, the mutation position label, the control response type, and the control time index. The multi-dimensional time sequence feature group includes the time sequence structure feature, the statistical change index, the difference feature vector, and the local trend expression record. The control behavior training sample set includes the behavior category label, the feature representation combination, and the classification sample unit. The differential pressure recognition model parameter group includes the deep feature mapping parameter, the classification boundary function, and the optimization objective function. The oil well pressure abnormal real-time detection result includes the abnormal recognition interval, the corresponding category identification, the abnormal time positioning, and the differential pressure abnormal amplitude.
[0062] Please refer to Figure 2 , S1 step is:
[0063] S111: Based on the pump control start-stop signal and the valve control instruction timestamp, extract the pressure sampling sequence time point corresponding thereto, calculate the differential pressure value change sequence between adjacent sampling points in the continuous time period, judge whether the difference amplitude between adjacent differential pressure values falls into the pump control response threshold interval, mark the continuous interval that meets the threshold interval constraint condition, and obtain the differential pressure response interval section;
[0064] Based on the pump control start and stop signal and the valve control instruction timestamp, the corresponding time point of the control instruction needs to be extracted from the data acquisition device first, for example, the pump start signal is recorded at time point 12.3s, the pump stop signal is recorded at 37.6s, and the valve control instruction is recorded at 21.5s and 44.2s. Corresponding to the pressure sampling sequence, the pressure sampling period is set to once every 0.1s, then the corresponding signal time point in the pressure sequence index position is 123, 215, 376, and 442 respectively. Further, according to these index positions, the sampling segment of 5s before and after each control signal is extracted from the pressure sequence, a total of 101 sampling point data segments are extracted, and the data segment is set as the control pressure segment. The pressure difference between adjacent sampling points in the control pressure segment is calculated, that is, the difference between the pressure at each time and the pressure at the previous time is calculated. If a certain pressure sequence is 【1.23MPa, 1.27MPa, 1.34MPa, 1.33MPa】, then its pressure difference sequence is 【0.04MPa, 0.07MPa, -0.01MPa】, whether the difference between each two continuous pressure difference values is within the set pump control response threshold interval is judged to identify whether there is a response. The response threshold interval is measured by experiment. For a typical pneumatic pump, the acceptable range of pressure difference change response is ±0.02MPa. If the absolute value of the difference exceeds this range, it is not considered as an effective response. The points whose pressure difference difference exceeds 0.02MPa are marked for exclusion. In this way, the stable change segment is screened out, and the process is iterated to finally screen out the pressure difference response interval segment composed of multiple continuous segments, wherein the control signal is located therebetween, which can be used as the basis for subsequent jump identification.
[0065] The threshold value ±0.02MPa is based on the normal fluctuation range of the pressure difference of the device in the controlled state according to experimental data, as shown in the following table.
[0066] Table 1 Reference table for setting pressure difference response threshold
[0067] Control state Minimum pressure difference change (MPa) Maximum pressure difference change (MPa) Set threshold (MPa) Start 0.015 0.038 ±0.02 Stop 0.010 0.029 ±0.02 Valve opening 0.013 0.031 ±0.02 Valve closing 0.011 0.027 ±0.02
[0068] As shown in Table 1, the minimum and maximum pressure difference fluctuation values obtained by monitoring the actual operation of the device are determined. The fluctuation within ±0.02MPa belongs to the response change interval of pump control start and stop or valve action. This threshold value is the basis for judgment. In the calculation, the pressure difference change between the current point and the previous point is calculated, and it is judged whether it falls within the interval. The final pressure difference response interval segment is, for example, the 123rd to 132nd sampling point, the 215th to 226th sampling point, etc.
[0069] S112: According to the pressure difference response interval segment, the corresponding time point is extracted according to the extreme value position of the pressure difference value fluctuation, and the pressure difference jump identification processing is performed on the continuous pressure difference sequence. According to the sign direction and numerical fluctuation rate of the pressure difference sequence mutation, the jump point is extracted, and the pressure difference mutation time point set is generated;
[0070] In combination with the pressure difference response interval segment, a jump identification operation is performed on the pressure difference sequence in the interval. First, the pressure difference sequence in each response interval segment is scanned to extract the points where the absolute value of the pressure difference has a mutation. A mutation is defined as the difference between a certain pressure difference point and its adjacent two points being greater than 0.03 MPa. For example, in the interval segment 【0.06 MPa, 0.09 MPa, 0.14 MPa, 0.12 MPa】, the difference between the 3rd point (0.14 MPa) and the 2nd point (0.09 MPa) is 0.05 MPa, and the difference between the 3rd point and the 4th point (0.12 MPa) is 0.02 MPa. Only the former difference is greater than the threshold, and it does not constitute a mutation. However, if it is 【0.06, 0.10, 0.15】, the change amplitude between 0.10 and 0.15 is 0.05 MPa, which meets the mutation standard and is identified as a jump point. If there are multiple sampling points in the same interval that meet the mutation condition in the jump point sequence, the maximum jump value is taken as the representative mutation point, and its time index is further taken as the pressure difference mutation time point of this segment. The pressure difference mutation time point set is formed. This process is sequentially performed in all pressure difference response interval segments. Finally, multiple jump time points are obtained, such as index positions 127, 218, 379, etc. A set of identification points is formed with the mutation pressure difference identification as the core. The set mutation threshold is greater than ±0.03 MPa, which is derived from the analysis of the synchronization amplitude between the pump control pressure difference fluctuation and the actual mechanical response strength. For details, refer to the linkage change data of the pump outlet pressure monitoring curve and the corresponding flow rate change rate. If the pressure difference change rate exceeds 0.03 MPa / s within 1s, the flow rate mutation rate will also show a significant jump phenomenon. In combination with the trend window that the pressure regulation rate is stable between 0.02 MPa / s and 0.03 MPa / s under the valve control mechanism and the fluid inertia characteristics, the ±0.03 MPa is comprehensively determined as the mutation threshold. The value will be adjusted according to the rated output flow of the pump. For a system with a flow rate of 12 m3 / h, the pressure difference mutation value is a reasonable critical setting. Finally, the pressure difference mutation time point set is extracted and composed.
[0071] S113: According to the pressure difference mutation time point set, find the pressure difference response interval segment to which each jump point belongs. Use the formula:
[0072]
[0073] Calculate the control correlation pressure difference intensity value L of the interval corresponding to the pressure difference mutation point. Take the control correlation pressure difference intensity value as the index basis to bind the jump point and the interval information, and obtain the control correlation pressure difference label set, where ΔP k represents the pressure difference value at the kth time point, T k is the sampling time stamp corresponding to the pressure difference value, and K represents the total number of pressure difference jump segments participating in the calculation in the current pressure difference interval segment.
[0074] According to the pressure difference mutation time point set, find the interval segment of each mutation point to which it belongs, judge whether it belongs to the previously extracted pressure difference interval index range, if the jump point is located between interval index 123 and 132, bind this interval segment with the mutation point, form a labeled unit, and further calculate its control correlation pressure difference intensity value, which needs to extract all pressure difference sequences in the interval segment for calculation.
[0075] Take the interval segment pressure difference sequence 【0.06, 0.09, 0.14, 0.10】MPa and the time point sequence 【12.3, 12.4, 12.5, 12.6】s as an example, and substitute them into the formula as follows:
[0076] The first item:
[0077] The second item:
[0078] The third item:
[0079]
[0080] The results show that the control correlation pressure difference intensity value of the interval segment where the current jump point is located is 1.089, which belongs to the control signal response segment with obvious characteristics. By calculating the value of all jump points and binding their original intervals, a control correlation pressure difference annotation set is formed.
[0081] Please refer to Figure 3 , S2 step is:
[0082] S211: According to the pressure difference mutation segment labeled in the control correlation pressure difference annotation set, obtain the pressure original sampling value in the corresponding time range, position and extract according to the mutation segment time interval, divide the extracted sequence into multiple overlapping fragments according to the time axis, and obtain the sliding time fragment sequence;
[0083] According to the control of the differential pressure mutation section in the differential pressure correlation annotation set, the pressure original sampling value in the corresponding time range is obtained. In specific operation, first, the start and end time stamps contained in each record in the annotation set are read. If the start time of the differential pressure mutation section corresponding to a record is 18.20 seconds and the end time is 20.80 seconds, the original data points in the corresponding time interval are extracted from the pressure original data sequence. Assuming that the sampling interval is every 0.02 seconds, the extraction interval should include 130 data points, thereby forming a complete time period pressure sequence. Then, a sliding window is set with a fixed time window width for segmentation processing. For example, the sliding window length is set to 20 points, and the step is 5 points. Therefore, multiple continuous and overlapping window segments will be generated in each differential pressure section. For example, the first window is the 120th point, the second window is the 625th point, and so on. Multiple overlapping windows are formed. For these window sequences, the sliding window is extracted in turn by traversing the differential pressure mutation section, and the window start and end times are aligned with the time stamps of the pressure sampling data, so as to ensure that the time period division corresponds to the control signal sequence. Each window segment will form multiple time segment sets, which are convenient for subsequent operation and unified processing. Assuming that the number of windows is 6, 6 sliding window segment data with different start and end times can be obtained under each mutation section, thereby forming a sliding time segment sequence.
[0084] S212: Based on the sliding time segment sequence, the pressure original sampling value in each time segment is processed, and the first-order difference value, the trend slope, the sliding standard deviation, and the fluctuation interval average value are calculated respectively, thereby generating a pressure fluctuation feature value group corresponding to each time segment.
[0085] According to the sliding time segment sequence, the pressure original sampling value in each time segment is processed, and the first-order difference value, the trend slope, the sliding standard deviation, and the fluctuation interval average value are calculated respectively. In specific execution, first, the sampling value in each time segment is processed by first-order difference, that is, the pressure difference value between adjacent data points is calculated. Assuming that the pressure sampling sequence in the first window segment is {1.02, 1.04, 1.05, 1.07, 1.09} MPa, the first-order difference sequence is {0.02, 0.01, 0.02, 0.02} MPa. Then, the trend slope of the data in the window is calculated. The slope of linear fitting can be used as the trend feature. If the time of this section is {0s, 0.02s, 0.04s, 0.06s, 0.08s}, the linear slope can be fitted by the least square method, and the trend value 0.175 MPa / s is obtained. The sliding standard deviation uses the standard formula, that is, the average value of the square difference of each pressure value and the average value of this section. For example, if the pressure average value is 1.054 MPa, the standard deviation is
[0086]
[0087] The fluctuation interval average is the arithmetic mean of all pressure sampling values in the window, which is 1.054 MPa. The combination of all the characteristic values forms the pressure fluctuation characteristic value group corresponding to the window segment. By traversing all the window segments, the above operations are sequentially performed to obtain the characteristic set corresponding to all time segments.
[0088] S213: According to the pressure fluctuation characteristic value group, the formula is used with the time sequence corresponding to each group of characteristics as the index.
[0089]
[0090] Calculate the multi-dimensional time sequence characteristic value F, and sequentially splice all the characteristic values into a vector structure to establish a multi-dimensional time sequence characteristic group, wherein ΔS q represents the qth first-order difference, M q represents the qth trend slope, V q represents the qth sliding standard deviation, A q represents the qth fluctuation interval average, and Q represents the number of characteristic items in each sliding time segment.
[0091] According to the pressure fluctuation characteristic value group, each group of pressure characteristics is spliced in time sequence to construct a multi-dimensional vector structure for subsequent analysis and processing. In the splicing process, the characteristic dimension is unified in the structure format, and the characteristic vector value is generated through the average function,
[0092] wherein each group of characteristic values is sequentially input into the formula for conversion. Assuming that the parameters in the first sliding window segment are as follows:
[0093] ΔS = {0.02, 0.01, 0.02, 0.02};
[0094] M = {0.17, 0.16, 0.18, 0.15};
[0095] V = {0.025, 0.023, 0.026, 0.022};
[0096] A = {1.05, 1.06, 1.04, 1.05};
[0097] Then the step-by-step operation is as follows:
[0098] 1) Calculate the single characteristic item, take the first item:
[0099]
[0100] ≈0.02+0.00287=0.02287;
[0101] 2) Calculate each item in turn and take the average:
[0102]
[0103] The corresponding multi-dimensional time sequence characteristic value of the window segment is finally obtained as 0.02242, and the characteristic value vectors of multiple window segments are spliced and combined in time sequence to establish a multi-dimensional time sequence characteristic group.
[0104] To clarify the collection and setting method of each parameter value, the following pressure sampling characteristic value schematic table is constructed:
[0105] Table 2 sliding time window pressure characteristic value table
[0106] Window number First-order difference mean (MPa) Trend slope (MPa / s) Sliding standard deviation (MPa) Fluctuation mean (MPa) 1 0.017 0.175 0.0253 1.054 2 0.015 0.162 0.0231 1.061 3 0.018 0.180 0.0267 1.049 4 0.016 0.159 0.0228 1.057
[0107] As shown in Table 2, the pressure characteristic parameters corresponding to each window segment are maintained within a reasonable floating range, which can truly reflect the pressure dynamics in the time segment. Based on the parameter values of window 2 in the table, the characteristic value calculated by inputting into the formula is 0.02242, which indicates that the characteristic change of the window segment remains stable and can be used to construct a representative sequence characteristic vector, further supporting the setting of the feature input layer in subsequent behavior prediction or response analysis.
[0108] Please refer to Figure 4 , and the S3 step is:
[0109] S311: Based on the multi-dimensional time sequence characteristic group, the control type label information in the control associated pressure difference label set is compared in combination with the sampling interval index corresponding to each time sequence characteristic to identify the corresponding control behavior attribute, obtain the label type as normal control or abnormal mutation, and generate a control behavior label sequence;
[0110] Based on the multi-dimensional time series feature group, the timestamp and source index of each data in the feature group need to be called to correspondingly find the time interval of the feature segment in the control correlation differential pressure annotation set, and the annotation type information thereof is extracted, wherein the control type information is usually a binary label, respectively representing the pressure fluctuation or abnormal mutation behavior caused by normal control, and the quantitative label can be set through mapping, for example, normal control is set as 0, and abnormal mutation is set as 1. The abnormal mutation judgment is based on the fact that the pressure mutation amplitude is greater than 0.35 MPa and the corresponding sampling point number is less than 5. When the sampling period is 0.05 seconds in the valve opening and closing process, a pressure mutation of more than 12% of the rated operating pressure (3 MPa as a reference) can cause transient backflow disturbance. Therefore, the mutation threshold is set to 0.35 MPa, and the sampling point number less than 5 indicates that the mutation process is completed within 0.2 seconds, which is a non-stationary rapid disturbance behavior. If the mutation is only 0.25 MPa, it is judged as a process fluctuation rather than an abnormal event. If the mutation is 0.5 MPa but exceeds 6 points, it is classified as a slow change process. The threshold tends to decrease as the sampling period shortens, and the sampling point limit tends to be more stringent as the fluctuation rate increases. For example, if the pressure is detected to be mutated from 1.25 MPa to 1.63 MPa in a certain time period, only 3 sampling points are crossed, which meets the above conditions, so it is marked as an abnormal mutation label 1. In the execution process, the control state type of all time series feature segments needs to be matched in sequence and a label set is generated, wherein the label set should keep consistent with the length of the feature sequence, and the label assignment process is completed through the mapping relationship. The sample data listed in Table 3 is used to mark the actual control type to form a one-to-one corresponding label output.
[0111] Table 3 Control behavior sample label table
[0112] Time period number Start time (s) End time (s) Pressure difference mutation (MPa) Sampling point number Control type label 1 15.20 16.00 0.12 6 0 2 21.10 21.25 0.38 3 1 3 30.50 31.00 0.26 7 0 4 45.00 45.15 0.42 2 1
[0113] As shown in Table 3, the mapping rule between the original sampling segment and the annotation set can be established by using such a label structure, and finally the control behavior label sequence is obtained.
[0114] S312: According to the multi-dimensional time series feature group and the control behavior label sequence, the corresponding positions of the feature vector and the label are extracted item by item, and the sample unit is established by pairing in sequence, using the formula:
[0115]
[0116] The pairing deviation combination value Z of the i-th sample is calculated i , which describes the structural difference and deviation relationship between the feature dimensions, and generates a feature label pairing group, wherein X1, X2, X3, X4 represent the numerical values of the first four dimensions in the feature vector, and Y1, Y2, Y3 represent the quantitative values of the corresponding labels in the first corresponding dimensions;
[0117] According to the multi-dimensional time sequence feature group and the control behavior label sequence, each feature vector is paired with the label in the corresponding order. In the pairing process, representative numerical values are extracted from the feature vector, and a structure comparison operation is performed in combination with the label quantization value to depict the pairing difference between the label and the feature. The deviation reference value is set to 0.6, which is derived from the clustering distribution of normal control and abnormal control samples in the pairing deviation value interval in the sample set. The setting basis is that when the feature dimension is 4, the pairing structure greater than 0.6 is mostly concentrated in the abnormal pairing area, and the threshold is slightly increased with the increase of the feature dimension. The feature value unit is normalized, so that the structure difference can be directly reflected in the amplitude level during pairing. If the value is less than the threshold, the feature and label combination structure tends to be consistent. The values between 0.4 and 0.6 are in the overlap area, so 0.6 is set as the deviation limit value under the current dimension. The actual input sample is as follows: the feature vector is [1.3, 0.8, 1.1, 0.7], the label is abnormal mutation, and the quantized label value is [1, 1, 1]. The calculation is as follows:
[0118]
[0119] The value represents the structural deviation intensity between the current feature and the label combination. The higher the value, the greater the deviation. By comparing it with the deviation reference value 0.6, it can be determined that the pairing structure of the sample shows a medium-strong deviation state, and tends to be classified into an abnormal structure sample. The pairing result is used as a difference marker for subsequent screening and modeling. The usefulness of the formula is that a nonlinear measurement structure is constructed by the difference combination between asymmetric features and labels, which avoids weakening the fluctuation characteristics by averaging, and amplifies the expression ability of discrete distribution in the pairing relationship, and finally generates a feature-label pairing group.
[0120] S313: Based on the feature-label pairing group, all feature vectors and corresponding control behavior labels are combined in a set according to the pairing result, a data structure that can be used for training tasks is established, and a control behavior training sample set is obtained.
[0121] According to the pairing result structure in the feature label pairing group, based on the feature vector and label combination in the pairing item, an ordered input structure is formed by recombining it in a sequential binding manner, that is, a control behavior training sample set is constructed. In the operation process, it is necessary to ensure that the feature dimension after pairing is completely reserved, and at the same time, there is no order dislocation or label drift in the label combination. The feature-label order consistency can be verified by a sample index verification mechanism. If the input index is sample number 1, 2, 3, the corresponding feature vector is [1.2, 0.6, 0.9, 0.8], [1.5, 1.0, 1.3, 0.9], [0.9, 0.5, 0.8, 0.6], and the corresponding label is 0, 1, 0 respectively, then the combined result can be written as three complete sample structures. The data table format is used for storage, and the column fields are number, feature vector and behavior label. Finally, the input sample set structure is packaged, and the control behavior training sample set is obtained.
[0122] Please refer to Figure 5 , the S4 step is:
[0123] S411: Based on the control behavior training sample set, the feature vector and the corresponding category label in the sample are extracted in sequence, and each level of neural unit in the neural network structure is input in sequence, a step-by-step conduction data structure is constructed, and a neuron input vector set is obtained.
[0124] Based on the control behavior training sample set, the feature vector in the sample and its corresponding category label need to be extracted. The feature vector is the multi-dimensional time series feature group generated in the previous step, which contains the difference, slope, fluctuation amplitude and other information of the pressure signal in each time period. In specific implementation, for example, select the pressure data sequence {102.5, 101.8, 100.6, 100.1, 99.8} kPa in a control period, use the sliding window to extract the first-order difference {-0.7, -1.2, -0.5, -0.3} kPa, the trend slope is -0.675, and the fluctuation interval average is 100.36 kPa. In actual construction of training samples, such numerical values are combined into a feature vector of length 4 [-0.7, -1.2, -0.5, -0.3]. If this data is determined to be "normal control induced pressure difference change" in the control label set, its corresponding label is 0, otherwise if it is "abnormal mutation behavior", its label is 1. All samples are organized in time sequence to construct a data stream. Each group of input data is aligned with the label input neural network neuron, preparing for the training stage. The feature vector dimension needs to be standardized during the process. The normalization operation controls the value range in the [0, 1] interval to ensure the stability of the subsequent network input layer. For example, the above data becomes [0.583, 1.0, 0.417, 0.25] after normalization. It and the label "0" form a sample input unit. The entire data set is organized into a two-dimensional input tensor by batch and input into the network structure. Finally, the neuron input vector set is obtained.
[0125] S412: According to the neuron input vector set, the output results of the input features after the activation of each layer of the network are compared item by item, the neural response change trend under different category labels is analyzed, the internal structure mode of the sequence is extracted, and the classification boundary response characteristics are obtained.
[0126] According to the neuron input vector set, the output value of each neuron needs to be calculated layer by layer according to the network structure. The network generally adopts a three-layer structure, each layer contains different number of neuron units, which correspond to feature extraction layer, feature transformation layer and output discrimination layer respectively. In practice, the input sample vector [0.583, 1.0, 0.417, 0.25] is input into the first layer of neurons for calculation. The output of each neuron is activated after weighted summation. For example, the calculation result of the first neuron in the first layer is z = 0.583 * w1 + 1.0 * w2 + 0.417 * w3 + 0.25 * w4 + b. In actual training, the initial weight is set as w = [0.4, -0.3, 0.2, 0.5] and the bias b = 0.1. The setting is based on the fact that the input feature is normalized and the value range is limited between [0, 1]. Therefore, the initial weight value needs to be kept in the same order of magnitude as the input to avoid the activation value out of control in the first forward propagation. At the same time, positive and negative weights are selected to simulate the pulling effect of different input dimensions on the output activation direction. Among them, 0.4, 0.2 and 0.5 correspond to the enhancement effect of difference, trend and fluctuation indicators. -0.3 is used to reflect the reverse guiding characteristics of a certain feature when the label is expected to be 0. The bias term is set to 0.1, which is based on the zero-centered output adjustment logic, that is, to make the neuron output deviate from 0 in a small range when not activated to facilitate the response stability of the activation function. This value fluctuates with the sample mean of the network depth and batch input, and needs to be fixed after testing the sample mean of multiple samples. The standard deviation of the sample mean is usually multiplied by 0.1 to determine the basic interval, and the output value after calculating the above weight and bias is
[0127] z = 0.583 * 0.4 + 1.0 * (-0.3) + 0.417 * 0.2 + 0.25 * 0.5 + 0.1 = 0.2332, the output value after activation function processing is used as the input of the next layer, and the operation process is repeated to form multiple layers of feature transformation, and the prediction output is generated in the last layer. Under different category sample inputs, the network activation path is different, and the response boundary exhibited at the output node also differs. The deviation between the true label and the output needs to be calculated. In practice, if the true label is 0 and the output value is 0.76, the error is 0.76. If the output is 0.21, the error is 0.21. It shows that the latter is better under the current network weight combination. Therefore, the neural response state under each weight combination is extracted and the corresponding error change trend is recorded to obtain the classification boundary response feature.
[0128] S413: According to the classification boundary response feature, compare the error value between the network output and the true label, select the network weight combination corresponding to the minimum error in each sample training round, extract the weight structure with the highest matching degree, and obtain the differential pressure recognition model parameter group;
[0129] According to the classification boundary response characteristics, in the error value set between each sample input and network output, the weight structure combination with the minimum error value is selected as the preferred path, and the parameter set with error lower than the given limit can be screened out by setting the error tolerance threshold, which can be set by the lower quartile value of the sample training round error distribution, for example, in a training, the error set of all samples is {0.76, 0.21, 0.53, 0.39, 0.11}, and the sorted error set is 0.11, 0.21, 0.39, 0.53, 0.76, then the lower quartile is 0.21, and the parameter combination with error lower than the value can be selected as the optimal parameter combination in the current training stage, and the corresponding weight matrix and bias value are recorded to establish the parameter combination structure and form the training network for subsequent identification inference stage, and finally the differential pressure identification model parameter combination is obtained.
[0130] Please refer to Figure 6 , S5 step is:
[0131] S511: acquiring real-time pressure sampling data in the operation process of the oil well, according to the sliding window structure set in the control associated differential pressure labeling set, the real-time data is cut into continuous window segments in the same window mode, and a time index structure is constructed for each segment to obtain a real-time sliding subsequence set;
[0132] Real-time pressure sampling data during oil well operation is acquired, based on pressure sensors arranged at the wellhead and the middle section of the oil pipe in actual production, real-time acquisition of a group of pressure values every second, sample frequency is 1 Hz, forming a pressure sequence {101.2, 100.8, 101.5, 102.1, 100.6, …}, through time stamping, the association between the data stream and the clock is established, then sliding segmentation operation is performed according to the sliding window structure defined in the control associated pressure difference marking set, if the sliding window length is 10 seconds and the step length is set to 5 seconds, the sequence is divided into multiple overlapping segments, for example, the first segment is from the 1st second to the 10th second, the second segment is from the 6th second to the 15th second, and so on, forming a real-time sliding sub-sequence set containing start and end time stamps, for each sub-sequence, the time axis sequence inside it is extracted, a data structure with window number as index and time start and end information as identifier is constructed, which is represented by array as {sub-sequence 1: [101.2, 100.8, 101.5, 102.1, 100.6, 101.3, 101.8, 101.1, 100.9, 101.4]}, then according to the time index matching sampling point corresponding period, the coverage time range of each sub-sequence is marked as “2025-03-31 10:00:00~10:00:09”, “2025-03-31 10:00:05~10:00:14” and the like, the data packet number and sampling source node are recorded synchronously at the data interface layer, the sub-sequence data continuity is verified through the sampling label sent by the collection end in real time, ensuring that the real-time data forms a continuous, complete and sequential sliding structure, combined with the actual background of the oil well operation stage (such as stable production stage, liquid discharge stage), the data sub-segment is bound to the production state, wherein the setting of “abnormal fluctuation lower limit value 95kPa” is determined based on the pressure interval fluctuation range monitored during the stable operation of the oil well liquid discharge stage, the minimum pressure in the stable state is usually not lower than 96.2kPa, considering the fluctuation tolerance, the threshold value is set to 1.5% downward, i.e. 95kPa, which has linkage fluctuation with the change of wellbore liquid level and pump speed stability in the stage, if the oil pressure sensor sampling value is continuously lower than 95kPa for 2 seconds, it is marked as an abnormal event segment, and finally the real-time sliding sub-sequence set based on the actual sliding window rule is constructed.
[0133] S512: Based on the real-time sliding sub-sequence set, the pressure feature of each sub-sequence is extracted in time sequence, a feature vector group consistent with the structure of the training stage is constructed, input into the pressure difference recognition model parameter group for forward prediction, identify the abnormal category time period in the prediction result, establish the abnormal time point index set, and calculate the amplitude of the pressure difference extreme value fluctuation in the window where the abnormal sample is located, obtain the abnormal predicted pressure difference amplitude value;
[0134] According to the real-time sliding sub-sequence set, for each pressure data point in the sequence, the time series difference feature, first-order trend, maximum and minimum difference, local average value, range index and other feature items are extracted in turn, and the feature vector format used in the training stage is constructed, for example: if the sub-sequence value is [101.2, 100.8, 101.5, 102.1, 100.6], the first-order difference is calculated as [-0.4, 0.7, 0.6, -1.5], the trend value is 0.225, the maximum value is 102.1, the minimum value is 100.6, and the range is 1.5, the average value is 101.24, and the feature vector T1 is constructed as [0.225, 1.5, 101.24], all the extracted feature items are spliced to form a vector set with consistent structure, and each feature vector is used for forward prediction operation by using the differential pressure identification model parameter group, and the response value of each output node is extracted through the network feedforward structure. In the model training, the abnormal category probability threshold is set to 0.7, which is based on the statistical distribution of the output probability of different categories of samples in the training set in the forward prediction. The maximum output probability of the normal class is mostly concentrated in the interval of 0.3-0.6, and the output probability of the abnormal class sample is mostly higher than 0.75 in the training stage. Therefore, 0.7 is set as the cutting boundary to ensure that most of the high-confidence abnormal samples are retained. This value is dynamically adjusted according to the proportion of abnormal classes in the sample set. If the probability score of the abnormal class in the model output is greater than 0.7, the window is marked as an abnormal class, for example, a sub-sequence corresponds to the output result: the normal class is 0.28, and the abnormal class is 0.72. The time period "2025-03-31 10:00:00~10:00:09" is marked as an abnormal class window, and the range value of the pressure change amplitude in the sequence is recorded as the fluctuation intensity result. The value is 102.1-100.6=1.5kPa. The sub-sequence number, start and end time and pressure fluctuation range are obtained, as shown in the following example:
[0135] Table 4 Real-time sub-sequence prediction identification table
[0136] Sub-sequence number Start time End time Pressure difference fluctuation value (kPa) 1 2025-03-3110:00:00 2025-03-3110:00:09 1.5 2 2025-03-3110:00:05 2025-03-3110:00:14 2.3 3 2025-03-3110:00:10 2025-03-3110:00:19 1.2
[0137] As shown in Table 4, the pressure fluctuation range of each sub-sequence is extracted, and the abnormal category is marked, which effectively supports the subsequent construction and output of the abnormal list.
[0138] S513: According to the abnormal prediction pressure difference amplitude value and the corresponding abnormal time point index set, the abnormal segment range is summarized and classified in time sequence, and the abnormal segment list structure is generated, and the oil well pressure abnormality real-time detection result is obtained;
[0139] According to the abnormal predicted pressure difference amplitude value and its corresponding abnormal time point index set, all abnormal category sub-sequences are merged and classified in time sequence, a start and end time and pressure difference amplitude based data entry list is constructed, by judging whether there is time continuity between adjacent abnormal windows, if the interval between them is less than half of the window length, they are merged into one abnormal record, such as sub-sequences 1 and 2, there is no gap between the time periods, and they are merged into “2025-03-31 10:00:00~10:00:14”, and the maximum pressure difference value in the two periods is selected as the representative pressure difference amplitude, that is, max(1.5, 2.3)=2.3kPa, at the same time, the well number, data source node and pressure sequence index information of the segment are recorded, and finally the abnormal list with standard structure is formed, the list fields include “abnormal segment number, start time, end time, abnormal type, pressure difference amplitude value, data source number”, according to the structure specification, and exported to the callable data structure, forming the oil well pressure abnormal real-time detection result.
[0140] An oil well pressure anomaly detection system based on deep learning, comprising:
[0141] The data processing module obtains the pump control start and stop signal and the valve control instruction timestamp, combines the time points in the pressure sampling sequence, calculates the pressure difference fluctuation value of adjacent sampling points, judges whether the pressure difference fluctuation is in the pump control response threshold interval, identifies the mutation position and marks the pressure difference mutation section, and obtains the control correlation pressure difference annotation set;
[0142] The feature extraction module obtains the pressure original sampling value in the corresponding time range according to the pressure difference mutation section in the control correlation pressure difference annotation set, constructs a sliding analysis window and calculates the first order difference, trend slope, sliding standard deviation and fluctuation interval average value, and generates a multi-dimensional time sequence feature group;
[0143] The sample construction module assigns labels to normal control and abnormal mutation behavior based on the multi-dimensional time sequence feature set and the control type information, pairs the feature vectors with the labels, and obtains a control behavior training sample set;
[0144] The deep learning training module inputs the feature vector into the neural unit in the deep learning network based on the control behavior training sample set, extracts the sequence internal change pattern, performs classification boundary mapping, selects the network weight parameter according to the minimum loss value, and obtains the pressure difference recognition model parameter set;
[0145] The real-time detection module obtains real-time pressure sampling data in the operation process of the oil well, combines the sliding window structure in the control correlation pressure difference annotation set, extracts the real-time data feature vector, uses the pressure difference recognition model parameter set for forward prediction calculation, marks the abnormal category time period, and generates the oil well pressure abnormal real-time detection result.
[0146] The above merely describes the preferred embodiments of the present application, and is not intended to limit the present application in other forms. Any skilled person in the art can modify or change the disclosed technical content into equivalent embodiments with equivalent changes, and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application, without departing from the technical solution content of the present application, still falls within the protection scope of the present application.
Claims
1. A deep learning-based oil well pressure anomaly detection method, characterized in that, The method comprises the following steps: S1: Obtain the pump control start-stop signal and the valve control instruction timestamp, calculate the slope difference and fluctuation based on the pressure sequence, mark the mutation point, and generate the control associated pressure difference annotation set in combination with the control behavior; The acquisition step of the control associated pressure difference annotation set is specifically: S111: Based on the pump control start-stop signal and the valve control instruction timestamp, extract the pressure sampling sequence time points corresponding thereto, calculate the pressure difference value change sequence between adjacent sampling points in a continuous time period, judge whether the difference between adjacent pressure differences falls within the pump control response threshold interval, mark the continuous interval that meets the threshold interval constraint condition, and obtain the pressure difference response interval segment; S112: According to the pressure difference response interval segment, extract the corresponding time points according to the extreme value position of the pressure difference value fluctuation, perform pressure difference jump discrimination processing on the continuous pressure difference sequence, and extract the jump point according to the sign directionality and numerical fluctuation rate calculation mode of the pressure difference sequence mutation, to generate a pressure difference mutation time point set; S113: According to the pressure difference mutation time point set, find the pressure difference response interval segment to which each jump point belongs, and use the formula: ; The control associated pressure difference intensity value corresponding to the interval of the pressure difference sudden change point is calculated The jump point and the interval information are bound by taking the control associated pressure difference intensity value as an index, and a control associated pressure difference labeling set is obtained, wherein, represents a pressure difference value at a th time point, is a sampling time stamp corresponding to the pressure difference value, represents the total number of pressure difference jump sections participating in calculation in the current pressure difference interval section; S2: Based on the control associated pressure difference annotation set, extract the pressure sequence window, calculate the first-order difference, trend slope, sliding standard deviation and fluctuation interval average value, and construct a multi-dimensional time sequence feature group; The acquisition step of the multi-dimensional time sequence feature group is specifically: S211: According to the pressure difference mutation segment marked in the control associated pressure difference annotation set, obtain the pressure original sampling value in the corresponding time range, position and extract according to the mutation segment time interval, divide the extracted sequence into multiple overlapping fragments according to the time axis, and obtain a sliding time segment sequence; S212: Based on the sliding time segment sequence, the pressure original sampling value in each time segment is respectively processed by first-order difference, trend slope calculation, sliding standard deviation calculation and fluctuation interval average calculation, to generate a pressure fluctuation feature value group corresponding to each time segment; S213: According to the pressure fluctuation feature value group, use the time sequence order corresponding to each feature group as an index, and use the formula: ; Computing multi-dimensional time series feature values All feature values are sequentially concatenated into a vector structure to establish a multi-dimensional time series feature group, wherein, represents the first first-order difference, represents the first trend slope, represents the first moving standard deviation, represents the first fluctuation interval average, represents the number of feature items in each moving time segment; S3: Based on the multi-dimensional time sequence feature group, according to the control type information of the corresponding sample in the control associated pressure difference annotation set, respectively assign labels and pair the feature vectors with the corresponding labels, and construct a control behavior training sample set; S4: Based on the feature vectors and class labels of the control behavior training sample set, input the neural units in the deep learning network structure in turn, extract the internal change mode and establish the classification boundary mapping, select the network weight parameters, and generate a pressure difference recognition model parameter group; S5: Obtain real-time pressure sampling data in the oil well operation process, extract feature vectors from real-time data, perform prediction calculation using the pressure difference recognition model parameter group, identify the pressure abnormality category time period, and generate an oil well pressure anomaly real-time detection result. 2.The deep learning-based oil well pressure anomaly detection method of claim 1, wherein, The control correlation differential pressure label set comprises a differential pressure mutation section, a mutation position label, a control response type, and a control time index. The multi-dimensional time sequence feature group comprises a time sequence structure feature, a statistical change indicator, a differential feature vector, and a local trend expression record. The control behavior training sample set comprises a behavior category label, a feature representation combination, and a classification sample unit. The differential pressure identification model parameter group comprises a deep feature mapping parameter, a classification boundary function, and an optimization objective function. The oil well pressure anomaly real-time detection result comprises an anomaly identification interval, a corresponding category identification, an anomaly time positioning, and a differential pressure anomaly amplitude. 3.The deep learning-based oil well pressure anomaly detection method of claim 1, wherein, The acquisition step of the control behavior training sample set is specifically as follows: S311: Based on the multi-dimensional time sequence feature group, the control type label information in the control correlation differential pressure label set is compared in combination with the sampling interval index corresponding to each time sequence feature, the corresponding control behavior attribute is identified, the label type of normal control or abnormal mutation is acquired, a control behavior label sequence is generated, and the control behavior training sample set is acquired. S312: According to the multi-dimensional time sequence feature group and the control behavior label sequence, the feature vector and the corresponding label position are extracted item by item, the sample unit is established in sequence, and the formula is used. ; Computing the pair-wise bias combination value of the , depicting the structural difference and deviation relationship between the feature dimensions, generating a feature label pair group, wherein, represents the numerical value of the first four dimensions in the feature vector, represents the label quantization value on the corresponding dimension. S313: Based on the feature label pairing group, all feature vectors and corresponding control behavior labels are combined in a set according to the pairing result, a data structure that can be used for training tasks is established, and the control behavior training sample set is acquired. 4.The deep learning-based oil well pressure anomaly detection method of claim 1, wherein, The acquisition step of the differential pressure identification model parameter group is specifically as follows: S411: Based on the control behavior training sample set, the feature vector and the corresponding category label in the sample are extracted in sequence, each level of neural unit in the neural network structure is input in sequence, a step-by-step conduction data structure is constructed, and a neuron input vector set is acquired. S412: According to the neuron input vector set, the output results of the input features after the activation of each layer of the network are compared item by item, the neural response change trend under different category labels is analyzed, the internal structure mode of the sequence is extracted, and a classification boundary response feature is acquired. S413: According to the classification boundary response feature, the error value between the network output and the real label is compared, the network weight combination corresponding to the minimum error is selected in each sample training round, the weight structure with the highest matching degree is extracted, and a differential pressure identification model parameter group is acquired. 5.The deep learning-based oil well pressure anomaly detection method of claim 1, wherein, The acquisition step of the oil well pressure anomaly real-time detection result is specifically as follows: S511: Real-time pressure sampling data in the oil well operation process is acquired, the real-time data is divided into continuous window segments in the same window mode according to the sliding window structure set in the control correlation differential pressure label set, a time index structure is constructed for each segment, and a real-time sliding subsequence set is obtained. S512: Based on the real-time sliding subsequence set, the pressure feature of each subsequence is extracted in time sequence, a feature vector group consistent with the structure in the training stage is constructed, the differential pressure identification model parameter group is input for forward prediction, the anomaly category time period in the prediction result is identified, an anomaly time point index set is established, the amplitude value of the differential pressure anomaly is acquired by calculating the amplitude value of the differential pressure extreme value fluctuation in the window where the anomaly sample is located, and the anomaly prediction differential pressure amplitude value is acquired. S513: According to the abnormal predicted pressure difference amplitude value and the corresponding abnormal time point index set, the abnormal segment range is summarized and classified in time sequence to generate an abnormal segment list structure, and an oil well pressure abnormality real-time detection result is obtained.
6. A deep learning-based oil well pressure anomaly detection system, characterized by, The system is used to execute the method of any one of claims 1-5, comprising: The data processing module obtains the pump control start-stop signal and the valve control instruction timestamp, combines the time points in the pressure sampling sequence, calculates the pressure difference fluctuation value of adjacent sampling points, judges whether the pressure difference fluctuation is in the pump control response threshold interval, identifies the mutation position and marks the pressure difference mutation segment, and obtains the control correlation pressure difference annotation set; The feature extraction module obtains the pressure original sampling value in the corresponding time range according to the pressure difference mutation segment in the control correlation pressure difference annotation set, constructs a sliding analysis window and calculates the first-order difference, trend slope, sliding standard deviation and fluctuation interval average value, and generates a multi-dimensional time sequence feature group; The sample construction module assigns labels to normal control and abnormal mutation behavior based on the multi-dimensional time sequence feature set and the control type information, pairs the feature vectors with the labels, and obtains a control behavior training sample set; The deep learning training module inputs the feature vector into the neural unit in the deep learning network based on the control behavior training sample set, extracts the sequence internal change pattern, performs classification boundary mapping, selects network weight parameters according to the minimum loss value, and obtains a pressure difference recognition model parameter set; The real-time detection module obtains real-time pressure sampling data in the oil well operation process, combines the sliding window structure in the control correlation pressure difference annotation set, extracts the real-time data feature vector, performs forward prediction calculation using the pressure difference recognition model parameter set, marks the abnormal category time period, and generates an oil well pressure abnormality real-time detection result.
Citation Information
Patent Citations
Digital twinborn modeling and predictive analysis system for oil and gas well
CN119090089A
Pre-alarming method, control method and control system for harmful flow pattern in oil and gas pipeline-riser system
US20220034455A1