An oil production system fault diagnosis method and system based on artificial intelligence
By constructing a multi-channel feature difference map and a multi-scale contrastive learning neural network model, the robustness and accuracy of existing oil production system fault diagnosis methods under complex working conditions are solved, and the automated identification and reliable hierarchical diagnosis of oil production system faults are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF PETROLEUM (EAST CHINA)
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-17
AI Technical Summary
Existing fault diagnosis methods for oil production systems rely on human experience and expert rules, making it difficult to achieve early identification and reliable classification diagnosis of weak faults under unlabeled, multi-well parallel, and complex operating conditions. In particular, the robustness and accuracy of diagnosis are insufficient under conditions of inter-well differences and operating condition disturbances.
By constructing multi-channel feature difference maps between target wells and comparison wells, extracting stable migration patterns using a multi-scale comparative learning neural network model, and combining this with an adaptive perturbation artifact removal mechanism, the system achieves automated perception and accurate identification of oil production system faults.
It improves the sensitivity and reliability of fault diagnosis in oil production systems under complex operating conditions, and realizes reliable classification and judgment of faults in oil production systems and quantitative output of diagnostic confidence.
Smart Images

Figure CN121637101B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of petroleum engineering technology, and in particular relates to a method and system for fault diagnosis of oil production systems based on artificial intelligence. Background Technology
[0002] In the development of oil and gas fields, the production system, as a crucial link connecting downhole production and surface gathering and transportation, directly affects the stability of well production and the safety of equipment operation. As oil fields enter the mid-to-late stages of development, well conditions become increasingly complex, equipment ages, and operating conditions fluctuate frequently. Production system faults gradually exhibit characteristics such as diverse types, concealed features, and gradual evolution. In particular, weak faults often exist as small deviations over extended periods; if not identified in time, they can easily develop into serious faults, resulting in well shutdown losses and increased maintenance costs.
[0003] Existing fault diagnosis methods for oil production systems largely rely on human experience, expert rule bases, or traditional supervised machine learning models. These methods not only heavily depend on human experience and prior rules, but also have limited applicability in real-world scenarios involving multiple wells operating in parallel, heterogeneous data, and a lack of fault labels. Furthermore, these methods suffer from insufficient robustness and accuracy when faced with inter-well variations, operational disturbances, and unclear weak fault characteristics, making it difficult to achieve continuous quantitative assessment and reliability determination of faults.
[0004] In summary, how to achieve early identification, stability differentiation, and reliable classification diagnosis of weak faults in oil production systems under conditions of no labels, multi-well comparison, and complex disturbances has become an urgent technical problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical issues, this application proposes an artificial intelligence-based method and system for fault diagnosis of oil production systems. By simultaneously acquiring operating signals from the target well and similar comparison wells, modeling differentiated features, conducting multi-scale comparative learning analysis, and collaboratively designing an adaptive process for eliminating disturbance artifacts, the system achieves automated perception of the operating status of oil production wells and accurate identification of weak faults. This improves the sensitivity, reliability, and confidence level of fault diagnosis in oil production systems under complex operating conditions and multi-source disturbances.
[0006] To achieve the above objectives, the first aspect of this application provides a method for fault diagnosis of an oil production system based on artificial intelligence, comprising the following steps:
[0007] Step S1: Based on the synchronous operation signals of the target well and its comparison well, construct a multi-channel feature difference map to characterize the difference in their operating states.
[0008] Step S2: Input the multi-channel feature difference map into the multi-scale contrastive learning neural network model to obtain the fault score of the target well;
[0009] Step S3: Based on the time evolution trend characteristics of the fault score, perform similarity matching with the preset disturbance template to obtain the current fault level determination result and its diagnostic confidence of the target well.
[0010] In some embodiments, the method for constructing a multi-channel feature difference map is as follows:
[0011] Extract the standardized operating signal matrix of the target well and its comparison well within the time window T, and combine the standardized operating signal matrix according to the well pair relationship to obtain unlabeled sample pairs;
[0012] For the unlabeled sample pairs, the mean difference in offset, the difference in fluctuation amplitude, and the phase difference of the operating signals of the target well and each comparison well within the time window T are calculated channel by channel.
[0013] By combining the correlation structure between operating signals and the coupling characteristics of cross-well signals, a correlation matrix between operating signals is constructed, and the deviation of the inter-well coupling structure is calculated based on the correlation matrix.
[0014] The deviation of the coupling structure is combined with the mean difference of the offset, the difference of the fluctuation amplitude, and the phase difference to obtain a multi-channel feature difference map.
[0015] In some embodiments, the method for generating the standardized operating signal matrix is as follows:
[0016] The operating signals of the target well and each production well are collected synchronously within the time window T;
[0017] Extract the geological attributes, well structure, and operating condition parameters of the target well and each production well to form a corresponding static feature description;
[0018] Based on the static feature description, the static feature similarity between each oil well and the target well is calculated, and the oil wells with a static feature similarity not lower than a preset similarity threshold are identified as the comparison wells of the target well.
[0019] The operating signals of the target well and its comparison wells are normalized and a uniform time step is set. The operating signals of each oil well acquired at different sampling frequencies are resampled to a uniform time axis and time alignment is performed by linear interpolation.
[0020] For the running signal after normalization and time alignment, according to Outlier detection and removal are carried out in accordance with the principle;
[0021] A standardized operation signal matrix is constructed based on the operation signal that has completed the anomaly removal process.
[0022] In some embodiments, the operating signals include current, voltage, wellhead pressure, sucker rod vibration acceleration, and wellbore fluid level.
[0023] In some embodiments, step S2 specifically includes:
[0024] Step S21: Input the multi-channel feature difference map into a multi-scale contrastive learning neural network model to extract stable shift patterns that persist across multiple time scales.
[0025] Step S22: Based on the stable offset mode, generate a fault score value to characterize the degree of abnormality in the current operating state of the target well.
[0026] In some embodiments, step S21 specifically includes:
[0027] Construct sample pairs of the target well and its comparison wells, and input the corresponding multi-channel feature difference maps into a multi-scale contrastive learning neural network model for feature encoding to obtain the corresponding embedding vectors;
[0028] Positive and negative sample pairs are constructed based on the embedded vector, wherein: the sample pair consisting of the target well and the normally operating comparison well is used as the positive sample pair, and the sample pair consisting of the target well and the randomly selected well is used as the negative sample pair;
[0029] The cosine similarity between the embedding vectors in positive and negative sample pairs is calculated separately, and the embedding representation space is optimized based on the improved NT-Xent contrastive loss function.
[0030] By minimizing the contrastive loss function, positive and negative sample pairs form a distinguishable distance distribution in the embedding representation space;
[0031] Calculate the average distance between the target well embedding vector and the corresponding normal operating comparison well embedding vector. If the average distance is consistently greater than the stable offset identification threshold and the duration is greater than the minimum duration window, it is determined to be a stable offset mode.
[0032] In some embodiments, step S22 specifically includes:
[0033] For the target well and the comparison well pair that have been determined to be in a stable migration mode, the corresponding difference indexes are extracted for each channel to construct the degree of migration for each channel;
[0034] For each channel, the degree of offset and the duration of offset are weighted and fused according to the sensitivity weight of that channel to obtain a channel-level fault score;
[0035] All channel-level fault scores are aggregated to obtain the fault score value of the target well.
[0036] In some embodiments, step S3 specifically includes:
[0037] The fault score of the target well is constructed into a score time series, and the score time series is smoothed by the sliding window method to obtain the moving average score of the target well. At the same time, the corresponding score change rate is calculated.
[0038] The rate of change of the scores is normalized to obtain the normalized rate of change of scores;
[0039] Construct a perturbation feature template to characterize the score fluctuation feature pattern under normal operating conditions;
[0040] The normalized score change rate is matched with the disturbance feature template and the matching degree is calculated. When the matching degree is greater than the preset score fluctuation similarity judgment threshold, the current score fluctuation of the target well is determined to conform to the normal working condition disturbance fluctuation mode; otherwise, it is determined to be an abnormal fluctuation.
[0041] The time windows belonging to the normal operating condition disturbance mode are removed from the scoring time series to obtain the effective scoring time series after removing disturbance artifacts.
[0042] Based on the effective scoring time series, calculate the current fault level of the target well and output the corresponding diagnostic confidence level.
[0043] In some embodiments, the fault level is represented as:
[0044]
[0045] in, For the target well The fault level, The threshold for scoring minor faults. The threshold for severe fault scoring, For the target well Fault score;
[0046] The diagnostic confidence level is the credibility of the fault level judgment, which is obtained by performing an exponentially weighted average of the rate of change of scores at each time point within the effective scoring time series.
[0047] In a second aspect, this application provides an artificial intelligence-based fault diagnosis system for oil production systems, used to implement the aforementioned fault diagnosis method for oil production systems, comprising the following modules:
[0048] The data acquisition module is used to acquire the operating signals of the target well and multiple oil wells in the oil production block within the same time window;
[0049] The feature processing module generates a multi-channel feature difference map based on the running signal;
[0050] The fault identification module includes a multi-scale contrastive learning neural network model, used to receive the multi-channel feature difference map and obtain the fault score value of the target well;
[0051] The fault determination module is used to perform time series trend analysis on the fault score value and output the fault level determination result of the target well and the corresponding diagnostic confidence level.
[0052] Compared with the prior art, the advantages and positive effects of this application are as follows:
[0053] 1) This invention constructs unlabeled sample pairs based on the synchronous operation signals of the target well and its comparison well. By extracting differentiated features from the multi-source operation signals, a multi-channel feature difference map is formed to characterize the differences in the operation status between wells. Thus, without the need for manual labeling or expert prior knowledge, the automatic modeling of the differences in the operation of the oil production system is realized, which improves the applicability and generalization ability in unlabeled and complex working conditions.
[0054] 2) This invention inputs multi-channel feature difference maps into a multi-scale contrastive learning neural network model. Through the contrast constraint of cross-well sample pairs, it extracts stable operating offset patterns at different time scales and generates fault score values by comprehensively considering the degree of offset, duration, and channel sensitivity. This effectively suppresses the interference caused by operating condition fluctuations and improves the accuracy and stability of weak fault identification.
[0055] 3) Based on the time evolution trend of fault score values, this invention introduces a disturbance template similarity matching mechanism to identify and eliminate non-fault fluctuations in the score time series, thereby realizing a reliable determination of the current fault level of the target well and a quantitative output of diagnostic confidence, improving the robustness and engineering practical value of the overall fault diagnosis results. Attached Figure Description
[0056] Figure 1 This is a flowchart of the artificial intelligence-based oil production system fault diagnosis method in the embodiments of this application;
[0057] Figure 2 This is a block diagram of an artificial intelligence-based oil production system fault diagnosis system in an embodiment of this application. Detailed Implementation
[0058] The present application will now be described in detail through exemplary embodiments. However, it should be understood that, without further description, elements, structures, and features in one embodiment may be advantageously incorporated into other embodiments.
[0059] In a broad embodiment of the present invention, an artificial intelligence-based method for diagnosing faults in an oil production system includes the following steps:
[0060] Step S1: Based on the synchronous operation signals of the target well and its comparison well, construct a multi-channel feature difference map to characterize the difference in their operating states.
[0061] Step S2: Input the multi-channel feature difference map into the multi-scale contrastive learning neural network model to obtain the fault score of the target well;
[0062] Step S3: Based on the time evolution trend characteristics of the fault score, perform similarity matching with the preset disturbance template to obtain the current fault level determination result and its diagnostic confidence of the target well.
[0063] In some embodiments, the method for constructing a multi-channel feature difference map is as follows:
[0064] Extract the standardized operating signal matrix of the target well and its comparison well within the time window T, and combine the standardized operating signal matrix according to the well pair relationship to obtain unlabeled sample pairs;
[0065] For the unlabeled sample pairs, the mean difference in offset, the difference in fluctuation amplitude, and the phase difference of the operating signals of the target well and each comparison well within the time window T are calculated channel by channel.
[0066] By combining the correlation structure between operating signals and the coupling characteristics of cross-well signals, a correlation matrix between operating signals is constructed, and the deviation of the inter-well coupling structure is calculated based on the correlation matrix.
[0067] The deviation of the coupling structure is combined with the mean difference of the offset, the difference of the fluctuation amplitude, and the phase difference to obtain a multi-channel feature difference map.
[0068] In some embodiments, the method for generating the standardized operating signal matrix is as follows:
[0069] The operating signals of the target well and each production well are collected synchronously within the time window T;
[0070] Extract the geological attributes, well structure, and operating condition parameters of the target well and each production well to form a corresponding static feature description;
[0071] Based on the static feature description, the static feature similarity between each oil well and the target well is calculated, and the oil wells with a static feature similarity not lower than a preset similarity threshold are identified as the comparison wells of the target well.
[0072] The operating signals of the target well and its comparison wells are normalized and a uniform time step is set. The operating signals of each oil well acquired at different sampling frequencies are resampled to a uniform time axis and time alignment is performed by linear interpolation.
[0073] For the running signal after normalization and time alignment, according to Outlier detection and removal are carried out in accordance with the principle;
[0074] A standardized operation signal matrix is constructed based on the operation signal that has completed the anomaly removal process.
[0075] In some embodiments, the operating signals include current, voltage, wellhead pressure, sucker rod vibration acceleration, and wellbore fluid level.
[0076] In some embodiments, step S2 specifically includes:
[0077] Step S21: Input the multi-channel feature difference map into a multi-scale contrastive learning neural network model to extract stable shift patterns that persist across multiple time scales.
[0078] Step S22: Based on the stable offset mode, generate a fault score value to characterize the degree of abnormality in the current operating state of the target well.
[0079] In some embodiments, step S21 specifically includes:
[0080] Construct sample pairs of the target well and its comparison wells, and input the corresponding multi-channel feature difference maps into a multi-scale contrastive learning neural network model for feature encoding to obtain the corresponding embedding vectors;
[0081] Positive and negative sample pairs are constructed based on the embedded vector, wherein: the sample pair consisting of the target well and the normally operating comparison well is used as the positive sample pair, and the sample pair consisting of the target well and the randomly selected well is used as the negative sample pair;
[0082] The cosine similarity between the embedding vectors in positive and negative sample pairs is calculated separately, and the embedding representation space is optimized based on the improved NT-Xent contrastive loss function.
[0083] By minimizing the contrastive loss function, positive and negative sample pairs form a distinguishable distance distribution in the embedding representation space;
[0084] Calculate the average distance between the target well embedding vector and the corresponding normal operating comparison well embedding vector. If the average distance is consistently greater than the stable offset identification threshold and the duration is greater than the minimum duration window, it is determined to be a stable offset mode.
[0085] In some embodiments, step S22 specifically includes:
[0086] For the target well and the comparison well pair that have been determined to be in a stable migration mode, the corresponding difference indexes are extracted for each channel to construct the degree of migration for each channel;
[0087] For each channel, the degree of offset and the duration of offset are weighted and fused according to the sensitivity weight of that channel to obtain a channel-level fault score;
[0088] All channel-level fault scores are aggregated to obtain the fault score value of the target well.
[0089] In some embodiments, step S3 specifically includes:
[0090] The fault score of the target well is constructed into a score time series, and the score time series is smoothed by the sliding window method to obtain the moving average score of the target well. At the same time, the corresponding score change rate is calculated.
[0091] The rate of change of the scores is normalized to obtain the normalized rate of change of scores;
[0092] Construct a perturbation feature template to characterize the score fluctuation feature pattern under normal operating conditions;
[0093] The normalized score change rate is matched with the disturbance feature template and the matching degree is calculated. When the matching degree is greater than the preset score fluctuation similarity judgment threshold, the current score fluctuation of the target well is determined to conform to the normal working condition disturbance fluctuation mode; otherwise, it is determined to be an abnormal fluctuation.
[0094] The time windows belonging to the normal operating condition disturbance mode are removed from the scoring time series to obtain the effective scoring time series after removing disturbance artifacts.
[0095] Based on the effective scoring time series, calculate the current fault level of the target well and output the corresponding diagnostic confidence level.
[0096] In some embodiments, the fault level is represented as:
[0097]
[0098] in, For the target well The fault level, The threshold for scoring minor faults. The threshold for severe fault scoring, For the target well Fault score;
[0099] The diagnostic confidence level is the credibility of the fault level judgment, which is obtained by performing an exponentially weighted average of the rate of change of scores at each time point within the effective scoring time series.
[0100] The purpose of this application is also to provide an artificial intelligence-based oil production system fault diagnosis system for implementing the above-mentioned oil production system fault diagnosis method, including the following modules:
[0101] The data acquisition module is used to acquire the operating signals of the target well and multiple oil wells in the oil production block within the same time window;
[0102] The feature processing module generates a multi-channel feature difference map based on the running signal;
[0103] The fault identification module includes a multi-scale contrastive learning neural network model, used to receive the multi-channel feature difference map and obtain the fault score value of the target well;
[0104] The fault determination module is used to perform time series trend analysis on the fault score value and output the fault level determination result of the target well and the corresponding diagnostic confidence level.
[0105] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0106] like Figure 1 As shown, an artificial intelligence-based fault diagnosis method for oil production systems includes the following steps:
[0107] Step S1: Based on the synchronous operation signals of the target well and its comparison well, construct a multi-channel feature difference map to characterize the difference in their operating states.
[0108] Step S2: Input the multi-channel feature difference map into the multi-scale contrastive learning neural network model to obtain the fault score of the target well;
[0109] Step S3: Based on the time evolution trend characteristics of the fault score, perform similarity matching with the preset disturbance template to obtain the current fault level determination result and its diagnostic confidence of the target well.
[0110] The aforementioned AI-based fault diagnosis method for oil production systems in this application constructs a multi-channel feature difference map between the synchronous operation signals of the target well and the comparison wells to achieve a refined characterization of the differences in operating states between wells. By introducing a multi-scale contrastive learning neural network model, the feature difference map is analyzed across time scales to stably extract weakly fault-related offset patterns and output fault scores. Based on this, combined with the temporal evolution trend of the fault scores and a disturbance template similarity matching mechanism, non-fault-type operating condition disturbances are effectively eliminated, enabling reliable determination of oil well fault levels and quantification of diagnostic confidence. This significantly improves the sensitivity, robustness, and engineering practicality of fault diagnosis in oil production systems under complex operating conditions.
[0111] Furthermore, the method for constructing the multi-channel feature difference map is as follows:
[0112] Extracting target wells and its comparison well In the same time window Standardized operating signal matrix within , To form unlabeled sample pairs Each sample pair corresponds to a set of channel pairs, such as target well current vs. comparison well current, target well fluid level vs. comparison well fluid level, etc.
[0113] For each channel In the time window Calculate the difference index separately, including the mean difference of the offset. Fluctuation range difference and phase difference , represented as:
[0114]
[0115]
[0116]
[0117] in, , Channels Upward target well , comparison well The signal mean; , Channels Upward target well , comparison well Standard deviation; , Target wells , comparison well In the passage Up to the time point Standardized operating signal values; Maximum permissible phase lag; Indicates the comparison well The operating signal relative to the target well Phase lag; For comparison wells In the passage Above the time point through The normalized operating signal value after offset; ;
[0118] Considering the physical coupling relationship between operating signals, a correlation matrix between operating signals is constructed, and the deviation of the coupling structure between wells is calculated. and the difference from the mean offset Fluctuation range difference and phase difference Combined generation of multi-channel feature difference maps , represented as:
[0119]
[0120]
[0121]
[0122] in, , Target wells , comparison well The signal correlation matrix, For the Frobenius norm, This represents the total number of channels.
[0123] The multi-channel feature difference map construction method described in this application standardizes and synchronizes the multi-source operating signals of the target well and the comparison well within a unified time window to form unlabeled inter-well sample pairs, thereby achieving comparability modeling of cross-well operating state differences. By jointly extracting difference indices such as mean difference of offset, difference of fluctuation amplitude, and difference of phase on each operating channel, and introducing the inter-well coupling structure deviation degree based on the correlation matrix, the method comprehensively characterizes the differences in amplitude, fluctuation characteristics, and time sequence structure of inter-well operating signals. On this basis, the multi-dimensional difference indices are uniformly combined to generate a multi-channel feature difference map for characterizing the differences in operating states between the target well and the comparison well, thereby providing feature inputs that are informative, structurally stable, and physically meaningful for subsequent weak fault identification.
[0124] Furthermore, the method for generating the standardized operating signal matrix is as follows:
[0125] Data acquisition units are deployed at the target well and multiple production wells within its production block. These units, connected to the SCADA system via an edge gateway, synchronously acquire operational signals from the target well and each production well within a time window T, as shown below:
[0126]
[0127] in, For the first Koujing in time The multidimensional operating signal vector, The first The working current, supply voltage, wellhead pressure, longitudinal vibration acceleration of the sucker rod, and fluid level in the wellbore at time t; This represents the number of oil wells simultaneously collected by the edge gateway and SCADA system within the current time window. For the well number index;
[0128] Extract the static feature set of the target well and each production well. ,in, For the first A set of static characteristics of a well; For the first The geological properties of the well, such as the thickness of the oil layer and lithology; For the first Well structure parameters, such as pump type and sucker rod type; For the first Current operating status parameters of the well, such as start-up / shutdown cycle and load rate; by constructing a comprehensive similarity index. Measure the target well With well The degree of static feature matching, if , then well Selected as target well The comparison sample, i.e., the comparison wells, among which, The similarity threshold is set to 0.9. Represented as:
[0129]
[0130] in, The cosine similarity function; This is the weighting coefficient of geological attribute similarity in the comprehensive similarity index, used to reflect the intensity of the influence of geological conditions on inter-well comparability; The weighting coefficients for the similarity of well-shaped structures; The weight of operational status similarity in the comprehensive similarity index; Representing the target wells With the Geological attribute feature vector of the wellhead; Representing the target wells With the Well type and equipment structure feature vectors of the well; Representing the target wells With the The current operating status parameter vector of the well;
[0131] For the target well and its comparison wells, linear minimum-maximum normalization was used to normalize the acquired operational signals, and a uniform time step was set. The operating signals of each oil well acquired at different sampling frequencies are resampled to a unified time axis, and time alignment is achieved through linear interpolation, as shown below:
[0132]
[0133] in, The normalized running signal , These represent the minimum and maximum values of the signal for that well within the sliding window, respectively.
[0134] Execute the normalized running signal The principle of exception removal is represented as:
[0135]
[0136] in, This is the operating signal after abnormal cleaning; , These are the average value and standard deviation of the signal in the current well, respectively; This means: first mark it as NaN, then perform interpolation repair processing;
[0137] Based on the operational signals after anomaly removal, a standardized operational signal matrix is constructed. , represented as:
[0138]
[0139] In the formula, To unify the sampling time sequence on the discrete time axis, the time step is... ; For the first Koujing at the time point Standardized cleaning current value for operation; For the first Koujing at the time point Standardized cleaning value for power supply voltage; For the first Koujing at the time point Standardized cleaning values for wellhead pressure; For the first Koujing at the time point Standardized cleaning value of longitudinal vibration acceleration of sucker rod; For the first Koujing at the time point Standardized cleaning values for wellbore fluid level height.
[0140] The standardized operation signal matrix generation method described in this application achieves collaborative acquisition of multi-source heterogeneous operation data within a unified time window by synchronously acquiring operation signals of the target well and multiple production wells through an edge gateway and SCADA system. By introducing a static feature similarity assessment mechanism that integrates geological attributes, well structure, and operating conditions, it automatically selects comparison wells with high comparability to the target well, ensuring the physical rationality and comparative effectiveness of the inter-well sample construction. Based on this, the operation signals are normalized, resampled over time, and outlier removed to construct a standardized operation signal matrix that is time-aligned, noise-suppressed, and scale-consistent, thereby providing a stable and reliable data foundation for subsequent multi-channel differential feature extraction and weak fault identification.
[0141] Furthermore, step S2 includes the following steps:
[0142] Step S21: Input the multi-channel feature difference map into a multi-scale contrastive learning neural network model to extract stable migration patterns that persist across multiple time scales.
[0143] Step S22: Based on the stable offset mode, generate a fault score value to characterize the degree of abnormality in the current operating state of the target well.
[0144] The above-mentioned process steps of this application input multi-channel feature difference maps into a multi-scale contrastive learning neural network model to stably extract the continuous operational offset patterns of the target well at different time scales, and on this basis generate a fault score value for quantitatively characterizing the degree of abnormality in the operational status of the target well, thereby providing a reliable basis for subsequent fault determination.
[0145] Furthermore, step S21 specifically includes:
[0146] S211, with target well Comparison with its corresponding multiple normally operating wells The sample pairs will be used to construct multi-channel feature difference maps. As input samples, feature encoding of multi-channel feature difference maps is performed using a multi-scale contrastive learning neural network model to obtain embedding vectors. , represented as:
[0147]
[0148] in, For the target well Comparison wells with normal operation The resulting multi-channel feature difference map; , , This refers to the weight matrix corresponding to each encoding layer in a multi-scale contrastive learning neural network. , , This is the corresponding bias vector; , , It is a non-linear activation function; The embedding vector, obtained by encoding the multi-channel feature difference map through a network, is used to characterize the target well. Compared to normal operating comparison wells State differences characteristics;
[0149] S212, embedding vectors for each target well sample Construct positive pairs (target well vs. normal wells in the same area) and negative pairs (target well vs. randomly selected wells), and calculate the cosine similarity between the embedded vectors. And based on the improved NT-Xent contrastive loss function, the representation space is optimized, as follows:
[0150]
[0151]
[0152] in, , These are the embedding vectors of the two input samples, respectively. Indicates the target well The contrastive loss value calculated during training; For the target well Embedded vector, To be related to the target well Paired positive sample embedding vectors, To be related to the target well The constructed negative sample embedding vector, Temperature coefficient;
[0153] S213, During training, the multi-scale contrastive learning neural network model minimizes the contrastive loss function to create distance between positive and negative sample pairs in the representation space. During inference, for the embedding vector of the target well... If its average distance from the normal well embedding vector is consistently greater than the stable offset identification threshold, And the duration is greater than the minimum duration window number. If the mode is stable, it is considered a stable offset mode, and is represented as:
[0154]
[0155]
[0156] in, Indicates the target well Comparison well Are there stable feature shifts between them? This represents the average embedding vector distance between each well pair across multiple time windows. To stabilize the offset identification threshold, For the minimum duration window number, For comparison wells Its own embedding vector, This represents the number of feature difference map sample pairs.
[0157] The above-described process steps of this application involve inputting a multi-channel feature difference map composed of the target well and multiple normally operating comparison wells into a multi-scale contrastive learning neural network model to obtain embedding vectors that can characterize the differences in operating states between wells; by constructing positive and negative sample pairs and introducing an improved contrastive loss function, the feature representation space is constrained, so that stable operating differences can be effectively distinguished in the embedding space; on this basis, by continuously judging the distance between the embedding vectors, the stable offset pattern of the target well relative to the normal baseline in the long term is identified, thereby providing a reliable and robust feature basis for subsequent weak fault quantification assessment.
[0158] Furthermore, step S22 includes the following steps:
[0159] S221, For the target well and the comparison well pair that have been determined to be in a stable migration mode, extract the corresponding difference index for each channel to construct the migration degree of each channel. , represented as:
[0160]
[0161] in, , , These are the difference in mean offset, the difference in fluctuation amplitude, and the difference in phase, respectively. , , , These are the corresponding weighting coefficients;
[0162] S222, for each channel, the offset degree Offset duration and channel sensitivity weights Perform weighted fusion to construct a channel-level fault score. , represented as:
[0163]
[0164] in, This represents the total number of sliding time windows;
[0165] S223, score all channel-level faults Aggregated into fault score values , represented as:
[0166]
[0167] in, This represents the number of signal channels.
[0168] Channel sensitivity weight The response characteristics of each operating signal channel to early-stage anomalies in historical fault samples are set. These response characteristics comprehensively consider the early offset significance, offset stability, and anti-interference ability of the corresponding channel to normal operating conditions. Specifically, the average offset amplitude, duration ratio, and signal-to-noise ratio of channels such as operating current, wellbore fluid level, wellhead pressure, power supply voltage, and sucker rod vibration acceleration in the initial stage of the fault are statistically analyzed. Based on these statistical results, the sensitivity weight of each channel is normalized.
[0169] The above-mentioned process steps of this application, based on the determination of stable offset mode, integrate the mean difference of offset, the difference of fluctuation amplitude and the phase difference of each channel to quantify the offset degree of each operating channel; and combine the offset duration and channel sensitivity weight to construct a channel-level fault score. Finally, the multi-channel score results are aggregated to obtain the overall fault score value of the target well, thereby realizing a continuous and quantitative characterization of the abnormality of the oil production system operation and providing a reliable basis for subsequent fault classification and determination.
[0170] Step S3 includes the following steps:
[0171] S31, target well Fault rating As a time series, trend analysis was performed, and the rating series was smoothed using the sliding window method to obtain its moving average rating. And calculate the rate of change in scores. This is used to detect significant fluctuations in scores, and is represented as:
[0172]
[0173]
[0174] Among them, among them, For window size, These are time points in a time series; For the target well At the point of time Fault score;
[0175] S32, Constructing the perturbation feature template This represents the characteristic pattern of score fluctuation under normal operating conditions, using normalized score change rate and disturbance feature template. Perform similarity matching and calculate similarity. ,like The similarity threshold for score fluctuation is greater than the threshold. , If the value is set to 0.85, the current score fluctuation is considered to be within the normal operating condition range, i.e., a disturbance artifact; otherwise, it is considered an abnormal fluctuation, expressed as follows:
[0176]
[0177] in, For the target well Rate of change in ratings Cosine similarity to the perturbation template M.
[0178] S33: Calculate the current fault level and output the diagnostic confidence score for the scoring sequence after removing perturbation artifacts.
[0179] Fault levels are represented as follows:
[0180]
[0181] in, For the target well The fault level, The threshold for scoring minor faults. The threshold for scoring severe faults;
[0182]
[0183]
[0184] in, , These represent the mean and standard deviation of the fault score sample set for all target wells, respectively. , These are the corresponding adjustment factors;
[0185] Diagnostic confidence The reliability of the fault level assessment is indicated by the rate of change of the score at each point within the effective time window. The result is obtained by performing an exponentially weighted average, expressed as:
[0186]
[0187] in, The set of time points within the effective time window. Set of time points The number of time points, i.e., the total number of valid time points. These are the exponential weighting coefficients.
[0188] The above-mentioned process steps of this application characterize the dynamic evolution of the scoring by performing smoothing trend analysis and rate of change calculation on the time series of the target well fault scores; by introducing disturbance feature templates and performing similarity matching, disturbance artifacts caused by fluctuations in normal operating conditions are effectively identified and eliminated; on this basis, the fault level of the effective scoring sequence is determined and the diagnostic confidence is quantitatively output, thereby achieving stable differentiation and reliable assessment of the fault status of oil wells and improving the accuracy of the diagnostic results.
[0189] Among them, the perturbation feature template The construction method is as follows:
[0190] Sample collection and label screening: Screen historical records with clear operation event labels in the well control system database, such as pump start-up, pump shutdown, flow regulation, etc. For each record, extract its corresponding fault score value, and classify these samples into a candidate disturbance sequence set.
[0191] (2) Perturbation sequence standardization and alignment: Normalize each candidate perturbation sequence, as follows:
[0192]
[0193] in, , They are respectively perturbation sequences Mean and standard deviation within the time window; for At the point of time The original score; This is the normalized perturbation score;
[0194] Resample the timeline linearly to a uniform length. This forms a set of perturbation samples after standard alignment. Represented as: ,in, Indicates the perturbation sequence The score value after normalization and linear resampling;
[0195] (3) Disturbance feature template Generation: The average template method is used to generate the perturbation feature template by taking the average of the points in all aligned perturbation sample sequences. , represented as:
[0196]
[0197] In the formula, This represents the total number of perturbed sample sequences; This is the set of perturbation samples.
[0198] The disturbance feature template construction method described in this application forms a candidate disturbance sample set by screening scoring sequences with clear operational event labels from historical data of the well control system; by standardizing and aligning the disturbance sequences with the time axis, the influence of amplitude differences and inconsistent time lengths is eliminated; on this basis, the average template method is used to generate disturbance feature templates that characterize the disturbance features of normal operation, thereby providing a stable and reliable reference benchmark for the similarity judgment of subsequent scoring fluctuations, and effectively supporting the identification and elimination of disturbance artifacts in the fault diagnosis process.
[0199] like Figure 2 As shown, an artificial intelligence-based oil production system fault diagnosis system is used to implement the aforementioned artificial intelligence-based oil production system fault diagnosis method, and includes the following modules:
[0200] Data acquisition module: acquires the operating signals of multiple oil wells within the same time window, and constructs unlabeled sample pairs between target wells and comparison wells based on inter-well geological attributes, equipment types, and synchronization matching standards;
[0201] Feature processing module: Normalizes and aligns features of unlabeled sample pairs to generate multi-channel feature difference maps;
[0202] Fault identification module: includes a multi-scale contrastive learning neural network model, which receives multi-channel feature difference maps, uses the similarity of normal operation of similar wells as a reference, identifies the stable offset pattern between the target well and the comparison well through the feature contrastive loss function, and outputs a fault score value by combining the offset degree, duration and channel sensitivity weight;
[0203] Fault determination module: Performs time series trend analysis on fault scores, matches them with preset disturbance feature templates for similarity, eliminates interference artifacts, and outputs fault level determination results and their diagnostic confidence.
[0204] The aforementioned AI-based oil production system fault diagnosis system acquires multi-well operating signals synchronously through a data acquisition module and constructs unlabeled sample pairs between target and comparison wells to achieve comparability modeling of well operating states. A feature processing module normalizes and aligns the operating data to generate a multi-channel feature difference map. Based on this, a multi-scale contrastive learning neural network in the fault identification module stably extracts inter-well operating deviation features and outputs fault scores. The fault determination module combines the score time series trend and disturbance feature templates to determine the fault level and output diagnostic confidence, thereby achieving automated identification, reliable assessment, and engineering application of oil production system fault states.
[0205] The above embodiments are used to explain this application, not to limit it. Any modifications and changes made to this application within the spirit and scope of the claims shall fall within the protection scope of this application.
Claims
1. A fault diagnosis method for an oil production system based on artificial intelligence, characterized in that, Includes the following steps: Step S1: Based on the synchronous operation signals of the target well and its comparison well, construct a multi-channel feature difference map to characterize the difference in their operating states. Step S2: Input the multi-channel feature difference map into the multi-scale contrastive learning neural network model to obtain the fault score of the target well; Step S3: Based on the time evolution trend characteristics of the fault score, perform similarity matching with the preset disturbance template to obtain the current fault level determination result and its diagnostic confidence of the target well; The method for constructing multi-channel feature difference maps is as follows: Extract the standardized operating signal matrix of the target well and its comparison well within the time window T, and combine the standardized operating signal matrix according to the well pair relationship to obtain unlabeled sample pairs; For the unlabeled sample pairs, the mean difference in offset, the difference in fluctuation amplitude, and the phase difference of the operating signals of the target well and each comparison well within the time window T are calculated channel by channel. By combining the correlation structure between operating signals and the coupling characteristics of cross-well signals, a correlation matrix between operating signals is constructed, and the deviation of the inter-well coupling structure is calculated based on the correlation matrix. The deviation of the coupling structure is combined with the mean difference of offset, the difference of fluctuation amplitude and the phase difference to obtain a multi-channel feature difference map; The method for generating the standardized operating signal matrix is as follows: The operating signals of the target well and each production well are collected synchronously within the time window T; Extract the geological attributes, well structure, and operating condition parameters of the target well and each production well to form a corresponding static feature description; Based on the static feature description, the static feature similarity between each oil well and the target well is calculated, and the oil wells with a static feature similarity not lower than a preset similarity threshold are identified as the comparison wells of the target well. The operating signals of the target well and its comparison wells are normalized and a uniform time step is set. The operating signals of each oil well acquired at different sampling frequencies are resampled to a uniform time axis and time alignment is performed by linear interpolation. For the running signal after normalization and time alignment, according to Outlier detection and removal are carried out in accordance with the principle; Based on the operation signals that have completed anomaly removal processing, a standardized operation signal matrix is constructed. Step S2 specifically includes: Step S21: Input the multi-channel feature difference map into a multi-scale contrastive learning neural network model to extract stable shift patterns that persist across multiple time scales. Step S22: Based on the stable offset mode, generate a fault score value to characterize the degree of abnormality in the current operating state of the target well; Step S3 specifically includes: The fault score of the target well is constructed into a score time series, and the score time series is smoothed by the sliding window method to obtain the moving average score of the target well. At the same time, the corresponding score change rate is calculated. The rate of change of the scores is normalized to obtain the normalized rate of change of scores; Construct a perturbation feature template to characterize the score fluctuation feature pattern under normal operating conditions; The normalized score change rate is matched with the disturbance feature template and the matching degree is calculated. When the matching degree is greater than the preset score fluctuation similarity judgment threshold, the current score fluctuation of the target well is determined to conform to the normal working condition disturbance fluctuation mode; otherwise, it is determined to be an abnormal fluctuation. The time windows belonging to the normal operating condition disturbance mode are removed from the scoring time series to obtain the effective scoring time series after removing disturbance artifacts. Based on the effective scoring time series, calculate the current fault level of the target well and output the corresponding diagnostic confidence level.
2. The oil production system fault diagnosis method according to claim 1, characterized in that, The operating signals include current, voltage, wellhead pressure, sucker rod vibration acceleration, and wellbore fluid level.
3. The oil production system fault diagnosis method according to claim 1, characterized in that, Step S21 specifically includes: Construct sample pairs of the target well and its comparison wells, and input the corresponding multi-channel feature difference maps into a multi-scale contrastive learning neural network model for feature encoding to obtain the corresponding embedding vectors; Positive and negative sample pairs are constructed based on the embedded vector, wherein: the sample pair consisting of the target well and the normally operating comparison well is used as the positive sample pair, and the sample pair consisting of the target well and the randomly selected well is used as the negative sample pair; The cosine similarity between the embedding vectors in positive and negative sample pairs is calculated separately, and the embedding representation space is optimized based on the improved NT-Xent contrastive loss function. By minimizing the contrastive loss function, positive and negative sample pairs form a distinguishable distance distribution in the embedding representation space; Calculate the average distance between the target well embedding vector and the corresponding normal operating comparison well embedding vector. If the average distance is consistently greater than the stable offset identification threshold and the duration is greater than the minimum duration window, it is determined to be a stable offset mode.
4. The oil production system fault diagnosis method according to claim 3, characterized in that, Step S22 specifically includes: For the target well and the comparison well pair that have been determined to be in a stable migration mode, the corresponding difference indexes are extracted for each channel to construct the degree of migration for each channel; For each channel, the degree of offset and the duration of offset are weighted and fused according to the sensitivity weight of that channel to obtain a channel-level fault score; All channel-level fault scores are aggregated to obtain the fault score value of the target well.
5. The oil production system fault diagnosis method according to claim 4, characterized in that, The fault level is represented as follows: in, For the target well The fault level, The threshold for scoring minor faults. The threshold for severe fault scoring, For the target well Fault score; The diagnostic confidence level is the credibility of the fault level judgment, which is obtained by performing an exponentially weighted average of the rate of change of scores at each time point within the effective scoring time series.
6. An artificial intelligence-based oil production system fault diagnosis system, used to implement the oil production system fault diagnosis method as described in any one of claims 1-5, characterized in that, Includes the following modules: The data acquisition module is used to acquire the operating signals of the target well and multiple oil wells in the oil production block within the same time window; The feature processing module generates a multi-channel feature difference map based on the running signal; The fault identification module includes a multi-scale contrastive learning neural network model, used to receive the multi-channel feature difference map and obtain the fault score value of the target well; The fault determination module is used to perform time series trend analysis on the fault score value and output the fault level determination result of the target well and the corresponding diagnostic confidence level.
Citation Information
Patent Citations
Oil well indicator diagram real-time fault prediction method and system
CN121092974A
Energy storage system fault database indexing method
CN121456504A