A Smart Diagnostic Method for Oil Well Operating Conditions Based on Multi-Source Data Fusion

CN122572207APending Publication Date: 2026-08-14SICHUAN HONGYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]本发明提供一种基于多源数据融合的油井工况智能诊断方法,用以解决现有技术对油井工况诊断准确性较低的问题

Benefits of technology

[0014]This invention provides an intelligent diagnostic method for oil well conditions based on multi-source data fusion. The method collects real-time dynamometer image data, production time-series parameter data, and pumping unit vibration signal data from the oil well. After preprocessing, spatial morphological features, temporal dynamic features, and vibration features are extracted using two-dimensional convolutional neural networks, long short-term memory networks, and one-dimensional convolutional neural networks, respectively. These features are then fused to obtain a high-dimensional fused feature vector, and finally, intelligent results for oil well conditions are classified and output. This invention, through multi-source data fusion, overcomes the limitations of single data sources, enabling simultaneous identification of downhole fluid anomalies and surface mechanical faults, significantly improving the comprehensiveness and accuracy of oil well condition diagnosis. Furthermore, an improved sparrow algorithm is employed to further enhance the accuracy of condition diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122572207A_ABST
    Figure CN122572207A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent diagnostic method for oil well conditions based on multi-source data fusion, belonging to the field of oil and gas field development monitoring technology. The method involves real-time acquisition of dynamometer card image data, production time-series parameter data, and pumping unit vibration signal data from oil wells. After preprocessing, spatial morphological features, temporal dynamic features, and vibration features are extracted using two-dimensional convolutional neural networks, long short-term memory networks, and one-dimensional convolutional neural networks, respectively. These features are then fused to obtain a high-dimensional fused feature vector, and finally, intelligent results of oil well conditions are classified and output. This invention, through multi-source data fusion, breaks through the limitations of a single data source, enabling simultaneous identification of downhole fluid anomalies and surface mechanical faults, significantly improving the comprehensiveness and accuracy of oil well condition diagnosis. Furthermore, an improved sparrow algorithm is employed to further enhance the accuracy of condition diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of oil and gas field development monitoring technology, specifically relating to an intelligent diagnostic method for oil well conditions based on multi-source data fusion. Background Technology

[0002] In oilfield production, well condition diagnosis is a crucial step in ensuring efficient and stable production. Traditional well condition diagnosis relies primarily on manual, empirical analysis of surface dynamometer cards or classification based on simple mathematical or shallow machine learning models built from a single data source (such as load-displacement curves). However, with the development of oilfield digitalization, massive amounts of multi-source heterogeneous data have accumulated at the production site. Existing diagnostic methods have the following shortcomings: relying solely on dynamometer cards often fails to distinguish between complex conditions that appear similar (such as gas interference and insufficient fluid supply), leading to a high misjudgment rate. Traditional image or static curve analysis ignores the dynamic characteristics of production parameters such as oil pressure, casing pressure, and temperature over time, failing to provide early warnings of evolving conditions. Existing multi-data diagnostic systems are mostly simple data patchwork systems, failing to deeply mine the correlations between data at the feature or decision levels, resulting in poor anti-interference capabilities. Summary of the Invention

[0003] This invention provides an intelligent diagnostic method for oil well conditions based on multi-source data fusion, in order to solve the problem of low accuracy in the diagnosis of oil well conditions in existing technologies.

[0004] This invention provides an intelligent diagnostic method for oil well operating conditions based on multi-source data fusion, comprising: Real-time acquisition of dynamometer image data, production time sequence parameter data, and pumping unit vibration signal data of oil wells to obtain multi-source data in the field. The multi-source data in the field is then processed by timestamp alignment and normalization to obtain pre-processed multi-source data in the field. A pre-trained two-dimensional convolutional neural network is used to extract the spatial morphological features corresponding to the dynamometer image data in the pre-processed field multi-source data; a pre-trained long short-term memory network is used to extract the temporal dynamic features corresponding to the production time-series parameter data in the pre-processed field multi-source data; and a pre-trained one-dimensional convolutional neural network is used to extract the vibration features corresponding to the pumping unit vibration signal data in the pre-processed field multi-source data. The spatial morphological features, temporal dynamic features, and vibration features are fused to obtain a high-dimensional fused feature vector, and the high-dimensional fused feature vector is classified and output to obtain intelligent results of oil well operating conditions.

[0005] Furthermore, the production timing parameter data includes the average values ​​corresponding to oil pressure, casing pressure, back pressure, wellhead temperature, production volume, and / or dynamic fluid level depth.

[0006] Furthermore, the multi-source on-site data undergoes timestamp alignment and normalization processing to obtain preprocessed multi-source on-site data, including: Using one pumping unit stroke cycle as a time window, extract the indicator image data within the time window, and simultaneously extract the average production parameter value within the time window as the production timing parameter data. Then, perform a fast Fourier transform on the vibration signal within the time window to obtain the frequency domain sequence, thus obtaining the pumping unit vibration signal data. The production time sequence parameter data and the pumping unit vibration signal data are normalized respectively to obtain preprocessed production time sequence parameter data and pumping unit vibration signal data. The indicator image data, the preprocessed production timing parameter data, and the pumping unit vibration signal data are used together as preprocessed multi-source data from the field.

[0007] Furthermore, the process of fusing the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: weighted fusion or direct splicing of the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector.

[0008] Furthermore, the fusion of the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: Using the spatial morphological features as the Query and the temporal dynamic features as the Key and Value, a cross-attention mechanism is employed to obtain the temporal dynamic features that incorporate the attention of the dynamometer diagram. Using the time-series dynamic features that are integrated with the dynamometer diagram as the query, and the vibration features as the key and value, a cross-attention mechanism is used to obtain a high-dimensional fused feature vector.

[0009] Furthermore, the high-dimensional fused feature vector is classified and output to obtain intelligent results of oil well operating conditions, including: The high-dimensional fused feature vector is input into the fully connected layer and the Softmax classifier, and the current working condition category of the oil well and its probability distribution are output to obtain the intelligent result of the oil well working condition. Alternatively, the high-dimensional fused feature vector can be input into a pre-trained BP neural network classification model to output the current operating condition category of the oil well and its probability distribution, thus obtaining intelligent results of the oil well operating condition.

[0010] Furthermore, the two-dimensional convolutional neural network, the long short-term memory network, and the one-dimensional convolutional neural network employ a joint pre-training method, which includes: The two-dimensional convolutional neural network, long short-term memory network, one-dimensional convolutional neural network, feature fusion layer, and feature classification layer are used to construct an intelligent diagnostic model for oil well conditions. The feature fusion layer is the layer that fuses the spatial morphological features, temporal dynamic features, and vibration features. The feature classification layer is the layer that classifies and outputs the high-dimensional fused feature vector. Set the population size to N and the maximum number of iterations to... Discoverer ratio PD, scout ratio SD, safety threshold ST, and the dimension to be solved is set as the dimension D of the parameters to be trained in the intelligent diagnostic model for oil well conditions; N sparrows are randomly generated within the search space formed by the upper and lower limits of the parameters to be trained in the intelligent diagnostic model for oil well conditions, thus obtaining a population; the parameter dimension of each sparrow in the population is D. Evaluate the fitness values ​​of all sparrows in the population and determine the current optimal fitness. Worst fitness Optimal position and worst position ; Based on the safety threshold ST and the optimal position Update the positions of the top PD×N discoverers in the population according to the improved discoverer search strategy; where PD×N is not an integer, it is rounded up. The remaining sparrows, excluding the discoverer, are designated as followers, and ranked according to their worst-case position. Update follower positions according to the follower search strategy; Based on the population after updating the positions of the discoverers and followers, SD×N sparrows are randomly selected from the population as watchdogs, and then the optimal fitness is determined. Worst fitness Optimal position and worst position Update the vigilant position according to the improved vigilant search strategy; where SD×N is not an integer, it is rounded up. Check if the updated sparrow position exceeds the boundary constraints; if it does, pull it back to the boundary. Calculate the fitness of the updated population and update the current optimal fitness. Worst fitness Optimal position and worst position ; If the maximum number of iterations is reached... If the accuracy requirement is met, the iteration stops and the globally optimal solution is output; otherwise, the updated optimal fitness is used. Worst fitness Optimal position and worst position Based on this, return to the steps for updating the discoverer's location.

[0011] Furthermore, the positions of the top PD×N discoverers in the population are updated according to the improved discoverer search strategy as follows: in, Let d represent the d-th dimension parameter of the nth discoverer, where n = 1, 2, ..., N, N represents the total number of discoverers, d = 1, 2, ..., D, and t represents the number of training iterations. Let d represent the d-th parameter of the discoverer after the nth update. This represents the security domain search control factor, and is set to... , This represents the base value of the security domain search control factor, set as a constant term between [0.001, 0.05]. This represents the control value of the security domain search control factor, and is set as a constant term between [0.005, 0.01]. Represents pi (π). This indicates the fitness ranking of the discoverers. Represents the first random number between (0,1). This represents the second random number between (0,1). Represents a symbolic function. Let represent the gradient of the nth discoverer, and ; Indicates the nth discoverer. Indicates and Different discoverers, express Adaptability, express Adaptability, The d-th dimension parameter represents the optimal position. This represents the safety transfer coefficient, which decreases linearly from 1 to 0.0001 as the number of training iterations increases. Let d be the parameter of the g-th discoverer. This represents the Euclidean distance between the nth discoverer and the gth discoverer. This represents the upper bound of the d-th dimension parameter. This represents the lower bound of the d-th dimension parameter. This represents the degree of information interaction between the nth discoverer and the gth discoverer, and , This represents the first level of interaction control coefficient, and is set to a constant between [0.4, 0.6]. This represents the second level of interaction control coefficient, and is set to a constant between [1.5, 2]. Represents the natural constant.

[0012] Furthermore, the follower positions are updated according to the follower search strategy as follows: in, Indicates the first i The d-th dimension parameter of each follower i This indicates the fitness ranking of followers. This represents the d-th dimension parameter of the follower after the i-th update. Indicates the first i The historical best value for each follower. This represents the total number of followers. This represents a random number that follows a standard normal distribution N(0,1). This represents an exponential function with base e. The d-th parameter represents the worst-case position. Let L represent the inverse of matrix A, where A is a 1×D matrix with elements randomly selected as 1 or -1; L represents a 1×d matrix with all elements equal to 1.

[0013] Furthermore, the vigilant locations are updated according to the improved vigilant search strategy as follows: in, Let d be the parameter of the j-th vigilant. This represents the d-th dimension parameter of the vigilant after the j-th update. Represents pi (π). Represents the global search coefficient, and , This represents the j-th vigilant. Indicates and Different vigilant, Indicates the order of the global search. This represents the global search control coefficient, set as a constant term between [0.3, 0.5]. Represents variables, This represents a third random number between (0,1). express Adaptability, express Adaptability, Represents a uniformly random number in the range [-1, 1]. express Adaptability, This represents a non-zero constant term.

[0014] This invention provides an intelligent diagnostic method for oil well conditions based on multi-source data fusion. The method collects real-time dynamometer image data, production time-series parameter data, and pumping unit vibration signal data from the oil well. After preprocessing, spatial morphological features, temporal dynamic features, and vibration features are extracted using two-dimensional convolutional neural networks, long short-term memory networks, and one-dimensional convolutional neural networks, respectively. These features are then fused to obtain a high-dimensional fused feature vector, and finally, intelligent results for oil well conditions are classified and output. This invention, through multi-source data fusion, overcomes the limitations of single data sources, enabling simultaneous identification of downhole fluid anomalies and surface mechanical faults, significantly improving the comprehensiveness and accuracy of oil well condition diagnosis. Furthermore, an improved sparrow algorithm is employed to further enhance the accuracy of condition diagnosis. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0016] Figure 1 This is a flowchart of an intelligent diagnostic method for oil well conditions based on multi-source data fusion, provided as an embodiment of the present invention.

[0017] The accompanying drawings have illustrated specific embodiments of the invention, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0018] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0019] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0020] like Figure 1 As shown, this embodiment of the invention provides an intelligent diagnostic method for oil well operating conditions based on multi-source data fusion, including: S101. Real-time acquisition of dynamometer image data, production time sequence parameter data, and pumping unit vibration signal data of oil wells to obtain multi-source data in the field, and performing timestamp alignment and normalization processing on the multi-source data in the field to obtain pre-processed multi-source data in the field. S102. A pre-trained two-dimensional convolutional neural network is used to extract the spatial morphological features corresponding to the dynamometer image data in the pre-processed field multi-source data; a pre-trained long short-term memory network is used to extract the temporal dynamic features corresponding to the production time-series parameter data in the pre-processed field multi-source data; and a pre-trained one-dimensional convolutional neural network is used to extract the vibration features corresponding to the pumping unit vibration signal data in the pre-processed field multi-source data. S103. The spatial morphological features, temporal dynamic features, and vibration features are fused to obtain a high-dimensional fused feature vector, and the high-dimensional fused feature vector is classified and output to obtain the intelligent result of oil well operating conditions.

[0021] Optionally, the intelligent results of well operating conditions can include normal operation, insufficient fluid supply, gas influence, sucker rod breakage, pump leakage, traveling valve leakage, fixed valve leakage, and the probability corresponding to each condition. For example, if the output result is [insufficient fluid supply: 0.85, gas influence: 0.10, normal: 0.05], the system determines that the current well is in an insufficient fluid supply condition and pushes the warning information to the oilfield control room to guide the oil production workers to take measures such as reducing the pumping frequency or intermittent pumping.

[0022] This invention simultaneously acquires and integrates dynamometer images, production time-series parameters, and pumping unit vibration signals. The dynamometer image reflects the load spatial configuration of the downhole pump, the time-series parameters reflect the macroscopic production trend, and the vibration signal reflects the mechanical health status of the surface equipment. The combination of these three data sources overcomes the limitations of a single data source, enabling the simultaneous identification of downhole fluid anomalies and surface mechanical faults, significantly improving the comprehensiveness and accuracy of well condition diagnosis.

[0023] In this embodiment of the invention, the production time-series parameter data includes the average values ​​corresponding to oil pressure, casing pressure, back pressure, wellhead temperature, fluid production, and / or dynamic fluid level depth. It is worth noting that the production time-series parameter data may also include other production-related data, thereby improving accuracy.

[0024] For example, data from a pumping well can be collected in real time using an oilfield SCADA system and sensor network: (1) Dynamometer image: Load-displacement data are obtained by load sensor and displacement sensor and drawn into a grayscale image of 128×128 pixels.

[0025] (2) Production time sequence parameters: Data such as oil pressure, casing pressure, temperature, and dynamic liquid level depth are collected at a sampling interval of 1 minute to form a time series of length T, where T is a preset value.

[0026] (3) Vibration signal: The vibration signal of the pumping unit walking beam was collected using a triaxial accelerometer with a sampling rate of 2000Hz.

[0027] In this embodiment of the invention, the multi-source on-site data undergoes timestamp alignment and normalization processing to obtain preprocessed multi-source on-site data, including: Using one pumping unit stroke cycle as a time window, extract the indicator image data within the time window, and simultaneously extract the average production parameter value within the time window as the production time sequence parameter data. Then, perform a Fast Fourier Transform (FFT) on the vibration signal within the time window to obtain the frequency domain sequence, thus obtaining the pumping unit vibration signal data. The production time sequence parameter data and the pumping unit vibration signal data are normalized respectively to obtain preprocessed production time sequence parameter data and pumping unit vibration signal data. For example, using the completion of one stroke of the pumping unit (e.g., 6 strokes / minute, then one stroke takes 10 seconds) as the baseline cycle, load-displacement data within one cycle is extracted to generate a dynamometer diagram; the average of the time-series parameters within this 10-second period is used as the time-series feature vector for the current cycle; the vibration signal within this 10-second period is subjected to a Fast Fourier Transform (FFT), and the first 256 dimensions of frequency domain amplitude are extracted as the vibration feature sequence. Min-Max normalization is then performed on the above data to eliminate the influence of dimensions.

[0028] The indicator image data, the preprocessed production timing parameter data, and the pumping unit vibration signal data are used together as preprocessed multi-source data from the field.

[0029] In the data preprocessing stage, data was extracted using one pumping unit stroke cycle as the time window, ensuring strict alignment of the multi-source sensors in the physical motion cycle. At the same time, the time-domain vibration signal was converted into a frequency-domain sequence through FFT, effectively filtering out high-frequency noise interference and highlighting the inherent frequency characteristics of the mechanical equipment, laying the foundation for subsequent network extraction of high-quality features.

[0030] Optionally, the two-dimensional convolutional neural network can adopt the ResNet18 network structure, removing the last fully connected layer to output the deep feature map of the dynamometer map; the long short-term memory network can use a two-layer bidirectional Bi-LSTM structure to capture the contextual dependencies of the temporal parameters, or a regular LSTM can be used. It is worth noting that other networks can also be used to obtain feature vectors, thus obtaining three vectors representing spatial morphological features, temporal dynamic features, and vibrational features. Therefore, a modified ResNet18 network can be used, taking a 128×128×1 dynamometer map as input, extracting features through convolutional layers and residual blocks, and finally outputting a 512×1 feature vector F. card A two-layer bidirectional Bi-LSTM network can be used, taking the time-series parameter sequence of the past N cycles (e.g., N=30) as input and outputting a 256×1 time-series dynamic feature vector F. timeA three-layer 1D-CNN network can be used, taking the vibration frequency domain features of the current cycle as input and outputting a 256×1 vibration feature vector F. vib .

[0031] In this embodiment of the invention, the step of fusing the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: weighted fusion or direct splicing of the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector.

[0032] In this embodiment of the invention, the process of fusing the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: Using the spatial morphological features as the Query and the temporal dynamic features as the Key and Value, a cross-attention mechanism is employed to obtain the temporal dynamic features that incorporate the attention of the dynamometer diagram. Using the time-series dynamic features that are integrated with the dynamometer diagram as the query, and the vibration features as the key and value, a cross-attention mechanism is used to obtain a high-dimensional fused feature vector.

[0033] To improve diagnostic accuracy, existing technologies have introduced multi-source data fusion methods, but most of them employ simple feature concatenation or weighted fusion, failing to effectively uncover deep correlations between different modalities. Therefore, this invention proposes a feature fusion method based on a cross-attention mechanism to enhance fusion correlation.

[0034] Compared to traditional simple splicing or weighted fusion, this invention employs a dual cross-attention mechanism (using spatial morphology to query temporal dynamics, and then using fused features to query vibration features), enabling the model to adaptively focus on key information that is highly correlated between different modalities. For example, when the dynamometer card shows abnormal load, the attention mechanism guides the model to focus on the vibration signal features corresponding to that time period, thereby effectively uncovering potential cross-modal correlations and further improving the classifier's discriminative ability.

[0035] In this embodiment of the invention, the high-dimensional fused feature vector is classified and output to obtain intelligent results of oil well operating conditions, including: The high-dimensional fused feature vector is input into the fully connected layer and the Softmax classifier, and the current working condition category of the oil well and its probability distribution are output to obtain the intelligent result of the oil well working condition. Alternatively, the high-dimensional fused feature vector can be input into a pre-trained BP neural network classification model to output the current operating condition category of the oil well and its probability distribution, thus obtaining intelligent results of the oil well operating condition.

[0036] In this embodiment of the invention, the two-dimensional convolutional neural network, the long short-term memory network, and the one-dimensional convolutional neural network employ a joint pre-training method, which includes: The two-dimensional convolutional neural network, long short-term memory network, one-dimensional convolutional neural network, feature fusion layer, and feature classification layer are used to construct an intelligent diagnostic model for oil well conditions. The feature fusion layer is the layer that fuses the spatial morphological features, temporal dynamic features, and vibration features. The feature classification layer is the layer that classifies and outputs the high-dimensional fused feature vector. The feature classification layer can be set as a fully connected layer and a Softmax classifier, or it can be set as a BP neural network classifier. After the two-dimensional convolutional neural network, long short-term memory network and one-dimensional convolutional neural network extract the three features, they are fused through the feature fusion layer to obtain a high-dimensional fused feature vector. The feature classification layer is used to analyze the high-dimensional fused feature vector, thereby obtaining intelligent results of oil well conditions.

[0037] Set the population size to N and the maximum number of iterations to... Discoverer ratio PD, scout ratio SD, safety threshold ST, and the dimension to be solved is set as the dimension D of the parameters to be trained in the intelligent diagnostic model for oil well conditions; N sparrows are randomly generated within the search space formed by the upper and lower limits of the parameters to be trained in the intelligent diagnostic model for oil well conditions, thus obtaining a population; the parameter dimension of each sparrow in the population is D. Evaluate the fitness values ​​of all sparrows in the population and determine the current optimal fitness. Worst fitness Optimal position and worst position ; Multi-source sample data corresponding to various working conditions can be obtained in advance. After preprocessing, the multi-source sample data is used as input, and the corresponding working condition label is used as the expected output. Thus, the cross-entropy loss function or root mean square loss function can be obtained. Then, the fitness can be obtained by adding the loss function value to the preset constant term and taking the reciprocal. Alternatively, the fitness can also be obtained by directly taking the negative value of the loss function.

[0038] Based on the safety threshold ST and the optimal position Update the positions of the top PD×N discoverers in the population according to the improved discoverer search strategy; where PD×N is not an integer, it is rounded up. The remaining sparrows, excluding the discoverer, are designated as followers, and ranked according to their worst-case position. Update follower positions according to the follower search strategy; Based on the population after updating the positions of the discoverers and followers, SD×N sparrows are randomly selected from the population as watchdogs, and then the optimal fitness is determined. Worst fitness Optimal position and worst position Update the vigilant position according to the improved vigilant search strategy; where SD×N is not an integer, it is rounded up. Check if the updated sparrow position exceeds the boundary constraints; if it does, pull it back to the boundary. Calculate the fitness of the updated population and update the current optimal fitness. Worst fitness Optimal position and worst position ; If the maximum number of iterations is reached... If the accuracy requirement is met, the iteration stops and the globally optimal solution is output; otherwise, the updated optimal fitness is used. Worst fitness Optimal position and worst position Based on this, return to the steps for updating the discoverer's location.

[0039] Traditional network training methods (such as gradient descent) are prone to getting trapped in local optima during the optimization process, resulting in slow model convergence and poor generalization ability, which in turn affects the final accuracy of oil well condition diagnosis. Therefore, this invention provides an improved sparrow algorithm to address the problem of existing technologies getting trapped in local optima and improve the recognition accuracy of the intelligent oil well condition diagnosis model.

[0040] In this embodiment of the invention, the positions of the top PD×N discoverers in the population are updated according to the improved discoverer search strategy as follows: in, Let d represent the d-th dimension parameter of the nth discoverer, where n = 1, 2, ..., N, N represents the total number of discoverers, d = 1, 2, ..., D, and t represents the number of training iterations. Let d represent the d-th parameter of the discoverer after the nth update. This represents the security domain search control factor, and is set to... , This represents the base value of the security domain search control factor, set as a constant term between [0.001, 0.05]. This represents the control value of the security domain search control factor, and is set as a constant term between [0.005, 0.01]. Represents pi (π). This indicates the fitness ranking of the discoverers. Represents the first random number between (0,1). This represents the second random number between (0,1). Represents a symbolic function. Let represent the gradient of the nth discoverer, and ; Indicates the nth discoverer. Indicates and Different discoverers, express Adaptability, express Adaptability, The d-th dimension parameter represents the optimal position. This represents the safety transfer coefficient, which decreases linearly from 1 to 0.0001 as the number of training iterations increases. Let d be the parameter of the g-th discoverer. This represents the Euclidean distance between the nth discoverer and the gth discoverer. This represents the upper bound of the d-th dimension parameter. This represents the lower bound of the d-th dimension parameter. This represents the degree of information interaction between the nth discoverer and the gth discoverer, and , This represents the first level of interaction control coefficient, and is set to a constant between [0.4, 0.6]. This represents the second level of interaction control coefficient, and is set to a constant between [1.5, 2]. Represents the natural constant.

[0041] In the discoverer search strategy, a gradient-based sign function and a dynamic safety region search control factor are introduced. Combined with the Euclidean distance and information interaction degree between discoverers, the discoverer can perform gradient search in the neighborhood of its current location during the safety search process, maintaining search diversity and ensuring search effectiveness. During the danger escape process, it can explore a large area in the early stage of training and perform fine-grained local search based on gradient information in the later stage of training, thus accelerating the convergence speed.

[0042] In this embodiment of the invention, the follower position is updated according to the follower search strategy as follows: in, Indicates the first i The d-th dimension parameter of each follower i This indicates the fitness ranking of followers. This represents the d-th dimension parameter of the follower after the i-th update. Indicates the first i The historical best value for each follower. This represents the total number of followers. This represents a random number that follows a standard normal distribution N(0,1). This represents an exponential function with base e. The d-th parameter represents the worst-case position. Let L represent the inverse of matrix A, where A is a 1×D matrix with elements randomly selected as 1 or -1; L represents a 1×d matrix with all elements equal to 1.

[0043] The updating of followers is the same as in the prior art, and will not be described again in the embodiments of the present invention.

[0044] In this embodiment of the invention, the guard position is updated according to the improved guard search strategy as follows: in, Let d be the parameter of the j-th vigilant. This represents the d-th dimension parameter of the vigilant after the j-th update. Represents pi (π). Represents the global search coefficient, and , This represents the j-th vigilant. Indicates and Different vigilant, Indicates the order of the global search. This represents the global search control coefficient, set as a constant term between [0.3, 0.5]. Represents variables, This represents a third random number between (0,1). express Adaptability, express Adaptability, Represents a uniformly random number in the range [-1, 1]. express Adaptability, This represents a non-zero constant term and can be set to 0.01, 0.1, or 1.

[0045] In the watchdog search strategy, a cosine factor, global search coefficient, and global search order are introduced. This mechanism enables the watchdog to escape its current local optima. When the watchdog is in a globally optimal or non-globally optimal position, different nonlinear perturbation strategies are adopted, which greatly enhances the algorithm's global optimization ability. Ultimately, this allows the diagnostic model to achieve a better parameter configuration, improving the reliability and robustness of the diagnostic results.

[0046] Optionally, a greedy algorithm or simulated annealing algorithm can be introduced to control the update process of the vigilant, thereby further improving the training speed.

[0047] To address the problem that deep neural networks have numerous parameters and are prone to getting stuck in local optima, this invention proposes a joint pre-training method to perform global parameter optimization on the entire working condition diagnosis model (including 2D-CNN, LSTM, 1D-CNN, fusion layer and classification layer), thereby improving the model's recognition accuracy.

[0048] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that the invention is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for intelligent diagnosis of oil well operating conditions based on multi-source data fusion, characterized in that, include: Real-time acquisition of dynamometer image data, production time sequence parameter data, and pumping unit vibration signal data of oil wells to obtain multi-source data in the field. The multi-source data in the field is then processed by timestamp alignment and normalization to obtain pre-processed multi-source data in the field. A pre-trained two-dimensional convolutional neural network is used to extract the spatial morphological features corresponding to the dynamometer image data in the pre-processed field multi-source data; a pre-trained long short-term memory network is used to extract the temporal dynamic features corresponding to the production time-series parameter data in the pre-processed field multi-source data; and a pre-trained one-dimensional convolutional neural network is used to extract the vibration features corresponding to the pumping unit vibration signal data in the pre-processed field multi-source data. The spatial morphological features, temporal dynamic features, and vibration features are fused to obtain a high-dimensional fused feature vector, and the high-dimensional fused feature vector is classified and output to obtain intelligent results of oil well operating conditions.

2. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The production timing parameter data includes the average values ​​corresponding to oil pressure, casing pressure, back pressure, wellhead temperature, production volume, and / or dynamic fluid level depth.

3. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The multi-source on-site data is subjected to timestamp alignment and normalization processing to obtain preprocessed multi-source on-site data, including: Using one pumping unit stroke cycle as a time window, extract the indicator image data within the time window, and simultaneously extract the average production parameter value within the time window as the production timing parameter data. Then, perform a fast Fourier transform on the vibration signal within the time window to obtain the frequency domain sequence, thus obtaining the pumping unit vibration signal data. The production time sequence parameter data and the pumping unit vibration signal data are normalized respectively to obtain preprocessed production time sequence parameter data and pumping unit vibration signal data. The indicator image data, the preprocessed production timing parameter data, and the pumping unit vibration signal data are used together as preprocessed multi-source data from the field.

4. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The process of fusing the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: weighted fusion or direct splicing of the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector.

5. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The process of fusing the spatial morphological features, temporal dynamic features, and vibration features to obtain a high-dimensional fused feature vector includes: Using the spatial morphological features as the Query and the temporal dynamic features as the Key and Value, a cross-attention mechanism is employed to obtain the temporal dynamic features that incorporate the attention of the dynamometer diagram. Using the time-series dynamic features that are integrated with the dynamometer diagram as the query, and the vibration features as the key and value, a cross-attention mechanism is used to obtain a high-dimensional fused feature vector.

6. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The high-dimensional fused feature vector is classified and output to obtain intelligent results of oil well operating conditions, including: The high-dimensional fused feature vector is input into the fully connected layer and the Softmax classifier, and the current working condition category of the oil well and its probability distribution are output to obtain the intelligent result of the oil well working condition. Alternatively, the high-dimensional fused feature vector can be input into a pre-trained BP neural network classification model to output the current operating condition category of the oil well and its probability distribution, thus obtaining intelligent results of the oil well operating condition.

7. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 1, characterized in that, The two-dimensional convolutional neural network, long short-term memory network, and one-dimensional convolutional neural network employ a joint pre-training method, which includes: The two-dimensional convolutional neural network, long short-term memory network, one-dimensional convolutional neural network, feature fusion layer, and feature classification layer are used to construct an intelligent diagnostic model for oil well conditions. The feature fusion layer is the layer that fuses the spatial morphological features, temporal dynamic features, and vibration features. The feature classification layer is the layer that classifies and outputs the high-dimensional fused feature vector. Set the population size to N and the maximum number of iterations to... Discoverer ratio PD, scout ratio SD, safety threshold ST, and the dimension to be solved is set as the dimension D of the parameters to be trained in the intelligent diagnostic model for oil well conditions; N sparrows are randomly generated within the search space formed by the upper and lower limits of the parameters to be trained in the intelligent diagnostic model for oil well conditions, thus obtaining a population; the parameter dimension of each sparrow in the population is D. Evaluate the fitness values ​​of all sparrows in the population and determine the current optimal fitness. Worst fitness Optimal position and worst position ; Based on the safety threshold ST and the optimal position Update the positions of the top PD×N discoverers in the population according to the improved discoverer search strategy; where PD×N is not an integer, it is rounded up. The remaining sparrows, excluding the discoverer, are designated as followers, and ranked according to their worst-case position. Update follower positions according to the follower search strategy; Based on the population after updating the positions of the discoverers and followers, SD×N sparrows are randomly selected from the population as watchdogs, and then the optimal fitness is determined. Worst fitness Optimal position and worst position Update the vigilant position according to the improved vigilant search strategy; where SD×N is not an integer, it is rounded up. Check if the updated sparrow position exceeds the boundary constraints; if it does, pull it back to the boundary. Calculate the fitness of the updated population and update the current optimal fitness. Worst fitness Optimal position and worst position ; If the maximum number of iterations is reached... If the accuracy requirement is met, the iteration stops and the globally optimal solution is output; otherwise, the updated optimal fitness is used. Worst fitness Optimal position and worst position Based on this, return to the steps for updating the discoverer's location.

8. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 7, characterized in that, The positions of the top PD×N discoverers in the population are updated according to the improved discoverer search strategy as follows: in, Let d represent the d-th dimension parameter of the nth discoverer, where n = 1, 2, ..., N, N represents the total number of discoverers, d = 1, 2, ..., D, and t represents the number of training iterations. Let d represent the d-th parameter of the discoverer after the nth update. This represents the security domain search control factor, and is set to... , This represents the base value of the security domain search control factor, set as a constant term between [0.001, 0.05]. This represents the control value of the security domain search control factor, and is set as a constant term between [0.005, 0.01]. Represents pi (π). This indicates the fitness ranking of the discoverers. Represents the first random number between (0,1). This represents the second random number between (0,1). Represents a symbolic function. Let represent the gradient of the nth discoverer, and ; Indicates the nth discoverer. Indicates and Different discoverers, express fitness express Adaptability, The d-th dimension parameter represents the optimal position. This represents the safety transfer coefficient, which decreases linearly from 1 to 0.0001 as the number of training iterations increases. Let d be the parameter of the g-th discoverer. This represents the Euclidean distance between the nth discoverer and the gth discoverer. This represents the upper bound of the d-th dimension parameter. This represents the lower bound of the d-th dimension parameter. This represents the degree of information interaction between the nth discoverer and the gth discoverer, and , This represents the first level of interaction control coefficient, and is set to a constant between [0.4, 0.6]. This represents the second level of interaction control coefficient, and is set to a constant between [1.5, 2]. Represents the natural constant.

9. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 8, characterized in that, Update follower positions according to the follower search strategy: in, Indicates the first i The d-th dimension parameter of each follower i This indicates the fitness ranking of followers. This represents the d-th dimension parameter of the follower after the i-th update. Indicates the first i The historical best value for each follower. This represents the total number of followers. This represents a random number that follows a standard normal distribution N(0,1). This represents an exponential function with base e. The d-th parameter represents the worst-case position. Let L represent the inverse of matrix A, where A is a 1×D matrix with elements randomly selected as 1 or -1; L represents a 1×d matrix with all elements equal to 1.

10. The intelligent diagnosis method for oil well operating conditions based on multi-source data fusion according to claim 9, characterized in that, The location of the vigilant has been updated according to the improved vigilant search strategy: in, Let d be the parameter of the j-th vigilant. This represents the d-th dimension parameter of the vigilant after the j-th update. Represents pi (π). Represents the global search coefficient, and , This represents the j-th vigilant. Indicates and Different vigilant, Indicates the order of the global search. This represents the global search control coefficient, set as a constant term between [0.3, 0.5]. Represents variables, This represents a third random number between (0,1). express Adaptability, express Adaptability, Represents a uniformly random number in the range [-1, 1]. express Adaptability, This represents a non-zero constant term.