Semantic segmentation-based indicator diagram oil gauging model training and indicator diagram oil gauging method and device, equipment and medium
Through the dynamometer diagram oil measurement model training method based on semantic segmentation, the problem of low accuracy and limited adaptability of liquid production measurement in pumping wells is solved, efficient and accurate liquid production measurement is achieved, and production costs and Maintenance work.
Patent Information
- Application Number
- CN202410587271.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, the accuracy of liquid production measurement in pumping unit wells is not high and the scope of application is limited. Moreover, the conventional power indicator measurement algorithm requires frequent calibration, which increases costs and manpower investment.
The dynamometer diagram oil measurement model training method based on semantic segmentation is used to segment and train the dynamometer diagram through the semantic segmentation model, adjust the model parameters, and improve measurement accuracy and reliability.
It achieves efficient and accurate liquid production measurement in pumping wells, reduces maintenance work and costs, lowers production costs, and improves production efficiency.
Smart Images

Figure CN118608779A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of oil and gas production, and in particular to a dynamometer diagram oil measurement model training based on semantic segmentation and a dynamometer diagram oil measurement method, device, equipment and medium. Background Art
[0002] Pumping is the most widely used mechanical oil production method in the field of oil development. About 80% of oil field development and production in my country use pumping technology. Oil measurement is an important task in oil field production management and an important basis for mastering the production dynamics of oil wells and analyzing changes in reservoirs. At present, PetroChina has collected a large amount of production data, which is sufficient to support the needs of machine learning algorithm data. It has also conducted preliminary explorations in oil well production condition analysis, daily maintenance management, etc., and can achieve the measurement of liquid production in pumping wells.
[0003] At present, the measurement of oil well production mainly relies on field instruments for measurement or dynamometer diagrams to calculate the production volume, but both methods have some limitations. Instrument measurement requires regular manual calibration and maintenance; if the production conditions of the oil well change, the conventional dynamometer diagram measurement algorithm may need to recalibrate the dynamometer diagram, which will also increase the measurement cost and manpower investment. Apply big data and machine learning methods to measure the production volume of pumping wells and improve traditional measurement models; the process requires processing a large amount of data and using these data to train and optimize the algorithm, which brings the risk of overfitting and uncertainty of results.
[0004] Therefore, how to measure the oil in a pumping well is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The embodiment of the present invention provides a dynamometer diagram oil measurement model training and dynamometer diagram oil measurement method, device, equipment and medium based on semantic segmentation, so as to realize efficient and accurate liquid production measurement of pumping wells, and solve the problems of low oil measurement accuracy and limited adaptability.
[0006] In a first aspect, an embodiment of the present invention provides a method for training a dynamometer oil measurement model based on semantic segmentation, comprising:
[0007] Perform the semantic segmentation task of the dynamometer diagram based on the target historical production data required for the training of the dynamometer diagram oil measurement model based on semantic segmentation;
[0008] According to the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task, controlling the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation;
[0009] According to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation, parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
[0010] In a second aspect, an embodiment of the present invention further provides a dynamometer oil measuring device based on semantic segmentation, comprising:
[0011] Determine target production data of the pumping well to be metered; the target production data includes production parameters and a dynamometer diagram, the production parameters including at least one of load, dynamometer area, stroke and stroke;
[0012] The target production data is input into a dynamometer oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
[0013] In a third aspect, an embodiment of the present invention further provides a dynamometer diagram oil measurement model training device based on semantic segmentation, comprising:
[0014] The dynamometer diagram semantic segmentation module is used to perform the dynamometer diagram semantic segmentation task based on the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation;
[0015] A model training module, used for controlling the dynamometer oil measuring model based on semantic segmentation to perform the dynamometer oil measuring training task based on semantic segmentation according to the target dynamometer diagram closure point obtained from the dynamometer diagram semantic segmentation task;
[0016] A parameter adjustment module is used to adjust the parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation, so as to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
[0017] In a fourth aspect, an embodiment of the present invention further provides a dynamometer oil measuring device based on semantic segmentation, comprising:
[0018] A production data determination module is used to determine the target production data of the pumping well to be metered; the target production data includes production parameters and a dynamometer diagram, and the production parameters include at least one of load, dynamometer area, stroke and stroke;
[0019] The dynamometer chart oil measurement module is used to input the target production data into the dynamometer chart oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
[0020] In a fifth aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0021] one or more processors;
[0022] A storage device for storing one or more programs;
[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the dynamometer diagram oil measuring model training method based on semantic segmentation or the dynamometer diagram oil measuring method based on semantic segmentation described in any embodiment of the present invention.
[0024] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the dynamometer diagram oil measuring model training method based on semantic segmentation or the dynamometer diagram oil measuring method based on semantic segmentation described in any embodiment of the present invention.
[0025] The embodiment of the present invention provides a method, device, equipment and medium for training a dynamometer diagram oil measurement model based on semantic segmentation and dynamometer diagram oil measurement, which performs a dynamometer diagram semantic segmentation task based on the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation; controls the dynamometer diagram oil measurement model based on semantic segmentation to perform a dynamometer diagram oil measurement training task based on semantic segmentation based on the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task; and adjusts the parameters of the dynamometer diagram oil measurement model based on semantic segmentation based on the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measurement training task based on semantic segmentation to obtain a converged dynamometer diagram oil measurement model based on semantic segmentation. By adopting the technical solution of the embodiment of the present invention, semantic segmentation is performed on the dynamometer diagram, and the segmented dynamometer diagram is used to train the dynamometer diagram oil measurement model based on semantic segmentation, which can effectively improve the measurement accuracy and reliability of the liquid production of the pumping well, reduce maintenance work and costs, reduce production costs and improve production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:
[0027] Figure 1A It is a flow chart of a method for training a dynamometer oil measuring model based on semantic segmentation provided in an embodiment of the present invention;
[0028] Figure 1B It is a schematic diagram of a dynamometer structure provided in an embodiment of the present invention;
[0029] Figure 2 A flowchart of another method for training a dynamometer oil measuring model based on semantic segmentation provided in an embodiment of the present invention;
[0030] Figure 3 It is a flow chart of another method for training a dynamometer oil measuring model based on semantic segmentation provided in an embodiment of the present invention;
[0031] Figure 4 It is a schematic diagram of a flow chart of semantic segmentation of a dynamometer diagram provided in an embodiment of the present invention;
[0032] Figure 5 It is a structural schematic diagram of a dynamometer oil measuring model based on semantic segmentation provided in an embodiment of the present invention;
[0033] Figure 6 It is a flow chart of a method for measuring oil using a dynamometer diagram based on semantic segmentation provided in an embodiment of the present invention;
[0034] Figure 7 It is a structural schematic diagram of a dynamometer oil measuring model training device based on semantic segmentation provided in an embodiment of the present invention;
[0035] Figure 8 It is a structural schematic diagram of a dynamometer oil measuring device based on semantic segmentation provided in an embodiment of the present invention;
[0036] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0038] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0039] Among them, the acquisition, storage, use and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0040] Figure 1AThis is a flow chart of a method for training an oil measuring model based on a dynamometer diagram provided in an embodiment of the present invention. This embodiment is applicable to the case where an oil measuring model is trained based on a dynamometer diagram based on semantic segmentation. The method of this embodiment can be executed by a dynamometer diagram oil measuring model training device based on semantic segmentation, and the device can be implemented in hardware and / or software. The device can be configured in a server for training an dynamometer diagram oil measuring model based on semantic segmentation. The method specifically includes the following steps:
[0041] S110, performing a semantic segmentation task of the dynamometer diagram according to the target historical production data required for training the dynamometer diagram oil measurement model based on semantic segmentation.
[0042] Among them, oil measurement is a method of measuring the volume or weight of liquid depth, which is usually used to measure the volume of liquids such as oil and gasoline. In the embodiment of the present invention, it can refer to measuring the volume of crude oil mixture produced in the pumping well. Oil measurement can timely discover the abnormal situation of crude oil mixture production to avoid production accidents and waste of resources; oil measurement is of great significance for scientifically formulating oil field development plans, optimizing oil production processes, and improving oil recovery.
[0043] The indicator diagram reflects the working condition of the deep well pump. It is measured by a special instrument and marked on a coordinate diagram. The area enclosed by the closed line segment represents the work done by the donkey head in one reciprocating motion. Figure 1B In the figure, the horizontal axis represents the distance moved by the light rod recorded in proportion; the vertical axis represents the load on the light rod recorded in proportion; the size of the area enclosed by the closed line segment represents the amount of work done by the deep well pump.
[0044] Semantic segmentation can mean letting the computer segment the image based on its semantics; in the field of images, semantics refers to the content of the image, and segmentation means segmenting the different objects in the image from the perspective of pixels, and labeling each pixel in the original image. Figure 1B The dynamometer diagram shown in the figure is semantically segmented, that is, the image enclosed by the closed line segments is segmented from the entire image, and the segmented image is labeled.
[0045] The semantic segmentation task of the dynamometer diagram in the embodiment of the present invention is used to perform semantic segmentation on the dynamometer diagram in the training of the dynamometer diagram oil measurement model based on semantic segmentation to obtain the segmented dynamometer diagram. The segmented dynamometer diagram is used to determine the liquid production of the pumping well, which can effectively improve the measurement accuracy and reliability of the liquid production of the pumping well, reduce maintenance work and costs, reduce production costs and improve production efficiency.
[0046] S120 , according to the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task, controlling the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation.
[0047] Among them, the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task is the target sample data required for training the dynamometer diagram oil measuring model based on semantic segmentation; the dynamometer diagram oil measuring training task based on semantic segmentation is used to train the oil measuring ability of the dynamometer diagram oil measuring model based on semantic segmentation.
[0048] In an optional scheme of an embodiment of the present invention, the segmented dynamometer diagram and production parameters are used as target sample data required for training a dynamometer diagram oil measurement model based on semantic segmentation, and the dynamometer diagram oil measurement model based on semantic segmentation is trained to obtain the liquid production of the pumping well.
[0049] S130. According to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measurement training task based on semantic segmentation, adjusting parameters of the dynamometer diagram oil measurement model based on semantic segmentation to obtain a converged dynamometer diagram oil measurement model based on semantic segmentation.
[0050] Among them, the parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation. In the embodiment of the present invention, cross-validation and other methods can be used to evaluate the performance of the dynamometer diagram oil measuring model based on semantic segmentation, and the parameters of the dynamometer diagram oil measuring model based on semantic segmentation can be optimized and adjusted.
[0051] Cross-validation is an important model evaluation method, which aims to ensure that the machine learning model has good generalization ability. The stability and prediction ability of the model are evaluated by dividing the data set into several parts for training and testing, and calculating the prediction errors on different test sets. In the embodiment of the present invention, the cross-validation method is used to evaluate the oil measurement model of the dynamometer diagram based on semantic segmentation, which can effectively avoid the overfitting problem.
[0052] The embodiment of the present invention provides a method for training an dynamometer diagram oil measurement model based on semantic segmentation, which performs a dynamometer diagram semantic segmentation task based on the target historical production data required for training the dynamometer diagram oil measurement model based on semantic segmentation; controls the dynamometer diagram oil measurement model based on semantic segmentation to perform a dynamometer diagram oil measurement training task based on semantic segmentation based on the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task; and adjusts the parameters of the dynamometer diagram oil measurement model based on semantic segmentation based on the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measurement training task based on semantic segmentation to obtain a converged dynamometer diagram oil measurement model based on semantic segmentation. By adopting the technical solution of the embodiment of the present invention, semantic segmentation is performed on the dynamometer diagram, and the segmented dynamometer diagram is used to train the dynamometer diagram oil measurement model based on semantic segmentation, which can effectively improve the measurement accuracy and reliability of the liquid production of the pumping well, reduce maintenance work and costs, reduce production costs and improve production efficiency. The efficient and accurate liquid production measurement of the pumping well is achieved, and the problems of low oil measurement accuracy and limited adaptability are solved.
[0053] Figure 2 This is a flowchart of another method for training a dynamometer oil measurement model based on semantic segmentation provided in an embodiment of the present invention. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the dynamometer oil measuring model training method based on semantic segmentation provided in an embodiment of the present invention may include the following steps:
[0054] S210, obtaining initial sample production data for training a dynamometer oil measurement model based on semantic segmentation.
[0055] The initial sample production data refers to the historical production data recorded when the pumping well is historically measuring the liquid production, and the initial sample production data includes but is not limited to the historical dynamometer diagram and the closing point of the historical dynamometer diagram.
[0056] Among them, the dynamometer diagram is similar to a parallelogram, and the closed points of the dynamometer diagram can refer to the four vertices of the parallelogram, for example, Figure 1B The four red dots in the diagram can be used as closing points of the dynamometer diagram.
[0057] S220, preprocessing the initial sample production data to obtain target historical production data required for executing the semantic segmentation-based dynamometer oil measurement model training task.
[0058] Among them, see Figure 3In the model training stage of the dynamometer oil measuring model based on semantic segmentation, the initial sample generation data corresponding to the dynamometer oil measuring model before the dynamometer oil measuring model can be preprocessed to obtain the target historical production data required for the training of the dynamometer oil measuring model based on semantic segmentation. The preprocessing includes data cleaning and labeling the initial sample production data. Preprocessing the initial sample production data can ensure the quality and availability of the data.
[0059] S230, performing a semantic segmentation task of the dynamometer diagram according to the target historical production data required for training the dynamometer diagram oil measurement model based on semantic segmentation.
[0060] Among them, the labeled target historical production data is used to train the semantic segmentation model to perform semantic segmentation on the indicator diagram.
[0061] As an optional but non-limiting implementation, the dynamometer diagram semantic segmentation task is performed based on the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation, including but not limited to steps A1-A2:
[0062] Step A1: Based on the target historical production data required for executing the semantic segmentation-based dynamometer oil measurement model training task, the semantic segmentation model training task is executed and the target semantic segmentation model is obtained.
[0063] Step A2: Based on the target semantic segmentation model obtained by the semantic segmentation model training task, a semantic segmentation task is performed on the dynamometer diagram.
[0064] Among them, a semantic segmentation model is trained using the labeled historical production data of the target to segment the dynamometer diagram into different areas. The semantic segmentation algorithms used include but are not limited to the fully convolutional network (FCN) and U-Net++. Figure 4 In the embodiment of the present invention, the U-Net++ semantic segmentation algorithm can be used to perform the semantic segmentation model training task and obtain the target semantic segmentation model. During the semantic segmentation model training process, the input of the model is the dynamometer diagram and the corresponding dynamometer diagram closed points, and the output is the dynamometer diagram image after semantic segmentation.
[0065] Among them, the semantic segmentation model training task and the dynamometer diagram semantic segmentation task are used to improve the sensitivity of the dynamometer diagram oil measurement model based on semantic segmentation to the dynamometer diagram and the closure point of the dynamometer diagram, so as to improve the accuracy and reliability of the measurement of the liquid production of the pumping well.
[0066] S240. According to the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task, control the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation.
[0067] Among them, in the embodiment of the present invention, the segmented dynamometer diagram obtained based on the dynamometer diagram semantic segmentation task is used to construct a dynamometer diagram oil measurement model based on semantic segmentation with historical production parameters to measure the liquid production in the pumping well.
[0068] As an optional but non-limiting implementation, the segmented dynamometer diagram obtained according to the dynamometer diagram semantic segmentation task controls the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation, including but not limited to steps B1-B2:
[0069] Step B1: Acquire historical production parameters for training a dynamometer oil measurement model based on semantic segmentation; the historical production parameters include load, dynamometer area, stroke, and at least one production parameter in the stroke.
[0070] Step B2: Control the historical production parameters and the segmented dynamometer diagram to perform a training task of a dynamometer diagram oil measurement model based on semantic segmentation, and obtain a target dynamometer diagram oil measurement model based on semantic segmentation.
[0071] Wherein, historical production parameters are obtained, and the historical production parameters include but are not limited to load, work diagram area, stroke, and at least one production parameter in the stroke. A semantic segmentation-based work diagram oil measurement model is constructed according to the semantically segmented work diagram and the historical production parameters; the semantic segmentation-based work diagram oil measurement model may refer to a multimodal neural network model, and the multimodal neural network model includes an image recognition model and a neural network model.
[0072] Among them, see Figure 5 The image recognition model is used to recognize the dynamometer diagram after semantic segmentation, and the neural network model is used to extract features from the input historical production parameters. The training task of the dynamometer diagram oil measurement model based on semantic segmentation is performed through the dynamometer diagram after semantic segmentation and the historical production parameters, and the target dynamometer diagram oil measurement model based on semantic segmentation is obtained, so that the target dynamometer diagram oil measurement model based on semantic segmentation is more accurate.
[0073] S250, adjusting parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring model based on semantic segmentation to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
[0074] Among them, the parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation. In the embodiment of the present invention, cross-validation and other methods can be used to evaluate the performance of the dynamometer diagram oil measuring model based on semantic segmentation, and the parameters of the dynamometer diagram oil measuring model based on semantic segmentation are optimized and adjusted until the loss error converges.
[0075] As an optional but non-limiting implementation, the dynamometer diagram oil measuring model based on semantic segmentation is parameter-adjusted according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation, including but not limited to steps C1-C3:
[0076] Step C1: Determine a first loss function value corresponding to the dynamometer diagram semantic segmentation task and a second loss function value corresponding to the dynamometer diagram oil measurement training task based on semantic segmentation.
[0077] Step C2: The first loss function value and the second loss function value are fused according to the loss weights of their respective training tasks.
[0078] Step C3: adjusting parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the loss function value obtained by the loss fusion, until the dynamometer diagram oil measuring model based on semantic segmentation converges.
[0079] In an optional scheme of an embodiment of the present invention, the score of the loss function of the dynamometer diagram oil measuring training task based on semantic segmentation can be fused with the scores of the loss functions of each auxiliary training task at the beginning, and the fused total loss function score can be used to train the dynamometer diagram oil measuring model based on semantic segmentation as a whole; since it is fused at the beginning, the deviation caused by the semantic segmentation of the dynamometer diagram and the model training can be deeply integrated to a certain extent, thereby minimizing the problem of low model generalization caused by weak diversity of domain data.
[0080] In an optional solution of the embodiment of the present invention, a cross-validation method can be used to evaluate the performance of the dynamometer oil measurement model based on semantic segmentation, and the parameters of the dynamometer oil measurement model based on semantic segmentation can be optimized and adjusted until the loss error converges. After the evaluation and verification of the dynamometer oil measurement model based on semantic segmentation, the trained target dynamometer oil measurement model based on semantic segmentation is applied to the actual pumping well to realize automatic continuous oil measurement.
[0081] The embodiment of the present invention provides a method for training an dynamometer diagram oil measuring model based on semantic segmentation, which comprises obtaining initial sample production data for training an dynamometer diagram oil measuring model based on semantic segmentation; the initial sample production data comprises a historical dynamometer diagram and a closed point of the historical dynamometer diagram; the initial sample production data is preprocessed to obtain target historical production data required for executing a dynamometer diagram oil measuring model training task based on semantic segmentation; the dynamometer diagram semantic segmentation task is executed based on the target historical production data required for training an dynamometer diagram oil measuring model based on semantic segmentation; the dynamometer diagram oil measuring model based on semantic segmentation is controlled to execute a dynamometer diagram oil measuring training task based on semantic segmentation based on the segmented dynamometer diagram obtained from the dynamometer diagram semantic segmentation task; and the dynamometer diagram oil measuring model based on semantic segmentation is parameter adjusted based on the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation. By adopting the technical solution of the embodiment of the present invention, a semantic segmentation-based dynamometer diagram oil measurement model is constructed according to the historical dynamometer diagram, the historical dynamometer diagram closing point and the historical production parameters, and the parameters of the semantic segmentation-based dynamometer diagram oil measurement model are adjusted to obtain a convergent semantic segmentation-based dynamometer diagram oil measurement model. The semantic segmentation-enhanced dynamometer diagram oil measurement technology improves the accuracy and reliability of the production fluid metering of the pumping well, improves production efficiency, reduces maintenance work and costs, and reduces the maintenance cost of the pumping well metering equipment by 40% through on-site application in the oil field, thereby reducing production costs.
[0082] Figure 6 This is a flow chart of a method for measuring oil using a dynamometer diagram based on semantic segmentation provided in an embodiment of the present invention. This embodiment is applicable to measuring oil in a pumping well using a dynamometer diagram based on semantic segmentation. The method of this embodiment can be performed by a dynamometer diagram oil measuring device based on semantic segmentation, and the device can be implemented in hardware and / or software. The device can be configured in a server for measuring oil using a dynamometer diagram based on semantic segmentation. The method specifically includes the following steps:
[0083] S610, determining target production data of the pumping well to be measured.
[0084] The target production data includes production parameters and dynamometer diagrams, and the production parameters include at least one of load, dynamometer diagram area, stroke and stroke.
[0085] S620: Input the target production data into a dynamometer oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
[0086] The dynamometer oil measurement model based on semantic segmentation is obtained by using the dynamometer oil measurement model training method based on semantic segmentation described in any of the above embodiments. After entering the model application stage, the target production data of the pumping well to be measured can be input into the trained dynamometer oil measurement model based on semantic segmentation to output the liquid production of the pumping well to be explored.
[0087] The embodiment of the present invention provides a method for measuring oil using a dynamometer diagram based on semantic segmentation, which determines the target production data of the pumping well to be measured and inputs the target production data into the dynamometer diagram oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured. The use of the dynamometer diagram oil measurement model based on semantic segmentation to measure the liquid production of the pumping well can improve the measurement accuracy and reliability of the liquid production of the pumping well, reduce maintenance work and costs, reduce production costs and improve production efficiency; achieve efficient and accurate liquid production measurement of the pumping well, and solve the problems of low oil measurement accuracy and limited adaptability.
[0088] Figure 7 This is a schematic diagram of the structure of a device for training an oil-measuring model based on a semantic segmentation dynamometer diagram provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the case of training an oil-measuring model based on a semantic segmentation dynamometer diagram. The device can be implemented by software and / or hardware and is generally integrated on any electronic device with network communication function, including but not limited to: servers, computers, personal digital assistants and other devices. Figure 7 As shown, the dynamometer oil measuring model training device based on semantic segmentation provided in this embodiment may include: a dynamometer semantic segmentation module 710, a model training module 720 and a parameter adjustment module 730; wherein,
[0089] The dynamometer diagram semantic segmentation module 710 is used to perform the dynamometer diagram semantic segmentation task according to the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation;
[0090] A model training module 720, for controlling the dynamometer oil measuring model based on semantic segmentation to perform the dynamometer oil measuring training task based on semantic segmentation according to the target dynamometer diagram closure point obtained from the dynamometer diagram semantic segmentation task;
[0091] The parameter adjustment module 730 is used to adjust the parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
[0092] On the basis of the above embodiment, optionally, the dynamometer diagram oil measuring model training device based on semantic segmentation further includes a data preprocessing module, which is specifically used for:
[0093] Acquire initial sample production data for training a dynamometer oil measurement model based on semantic segmentation; the initial sample production data includes a historical dynamometer diagram and a historical dynamometer diagram closure point;
[0094] Preprocessing the initial sample production data to obtain target historical production data required for executing a semantic segmentation-based dynamometer oil measurement model training task;
[0095] The preprocessing includes data cleaning and labeling of initial sample production data.
[0096] Based on the above embodiment, optionally, the dynamometer diagram semantic segmentation module is specifically used for:
[0097] According to the target historical production data required for executing the semantic segmentation-based dynamometer oil measurement model training task, the semantic segmentation model training task is executed and the target semantic segmentation model is obtained;
[0098] According to the target semantic segmentation model obtained by the semantic segmentation model training task, a semantic segmentation task is performed on the dynamometer diagram;
[0099] Among them, the semantic segmentation model training task and the dynamometer diagram semantic segmentation task are used to improve the sensitivity of the dynamometer diagram oil measurement model based on semantic segmentation to the dynamometer diagram and the closure points of the dynamometer diagram.
[0100] Based on the above embodiment, optionally, the model training module is specifically used to:
[0101] Acquire historical production parameters for training a dynamometer oil measurement model based on semantic segmentation; the historical production parameters include load, dynamometer area, stroke, and at least one production parameter among the strokes;
[0102] The historical production parameters and the segmented dynamometer diagram are controlled to perform a training task of an dynamometer diagram oil measuring model based on semantic segmentation, and a target dynamometer diagram oil measuring model based on semantic segmentation is obtained.
[0103] Based on the above embodiment, optionally, the parameter adjustment module is specifically used to:
[0104] Determine a first loss function value corresponding to the dynamometer diagram semantic segmentation task and a second loss function value corresponding to the dynamometer diagram oil measurement training task based on semantic segmentation;
[0105] The first loss function value and the second loss function value are subjected to loss fusion according to the loss weights of the respective training tasks;
[0106] According to the loss function value obtained by the loss fusion, parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted until the dynamometer diagram oil measuring model based on semantic segmentation converges.
[0107] The dynamometer diagram oil measuring model training device based on semantic segmentation provided in an embodiment of the present invention can execute the dynamometer diagram oil measuring model training method based on semantic segmentation provided in any of the above-mentioned embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the dynamometer diagram oil measuring model training method based on semantic segmentation. For detailed process, please refer to the relevant operations of the dynamometer diagram oil measuring model training method based on semantic segmentation in the above-mentioned embodiments.
[0108] Figure 8 This is a schematic diagram of the structure of a device for measuring oil based on a dynamometer diagram based on semantic segmentation provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to measuring oil in a pumping well based on a dynamometer diagram based on semantic segmentation. The device can be implemented by software and / or hardware and is generally integrated on any electronic device with network communication function, including but not limited to: servers, computers, personal digital assistants and other devices. Figure 8 As shown, the dynamometer oil measuring device based on semantic segmentation provided in this embodiment may include the following: a production data determination module 810 and a dynamometer oil measuring module 820; wherein,
[0109] The production data determination module 810 is used to determine the target production data of the pumping well to be metered; the target production data includes production parameters and a dynamometer diagram, and the production parameters include at least one of load, dynamometer area, stroke and stroke;
[0110] The dynamometer chart oil measurement module 820 is used to input the target production data into the dynamometer chart oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
[0111] The dynamometer diagram oil measuring device based on semantic segmentation provided in an embodiment of the present invention can execute the dynamometer diagram oil measuring method based on semantic segmentation provided in any of the above-mentioned embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the dynamometer diagram oil measuring method based on semantic segmentation. For detailed process, please refer to the relevant operations of the dynamometer diagram oil measuring method based on semantic segmentation in the above-mentioned embodiments.
[0112] Fig. 91 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0113] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0114] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0115] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the dynamometer oil measurement model training and dynamometer oil measurement method based on semantic segmentation.
[0116] In some embodiments, the dynamometer oil measuring model training and dynamometer oil measuring method based on semantic segmentation can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the dynamometer oil measuring model training and dynamometer oil measuring method based on semantic segmentation described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the dynamometer oil measuring model training and dynamometer oil measuring method based on semantic segmentation in any other appropriate manner (for example, by means of firmware).
[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0119] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0121] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0122] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for training a dynamometer oil measurement model based on semantic segmentation, characterized in that: The method comprises: Perform the semantic segmentation task of the dynamometer diagram based on the target historical production data required for the training of the dynamometer diagram oil measurement model based on semantic segmentation; According to the segmented dynamometer diagram obtained by the dynamometer diagram semantic segmentation task, controlling the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation; According to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation, parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
2. The method according to claim 1, characterized in that: Before performing the dynamometer diagram semantic segmentation task based on the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation, the dynamometer diagram oil measurement model training method based on semantic segmentation further includes: Acquire initial sample production data for training a dynamometer oil measurement model based on semantic segmentation; the initial sample production data includes a historical dynamometer diagram and a historical dynamometer diagram closure point; Preprocessing the initial sample production data to obtain target historical production data required for executing a semantic segmentation-based dynamometer oil measurement model training task; The preprocessing includes data cleaning and labeling of initial sample production data.
3. The method according to claim 1, characterized in that: The target historical production data required for the training of the dynamometer oil measuring model based on semantic segmentation is used to perform the dynamometer diagram semantic segmentation task, including: According to the target historical production data required for executing the semantic segmentation-based dynamometer oil measurement model training task, the semantic segmentation model training task is executed and the target semantic segmentation model is obtained; According to the target semantic segmentation model obtained by the semantic segmentation model training task, a semantic segmentation task is performed on the dynamometer diagram; Among them, the semantic segmentation model training task and the dynamometer diagram semantic segmentation task are used to improve the sensitivity of the dynamometer diagram oil measurement model based on semantic segmentation to the dynamometer diagram and the closure points of the dynamometer diagram.
4. The method according to claim 1, characterized in that: The segmented dynamometer diagram obtained according to the dynamometer diagram semantic segmentation task controls the dynamometer diagram oil measurement model based on semantic segmentation to perform the dynamometer diagram oil measurement training task based on semantic segmentation, including: Acquire historical production parameters for training a dynamometer oil measurement model based on semantic segmentation; the historical production parameters include load, dynamometer area, stroke, and at least one production parameter among the strokes; The historical production parameters and the segmented dynamometer diagram are controlled to perform a training task of an dynamometer diagram oil measuring model based on semantic segmentation, and a target dynamometer diagram oil measuring model based on semantic segmentation is obtained.
5. The method according to claim 1, characterized in that The method of adjusting parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation includes: Determine a first loss function value corresponding to the dynamometer diagram semantic segmentation task and a second loss function value corresponding to the dynamometer diagram oil measurement training task based on semantic segmentation; The first loss function value and the second loss function value are subjected to loss fusion according to the loss weights of the respective training tasks; According to the loss function value obtained by the loss fusion, parameters of the dynamometer diagram oil measuring model based on semantic segmentation are adjusted until the dynamometer diagram oil measuring model based on semantic segmentation converges.
6. A method for measuring oil from a dynamometer diagram based on semantic segmentation, characterized in that: The dynamometer diagram oil measuring model based on semantic segmentation obtained by the dynamometer diagram oil measuring model training method based on semantic segmentation according to any one of claims 1 to 5, the dynamometer diagram oil measuring method based on semantic segmentation comprising: Determine target production data of the pumping well to be metered; the target production data includes production parameters and a dynamometer diagram, the production parameters including at least one of load, dynamometer area, stroke and stroke; The target production data is input into a dynamometer oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
7. A dynamometer oil measurement model training device based on semantic segmentation, characterized in that: The dynamometer diagram oil measurement model training device based on semantic segmentation comprises: The dynamometer diagram semantic segmentation module is used to perform the dynamometer diagram semantic segmentation task based on the target historical production data required for the dynamometer diagram oil measurement model training based on semantic segmentation; A model training module, used for controlling the dynamometer oil measuring model based on semantic segmentation to perform the dynamometer oil measuring training task based on semantic segmentation according to the target dynamometer diagram closure point obtained from the dynamometer diagram semantic segmentation task; A parameter adjustment module is used to adjust the parameters of the dynamometer diagram oil measuring model based on semantic segmentation according to the dynamometer diagram semantic segmentation task and the dynamometer diagram oil measuring training task based on semantic segmentation, so as to obtain a converged dynamometer diagram oil measuring model based on semantic segmentation.
8. A dynamometer oil measuring device based on semantic segmentation, characterized in that: The dynamometer oil measuring device based on semantic segmentation comprises: A production data determination module is used to determine the target production data of the pumping well to be metered; the target production data includes production parameters and a dynamometer diagram, and the production parameters include at least one of load, dynamometer area, stroke and stroke; The dynamometer chart oil measurement module is used to input the target production data into the dynamometer chart oil measurement model based on semantic segmentation to obtain the liquid production of the pumping well to be measured.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the dynamometer diagram oil measuring model training method based on semantic segmentation as described in any one of claims 1-5 or the dynamometer diagram oil measuring method based on semantic segmentation as described in claim 6.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the dynamometer diagram oil measuring model training method based on semantic segmentation as described in any one of claims 1 to 5 or the dynamometer diagram oil measuring method based on semantic segmentation as described in claim 6 when executed by a computer processor.
Citation Information
Patent Citations
Oil metering method and system of oil pumping unit based on data driving
CN110363337A
Method and device for determining gas production rate of rod-pumped well based on indicator diagram
CN117350001A
Indicator diagram-based method and apparatus for determining gas production amount of rod pump well
WO2024001071A1
