A method and system for discriminating oil well pressure gauge meter data drift
By combining oil well production business processes and machine learning technology, the data drift type of oil well pressure metering instruments is identified, solving the problems of strong concealment and long analysis cycle in existing technologies. This enables real-time monitoring and efficient diagnosis, improving operation and maintenance efficiency and data acquisition accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2022-03-04
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, the data drift phenomenon of oil well pressure metering instruments is hidden, the analysis and implementation cycle is long, and there is a lack of effective identification methods, which affects the quality of data acquisition and the accuracy of production management.
By combining oil well production business processes and applying knowledge engineering and machine learning techniques, and using sliding window and gradient boosting decision tree algorithms, we can identify step-by-step and continuous data drift of oil well pressure metering instruments, and realize real-time identification and location of faulty or inaccurate instruments.
It improved operational efficiency, reduced testing costs, ensured the accuracy and reliability of basic data collection, and enhanced the level of production informatization.
Smart Images

Figure CN116519202B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology for metering instruments, and in particular to a method for identifying data drift in oil well pressure metering instruments. Background Technology
[0002] Oil well instruments are crucial for monitoring the production process during oilfield development. After several years of developing production information systems, major oilfields have largely achieved coverage of oil wells for basic production data acquisition. Real-time data flows from instrument acquisition to various application databases, passing through multiple nodes including acquisition, transmission, dumping, and display. Data acquisition is the foundation of the entire information system, and its completion is performed by various automated metering instruments at the front end. Therefore, the proper functioning of these front-end instruments directly affects the quality of data acquisition, which in turn impacts subsequent data applications.
[0003] Currently, to ensure effective water injection and oil production management, most oil wells are equipped with intelligent instruments for measurement, and data is automatically uploaded through a configuration system, enabling remote monitoring of the well's production status. However, since remote monitoring often involves hundreds of wells and a greater number of monitoring instruments or sensors, malfunctions of automatic control devices or data deviations from control lines are frequent. Although technical methods exist to assist monitoring personnel in locating faulty instruments and identifying their fault types, there is no effective diagnostic method for instrument data drift that is slight but within the theoretical control lines. Traditional methods such as disassembly and inspection or manual inspection for status monitoring are time-consuming, labor-intensive, and hinder precise production management.
[0004] Therefore, it is necessary to propose a method for identifying data drift of oil well pressure metering instruments in oilfields. This method is used to promptly detect and locate faulty or inaccurate instruments and take timely and effective measures to resolve them. It is essential for improving the uptime of data acquisition equipment, shortening maintenance time, improving operation and maintenance efficiency, and reducing testing costs. This will ensure the accuracy and reliability of basic data acquisition, improve the level of production informatization, and ensure the normal operation of oil and gas production. Summary of the Invention
[0005] To address the problems in the prior art, the present invention aims to provide a method for identifying data drift in oil well pressure metering instruments. By combining oil well production business processes and applying knowledge engineering and machine learning techniques, faulty and suspected faulty instruments can be screened in real time. Through oil well production process analysis, selection of influencing factors, and machine learning methods such as sliding window, model training, and predictive calculation, the method can identify the type of instrument data drift, thus solving the problems of relatively hidden metering drift phenomena in oil wells and relatively long analysis and implementation cycles.
[0006] Based on the calibration results of the offset of the oil well pressure metering instrument, data drift can be divided into two types:
[0007] Step-like drift: This is characterized by a sudden increase in the measured value, followed by a period of stability, where the value fluctuates within a very narrow range.
[0008] Continuous drift type: This is characterized by a continuous increase in the deviation between the instrument reading and the actual value within a certain time range.
[0009] For non-faulty instruments, almost all drift characteristics can be obtained by combining step drift and continuous drift. Therefore, in this invention, after excluding faulty instruments, identifying the above two types of drift can meet the requirements for identifying meter drift.
[0010] This invention is achieved through the following technical solution: a method for identifying data drift in oil well pressure metering instruments, characterized by comprising the following steps:
[0011] S1. Obtain the theoretical range and control range of the instrument, and determine whether the instrument is a "faulty instrument" or a "suspected faulty instrument".
[0012] S2. Identify several factors that affect the instrument measurement values. The average value of the instrument measurement values on the same day and the average value of the influencing factors are combined into a one-dimensional array. Based on the analysis of the production business process of the instrument to be monitored, select at least one measurable influencing factor. The more relevant influencing factors selected, the better the diagnostic results will be. In order to avoid the fluctuation of values caused by external system factors such as temperature changes during the day, the measurement values of the day are averaged to obtain a one-dimensional array composed of the instrument value and multiple influencing factor values.
[0013] S3. Combine historical data of instrument measurement values and sliding window to obtain s training sets N1, N2...Ns and a test set N;
[0014] S4. Combining machine learning, with the numerical values of the influencing factors as input and the meter readings as output, a prediction model is trained using s training sets; the training results of a random step size are used for verification and comparison to ensure the accuracy of the model's prediction.
[0015] S5. Input the numerical values of the influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np;
[0016] S6. By comparing the data change trends in the training set, test set, and prediction set according to the time series, identify the data drift type of the instrument.
[0017] Furthermore, S1 specifically refers to:
[0018] S11. Set the theoretical range by combining the theoretical calculation values in the field project, and set the control range by combining historical data values and the position of the instrument in the engineering process.
[0019] S12. Instruments that continuously exceed the upper limit of the theoretical range or fall below the lower limit of the theoretical range within a predetermined time are identified as "faulty instruments".
[0020] S13. Instruments that continuously exceed the upper limit of the control range or fall below the lower limit of the control range within a predetermined time are identified as "suspected faulty instruments".
[0021] The upper and lower limits of the control range are determined based on the historical data values of the pressure gauges in the well during normal operation or their position in the well fluid flow. Taking exceeding the upper limit as an example, if the monitored object is a pressure gauge measuring back pressure in the well, the maximum value from the historical data during normal operation can be used as the upper control value; if the monitored object is a pressure gauge measuring oil pressure in the well, the value set by the casing pressure vent valve can be used as the upper control value. After continuously monitoring and collecting data from multiple points, if the pressure gauge reading consistently exceeds the upper control value, a suspected faulty instrument is identified. If this is the case, technicians should promptly conduct troubleshooting together with upstream instruments.
[0022] Furthermore, according to the business process analysis of underground and surface oil gathering in oil wells, the influencing factors in S2 include surface oil temperature, daily production volume, and daily water cut. The daily average values of each influencing factor are calculated to obtain the daily average oil temperature (t), daily average production volume (q), and daily average water cut (c). Combined with the average value of the instrument measurement values, the daily average back pressure value (v) is obtained. The data structure of the one-dimensional array is [t,q,c|v].
[0023] Furthermore, S3 specifically refers to:
[0024] S31. Set the step size of the machine learning sliding window to n days, and the one-dimensional arrays of n consecutive days form an n-dimensional array; set a unit consisting of n consecutive days as the step size, and use the step size as the unit for comparison in the remaining steps. The daily fluctuation of the meter values can be ignored in the subsequent comparison and judgment steps.
[0025] S32. Select the data one step before the monitoring date and label it as the test set N. Then, label the data consecutively backwards in time series with one step as the interval, as s training sets N1, N2...Ns. Because the date range of the data used for training and prediction in machine learning changes according to the monitoring date, it can be called a sliding window, rather than using a fixed dataset for training.
[0026] Furthermore, the machine learning algorithm used is Gradient Boosting Decision Tree (GBDT). The selection of Gradient Boosting Decision Tree (GBDT) as the chosen machine learning method involves using the error rate of the weak learner in the previous iteration to update the weights of the training set. This process is repeated round by round until the loss function is minimized, at which point the fitting result is considered to meet the requirements.
[0027] Suppose the strong learner obtained in the previous iteration is f t-1 (x), the loss function is L(y,f) t-1 (x)), the goal of this iteration is to find a weak learner h for a regression tree model. t (x), let the loss function L(y,f) of this round be... t (x))=L(y,f t-1 (x)+h t The goal is to minimize (x) in this iteration. In other words, the decision tree found in this iteration should minimize the loss of the samples.
[0028] Furthermore, S6 specifically includes:
[0029] S61. Fit the meter readings in each dataset Ns…N1, N, Np to a straight line in chronological order, and calculate the slopes Ks…K1, K, Kp and the average values Vs…V1, V, Vp of each straight line in their respective step sizes.
[0030] S62 identifies the data drift type of the instrument by comparing the changing trends of the slope of the straight lines corresponding to the training set, test set, and prediction set with the changing trend of the average value of the instrument measurement.
[0031] Furthermore, S62 specifically involves: setting a reasonable drift range of the instrument's measured value to t%, comparing V and Vp, if...
[0032] The instrument can then identify step-type drift; and by comparing the magnitudes of V and Vp, it can also determine whether the current drift is upward or downward. If V > Vp, then it is an upward drift.
[0033] Let m ≤ (s+1). If m consecutive values from K to Ks are greater than (less than) the previous value, and m consecutive values from V to Vs are greater than (less than) the previous value, then the instrument is identified as having a continuous drift. This indicates that the instrument has a continuous drift phenomenon within the time range of Ns to N datasets. At the same time, the trend of change is used to determine whether it is an upward drift or a downward drift. If it is continuously increasing, it is an upward drift. Furthermore, the slope of the straight line and the range of increase in the average value of the instrument can be set with reasonable threshold ranges p% and q, respectively, which is more in line with the actual needs of engineering.
[0034] Depending on the actual project and the location of the instruments in each oil well, different instruments should be configured with different parameters. For example, the step size n, the number of step sizes s, and the comparison parameters m, t, p, and q mentioned in the plan can all be configured individually. This can be done in batches or with a specific strategy for each well and instrument to achieve the best diagnostic results.
[0035] A system employing the above-described method for identifying data drift in oil well pressure metering instruments includes a data acquisition module: acquiring metering values in real time at a predetermined frequency;
[0036] Fault Instrument Identification Module: Used to identify "faulty instruments" and "suspected faulty instruments";
[0037] Dataset acquisition module: Combines historical data of instrument measurement values and a sliding window to acquire s training sets N1, N2...Ns and a test set N;
[0038] Model training module: Combining machine learning, the prediction model is trained using the numerical values of the influencing factors as input and the meter readings as output through s training sets;
[0039] Prediction output module: Input the numerical values of influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np;
[0040] Drift type identification module: Identify the data drift type of the instrument by comparing the data change trends in the training set, test set, and prediction set according to the time series.
[0041] It also includes an early warning and reporting module, which is used to issue early warnings and report the results of the verification.
[0042] Based on the analysis of oilfield well production business processes, this invention applies knowledge engineering and machine learning techniques. Through knowledge engineering methods such as drift classification, well production process analysis, and selection of influencing factors, combined with machine learning methods such as sliding window sample extraction, model training, and predictive calculation, it can identify data drift of pressure metering instruments based on drift classification. Furthermore, the above methods or systems can be developed into software based on computer languages or embedded into existing process control platforms.
[0043] The beneficial effects of this invention are as follows: This invention can monitor the operating status of instruments in real time, not only identifying faulty instruments, but also promptly identifying inaccurate instruments, thereby improving operation and maintenance efficiency and production monitoring level; it solves the problem that the phenomenon of metering drift in oil well instruments is relatively hidden and the analysis and implementation cycle is relatively long, further reducing maintenance costs; it combines a sliding window to obtain the training set, and can update it with the monitoring date, resulting in higher timeliness and higher identification accuracy; it has low investment cost and can be integrated into the existing platform of the current project as a software system. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0045] Figure 2 The fitting result is obtained by randomly selecting a step size from the training results.
[0046] Figure 3 This is a schematic diagram of a step-type drift.
[0047] Figure 4 This is a schematic diagram of continuous drift. Detailed Implementation
[0048] To clearly illustrate the technical features of this solution, the following detailed implementation method will be used to describe the solution.
[0049] The metering instruments used in oilfield wells mainly include integrated temperature and pressure sensors, load sensors, pressure sensors, and flow sensors installed on the wells. The oil well pressure metering instrument in this invention is a pressure sensor.
[0050] There are two types of pressure meter drift in oilfield wells: upward drift and downward drift. Upward drift is more common, meaning that the measured value is larger than the actual value. The following section will use upward drift as an example to introduce the content of this invention.
[0051] The drift of pressure measuring instruments can be mainly divided into two categories. Based on the verification results of the offset of oil well pressure measuring instruments, the numerical characteristics of the metering drift can be divided into two categories:
[0052] (1) Step-type drift
[0053] A step-drift type is characterized by a sudden increase in the measured value, followed by a period of stability, fluctuating only within a very narrow range, such as... Figure 3 As shown.
[0054] (2) Continuous drift
[0055] Continuous drift type is characterized by a continuously increasing deviation between the instrument's measured value and the actual value within a certain time range, such as... Figure 4 As shown.
[0056] See Figure 1 In Example 1, the present invention is achieved through the following technical solution: a method for identifying data drift in oil well pressure metering instruments, comprising...
[0057] S1. Obtain the instrument's theoretical range and control range, and determine whether the instrument is a "faulty instrument" or a "suspected faulty instrument"; specifically:
[0058] S11. Set the theoretical range by combining the theoretical calculation values in the field project, and set the control range by combining historical data values and the position of the instrument in the engineering process.
[0059] S12. Instruments that continuously exceed the upper limit of the theoretical range or fall below the lower limit of the theoretical range within a predetermined time are identified as "faulty instruments".
[0060] S13. Instruments that continuously exceed the upper limit of the control range or fall below the lower limit of the control range within a predetermined time are identified as "suspected faulty instruments".
[0061] S2. Identify several factors that affect the instrument measurement values. The average value of the instrument measurement values on the same day and the average value of the influencing factors are combined into a one-dimensional array. Based on the analysis of the production business process of the instrument to be monitored, select at least one measurable influencing factor. The more relevant influencing factors selected, the better the diagnostic results will be. In order to avoid the fluctuation of values caused by external system factors such as temperature changes during the day, the measurement values of the day are averaged to obtain a one-dimensional array composed of the instrument value and multiple influencing factor values.
[0062] S3. Combine historical data of instrument measurement values and a sliding window to obtain s training sets N1, N2...Ns and a test set N; specifically:
[0063] S31. Set the step size of the machine learning sliding window to n days, and the one-dimensional arrays of n consecutive days form an n-dimensional array; set a unit consisting of n consecutive days as the step size, and use the step size as the unit for comparison in the remaining steps. The daily fluctuation of the meter values can be ignored in the subsequent comparison and judgment steps.
[0064] S32. Select the data one step before the monitoring date and label it as the test set N. Then, label the data consecutively backwards in time series with one step as the interval, as s training sets N1, N2...Ns. Because the date range of the data used for training and prediction in machine learning changes according to the monitoring date, it can be called a sliding window, rather than using a fixed dataset for training.
[0065] S4. Combining machine learning, with the numerical values of the influencing factors as input and the meter readings as output, a prediction model is trained through s training sets; the training results of a random step size are used for verification and comparison to ensure the accuracy of the model prediction. The algorithm used in the machine learning is Gradient Boosting Decision Tree (GBDT).
[0066] S5. Input the numerical values of the influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np;
[0067] S6. Identify the data drift type of the instrument by comparing the data change trends in the training set, test set, and prediction set according to the time series; specifically:
[0068] S61. Fit the meter readings in each dataset Ns…N1, N, Np to a straight line in chronological order, and calculate the slopes Ks…K1, K, Kp and the average values Vs…V1, V, Vp of each straight line in their respective step sizes.
[0069] S62 identifies the data drift type of the instrument by comparing the changing trends of the slope of the straight lines corresponding to the training set, test set, and prediction set with the changing trend of the average value of the instrument measurement.
[0070] Furthermore, S62 specifically involves: setting a reasonable drift range of the instrument's measured value to t%, comparing V and Vp, if...
[0071] The instrument can then identify step-type drift; and by comparing the magnitudes of V and Vp, it can also determine whether the current drift is upward or downward. If V > Vp, then it is an upward drift.
[0072] Let m ≤ (s+1). If m consecutive values from K to Ks are greater than (less than) the previous value, and m consecutive values from V to Vs are greater than (less than) the previous value, then the instrument is identified as having a continuous drift. This indicates that the instrument has a continuous drift phenomenon within the time range of Ns to N datasets. At the same time, the trend of change is used to determine whether it is an upward drift or a downward drift. If it is continuously increasing, it is an upward drift. Furthermore, the slope of the straight line and the range of increase in the average value of the instrument can be set with reasonable threshold ranges p% and q, respectively, which is more in line with the actual needs of engineering.
[0073] Depending on the actual project and the location of the instruments in each oil well, different instruments should be configured with different parameters. For example, the step size n, the number of step sizes s, and the comparison parameters m, t, p, and q mentioned in the plan can all be configured individually. This can be done in batches or with a specific strategy for each well and instrument to achieve the best diagnostic results.
[0074] Example 2: Based on Example 1, and combined with actual engineering, pressure sensor metering drift identification and monitoring of oil well back pressure was carried out in a management area of Shengli Oilfield. The specific steps are as follows:
[0075] S1. Obtain the instrument's theoretical range and control range, and determine whether the instrument is a "faulty instrument" or a "suspected faulty instrument"; specifically:
[0076] S11. Obtain the theoretical upper limit of the pressure sensor instrument for measuring back pressure on the oil wells in a certain management area, which is 1.2 MPa. Since there is no pressure measuring instrument upstream of the fluid flow path of the oil well back pressure, based on field engineering experience, the normal range of back pressure is 0.2 to 0.7 MPa. Set the upper control value of back pressure for the oil wells in the management area to 0.85 MPa.
[0077] S12. Monitor the minute-level back pressure values collected from all oil wells in the monitoring management area. If the back pressure of a well exceeds the theoretical upper limit of 1.2MPa for 60 consecutive points within 1 hour, push the well as "faulty instrument" to the monitoring platform.
[0078] S13. If the back pressure of a well exceeds the upper control value of 0.85MPa for 60 consecutive points within 1 hour, the well will be pushed to the monitoring platform as a "suspected fault instrument".
[0079] S2. Based on the business process of underground and surface oil gathering in oil production wells, there are three factors affecting the back pressure of oil wells: surface oil temperature, daily production volume, and daily water cut. The daily average values of each influencing factor are calculated to obtain the daily average oil temperature (t), daily average production volume (q), and daily average water cut (c). The average value of the instrument measurement values is the daily average back pressure value (v). The data structure of the one-dimensional array is [t,q,c|v].
[0080] S3, Gradient Boosting Decision Tree (GBDT) is selected as the machine learning method, and the sliding window step size is set in days, with 30 days as one step size.
[0081] The data from one step (30 days) before the monitoring date is selected as the test set N, and the data from three steps (90 days) before that date are selected as the three training sets, labeled as N1, N2, and N3 from newest to oldest. As the monitoring date is updated, the date range of the training set and the test set is also updated accordingly.
[0082] S4, a machine learning model is trained using a multidimensional sequence consisting of three training sets (90 days of data in total); and the fitting result of the training results at a random step size is shown below. Figure 2 As shown, the training score is 0.9276, which can be considered to meet the application requirements.
[0083] S5 uses the influencing factors in the test set N for 30 days as input, and the output calculation results are labeled as the prediction set Np;
[0084] S6, fit the meter values in the meter datasets of N3, N2, N1, N, and Np into straight lines in chronological order, calculate the slopes of the straight lines as K3, K2, K1, K, and Kp, and calculate the average values of the meter values as V3, V2, V1, V, and Vp;
[0085] S7. If V exceeds Vp by more than 15% of the preset range value, i.e., V > (1.15 * Vp), push the monitoring platform to indicate that the pressure sensor of the well has experienced a step-like drift. If K3, K2, K1, K are consecutively greater than the previous value by 10% in sequence, i.e., K3 > (1.1 * K2) > (1.1 * K1) or K2 > (1.1 * K1) > (1.1 * K), and V3, V2, V1, V are consecutively greater than the previous value by 5% in sequence, i.e., V3 > (1.05 * V2) > (1.05 * V1) or V2 > (1.05 * V1) > (1.05 * V), push the monitoring platform to indicate that the pressure sensor of the well has experienced a continuous drift.
[0086] Example 3: A system for identifying data drift of oil well pressure metering instruments using the method described in Example 1, comprising a data acquisition module: acquiring metering values in real time at a predetermined frequency;
[0087] Fault Instrument Identification Module: Used to identify "faulty instruments" and "suspected faulty instruments";
[0088] Dataset acquisition module: Combines historical data of instrument measurement values and a sliding window to acquire s training sets N1, N2...Ns and a test set N;
[0089] Model training module: Combining machine learning, the prediction model is trained using the numerical values of the influencing factors as input and the meter readings as output through s training sets;
[0090] Prediction output module: Input the numerical values of influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np;
[0091] Drift type identification module: Identify the data drift type of the instrument by comparing the data change trends in the training set, test set, and prediction set according to the time series.
[0092] It also includes an early warning and reporting module, which is used to issue early warnings and report the results of the verification.
[0093] Based on the above method, this method can be integrated with the current oilfield control system or production system platform. By setting parameters and threshold ranges in conjunction with business processes and historical data, when the preset conditions are met, the oilfield control system or monitoring platform will receive early warning pushes for "faulty instruments", "suspected faulty instruments", "step-over drift instruments", and "continuous drift instruments". The engineering and technical personnel in the management area can manually analyze or disassemble and inspect the pressure sensors on the oil wells based on the push information. Combined with other instrument monitoring models on the monitoring platform, the automatic tracking and online early warning of the instrument operation status in the management area can be realized, thereby improving the level of automated instrument operation and maintenance in the management area, ensuring stable oil well production, and significantly improving economic benefits.
[0094] In the description of this invention, various embodiments of the apparatus and / or process have been illustrated using block diagrams, flowcharts, and / or examples. To the extent that such block diagrams, flowcharts, and / or examples contain one or more functions and / or operations, those skilled in the art will understand that each function and / or operation within such block diagrams, flowcharts, or examples can be implemented individually and / or collectively by a great many different hardware, software, firmware, or virtually any combination thereof.
[0095] There is little difference between the hardware and software implementations of various aspects of the system; the use of hardware or software is often (but not always, as the choice between hardware and software may become important in some situations) a design choice representing a trade-off between cost and efficiency. Various means (e.g., hardware, software, and / or firmware) by which the processes and / or systems and / or other technologies described herein can be implemented exist, and preferred means will vary depending on the context in which the processes and / or systems and / or other technologies are deployed. For example, if the implementer determines that speed and accuracy are extremely important, then the implementer may choose a primarily hardware and / or firmware approach; if flexibility is extremely important, then the implementer may choose a primarily software implementation; or, but equally alternatively, the implementer may choose a combination of hardware, software, and / or firmware.
[0096] The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0097] The technical features of this invention not described can be implemented by or using existing technology, and will not be repeated here. Of course, the above description is not a limitation of this invention, and this invention is not limited to the examples above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of this invention should also be within the protection scope of this invention.
[0098] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "setting" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
Claims
1. A method for identifying data drift in oil well pressure metering instruments, characterized in that, Includes the following steps: S1. Obtain the theoretical range and control range of the instrument, and determine whether the instrument is a "faulty instrument" or a "suspected faulty instrument"; S2. Determine several factors that affect the instrument measurement values. The average value of the instrument measurement values on the same day and the average value of the influencing factors are combined into a one-dimensional array. S3. Combine historical data of instrument measurement values and sliding window to obtain s training sets N1, N2...Ns and 1 test set N; S4. Combining machine learning, with the numerical values of the influencing factors as input and the meter readings as output, a prediction model is trained using s training sets. S5. Input the numerical values of the influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np; S6. By comparing the data change trends in the training set, test set, and prediction set according to the time series, identify the data drift type of the instrument. The influencing factors in S2 include ground oil temperature, daily liquid production, and daily water content. The daily average values of each influencing factor are calculated to obtain the daily average oil temperature (t), daily average liquid production (q), and daily average water content (c). Combined with the average value of the instrument measurement values, the daily average back pressure value (v) is obtained. The data structure of the one-dimensional array is [t,q,c|v]. Specifically, S3 is: S31. Set the step size of the machine learning sliding window to n days, and the one-dimensional arrays of n consecutive days form an n-dimensional array; S32. Select the data one step before the monitoring date and label it as the test set N. Then, with one step as the interval, label the data consecutively backward according to the time series as s training sets N1, N2...Ns. Specifically, S6 is: S61. Fit the meter readings in each dataset Ns …N1, N, Np to a straight line in chronological order, and calculate the slopes Ks …K1, K, Kp of each line and the average values Vs …V1, V, Vp of the meter readings in their respective step sizes. S62 identifies the data drift type of the instrument by comparing the changing trends of the slope of the straight line corresponding to the training set, test set, and prediction set with the changing trends of the instrument measurement values. Specifically, S62 involves setting a reasonable drift range of the instrument's measured value to t%, comparing V and Vp, and if... If so, the instrument will be identified as having a step-by-step drift. Let m ≤ (s+1). If m consecutive values from K to Ks are greater than or less than the previous value, and m consecutive values from V to Vs are greater than or less than the previous value, then the discrimination instrument is a continuous drift.
2. The method for identifying data drift in oil well pressure metering instruments according to claim 1, characterized in that, Specifically, S1 is: S11. Set the theoretical range by combining the theoretical calculation values in the field project, and set the control range by combining historical data values and the position of the instrument in the engineering process. S12. Instruments that continuously exceed the upper limit of the theoretical range or fall below the lower limit of the theoretical range within a predetermined time are identified as "faulty instruments". S13. Instruments that continuously exceed the upper limit of the control range or fall below the lower limit of the control range within a predetermined time period are identified as "suspected faulty instruments".
3. The method for identifying data drift in oil well pressure metering instruments according to claim 1, characterized in that, The machine learning algorithm used is Gradient Boosting Decision Tree (GBDT).
4. A system for identifying data drift in oil well pressure metering instruments as described in any one of claims 1-3, characterized in that, include Data acquisition module: Acquires instrument measurement values in real time at a predetermined frequency; Fault Instrument Identification Module: Used to identify "faulty instruments" and "suspected faulty instruments"; Dataset acquisition module: Combines historical data of instrument measurement values and a sliding window to acquire s training sets N1, N2...Ns and a test set N; Model training module: Combining machine learning, the prediction model is trained using the numerical values of the influencing factors as input and the meter readings as output through s training sets; Prediction output module: Input the numerical values of influencing factors in the test set N into the machine learning model, and label the output results as the prediction set Np; Data drift detection module: Identifies data drift of instruments by comparing the data change trends in the training set, test set, and prediction set according to time series.
5. The system for identifying data drift in oil well pressure metering instruments according to claim 4, characterized in that, It also includes an early warning and reporting module, which is used to issue early warnings and report the results of the verification.