Method and device for determining net oil weight of crude oil transported by pipeline

By obtaining the instrument image of the flow meter mechanical watch head in the oil pipeline and using feature extraction and reading models, combined with preset state parameters, a net oil weight prediction model is constructed, which solves the problems of low efficiency and poor accuracy in the existing technology, and realizes the Efficient automatic calculation of the net weight of crude oil.

CN113159059BActive Publication Date: 2024-11-01PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010074089.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-22
Publication Date
2024-11-01
Estimated Expiration
2040-01-22

AI Technical Summary

Technical Problem

In the prior art, it is necessary to determine that the net oil weight of the pipe-transported crude oil is low and has poor accuracy, which requires a large number of manual readings, tables and calculations.

Method used

By obtaining the flow meter mechanical meter head instrument image of the oil pipeline, the trained feature extraction model and instrument reading model determine the crude oil flow value, and input the net oil weight prediction model with the preset state parameter value, and automatically calculate the net oil weight of crude oil .

Benefits of technology

It improves the calculation efficiency and accuracy of crude oil net weight, reduces manual errors, and realizes automated oil net weight measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113159059B_ABST
    Figure CN113159059B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for determining the net oil weight of pipeline crude oil, which belongs to the field of oil development technology. The method includes: obtaining an instrument image of a mechanical meter head of an oil pipeline flow meter photographed at a preset shooting cycle within a preset time period, determining the crude oil flow value corresponding to each instrument image based on a trained feature extraction model and an instrument reading model, obtaining parameter values ​​of multiple preset state parameters detected at a preset detection cycle within a preset time period, and determining the net oil weight of the crude oil based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of multiple preset state parameters and a trained net oil weight prediction model. The present application obtains the net oil weight of the crude oil in the oil pipeline by constructing a trained net oil weight prediction model, rather than obtaining the net oil weight of the crude oil in the oil pipeline through a large amount of manual reading, table lookup and calculation, so as to improve the efficiency and accuracy of obtaining the net oil weight of the crude oil in the oil pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of oil development, and in particular to a method and device for determining the net oil weight of pipeline-transported crude oil. Background Art

[0002] Oil is an important strategic resource of the country, and the exploration of oil is also increasing. The crude oil produced by oil and gas wells is collected and transported to the oil and gas metering station through the oil pipeline to calculate the net weight of the crude oil. Therefore, it is necessary to provide a method to determine the net weight of pipeline crude oil. Among them, the net weight of crude oil refers to the weight of all crude oil in the oil pipeline minus the water.

[0003] In the related art, technicians use flow meters to measure the volume of crude oil in the oil pipeline and record the temperature and pressure values ​​at that time. Then, the crude oil is sampled and analyzed in the laboratory, and the density value, water content and laboratory temperature value of the crude oil sample are recorded. The standard density table of crude oil is queried, and the density value of the crude oil sample is found in the density column, and the laboratory temperature value of the crude oil sample is found in the temperature column. The value at the intersection of the two is the standard density value of the crude oil sample. According to the standard density value and the temperature and pressure values ​​recorded when measuring the volume of crude oil in the oil pipeline, the temperature correction coefficient and pressure correction coefficient of the crude oil volume are calculated by formula, and the value of the measured volume of crude oil in the oil pipeline is corrected, multiplied by the standard density value, and the water content in the crude oil is deducted by the water content, and finally the net oil weight of the crude oil can be obtained.

[0004] The inventors have discovered that the related art has at least the following technical problems:

[0005] In the above method, a large amount of manual work is required to read, look up tables and calculate in order to obtain the net weight of crude oil. The efficiency of manual calculation is low, and each person's experience is different, so errors are prone to occur in the processing process. Therefore, the above method is low in efficiency and poor in accuracy. Summary of the invention

[0006] The embodiment of the present application provides a method and device for determining the net oil weight of crude oil transported in a pipeline, which can solve the problem of low efficiency and poor accuracy in obtaining the net oil weight of crude oil in an oil pipeline in the related art. The technical solution is as follows:

[0007] In one aspect, a method for determining the net oil weight of pipeline crude oil is provided, the method comprising:

[0008] Acquire an instrument image of a mechanical meter head of a flow meter of a target oil pipeline photographed within a preset time period and according to a preset photographing cycle;

[0009] Based on the trained feature extraction model, determine the feature information corresponding to each instrument image taken;

[0010] Determine the crude oil flow value corresponding to each meter image based on the feature information corresponding to each meter image and the trained meter reading model;

[0011] Obtain parameter values ​​of multiple preset state parameters detected according to a preset detection cycle within a preset time period;

[0012] The net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of the plurality of preset state parameters detected, and the trained net oil weight prediction model.

[0013] In a possible implementation, determining the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the plurality of preset state parameters detected, and the trained net oil weight prediction model includes:

[0014] Determining the crude oil flow value in the target oil pipeline within the preset time period according to the crude oil flow value corresponding to each instrument image;

[0015] Based on the detected parameter values ​​of the plurality of preset state parameters, determining an average value of the parameter value of each preset state parameter;

[0016] The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0017] In a possible implementation, the preset shooting period is equal to the preset detection period, and the determining the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the plurality of preset state parameters detected, and the trained net oil weight prediction model includes:

[0018] The crude oil flow value corresponding to each instrument image and the parameter values ​​of the detected multiple preset state parameters are input into the trained net oil weight prediction model to obtain the net oil weight of the crude oil in the target oil pipeline.

[0019] In a possible implementation, determining feature information corresponding to each captured instrument image based on a trained feature extraction model includes:

[0020] For each meter image captured, the meter image is input into a reading position recognition model to obtain position information of each reading in the meter image, and based on the position information of each reading in the meter image, a sub-image corresponding to each reading is determined in the meter image;

[0021] Determine feature information corresponding to each reading contained in each meter image based on a sub-image corresponding to each reading contained in each meter image and a trained feature extraction model;

[0022] Determining the crude oil flow value corresponding to each meter image based on the feature information corresponding to each meter image and the trained meter reading model includes:

[0023] Input the feature information corresponding to each reading contained in each meter image into the trained meter reading model to obtain the value of each reading contained in each meter image;

[0024] Based on the value of each bit reading contained in each meter image, the crude oil flow value corresponding to each meter image is determined.

[0025] In a possible implementation, determining feature information corresponding to each digit of the reading contained in each meter image based on the sub-image corresponding to each digit of the reading contained in each meter image and the trained feature extraction model includes:

[0026] Convert the sub-image corresponding to each reading contained in each meter image into a grayscale image;

[0027] Convert each grayscale image into a binary image to obtain a binary image corresponding to each bit reading contained in each instrument image;

[0028] The binary images corresponding to each reading contained in each meter image are respectively input into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each meter image.

[0029] On the one hand, a device for predicting the net oil weight of crude oil in an oil pipeline is provided, the device comprising:

[0030] A first acquisition module is used to acquire an instrument image of a mechanical meter head of a flow meter of a target oil pipeline photographed within a preset time period and according to a preset photographing cycle;

[0031] A first determination module is used to determine feature information corresponding to each instrument image captured based on a trained feature extraction model;

[0032] a second determination module, configured to determine the crude oil flow value corresponding to each meter image based on the feature information corresponding to each meter image and a trained meter reading model;

[0033] A second acquisition module is used to acquire parameter values ​​of multiple preset state parameters detected in a preset time period according to a preset detection cycle;

[0034] The third determination module is used to determine the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the plurality of preset state parameters detected, and the trained net oil weight prediction model.

[0035] In a possible implementation manner, the third determining module is used to:

[0036] Determining the crude oil flow value in the target oil pipeline within the preset time period according to the crude oil flow value corresponding to each instrument image;

[0037] Based on the detected parameter values ​​of the plurality of preset state parameters, determining an average value of the parameter value of each preset state parameter;

[0038] The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0039] In a possible implementation manner, the preset shooting period is equal to the preset detection period, and the third determining module is used to:

[0040] The crude oil flow value corresponding to each instrument image and the parameter values ​​of the detected multiple preset state parameters are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0041] In a possible implementation manner, the first determining module includes:

[0042] A first determination subunit is used for inputting each captured instrument image into a reading position recognition model to obtain position information of each reading in the instrument image, and determining a sub-image corresponding to each reading in the instrument image based on the position information of each reading in the instrument image;

[0043] A second determination subunit is used to determine feature information corresponding to each digit of the reading contained in each meter image based on a sub-image corresponding to each digit of the reading contained in each meter image and a trained feature extraction model;

[0044] The second determining module is used for:

[0045] Input the feature information corresponding to each reading contained in each meter image into the trained meter reading model to obtain the value of each reading contained in each meter image;

[0046] Based on the value of each bit reading contained in each meter image, the crude oil flow value corresponding to each meter image is determined.

[0047] In a possible implementation manner, the second determining subunit is used to:

[0048] Convert the sub-image corresponding to each reading contained in each meter image into a grayscale image;

[0049] Convert each grayscale image into a binary image to obtain a binary image corresponding to each bit reading contained in each instrument image;

[0050] The binary images corresponding to each reading contained in each meter image are respectively input into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each meter image.

[0051] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0052] Obtain an instrument image of a flow meter mechanical head of a target oil pipeline photographed at a preset shooting cycle within a preset time period, determine feature information corresponding to each photographed instrument image based on a trained feature extraction model, determine the crude oil flow value corresponding to each instrument image based on the feature information corresponding to each instrument image and a trained instrument reading model, obtain parameter values ​​of multiple preset state parameters detected at a preset detection cycle within a preset time period, and determine the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of the multiple preset state parameters detected, and a trained net oil weight prediction model. The present application obtains the net oil weight of the crude oil in the oil pipeline by constructing a trained net oil weight prediction model, rather than obtaining the net oil weight of the crude oil in the oil pipeline through a large amount of manual reading, table lookup, and calculation, so as to improve the efficiency and accuracy of obtaining the net oil weight of the crude oil in the oil pipeline. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 It is a schematic diagram of an implementation environment of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application;

[0055] Figure 2 is a flow chart of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application;

[0056] Figure 3is a schematic diagram of a net oil weight prediction model based on a BP neural network provided in an embodiment of the present application;

[0057] Figure 4 It is a relative error diagram of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application;

[0058] Figure 5 It is a structural schematic diagram of a device for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0060] Figure 1 Schematic diagram of the implementation environment of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application. Figure 1 The implementation environment includes: a net oil quantity prediction device and a preset state parameter measurement device. Specifically, the net oil quantity prediction device includes: a data acquisition module, an image recognition module, and a net oil weight prediction module. The preset state parameter measurement device includes: a temperature transmitter, a scraper flowmeter, a pressure transmitter, a crude oil sample density analyzer, a crude oil sample water content analyzer, and a flowmeter mechanical head of an oil pipeline.

[0061] The method provided in the embodiment of the present application can be applied in the field of oil development technology, and specifically applied to determine the net oil weight of pipeline crude oil. After the crude oil is transported to the oil and gas metering station through the oil pipeline, it is necessary to clarify the net oil weight of the crude oil in the oil pipeline in order to better hand over with the oil and gas processing station in the next stage. Therefore, technicians need a method for determining the net oil weight of pipeline crude oil to obtain the net oil weight of the crude oil in the oil pipeline more efficiently and accurately.

[0062] The technician can adopt a method for determining the net oil weight of pipeline crude oil provided in the embodiment of the present application, by constructing a feature extraction model and an instrument reading model for the image recognition module to identify the reading of the flow meter mechanical head of the oil pipeline, and obtain the crude oil flow value in the oil pipeline. Use a temperature transmitter to obtain the temperature of the crude oil in the oil pipeline, that is, the metering temperature. Use a pressure transmitter to obtain the pressure of the crude oil in the oil pipeline, that is, the metering pressure. Then, the crude oil in the oil pipeline is sampled and sent to the laboratory for chemical analysis, and the temperature of the laboratory at this time, that is, the apparent temperature, is recorded. The density of the crude oil sample at the apparent temperature can be obtained using a crude oil sample density analyzer, that is, the apparent density. The water content of the crude oil sample can be obtained using a crude oil sample water content analyzer. Construct a net oil weight prediction model, and process the collected metering temperature, metering pressure, apparent temperature, apparent density and water content through a data acquisition module, and then input them into the net oil weight prediction module together with the crude oil flow value in the oil pipeline, and finally obtain the net oil weight of the crude oil in the oil pipeline. Instead of determining the net oil weight of the pipeline crude oil through a large amount of manual reading, table lookup and calculation, the efficiency and accuracy of obtaining the net oil weight of the crude oil in the oil pipeline can be improved.

[0063] Figure 2 is a flow chart of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application, see Figure 2 , the embodiment comprises:

[0064] In step 201, an instrument image of a mechanical head of a flow meter of a target oil pipeline captured within a preset time period and according to a preset capturing cycle is acquired.

[0065] In step 202, feature information corresponding to each captured instrument image is determined based on the trained feature extraction model.

[0066] In step 203, the crude oil flow value corresponding to each meter image is determined based on the feature information corresponding to each meter image and the trained meter reading model.

[0067] In step 204, parameter values ​​of a plurality of preset state parameters detected in a preset detection cycle within a preset time period are obtained.

[0068] In step 205, the net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each meter image, the detected parameter values ​​of the plurality of preset state parameters and the trained net oil weight prediction model.

[0069] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0070] Obtain an instrument image of a flow meter mechanical head of a target oil pipeline photographed at a preset shooting cycle within a preset time period, determine feature information corresponding to each photographed instrument image based on a trained feature extraction model, determine the crude oil flow value corresponding to each instrument image based on the feature information corresponding to each instrument image and a trained instrument reading model, obtain parameter values ​​of multiple preset state parameters detected at a preset detection cycle within a preset time period, and determine the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of the multiple preset state parameters detected, and a trained net oil weight prediction model. The present application obtains the net oil weight of the crude oil in the oil pipeline by constructing a trained net oil weight prediction model, rather than obtaining the net oil weight of the crude oil in the oil pipeline through a large amount of manual reading, table lookup, and calculation, thereby improving the efficiency and accuracy of obtaining the net oil weight of the crude oil in the oil pipeline.

[0071] Figure 2 is a flow chart of a method for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application, see Figure 2 , the embodiment comprises:

[0072] In step 201, an instrument image of a mechanical head of a flow meter of a target oil pipeline captured within a preset time period and according to a preset capturing cycle is acquired.

[0073] Among them, the preset time period may refer to 24 hours a day, and the embodiments of the present application do not limit this. The preset shooting cycle may refer to shooting once every two hours, for example, shooting the flow meter mechanical head of the target oil pipeline at 10:00, 12:00, 14:00, etc., so that the preset time period can be divided into 12 preset shooting cycles. The flow meter mechanical head of the oil pipeline can be used to display the crude oil flow value reading in the current oil pipeline. A shooting device is provided here, and the displayed reading can be shot to obtain an instrument image of the flow meter mechanical head, and the instrument image is composed of the digits of the instrument reading of the flow meter mechanical head.

[0074] It should be noted that the reading of the flow meter mechanical head has one decimal place. Since the decimal place has almost no change in the preset time period, it has almost no effect on the reading of the crude oil flow value of the flow meter mechanical head of the oil pipeline. Therefore, it can be ignored, and only the integer in front of the reading can be photographed and read. Due to the different specifications of the flow meter mechanical heads produced by different manufacturers, the number of digits in the mechanical head reading will also be different. The embodiment of the present application takes the four-digit mechanical head reading as an example for explanation.

[0075] In step 202, feature information corresponding to each captured instrument image is determined based on the trained feature extraction model.

[0076] The feature extraction model refers to a model for extracting feature information of an instrument image based on the instrument image. The feature extraction model may be a machine learning model, which can extract feature information from an instrument image based on a large amount of sample training.

[0077] In implementation, for each meter image taken, the meter image is input into a reading position recognition model to obtain position information of each reading in the meter image; based on the position information of each reading in the meter image, a sub-image corresponding to each reading is determined in the meter image; based on the sub-image corresponding to each reading contained in each meter image and a trained feature extraction model, feature information corresponding to each reading contained in each meter image is determined.

[0078] The reading position recognition model refers to a model for position recognition of each reading of the instrument image based on the instrument image. The reading position recognition model can be a reading position recognition rule to realize the recognition of the position information of each reading in the instrument image. The sub-image refers to the image corresponding to each reading obtained from the instrument image after image processing.

[0079] In implementation, since the instrument image includes images containing readings and images not containing readings, the reading positions can be obtained through manual calibration when identifying the reading positions.

[0080] Among them, the form of the reading position information can be various, for example, it can be the position information of the four vertices of the minimum circumscribed rectangle of the reading, for example, it can be a position calibration image, the position calibration image is a binary image, the pixel value of the pixel points belonging to the reading is a first value, such as 255, that is, white, and the pixel value of the pixel points that do not belong to the reading is a second value, such as 0, that is, black.

[0081] For example, first, a large number of sample images need to be prepared. By setting a shooting device on the mechanical head of the flow meter, a large number of instrument images of the mechanical head of the flow meter can be taken, and the number of instrument images taken is not less than 4,000, and the size of each instrument image must be consistent. Each instrument image obtained by image cropping can be processed to obtain a sub-image corresponding to each reading, and the sub-image corresponding to each reading is named with the real reading, that is, named 7, 9, 4 and 1 respectively. The sub-image corresponding to each reading obtained is stored, and no less than 16,000 sub-images can be obtained, and these sub-images are used as sample images. In the sample image, there are images containing readings and images that do not contain readings. Then, the pixels belonging to the readings and the pixels that do not belong to the readings in the picture can be manually marked, wherein the pixel values ​​of the pixels belonging to the readings can be set to 255, and the pixel values ​​of the pixels that do not belong to the readings can be set to 0, so that the position calibration image of the readings is obtained, and then the position information of each reading in the instrument image is obtained.

[0082] In addition, the captured instrument image can also be used as a sample image, and the processing process is similar to the above, which will not be repeated here. Finally, a position calibration image of four readings can be obtained on the sample image, and then the position information of the four readings in the instrument image can be obtained.

[0083] In implementation, based on the sub-image corresponding to each reading contained in each instrument image and the trained feature extraction model, the process of determining the feature information corresponding to each reading contained in each instrument image can be: converting the sub-image corresponding to each reading contained in each instrument image into a grayscale image, converting each grayscale image into a binary image to obtain a binary image corresponding to each reading contained in each instrument image, and inputting the binary images corresponding to each reading contained in each instrument image into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each instrument image.

[0084] Among them, the sub-image corresponding to each reading is composed of RGB (Red: red, Green: green, Blue: blue, a color standard), and the pixel values ​​of the pixels of the sub-image constitute a three-dimensional matrix, and the pixel values ​​are between 0-255. The grayscale image converted from the sub-image corresponding to each reading is composed of monochrome, and the pixel values ​​of the pixels of the grayscale image constitute a two-dimensional matrix. The elements in the two-dimensional matrix are the pixel values ​​of the pixels of the grayscale image, and the pixel values ​​are between 0-255. In order to facilitate the distinction of readings, the pixel values ​​of the pixels of the grayscale image in the range of 0-115 can all be set to 0, and the pixel values ​​of the pixels of the grayscale image in the range of 115-255 can all be set to 255, that is, the grayscale image can be converted to a binary image. The pixel values ​​of the pixels of the binary image constitute a two-dimensional matrix, and the elements in the two-dimensional matrix are the pixel values ​​of the pixels of the binary image, and the pixel values ​​are all composed of 0 and 255. The pixel values ​​of the pixels belonging to the reading are the first value, such as 255, and the pixel values ​​of the pixels not belonging to the reading are the second value, such as 0.

[0085] For example, the sub-image corresponding to each reading contained in each instrument image is finally converted into a corresponding binary image, and the binary image is input into the trained feature extraction model in sequence from left to right. The readings are extracted through the feature extraction model according to the position information of each reading in the instrument image, and the pixel points of the readings are determined. The pixel values ​​of the pixels belonging to the readings are set to 255, and the pixel values ​​of the pixels that do not belong to the readings are set to 0. In this way, a calibration image of the readings is obtained, and then the feature information corresponding to each reading contained in each instrument image is obtained.

[0086] In step 203, the crude oil flow value corresponding to each meter image is determined based on the feature information corresponding to each meter image and the trained meter reading model.

[0087] The meter reading model refers to a model for extracting feature information of a meter image based on the meter image. The meter reading model may be a machine learning model, such as a convolutional neural network model, etc. Based on a large number of sample training, the crude oil flow value corresponding to the meter image can be read out.

[0088] In implementation, based on the feature information corresponding to each meter image and the trained meter reading model, the process of determining the crude oil flow value corresponding to each meter image can be: inputting the feature information corresponding to each bit reading contained in each meter image into the trained meter reading model respectively to obtain the value of each bit reading contained in each meter image; based on the value of each bit reading contained in each meter image, determining the crude oil flow value corresponding to each meter image.

[0089] The embodiment of the present application also provides a training method for the feature extraction model in the above step 202 and the meter reading model in this step 203. The specific training process is: obtaining multiple sample meter images and a benchmark crude oil flow value corresponding to each sample meter image, and based on the multiple sample meter images and the benchmark crude oil flow value corresponding to each sample meter image, training the initial feature extraction model and the meter reading model to obtain a trained feature extraction model and a trained meter reading model.

[0090] In implementation, technicians can collect a large number of sample meter images as sample data. For each sample data, technicians can determine the benchmark crude oil flow value corresponding to the sample data through computer analysis. Then, a sample data can be obtained and input into the initial feature extraction model and the initial meter reading model. In the initial feature extraction model and the initial meter reading model, the value of the model parameter to be adjusted can be a preset initial value. At this time, the crude oil flow value corresponding to each sample meter image output by the meter reading model is obtained, and the difference information between the crude oil flow value corresponding to each sample meter image output by the meter reading model and the benchmark crude oil flow value corresponding to each sample meter image is determined. Based on the difference information and the preset training algorithm, the adjustment value of each model parameter is determined, and then each model parameter is numerically adjusted to complete a training. Then other sample data are obtained and the above process is repeated. In this way, the final feature extraction model and meter reading model are obtained through training of a large number of samples.

[0091] For example, by inputting the feature information corresponding to each reading contained in each meter image into the trained meter reading model in order from left to right, the value of each reading contained in each meter image can be obtained, and the values ​​of each reading obtained are combined into a number in groups of four, and finally the crude oil flow value corresponding to each meter image can be obtained.

[0092] In step 204, parameter values ​​of a plurality of preset state parameters detected in a preset detection cycle within a preset time period are obtained.

[0093] Among them, the preset state parameters include: metering pressure, metering temperature, apparent density, apparent temperature and moisture content.

[0094] It should be noted that the detection periods of the various preset state parameters may be the same or different. For example, taking 24 hours a day as the preset time period, the detection period of metering pressure and metering temperature may be 2 hours, and the detection period of apparent density, apparent temperature and moisture content may be 4 hours.

[0095] In implementation, a detection device may be used to obtain parameter values ​​of a plurality of preset state parameters.

[0096] For example, technicians can use a pressure transmitter to obtain the crude oil metering pressure of the oil pipeline. Use a temperature transmitter to obtain the crude oil metering temperature of the oil pipeline. By sampling the crude oil in the oil pipeline and sending it to the laboratory for testing and analysis, the apparent temperature can be obtained. The crude oil sample density analyzer can be used to obtain the apparent density of the crude oil sample at the apparent temperature, and the crude oil sample water content analyzer can be used to obtain the water content of the crude oil sample. Specifically, technicians can obtain 12 metering pressure data, 12 metering temperature data, 6 apparent density data, 6 apparent temperatures, and 6 water content data within 24 hours a day.

[0097] In step 205, the net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each meter image, the detected parameter values ​​of the plurality of preset state parameters and the trained net oil weight prediction model.

[0098] The crude oil flow value corresponding to each instrument image can be expressed as the distribution volume. The distribution volume refers to the reading of the flow meter mechanical head every two hours during the crude oil flow in the oil pipeline. The difference between the two consecutive readings of the mechanical head is the distribution volume. For example: the reading at 8:00 am is 7941m 3 (Unit: cubic meters), the reading at 10:00 am is 8149m 3 , then the distribution volume is 208m 3 . If the preset time period is 24 hours a day, 12 distribution volumes can be generated every day. The net oil weight prediction model can be a machine learning model, such as a BP neural network model. The net oil weight prediction model can be based on the BP neural network model, and according to the error back propagation mechanism, a large number of samples are used to train it, and the weight of the BP neural network model is determined, thereby forming a BP neural network model with the ability to automatically predict the net oil volume and the error is within the allowable range, that is, the net oil weight prediction model.

[0099] The embodiment of the present application also provides a training method for the net oil weight prediction model. The specific training process is: obtaining multiple samples, the samples include sample first parameter values ​​of multiple preset state parameters, sample crude oil flow values ​​and corresponding benchmark crude oil net oil weights, and based on the multiple samples, training the initial net oil weight prediction model to obtain a trained net oil weight prediction model.

[0100] In implementation, the technician can collect a large number of sample first parameter values ​​and sample crude oil flow values ​​of various preset state parameters as sample data. For each sample data, the technician can determine the benchmark crude oil net oil weight corresponding to the sample data through computer analysis. Then, a sample data can be obtained and input into the initial net oil weight prediction model to start the forward propagation training of the sample data. In the initial net oil weight prediction model, the weight of the model to be adjusted can be a preset initial value. At this time, the crude oil net oil weight corresponding to each sample data output by the net oil weight prediction model is obtained, and the difference information between the crude oil net oil weight corresponding to each sample data and the benchmark crude oil net oil weight corresponding to each sample data is determined. When the crude oil net oil weight corresponding to each sample data does not match or differs greatly from the benchmark crude oil net oil weight corresponding to each sample data, the error back propagation stage begins, and based on the difference information and the preset error gradient descent training algorithm, the weights of each layer of the net oil weight prediction model are updated and adjusted to determine the adjustment value of the net oil weight prediction model weight, thereby completing a training. Then obtain other sample data and repeat the above process. Through repeated information forward propagation and error back propagation processes, the weights of each layer of the net oil weight prediction model are continuously adjusted until the error between the actual output of the net oil weight prediction model and the benchmark crude oil net oil weight is within the allowable range. At this time, the weight of the net oil weight prediction model is the final weight. In this way, the final net oil weight prediction model is obtained through training with a large number of samples.

[0101] In one possible implementation, the crude oil flow value in the target oil pipeline within the preset time period is determined based on the crude oil flow value corresponding to each instrument image, and the average value of the parameter value of each preset state parameter is determined based on the parameter values ​​of the multiple preset state parameters detected. The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0102] The crude oil flow value in the target oil pipeline refers to the cumulative crude oil flow value in the target oil pipeline within a preset time period. Specifically, the 12 sub-flows obtained within the preset time period may be cumulatively summed to obtain the crude oil flow value in the target oil pipeline within the preset time period.

[0103] In implementation, the specific process of determining the crude oil flow value in the target oil pipeline within the preset time period and the average value of each preset state parameter may be as shown in Table 1 below.

[0104] Table 1

[0105]

[0106] In implementation, before using the trained net oil weight prediction model to determine the net oil weight of crude oil in the target oil pipeline, it is necessary to construct a BP neural network of the prediction model. The specific construction process is as follows: construct the topological structure of the BP neural network model, and a BP neural network with an input layer, a first hidden layer, a second hidden layer, and an output layer can be used. Take the five groups of sample data, including the average metering temperature, average apparent density, average apparent temperature, average water content, and cumulative flow, as the input of the BP neural network model, and take the net oil weight of the target crude oil as the output of the neural network. Therefore, it can be determined that the input layer of the BP neural network model contains 5 nodes and the output layer contains 1 node. Traverse the number of nodes contained in each intermediate hidden layer of the BP neural network model, determine that the first hidden layer contains 8 nodes, and the second hidden layer contains 4 nodes, so as to establish the BP neural network of the net oil weight prediction model.

[0107] It should be noted that, since the measured metering pressure is less than 0.05MPa (unit: megapascal) in manual metering, the metering pressure value is small and has almost no effect on the determination of the net oil weight of the crude oil in the final oil pipeline. The metering pressure is not corrected and recorded. Therefore, this embodiment does not consider the correction of the metering pressure. When inputting the BP neural network model, the metering pressure can be ignored.

[0108] For example, based on the BP neural network of the constructed net oil weight prediction model, technicians can collect 2400 sets of data on historical metering temperature, distribution volume, apparent density, apparent temperature and water content, and use the processing method in Table 1 to process the historical metering temperature, distribution volume, apparent density, apparent temperature and water content to obtain 2400 sets of sample data, of which 5 sets of sample data are shown in Table 2.

[0109] Table 2

[0110]

[0111]

[0112] The above 2400 groups of sample data are divided, and 2100 groups are selected as training samples, and the remaining 300 groups are selected as test samples. The 2100 groups of training samples are input into the constructed BP neural network and trained. The weights of the neural network are continuously updated iteratively to obtain the trained net oil weight prediction model. The accumulated flow rate, average metering temperature, average apparent density, average apparent temperature, and average water content of crude oil in the oil pipeline within 24 hours are input into the trained net oil weight prediction model to obtain the net oil weight of crude oil in the oil pipeline.

[0113] In implementation, Figure 3 As shown, Figure 3 It is a schematic diagram of the net oil weight prediction model based on the BP neural network. The input data and output data of the above-mentioned trained net oil weight prediction model can be combined into a new training sample, and the trained net oil weight prediction model can be further trained with the existing 2100 sets of training samples, and the weights of the neural network can be further iterated to improve the net oil weight prediction model, so as to improve the efficiency and accuracy of obtaining the net oil weight of crude oil in the oil pipeline.

[0114] In another possible implementation, the preset shooting cycle is equal to the preset detection cycle, and the crude oil flow value corresponding to each instrument image and the parameter values ​​of multiple preset state parameters detected are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0115] It should be noted that the shooting cycle in step 201 can be 2 hours, and the preset detection cycle of the metering pressure and metering temperature can be 2 hours, that is, the preset shooting cycle is equal to the preset detection cycle. The preset detection cycle of the apparent density, apparent temperature and moisture content can be 4 hours, at which time the preset shooting cycle and the preset detection cycle have overlapping time points. Therefore, it can be considered that the preset shooting cycle is equal to the preset detection cycle.

[0116] In practice, the distribution volume and the detected metering temperature, apparent density, apparent temperature and water content are directly input into the trained net oil weight prediction model, and the net oil weight of the crude oil in the target oil pipeline can also be determined.

[0117] For example, the distribution volume, metering temperature, apparent density, apparent temperature and water content recorded at 10:00, 14:00, 18:00, 22:00, 2:00 and 6:00 respectively can be input into the trained net oil weight prediction model to obtain the net oil weight of the crude oil in the oil pipeline.

[0118] In practice, the net oil weight prediction model provided in the embodiment of the present application may be verified. The specific process may be: comparing the net oil weight value of crude oil output by the net oil weight prediction model with the actual net oil weight value of crude oil, and calculating the relative error between the two. The verification result is as follows: Figure 4 As shown, Figure 4 Schematic diagram of relative error of a method for predicting the net oil weight of crude oil in an oil pipeline provided in an embodiment of the present application. Figure 4 It can be seen that the relative errors of the two are within ±0.1%, and there are 272 groups of sample data with an error within ±0.05%, accounting for 91% of all sample data. Therefore, the net oil weight of crude oil in the oil pipeline determined by the method provided in the embodiment of the present application is relatively accurate.

[0119] Through the method provided by the embodiment of the present application, by acquiring the instrument image of the flow meter mechanical head of the target oil pipeline photographed in a preset time period according to a preset shooting cycle, based on the trained feature extraction model, the feature information corresponding to each instrument image photographed is determined, based on the feature information corresponding to each instrument image and the trained instrument reading model, the crude oil flow value corresponding to each instrument image is determined, and the parameter values ​​of multiple preset state parameters detected in a preset time period according to a preset detection cycle are acquired, and based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of the multiple preset state parameters detected, and the trained net oil weight prediction model, the net oil weight of the crude oil of the target oil pipeline is determined. The present application obtains the net oil weight of the crude oil of the oil pipeline by constructing a trained net oil weight prediction model, rather than obtaining the net oil weight of the crude oil of the oil pipeline through a large amount of manual reading, table lookup and calculation, so as to improve the efficiency and accuracy of obtaining the net oil weight of the crude oil of the oil pipeline.

[0120] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0121] Figure 5 Schematic diagram of a device for determining the net oil weight of pipeline crude oil provided in an embodiment of the present application. Figure 5 , the device comprises:

[0122] The first acquisition module 501 is used to acquire an instrument image of a mechanical meter head of a flow meter of a target oil pipeline photographed within a preset time period and according to a preset photographing cycle;

[0123] A first determination module 502, used to determine feature information corresponding to each captured instrument image based on a trained feature extraction model;

[0124] A second determination module 503, configured to determine the crude oil flow value corresponding to each meter image based on the feature information corresponding to each meter image and the trained meter reading model;

[0125] The second acquisition module 504 is used to acquire parameter values ​​of multiple preset state parameters detected in a preset time period according to a preset detection cycle;

[0126] The third determination module 505 is used to determine the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the plurality of preset state parameters detected and the trained net oil weight prediction model.

[0127] In a possible implementation, the third determining module 505 is used to:

[0128] Determine the crude oil flow value in the target oil pipeline within the preset time period according to the crude oil flow value corresponding to each instrument image;

[0129] Based on the detected parameter values ​​of the plurality of preset state parameters, determining an average value of the parameter value of each preset state parameter;

[0130] The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into the trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0131] In a possible implementation, the preset shooting period is equal to the preset detection period, and the third determining module 505 is used to:

[0132] The crude oil flow value corresponding to each instrument image and the parameter values ​​of the detected multiple preset state parameters are input into the trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

[0133] In a possible implementation, the first determining module 501 includes:

[0134] A first determination subunit is used for inputting each captured instrument image into a reading position recognition model to obtain position information of each reading in the instrument image, and based on the position information of each reading in the instrument image, determining a sub-image corresponding to each reading in the instrument image;

[0135] A second determination subunit is used to determine feature information corresponding to each digit of the reading contained in each meter image based on a sub-image corresponding to each digit of the reading contained in each meter image and a trained feature extraction model;

[0136] The second determining module 502 is used for:

[0137] Input the feature information corresponding to each reading contained in each meter image into the trained meter reading model to obtain the value of each reading contained in each meter image;

[0138] Based on the value of each bit reading contained in each meter image, the crude oil flow value corresponding to each meter image is determined.

[0139] In a possible implementation manner, the second determining subunit is used to:

[0140] Convert the sub-image corresponding to each reading contained in each meter image into a grayscale image;

[0141] Convert each grayscale image into a binary image to obtain a binary image corresponding to each bit reading contained in each instrument image;

[0142] The binary images corresponding to each reading contained in each meter image are respectively input into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each meter image.

[0143] Through the device provided by the embodiment of the present application, by acquiring the instrument image of the flow meter mechanical head of the target oil pipeline photographed in a preset time period according to a preset shooting cycle, based on the trained feature extraction model, the feature information corresponding to each instrument image photographed is determined, based on the feature information corresponding to each instrument image and the trained instrument reading model, the crude oil flow value corresponding to each instrument image is determined, and the parameter values ​​of multiple preset state parameters detected in a preset time period according to a preset detection cycle are acquired, and based on the crude oil flow value corresponding to each instrument image, the parameter values ​​of the multiple preset state parameters detected, and the trained net oil weight prediction model, the net oil weight of the crude oil of the target oil pipeline is determined. The present application obtains the net oil weight of the crude oil of the oil pipeline by constructing a trained net oil weight prediction model, rather than obtaining the net oil weight of the crude oil of the oil pipeline through a large amount of manual reading, table lookup and calculation, so as to improve the efficiency and accuracy of obtaining the net oil weight of the crude oil of the oil pipeline.

[0144] It should be noted that: the device for determining the net oil weight of pipeline crude oil provided in the above embodiment only uses the division of the above functional modules as an example when determining the net oil weight of pipeline crude oil. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the net oil weight of pipeline crude oil provided in the above embodiment and the method embodiment for determining the net oil weight of pipeline crude oil belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0145] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for determining the net oil weight of pipeline crude oil, characterized in that: The method comprises: Acquire an instrument image of a mechanical meter head of a flow meter of a target oil pipeline photographed within a preset time period and according to a preset photographing cycle; For each meter image captured, the meter image is input into a reading position recognition model to obtain position information of each reading in the meter image, and based on the position information of each reading in the meter image, a sub-image corresponding to each reading is determined in the meter image, and based on the sub-image corresponding to each reading contained in each meter image and a trained feature extraction model, feature information corresponding to each reading contained in each meter image is determined; Inputting feature information corresponding to each bit reading contained in each meter image into a trained meter reading model, respectively, to obtain a value of each bit reading contained in each meter image, and determining a crude oil flow value corresponding to each meter image based on the value of each bit reading contained in each meter image; Obtaining parameter values ​​of a plurality of preset state parameters detected in a preset detection cycle within a preset time period, wherein the preset state parameters include: metering pressure, metering temperature, apparent density, apparent temperature, and moisture content; The net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the multiple preset state parameters detected, and the trained net oil weight prediction model; wherein the net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the multiple preset state parameters detected, and the trained net oil weight prediction model, including: Determining the crude oil flow value in the target oil pipeline within the preset time period according to the crude oil flow value corresponding to each instrument image; Based on the detected parameter values ​​of the plurality of preset state parameters, determining an average value of the parameter value of each preset state parameter; The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

2. The method according to claim 1, characterized in that The preset shooting cycle is equal to the preset detection cycle, and the net oil weight of the crude oil in the target oil pipeline is determined based on the crude oil flow value corresponding to each meter image, the parameter values ​​of the plurality of preset state parameters detected, and the trained net oil weight prediction model, including: The crude oil flow value corresponding to each instrument image and the parameter values ​​of the detected multiple preset state parameters are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

3. The method according to claim 1, characterized in that The determining of feature information corresponding to each captured instrument image based on the trained feature extraction model includes: For each meter image captured, the meter image is input into a reading position recognition model to obtain position information of each reading in the meter image, and based on the position information of each reading in the meter image, a sub-image corresponding to each reading is determined in the meter image; Determine feature information corresponding to each reading contained in each meter image based on a sub-image corresponding to each reading contained in each meter image and a trained feature extraction model; Determining the crude oil flow value corresponding to each meter image based on the feature information corresponding to each meter image and the trained meter reading model includes: Input the feature information corresponding to each reading contained in each meter image into the trained meter reading model to obtain the value of each reading contained in each meter image; Based on the value of each bit reading contained in each meter image, the crude oil flow value corresponding to each meter image is determined.

4. The method according to claim 3, characterized in that The determining, based on the sub-image corresponding to each reading contained in each meter image and the trained feature extraction model, feature information corresponding to each reading contained in each meter image includes: Convert the sub-image corresponding to each reading contained in each meter image into a grayscale image; Convert each grayscale image into a binary image to obtain a binary image corresponding to each bit reading contained in each instrument image; The binary images corresponding to each reading contained in each meter image are respectively input into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each meter image.

5. A device for determining the net oil weight of pipeline crude oil, characterized in that: The device comprises: A first acquisition module is used to acquire an instrument image of a mechanical meter head of a flow meter of a target oil pipeline photographed within a preset time period and according to a preset photographing cycle; A first determination module is used for inputting each captured instrument image into a reading position recognition model to obtain position information of each reading in the instrument image, determining a sub-image corresponding to each reading in the instrument image based on the position information of each reading in the instrument image, and determining feature information corresponding to each reading contained in each instrument image based on the sub-image corresponding to each reading contained in each instrument image and a trained feature extraction model; A second determination module is used to input feature information corresponding to each reading contained in each meter image into a trained meter reading model, obtain a value of each reading contained in each meter image, and determine a crude oil flow value corresponding to each meter image based on the value of each reading contained in each meter image; A second acquisition module is used to acquire parameter values ​​of multiple preset state parameters detected in a preset time period according to a preset detection cycle; A third determination module, configured to determine the net oil weight of the crude oil in the target oil pipeline based on the crude oil flow value corresponding to each meter image, the detected parameter values ​​of the plurality of preset state parameters and the trained net oil weight prediction model; The third determination module is used for: Determining the crude oil flow value in the target oil pipeline within the preset time period according to the crude oil flow value corresponding to each instrument image; Based on the detected parameter values ​​of the plurality of preset state parameters, determining an average value of the parameter value of each preset state parameter; The crude oil flow value in the target oil pipeline within the preset time period and the average value of the parameter value of each preset state parameter are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

6. The device according to claim 5, characterized in that The preset shooting period is equal to the preset detection period, and the third determination module is used to: The crude oil flow value corresponding to each instrument image and the parameter values ​​of the detected multiple preset state parameters are input into a trained net oil weight prediction model to determine the net oil weight of the crude oil in the target oil pipeline.

7. The device according to claim 5, characterized in that The first determining module includes: A first determination subunit is used for inputting each captured instrument image into a reading position recognition model to obtain position information of each reading in the instrument image, and determining a sub-image corresponding to each reading in the instrument image based on the position information of each reading in the instrument image; A second determination subunit is used to determine feature information corresponding to each digit of the reading contained in each meter image based on a sub-image corresponding to each digit of the reading contained in each meter image and a trained feature extraction model; The second determining module is used for: Input the feature information corresponding to each reading contained in each meter image into the trained meter reading model to obtain the value of each reading contained in each meter image; Based on the value of each bit reading contained in each meter image, the crude oil flow value corresponding to each meter image is determined.

8. The device according to claim 7, characterized in that The second determining subunit is used for: Convert the sub-image corresponding to each reading contained in each meter image into a grayscale image; Convert each grayscale image into a binary image to obtain a binary image corresponding to each bit reading contained in each instrument image; The binary images corresponding to each reading contained in each meter image are respectively input into the trained feature extraction model to obtain the feature information corresponding to each reading contained in each meter image.