Method and device for determining corrosion rate of tubular column of oilfield sewage reinjection system

By collecting and reducing the historical and real-time data of the pipe columns in the oil field sewage return system, a deep learning model is built to predict thickness data, which solves the problem of difficult to quickly and accurately monitor the corrosion rate of the pipe column in the existing technology, and achieves efficient and reliable corrosion rate prediction.

CN119943219AInactive Publication Date: 2025-05-06SANYA MARINE OIL & GAS RESEARCH INSTITUTE NORTHEAST PETROLEUM UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510423782.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately monitor and predict the corrosion rate of the oilfield sewage return system pipe column, resulting in the inability to detect and deal with corrosion problems in a timely manner.

Method used

By collecting historical timing operation data and real-time environmental data, using local linear embedding algorithms to reduce dimensionality, and building a deep learning model based on LSTM, predicting column thickness data, and finally calculating the corrosion rate based on real-time thickness data.

Benefits of technology

The rapid and accurate prediction of the corrosion rate of the oilfield sewage return system pipe column is achieved, the reliability and generalization of the prediction are improved, and measures can be taken in a timely manner to reduce the losses caused by corrosion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943219A_ABST
    Figure CN119943219A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for determining the corrosion rate of a tubular column of an oilfield sewage reinjection system, and relates to the technical field of methods for determining the corrosion rate of the tubular column, and the method specifically comprises the following steps: collecting historical time sequence operation data of a plurality of groups of to-be-detected oilfield sewage reinjection tubular columns; acquiring real-time environmental data of the oilfield sewage reinjection string and thickness data of the string, and performing dimensionality reduction on the acquired historical time step data and the real-time environmental data by using a local linear embedding algorithm; constructing a deep learning model, inputting the real-time environment data after dimension reduction into the trained deep learning model, obtaining predicted thickness data, and combining the predicted thickness data with the collected real-time thickness data of the tubular column to obtain a corrosion rate prediction result of the tubular column; according to the method, the corrosion rate of the oil field sewage reinjection system tubular column can be accurately and rapidly predicted, the reliability and generalization are high, and a scientific basis and technical support can be provided for early warning of the corrosion risk of the oil field sewage reinjection system tubular column.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of methods for determining pipe column corrosion rate, and in particular to a method and device for determining pipe column corrosion rate of an oilfield sewage reinjection system. Background Art

[0002] As global awareness of environmental protection increases, governments have enacted increasingly stringent environmental regulations, requiring the oil industry to reduce pollution to the environment. Wastewater reinjection is an effective environmental protection measure that can reduce or avoid the direct discharge of oilfield produced water into surface water bodies, thereby reducing damage to aquatic ecosystems. In many oilfield production areas, water resources may be very limited. By treating produced water and reinjecting it into the reservoir, it can not only reduce the demand for fresh water resources, but also improve crude oil recovery by maintaining reservoir pressure. During oilfield production, reservoir pressure will gradually decrease, affecting the fluidity and recovery rate of crude oil. By reinjecting wastewater, the fluid volume in the reservoir can be supplemented, reservoir pressure can be maintained or increased, crude oil flow can be promoted, and the economic life of the oilfield can be extended. The cost of treating and discharging oilfield produced water is high, and reinjection can convert this part of the cost into an investment to increase oilfield production. Oilfield wastewater reinjection involves multiple levels such as environmental protection regulations, water resources management, reservoir engineering, economic benefits, technological progress, and social responsibility. By implementing wastewater reinjection, the oil industry can achieve effective resource utilization and sustainable development of oilfields while meeting environmental protection requirements.

[0003] In the prior art, the corrosion rate of the pipe column of the oilfield wastewater reinjection system is usually determined by traditional corrosion detection methods, such as coupon tests or electrochemical tests, which often take a long time to obtain results, which may lead to the failure to timely discover and deal with corrosion problems; laboratory tests are usually carried out under controlled conditions and may not be able to fully simulate the actual operating environment of the oilfield wastewater reinjection system. Factors such as temperature, pressure, flow rate, chemical composition and microbial activity cannot be accurately replicated in the laboratory; and many oilfield wastewater reinjection systems lack effective real-time monitoring technology, which limits the immediate evaluation and control of the corrosion rate; the existing prediction models for the corrosion rate of the pipe column of the oilfield wastewater reinjection system include empirical models, semi-empirical models and machine learning models. Due to the interrelationships between many factors that affect the corrosion rate of the oilfield wastewater reinjection pipeline, it is difficult to describe the relationship between each influencing factor and the corrosion rate with a certain definite functional relationship, resulting in low reliability and generalization of the model, so the empirical model and semi-empirical model have certain limitations.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0005] The object of the present invention is to provide a method and device for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system, so as to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions: A method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system, comprising the following specific steps: Step 1: Collecting several groups of historical time series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time series operation data includes time series environment data inside the pipe string and time series thickness data of the pipe string; Step 2: Split the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and number them. Each time step has a set of environmental data and a set of pipeline thickness data. Step 3: Collect the real-time environmental data and thickness data of the oilfield wastewater reinjection string, use the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data, and extract the intrinsic characteristics of the data; Step 4: Build a deep learning model, use the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; Step 5: Input the reduced-dimensional real-time environmental data into the trained deep learning model, and correct the model through the pipe correction data to obtain the predicted thickness data. The predicted thickness data is combined with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe.

[0007] Furthermore, the time series environmental data of the pipe string includes the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the pipe string, and the correction data of the pipeline includes the temperature, humidity, and salinity data of the pipeline.

[0008] Furthermore, the above data collected are all time series data, which are divided into continuous time steps, each time step represents a specific moment in the data, that is, each time step corresponds to a value; The process of numbering the time-series environmental data inside the pipe string and the time-series thickness data of the pipeline is specifically as follows: each time step has a set of environmental data and a set of pipeline thickness data, and the set of environmental data and pipeline thickness data corresponding to each time step are numbered in chronological order, that is, 1, 2, 3, ..., q, q+1, ..., Q, where Q is the number of time steps.

[0009] Furthermore, the LLE algorithm is used to analyze the historical time series environmental data of several groups of pipe strings of the oilfield wastewater reinjection system to be predicted, and the original high-dimensional data is mapped to a new low-dimensional space to remove redundancy and noise, and the main operation data of the pipe string is obtained. The process includes: Set the distance threshold to determine the neighboring points of each data point; The data points are sample points in high-dimensional space. One data point represents one sample, which is composed of a set of features, and these features form a feature vector. One data point represents the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the column at a certain moment. For each data point , find its nearest neighbors and calculate a weight matrix , so that The weight matrix can be accurately represented by a linear combination of its neighboring points Elements Represents neighboring points right The contribution of is as follows: The nearest neighbor points are the k points with the smallest distance to the data point in the high-dimensional space. The nearest neighbor points are determined as follows: Step 1: For two points and In n-dimensional space, the Euclidean distance between them is Given by the following formula: ; Step 2: For each point in the data set , calculate the Euclidean distance between it and all other points in the data set; Step 3: Sort its distances to other points from smallest to largest; Step 4: Select the k points closest to each other as points The nearest neighbor of , where the k value is the square root of the number of samples; For each data point , solve the following optimization problem to find the weights : ; The constraints are: if no The neighboring points of , then: ; ; Use the obtained weight matrix , find a low-dimensional representation , so that the data points can still maintain their local linear relationship in the low-dimensional space, that is, LLE first assumes that the data is linear in a small local area, that is, a data point can be linearly represented by several samples in its field, for example: there is a sample , use the Euclidean distance algorithm to find the three closest samples in its original high-dimensional domain , , , assuming Can be , , Linear representation, that is: ; in , , is the weight coefficient; after dimensionality reduction through LLE, we hope The corresponding projection in low-dimensional space ,at the same time , , The same linear relationship is maintained, namely: ; That is to say, the weight coefficient of the linear relationship before and after projection , , is unchanging; The formula is as follows: Solve the following optimization problem to find a low-dimensional representation : ; The constraints are: ; ; Calculating the Matrix The eigenvector corresponding to the smallest non-zero eigenvalue of ; Select feature vectors and combine the selected feature vectors into the final low-dimensional representation .

[0010] Furthermore, a deep learning model is constructed, and the LSTM model is trained using the time step data of the pipe string to be predicted after dimensionality reduction, so as to obtain the pipe thickness prediction model of the pipe string of the oilfield wastewater reinjection system. The specific logic is as follows: Construct a deep learning LSTM model; randomly divide the time step data after dimensionality reduction into a training set and a test set; use the pipeline thickness data as a label, use the data in the training set to train the model, and obtain a trained LSTM model; substitute the data in the test set into the trained model to obtain the corresponding prediction result; calculate the error between the prediction result and the actual value in the test set; determine whether the error meets the preset error threshold; if so, output the trained model, that is, the pipeline thickness prediction model of the oilfield wastewater reinjection system pipe string; if not, return to continue training.

[0011] Furthermore, the time step data of the tubing string of the oilfield wastewater reinjection system is randomly divided into a training set and a test set. The specific logic is: randomly sort several groups of time series environmental data of the tubing string to be predicted after dimensionality reduction; 80% of the sorted time series environmental data are used as the training set, and the remaining 20% ​​are used as the test set.

[0012] Furthermore, the error is the mean absolute error, root mean square error and coefficient of determination between the predicted result and the actual value in the test set, as follows: The mean absolute error is: ; The root mean square error is: ; The coefficient of determination is: ; in, , and They respectively represent the actual value, predicted value and average value of the pipeline thickness corresponding to the data of the i-th group of test samples; n is the number of groups of test samples in the test sample set.

[0013] Furthermore, the model is modified in step 5, including: Considering more factors, multiple linear regression is combined to associate the temperature, humidity, salinity and thickness of the pipeline, and the model is modified. The specific formula is as follows: ; in, Represents the predicted column The thickness of the moment, represents temperature, For humidity, is the salinity, is a constant correction factor, is the preset coefficient for temperature, is the preset coefficient of humidity, is the preset coefficient for salinity; The predicted thickness is combined with the real-time thickness of the collected pipe string to obtain the prediction result of the corrosion rate of the pipe string, which is as follows: ; in, is the corrosion rate value of the tested pipe string, is the time interval corresponding to a time step, Represents the predicted column The thickness of the moment, represent Real-time thickness data of the pipe collected at all times.

[0014] A device for determining the corrosion rate of a pipe column in an oilfield sewage reinjection system, comprising: A data acquisition module collects several groups of historical time-series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time-series operation data includes time-series environmental data inside the pipe string and time-series thickness data of the pipe string; A numbering module divides the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and numbers them, each time step having a set of environmental data and a set of pipeline thickness data; The dimension reduction module collects the real-time environmental data and thickness data of the oilfield sewage reinjection pipe string, and uses the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data to extract the intrinsic characteristics of the data; Model building module, builds a deep learning model, uses the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; The model correction module inputs the real-time environmental data after dimensionality reduction into the trained deep learning model, and corrects the model through the pipe correction data to obtain the predicted thickness data, and combines the predicted thickness data with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method for determining the corrosion rate of a pipe string of an oilfield sewage reinjection system. The historical operation data of a pipeline to be predicted is pre-analyzed by an LLE algorithm, so that the information of the original historical operation data can be fully retained, and complex nonlinear problems can be converted into linear problems. In addition, redundant information in the original detection data can be removed, so as to effectively improve the prediction accuracy. A deep learning model based on LSTM is constructed, and real-time data acquisition technology is combined to provide real-time corrosion rate prediction, so as to help operators take timely measures to reduce the losses caused by corrosion. The present invention can accurately and quickly predict the corrosion rate of a pipe string of an oilfield sewage reinjection system, and has high reliability and generalization, so as to provide a scientific basis and technical support for early warning of pipeline corrosion risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a schematic diagram of the prediction of the model of the present invention; Figure 3 It is a schematic diagram of the overall device of the present invention. DETAILED DESCRIPTION

[0017] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0018] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0019] Example: See also Figure 1-Figure 2 , the present invention provides a technical solution: A method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system, the specific steps comprising: Step 1: Collecting several groups of historical time series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time series operation data includes time series environment data inside the pipe string and time series thickness data of the pipe string; In this embodiment, the time series environmental data of the pipe string includes the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the pipe string, and the correction data of the pipeline includes the temperature, humidity, and salinity data of the pipeline; The above data collected are all time series data, which are divided into continuous time steps, each time step represents a specific moment in the data, that is, each time step corresponds to a value; Historical operating data is the basis for training machine learning models. By analyzing and learning patterns and trends in historical data, the model can understand how different factors affect corrosion rates and make accurate predictions. Historical data can help identify which factors have the greatest impact on corrosion rates. These factors include temperature, pressure, flow rate, chemical composition, microbial activity, etc. By analyzing this data, it can be determined which variables should be included in the model. Historical data is not only used to train the model, but also to verify the performance of the model. By comparing the model's predictions with the actual corrosion rates in historical data, the accuracy and reliability of the model can be evaluated.

[0020] Step 2: Split the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and number them. Each time step has a set of environmental data and a set of pipeline thickness data. In this embodiment, the process of numbering the time-series environmental data inside the pipe string and the time-series thickness data of the pipeline is specifically as follows: each time step has a set of environmental data and a set of pipeline thickness data, and the set of environmental data and pipeline thickness data corresponding to each time step are numbered in chronological order, that is, 1, 2, 3, ..., q, q+1, ..., Q, where Q is the number of time steps.

[0021] Step 3: Collect the real-time environmental data and thickness data of the oilfield wastewater reinjection string, use the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data, and extract the intrinsic characteristics of the data; In this embodiment, the LLE algorithm is used to analyze the historical operation data of several groups of pipe strings of the oilfield sewage reinjection system to be predicted, and the original high-dimensional data is mapped to a new low-dimensional space, and the principal component with a cumulative contribution rate of a preset contribution rate value is obtained, and the dimension of the principal component is lower than that of the detection data; specifically, the historical operation data of the pipeline of the oilfield sewage reinjection system to be predicted is pre-analyzed by the local linear embedding (LLE) algorithm, and the information with low actual contribution to the corrosion rate is eliminated, thereby improving the robustness of the data, reducing the computational complexity, and improving the analysis efficiency; The LLE algorithm is used to analyze the historical time series environmental data of several groups of pipe strings of the oilfield wastewater reinjection system to be predicted, and the original high-dimensional data is mapped to a new low-dimensional space to remove redundancy and noise, and the main operation data of the pipe string is obtained, including: Set the distance threshold to determine the neighboring points of each data point; The data points are sample points in high-dimensional space. One data point represents one sample, which is composed of a set of features, and these features form a feature vector. One data point represents the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the column at a certain moment. For each data point , find its nearest neighbors and calculate a weight matrix , so that The weight matrix can be accurately represented by a linear combination of its neighboring points Elements Represents neighboring points right The contribution of is as follows: The nearest neighbor points are the k points with the smallest distance from the data point in the high-dimensional space. The nearest neighbor points are determined as follows: Step 1: For two points and In n-dimensional space, the Euclidean distance between them is Given by the following formula: ; Step 2: For each point in the data set , calculate the Euclidean distance between it and all other points in the data set; Step 3: Sort its distances to other points from smallest to largest; Step 4: Select the k points closest to each other as points The nearest neighbor of , where the k value is the square root of the number of samples; For each data point , solve the following optimization problem to find the weights : ; The constraints are: if no The neighboring points of , then: ; ; Use the obtained weight matrix , find a low-dimensional representation , so that the data points can still maintain their local linear relationship in the low-dimensional space, that is, LLE first assumes that the data is linear in a small local area, that is, a data point can be linearly represented by several samples in its field, for example: there is a sample , use the Euclidean distance algorithm to find the three closest samples in its original high-dimensional domain , , , assuming Can be , , Linear representation, that is: ; in , , is the weight coefficient; after dimensionality reduction through LLE, we hope The corresponding projection in low-dimensional space ,at the same time , , The same linear relationship is maintained, namely: ; That is to say, the weight coefficient of the linear relationship before and after projection , , is immutable; The formula is as follows: Solve the following optimization problem to find a low-dimensional representation : ; The constraints are: ; ; Calculating the Matrix The eigenvector corresponding to the smallest non-zero eigenvalue of ; Select feature vectors and combine the selected feature vectors into the final low-dimensional representation .

[0022] Step 4: Build a deep learning model, use the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; In this embodiment, the LSTM algorithm is an existing algorithm; the corrosion rate prediction model of the oilfield sewage reinjection pipeline includes an input layer, an LSTM layer, a hidden layer and an output layer; wherein the input layer is the time step data of the oilfield sewage reinjection pipeline after dimension reduction; the LSTM layer is the core part of the model, which includes multiple LSTM units; each LSTM unit has a forget gate, an input gate and an output gate, which control the flow and storage of information; the LSTM unit can learn long-term dependencies in time series data, which is very useful for predicting the speed changes over time such as corrosion rate; the hidden layer includes an activation function, which combines the main operating data of the oilfield sewage reinjection pipeline with the corresponding weights, calculates the dot product, and then calculates the error and updates the weights, and obtains the result that meets the error requirements after repeated iterations; the output layer is the pipeline thickness prediction result of the oilfield sewage reinjection system pipe string; In this embodiment, a deep learning model is constructed, and the time step data of the pipe string to be predicted after dimensionality reduction is used to train the LSTM model to obtain a pipe thickness prediction model for the pipe string of the oilfield sewage reinjection system. The specific logic is as follows: Construct a deep learning LSTM model; randomly divide the time step data after dimension reduction into a training set and a test set; use the pipeline thickness data as a label, use the data in the training set to train the model, and obtain a trained LSTM model; substitute the data in the test set into the trained model to obtain the corresponding prediction result; calculate the error between the prediction result and the actual value in the test set; determine whether the error meets the preset error threshold; if so, output the trained model, that is, the pipeline thickness prediction model of the oilfield sewage reinjection system pipe string; if not, return to continue training; The process of randomly dividing the time step data of the pipe string of the oilfield sewage reinjection system into a training set and a test set. The specific logic is: randomly sorting the time series environmental data of several groups of pipe strings to be predicted after dimension reduction; taking 80% of the sorted time series environmental data as the training set and the remaining 20% ​​as the test set; In this embodiment, the error is the mean absolute error, root mean square error and determination coefficient between the predicted result and the actual value in the test set, which are as follows: The mean absolute error is: ; The root mean square error is: ; The coefficient of determination is: ; in, , and They represent the actual value, predicted value and average value of the pipe thickness corresponding to the data of the i-th group of test samples respectively; n is the number of groups of test samples in the test sample set; In this embodiment, the result error of the trained model is calculated: the mean absolute error is required and RMS error The smaller the better, the coefficient of determination The setting requirement is that the closer to 1 the better.

[0023] Step 5: Input the reduced-dimensional real-time environmental data into the trained deep learning model, and correct the model through the pipe correction data to obtain the predicted thickness data. The predicted thickness data is combined with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe. In this embodiment, the model is modified as follows: Considering more factors, multiple linear regression is combined to associate the temperature, humidity, salinity and thickness of the pipeline, and the model is modified. The specific formula is as follows: ; in, Represents the predicted column The thickness of the moment, represents temperature, For humidity, is the salinity, is a constant correction factor, is the preset coefficient for temperature, is the preset coefficient of humidity, is the preset coefficient for salinity; Increasing temperature increases the rate of chemical reactions; therefore, When the humidity increases, the corrosion rate of the pipe increases, and the thickness of the pipe decreases accordingly; high humidity environment increases the moisture content in the air, causing a water film to form on the metal surface, providing the necessary moisture for the corrosion reaction. When the humidity is high, it is easier for the metal surface to form an electrolyte solution, such as a salt solution, which accelerates the electrochemical corrosion process. Therefore, when the humidity is high, the corrosion rate of the pipe increases, and the thickness of the pipe decreases accordingly. When increasing, salts can promote localized corrosion, such as pitting and crevice corrosion, because they can concentrate in tiny areas on the metal surface, forming highly concentrated electrolytes, which accelerate corrosion in these areas. When increasing, corresponding increase; , , and the predicted thickness of the string There is a positive correlation.

[0024] The predicted thickness is combined with the real-time thickness of the collected pipe string to obtain the prediction result of the corrosion rate of the pipe string, which is as follows: ; in, is the corrosion rate value of the tested pipe string, is the time interval corresponding to a time step, Represents the predicted column The thickness of the moment, represent Real-time thickness data of the pipe string collected at every moment; Time to The time elapsed is the time interval corresponding to a time step. , the change of pipe thickness during this period and the time interval The ratio of is the corrosion rate of the column ;when When the corrosion rate of the tested pipe increases, decrease; when When the corrosion rate of the tested pipe increases, will increase accordingly; when When the corrosion rate of the tested pipe increases, decrease; that is, , and Negatively correlated, and There is a positive correlation; By combining real-time thickness data with predicted thickness data, the corrosion rate of the tubular can be estimated more accurately; real-time data provides an accurate snapshot of the current state, while predicted data can provide an estimate of the future state based on historical trends and model analysis. This combination can reduce the deviation that may be caused by a single data source and improve the accuracy of the overall prediction.

[0025] See also Figure 3 The present invention also provides a device for determining the corrosion rate of a pipe string in an oilfield sewage reinjection system. The device for determining the corrosion rate of a pipe string in an oilfield sewage reinjection system is used to execute the above-mentioned method for determining the corrosion rate of a pipe string in an oilfield sewage reinjection system, comprising: A data acquisition module collects several groups of historical time-series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time-series operation data includes time-series environmental data inside the pipe string and time-series thickness data of the pipe string; A numbering module divides the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and numbers them, each time step having a set of environmental data and a set of pipeline thickness data; The dimension reduction module collects the real-time environmental data and thickness data of the oilfield sewage reinjection pipe string, and uses the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data to extract the intrinsic characteristics of the data; Model building module, builds a deep learning model, uses the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; The model correction module inputs the real-time environmental data after dimensionality reduction into the trained deep learning model, and corrects the model through the pipe correction data to obtain the predicted thickness data, and combines the predicted thickness data with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe.

[0026] In the formula , and The specific value of is generally determined by those skilled in the art according to actual conditions. The technicians in this field collect multiple groups of sample data, set corresponding preset proportional coefficients for each group of sample data, substitute the preset proportional coefficients and the collected sample data into the formula, observe the accuracy of the model output and the rationality of the results through repeated experiments and parameter adjustments, gradually adjust these factor coefficients, and compare the performance and effect of the model under different parameter settings to find the optimal coefficient combination, screen the calculated factor coefficients and take the average, and obtain , and The value of .

[0027] In addition, the size of the preset factor coefficient is to quantify each parameter to obtain a specific value. In order to facilitate subsequent comparison, the size of the coefficient depends on the amount of sample data and the preset proportional coefficient initially set by technical personnel in this field for each set of sample data. It is not unique as long as it does not affect the proportional relationship between the parameter and the quantized value.

[0028] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0029] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.

[0030] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0031] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system, characterized in that: The specific steps include: Step 1: Collecting several groups of historical time series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time series operation data includes time series environment data inside the pipe string and time series thickness data of the pipe string; Step 2: Split the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and number them. Each time step has a set of environmental data and a set of pipeline thickness data. Step 3: Collect the real-time environmental data and thickness data of the oilfield wastewater reinjection string, use the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data, and extract the intrinsic characteristics of the data; Step 4: Build a deep learning model, use the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; Step 5: Input the reduced-dimensional real-time environmental data into the trained deep learning model, and correct the model through the pipe correction data to obtain the predicted thickness data. The predicted thickness data is combined with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe.

2. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 1, characterized in that: The time series environmental data of the pipe column includes the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the pipe column, and the correction data of the pipeline includes the temperature, humidity, and salinity data of the pipeline.

3. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 2, characterized in that: The above data collected are all time series data, which are divided into continuous time steps, each time step represents a specific moment in the data, that is, each time step corresponds to a value; The process of numbering the time-series environmental data inside the pipe string and the time-series thickness data of the pipeline is specifically as follows: each time step has a set of environmental data and a set of pipeline thickness data, and the set of environmental data and pipeline thickness data corresponding to each time step are numbered in chronological order, that is, 1, 2, 3, ..., q, q+1, ..., Q, where Q is the number of time steps.

4. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 3, characterized in that: The LLE algorithm is used to analyze the historical time series environmental data of several groups of pipe strings of the oilfield wastewater reinjection system to be predicted, and the original high-dimensional data is mapped to a new low-dimensional space to remove redundancy and noise, and the main operation data of the pipe string is obtained, including: Set the distance threshold to determine the neighboring points of each data point; The data points are sample points in high-dimensional space. One data point represents one sample, which is composed of a set of features, and these features form a feature vector. One data point represents the water content, carbon dioxide content, hydrogen sulfide content, chloride ion content, dissolved oxygen content, and calcium and magnesium ion content in the column at a certain moment. For each data point , find its nearest neighbors and calculate a weight matrix , so that The weight matrix can be accurately represented by a linear combination of its neighboring points Elements Represents neighboring points right The contribution of is as follows: The nearest neighbor points are the k points with the smallest distance to the data point in the high-dimensional space. The nearest neighbor points are determined as follows: Step 1: For two points and In n-dimensional space, the Euclidean distance between them is Given by the following formula: ; Step 2: For each point in the data set , calculate the Euclidean distance between it and all other points in the data set; Step 3: Sort its distances to other points from smallest to largest; Step 4: Select the k points closest to each other as points The nearest neighbor of , where the k value is the square root of the number of samples; For each data point , solve the following optimization problem to find the weights : ; The constraints are: if no The neighboring points of , then: ; ; Use the obtained weight matrix , find a low-dimensional representation , so that the data points can still maintain their local linear relationship in the low-dimensional space, that is, LLE first assumes that the data is linear in a small local area, that is, a data point can be linearly represented by several samples in its field, for example: there is a sample , use the Euclidean distance algorithm to find the three closest samples in its original high-dimensional domain , , , assuming Can be , , Linear representation, that is: ; in , , is the weight coefficient; after dimensionality reduction through LLE, we hope The corresponding projection in low-dimensional space ,at the same time , , The same linear relationship is maintained, namely: ; That is to say, the weight coefficient of the linear relationship before and after projection , , is immutable; The formula is as follows: Solve the following optimization problem to find a low-dimensional representation : ; The constraints are: ; ; Calculating the Matrix The eigenvector corresponding to the smallest non-zero eigenvalue of ; Select feature vectors and combine the selected feature vectors into the final low-dimensional representation .

5. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 1, characterized in that: The deep learning model is constructed, and the time step data of the predicted pipe string is used to train the LSTM model to obtain the pipe thickness prediction model of the pipe string of the oilfield wastewater reinjection system. The specific logic is as follows: Construct a deep learning LSTM model; randomly divide the time step data after dimensionality reduction into a training set and a test set; use the pipeline thickness data as a label, use the data in the training set to train the model, and obtain a trained LSTM model; substitute the data in the test set into the trained model to obtain the corresponding prediction result; calculate the error between the prediction result and the actual value in the test set; determine whether the error meets the preset error threshold; if so, output the trained model, that is, the pipeline thickness prediction model of the oilfield wastewater reinjection system pipe string; if not, return to continue training.

6. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 1, characterized in that: The process of randomly dividing the time step data of the pipe string of the oilfield wastewater reinjection system into a training set and a test set has the following specific logic: randomly sorting several groups of time series environmental data of the pipe string to be predicted after dimensionality reduction; taking 80% of the sorted time series environmental data as the training set and the remaining 20% ​​as the test set.

7. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 6, characterized in that: The error is the mean absolute error, root mean square error, and coefficient of determination between the predicted result and the actual value in the test set, as follows: The mean absolute error is: ; The root mean square error is: ; The coefficient of determination is: ; in, , and They respectively represent the actual value, predicted value and average value of the pipeline thickness corresponding to the data of the i-th group of test samples; n is the number of groups of test samples in the test sample set.

8. The method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to claim 1, characterized in that: The model is modified in step 5, including: Considering more factors, multiple linear regression is combined to associate the temperature, humidity, salinity and thickness of the pipeline, and the model is modified. The specific formula is as follows: ; in, Represents the predicted column The thickness of the moment, represents temperature, For humidity, is the salinity, is a constant correction factor, is the preset coefficient for temperature, is the preset coefficient of humidity, is the preset coefficient for salinity; The predicted thickness is combined with the real-time thickness of the collected pipe string to obtain the prediction result of the corrosion rate of the pipe string, which is as follows: ; in, is the corrosion rate value of the tested pipe string, is the time interval corresponding to a time step, Represents the predicted column The thickness of the moment, represent Real-time thickness data of the pipe collected at all times.

9. A device for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system, characterized in that: The device for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system is used to execute a method for determining the corrosion rate of a pipe column in an oilfield wastewater reinjection system according to any one of claims 1 to 8, comprising: A data acquisition module collects several groups of historical time-series operation data of the oilfield sewage reinjection pipe string to be tested, wherein the historical time-series operation data includes time-series environmental data inside the pipe string and time-series thickness data of the pipe string; A numbering module divides the time series environmental data inside the pipe string and the time series thickness data of the pipeline into continuous time steps and numbers them, each time step having a set of environmental data and a set of pipeline thickness data; The dimension reduction module collects the real-time environmental data and thickness data of the oilfield sewage reinjection pipe string, and uses the local linear embedding algorithm to reduce the dimension of the acquired historical time step data and real-time environmental data to extract the intrinsic characteristics of the data; Model building module, builds a deep learning model, uses the reduced-dimensional time step data as the training set, and the pipe thickness data as the label to train the deep learning model; The model correction module inputs the real-time environmental data after dimensionality reduction into the trained deep learning model, and corrects the model through the pipe correction data to obtain the predicted thickness data, and combines the predicted thickness data with the collected real-time thickness data of the pipe to obtain the corrosion rate prediction result of the pipe.