Intelligent diagnosis method for pumping unit well under complex working conditions based on edge-cloud collaborative reasoning

CN122964728APending Publication Date: 2026-10-23SHANDONG HENENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611441917.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

然而,抽油机井运行数据具有多源异构特征,井下故障不仅改变示功图形态,还会引起电参数和流体参数变化

Benefits of technology

通过采集抽油机井的多源运行数据,能够同步获取示功图、电力及流体等多维信息,避免单一运行参数无法全面反映井下真实运行状态的问题,有助于提高复杂运行条件下工况识别的可靠性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964728A_ABST
    Figure CN122964728A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial data processing, in particular to an intelligent diagnosis method for a pumping unit well under a composite working condition based on edge-cloud collaborative reasoning, which comprises the following steps: collecting multi-source operation data of the pumping unit well; dividing a pumping cycle; extracting a dynamometer card feature, an electric power feature and a fluid feature, and constructing a working condition recognition vector, wherein the dynamometer card feature comprises a load area deviation and a stroke imbalance degree; training a pumping unit well working condition diagnosis model and simplifying the same to obtain an edge-side diagnosis model; inputting the working condition recognition vector obtained according to the multi-source operation data collected in real time into the edge-side diagnosis model to obtain a diagnosis result and a diagnosis confidence, and if the comparison result of the diagnosis confidence and a preset confidence threshold meets a preset edge-side output condition, the diagnosis result is directly output, otherwise, the pumping unit well working condition diagnosis model is used for composite working condition rejudgment. The application can effectively improve the accuracy and reliability of composite working condition recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial data processing technology, specifically to an intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning. Background Technology

[0002] Rod-operated pumping systems are the primary artificial lift method in onshore oilfields, accounting for approximately 80% of crude oil production. Currently, there are over 500,000 operating pumping wells. In actual production, these wells operate cyclically and repeatedly over long periods. Influenced by factors such as formation fluid supply, wellbore pressure, gas-liquid ratio, sucker rod condition, and pump and valve sealing performance, they are prone to abnormal conditions such as insufficient fluid supply, gas interference, sucker rod breakage, and valve leakage. Furthermore, multiple abnormalities can occur simultaneously, forming compound faults and complicating operational conditions. Real-time monitoring and fault diagnosis of operational conditions are directly related to stable crude oil production, production safety, and extraction cost control.

[0003] For a long time, the diagnosis of pumping unit well conditions has mainly relied on surface dynamometer card analysis. However, pumping unit well operating data has multi-source heterogeneous characteristics. Downhole faults not only change the shape of the dynamometer card but also cause changes in electrical and fluid parameters. When using a single dynamometer card or a single operating parameter for diagnosis, fault characteristics are easily confused, leading to a decrease in the accuracy of identifying complex operating conditions. Summary of the Invention

[0004] To address the aforementioned issues, an intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning is provided to effectively improve the accuracy and reliability of combined operating condition identification.

[0005] The intelligent diagnostic method for combined operating conditions of pumping unit wells based on edge-cloud collaborative reasoning in this application adopts the following technical solution: One embodiment of this application provides an intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning. The method includes the following steps: Collect multi-source operational data of pumping wells; identify local extrema of suspension point displacement in multi-source operational data to divide the pumping cycle; For each pumping cycle after division, dynamometer features, electrical features, and fluid features are extracted based on multi-source operating data and used to construct an operating condition identification vector. Among them, the dynamometer features include load area deviation and stroke unbalance, and the electrical features and fluid features include features that reflect the average level and changing trend of the operating data. A diagnostic model for pumping unit well conditions is trained using operating condition identification vectors and simplified to obtain an edge-side diagnostic model. The working condition identification vector obtained from the real-time multi-source operating data is input into the edge-side diagnostic model to obtain the diagnostic result and diagnostic confidence. If the comparison result between the diagnostic confidence and the preset confidence threshold meets the preset edge-side output conditions, the diagnostic result is directly output; otherwise, the working condition identification vector and multi-source operating data are uploaded to the cloud and composite working condition re-judgment is performed through the pumping well working condition diagnostic model.

[0006] Optionally, the multi-source operating data may also include: wellhead pressure, casing pressure, oil pressure, fluid temperature, production rate, suspension load, three-phase current, and active power.

[0007] Optionally, the process of dividing the oil extraction cycle is as follows: The minimum value of the suspension point displacement data is obtained by identifying local extrema, and adjacent minimum values ​​are used as the start and end times of the pumping cycle. Within each pumping cycle, the maximum value of the suspension point displacement data is taken as the stroke inflection point to distinguish between the upstroke and the downstroke.

[0008] Optionally, the calculation process for the load area deviation is as follows: Extract the absolute difference between the approximate integral areas corresponding to the left and right halves of the indicator diagram during the oil pumping cycle; The ratio of the absolute difference to the approximate integral area corresponding to the total displacement during the pumping cycle is taken as the load area deviation.

[0009] Optionally, the calculation process for the stroke unbalance is as follows: The ratio of the absolute difference between the duration of the upstroke and the duration of the downstroke in the pumping cycle to the duration of the pumping cycle is taken as the stroke imbalance.

[0010] Optionally, the features reflecting the average level and trend of the operating data include: The mean, dispersion, and linear fitting slope of the power data segments extracted during the oil pumping cycle; The mean, dispersion, and linear fitting slope of the fluid data segments extracted during the pumping cycle.

[0011] Optionally, the edge-side diagnostic model is constructed by performing network pruning and parameter quantization on the pumping unit well condition diagnostic model.

[0012] Optionally, the process of obtaining the diagnostic confidence level is as follows: A single operating condition identification vector is input into the edge-side diagnostic model to calculate the predicted probability of each operating condition for the single operating condition identification vector; the diagnostic confidence is the maximum value among all the predicted probabilities of the single operating condition identification vector.

[0013] Optionally, the process of obtaining the preset confidence threshold is as follows: Input the condition identification vectors of multiple known working conditions into the edge-side diagnostic model to obtain the diagnostic confidence of each working condition identification vector; The preset confidence threshold is the difference between the mean and standard deviation of the diagnostic confidence of all operating condition identification vectors.

[0014] Optionally, the preset edge-side output condition is that the diagnostic confidence level is greater than the preset confidence threshold.

[0015] This application has at least the following beneficial effects: By collecting multi-source operating data from pumping wells, it is possible to simultaneously acquire multi-dimensional information such as dynamometer diagrams, power and fluid, avoiding the problem that a single operating parameter cannot fully reflect the actual downhole operating status, and helping to improve the reliability of operating condition identification under complex operating conditions. By identifying local extreme values ​​of the suspension point displacement to divide the oil pumping cycle, the multi-source operating data can be time-aligned according to the periodic motion law, a unified cycle benchmark can be established, and the synchronicity and comparability of the multi-source operating data within the same oil pumping cycle can be guaranteed. Based on multi-source operation data, dynamometer diagram features, electrical features and fluid features are extracted and operating condition identification vectors are constructed. This enables comprehensive analysis of dynamometer diagram morphology, electrical features and fluid parameter changes, characterizing the operating status from different dimensions, and effectively avoiding the problem of easy confusion of fault features when diagnosing with a single operating parameter. By training a pumping unit well operating condition diagnostic model using operating condition identification vectors and simplifying it to obtain an edge-side diagnostic model, the model complexity can be reduced while maintaining diagnostic capabilities, enabling edge terminals to have real-time diagnostic capabilities. Then, the real-time acquired operating condition identification vectors are input into the edge-side diagnostic model to obtain diagnostic results and diagnostic confidence. If the preset edge-side output conditions are met, the results are directly output; otherwise, they are uploaded to the cloud for composite operating condition re-judgment through the pumping unit well operating condition diagnostic model. This approach can balance the real-time performance and accuracy of diagnosis, effectively improving the accuracy and reliability of composite operating condition identification. Attached Figure Description

[0016] Figure 1 A flowchart illustrating the steps of the intelligent diagnostic method for combined working conditions of pumping wells based on edge-cloud collaborative reasoning provided in this application; Figure 2 This is an ideal indicator diagram for an oil pumping unit. Detailed Implementation

[0017] The following description, in conjunction with the accompanying drawings, details the specific scheme of the intelligent diagnostic method for combined working conditions of pumping wells based on edge-cloud collaborative reasoning provided in this application.

[0018] This application provides an embodiment of an intelligent diagnostic method for combined operating conditions of pumping unit wells based on edge-cloud collaborative reasoning. Specifically, the method is described below. Please refer to [link to relevant documentation]. Figure 1 The method includes the following steps: Step 1: Collect multi-source operational data from the pumping unit well.

[0019] The operating status of a pumping unit well cannot be fully reflected by a single operating parameter. Specifically, the dynamometer card directly reflects the force relationship of the suspension load as displacement changes, serving as the basis for judging the state of the sucker rod, pump, and downhole fluid; current and power reflect the load changes of the pumping unit drive motor; changes in pressure and temperature characterize the fluid state and gas-liquid changes inside the wellbore; and production rate directly reflects the actual production capacity of the oil well. Therefore, when diagnosing the operating condition of a pumping unit, it is necessary to fuse multi-source operating data of the pumping unit well to improve the accuracy of diagnosing complex operating conditions.

[0020] To obtain the above multi-source operational data, the following data collection method is adopted: A suspension point load sensor is installed at the suspension point of the pumping unit to measure the suspension point load in real time. The suspension point load sensor is specifically a strain gauge load sensor. A displacement sensor is installed at the output shaft of the gearbox to measure the suspension point displacement in real time. The displacement sensor is specifically a magnetostrictive displacement sensor. The suspension point displacement and suspension point load are kinematically converted and then used to construct a dynamometer diagram. Intelligent electrical measuring instruments are installed on the incoming side of the pumping unit control cabinet to collect three-phase current and active power in real time. An oil pressure sensor is installed at the wellhead production line tubing outlet, a casing pressure sensor is installed at the casing valve, and a pressure transmitter and an industrial temperature sensor are installed at the wellhead tubing outlet to collect real-time data on oil pressure, casing pressure, wellhead pressure, and fluid temperature, respectively; the industrial temperature sensor is specifically a thermocouple. An electromagnetic flow meter is installed on the wellhead gathering and transportation pipeline to obtain the production volume in real time.

[0021] In this embodiment, the acquisition frequency of wellhead pressure, casing pressure, oil pressure, fluid temperature and production volume is 1Hz, and the acquisition frequency of suspension load, suspension displacement, three-phase current and active power is 100Hz. The total acquisition time is 10min. The acquisition frequency and the total acquisition time can be adjusted by the implementer according to the actual situation. This application does not make specific limitations on this.

[0022] The various operational data collected above are arranged in chronological order and denoised using the mean filtering method. The mean filtering method is a well-known technique, and the specific calculation process will not be described in detail in this application. Implementers can choose other existing feasible techniques as long as they can denoise the various operational data.

[0023] Step 2: Identify local extrema of the suspension point displacement in the multi-source operating data to divide the oil pumping cycle.

[0024] Pumping units are periodically reciprocating devices; the suction and discharge of the downhole pump, as well as the changes in force on the sucker rod, all vary periodically with the pumping motion. When abnormal operating conditions occur, these periodic operating patterns will change significantly, leading to noticeable deviations in the data generated during periodic operation. Therefore, when diagnosing the operating conditions of a pumping unit, it is necessary to identify the initial and final points of the pumping unit's periodic motion.

[0025] A complete pumping cycle of an oil pumping unit consists of two phases: the upstroke and the downstroke. During these two phases, the displacement of the suspension point changes systematically. By identifying the local maxima and minima of the suspension point displacement, the top dead center and bottom dead center of the pumping unit can be determined, thus enabling precise division of the complete pumping cycle.

[0026] The suspension point displacements are arranged in time sequence to form a suspension point displacement sequence. The local extremum algorithm of the sliding window is used to find the minimum and maximum values ​​of the suspension point displacement sequence. The half-width of the sliding window is defined as the number of sampling points corresponding to half a signal cycle of the maximum allowable pumping cycle frequency of the pumping unit. Furthermore, a sampling point is recorded as a minimum only when its suspension point displacement is simultaneously less than all suspension point displacements within the half-width range of the sliding window to its left and right; a sampling point is recorded as a maximum only when its suspension point displacement is simultaneously greater than all suspension point displacements within the half-width range of the sliding window to its left and right.

[0027] Two adjacent minimum values ​​correspond to the start and end of a pumping cycle, respectively. Arranging all minimum values ​​in the suspension point displacement sequence according to time sequence yields the cycle node identification sequence; arranging the times of all minimum values ​​in the suspension point displacement sequence according to time sequence yields the cycle node time sequence, which is used to characterize the time node distribution of the pumping unit's cycle motion.

[0028] Furthermore, the maxima whose timestamps are less than the first element in the time sequence of the periodic node are removed, and the maxima whose timestamps are greater than the last element in the time sequence of the periodic node are also removed. The remaining maxima are arranged in chronological order to obtain the stroke inflection point displacement sequence. The timestamps of the remaining maxima are arranged in chronological order to obtain the stroke inflection point time sequence, which is used to characterize the inflection points of the upstroke and downstroke in each pumping cycle. The sliding window local extremum algorithm is a well-known technique, and the specific calculation process will not be described in detail in this application.

[0029] Specifically, if multiple maxima exist within a single pumping cycle, only the maximum value is retained; if no maxima exist within a single pumping cycle, the single pumping cycle is deemed invalid, and the corresponding start time, end time, and suspension point displacement are simultaneously removed from the cycle node time sequence and cycle node identification sequence.

[0030] The degree of fluctuation in the duration and frequency of the pumping cycle reflects the stability of the pumping unit's operation. Specifically, the greater the difference in the duration and frequency of different pumping cycles, the more unstable the pumping unit is, and the more prone it is to malfunction. Therefore, based on the above division of pumping cycles, the duration and frequency of each pumping cycle are calculated using the following formula: In the formula, This represents the duration of the k-th pumping cycle; , These represent the (k+1)th and (k)th elements in the time sequence of the cycle nodes, i.e., the end time and start time of the kth pumping cycle, respectively. In the formula, This represents the frequency of the k-th pumping cycle.

[0031] Specifically, if there is a case where the duration is 0 when calculating the frequency, the sum of the duration and the preset value greater than 0 is calculated first, and then subsequent calculations are performed. In this embodiment, the preset value greater than 0 is 0.001s. The implementer can set the specific value of the preset value greater than 0 according to the actual situation. This application does not impose any special restrictions on this.

[0032] Step 3: For each pumping cycle after division, extract the dynamometer features based on multi-source operating data.

[0033] The dynamometer diagram reflects the downhole operating status of the pumping unit, and the relationship between the suspension point displacement and the suspension point load characterizes the stress level of the sucker rod. Under normal operating conditions, the sucker head drives the polished rod in a reciprocating motion, resulting in a periodic change in the suspension point displacement. The suspension point load is mainly influenced by the sucker rod's own weight, the liquid column load, and the opening and closing status of the pumps and valves. These factors collectively determine the stable variation pattern between the suspension point displacement and the suspension point load. Ideally, the dynamometer curve formed by a complete pumping cycle approximates a regular closed parallelogram. Figure 2 This is an ideal indicator diagram for an oil pumping unit. Figure 2 The running trajectory of the ideal indicator diagram of the pumping unit follows The sequence of closing is given, where C1 and C2 are the displacement center points of the upstroke and downstroke, respectively.

[0034] When the pumping unit experiences abnormal conditions such as gas interference, insufficient fluid supply, valve leakage, or sucker rod breakage, the filling degree of the downhole pump, the opening and closing status of the valves, and the stress state of the sucker rod will change accordingly. This will cause the correspondence between the suspension point load and the suspension point displacement to deviate from the normal law, and the dynamometer card will show abnormal characteristics such as reduced area, curve deformation, local depression, or sudden load change.

[0035] Therefore, the area of ​​the indicator diagram can comprehensively reflect the effective load effect of the pumping unit within one pumping cycle. When insufficient liquid supply or gas influence leads to reduced pump efficiency, the effective load at the suspension point decreases, and the area of ​​the indicator diagram will decrease significantly. When there is abnormal friction or increased load, the area of ​​the indicator diagram may increase abnormally. Therefore, the area of ​​the indicator diagram can be used as a characteristic quantity to characterize the overall working state of the pumping unit.

[0036] Furthermore, the area of ​​the indicator diagram for each pumping cycle is calculated using the following formula: In the formula, The area of ​​the indicator diagram during the k-th pumping cycle; This indicates the k-th element in the periodic node identification sequence; This represents the k-th element in the stroke inflection point displacement sequence, that is, the displacement value corresponding to the top dead center of the k-th pumping cycle; This represents the (k+1)th element in the periodic node identification sequence; the suspension point loads are arranged according to time sequence to form a suspension point load sequence. This represents the suspension point load sequence. Characterization Figure 2 middle The area of ​​the closed figure formed; Characterization Figure 2 middle The area of ​​the resulting closed figure is calculated as a negative value.

[0037] It should be noted that the area of ​​the indicator diagram is obtained by numerically integrating the suspension point load with respect to the suspension point displacement in each pumping cycle. The numerical integration adopts the trapezoidal rule and is approximately calculated by summing the product of the displacement difference between adjacent discrete sampling points and the load mean.

[0038] ; In the formula, This represents the area of ​​the left half of the indicator diagram, that is, the area of ​​the closed figure formed by ABC1C2; The calculation result is negative; This represents the area of ​​the right half of the indicator diagram, that is, the area of ​​the closed figure formed by C1CDC2; The calculation result is negative.

[0039] Specifically, when the calculated integral limit displacement is not at the actual sampling point, the actual discrete sampling point that is closest to the integral limit displacement is selected as the approximate boundary.

[0040] Furthermore, the load area deviation for the kth pumping cycle is calculated using the following formula: ; This represents the load area deviation during the k-th pumping cycle; This indicates the absolute value operation.

[0041] Specifically, if during the calculation of load area deviation, there are For the case where the value is 0, calculate first. The sum of the constant value greater than 0 and a preset constant value is used for subsequent calculations. In this embodiment, the preset constant value greater than 0 is 0.001, and the preset constant value greater than 0 is summed with... With the same unit, implementers can adjust the specific value of the preset constant greater than 0 according to the actual situation. This application does not impose any special restrictions on this.

[0042] Understandably, since the collected data is arranged chronologically, industrial data processing requires segmenting the suspension load data by stroke, extracting curve segments for the upstroke and downstroke respectively. By analyzing the difference between the areas of the left and right halves of the indicator diagram, the load area deviation for the k-th pumping cycle is obtained. The larger the calculated load area deviation, the more severe the deviation of the pumping unit's operating state from normal symmetry, and the greater the probability of failure, thus helping to improve the accuracy of complex operating condition diagnosis.

[0043] Furthermore, the suspension point loads within the start and end times of the k-th pumping cycle are extracted from the suspension point load sequence to obtain the suspension point loads of the k-th pumping cycle, including the suspension point loads at the start and end times of the k-th pumping cycle. The maximum and minimum suspension point loads and their corresponding times are then statistically analyzed among the extracted suspension point loads of the k-th pumping cycle. Under normal operating conditions, the durations of the upstroke and downstroke are similar; under abnormal operating conditions, the durations of the upstroke and downstroke differ significantly.

[0044] Specifically, if there are multiple equal maximum values ​​among the suspended point loads extracted in the kth pumping cycle, the suspended point load with the largest corresponding suspended point displacement is selected; if there are multiple equal minimum values ​​among the suspended point loads extracted in the kth pumping cycle, the suspended point load with the smallest corresponding suspended point displacement is selected.

[0045] Based on the above analysis, the load range and stroke unbalance of the k-th pumping cycle are calculated using the following formula: In the formula, This represents the load range during the k-th pumping cycle; , These represent the maximum and minimum suspension point loads during the k-th pumping cycle, respectively. In the formula, This represents the stroke unbalance in the k-th pumping cycle; This indicates the absolute value operation; , These represent the (k+1)th and kth elements in the time sequence of the periodic node, respectively; This indicates the inflection point of the stroke in the k-th pumping cycle. Characterizes the duration of the upstroke in the k-th pumping cycle; Characterizes the duration of the downstroke in the k-th pumping cycle; Characterizes the duration of the k-th pumping cycle.

[0046] Understandably, after a pumping unit malfunctions, the range of suspension point load variation and the difference in duration between the upstroke and downstroke will significantly increase. Therefore, the difference between the maximum and minimum suspension point load in a single pumping cycle is defined as the load range; the ratio of the absolute value of the difference between the upstroke and downstroke durations to the duration of the pumping cycle is defined as the stroke imbalance. The load range and stroke imbalance effectively characterize the degree of load variation and stroke imbalance in the pumping unit, improving the accuracy of identifying complex operating conditions.

[0047] Step 4: Extract power characteristics based on multi-source operation data.

[0048] During the operation of the pumping unit, changes in downhole load are transmitted to the surface drive system through the sucker rod and crank-connecting rod mechanism, manifesting as changes in motor current and power. When abnormal operating conditions occur, changes in downhole pump efficiency, abnormal sucker rod stress, and alterations in mechanical transmission status will cause fluctuations in the load on the surface drive motor, leading to instability in current and power. Therefore, the average current, average active power, current dispersion, and active power dispersion are calculated for each pumping cycle. The average current characterizes the electromagnetic load level of the motor stator windings; the average active power characterizes the actual mechanical load level output by the motor; and the current dispersion and active power dispersion represent the degree of fluctuation in current and active power within the pumping cycle, respectively.

[0049] In this embodiment, the dispersion involved is the standard deviation. The implementer can choose other existing feasible technologies as long as they can measure the degree of data fluctuation, such as the coefficient of variation. This application does not impose any special restrictions on this.

[0050] Furthermore, the pumping unit load changes with the suspension point load intensity, exhibiting a specific trend within a single pumping cycle. Different fault types correspond to different load change directions and amplitudes. This trend characteristic can assist in identifying combined operating conditions of the pumping unit using dynamometer diagram features. Specifically: the linear fitting slope of the three-phase current for each pumping cycle is obtained and used as the current trend value for each pumping cycle; simultaneously, the linear fitting slope of the active power for each pumping cycle is obtained and used as the power trend value for each pumping cycle.

[0051] In this embodiment, the linear least squares method is used to perform linear fitting on the three-phase current and active power of each pumping cycle to obtain the linear fitting slope of the three-phase current and active power of each pumping cycle. The linear least squares method is a well-known technique, and the detailed calculation process will not be described in detail here. Implementers can choose other existing feasible techniques as long as they can obtain the linear fitting slope of the three-phase current and active power of each pumping cycle.

[0052] Step 5: Extract fluid features based on multi-source operational data.

[0053] Furthermore, calculate the average wellhead pressure, average casing pressure, average oil pressure, average fluid temperature, and average production rate for each pumping cycle; calculate the wellhead pressure dispersion, casing pressure dispersion, oil pressure dispersion, fluid temperature dispersion, and production rate dispersion for each pumping cycle; and calculate the wellhead pressure trend value, casing pressure trend value, oil pressure trend value, fluid temperature trend value, and production rate trend value for each pumping cycle according to the current trend value calculation method.

[0054] The duration, frequency, dynamometer area, load area deviation, load range, stroke unbalance, average current, average active power, average wellhead pressure, average casing pressure, average oil pressure, average fluid temperature, average production rate, current dispersion, active power dispersion, wellhead pressure dispersion, casing pressure dispersion, oil pressure dispersion, fluid temperature dispersion, production rate dispersion, current trend value, power trend value, wellhead pressure trend value, casing pressure trend value, oil pressure trend value, fluid temperature trend value, and production rate trend value of each pumping cycle are normalized respectively, and the normalization results are used to form the operating condition identification vector for each pumping cycle.

[0055] In this embodiment, the Min-Max normalization method is used to normalize various data. Taking the average current as an example, during the normalization process, the maximum and minimum values ​​are the pre-calibrated global reference maximum and global reference minimum values ​​in the historical operation database of the pumping unit well, respectively. The Min-Max normalization method is a well-known technique, and the detailed calculation process will not be elaborated here. Specifically, if the maximum and minimum values ​​are the same and both are 0, the normalized value of the average current is assigned to 0; when the maximum and minimum values ​​are the same and not 0, the normalized value of the average current is assigned to 1.

[0056] Step 6: Train the pumping unit well condition diagnosis model using the operating condition identification vector.

[0057] Furthermore, for ten operating conditions—normal operating condition, insufficient fluid supply, gas influence, sucker rod breakage, fixed valve leakage, traveling valve leakage, sucker rod wear, tubing leakage, wax blockage and scaling, and mechanical jamming—N operating condition identification vectors were collected for each condition. Based on the collected operating condition identification vectors and their corresponding operating condition labels, a training sample set was constructed. The operating condition diagnostic model for the pumping unit well was trained using the training sample set. Specifically: The training sample set is input into a deep feedforward neural network (FNN) model for training. The FNN model performs layer-by-layer nonlinear transformation and feature extraction on the working condition identification vector through multiple fully connected hidden layers, gradually establishing high-dimensional abstract features. The output layer establishes a mapping relationship between the working condition identification vector and the working condition type, thereby realizing the identification of the working conditions of the pumping unit well. During training, the Adam optimization algorithm is used, with a learning rate set to 0.001 and a mean squared error loss function. The network parameters are updated iteratively to obtain the trained pumping unit well working condition diagnostic model. The training process of the FNN model is a well-known technique in the field, and the detailed training process will not be described further in this application.

[0058] When constructing the training sample set, multi-label annotation is used for composite working condition samples with multiple anomalies at the same time. Each node of the output layer of the pumping well working condition diagnosis model independently outputs the predicted probability of the corresponding working condition.

[0059] In this embodiment, the value of N is 500. Implementers can set the specific value of N according to the actual situation. This application does not impose any special restrictions on this.

[0060] Step 7: Simplify and obtain the edge-side diagnostic model; input the working condition identification vector obtained from the multi-source operating data collected in real time into the edge-side diagnostic model to obtain the diagnostic result and diagnostic confidence. If the comparison result between the diagnostic confidence and the preset confidence threshold meets the preset edge-side output conditions, the diagnostic result is directly output; otherwise, the working condition identification vector and multi-source operating data are uploaded to the cloud and composite working condition re-judgment is performed through the pumping well working condition diagnostic model.

[0061] To meet the real-time diagnostic needs of pumping wells, the pumping well condition diagnostic model, which requires a large amount of storage and computation, needs to be simplified into an edge-side diagnostic model with a smaller amount of storage and computation.

[0062] When constructing the edge-side diagnostic model, the pumping unit well operating condition diagnostic model is used as the teacher model. Based on the L1 norm distribution of the connection weights of each node in the FNN model, the 50% of neurons with the smallest sum of absolute weights and their connection branches are pruned. Through pruning operations, neurons with weak influence on the final prediction are removed. Furthermore, high-precision floating-point parameters are converted to low-bit-width parameters to reduce the storage space and computational load required by the FNN model, resulting in the edge-side diagnostic model. Next, the edge-side diagnostic model is deployed on the host computer at the pumping unit well site.

[0063] In this embodiment, converting high-precision floating-point parameters into low-bit-width parameters specifically involves statically mapping the 32-bit floating-point weight parameters and quantizing them into 8-bit integer parameters.

[0064] In the actual diagnostic process, real-time data are collected on wellhead pressure, casing pressure, oil pressure, fluid temperature, production rate, suspension point displacement, suspension point load, three-phase current, and active power. After completing the division of the pumping cycle and the construction of the operating condition identification vector, the operating condition identification vector is input into the edge-side diagnostic model. The operating condition identification vector is subjected to layer-by-layer nonlinear transformation and feature extraction through a fully connected hidden layer to gradually establish high-dimensional abstract features. The independent prediction probability corresponding to each type of operating condition is calculated through the output layer. One or more operating condition categories with a prediction probability greater than a set threshold are selected as the current diagnostic result. When there are multiple operating condition categories, it is determined to be a composite operating condition. The maximum probability value is used as the diagnostic confidence level.

[0065] Furthermore, the diagnostic confidence level is compared with a preset confidence threshold. If the diagnostic confidence level is greater than the preset confidence threshold, the reliability of the edge-side diagnostic result is high, and the diagnostic result for the pumping unit well is directly output. If the diagnostic confidence level is less than or equal to the preset confidence threshold, the reliability of the edge-side diagnostic result is low, and the specific operating condition cannot be identified by the edge-side diagnostic model. The operating condition identification vector and the collected original multi-source operating data are uploaded to the cloud server, and the composite operating condition is re-judged by the pumping unit well operating condition diagnostic model.

[0066] The process of obtaining the preset reliability threshold is as follows: input the condition identification vectors of M known working conditions into the edge-side diagnostic model to obtain the diagnostic confidence of each working condition identification vector; the difference between the mean and standard deviation of the diagnostic confidence of all working condition identification vectors is used as the preset reliability threshold.

[0067] Specifically, if the predicted probabilities of all operating condition categories are not greater than the set threshold, but the diagnostic confidence is greater than the preset confidence threshold, the operating condition category with the highest predicted probability is selected as the current diagnostic result.

[0068] According to the preset reliability threshold acquisition method, the set threshold for each working condition category is obtained.

[0069] In this embodiment, the value of M is 1000. Implementers can set the specific value of M according to the actual situation. This application does not impose any special restrictions on this.

[0070] In this embodiment, each new minimum value of the suspension point displacement marks the completion of a new oil pumping cycle. Then, the working condition identification vector of this new oil pumping cycle is obtained for composite working condition identification.

[0071] In summary, this application, by collecting multi-source operating data from pumping wells, can simultaneously acquire multi-dimensional information such as dynamometer diagrams, power, and fluids, avoiding the problem that a single operating parameter cannot fully reflect the actual downhole operating status, and helps to improve the reliability of operating condition identification under complex operating conditions. By identifying local extreme values ​​of the suspension point displacement to divide the oil pumping cycle, the multi-source operating data can be time-aligned according to the periodic motion law, a unified cycle benchmark can be established, and the synchronicity and comparability of the multi-source operating data within the same oil pumping cycle can be guaranteed. Based on multi-source operation data, dynamometer diagram features, electrical features and fluid features are extracted and operating condition identification vectors are constructed. This enables comprehensive analysis of dynamometer diagram morphology, electrical features and fluid parameter changes, characterizing the operating status from different dimensions, and effectively avoiding the problem of easy confusion of fault features when diagnosing with a single operating parameter. By training a pumping unit well operating condition diagnostic model using operating condition identification vectors and simplifying it to obtain an edge-side diagnostic model, the model complexity can be reduced while maintaining diagnostic capabilities, enabling edge terminals to have real-time diagnostic capabilities. Then, the real-time acquired operating condition identification vectors are input into the edge-side diagnostic model to obtain diagnostic results and diagnostic confidence. If the preset edge-side output conditions are met, the results are directly output; otherwise, they are uploaded to the cloud for composite operating condition re-judgment through the pumping unit well operating condition diagnostic model. This approach can balance the real-time performance and accuracy of diagnosis, effectively improving the accuracy and reliability of composite operating condition identification.

Claims

1. A method for intelligent diagnosis of combined operating conditions of pumping wells based on edge-cloud collaborative reasoning, characterized in that, The method includes the following steps: Collect multi-source operational data of pumping wells; identify local extrema of suspension point displacement in multi-source operational data to divide the pumping cycle; For each pumping cycle after division, dynamometer features, electrical features, and fluid features are extracted based on multi-source operating data and used to construct an operating condition identification vector. Among them, the dynamometer features include load area deviation and stroke unbalance, and the electrical features and fluid features include features that reflect the average level and changing trend of the operating data. A diagnostic model for pumping unit well conditions is trained using operating condition identification vectors and simplified to obtain an edge-side diagnostic model. The working condition identification vector obtained from the real-time multi-source operating data is input into the edge-side diagnostic model to obtain the diagnostic result and diagnostic confidence. If the comparison result between the diagnostic confidence and the preset confidence threshold meets the preset edge-side output conditions, the diagnostic result is directly output; otherwise, the working condition identification vector and multi-source operating data are uploaded to the cloud and composite working condition re-judgment is performed through the pumping well working condition diagnostic model.

2. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The multi-source operating data also includes: wellhead pressure, casing pressure, oil pressure, fluid temperature, production rate, suspension load, three-phase current, and active power.

3. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The process of dividing the oil extraction cycle is as follows: The minimum value of the suspension point displacement data is obtained by identifying local extrema, and adjacent minimum values ​​are used as the start and end times of the pumping cycle. Within each pumping cycle, the maximum value of the suspension point displacement data is taken as the stroke inflection point to distinguish between the upstroke and the downstroke.

4. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The calculation process for the load area deviation is as follows: Extract the absolute difference between the approximate integral areas corresponding to the left and right halves of the indicator diagram during the oil pumping cycle; The ratio of the absolute difference to the approximate integral area corresponding to the total displacement during the pumping cycle is taken as the load area deviation.

5. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The calculation process for the stroke unbalance is as follows: The ratio of the absolute difference between the duration of the upstroke and the duration of the downstroke in the pumping cycle to the duration of the pumping cycle is taken as the stroke imbalance.

6. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The features reflecting the average level and trend of operational data include: The mean, dispersion, and linear fitting slope of the power data segments extracted during the oil pumping cycle; The mean, dispersion, and linear fitting slope of the fluid data segments extracted during the pumping cycle.

7. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The edge-side diagnostic model is constructed by performing network pruning and parameter quantization on the pumping unit well condition diagnostic model.

8. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The process of obtaining the diagnostic confidence level is as follows: A single operating condition identification vector is input into the edge-side diagnostic model to calculate the predicted probability of each operating condition for the single operating condition identification vector; the diagnostic confidence is the maximum value among all the predicted probabilities of the single operating condition identification vector.

9. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The process of obtaining the preset confidence threshold is as follows: Input the condition identification vectors of multiple known working conditions into the edge-side diagnostic model to obtain the diagnostic confidence of each working condition identification vector; The preset confidence threshold is the difference between the mean and standard deviation of the diagnostic confidence of all operating condition identification vectors.

10. The intelligent diagnostic method for combined operating conditions of pumping wells based on edge-cloud collaborative reasoning as described in claim 1, characterized in that, The preset edge-side output condition is that the diagnostic confidence level is greater than the preset confidence threshold.