Method for identifying production of mechanical production well through artificial intelligence algorithm

By constructing a stroke evolution topology graph and a neural network model, the limitations of single-stroke analysis and the interference of load fluctuations in the measurement of liquid production in machine-produced wells are solved, and high-precision liquid production measurement is achieved.

CN120798291APending Publication Date: 2025-10-17DAQING DIRECTION SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511194243.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing technology for measuring the liquid production in mechanically produced wells has problems such as single-stroke analysis ignoring the evolution law of the mechanical state between consecutive strokes, lack of synchronous processing of electrical parameter data and suspension point displacement data, large measurement errors caused by complex load fluctuations downhole, and insufficient reliability.

Method used

By constructing multi-source time series data, identifying upper and lower dead points to divide stroke segments, building a stroke evolution topology, performing load fluctuation correction and interactive aggregation of adjacent strokes, a neural network model is used to analyze dynamic pump efficiency characteristics to output liquid production data.

Benefits of technology

It breaks through the limitation of single stroke, automatically captures the continuous changes of underground working conditions, reduces the misjudgment rate of abnormal working conditions, improves measurement accuracy and reliability, and overcomes the applicability limitations of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120798291A_ABST
    Figure CN120798291A_ABST
Patent Text Reader

Abstract

The invention discloses a method for identifying mechanical recovery well production by an artificial intelligence algorithm. The method comprises the following steps: synchronously aligning ground equipment data according to a stroke period to generate multi-source time sequence data; the method comprises the following steps of: dividing the stroke into a plurality of stroke segments based on upper and lower dead points, performing mechanical feature extraction and phase angle mapping on each stroke segment to construct a stroke state feature, mapping the stroke state feature to a spatial-temporal feature space to form a stroke state node, and further constructing a stroke evolution topological graph; and calculating an aggregation load fluctuation amplitude of the stroke state node through adjacent stroke interaction and load transfer aggregation, and correcting the stroke state characteristic according to the aggregation load fluctuation amplitude to obtain a stroke correction characteristic. Arranging nodes according to timestamps to form a stroke evolution chain, and fusing the correction features of the nodes along the chain to generate dynamic pump efficiency features. And the dynamic pump efficiency characteristics are input into a yield analysis model for working condition analysis, and liquid production capacity data are output. According to the method, through topological graph modeling and feature dynamic fusion, the precision of mechanical production well yield calculation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of oil well production measurement, and particularly relates to a method for measuring production of a machine production well by using an artificial intelligence algorithm. BACKGROUND

[0002] In the late stage of oil and gas well development, due to insufficient formation energy, a machine production device is used to assist in production. The oil and gas well equipped with the machine production device is usually referred to as a machine production well. In the field of oil and gas well production, accurate measurement of the liquid production of the machine production well is a core requirement of production management. At present, the mainstream method relies on dynamometer card analysis and electric power integration technology. However, the existing technology has significant defects: 1. The traditional method analyzes a single stroke as an independent unit, ignoring the mechanical state evolution law between continuous strokes. Downhole working conditions fluctuate (such as gas influence and pump valve leakage), causing abnormal load transmission between adjacent strokes. Single stroke analysis cannot capture such dynamic interference, resulting in magnified cumulative error.

[0003] 2. Electric parameter data and surface displacement data are usually processed independently at different times, lacking a strict stroke period synchronization mechanism.

[0004] 3. Downhole complex load fluctuation pollutes the shape characteristics of the dynamometer card. The load amplitude directly extracted by the existing technology contains a large amount of noise. Without cross-stroke correlation correction, the pump efficiency evaluation reliability is insufficient.

[0005] The above defects result in large measurement error of liquid production, restricting digital management of oilfields. The industry urgently needs a production measurement method that can break through the single stroke limitation, integrate multi-source time sequence characteristics, and has anti-interference ability. SUMMARY

[0006] In view of the deficiencies of the prior art, the embodiments of the present application provide a method for measuring production of a machine production well by using an artificial intelligence algorithm, which comprises the following steps: obtaining ground equipment data of a preset period from a real-time monitoring database, and synchronously aligning the ground equipment data according to a stroke period to generate multi-source time sequence data; identifying upper and lower dead points in the multi-source time sequence data, segmenting the multi-source time sequence data into a plurality of stroke segments based on the upper and lower dead points, and marking a stroke start time stamp for each stroke segment; performing mechanical feature extraction and phase angle mapping on each stroke segment to construct a stroke state feature of each stroke segment, mapping the stroke state feature to a space-time feature space to generate a stroke state node corresponding to each stroke segment, and then constructing a stroke evolution topology graph according to all stroke state nodes; performing adjacent stroke interaction and load transmission aggregation on each stroke state node based on the stroke evolution topology graph to generate an aggregated load fluctuation amplitude of each stroke state node; The load fluctuation correction of the stroke state characteristics is performed using the aggregated load fluctuation amplitude of each stroke state node to obtain the stroke correction characteristics of each stroke state node; Arrange all stroke state nodes according to the stroke start timestamp to form a stroke evolution chain, and fuse the stroke correction features of each stroke state node along the stroke evolution chain into dynamic pump efficiency features; The dynamic pump efficiency characteristics are input into the production analysis model, and the production analysis model performs operating condition analysis on the dynamic pump efficiency characteristics to output liquid production data.

[0007] According to a preferred embodiment, the ground equipment data includes electrical parameter data and suspension point displacement data; the electrical parameter data is the electrical characteristic data of the pumping unit motor when it is working, which includes current waveform and voltage waveform; the suspension point displacement data is the displacement change data of the suspension point of the pumping unit rod.

[0008] According to a preferred embodiment, synchronizing the ground equipment data according to the stroke cycle to generate multi-source time series data includes: Collecting the rotational angular velocity signal of the crankshaft of the pumping unit in real time, and calculating the crank angle-time mapping relationship based on the rotational angular velocity signal; Taking the top dead center position of the crank as the reference zero point, the stroke cycle is defined as the time interval for the crankshaft to rotate 360°; According to the crank angle-time mapping relationship, the current waveform and voltage waveform are resampled to generate an instantaneous electric power sequence synchronized with the crank angle; The polished rod displacement curve is generated based on the suspension point displacement data. The displacement value is mapped to the crank angle domain through the crank-beam four-bar kinematic model to generate an angle-displacement sequence including the top dead center and bottom dead center. The instantaneous electric power sequence and the angle-displacement sequence are fused according to the crank angle dimension to generate multi-source time series data based on the stroke cycle.

[0009] According to a preferred embodiment, identifying the upper and lower dead points in multi-source time series data, and dividing the multi-source time series data into a plurality of stroke segments based on the upper and lower dead points includes: Extract the rotation angle-displacement sequence from multi-source time series data, and use the maximum point of the rotation angle-displacement sequence as the top dead center and the minimum point as the bottom dead center; Taking the adjacent top dead center and bottom dead center as the phase reference, intercept the continuous data interval from the current top dead center to the next top dead center, and define the multi-source time series data in the continuous data interval as a complete stroke segment; Based on the crank angle-time mapping relationship, the starting point angle of the stroke segment is converted into an absolute time value, marked as the stroke start timestamp, and a structured data unit is constructed for each stroke segment; The structured data unit comprises a time sequence data segment and metadata; the time sequence data comprises a transient electric power sequence arranged by crank angle within a stroke segment, an angle-displacement sequence; the metadata comprises a stroke start time stamp, a top dead center displacement value, and a bottom dead center displacement value.

[0010] According to a preferred embodiment, the mechanical feature extraction and phase angle mapping are performed on each stroke segment respectively to construct the stroke state feature of each stroke segment, which comprises: Based on the angle-displacement sequence and the transient electric power sequence of the stroke segment, a rod load sequence is calculated through a rod power-load conversion model; The angle-displacement sequence and the rod load sequence are aligned by the same crank angle to generate a indicator diagram; A top dead center load value, a bottom dead center load value, an indicator diagram area, and a load fluctuation amplitude are extracted from the indicator diagram; A phase angle-time mapping function is established with 0° of the crank angle corresponding to the stroke start time stamp as a phase reference, and time stamps of the crank at a first preset phase angle, a second preset phase angle, a third preset phase angle, and a fourth preset phase angle are obtained; The stroke state feature is generated according to the top dead center load value, the bottom dead center load value, the indicator diagram area, the load fluctuation amplitude, and the time stamps of the crank at the first preset phase angle, the second preset phase angle, the third preset phase angle, and the fourth preset phase angle.

[0011] According to a preferred embodiment, the stroke evolution topology graph is constructed according to all stroke state nodes, which comprises: All stroke state nodes are traversed, and a stroke state node being traversed is taken as a target node, and a feature similarity of the stroke state feature between the target node and other stroke state nodes is calculated, and then a stroke state node with a feature similarity greater than a preset threshold is taken as a similar neighborhood node of the target node; A load fluctuation amplitude of the target node is extracted, and the load fluctuation amplitude is multiplied by a first preset coefficient to generate a load fluctuation radius of the target node, and a load fluctuation area of the target node is constructed with the center of the target node and the load fluctuation radius as a radius, and a load fluctuation area of the similar neighborhood node of the target node is constructed; When there is an overlap between the load fluctuation area of the target node and the load fluctuation area of the similar neighborhood node, an overlapping area is calculated, and then the overlapping area is multiplied by a second preset coefficient to generate an association weight between the target node and the similar neighborhood node, and then a topology connection edge with the association weight as an edge weight is established between the target node and the corresponding similar neighborhood node; The above steps are repeated to traverse all stroke state nodes, thereby constructing the stroke evolution topology graph.

[0012] According to a preferred embodiment, the generating of the aggregated load fluctuation amplitude of each stroke state node based on the adjacent stroke interaction and load transfer aggregation of each stroke state node in the stroke evolution topology graph comprises: In the stroke evolution topology graph, all stroke state nodes are traversed, and the stroke state node being traversed is taken as a target node, and the stroke state nodes having a topology connection edge directly existing with the target node are taken as the interaction neighborhood nodes of the target node; The edge weight between each interaction neighborhood node and the target node is taken as the basic interaction strength of the interaction neighborhood node and the target node; The Euclidean distance of the stroke state features of the target node and the interaction neighborhood nodes is calculated, and the Euclidean distance is converted into a distance attenuation coefficient through an inverse proportional function; The basic interaction strength and the distance attenuation coefficient are multiplied to obtain the interaction strength value of the target node and the interaction neighborhood nodes; The load fluctuation amplitude of each interaction neighborhood node is extracted, and the load fluctuation amplitudes of all the interaction neighborhood nodes of the target node are weighted and averaged with the interaction strength value as the weight coefficient to generate the aggregated load fluctuation amplitude of the target node; The above steps are repeated until all the stroke state nodes are traversed, so as to obtain the aggregated load fluctuation amplitudes of all the stroke state nodes.

[0013] According to a preferred embodiment, the load fluctuation correction of the stroke state feature by using the aggregated load fluctuation amplitude to obtain the stroke correction feature of the stroke state node comprises: The load fluctuation amplitude in the stroke state feature is extracted; A fluctuation energy coefficient is calculated through the aggregated load fluctuation amplitude and the load fluctuation amplitude; the fluctuation energy coefficient is the absolute value of the difference between the aggregated load fluctuation amplitude and the load fluctuation amplitude divided by the load fluctuation amplitude; The top dead center load value, the bottom dead center load value and the indicator diagram area in the stroke state feature are corrected through the fluctuation energy coefficient; The phase angle timestamp is kept unchanged, the timestamps, the load fluctuation amplitudes, the aggregated load fluctuation amplitudes and the corrected top dead center load value, bottom dead center load value and indicator diagram area of the four preset phase angles are recombined to generate the stroke correction feature.

[0014] According to a preferred embodiment, the fusion of the stroke correction features of the stroke state nodes into the dynamic pump efficiency feature along the stroke evolution chain comprises: The stroke state nodes are arranged in ascending order of stroke starting timestamp to form a stroke evolution chain in time sequence; The stroke evolution chain is divided into a plurality of continuous time windows with the stroke starting timestamp as a time sequence reference, and each time window contains a preset number of continuous stroke state nodes; For each time window, perform the following operations: The arithmetic average of the top dead center load value and the bottom dead center load value of all stroke state nodes in the time window is calculated to generate the window top dead center average load and the window bottom dead center average load; The effective work done in the window is obtained by calculating the sum of the indicator diagram areas of all stroke state nodes within the time window; The window fluctuation energy is obtained by calculating the average value of the aggregated load fluctuation amplitude of all stroke state nodes within the time window; The average load at the top dead center of each time window, the average load at the bottom dead center of each time window, the effective work done by the window, and the window fluctuation energy are combined into the window feature vector of each time window; The window feature vectors of all time windows are arranged in chronological order to form dynamic pump efficiency features.

[0015] According to a preferred embodiment, the production analysis model performs working condition analysis on the dynamic pump efficiency characteristics to output liquid production data, including: Collect dynamic pump efficiency characteristic samples and corresponding measured liquid production data as model training data sets; Divide the model training data set into a model training set and a model validation set; Constructing a neural network model, wherein the input layer nodes of the neural network model correspond to the average load of the upper dead center of the window, the average load of the lower dead center of the window, the effective work of the window, and the window fluctuation energy in the dynamic pump efficiency characteristics, and the output layer nodes correspond to the average liquid production of the time window; The neural network model is supervised and trained using the model training set, and the hyperparameters of the neural network model are adjusted using the model validation set until the average relative error of the predicted liquid production is less than the preset error threshold; The trained neural network model is deployed as a production analysis model, which receives dynamic pump efficiency characteristics and outputs the average liquid production data corresponding to each time window.

[0016] The present invention has the following beneficial effects: 1. By constructing a stroke evolution topology, the system overcomes the limitations of independent single-stroke analysis, establishes inter-node load transfer associations based on feature similarity, and implements cross-stroke load fluctuation transfer modeling through neighborhood interaction weighted aggregation. This system automatically captures the continuous changes in downhole operating conditions, incorporates the mechanical interference of adjacent strokes into a unified calculation framework, and improves the sensitivity of abnormal operating condition identification.

[0017] 2. Dynamically correct stroke state characteristics using aggregated load fluctuation amplitude, fundamentally resolving the dynamometer diagram distortion problem caused by random load interference. By calculating the fluctuation energy coefficient, key parameters such as top dead center load, bottom dead center load, and dynamometer diagram area are adaptively corrected, preserving true operating characteristics while filtering out transient noise and reducing the rate of misjudgment of abnormal operating conditions.

[0018] 3. The stroke correction features in time sequence are fused into windowed dynamic pump efficiency features, which fully characterize the time-varying working state of the artificial lift system. The deep nonlinear relationship between the average load at the top dead center, the effective work amount and the liquid production rate in the window is learned through the neural network model, which overcomes the applicability limitations of traditional empirical formulas. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A flow chart of an artificial intelligence algorithm identification method for well production measurement is provided for an exemplary embodiment. DETAILED DESCRIPTION

[0020] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to designate the same elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0021] The terms used in the present disclosure are merely for the purpose of describing particular embodiments and are not intended to limit the present disclosure. The singular forms "a," "an," and "the" used in the present disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0022] It should be understood that although the terms first, second, third, etc. can be employed in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one piece of information from another piece of information of the same type. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the present disclosure. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon determination" or "in response to a determination".

[0023] Referring to Figure 1 The artificial intelligence algorithm identification method for well production measurement according to the present disclosure comprises: S1. Obtain ground equipment data in a preset period from a real-time monitoring database, and synchronize and align the ground equipment data according to the stroke period to generate multi-source time sequence data.

[0024] Optionally, the ground equipment data comprises electrical parameter data and suspension point displacement data; the electrical parameter data is the electrical characteristic data of the electric motor of the pumping unit when it is working, which comprises current waveform and voltage waveform; the suspension point displacement data is the displacement change data of the polished rod suspension point of the pumping unit.

[0025] Optionally, in the pumping unit system, the stroke cycle refers to the time interval corresponding to the physical process of the pumping unit completing a complete pumping action. The stroke cycle is the time span experienced by the crankshaft rotating 360° with the top dead center position of the crankshaft as the absolute reference point. This cycle covers the entire process of the polished rod suspension point descending from the top dead center to the bottom dead center and returning to the top dead center, which is the smallest physical unit for dividing continuous operation data.

[0026] Preferably, synchronously aligning the surface equipment data according to the stroke cycle to generate multi-source time sequence data comprises: collecting the rotational angular velocity signal of the crankshaft in real time, and calculating the crank rotation angle-time mapping relationship based on the rotational angular velocity signal; defining the stroke cycle as the time interval of the crankshaft rotating 360° with the top dead center position of the crank as the reference zero point; resampling the current waveform and the voltage waveform according to the crank rotation angle-time mapping relationship to generate an instantaneous electric power sequence synchronized with the crank rotation angle; generating a polished rod displacement curve based on the suspension point displacement data, mapping the displacement value to the crank rotation angle domain through the crank-beam four-bar linkage kinematics model to generate a rotation angle-displacement sequence containing the top dead center and the bottom dead center; fusing the instantaneous electric power sequence and the rotation angle-displacement sequence according to the crank rotation angle dimension to generate multi-source time sequence data with the stroke cycle as the reference.

[0027] Optionally, the rotational angular velocity signal of the crankshaft refers to the instantaneous rotation speed pulse sequence of the crankshaft collected in real time by a sensor. The signal is essentially the angular displacement change rate of the rotation of the crankshaft, and its core function is to calculate the crank rotation angle by integration to provide a time reference for the synchronization of multi-source data.

[0028] Optionally, the crank rotation angle-time mapping relationship refers to the corresponding function of the crank rotation angle and the absolute time stamp established. It is generated by the following steps: Step 1, time-integrate the rotational angular velocity signal to obtain a continuous function of the crank rotation angle with respect to time; Step 2, establish a rotation angle domain coordinate axis with the top dead center position of the crank as the 0° reference point; Step 3, generate a bidirectional query table of any time point and the crank rotation angle.

[0029] Optionally, the instantaneous electric power sequence synchronized with the crank rotation angle refers to resampling the power data in the original time domain into a discrete sequence with the crank rotation angle as the coordinate axis through the crank rotation angle-time mapping relationship. Each data point represents the corresponding instantaneous output power of the motor when the crank rotates to a specific angle.

[0030] Optionally, the crank-beam four-bar kinematics model is used to describe the geometric motion model of the pumping unit core transmission mechanism, which is composed of four cranks, connecting rods, beams, and supports through the circumferential motion of the crank, the planar motion of the connecting rod, the angular swing of the beam, and the final driving of the polished rod suspension point linear reciprocating motion. Based on the crank angle, the suspension point displacement is calculated in real time.

[0031] Optionally, the crank-angle-displacement sequence refers to the real-time mapping of the crank angle value to the discrete data sequence of the polished rod suspension point displacement through the crank-beam four-bar kinematics model. Each data point represents the exact position of the polished rod suspension point when the crank is rotated to a specific angle, forming a functional relationship with the crank angle as the independent variable and the suspension point displacement as the dependent variable.

[0032] S2, identify the top and bottom dead points in the multi-source time series data, segment the multi-source time series data into several stroke segments based on the top and bottom dead points, and mark the stroke start timestamp for each stroke segment.

[0033] The top dead center is when the crank is rotated to the highest position of the suspension point displacement, the crank angle is 0°, the polished rod is at the top of the stroke, and the oil rod load is maximum. The bottom dead center is when the crank is rotated to the lowest position of the suspension point displacement, the crank angle is 180°, the polished rod is lowered to the bottom of the stroke, and the oil filling in the pump cylinder is completed.

[0034] Preferably, identifying the top and bottom dead points in the multi-source time series data and segmenting the multi-source time series data into several stroke segments based on the top and bottom dead points comprises: Extracting the crank-angle-displacement sequence from the multi-source time series data, taking the maximum point of the crank-angle-displacement sequence as the top dead center and the minimum point as the bottom dead center; Taking the adjacent top dead center and bottom dead center as the phase reference, intercepting the continuous data interval from the current top dead center to the next top dead center, and defining the multi-source time series data in this continuous data interval as a complete stroke segment; Based on the crank angle-time mapping relationship, converting the starting point crank angle of the stroke segment to an absolute time value and marking it as the stroke start timestamp, and constructing a structured data unit for each stroke segment; The structured data unit contains a time series data segment and metadata; the time series data contains an instantaneous electric power sequence arranged by crank angle and a crank-angle-displacement sequence in the stroke segment; the metadata contains a stroke start timestamp, a top dead center displacement value, and a bottom dead center displacement value.

[0035] S3, respectively, for each stroke segment, perform mechanical feature extraction and phase angle mapping to construct the stroke state feature of each stroke segment, and map the stroke state feature to the space-time feature space to generate the stroke state node corresponding to each stroke segment, and then construct the stroke evolution topology graph according to all stroke state nodes.

[0036] In a preferred embodiment, the constructing the stroke state feature of each stroke segment respectively comprises: calculating a polished rod load sequence based on the crank angle-displacement sequence and the instantaneous electric power sequence of the stroke segment by a polished rod power-load conversion model; aligning the crank angle-displacement sequence and the polished rod load sequence according to the same crank angle to generate a dynamometer diagram; extracting a top dead center load value, a bottom dead center load value, a dynamometer diagram area and a load fluctuation amplitude from the dynamometer diagram; establishing a phase angle-time mapping function with 0° of the crank angle corresponding to the stroke start timestamp as a phase reference, and obtaining timestamps of the crank at a first preset phase angle, a second preset phase angle, a third preset phase angle and a fourth preset phase angle; generating the stroke state feature according to the top dead center load value, the bottom dead center load value, the dynamometer diagram area and the load fluctuation amplitude, and the timestamps of the crank at the first preset phase angle, the second preset phase angle, the third preset phase angle and the fourth preset phase angle.

[0037] Optionally, the first preset phase angle, the second preset phase angle, the third preset phase angle and the fourth preset phase angle can be selected from 0°, 90°, 180°, 270° and 360°.

[0038] Optionally, the polished rod power-load conversion model is established by mapping the relationship between the polished rod instantaneous power and the load based on the principle of energy conservation.

[0039] Optionally, the polished rod load is output by inputting the instantaneous electric power and the suspension point movement speed into the polished rod power-load conversion model through the differentiation of the crank angle-displacement to obtain the suspension point movement speed.

[0040] Optionally, the dynamometer diagram is a closed curve diagram describing the change of the polished rod load of the pumping unit with displacement, and its essence is a visual representation of the pumping system work capacity.

[0041] In a preferred embodiment, the constructing the stroke evolution topology graph according to all stroke state nodes comprises: traversing all stroke state nodes, taking the stroke state node being traversed as a target node, calculating the feature similarity of the stroke state feature between the target node and other stroke state nodes, and then taking the stroke state node with a feature similarity greater than a preset threshold as a similar neighborhood node of the target node; extracting the load fluctuation amplitude of the target node, multiplying the load fluctuation amplitude by a first preset coefficient to generate a load fluctuation radius of the target node, constructing a load fluctuation area of the target node with the center of the target node and the load fluctuation radius as the radius, and constructing the load fluctuation area of the similar neighborhood node of the target node; When the load fluctuation area of the target node overlaps with the load fluctuation area of the similar neighbor node, an overlapping area is calculated, and then the overlapping area is multiplied by a second preset coefficient to generate an association weight of the target node and the similar neighbor node, and then a topological connection edge with the association weight as an edge weight is established between the target node and the corresponding similar neighbor node; The above steps are repeated to traverse all stroke state nodes, so as to construct the stroke evolution topological graph.

[0042] Optionally, the first preset coefficient and the second preset coefficient are set in advance according to experience.

[0043] S4, based on the stroke evolution topological graph, the adjacent stroke interaction and load transfer aggregation of each stroke state node are aggregated to generate an aggregated load fluctuation amplitude of each stroke state node.

[0044] In a preferred embodiment, the aggregation of the adjacent stroke interaction and the load transfer of each stroke state node based on the stroke evolution topological graph to generate the aggregated load fluctuation amplitude of each stroke state node comprises: In the stroke evolution topological graph, all stroke state nodes are traversed, and the stroke state node being traversed is taken as a target node, and the stroke state node directly having a topological connection edge with the target node is taken as an interactive neighbor node of the target node; The edge weight between each interactive neighbor node and the target node is taken as a basic interaction strength of the interactive neighbor node and the target node; The Euclidean distance of the stroke state features of the target node and the interactive neighbor node is calculated, and the Euclidean distance is converted into a distance attenuation coefficient through an inverse proportional function; The basic interaction strength and the distance attenuation coefficient are multiplied to obtain an interaction strength value of the target node and the interactive neighbor node; The load fluctuation amplitude of each interactive neighbor node is extracted, and the load fluctuation amplitudes of all interactive neighbor nodes of the target node are weighted and averaged with the interaction strength value as a weight coefficient to generate an aggregated load fluctuation amplitude of the target node; The above steps are repeated until all stroke state nodes are traversed, so as to obtain the aggregated load fluctuation amplitudes of all stroke state nodes.

[0045] S5, the stroke state features are corrected for load fluctuation by using the aggregated load fluctuation amplitude of each stroke state node to obtain stroke correction features of each stroke state node.

[0046] In a preferred embodiment, the stroke state features are corrected for load fluctuation by using the aggregated load fluctuation amplitude to obtain the stroke correction features of the stroke state node, comprising: The load fluctuation amplitude in the stroke state feature is extracted; The fluctuation energy coefficient is calculated by aggregating the load fluctuation amplitude and the load fluctuation amplitude; the fluctuation energy coefficient is the absolute value of the difference between the aggregated load fluctuation amplitude and the load fluctuation amplitude divided by the load fluctuation amplitude; The top dead center load value, the bottom dead center load value and the indicator diagram area in the stroke state feature are corrected by the fluctuation energy coefficient; The timestamps of the four preset phase angles, the load fluctuation amplitude, the aggregated load fluctuation amplitude and the corrected top dead center load value, the bottom dead center load value and the indicator diagram area are recombined to generate the stroke correction feature while keeping the phase angle timestamp unchanged.

[0047] Preferably, the top dead center load value, the bottom dead center load value and the indicator diagram area in the stroke state feature are corrected by the fluctuation energy coefficient, including: Corrected top dead center load value = top dead center load value × (1-fluctuation energy coefficient) Corrected bottom dead center load value = bottom dead center load value × (1-fluctuation energy coefficient) Corrected indicator diagram area = indicator diagram area × (1-fluctuation energy coefficient) S6, arrange all stroke state nodes according to the stroke starting timestamp to form a stroke evolution chain, and fuse the stroke correction features of each stroke state node into a dynamic pump efficiency feature along the stroke evolution chain.

[0048] Preferably, the stroke correction features of each stroke state node are fused into a dynamic pump efficiency feature along the stroke evolution chain, including: Arrange the stroke state nodes in ascending order according to the stroke starting timestamp to form a stroke evolution chain that is continuous in time sequence; Take the stroke starting timestamp as the time sequence reference to divide the stroke evolution chain into a plurality of continuous time windows, each time window containing a preset number of continuous stroke state nodes; For each time window, perform the following operations: Calculate the arithmetic mean of the top dead center load value and the bottom dead center load value of all stroke state nodes in the time window to generate the window top dead center average load and the window bottom dead center average load; Calculate the sum of the indicator diagram areas of all stroke state nodes in the time window to obtain the window effective work; Calculate the average of the aggregated load fluctuation amplitudes of all stroke state nodes in the time window to obtain the window fluctuation energy; Combine the window top dead center average load, the window bottom dead center average load, the window effective work and the window fluctuation energy of each time window to form a window feature vector for each time window; Arrange the window feature vectors of all time windows in time sequence to form a dynamic pump efficiency feature.

[0049] S7, input the dynamic pump efficiency characteristics into the production analysis model, and the production analysis model analyzes the dynamic pump efficiency characteristics under the working condition to output the production data.

[0050] Preferably, the production analysis model analyzes the dynamic pump efficiency characteristics under the working condition to output the production data comprises: Collecting dynamic pump efficiency characteristic samples and corresponding measured production data as a model training data set; Dividing the model training data set into a model training set and a model validation set; Building a neural network model, the input layer nodes of the neural network model correspond to the window upper dead point average load, the window lower dead point average load, the window effective work amount, and the window fluctuation energy in the dynamic pump efficiency characteristics, and the output layer nodes correspond to the average production data of the time window; Supervised training of the neural network model through the model training set, adjusting the hyperparameters of the neural network model using the model validation set until the average relative error of the predicted production data is less than the preset error threshold; Deploying the trained neural network model as a production analysis model, receiving dynamic pump efficiency characteristics and outputting average production data corresponding to each time window.

[0051] The present application breaks through the limitation of single-stroke independent analysis by constructing a stroke evolution topology, establishes a load transfer correlation between nodes based on feature similarity, and realizes cross-stroke load fluctuation transfer modeling through neighborhood interaction weighted aggregation. Automatically capture the continuous change rule of downhole working condition, and include the mechanical interference of adjacent strokes into a unified calculation framework to improve the abnormal condition recognition sensitivity. Use the aggregated load fluctuation amplitude to dynamically correct the stroke state feature, and fundamentally solve the distortion problem of the indicator diagram caused by random load interference. Through the calculation of fluctuation energy coefficient, the key parameters such as upper dead point load, lower dead point load and indicator diagram area are adaptively corrected, the real working condition characteristics are retained while filtering transient noise, and the abnormal condition misjudgment rate is reduced. The time-continuous stroke correction features are fused into windowed dynamic pump efficiency characteristics to fully characterize the time-varying working state of the swabbing system. Through the neural network model, the deep nonlinear relationship between the window upper dead point average load, effective work amount and production data is learned, and the application limitation of traditional empirical formula is overcome.

[0052] Computer readable program instructions for carrying out operations of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and a procedural programming language such as a "C" language or the like. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.

[0053] The non-transitory computer readable storage medium described in the present application stores computer instructions, and the computer instructions, when executed by a processor, cause the processor to perform the above method.

[0054] Those skilled in the art can understand that all or part of the steps of the above method can be instructed by a program to related hardware (for example, a processor, an FPGA, an ASIC, etc.), and the program can be stored in a readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, etc. All or part of the steps of the above embodiments can also be implemented by using one or more integrated circuits. Accordingly, each module in the above embodiments can be implemented in the form of hardware, for example, by using an integrated circuit to implement its corresponding function, or can be implemented in the form of a software function module, for example, by using a processor to execute a program / instruction stored in a memory to implement its corresponding function. The embodiments of the present application are not limited to any specific form of combination of hardware and software.

[0055] In addition, each functional unit in each of the embodiments herein can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.

[0056] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions herein or the part of the prior art that essentially contributes, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments herein. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0057] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for calculating production of machine-produced wells using an artificial intelligence algorithm, characterized in that: The following steps are involved: Acquire the ground equipment data of a preset period from the real-time monitoring database, and synchronize the ground equipment data according to the stroke period to generate multi-source time series data; Identify upper and lower dead points in multi-source time series data, segment the multi-source time series data into a plurality of stroke segments based on the upper and lower dead points, and mark a stroke start timestamp for each stroke segment; Performing mechanical feature extraction and phase angle mapping on each stroke segment to construct a stroke state feature for each stroke segment, mapping the stroke state feature to a spatiotemporal feature space to generate a stroke state node corresponding to each stroke segment, and then constructing a stroke evolution topology graph based on all the stroke state nodes; Based on the stroke evolution topology graph, adjacent stroke interactions and load transfer aggregation are performed on each stroke state node to generate the aggregated load fluctuation amplitude of each stroke state node; The load fluctuation correction of the stroke state characteristics is performed using the aggregated load fluctuation amplitude of each stroke state node to obtain the stroke correction characteristics of each stroke state node; Arrange all stroke state nodes according to the stroke start timestamp to form a stroke evolution chain, and fuse the stroke correction features of each stroke state node along the stroke evolution chain into dynamic pump efficiency features; The dynamic pump efficiency characteristics are input into the production analysis model, and the production analysis model performs operating condition analysis on the dynamic pump efficiency characteristics to output liquid production data.

2. The method for calculating production of a mechanically-produced well according to claim 1, characterized in that: The surface equipment data includes electrical parameter data and suspension point displacement data; the electrical parameter data is the electrical characteristic data of the pumping unit motor when it is working, which includes current waveform and voltage waveform; the suspension point displacement data is the displacement change data of the suspension point of the pumping unit polished rod.

3. The method for calculating production of a machine-produced well according to claim 2, characterized in that: Synchronize and align ground equipment data according to the stroke cycle to generate multi-source time series data, including: Collecting the rotational angular velocity signal of the crankshaft of the pumping unit in real time, and calculating the crank angle-time mapping relationship based on the rotational angular velocity signal; Taking the top dead center position of the crank as the reference zero point, the stroke cycle is defined as the time interval for the crankshaft to rotate 360°; According to the crank angle-time mapping relationship, the current waveform and voltage waveform are resampled to generate an instantaneous electric power sequence synchronized with the crank angle; The polished rod displacement curve is generated based on the suspension point displacement data. The displacement value is mapped to the crank angle domain through the crank-beam four-bar kinematic model to generate an angle-displacement sequence including the top dead center and bottom dead center. The instantaneous electric power sequence and the angle-displacement sequence are fused according to the crank angle dimension to generate multi-source time series data based on the stroke cycle.

4. The method for calculating production of a machine-produced well according to claim 3, characterized in that: Identifying the upper and lower dead points in multi-source time series data and segmenting the multi-source time series data into several stroke segments based on the upper and lower dead points includes: Extract the rotation angle-displacement sequence from multi-source time series data, and use the maximum point of the rotation angle-displacement sequence as the top dead center and the minimum point as the bottom dead center; Taking the adjacent top dead center and bottom dead center as the phase reference, intercept the continuous data interval from the current top dead center to the next top dead center, and define the multi-source time series data in the continuous data interval as a complete stroke segment; Based on the crank angle-time mapping relationship, the starting point angle of the stroke segment is converted into an absolute time value, marked as the stroke start timestamp, and a structured data unit is constructed for each stroke segment; The structured data unit includes a timing data segment and metadata; the timing data includes an instantaneous electric power sequence and an angle-displacement sequence arranged according to the crank angle within the stroke segment; the metadata includes a stroke start timestamp, an upper dead center displacement value, and a lower dead center displacement value.

5. The method for calculating production of a machine-produced well according to claim 4, characterized in that: Mechanical feature extraction and phase angle mapping are performed on each stroke segment to construct the stroke state features of each stroke segment, including: Based on the rotation angle-displacement sequence and instantaneous electric power sequence of the stroke segment, the polished rod load sequence is calculated using the polished rod power-load conversion model; The dynamometer diagram is generated by aligning the angle-displacement sequence and the polished rod load sequence at the same crank angle; extracting the top dead center load value, the bottom dead center load value, the dynamometer diagram area, and the load fluctuation amplitude from the dynamometer diagram; Taking the crank angle 0° corresponding to the stroke start timestamp as the phase reference, establish a phase angle-time mapping function, and obtain the timestamps of the crank at the first preset phase angle, the second preset phase angle, the third preset phase angle, and the fourth preset phase angle; A stroke state feature is generated based on the top dead center load value, the bottom dead center load value, the dynamometer diagram area and the load fluctuation amplitude, and the timestamps of the crank at the first preset phase angle, the second preset phase angle, the third preset phase angle, and the fourth preset phase angle.

6. The method for calculating production of a mechanically recovered well according to claim 5, characterized in that: Constructing a stroke evolution topology graph based on all stroke state nodes includes: Traverse all stroke state nodes, and take the stroke state node being traversed as the target node, and calculate the feature similarity of the target node and the stroke state features of other stroke state nodes, and then take the stroke state nodes with feature similarity greater than a preset threshold as similar neighboring nodes of the target node; Extracting the load fluctuation amplitude of the target node, and multiplying the load fluctuation amplitude by a first preset coefficient to generate a load fluctuation radius of the target node, constructing a load fluctuation area of ​​the target node with the target node center and the load fluctuation radius as the radius, and constructing load fluctuation areas of similar neighboring nodes of the target node; When the load fluctuation area of ​​the target node overlaps with the load fluctuation area of ​​the similar neighboring node, the area of ​​the overlapping area is calculated, and then the area of ​​the overlapping area is multiplied by a second preset coefficient to generate an association weight between the target node and the similar neighboring node, and then a topological connection edge is established between the target node and the corresponding similar neighboring node with the association weight as the edge weight; Repeat the above steps to traverse all stroke state nodes to construct the stroke evolution topology graph.

7. The method for calculating production of a mechanically recovered well according to claim 6, characterized in that: Based on the stroke evolution topology graph, adjacent stroke interactions and load transfer aggregation are performed on each stroke state node to generate the aggregated load fluctuation amplitude of each stroke state node, including: In the stroke evolution topology graph, all stroke state nodes are traversed, and the stroke state node being traversed is taken as the target node, and the stroke state nodes that have direct topological connection edges with the target node are taken as the interactive neighboring nodes of the target node; The edge weight between each interactive neighborhood node and the target node is used as the basic interaction strength between the interactive neighborhood node and the target node; Calculate the Euclidean distance between the stroke state characteristics of the target node and the interactive neighboring nodes, and convert the Euclidean distance into a distance attenuation coefficient through an inverse proportional function; Multiply the basic interaction strength by the distance attenuation coefficient to obtain the interaction strength value between the target node and the interaction neighboring nodes; Extract the load fluctuation amplitude of each interactive neighborhood node, use the interaction strength value as the weight coefficient, and perform weighted average on the load fluctuation amplitudes of all interactive neighborhood nodes of the target node to generate the aggregated load fluctuation amplitude of the target node; Repeat the above steps until all stroke state nodes are traversed, thereby obtaining the aggregated load fluctuation amplitude of all stroke state nodes.

8. The method for calculating production of a mechanically recovered well according to claim 7, characterized in that: The load fluctuation correction of the stroke state characteristics is performed using the aggregated load fluctuation amplitude to obtain the stroke correction characteristics of the stroke state node, including: Extracting load fluctuation amplitude from stroke state characteristics; Calculating a fluctuation energy coefficient by aggregating the load fluctuation amplitude and the load fluctuation amplitude; the fluctuation energy coefficient is the quotient obtained by dividing the absolute value of the difference between the aggregate load fluctuation amplitude and the load fluctuation amplitude by the load fluctuation amplitude; Correct the top dead center load value, bottom dead center load value and dynamometer diagram area in the stroke state characteristics through the fluctuation energy coefficient; The phase angle timestamp is kept unchanged, and the timestamps of the four preset phase angles, the load fluctuation amplitude, the aggregated load fluctuation amplitude, the corrected top dead center load value, the bottom dead center load value, and the indicator diagram area are recombined to generate the stroke correction feature.

9. The method for calculating production of a machine-produced well according to claim 8, characterized in that: The stroke correction features of each stroke state node along the stroke evolution chain are integrated into dynamic pump efficiency features, including: Arrange the stroke state nodes in ascending order according to the stroke start timestamp to form a temporally continuous stroke evolution chain; Taking the stroke start timestamp as the timing benchmark, the stroke evolution chain is divided into several continuous time windows, each of which contains a preset number of continuous stroke state nodes; For each time window, perform the following operations: The arithmetic average of the top dead center load value and the bottom dead center load value of all stroke state nodes in the time window is calculated to generate the window top dead center average load and the window bottom dead center average load; The effective work done in the window is obtained by calculating the sum of the indicator diagram areas of all stroke state nodes within the time window; The window fluctuation energy is obtained by calculating the average value of the aggregated load fluctuation amplitude of all stroke state nodes within the time window; The average load at the top dead center of each time window, the average load at the bottom dead center of each time window, the effective work done by the window, and the window fluctuation energy are combined into the window feature vector of each time window; The window feature vectors of all time windows are arranged in chronological order to form dynamic pump efficiency features.

10. The method for calculating production of a machine-produced well according to claim 9, characterized in that: The production analysis model analyzes the dynamic pump efficiency characteristics to output liquid production data including: Collect dynamic pump efficiency characteristic samples and corresponding measured liquid production data as model training data sets; Divide the model training data set into a model training set and a model validation set; Constructing a neural network model, wherein the input layer nodes of the neural network model correspond to the average load of the upper dead center of the window, the average load of the lower dead center of the window, the effective work of the window, and the window fluctuation energy in the dynamic pump efficiency characteristics, and the output layer nodes correspond to the average liquid production of the time window; The neural network model is supervised and trained using the model training set, and the hyperparameters of the neural network model are adjusted using the model validation set until the average relative error of the predicted liquid production is less than the preset error threshold; The trained neural network model is deployed as a production analysis model, which receives dynamic pump efficiency characteristics and outputs the average liquid production data corresponding to each time window.