Drilling pump fault diagnosis method, device and equipment based on integrated state perception and characterization and medium
By constructing a multi-dimensional feature index matrix and optimizing the XGBoost model, eliminating redundant features, determining the key measurement points and fault-sensitive signal characteristics of drilling pumps, the problem of insufficient accuracy and reliability in drilling pump fault diagnosis is solved, and more efficient fault identification is achieved.
Patent Information
- Application Number
- CN202510518269.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-29
AI Technical Summary
The prior art is difficult to achieve both accuracy and reliability in drilling pump fault diagnosis, especially in high pressure, high load and diversified fault modes, where sensor deployment costs are high and the "black box" characteristics of deep learning models lead to unclear feature interaction mechanisms.
By collecting historical multi-source parameter working conditions data of each measurement point of the drilling pump, using sliding window alignment and feature extraction to construct a multi-dimensional feature index matrix, combining Ivy algorithm and XGBoost model optimization, redundant features are eliminated, key measurement points and fault-sensitive signal characteristics of the drilling pump are determined, and fault diagnosis is carried out using state perception and characterization methods.
It improves the accuracy and reliability of drilling pump fault diagnosis, reduces feature redundancy and noise interference, and enhances the credibility of diagnostic results.
Smart Images

Figure CN120387016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of drilling pump detection and diagnosis, and particularly to a fault diagnosis method, device, equipment and medium for drilling pumps based on integrated state perception and characterization. Background Art
[0002] During the oil extraction process, as a core device, the drilling pump maintains the stability of the downhole pressure by continuously transporting drilling fluid, thereby ensuring the smooth progress of the drilling operation. However, during long-term high-intensity operation, the drilling pump is easily affected by various factors such as mud particle wear, vibration and corrosion, resulting in frequent and diverse faults. This may not only lead to equipment shutdown and production interruption, but also pose major safety hazards. Therefore, timely and efficient fault monitoring and diagnosis of the drilling pump is a key link in ensuring the safety of oil drilling operations.
[0003] The drilling pump has the characteristics of high pressure, high load and diverse fault modes, which brings difficulties to the accurate diagnosis of drilling pump faults. Through various machine learning and deep learning methods, the fault modes of the equipment can be automatically learned from historical data. Especially when facing complex non-linear signals, they have strong adaptive ability and fault recognition ability. However, data-driven fault diagnosis methods have two problems. First, to improve the diagnosis accuracy, it is necessary to deploy sensors densely to cover the fault-sensitive areas of key components of the equipment, which not only generates a large amount of costs but also easily causes feature redundancy and noise interference. Second, machine learning models, especially deep learning models, are usually regarded as "black boxes". Although they can generate fault diagnosis results, due to the "black box" characteristics, it is difficult to explain the reasons for these results, resulting in unclear model inference logic and feature interaction mechanism, unable to determine the relationship between signal features and equipment states, identify fault-sensitive features, and generate reliable fault diagnosis results.
[0004] In summary, it can be seen that how to construct a fusion diagnosis method with clear diagnosis logic and feature screening ability to improve the accuracy and reliability of drilling pump fault diagnosis results is an issue to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a fault diagnosis method, device, equipment and medium for drilling pumps based on integrated state perception and characterization, so as to improve the accuracy and reliability of drilling pump fault diagnosis results. The specific solutions are as follows:
[0006] In the first aspect, the present application discloses a fault diagnosis method for drilling pumps based on integrated state perception and characterization, including:
[0007] Collect historical multi-source parameter working condition data of each measuring point of the drilling pump;
[0008] Align the historical multi-source parameter working condition data based on a sliding window, and extract features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix;
[0009] Optimize the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix, and perform feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain a target XGBoost model, key measuring points of the drilling pump, and fault-sensitive signal features;
[0010] Determine the key measuring points of the drilling pump and the fault-sensitive signal features as the state perception scheme and state representation features respectively;
[0011] When obtaining the current multi-source parameter working condition data of the drilling pump, input the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features.
[0012] Optionally, the operating conditions in the historical multi-source parameter working condition data include normal state and fault state, and the multi-source parameters in the historical multi-source parameter working condition data include vibration data, temperature data, and pressure data. Among them, the vibration data includes the vibration data of the suction branch pipe of the drilling pump, the vibration data at the bottom of the suction liquid cylinder, and the vibration data of the drive shaft bearing seat. The pressure data includes the suction pipe pressure data and the discharge pipe pressure data of the drilling pump, and the temperature data includes the lubricating oil temperature data.
[0013] Optionally, the aligning the historical multi-source parameter working condition data based on a sliding window, and extracting features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix includes:
[0014] Divide the vibration data, the temperature data, and the pressure data into multiple equal-length windows according to the sampling frequencies of the multi-source parameters to align the window timestamps of the vibration data, the temperature data, and the pressure data, so as to obtain vibration synchronous sliding window data, temperature synchronous sliding window data, and pressure synchronous sliding window data;
[0015] Extract features from the vibration synchronous sliding window data to obtain time-domain features, frequency-domain features, and entropy value features under each window;
[0016] Concatenate the time-domain features, the frequency-domain features, the entropy value features, the temperature synchronous sliding window data, and the pressure synchronous sliding window data to obtain feature vectors under each measuring point, and integrate the feature vectors under each measuring point in a unified feature matrix to obtain a multi-dimensional feature index matrix.
[0017] Optionally, optimize the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix to obtain the target XGBoost model, including:
[0018] Determine the initial XGBoost model as the current XGBoost model;
[0019] Use the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model to obtain the current fault diagnosis result output by the current XGBoost model;
[0020] Optimize the hyperparameters of the current XGBoost model using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model;
[0021] If the current preset optimization stop condition is met, determine the next XGBoost model as the target XGBoost model;
[0022] If the current preset optimization stop condition is not met, update the next XGBoost model to the current XGBoost model and jump back to the step of using the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model.
[0023] Optionally, optimizing the hyperparameters of the current XGBoost model using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model includes:
[0024] Determine the first fitness of the hyperparameter combination of the current XGBoost model according to the current fault diagnosis result, and use the ivy algorithm to determine the second fitness of the optimal hyperparameter combination of the current XGBoost model;
[0025] Optimize the hyperparameter combination of the current XGBoost model based on the magnitude relationship between the first fitness and the second fitness, and obtain the next XGBoost model according to the optimized hyperparameter combination obtained.
[0026] Optionally, obtaining the key measurement points of the drilling pump and the fault-sensitive signal characteristics includes:
[0027] Determine the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and perform feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix;
[0028] If the new multi-dimensional feature index matrix does not meet the preset stability condition, then jump back to the training of the current round of the current XGBoost model using the multi-dimensional feature index matrix;
[0029] If the new multi-dimensional feature index matrix meets the preset stability condition, then calculate the importance scores of each measuring point and feature according to the feature marginal contribution values of the features in the new multi-dimensional feature index matrix, and determine the importance score weights of each measuring point and feature according to the importance scores, so as to determine the key measuring points of the drilling pump and the fault-sensitive signal features according to the importance score weights.
[0030] Optionally, determining the feature marginal contribution values of the features in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and performing feature elimination on the features in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix, including:
[0031] Based on the interpretability algorithm, calculate the feature marginal contribution degrees of the features in the multi-dimensional feature index matrix under each contribution category for each path of each tree in the target XGBoost model in turn;
[0032] Determine the absolute average value of the feature marginal contribution degrees, and accumulate each of the absolute average values to obtain the comprehensive contribution degree of the multi-dimensional feature index matrix to the current fault diagnosis result;
[0033] Eliminate the features in the multi-dimensional feature index matrix whose comprehensive contribution degree is less than the preset contribution degree threshold to obtain a new multi-dimensional feature index matrix.
[0034] In a second aspect, the present application discloses a drilling pump fault diagnosis device based on integrated state perception and characterization, including:
[0035] A historical data acquisition module, configured to acquire historical multi-source parameter working condition data of each measuring point of the drilling pump;
[0036] A multi-dimensional matrix construction module, configured to align the historical multi-source parameter working condition data based on a sliding window, and perform feature extraction on the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix;
[0037] A model information acquisition module, configured to optimize an initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix, and perform feature elimination on the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a target XGBoost model, key measuring points of the drilling pump, and fault-sensitive signal features;
[0038] A perception representation determination module, configured to determine the critical measurement points of the drilling pump and the fault-sensitive signal features as a state perception scheme and state representation features respectively;
[0039] A fault diagnosis module, configured to, when obtaining the current multi-source parameter working condition data of the drilling pump, input the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs a target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features
[0040] In a third aspect, the present application discloses an electronic device, including:
[0041] A memory, configured to store a computer program;
[0042] A processor, configured to execute the computer program to implement the steps of the foregoing disclosed drilling pump fault diagnosis method based on integrated state perception and representation.
[0043] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the steps of the foregoing disclosed drilling pump fault diagnosis method based on integrated state perception and representation are implemented.
[0044] The beneficial effects of this application are as follows: This application collects historical multi-source parameter working condition data at each measurement point of the drilling pump; aligns the historical multi-source parameter working condition data based on a sliding window, and extracts features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix; uses the ivy algorithm and the multi-dimensional feature index matrix to optimize the initial XGBoost model, and performs feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measurement points of the drilling pump, and the fault-sensitive signal features; determines the key measurement points of the drilling pump and the fault-sensitive signal features as the state perception scheme and the state representation features respectively; when obtaining the current multi-source parameter working condition data of the drilling pump, inputs the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features. It can be seen that this application collects historical multi-source parameter working condition data at each measurement point of the drilling pump. Since the collected data is multi-source, it is necessary to align the historical multi-source parameter working condition data based on a sliding window to obtain synchronous sliding window data, and then features can be extracted from the synchronous sliding window data, thus constructing a multi-dimensional feature index matrix; further, the ivy algorithm and the multi-dimensional feature index matrix are used to optimize the initial XGBoost model, and feature elimination is performed on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measurement points of the drilling pump, and the fault-sensitive signal features. That is to say, redundant features and measurement points irrelevant to faults in the multi-dimensional feature index matrix are eliminated, and features and measurement points that can affect faults are retained. Moreover, the ivy algorithm and the multi-dimensional feature index matrix are used to optimize the initial XGBoost model, avoiding the subjectivity problem of determining parameters based on experience. The key measurement points of the drilling pump and the fault-sensitive signal features are determined as the state perception scheme and the state representation features respectively. In this way, when obtaining the current multi-source parameter working condition data of the drilling pump, combining the state perception scheme and the state representation features, and using the target XGBoost model to output the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data, the target fault diagnosis result of the drilling pump is more accurate and has a higher credibility. Description of the Drawings
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.
[0046] Figure 1 Flowchart of a drill pump fault diagnosis method based on integrated state perception and characterization disclosed in this application;
[0047] Figure 2 Schematic diagram of specific screened characteristic information disclosed in this application;
[0048] Figure 3 Schematic diagram of the fault diagnosis confusion matrix of the Ivy-XGBoost model based on the drill pump state perception scheme and state characterization features disclosed in this application;
[0049] Figure 4 Schematic diagram of the structure of a drill pump fault diagnosis device based on integrated state perception and characterization disclosed in this application;
[0050] Figure 5 Schematic diagram of the structure of an electronic device disclosed in this application. Specific implementation manners
[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] During the oil extraction process, the drill pump, as the core equipment, maintains the stability of the downhole pressure by continuously transporting drilling fluid, thereby ensuring the smooth progress of the drilling operation. However, during long-term high-intensity operation, the drill pump is easily affected by various factors such as mud particle wear, vibration, and corrosion, resulting in frequent and diverse failures, which may not only cause equipment shutdown and production interruption but also pose major safety hazards. Therefore, timely and efficient fault monitoring and diagnosis of the drill pump are the key links to ensure the safety of oil drilling operations.
[0053] Drilling pumps have the characteristics of high pressure, high load, and diverse failure modes, which pose difficulties for the accurate diagnosis of drilling pump failures. Through various machine learning and deep learning methods, the failure modes of equipment can be automatically learned from historical data. Especially when facing complex non-linear signals, they have strong adaptive and failure recognition capabilities. However, there are two problems with data-driven fault diagnosis methods. First, to improve the diagnostic accuracy, it is necessary to deploy sensors densely to cover the failure-sensitive areas of key components of the equipment, which not only incurs a large cost but also easily leads to feature redundancy and noise interference. Second, machine learning models, especially deep learning models, are usually regarded as "black boxes". Although they can generate fault diagnosis results, due to the "black box" characteristics, it is difficult to explain the reasons for these results, resulting in unclear model inference logic and feature interaction mechanisms, unable to determine the relationship between signal features and equipment states, identify failure-sensitive features, and produce reliable fault diagnosis results.
[0054] Therefore, the present application correspondingly provides a drilling pump fault diagnosis solution based on integrated state perception and characterization, which improves the accuracy and reliability of drilling pump fault diagnosis results.
[0055] See Figure 1 As shown, an embodiment of the present application discloses a drilling pump fault diagnosis method based on integrated state perception and characterization, including:
[0056] Step S11: Collect historical multi-source parameter working condition data of each measuring point of the drilling pump.
[0057] In this embodiment, the operating conditions in the historical multi-source parameter working condition data include normal state and failure state, and the multi-source parameters in the historical multi-source parameter working condition data include vibration data, temperature data, and pressure data. Among them, the vibration data includes the vibration data of the suction branch pipe of the drilling pump, the vibration data at the bottom of the suction liquid cylinder, and the vibration data of the drive shaft bearing seat. The pressure data includes the suction pipe pressure data and the discharge pipe pressure data of the drilling pump, and the temperature data includes the lubricating oil temperature data.
[0058] Collect the historical multi-source parameter working condition data of each measuring point of the drilling pump. The historical multi-source parameter working condition data mainly includes two major dimensions of data. One dimension is the operating condition, which includes the normal state and failure state of the drilling pump. The other dimension is the multi-source parameter, which includes vibration data, temperature data, and pressure data. Among them, the vibration data includes the vibration data of the suction branch pipe of the drilling pump, the vibration data at the bottom of the suction liquid cylinder, and the vibration data of the drive shaft bearing seat. The pressure data includes the suction pipe pressure data and the discharge pipe pressure data of the drilling pump, and the temperature data includes the lubricating oil temperature data.
[0059] It is understandable that the measuring points here are pre-determined measuring points, and there may be some measuring points that have nothing to do with the failure of the drilling pump and some measuring points related to the failure; the pre-determined measuring points specifically include the discharge pipe of the No. 1 measuring point, the suction pipe of the No. 2 measuring point, the right - suction branch pipe of the No. 3 measuring point, the middle - suction branch pipe of the No. 4 measuring point, the left - suction branch pipe of the No. 5 measuring point, the bottom of the right - suction liquid cylinder of the No. 6 measuring point, the bottom of the middle - suction liquid cylinder of the No. 7 measuring point, the bottom of the left - suction liquid cylinder of the No. 8 measuring point, the bearing seat of the right - drive shaft of the No. 9 measuring point, the bearing seat of the left - drive shaft of the No. 10 measuring point, and the lubricating oil sump of the No. 11 measuring point. The sensor at these measuring positions collects historical multi - source parameter working condition data.
[0060] Furthermore, there may be a lot of noise in the collected historical multi - source parameter working condition data, especially vibration data. Therefore, in order to make the subsequent fault diagnosis more reliable, it is necessary to filter out the noise. Perform wavelet packet transform on the historical multi - source parameter working condition data and remove the noise in the historical multi - source parameter working condition data to obtain the denoised historical multi - source parameter working condition data. That is to say, use the wavelet packet basis function to perform wavelet packet transform on the historical multi - source parameter working condition data to obtain the wavelet packet coefficients of each frequency band, perform soft - threshold processing on the wavelet packet coefficients based on the first preset threshold to obtain the processed wavelet packet coefficients, and then use the wavelet packet basis function and the processed wavelet packet coefficients to perform wavelet packet reconstruction to obtain the denoised historical multi - source parameter working condition data; among them, because vibration data is more vulnerable to external influences, the vibration data can be denoised separately. The more specific denoising process is as follows:
[0061] 1.1) Use the wavelet packet basis function to perform wavelet packet transform on the historical multi - source parameter working condition data to obtain the wavelet packet coefficients of each frequency band. The specific formula is as follows:
[0062] ;
[0063] In the formula, is the wavelet packet coefficient, is the original signal, that is, the historical multi - source parameter working condition data, is the wavelet packet basis function, j represents the scale, k represents the frequency band number, and t represents the time variable.
[0064] 1.2) Perform soft - threshold processing on the wavelet packet coefficients based on the first preset threshold to obtain the processed wavelet packet coefficients; the specific formula is as follows:
[0065] ;
[0066] In the formula, is the wavelet packet coefficient after soft - threshold processing, is the first preset threshold, is the sign function, where the first preset threshold can be specifically set to 0.1.
[0067] 1.3) Utilize wavelet packet basis functions and the processed wavelet packet coefficients to perform wavelet packet reconstruction to obtain the denoised historical multi-source parameter operating condition data; the specific formula is as follows:
[0068] ;
[0069] In the formula, is the denoised signal, that is, the denoised historical multi-source parameter operating condition data.
[0070] Step S12: Align the historical multi-source parameter operating condition data based on a sliding window, and extract features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix.
[0071] It can be understood that if the collected historical multi-source parameter operating condition data is denoised, then align the denoised historical multi-source parameter operating condition data based on a sliding window to provide guarantee for subsequent obtaining the target XGBoost model, key measuring points of the drilling pump, and fault-sensitive signal features.
[0072] In this embodiment, the aligning the historical multi-source parameter operating condition data based on a sliding window and extracting features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix includes: dividing the vibration data, the temperature data, and the pressure data into multiple equal-length windows according to the sampling frequency of the multi-source parameters to align the window timestamps of the vibration data, the temperature data, and the pressure data to obtain vibration synchronous sliding window data, temperature synchronous sliding window data, and pressure synchronous sliding window data; extracting features from the vibration synchronous sliding window data to obtain time-domain features, frequency-domain features, and entropy value features under each window; splicing the time-domain features, the frequency-domain features, the entropy value features, the temperature synchronous sliding window data, and the pressure synchronous sliding window data to obtain feature vectors under each measuring point, and integrating the feature vectors under each measuring point in a unified feature matrix to obtain a multi-dimensional feature index matrix.
[0073] The alignment of historical multi-source parameter working condition data based on a sliding window is specifically as follows: The vibration data, temperature data, and pressure data are segmented into multiple equal-length windows according to the sampling frequencies of the multi-source parameters, so as to align the window timestamps of the vibration data, temperature data, and pressure data, and obtain vibration synchronous sliding window data, temperature synchronous sliding window data, and pressure synchronous sliding window data. For example, if the sampling frequency of the vibration data is 10KHZ and the sampling frequencies of the temperature data and pressure data are 10HZ, then in the case of collecting data for 1 second, the length of the vibration data is 10000, and the lengths of the temperature data and pressure data are both 10. Then, the data can be segmented based on the sampling frequencies of the temperature data and pressure data. Specifically, the data is divided into 10 parts, and a fixed length (sliding window) is used to divide the vibration data with a length of 10000. The length of the sliding window can be set to 1024, and the window timestamps of the vibration data, temperature data, and pressure data are aligned.
[0074] However, when collecting vibration data, temperature data, and pressure data, the sampling frequencies of various types of data may be different. For example, the vibration data is collected 10000 times per second, while the pressure data and temperature data are collected 10 times per second. After dividing the data, for the vibration data, the divided window is 1024 data points, while for the pressure data, it is 1 data point. In this way, it is impossible to analyze them uniformly. Therefore, features are extracted from the vibration data. That is, one feature is extracted from 1024 data points, which is the same as the pressure data. Therefore, after the window timestamp alignment, feature extraction is performed on the vibration synchronous sliding window data to obtain the time-domain features, frequency-domain features, and entropy value features under each window. Among them, the time-domain features can specifically include the maximum value (Max), minimum value (Min), peak-to-peak value (Peak), rectified average value (Abs), variance (Var), standard deviation (Std), kurtosis (Kur), skewness (Ske), root mean square (RMS), mean square value (MS), waveform factor (Wav), peak factor (Cre), impulse factor (Imp), margin factor (Mar); the frequency-domain features can include the center frequency (FC), mean square frequency (MSF), root mean square frequency (RMSF), frequency variance (VF), root frequency variance (RVF), spectral kurtosis mean (SKMean), spectral kurtosis standard deviation (SKStd), spectral kurtosis skewness (SKSke), spectral kurtosis kurtosis (SKKur); the entropy value features can include power spectral entropy (PsdEn), singular spectral entropy (SvdpEn), energy entropy (EeEn), approximate entropy (ApEn), sample entropy (SpEn), fuzzy entropy (FuEn), permutation entropy (PeEn), envelope entropy (EnveEn), scatter entropy (DEn).
[0075] Concatenate the time-domain features, frequency-domain features, entropy value features, temperature synchronous sliding window data, and pressure synchronous sliding window data to obtain the feature vectors for each measurement point. , that is , where respectively represent the feature information extracted from the i-th time window; Next, in the unified feature matrix integrate the feature vectors for each measurement point to obtain a multi-dimensional feature index matrix, where the unified feature matrix is . It can be understood that the multi-dimensional feature index matrix at this time may contain features with a very low correlation with faults, may also contain features with a very high correlation with faults, and even contain features unrelated to faults. Therefore, feature elimination needs to be performed on the multi-dimensional feature index matrix subsequently.
[0076] Step S13: Optimize the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix, and perform feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measurement points of the drilling pump, and the fault-sensitive signal features.
[0077] In this embodiment, optimizing the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix to obtain the target XGBoost model includes: determining the initial XGBoost model as the current XGBoost model; using the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model to obtain the current fault diagnosis result output by the current XGBoost model; using the ivy algorithm and the current fault diagnosis result to optimize the hyperparameters of the current XGBoost model to obtain the next XGBoost model; if the current satisfies the preset optimization stop condition, then determine the next XGBoost model as the target XGBoost model; if the current does not satisfy the preset optimization stop condition, then update the next XGBoost model to the current XGBoost model and jump back to the step of using the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model.
[0078] It should be noted that the IVY algorithm (Ivy algorithm, that is, the ivy algorithm) includes the XGBoost model, takes the hyperparameter combination in the ivy algorithm as the hyperparameters of the XGBoost model, and takes the multi-dimensional feature index matrix as the training set, so as to optimize the hyperparameters of the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix to obtain the target XGBoost model.
[0079] When determining the hyperparameters of the initial XGBoost model, the hyperparameters to be optimized in the initial XGBoost model are input into the ivy algorithm, so that the ivy algorithm generates combinations of hyperparameters for the initial round based on the hyperparameters to be optimized, and initial hyperparameter combinations are screened out from the combinations of hyperparameters, thereby obtaining the initial XGBoost model. Next, the initial XGBoost model is determined as the current XGBoost model, and the current XGBoost model is trained in the current round using the multi-dimensional feature index matrix to obtain the current fault diagnosis result output by the current XGBoost model; the hyperparameters of the current XGBoost model are optimized using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model; if the current meets the preset optimization stop condition, for example, the current round is the preset maximum training round, or the diagnosis result output by the next XGBoost model meets the preset convergence condition, then the next XGBoost model is determined as the target XGBoost model; if the current does not meet the preset optimization stop condition, it means that the hyperparameters of the XGBoost model still need to be optimized, so the next XGBoost model is updated to the current XGBoost model, and the process jumps back to the step of training the current XGBoost model in the current round using the multi-dimensional feature index matrix, that is, performing hyperparameter optimization in the next round.
[0080] XGBoost is an efficient gradient boosting tree algorithm. Based on the boosting method, it gradually constructs a decision tree model. Its core idea is to combine weak learners into a strong learner to improve the prediction accuracy. The goal during the XGBoost training process is to minimize the loss function with a regularization term to improve the model accuracy, that is, to make the diagnosis result output by the XGBoost model meet the preset convergence condition. Among them, the loss function is specifically as follows:
[0081] ;
[0082] In the formula, is the error term, represents the predicted value of the i-th sample, represents the true value of the i-th sample, n represents the total number of samples, K represents the total number of trees, is the regularization term, which is used to control the model complexity and avoid overfitting.
[0083] Among them, the definition formula of the regularization term is specifically as follows:
[0084] ;
[0085] In the formula, T represents the number of leaf nodes of the tree, is the weight of the leaf node, and Control the complexity of the model. At the same time, calculate the leaf node weights of each tree for optimization to help the model control the fitting accuracy and complexity:
[0086] ;
[0087] In the formula, and are the first-order and second-order derivatives of the loss function with respect to the predicted value respectively, represents the set of all samples in the j-th leaf node. The loss function is simplified by second-order Taylor expansion in the calculation. The loss function at the t-th iteration is:
[0088] ;
[0089] In the formula, is the predicted value of the i-th sample at the (t - 1)-th round, is the prediction of the t-th tree for the sample.
[0090] Furthermore, introduce the learning rate to control the contribution of each tree, thereby improving the stability of the model:
[0091] ;
[0092] In the formula, is the predicted value at the t-th iteration.
[0093] It can be understood that in the XGBoost model, the setting of hyperparameters directly affects the accuracy and complexity of the model.
[0094] In this embodiment, optimizing the hyperparameters of the current XGBoost model by using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model includes: determining the first fitness of the hyperparameter combination of the current XGBoost model according to the current fault diagnosis result, and using the ivy algorithm to determine the second fitness of the optimal hyperparameter combination of the current XGBoost model; optimizing the hyperparameter combination of the current XGBoost model based on the magnitude relationship between the first fitness and the second fitness, so as to obtain the next XGBoost model according to the optimized hyperparameter combination obtained.
[0095] The IVY algorithm is inspired by the growth pattern of ivy plants and simulates the growth and evolution of the plant. Its modeling process mainly includes the following steps:
[0096] The first step: Initialize the population. The population consists of multiple individuals, and each individual represents a combination of optimization parameters. The initial position is determined by the following formula:
[0097] ;
[0098] In the formula: is the position vector of the i-th individual; and are the upper and lower bounds of the search space respectively; represents a random vector uniformly distributed on the interval [0, 1), represents the Hadamard product.
[0099] Step 2: Set the update direction of the parameters to simulate the growth of ivy:
[0100] ;
[0101] In the formula: and represent the growth rates in the discrete-time system respectively; represents a random vector subject to the standard normal distribution.
[0102] Step 3: In the expansion stage, make the individual move towards the "strongest" neighbor for improvement to simulate the process of plants seeking sunlight:
[0103] ;
[0104] Step 4: In the climbing stage, in this stage, the individual tries to follow the best individual in the whole population to simulate the spread and evolution process of plants:
[0105] ;
[0106] At the end of each iteration, select the top optimal individuals as the new generation population until the termination condition is reached, and obtain the optimal individual .
[0107] Based on the above principle, in each embodiment, when determining the hyperparameter combination of the XGBoost model, the ivy algorithm is required to optimize the hyperparameters. Specifically, first, determine the first fitness of the hyperparameter combination of the current XGBoost model according to the current fault diagnosis result, and use the ivy algorithm to determine the second fitness of the optimal hyperparameter combination of the current XGBoost model, where the fitness refers to the difference between 1 and the accuracy of the diagnosis result; then optimize the hyperparameter combination of the current XGBoost model based on the magnitude relationship between the first fitness and the second fitness, so as to obtain the next XGBoost model according to the optimized hyperparameter combination obtained, that is, optimize the hyperparameters based on the principle of the minimum fitness value, that is, if the first fitness is greater than the second fitness, then determine the optimal hyperparameter combination as the optimized hyperparameter combination, so as to obtain the next XGBoost model with the optimized hyperparameter combination as the hyperparameter combination. That is to say, determine the accuracy of the current fault diagnosis result, and determine the first fitness of the current hyperparameter combination based on the accuracy; if the first fitness of the current hyperparameter combination is less than the second fitness of the optimal hyperparameter combination, then update the current hyperparameter combination to the new optimal hyperparameter combination, and obtain the next XGBoost model based on the new optimal hyperparameter combination; if the first fitness of the current hyperparameter combination is not less than the second fitness of the optimal hyperparameter combination, then update the optimal hyperparameter combination to the new optimal hyperparameter combination, and obtain the next XGBoost model based on the new optimal hyperparameter combination. The specific process of updating the optimal hyperparameter combination is as follows:
[0108] 2.1) Determine the accuracy of the current fault diagnosis result , based on the accuracy Determine the first fitness of the current hyperparameter combination , and the specific formula for obtaining the first fitness is:
[0109] ;
[0110] That is to say, the first fitness is 1 minus the accuracy of the current fault diagnosis result ;
[0111] 2.2) If the first fitness of the current hyperparameter combination is less than the second fitness of the optimal hyperparameter combination, then update the current hyperparameter combination to the new optimal hyperparameter combination;
[0112] 2.3) If the first fitness of the current hyperparameter combination is not less than the second fitness of the optimal hyperparameter combination, then update the optimal hyperparameter combination to the new optimal hyperparameter combination;
[0113] In summary, the principle of updating the optimal hyperparameter combination is to select the hyperparameter combination with the smallest fitness among the current hyperparameter combination and the optimal hyperparameter combination as the new optimal hyperparameter combination.
[0114] Take the four parameters of the maximum depth of the tree, learning rate, column sampling ratio by tree, and subsample sampling ratio of the XGBoost model as individuals in the ivy algorithm. In each iteration, use the value of the objective function as the criterion, that is, maximize the accuracy, and take the model parameters when the objective function value is the smallest as the optimal hyperparameters.
[0115] In this embodiment, obtaining the key measurement points of the drilling pump and the characteristics of the fault-sensitive signals includes: determining the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and performing feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix; if the new multi-dimensional feature index matrix does not meet the preset stability condition, then jump back to the step of using the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model; if the new multi-dimensional feature index matrix meets the preset stability condition, then calculate the importance scores of each measurement point and feature according to the feature marginal contribution values of each feature in the new multi-dimensional feature index matrix, and determine the importance score weights of each measurement point and feature according to the importance scores, so as to determine the key measurement points of the drilling pump and the characteristics of the fault-sensitive signals according to the importance score weights.
[0116] After obtaining the current target XGBoost model, it is also necessary to eliminate the features irrelevant to the fault in the multi-dimensional feature index matrix to update the multi-dimensional feature index matrix until there are no features to be eliminated in the latest multi-dimensional feature index matrix. The specific process is as follows:
[0117] 3.1) Determine the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and perform feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix. Specifically, calculate the comprehensive contribution degree based on the feature marginal contribution values, and then eliminate the features with a comprehensive contribution degree less than the preset contribution degree threshold, so as to obtain a new multi-dimensional feature index matrix. The interpretability algorithm improves the interpretability of fault diagnosis. Using the interpretability algorithm, the contribution degree of each feature to different types of faults can be calculated, and the redundant features with a comprehensive contribution degree less than the set threshold can be eliminated, which helps to simplify the subsequent model input, improve the model operation efficiency, and reduce unnecessary monitoring costs.
[0118] 3.2) If the new multi-dimensional feature index matrix does not meet the preset stability condition, then jump back to using the multi-dimensional feature index matrix to perform the current round of training on the current XGBoost model; it can be understood that if the new multi-dimensional feature index matrix does not meet the preset stability condition, then it is also necessary to use the target XGBoost model as the current XGBoost model and retrain the current XGBoost model. That is to say, after obtaining the new target XGBoost model, then jump to the step of determining the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model.
[0119] 3.3) If the new multi-dimensional feature index matrix meets the preset stability condition, then calculate the importance scores of each measurement point and feature according to the feature marginal contribution values of each feature in the new multi-dimensional feature index matrix. The specific formula is as follows:
[0120] ;
[0121] ;
[0122] In the formula, m is the total number of features in the new multi-dimensional feature index matrix, is the number of features included in different measurement points in the new multi-dimensional feature index matrix, is the total number of features included in the measurement point, is the number of different types of features in the new multi-dimensional feature index matrix, and are the calculated importance scores of the measurement point and the feature, represents the feature marginal contribution value of different features in the new multi-dimensional feature index matrix.
[0123] 3.4) Determine the importance score weights of each measurement point and feature according to the importance scores, so as to determine the key measurement points of the drilling pump and the fault-sensitive signal features according to the importance score weights. Among them, the formula for the importance score weights is specifically as follows:
[0124] ;
[0125] ;
[0126] In the formula, and respectively represent the importance score weights of each measurement point and feature. Determine the measurement points and features with importance score weights within the preset range as the key measurement points of the drilling pump and the fault-sensitive signal features. Among them, the preset range can specifically be 0.4 - 1.0.
[0127] In this embodiment, determining the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and performing feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix, includes: calculating the feature marginal contribution degrees of each feature in the multi-dimensional feature index matrix under each contribution category for each path of each tree in the target XGBoost model in sequence based on the interpretability algorithm; determining the absolute average value of the feature marginal contribution degrees, and accumulating each absolute average value to obtain the comprehensive contribution degree of the multi-dimensional feature index matrix to the current fault diagnosis result; eliminating the features in the multi-dimensional feature index matrix whose comprehensive contribution degree is less than a preset contribution degree threshold to obtain a new multi-dimensional feature index matrix.
[0128] Further, the specific process of determining the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and performing feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix is as follows:
[0129] 3.1.1) Calculating the feature marginal contribution degrees of each feature in the multi-dimensional feature index matrix under each contribution category for each path of each tree in the target XGBoost model in sequence based on the interpretability algorithm; the formula for the feature marginal contribution degree is as follows:
[0130] ;
[0131] In the formula, is the set of all signal features, [[ID=?]] is the feature subset that does not include the signal feature , is the model output on the feature subset , is the model output after adding to the feature subset , is the marginal contribution degree (Shapley value) of the feature , that is, the contribution of the feature to the model output.
[0132] 3.1.2) Determining the absolute average value of the feature marginal contribution degrees, and accumulating each absolute average value to obtain the comprehensive contribution degree of the multi-dimensional feature index matrix to the current fault diagnosis result.
[0133] 3.1.3) Eliminating the features in the multi-dimensional feature index matrix whose comprehensive contribution degree is less than the preset contribution degree threshold It should be noted that there seems to be a missing tag value in the original text at the position marked with "?". This may cause some inaccuracies in the translation of the relevant part. You can check and correct it according to the actual situation.features to obtain a new multi-dimensional feature index matrix. The specific formula is as follows:
[0134] ;
[0135] In the formula, represents the feature marginal contribution value of different features after feature elimination. Among them, the preset contribution threshold can specifically be 0.1.
[0136] Step S14: Determine the key measuring points of the drilling pump and the characteristics of the fault-sensitive signals as the state perception scheme and the state representation characteristics respectively.
[0137] Determining the key measuring points of the drilling pump as the state perception scheme, it can be understood that the key measuring points of the drilling pump are obtained by eliminating the measuring points that are irrelevant to the fault or have too low a correlation with the fault from the initial 10 measuring points. Therefore, the key measuring points of the drilling pump are the measuring points that are related to the fault and have a relatively high correlation; further, determining the characteristics of the fault-sensitive signals as the state representation characteristics, that is, screening out the state representation characteristics that are highly related to the fault from the original multiple features, and the state representation characteristics have stronger fault feature representation capabilities.
[0138] Step S15: When obtaining the current multi-source parameter working condition data of the drilling pump, input the current multi-source parameter working condition data into the target XGBoost model so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation characteristics.
[0139] When fault diagnosis is required, obtain the current multi-source parameter working condition data of the drilling pump, and input the current multi-source parameter working condition data into the target XGBoost model so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation characteristics.
[0140] The beneficial effects of this application are as follows: This application collects historical multi-source parameter working condition data at each measuring point of the drilling pump; aligns the historical multi-source parameter working condition data based on a sliding window, and extracts features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix; uses the ivy algorithm and the multi-dimensional feature index matrix to optimize the initial XGBoost model, and performs feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measuring points of the drilling pump, and the fault-sensitive signal features; determines the key measuring points of the drilling pump and the fault-sensitive signal features as the state perception scheme and the state representation features respectively; when obtaining the current multi-source parameter working condition data of the drilling pump, inputs the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features. It can be seen that this application collects historical multi-source parameter working condition data at each measuring point of the drilling pump. Also, because the collected data is multi-source, it is necessary to align the historical multi-source parameter working condition data based on a sliding window to obtain synchronous sliding window data, and then feature extraction can be performed on the synchronous sliding window data, thereby constructing a multi-dimensional feature index matrix; further, the initial XGBoost model is optimized using the ivy algorithm and the multi-dimensional feature index matrix, and feature elimination is performed on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measuring points of the drilling pump, and the fault-sensitive signal features. That is to say, redundant features and measuring points unrelated to faults in the multi-dimensional feature index matrix are eliminated, and features and measuring points that can affect faults are retained. Moreover, the initial XGBoost model is optimized using the ivy algorithm and the multi-dimensional feature index matrix, avoiding the subjectivity problem of determining parameters according to experience. The key measuring points of the drilling pump and the fault-sensitive signal features are determined as the state perception scheme and the state representation features respectively. In this way, when obtaining the current multi-source parameter working condition data of the drilling pump, combining the state perception scheme and the state representation features, and using the target XGBoost model to output the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data, the target fault diagnosis result of the drilling pump is more accurate and has a higher credibility.
[0141] The following uses the method of this application for fault diagnosis testing and compares the test results with several different models commonly used in the prior art to verify the effectiveness and accuracy of the method of the present invention.
[0142] In data acquisition, the sampling frequency of the vibration sensor is set to 10 KHz, and the sampling frequencies of the pressure and temperature sensors are set to 10 Hz. 240 seconds of data are collected at each measurement point, covering 60 seconds of healthy conditions and 60 seconds of each of the three types of faults. During the experiment, the data is divided, with 80% of the data used as the training set for training and 20% of the data used for testing. The labels 0 to 3 are used for the healthy state, left liquid cylinder liner piston fault, suction pipe blockage, and left liquid cylinder suction valve body fault respectively.
[0143] Through feature elimination, the final retained feature information in this article is as Figure 2 shown. The names of different features mainly consist of two parts. The first half represents the specific feature of signal extraction, and the second half represents the acquisition location of the signal, that is, the measurement point information. Based on the retained feature information, the importance scores of the measurement points and features are calculated. The finally determined key measurement points are the discharge pipe (pressure) and the bottom of the left - suction liquid cylinder (vibration), and the importance score weights are 1.0 and 0.49 respectively. The fault - sensitive signal features are Pres_1, PeEn, VF, MSF, ApEn, DEn, SKMean, Ske, and SKStd, and the importance score weights are 1.0, 0.89, 0.76, 0.71, 0.61, 0.43, 0.43, 0.43, and 0.42 respectively.
[0144] In summary, the discharge pipe pressure sensor and the vibration sensor at the bottom of the left - suction liquid cylinder can be used as a state perception solution. The pressure signal feature of the discharge pipe and the PeEn, VF, MSF, ApEn, DEn, SKMean, Ske, and SKStd features of the vibration signal can be used as the state characterization features of the drilling pump. Four algorithms, namely RF, XGBoost, 1D - CNN, and Transformer, are selected to construct diagnostic models for comparison. The comparison results are shown in Table 1:
[0145] Table 1
[0146]
[0147] Among them, the Ivy - XGBoost model performs the best in the fault diagnosis of the drilling pump. The schematic diagram of the diagnostic confusion matrix is as Figure 3 shown, with an accuracy rate of 99.79%. Compared with XGBoost at 98.12%, RF at 97.29%, Transformer at 98.75%, and 1D - CNN at 98.96%. At the same time, the accuracy rates of each model exceed 97%, verifying the effectiveness of the state perception solution and the selection of state characterization features.
[0148] See Figure 4 shown. An embodiment of the present application discloses a drilling pump fault diagnosis device based on integrated state perception and characterization, including:
[0149] A historical data acquisition module 11, configured to acquire historical multi-source parameter working condition data of each measuring point of a drilling pump;
[0150] A multi-dimensional matrix construction module 12, configured to align the historical multi-source parameter working condition data based on a sliding window, and perform feature extraction on the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix;
[0151] A model information acquisition module 13, configured to optimize an initial XGBoost model by using an ivy algorithm and the multi-dimensional feature index matrix, and perform feature elimination on the multi-dimensional feature index matrix based on each feature marginal contribution value to obtain a target XGBoost model, key measuring points of the drilling pump, and fault-sensitive signal features;
[0152] A perception representation determination module 14, configured to respectively determine the key measuring points of the drilling pump and the fault-sensitive signal features as a state perception scheme and state representation features;
[0153] A fault diagnosis module 15, configured to, when acquiring current multi-source parameter working condition data of the drilling pump, input the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs a target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features.
[0154] The beneficial effects of this application are as follows: This application collects historical multi-source parameter working condition data at each measuring point of the drilling pump; aligns the historical multi-source parameter working condition data based on a sliding window, and extracts features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix; uses the ivy algorithm and the multi-dimensional feature index matrix to optimize the initial XGBoost model, and performs feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measuring points of the drilling pump, and the fault-sensitive signal features; determines the key measuring points of the drilling pump and the fault-sensitive signal features as the state perception scheme and the state representation features respectively; when obtaining the current multi-source parameter working condition data of the drilling pump, inputs the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features. It can be seen that this application collects historical multi-source parameter working condition data at each measuring point of the drilling pump. Also, because the collected data is multi-source, it is necessary to align the historical multi-source parameter working condition data based on a sliding window to obtain synchronous sliding window data, and then features can be extracted from the synchronous sliding window data, thereby constructing a multi-dimensional feature index matrix; further, uses the ivy algorithm and the multi-dimensional feature index matrix to optimize the initial XGBoost model, and performs feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measuring points of the drilling pump, and the fault-sensitive signal features. That is to say, redundant features and measuring points irrelevant to the fault in the multi-dimensional feature index matrix are eliminated, and features and measuring points that can affect the fault are retained. And the initial XGBoost model is optimized using the ivy algorithm and the multi-dimensional feature index matrix, avoiding the subjectivity problem of determining parameters according to experience. The key measuring points of the drilling pump and the fault-sensitive signal features are determined as the state perception scheme and the state representation features respectively. In this way, when obtaining the current multi-source parameter working condition data of the drilling pump, combining the state perception scheme and the state representation features, and using the target XGBoost model to output the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data, the target fault diagnosis result of the drilling pump is more accurate and has a higher credibility.
[0155] Furthermore, an embodiment of this application also provides an electronic device. Figure 5 It is a structural diagram of the electronic device 20 shown according to an exemplary embodiment, and the content in the figure should not be regarded as any limitation on the scope of use of this application.
[0156] Figure 5A schematic structural diagram of an electronic device provided by an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the method for diagnosing drilling pump faults based on integrated state perception and characterization performed by the electronic device disclosed in any of the foregoing embodiments.
[0157] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0158] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0159] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc., and the resources stored thereon include an operating system 221, a computer program 222, and data 223, etc., and the storage method may be temporary storage or permanent storage.
[0160] Among them, the operating system 221 is used to manage and control each hardware device and computer program 222 on the electronic device, so as to implement the operation and processing of the large amount of data 223 in the memory 22 by the processor 21. It can be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the drilling pump fault diagnosis method based on integrated state perception and characterization executed by the electronic device disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by external devices received by the electronic device, but also the data collected by its own input / output interface 25, etc.
[0161] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the drilling pump fault diagnosis method based on integrated state perception and characterization disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0162] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and reference can be made to the description in the method part for related parts.
[0163] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable EPROM (Erasable Programmable Read Only Memory), electrically erasable programmable EEPROM (Electrically Erasable Programmable read only memory), registers, hard disks, removable disks, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium well-known in the technical field.
[0164] Finally, it should also be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0165] The above has introduced in detail a fault diagnosis method, device, equipment and medium for a drilling pump based on integrated state perception and characterization. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A fault diagnosis method for a drilling pump based on integrated state perception and characterization, characterized in that, Including: Collecting historical multi-source parameter working condition data at each measuring point of the drilling pump; Aligning the historical multi-source parameter working condition data based on a sliding window, and extracting features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix; Optimizing the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix, and performing feature elimination on the multi-dimensional feature index matrix based on the marginal contribution values of each feature to obtain the target XGBoost model, the key measuring points of the drilling pump, and the fault-sensitive signal features; Respectively determining the key measuring points of the drilling pump and the fault-sensitive signal features as the state perception scheme and the state representation features; When obtaining the current multi-source parameter working condition data of the drilling pump, inputting the current multi-source parameter working condition data into the target XGBoost model, so that the target XGBoost model outputs the target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features.
2. The fault diagnosis method of a drilling pump based on integrated state perception and characterization according to claim 1, wherein The operating conditions in the historical multi-source parameter working condition data include normal state and fault state, and the multi-source parameters in the historical multi-source parameter working condition data include vibration data, temperature data, and pressure data. Among them, the vibration data includes the vibration data of the suction branch pipe of the drilling pump, the vibration data at the bottom of the suction liquid cylinder, and the vibration data of the drive shaft bearing seat. The pressure data includes the suction pipe pressure data and the discharge pipe pressure data of the drilling pump, and the temperature data includes the lubricating oil temperature data.
3. The fault diagnosis method of the drilling pump based on integrated state perception and characterization according to claim 2, characterized in that The aligning the historical multi-source parameter working condition data based on a sliding window, and extracting features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix includes: Dividing the vibration data, the temperature data, and the pressure data into multiple equal-length windows according to the sampling frequency of the multi-source parameters to perform window timestamp alignment on the vibration data, the temperature data, and the pressure data to obtain vibration synchronous sliding window data, temperature synchronous sliding window data, and pressure synchronous sliding window data; Extracting features from the vibration synchronous sliding window data to obtain time-domain features, frequency-domain features, and entropy value features under each window; Concatenating the time-domain features, the frequency-domain features, the entropy value features, the temperature synchronous sliding window data, and the pressure synchronous sliding window data to obtain feature vectors under each measuring point, and integrating the feature vectors under each measuring point in a unified feature matrix to obtain a multi-dimensional feature index matrix.
4. The fault diagnosis method of the drilling pump based on integrated state perception and characterization according to claim 2, characterized in that, Optimizing the initial XGBoost model using the ivy algorithm and the multi-dimensional feature index matrix to obtain the target XGBoost model includes: Determining the initial XGBoost model as the current XGBoost model; Training the current XGBoost model in the current round using the multi-dimensional feature index matrix to obtain the current fault diagnosis result output by the current XGBoost model; Optimize the hyperparameters of the current XGBoost model using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model; If the current preset optimization stop condition is met, determine the next XGBoost model as the target XGBoost model; If the current preset optimization stop condition is not met, update the next XGBoost model to the current XGBoost model and jump back to the step of training the current XGBoost model in the current round using the multi-dimensional feature index matrix.
5. The fault diagnosis method of a drilling pump based on integrated state perception and characterization according to claim 4, wherein The step of optimizing the hyperparameters of the current XGBoost model using the ivy algorithm and the current fault diagnosis result to obtain the next XGBoost model includes: Determine the first fitness of the hyperparameter combination of the current XGBoost model according to the current fault diagnosis result, and use the ivy algorithm to determine the second fitness of the optimal hyperparameter combination of the current XGBoost model; Optimize the hyperparameter combination of the current XGBoost model based on the magnitude relationship between the first fitness and the second fitness, and obtain the next XGBoost model according to the optimized hyperparameter combination.
6. The fault diagnosis method of a drilling pump based on integrated state perception and characterization according to claim 4, characterized in that, Obtain the key measuring points of the drilling pump and the characteristics of the fault-sensitive signals, including: Based on the interpretability algorithm and the target XGBoost model, determine the feature marginal contribution values of each feature in the multi-dimensional feature index matrix, and perform feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix; If the new multi-dimensional feature index matrix does not meet the preset stability condition, jump back to the step of training the current XGBoost model in the current round using the multi-dimensional feature index matrix; If the new multi-dimensional feature index matrix meets the preset stability condition, calculate the importance scores of each measuring point and feature according to the feature marginal contribution values of each feature in the new multi-dimensional feature index matrix, and determine the importance score weights of each measuring point and feature according to the importance scores, so as to determine the key measuring points of the drilling pump and the characteristics of the fault-sensitive signals according to the importance score weights.
7. The fault diagnosis method of a drilling pump based on integrated state perception and characterization according to claim 6, characterized in that The step of determining the feature marginal contribution values of each feature in the multi-dimensional feature index matrix based on the interpretability algorithm and the target XGBoost model, and performing feature elimination on each feature in the multi-dimensional feature index matrix based on the feature marginal contribution values to obtain a new multi-dimensional feature index matrix includes: Based on the interpretability algorithm, calculate the feature marginal contribution degrees of each feature in the multi-dimensional feature index matrix under each contribution category for each path of each tree in the target XGBoost model in turn; Determine the absolute average value of the feature marginal contribution degrees, and accumulate each absolute average value to obtain the comprehensive contribution degree of the multi-dimensional feature index matrix to the current fault diagnosis result; Eliminate the features in the multi-dimensional feature index matrix whose comprehensive contribution degree is less than the preset contribution degree threshold to obtain a new multi-dimensional feature index matrix.
8. A drilling pump fault diagnosis device based on integrated state perception and characterization, characterized in that, Include: A historical data acquisition module, which is used to acquire historical multi-source parameter working condition data of each measuring point of the drilling pump; A multi-dimensional matrix construction module, which is used to align the historical multi-source parameter working condition data based on a sliding window, and extract features from the obtained synchronous sliding window data to construct a multi-dimensional feature index matrix; A model information acquisition module, which is used to optimize an initial XGBoost model by using the ivy algorithm and the multi-dimensional feature index matrix, and perform feature elimination on the multi-dimensional feature index matrix based on each feature marginal contribution value to obtain a target XGBoost model, key measuring points of the drilling pump, and fault-sensitive signal features; A perception representation determination module, which is used to determine the key measuring points of the drilling pump and the fault-sensitive signal features as a state perception scheme and state representation features respectively; A fault diagnosis module, which is used to input the current multi-source parameter working condition data of the drilling pump into the target XGBoost model when the current multi-source parameter working condition data of the drilling pump is acquired, so that the target XGBoost model outputs a target fault diagnosis result of the drilling pump corresponding to the current multi-source parameter working condition data based on the state perception scheme and the state representation features.
9. An electronic device, characterized in that, Comprising: A memory, which is used to store a computer program; A processor, which is used to execute the computer program to implement the steps of the drilling pump fault diagnosis method based on integrated state perception and representation according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, the steps of the drilling pump fault diagnosis method based on integrated state perception and representation according to any one of claims 1 to 7 are implemented.