Oil well pre-alarm threshold determination method and device, storage medium and electronic equipment
By preprocessing and statistical analysis of oil well production data, the pre-alarm threshold of oil wells is determined, which solves the problem of uncertainty and poor accuracy of threshold determination in the prior art, and achieves more efficient and accurate threshold recommendations.
Patent Information
- Application Number
- CN202311425871.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
There is uncertainty in the existing oil well pre-alarm threshold determination method, which leads to poor accuracy and lacks accurate analysis of historical data, making it impossible to achieve a comprehensive correlation analysis of each production parameter.
By obtaining the initial production data of the target oil well for preprocessing, the difference between the target production data and the preset threshold value is calculated, the normal distribution curve is determined, and the normal distribution curve is processed based on the preset standard deviation range, and the initial threshold function expression is determined. Then, the production data to be processed is processed using this function expression, the oil well pre-alarm threshold is determined, and the initial threshold function expression is updated to determine the target threshold function expression.
Statistical analysis based on historical production data is realized, the efficiency and accuracy of threshold recommendations are improved, false alarms and missed reports are reduced, and the scientificity and accuracy of oil well pre-alarm threshold recommendations are improved.
Smart Images

Figure CN119917778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil well production monitoring pre-alarm, and in particular to a method, device, storage medium and electronic equipment for determining an oil well pre-alarm threshold. Background Art
[0002] At present, under the background of profound changes in management models, oil and gas companies are actively promoting digital transformation, which provides strong support for increasing oilfield reserves and production, reducing costs and increasing efficiency. However, in terms of the formulation of oil well early warning rules and data analysis management, there has been a lack of a scientific method for recommending oil well early warning thresholds.
[0003] The traditional method of setting the threshold value for oil well pre-alarm is mainly based on the experience setting method based on business judgment or the approximate value of nearby oil wells, and is adjusted manually during the production process. From the perspective of scientificity and accuracy, the experience analysis method has human uncertainty, and the dissemination of this analysis method is not strong, and its accuracy is greatly affected by human factors. From a technical perspective, the traditional experience-based threshold setting method lacks effective analysis and processing of data, and the efficiency of manual adjustment is low, resulting in inaccurate final pre-alarm results. In the process of promoting digital transformation, oil fields still have certain defects in data value mining, data alarm effectiveness analysis and management, such as repeated alarms, false alarms, and missed alarms.
[0004] In addition, the existing alarm rules are limited to single-point alarms and local alarms, lacking integrated linkage alarm analysis of process, geology, engineering, and the Internet of Things, and cannot accurately reflect the production situation, affecting the efficiency and quality of integrated command and dispatch. The current oil well pre-alarm threshold recommendation method is mainly based on manual experience judgment of the business, or the approximate value recommendation of related oil wells, and is manually adjusted in actual production. It lacks accurate analysis of historical data and cannot achieve a comprehensive correlation analysis of various production parameters. In addition, the efficiency and accuracy of the setting based on manual experience need to be improved.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method, device, storage medium and electronic device for determining an oil well pre-alarm threshold value, so as to at least solve the technical problem that the existing method for determining an oil well pre-alarm threshold value has uncertainty and leads to poor accuracy.
[0007] According to one aspect of an embodiment of the present invention, a method for determining an oil well pre-alarm threshold is provided, comprising: obtaining initial production data of a target oil well, and preprocessing the initial production data to determine target production data; calculating the difference between the target production data and a preset threshold, and determining a normal distribution curve based on the target production data and the difference; processing the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; using the initial threshold function expression to process the production data to be processed to determine an oil well pre-alarm threshold, and updating the initial threshold function expression based on the oil well pre-alarm threshold to determine a target threshold function expression.
[0008] Optionally, the above-mentioned initial production data of the target oil well is obtained, and the above-mentioned initial production data is pre-processed to determine the target production data, including: performing a first classification processing on the above-mentioned initial production data based on the production process to obtain a first classification result; performing a second classification processing on the above-mentioned first classification result based on the production method to obtain a second classification result; performing a third classification processing on the above-mentioned second classification result based on the production oil pressure parameter to obtain a third classification result; performing a cleaning processing on the above-mentioned third classification result, and calculating the third classification result after the cleaning processing to obtain the above-mentioned target production data.
[0009] Optionally, the above-mentioned calculation of the difference between the above-mentioned target production data and a preset threshold value, and determining a normal distribution curve based on the above-mentioned target production data and the above-mentioned difference, includes: determining a ratio value between the above-mentioned difference and the above-mentioned target production data; performing normal distribution probability statistics on the above-mentioned ratio value to determine the above-mentioned normal distribution curve.
[0010] Optionally, the above-mentioned processing of the normal distribution curve based on a preset standard deviation range to determine the initial threshold function expression includes: determining the above-mentioned preset standard deviation range; using a function expression approximation algorithm to approximate the above-mentioned normal distribution curve based on the above-mentioned preset standard deviation range to determine the above-mentioned initial threshold function expression, wherein the above-mentioned function expression approximation algorithm includes: a least squares fitting algorithm, a polynomial fitting algorithm and a spline interpolation algorithm.
[0011] Optionally, the above-mentioned initial threshold function expression is used to process the production data to be processed and determine the oil well pre-alarm threshold, including: obtaining the above-mentioned production data to be processed generated during the production process of the target oil well; substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression to determine the oil well pre-alarm threshold, and storing the above-mentioned oil well pre-alarm threshold in the threshold database.
[0012] Optionally, the above-mentioned updating of the initial threshold function expression based on the above-mentioned oil well pre-alarm threshold to determine the target threshold function expression includes: repeatedly substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression within a preset time, determining the oil well pre-alarm threshold to a preset number of times, and determining multiple oil well pre-alarm thresholds; and updating the above-mentioned initial threshold function expression based on the above-mentioned multiple oil well pre-alarm thresholds to determine the target threshold function expression, wherein the above-mentioned target threshold function expression is used to determine the target oil well pre-alarm threshold.
[0013] According to another aspect of an embodiment of the present invention, there is also provided an oil well pre-alarm threshold determination device, comprising: an acquisition module, used to acquire the initial production data of the target oil well, and pre-process the above initial production data to determine the target production data; a calculation module, used to calculate the difference between the above target production data and a preset threshold, and determine the normal distribution curve based on the above target production data and the above difference; a processing module, used to process the above normal distribution curve based on a preset standard deviation range, and determine the initial threshold function expression; a determination module, used to use the above initial threshold function expression to process the production data to be processed, determine the oil well pre-alarm threshold, and update the above initial threshold function expression based on the above oil well pre-alarm threshold to determine the target threshold function expression.
[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing any one of the above-mentioned methods for determining an oil well pre-alarm threshold.
[0015] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program is configured to execute any one of the above-mentioned methods for determining an oil well pre-alarm threshold value when running.
[0016] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for determining an oil well pre-alarm threshold.
[0017] In an embodiment of the present invention, the target production data is determined by acquiring the initial production data of the target oil well and preprocessing the above initial production data; the difference between the above target production data and a preset threshold is calculated, and a normal distribution curve is determined based on the above target production data and the above difference; the above normal distribution curve is processed based on a preset standard deviation range to determine an initial threshold function expression; the above initial threshold function expression is used to process the production data to be processed to determine the oil well pre-alarm threshold, and the above initial threshold function expression is updated based on the above oil well pre-alarm threshold to determine the target threshold function expression, thereby achieving the purpose of performing statistical analysis based on historical production data to determine the recommended threshold, thereby achieving the technical effect of improving the efficiency and accuracy of threshold recommendation, and further solving the technical problem that the existing method for determining the oil well pre-alarm threshold has uncertainty and leads to poor accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1 is a flow chart of a method for determining an oil well pre-alarm threshold value according to an embodiment of the present invention;
[0020] Figure 2 It is a schematic flow chart of an optional method for recommending oil well pre-alarm threshold value based on statistical analysis according to an embodiment of the present invention;
[0021] Figure 3 It is a structural schematic diagram of a device for determining an oil well pre-alarm threshold according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] In the field of oil well production monitoring in oilfield production, accurate pre-alarm threshold setting is crucial to production safety. The traditional method is mainly based on professional judgment by business personnel, according to the historical production situation and experience data of the oil well, or according to the principle of setting approximate values based on its geological parameters and production situation close to nearby oil wells, and it is constantly adjusted by humans during the production process. From the perspective of scientificity and accuracy, the empirical analysis method has artificial uncertainty. At the same time, the dissemination of this analysis method is not strong, and the accuracy is greatly affected by human factors. From the perspective of accuracy, the accuracy is not high. On the one hand, there will be a situation where there is no alarm for a fault, that is, a missed alarm, which will lead to serious production problems such as a decrease in production and equipment damage; on the other hand, there will be a situation where an alarm is issued without a fault, that is, a false alarm, which will lead to a waste of emergency repair and maintenance costs, and the production progress is forced to stop. From the perspective of production efficiency, the manual setting of thresholds is inefficient and increases production costs. From a technical perspective, the traditional manual setting method mainly refers to historical experience to set thresholds, lacks scientific and effective analysis and processing of historical production data, and leads to inaccurate final warning alarm results.
[0025] Statistical analysis methods can clearly and intuitively reflect the distribution law of data, thereby more objectively and reasonably describing the information behind the data. Using distribution probability calculation to perform statistical analysis on the historical pre-alarm threshold data of oil wells, summarize the law from a large amount of data, generate a threshold recommendation rule base, and give initial threshold recommendations based on the rule base in actual production, which can make the pre-alarm threshold recommendations of oil wells more accurate.
[0026] According to an embodiment of the present invention, a method embodiment for determining an oil well pre-alarm threshold is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] Figure 1 is a flow chart of a method for determining an oil well pre-alarm threshold according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0028] Step S102, obtaining initial production data of the target oil well, and preprocessing the initial production data to determine target production data;
[0029] Step S104, calculating the difference between the target production data and a preset threshold, and determining a normal distribution curve based on the target production data and the difference;
[0030] Step S106, processing the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression;
[0031] Step S108, using the above initial threshold function expression to process the production data to be processed, determine the oil well pre-alarm threshold, and update the above initial threshold function expression based on the above oil well pre-alarm threshold to determine the target threshold function expression.
[0032] In an embodiment of the present invention, the execution body of the oil well pre-alarm threshold determination method provided in the above steps S102 to S108 is an oil well pre-alarm threshold determination system, which determines the target production data by acquiring the initial production data of the target oil well and pre-processing the above initial production data; calculates the difference between the above target production data and the preset threshold, and determines the normal distribution curve based on the above target production data and the above difference; processes the above normal distribution curve based on a preset standard deviation range to determine the initial threshold function expression; uses the above initial threshold function expression to process the production data to be processed to determine the oil well pre-alarm threshold, and updates the above initial threshold function expression based on the above oil well pre-alarm threshold to determine the target threshold function expression.
[0033] As an optional embodiment, Figure 2 The flowchart of the oil well pre-alarm threshold recommendation method based on statistical analysis is shown. First, the oil wells are intelligently classified based on the production process, and the classified data is cleaned. The ratio of the threshold difference to the actual value is calculated based on the cleaned data and the distribution probability statistics are performed. A normal distribution curve is constructed, and the normal distribution curve is approximated by expression discrete data. The initial threshold function expression is determined, and an expression database is established. Subsequently, threshold recommendations are made based on the thresholds in the database.
[0034] It should be noted that the threshold data in the database can be updated with the threshold value obtained in the actual data calculation process.
[0035] As an optional embodiment, the above system is mainly used for multi-parameter early warning model of oil well production conditions, multi-parameter early warning model of oil well production process, multi-parameter early warning model of oil well production operation, and multi-parameter early warning model of oil well production output, respectively, for production processes in dimensions such as production wells, production equipment and facilities, production systems, and oil well production units, and recommends the settings of pre-alarm thresholds for each parameter.
[0036] Through the embodiments of the present invention, in view of the inaccuracy of the traditional oil well production pre-alarm threshold recommendation method, a recommended threshold is given based on the statistical analysis of historical production data, which solves the problem of unclear basis and rules for setting the oil well pre-alarm threshold; a threshold recommendation method based on statistical analysis is provided to promote the standardization and accuracy of oil field production data information; and the phenomenon of false alarms and missed alarms in oil field production can be effectively reduced. In view of the low manual efficiency of the traditional oil well production pre-alarm threshold recommendation method, an oil well threshold recommendation rule base is established based on historical threshold recommendation data, and the rule base is continuously updated and improved in subsequent production, and threshold recommendations are made based on the rule base, which greatly improves the efficiency of threshold recommendation.
[0037] In the embodiment of the present invention, it is mainly used in the oil well pre-alarm threshold recommendation business. The application of statistical analysis in the pre-alarm threshold data analysis greatly improves the scientificity and accuracy of the threshold recommendation, and the application prospect is very broad. The pre-alarm mechanism is crucial to the production of oil wells, and the accurate threshold setting is crucial to the planning and formulation of production costs and emergency treatment plans. This innovative achievement can bring huge benefits to oil field production.
[0038] The present invention improves the efficiency of threshold recommendation, the application of distribution probability statistics methods in data analysis, and the method of establishing a rule base. Compared with the traditional threshold data given according to manual experience, the recommendation efficiency is greatly improved in the oilfield production monitoring technology oil well pre-alarm threshold recommendation, and the labor cost is effectively saved. It is also conducive to timely discovering hidden production problems, improving system operation efficiency, and increasing single well production. Using this innovative method, it is possible to timely discover production anomalies in oil and water wells and stations, reduce the reduction in system operation efficiency caused by production anomalies, and affect the single well liquid production. Timely and effective handling of anomalies can put the system in a better operating state. At the same time, the accuracy of threshold recommendation is improved. Accurate threshold alarms can detect subtle parameter changes in the production process, detect abnormal states of production objects in a timely manner, avoid small problems from continuing to develop into safety incidents, and avoid safety hazards in the production process.
[0039] The present invention is conducive to timely discovering leakage problems in the production process to avoid safety and environmental protection incidents. Early detection and early treatment of problems can avoid environmental protection incidents; the present invention can recommend reasonable single parameter thresholds to ensure stable operation of the production system, improve the operating efficiency of the production system, reduce energy consumption, and achieve energy conservation and emission reduction for enterprises.
[0040] In an optional embodiment, the initial production data of the target oil well is obtained, and the initial production data is preprocessed to determine the target production data, including: performing a first classification process on the initial production data based on the production process to obtain a first classification result; performing a second classification process on the first classification result based on the production method to obtain a second classification result; performing a third classification process on the second classification result based on the production oil pressure parameter to obtain a third classification result; performing a cleaning process on the third classification result, and calculating the third classification result after the cleaning process to obtain the target production data.
[0041] As an optional embodiment, the production data of each oil well in the oil field for 30 days are sorted out, and first classified according to the production process into two types: heavy oil wells and thin oil wells. On the basis of the first classification, a second classification is carried out according to different production methods, which are divided into pumping wells, electric pump wells, and screw pump wells. The third classification is carried out according to the numerical range of real-time production parameters. Here, taking thin oil pumping wells as an example, for the production oil pressure parameters, the daily oil pressure data of each thin oil well within 30 days is averaged, and the values of all wells are counted. According to the maximum value interval and combined with expert experience, it is divided into three categories: oil pressure <1MPa, 1MPa<oil pressure<2MPa, and oil pressure>2MPa. The data of different types of oil wells are subsequently processed separately.
[0042] Optional data cleaning includes: data processing that violates business logic and outlier detection based on normal distribution; all production data are screened and abnormal data are cleaned according to the actual business significance of production parameters. For example, a negative oil pressure in the daily production report is an outlier and needs to be cleaned. The mean and variance of the 30-day daily data of each parameter are calculated, and the deviation between the current value and the mean is used as input. Outliers are those that exceed 2 times the variance and are cleaned.
[0043] In an optional embodiment, the above-mentioned calculation of the difference between the above-mentioned target production data and a preset threshold value, and determining a normal distribution curve based on the above-mentioned target production data and the above-mentioned difference, includes: determining a ratio value between the above-mentioned difference and the above-mentioned target production data; performing normal distribution probability statistics on the above-mentioned ratio value to determine the above-mentioned normal distribution curve.
[0044] As an optional embodiment, the following formula is used to calculate the ratio of the difference between the daily data and the current threshold to the daily data:
[0045]
[0046] Optionally, if the oil pressure of a well is less than 1MPa after averaging the oil pressure within 30 days, and the current oil pressure low-alarm threshold is set to 0.5MPa, and the actual production oil pressure average within 30 days is 1.21MPa, then:
[0047]
[0048] The calculated ratio of threshold difference to actual value x of all wells was subjected to normal distribution probability statistics, and a normal distribution curve was fitted. The grouped data had good centralization, and the statistical results of the ratio of threshold difference to actual value of most parameters showed that about 80% of the wells were distributed within 3 times the standard deviation, and this part of the data was selected for further processing.
[0049] In an optional embodiment, the above-mentioned normal distribution curve is processed based on a preset standard deviation range to determine the initial threshold function expression, including: determining the above-mentioned preset standard deviation range; using a function expression approximation algorithm to approximate the above-mentioned normal distribution curve based on the above-mentioned preset standard deviation range to determine the above-mentioned initial threshold function expression, wherein the above-mentioned function expression approximation algorithm includes: a least squares fitting algorithm, a polynomial fitting algorithm and a spline interpolation algorithm.
[0050] As an optional embodiment, in order to obtain the functional relationship between the ratio of the threshold difference to the actual value and the actual value, according to the statistical results of the normal distribution, oil wells within the range of 3 times the standard deviation are selected, and the ratio of the threshold difference to the actual value and the daily data are approximated by a functional expression, including but not limited to the least squares method, polynomial fitting, spline interpolation and other methods. The curve formula is fitted to obtain the functional relationship between the ratio of the threshold difference to the actual value and the daily data.
[0051] Least squares fitting formula:
[0052] y i =kx i +b,
[0054]
[0055] Polynomial fitting formula:
[0056]
[0057] Optionally, in the formula, x is the daily data, and y is the ratio of the threshold difference to the actual value.
[0058] In an optional embodiment, the above-mentioned initial threshold function expression is used to process the production data to be processed and determine the oil well pre-alarm threshold, including: obtaining the above-mentioned production data to be processed generated during the production process of the target oil well; substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression to determine the oil well pre-alarm threshold, and storing the above-mentioned oil well pre-alarm threshold in the threshold database.
[0059] In an optional embodiment, the above-mentioned initial threshold function expression is updated based on the above-mentioned oil well pre-alarm threshold to determine the target threshold function expression, including: repeatedly substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression within a preset time, determining the oil well pre-alarm threshold to a preset number of times, and determining multiple oil well pre-alarm thresholds; and updating the above-mentioned initial threshold function expression based on the above-mentioned multiple oil well pre-alarm thresholds to determine the target threshold function expression, wherein the above-mentioned target threshold function expression is used to determine the target oil well pre-alarm threshold.
[0060] As an optional embodiment, according to the above method, the analytical expression corresponding to each type is calculated, and a threshold recommendation rule base is established based on this formula. In the subsequent production process, a timed task is set to repeat the above process every 10 days to calculate the functional relationship between the new ratio and the actual data, and continuously update the rule base.
[0061] As an optional embodiment, according to the actual production parameters of a certain oil well, the data is sorted and cleaned, and the data type is determined according to the classification basis. According to the type, the fitting relationship between the threshold difference ratio and the actual data is given from the rule library, and the ratio of the threshold difference to the actual value is calculated by the formula.
[0062] After obtaining the ratio of the threshold difference to the actual value, the threshold recommendation data is calculated according to the following formula:
[0063] Threshold = daily data × (1-threshold difference ratio)
[0064] Through the above steps, it is possible to give a recommended threshold value based on the statistical analysis of historical production data, solving the problem of unclear basis and rules for setting the oil well pre-alarm threshold value; it provides a threshold recommendation method based on statistical analysis to promote the standardization and accuracy of oil field production data information; it can effectively reduce the false alarm and missed alarm phenomenon of oil field production. In view of the low manual efficiency of the traditional oil well production pre-alarm threshold recommendation method, an oil well threshold recommendation rule base was established based on historical threshold recommendation data, and the rule base was continuously updated and improved in subsequent production, and threshold recommendations were made based on the rule base, which greatly improved the efficiency of threshold recommendation.
[0065] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above-mentioned method for determining the oil well pre-alarm threshold value. Figure 3 is a schematic diagram of the structure of a device for determining an oil well pre-alarm threshold according to an embodiment of the present invention. Figure 3 As shown, the above device includes: an acquisition module 30, a calculation module 32, a processing module 34 and a determination module 36, wherein:
[0066] The acquisition module 30 is used to acquire the initial production data of the target oil well, and pre-process the initial production data to determine the target production data;
[0067] A calculation module 32, used to calculate the difference between the target production data and a preset threshold, and determine a normal distribution curve based on the target production data and the difference;
[0068] A processing module 34 is used to process the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression;
[0069] The determination module 36 is used to use the above initial threshold function expression to process the production data to be processed, determine the oil well pre-alarm threshold, and update the above initial threshold function expression based on the above oil well pre-alarm threshold to determine the target threshold function expression.
[0070] It should be noted here that the above-mentioned acquisition module 30, calculation module 32, processing module 34 and determination module 36 correspond to steps S102 to S108 in the embodiment, and the four modules are the same as the instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiment.
[0071] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0072] According to an embodiment of the present invention, an embodiment of a computer-readable storage medium is also provided. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the oil well pre-alarm threshold determination method provided in the above embodiment.
[0073] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0074] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining initial production data of the target oil well, and preprocessing the above initial production data to determine the target production data; calculating the difference between the above target production data and a preset threshold, and determining a normal distribution curve based on the above target production data and the above difference; processing the above normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; using the above initial threshold function expression to process the production data to be processed, determine the oil well pre-alarm threshold, and update the above initial threshold function expression based on the above oil well pre-alarm threshold to determine the target threshold function expression.
[0075] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: performing a first classification process on the initial production data based on the production process to obtain a first classification result; performing a second classification process on the first classification result based on the production method to obtain a second classification result; performing a third classification process on the second classification result based on the production oil pressure parameter to obtain a third classification result; performing a cleaning process on the third classification result, and calculating the third classification result after the cleaning process to obtain the target production data.
[0076] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: determining a ratio between the difference and the target production data; and performing normal distribution probability statistics on the ratio to determine the normal distribution curve.
[0077] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: determining the preset standard deviation range; using a function expression approximation algorithm to approximate the normal distribution curve based on the preset standard deviation range, and determining the initial threshold function expression, wherein the function expression approximation algorithm includes: a least squares fitting algorithm, a polynomial fitting algorithm, and a spline interpolation algorithm.
[0078] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining the above-mentioned production data to be processed generated during the production process of the target oil well; substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression, determining the oil well pre-alarm threshold, and storing the above-mentioned oil well pre-alarm threshold in the threshold database.
[0079] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: repeatedly substituting the above-mentioned production data to be processed into the above-mentioned initial threshold function expression within a preset time, determining the oil well pre-alarm threshold to a preset number of times, and determining multiple oil well pre-alarm thresholds; and updating the above-mentioned initial threshold function expression based on the above-mentioned multiple oil well pre-alarm thresholds, and determining the target threshold function expression, wherein the above-mentioned target threshold function expression is used to determine the target oil well pre-alarm threshold.
[0080] According to an embodiment of the present invention, an embodiment of a processor is also provided. Optionally, in this embodiment, the computer-readable storage medium can be used to store program codes executed by the oil well pre-alarm threshold determination method provided in the above embodiment.
[0081] An embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining initial production data of a target oil well, and preprocessing the initial production data to determine target production data; calculating the difference between the target production data and a preset threshold, and determining a normal distribution curve based on the target production data and the difference; processing the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; using the initial threshold function expression to process the production data to be processed to determine an oil well pre-alarm threshold, and updating the initial threshold function expression based on the oil well pre-alarm threshold to determine a target threshold function expression.
[0082] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: obtaining initial production data of a target oil well, and preprocessing the above initial production data to determine target production data; calculating the difference between the above target production data and a preset threshold, and determining a normal distribution curve based on the above target production data and the above difference; processing the above normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; using the above initial threshold function expression to process the production data to be processed, determining an oil well pre-alarm threshold, and updating the above initial threshold function expression based on the above oil well pre-alarm threshold to determine a target threshold function expression.
[0083] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0084] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0087] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0088] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0089] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for determining an oil well early warning threshold, characterized in that: include: Acquiring initial production data of a target oil well, and preprocessing the initial production data to determine target production data; Calculating a difference between the target production data and a preset threshold, and determining a normal distribution curve based on the target production data and the difference; Processing the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; The initial threshold function expression is used to process the production data to be processed, determine the oil well pre-alarm threshold, and update the initial threshold function expression based on the oil well pre-alarm threshold to determine the target threshold function expression.
2. The method according to claim 1, characterized in that The obtaining of initial production data of the target oil well and preprocessing the initial production data to determine target production data includes: Performing a first classification process on the initial production data based on the production process to obtain a first classification result; Performing a second classification process on the first classification result based on the production method to obtain a second classification result; Performing a third classification process on the second classification result based on the production oil pressure parameter to obtain a third classification result; The third classification result is cleaned, and the cleaned third classification result is calculated to obtain the target production data.
3. The method according to claim 1, characterized in that The calculating the difference between the target production data and a preset threshold, and determining a normal distribution curve based on the target production data and the difference, comprises: Determining a ratio value between the difference and the target production data; Perform normal distribution probability statistics on the proportion value to determine the normal distribution curve.
4. The method according to claim 1, characterized in that: The processing of the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression includes: Determining the preset standard deviation range; A function expression approximation algorithm is used to approximate the normal distribution curve based on the preset standard deviation range to determine the initial threshold function expression, wherein the function expression approximation algorithm includes: a least squares fitting algorithm, a polynomial fitting algorithm and a spline interpolation algorithm.
5. The method according to claim 1, characterized in that: The method of using the initial threshold function expression to process the production data to be processed and determining the oil well pre-alarm threshold comprises: Acquire the to-be-processed production data generated during the production process of the target oil well; Substitute the to-be-processed production data into the initial threshold function expression to determine the oil well pre-alarm threshold, and store the oil well pre-alarm threshold in a threshold database.
6. The method according to claim 5, characterized in that The updating of the initial threshold function expression based on the oil well pre-alarm threshold value to determine the target threshold function expression includes: Repeating the to-be-processed production data into the initial threshold function expression within a preset time to determine the oil well pre-alarm threshold to a preset number of times, and determining a plurality of oil well pre-alarm thresholds; The initial threshold function expression is updated based on the multiple oil well pre-alarm thresholds to determine a target threshold function expression, wherein the target threshold function expression is used to determine a target oil well pre-alarm threshold.
7. A device for determining an oil well early warning threshold, characterized in that: include: An acquisition module is used to acquire initial production data of a target oil well, and pre-process the initial production data to determine target production data; A calculation module, used to calculate the difference between the target production data and a preset threshold, and determine a normal distribution curve based on the target production data and the difference; A processing module, used to process the normal distribution curve based on a preset standard deviation range to determine an initial threshold function expression; The determination module is used to use the initial threshold function expression to process the production data to be processed, determine the oil well pre-alarm threshold, and update the initial threshold function expression based on the oil well pre-alarm threshold to determine the target threshold function expression.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the oil well early warning threshold determination method according to any one of claims 1 to 6.
9. A processor, characterized in that: The processor is used to run a program, wherein the program is configured to execute the oil well early warning threshold determination method according to any one of claims 1 to 6 when running.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for determining an oil well early warning threshold value according to any one of claims 1 to 6.