A method and system for early warning of dynamic data of oil wells
By selecting dependent and independent variables in oil well production, calculating mutual information values and performing principal component analysis, and utilizing an optimized LSTM neural network model, the problem of insufficient timeliness and accuracy of traditional oil well early warning is solved, realizing intelligent and refined management of oil well production dynamics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional oil well production early warning relies on manpower, has low timeliness, and is difficult to accurately predict water cut changes under the influence of complex and multi-factor factors, resulting in insufficient prediction accuracy and real-time performance.
By acquiring dynamic data on oil well production, selecting dependent and independent variables, calculating mutual information values, performing principal component analysis, optimizing the model using an LSTM neural network, and combining it with a preset early warning range for prediction and comparison, early warning results are generated.
It significantly improves the accuracy and reliability of the early warning model, enabling early detection and warning of abnormal changes in oil well production dynamics, supporting the scientific adjustment of production plans, optimizing resource allocation, and improving production efficiency and economic benefits.
Smart Images

Figure CN119357538B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil well data processing technology, and in particular to a method and system for early warning of dynamic data of oil wells. Background Technology
[0002] Traditional oil well production early warning systems rely on production managers or researchers reviewing daily production reports or dynamic production curves. Wells that contribute significantly to production are designated as high-priority monitoring wells if their dynamic data shows substantial changes. This method of early warning is primarily manual, reducing the timeliness of the warnings.
[0003] Meanwhile, oil well dynamic data involves a wide range of aspects, including production data, pump operating conditions, pump inlet temperature and pressure, manifold nozzles, and wellhead temperature and pressure. This data is influenced by numerous factors such as geology, reservoir conditions, and operating regimes. Due to the complex relationships between these data, traditional research methods struggle to achieve high-precision prediction results. Taking water cut as an example, the difficulties in prediction are illustrated by several factors. First, water cut exhibits an upward trend and changes complexly over time, making accurate prediction difficult. Second, the increase in water cut is influenced by multiple factors, such as geological factors (interlayers, interlayers), reservoir factors (edge water drive type, bottom water drive type), operating regimes (fluid extraction, fluid depletion), inter-well interference, and wellbore factors, making modeling challenging. Third, the numerous factors affecting water cut, the high dimensionality of the data, and the large amount of information make feature selection and model design difficult. Fourth, some oil wells are approaching a water cut breakthrough stage, with rapid changes in water cut, making prediction difficult. These factors limit the research methods available for conventional reservoir engineering, reducing prediction accuracy. However, in the process of production dynamic tracking and management, such oil wells require prediction models with high accuracy and real-time performance. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and system for early warning of dynamic data of oil wells, addressing the problems existing in the prior art.
[0005] The technical invention adopted by this invention to solve its technical problem is: a method for early warning of dynamic data of oil wells, comprising the following steps:
[0006] S1: Obtain data on multiple variables related to oil well production dynamics;
[0007] S2: Select one variable from the multiple variable data as the dependent variable, and the other variables as independent variables; wherein, the data corresponding to the dependent variable is the dependent variable data, and the data corresponding to the independent variable is the independent variable data;
[0008] S3: Calculate the correlation between the dependent variable data and the independent variable data based on the dependent variable data, and obtain the mutual information value of the different independent variable data. Filter out the independent variable data that are related to the dependent variable data based on the mutual information value.
[0009] S4: Perform principal component analysis on the relevant independent variable data and the dependent variable to obtain principal component data;
[0010] S5: Divide the principal component data and the dependent variable data into a preset number of training sets and test sets. Input the training set into a preset model to optimize the model hyperparameters and obtain a trained model. Use the test set to verify the reliability and generalization ability of the trained preset model and obtain a tested model.
[0011] S6: Based on the tested model, predict the dependent variable data for a preset time period to obtain the predicted dependent variable data;
[0012] S7: Compare the dependent variable data and the predicted dependent variable data with the preset dependent variable warning range respectively to obtain the comparison results;
[0013] S8: Based on the comparison results, provide early warning of the oil well production status.
[0014] In one embodiment, S2 includes: preprocessing the plurality of variable data to obtain cleaned plurality of variable data, selecting one cleaned variable as the dependent variable from the cleaned plurality of variable data, and the other cleaned variables as independent variables.
[0015] In one embodiment, the preprocessing includes at least one of missing value processing, outlier processing, and data standardization.
[0016] In one embodiment, the step of calculating the correlation between the dependent variable data and the different independent variable data to obtain the mutual information values of the different independent variable data includes:
[0017] The mutual information values between the dependent variable data and different independent variable data are calculated using the formula for calculating mutual information.
[0018] In one embodiment, the formula for calculating the mutual information is:
[0019] I(X;Y)=∑∑p(x,y)*log(p(x,,y) / (p(x)*p(y)))
[0020] Where X represents the independent variable, Y represents the dependent variable, p(x,y) represents the joint probability of the independent variable X and the dependent variable Y, p(x) and p(y) represent the probabilities of the independent variable X and the dependent variable Y occurring, respectively, and I(x;y) is the mutual information value.
[0021] In one embodiment, the preset model includes an LSTM neural network.
[0022] In one embodiment, the step of training a preset model based on the training set input to obtain a trained model includes:
[0023] The hyperparameters of the LSTM neural network are optimized using the training set using a genetic algorithm and a particle swarm optimization algorithm to obtain a trained model.
[0024] In one embodiment, S7 includes:
[0025] The rate of change of the dependent variable data and the predicted dependent variable data within a preset time period is calculated respectively, and the rate of change is compared with the preset warning rate of change to obtain the warning result.
[0026] In one embodiment, the multiple variable data regarding the oil well production dynamics include: oil production, water production, gas production, water cut, wellhead pressure, and wellhead temperature.
[0027] This application also provides a method for early warning of dynamic data of oil wells, including a processor and a memory storing a computer program, wherein the program is loaded and executed by the processor to implement the method for early warning of dynamic data of oil wells as described above.
[0028] Implementing this invention offers the following advantages: By selecting variables directly related to oil well production dynamics as independent variables and calculating their mutual information with the dependent variable, this method effectively reduces data noise and redundancy, significantly improving the accuracy and reliability of the early warning model. Subsequently, principal component analysis is used to reduce the dimensionality of the selected data, which not only reduces computational complexity but also enhances the model's generalization ability, enabling it to flexibly respond to data fluctuations under different operating conditions. This early warning system can predict future dependent variables based on a preset model and compare the predictions with a preset early warning range, achieving early detection and warning of abnormal changes in oil well production dynamics. This provides oilfield managers with a basis for timely intervention, effectively preventing production accidents and ensuring production safety. Simultaneously, the early warning results help oilfield managers scientifically adjust production plans, optimize resource allocation, improve production efficiency and economic benefits, and promote the transformation of oilfields towards intelligent and refined management. Attached Figure Description
[0029] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0030] Figure 1 This is a flowchart illustrating an embodiment of the oil well dynamic data early warning method provided by the present invention;
[0031] Figure 2 This is a flowchart illustrating another embodiment of the oil well dynamic data early warning method provided by the present invention;
[0032] Figure 3The method for early warning of dynamic data of oil wells provided by this invention includes the main parameters of the daily production report of oil wells.
[0033] Figure 4 This invention provides a method for early warning of dynamic data in oil wells, and the result of analyzing the water cut variable in oil wells is shown in the figure.
[0034] Figure 5 This invention provides a method for early warning of dynamic data in oil wells, with principal component analysis results of water cut in the oil well.
[0035] Figure 6 This is a diagram of the LSTM time series neural network structure in the oil well dynamic data early warning method provided by this invention;
[0036] Figure 7 This is a graph showing the predicted water cut of oil wells in the oil well dynamic data early warning method provided by the present invention.
[0037] Figure 8 This is a water cut prediction map for the oil well in the next month in the oil well dynamic data early warning method provided by the present invention;
[0038] Figure 9 This is a probability distribution map of water cut in oil wells in the method for early warning of dynamic oil well data provided by the present invention;
[0039] Figure 10 This is an oil well water cut early warning map in the oil well dynamic data early warning method provided by the present invention. Detailed Implementation
[0040] The technical inventions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] like Figure 1 and Figure 2 As shown, the method for early warning of dynamic data of oil wells provided by the present invention includes the following steps:
[0042] S1: Obtain data on multiple variables related to oil well production dynamics;
[0043] Specifically, such as Figure 3 As shown, in one embodiment, the variables include, but are not limited to, daily oil production, daily water production, daily gas production, test water cut, nozzle, wellhead pressure, wellhead temperature, sand content, frequency, bottom hole pressure, pump inlet pressure, pump outlet pressure, pump inlet temperature, daily liquid production, and water cut.
[0044] S2: Select one variable from multiple variable data as the dependent variable, and the other variables as independent variables; where the data corresponding to the dependent variable is the dependent variable data, and the data corresponding to the independent variables is the independent variable data.
[0045] S21: Preprocess the data of multiple variables to obtain cleaned data of multiple variables. From the cleaned data of multiple variables, select one cleaned variable as the dependent variable, and the other cleaned variables as independent variables. The preprocessing includes at least one of the following: missing value handling, outlier handling, and data standardization.
[0046] Specifically, preprocessing multiple variable data aims to effectively address issues such as missing values, outliers, duplication, inconsistencies, and irrationalities in the data, thereby improving data interpretability, reducing model training complexity, and significantly enhancing the model's predictive and analytical performance. Given the unique nature of oil well data, preprocessing includes accurately filling missing values, meticulously identifying and adjusting outliers, and standardizing the data using range standardization to ensure numerical consistency among variables. Subsequently, from the cleaned data, one variable is selected as the research object—the dependent variable. For example, water cut is chosen as the dependent variable, while the remaining variables naturally become independent variables (such as oil production, water production, and bottom hole pressure) to deeply analyze or predict the dynamic changes in water cut.
[0047] like Figure 4 As shown, S3: Calculate the correlation between the dependent variable data and the independent variable data, and obtain the mutual information value of the different independent variable data. Based on the mutual information value, filter out the independent variable data that are related to the dependent variable data.
[0048] S31: Calculate the mutual information values between the dependent variable data and different independent variable data using the formula for calculating mutual information. The formula for calculating mutual information is:
[0049] I(X;Y)=∑∑p(x,y)*log(p(x,y) / (p(x)*p(y)))
[0050] Where X represents the independent variable, Y represents the dependent variable, p(x,y) represents the joint probability of the independent variable X and the dependent variable Y, p(x) and p(y) represent the probabilities of the independent variable X and the dependent variable Y occurring, respectively, and I(x;y) is the mutual information value.
[0051] Specifically, to deeply analyze the complex relationships between variables in oil well dynamic data, mutual information was employed as an analytical tool. Mutual information not only transcends the constraints of linear relationships, capturing potential nonlinear correlations between variables, but its value directly reflects the predictive power of the independent variable on the dependent variable. Specifically, the degree of correlation between the dependent variable (water cut) and multiple independent variables (such as production time, daily oil production, nozzle, wellhead temperature, and 14 other parameters) was quantified by calculating the mutual information value. In this process, the mutual information value I(x;y) was calculated based on the formula for calculating mutual information, which considers the joint probability p(x,y) of the independent variable X and the dependent variable Y, as well as their individual probabilities p(x) and p(y). In the analysis of oil well dynamic data, the mutual information method effectively screened out 13 parameters highly correlated with water cut (such as daily oil production, nozzle, pump inlet pressure, and cumulative oil production). These parameters will be used as key input variables in subsequent principal component analysis. By eliminating irrelevant parameters, the complexity of data analysis is simplified, and the accuracy and reliability of the analysis results are improved.
[0052] S4: Perform principal component analysis on the relevant independent and dependent variable data to obtain principal component data.
[0053] like Figure 5 As shown, specifically, Principal Component Analysis (PCA) was used as a data dimensionality reduction technique. PCA transforms the original n-dimensional variables (such as the 13 parameters closely related to water cut in this example: daily oil production, nozzle, pump inlet pressure, cumulative oil production, etc.) into a new set of independent variables, i.e., principal components, through linear transformation. This process not only significantly reduces the amount of data but also preserves the key information in the data, thereby greatly simplifying the complexity of the analysis and improving its efficiency.
[0054] Specifically, in the implementation of PCA, for n-dimensional variables (X1,X2,...,X... n The covariance matrix C is obtained through calculation, where C ij Let be the covariance of the i-th feature and the j-th feature. The covariance matrix C is:
[0055]
[0056] Among them, C ij Let C be the covariance of the i-th and j-th features. Then, eigenvalue decomposition is performed on the covariance matrix. Eigenvalue decomposition involves decomposing the covariance matrix C into eigenvalues:
[0057] C = VΛV T
[0058] in,
[0059] V T V = I, where I is the identity matrix, V is an orthogonal matrix, and V is the eigenvalue matrix. The elements on the main diagonal of the eigenvalue matrix are the eigenvalues, arranged from largest to smallest. The magnitude of the eigenvalues represents the variance contributed by each principal component, i.e., the amount of information in the data. Based on the magnitude of the eigenvalues, the first p (four in this example, PC1 to PC4) eigenvectors with the largest eigenvalues are selected. These vectors construct a low-dimensional space. By projecting the original data onto this low-dimensional space, a new feature matrix, i.e., the principal components, is obtained.
[0060] The analysis results show that the two principal components, PC1 and PC2, contain nearly 80% of the data information, while the four principal components (PC1 to PC4) collectively contain over 90% of the data information. This result not only verifies the effectiveness of PCA in data dimensionality reduction but also demonstrates that the selected four principal components can well represent the core features of the original data. Through principal component analysis, the originally complex 13 variables were simplified into four easily manageable variables, which not only reduced the difficulty of data processing but also provided a clearer and more accurate data foundation for subsequent in-depth analysis and prediction. Figure 5 The results of this principal component analysis are presented visually.
[0061] S5: Divide the principal component data and dependent variable data into a preset number of training sets and test sets. Input the training set into the preset model to optimize the model hyperparameters and obtain a trained model. Use the test set to verify the reliability and generalization ability of the trained model and obtain a tested model.
[0062] In one embodiment, the preset model includes an LSTM neural network. The process of training the preset model using a training set as input to obtain a trained model includes: optimizing the hyperparameters of the LSTM neural network using a genetic algorithm and a particle swarm optimization algorithm with the training set to obtain the trained model.
[0063] This application employs a genetic algorithm and particle swarm optimization algorithm to implement an optimization strategy for the hyperparameters of LSTM (Long Short-Term Memory) networks—learning rate and the number of hidden layer neurons. The specific implementation steps first involve randomly initializing a particle swarm, with each particle representing a potential combination of optimized parameters. Subsequently, during LSTM model training, the root mean square error (RMSE) is used as the error calculation formula and also as the loss function to evaluate model performance, with the goal of minimizing this loss function. To quantify the quality of particles, a fitness function is designed, whose value is the reciprocal of the RMSE, thus measuring the degree to which the parameter combination represented by each particle improves the performance of the LSTM model.
[0064] like Figure 6As shown, during the optimization process, if the best fitness in the current particle swarm meets the preset conditions or the number of iterations reaches the upper limit, the optimization process terminates, and the globally optimal particle is output. Otherwise, the algorithm applies the selection, crossover, and mutation mechanisms from genetic algorithms to update the particle swarm, generating a new particle swarm and re-evaluating the fitness of each particle. This process iterates until the stopping condition is met. Ultimately, the parameter combination represented by the globally optimal particle is determined as the optimal hyperparameters of the LSTM model, thus constructing a performance-optimized LSTM neural network model. This model achieves higher prediction accuracy, and the structural design of the LSTM time series neural network also fully considers the characteristics of time series data, such as… Figure 6 As shown in the figure, C1 represents the cell state at time t1, h1 represents the hidden layer state at time t1, and for time t, f t For the Gate of Oblivion, i t For the input gate, C t In cellular state, o t For output gate, h t For the current cell output, h t-1 This is the output of the unit from the previous time step. The candidate memory cells are denoted by σ, which is the sigmoid activation function that determines which values will be updated, and tanh, the hyperbolic cosine activation function, which is used to activate the candidate memory cells. This ensures the stability and accuracy of the model when processing complex time series data. Furthermore, the root mean square error (RMSE), as an evaluation metric for model accuracy, provides an intuitive and quantitative assessment method, helping to continuously optimize and improve model performance.
[0065] The update formula for the LSTM neural network is:
[0066] f t =σ(W f ·[h t-1 ,Xt]+b f )
[0067] i t =σ(W i ·[h t-1 ,Xt]+b i )
[0068]
[0069] o t =σ(W o ·[h t-1 ,Xt]+b o )
[0070] h t =o t *tanh(C t )
[0071]
[0072] In the formula, W f W i W o W c and b f b i b o b c The weights and biases of the forget gate, input gate, output gate, and candidate memory cells are given respectively, and Xt is the independent variable at time t.
[0073] The root mean square error (RMSE) is used as the accuracy evaluation metric for LSTM models. The specific formula is as follows:
[0074]
[0075] In the formula, n is the number of predicted samples; y i This is the actual value; y ci These are predicted values.
[0076] Specifically, in the dynamic prediction of oil well production, given the complexity, high dimensionality, and time-series characteristics of the data, an optimized LSTM neural network model was adopted to improve prediction accuracy and real-time performance. The proportion of the research object dataset can be divided according to actual needs. In this embodiment, 70% is used as the training set and 30% as the test set, that is, the principal component data and dependent variable data are divided into a 70% training set and a 30% test set ratio to ensure the independence and reliability of model training and testing. To further improve the performance of the LSTM neural network, key parameters of the LSTM model (such as the learning rate and the number of hidden layer neurons) are optimized by fusing genetic algorithms and particle swarm optimization algorithms. The genetic algorithm, with its strong global search capability and high population diversity, combined with the particle swarm optimization algorithm's fast convergence and information sharing characteristics, effectively avoids local optima and accelerates the optimization process.
[0077] In the specific optimization process, the reciprocal of the root mean square error (RMSE) was used as the fitness function. The particle swarm optimization (PSO) was iteratively updated to find the LSTM model parameter combination that minimized the RMSE. After multiple iterations, the globally optimal particle was obtained, and the parameters represented by it were set as the optimal parameters for the LSTM neural network. Subsequently, the LSTM model was trained using these optimized parameters. The mean square error was used as the loss function during training, and 100 iterations were performed with the support of the Adam optimizer to ensure the model's stability and accuracy. Finally, an LSTM neural network model optimized by both genetic algorithm and particle swarm optimization algorithm was obtained. This model can not only effectively handle complex time series relationships in oil well production dynamic data, but also improve the real-time performance of predictions while maintaining prediction accuracy. Applying this model to a test set of data verified its effectiveness and reliability in practical applications, providing strong support for oil well production management and decision-making.
[0078] S6: Based on the tested model, predict the dependent variable data over a preset time period to obtain the predicted dependent variable data.
[0079] like Figure 7 and Figure 8 As shown, specifically, after optimizing and training the LSTM neural network model and verifying its effectiveness and reliability on the test set, the next step is to use this carefully constructed model to predict the water cut in oil well production for the next 30 days. This step is based on the trained LSTM model, taking historical data and the current production status as inputs. Through the model's complex internal calculation process, especially utilizing its superior time series processing capabilities, it captures and simulates the pattern of water cut changes over time. Finally, the predicted water cut data for the next 30 days is obtained.
[0080] S7: Compare the dependent variable data and the predicted dependent variable data with the preset early warning range of the dependent variable to obtain the comparison results.
[0081] Furthermore, S7 includes: calculating the rate of change of the dependent variable data and the predicted dependent variable data within a preset time period, and comparing the rate of change with the preset warning rate of change.
[0082] S8: Provide early warnings on the production status of oil wells based on comparison results.
[0083] Specifically, compared to the traditional 3σ criterion, such as Figure 9As shown, some variables in oil well dynamic data do not follow a normal distribution. To reduce the error rate in early warning judgments caused by the non-normal distribution of dynamic data, this technology uses oil well planned production indicators as the criteria for quantitative early warning. Specifically, a preset range and threshold for the rate of change of the dependent variable (such as water cut) are first set. These thresholds are dynamically adjusted according to the oil well's production plan indicators; for example, a water cut increase rate not exceeding 3% is considered normal. By calculating the rate of change of measured and predicted data within a preset time (such as one day, two days, etc.) and comparing it in detail with these thresholds, the system can accurately identify abnormal fluctuations and generate intuitive early warning charts accordingly. Figure 10 This invention clearly displays the changing trends and early warning status of key indicators such as water cut. By using planned production indicators for oil wells as the criteria for quantitative early warning and adjusting these criteria in real time to match changes in the production plan, this invention provides a more scientific and accurate basis for management decisions. When the early warning system issues an abnormal signal, managers can respond quickly, analyze the cause of the abnormality in depth based on the actual situation of the oil well, and take effective measures to deal with it, thereby significantly improving the management efficiency and safety of oil well production. This intelligent early warning and rapid response mechanism provides a strong guarantee for the continuous and stable operation of oil well production.
[0084] To more precisely assess the trend of moisture content changes, the rate of change of both measured and predicted data over a preset time period was calculated. This preset time period could be one day, two days, or one month, etc. These rates of change were then compared in detail with preset moisture content change thresholds (e.g., a normal day is defined as no more than 3%). This quantitative analysis method not only improves the accuracy of early warnings but also provides a scientific basis for management decisions.
[0085] Based on the above comparison results, an intuitive early warning map was generated using an intelligent early warning system. Figure 10 The system clearly displays the trend of water cut changes and early warning status, enabling managers to grasp the oil well production situation at a glance. When the early warning system issues an abnormal signal, it can quickly combine the actual situation of the oil well to conduct in-depth analysis of the cause of the abnormality and take corresponding measures, thereby effectively improving the management efficiency and safety of oil well production. Through this intelligent early warning and rapid response mechanism, a strong guarantee can be provided for the stable operation of oil well production.
[0086] This application also provides a system for early warning of dynamic data of oil wells, including a processor and a memory storing a computer program. The program is loaded and executed by the processor to implement the method for early warning of dynamic data of oil wells as described in any of the above claims.
[0087] Beneficial Effects: By selecting variables directly related to oil well production dynamics as independent variables and calculating their mutual information with the dependent variable, this method effectively reduces data noise and redundancy, significantly improving the accuracy and reliability of the early warning model. Subsequently, principal component analysis is used to reduce the dimensionality of the selected data, which not only reduces computational complexity but also enhances the model's generalization ability, enabling it to flexibly cope with data fluctuations under different operating conditions. This early warning system can predict future dependent variables based on a tested model and compare them with a preset early warning range, achieving early detection and warning of abnormal changes in oil well production dynamics. This provides oilfield managers with a basis for timely intervention, effectively preventing production accidents and ensuring production safety. Simultaneously, the early warning results help oilfield managers scientifically adjust production plans, optimize resource allocation, improve production efficiency and economic benefits, and promote the transformation of oilfields towards intelligent and refined management. Ultimately, this early warning mechanism significantly reduces the overall operating costs of the oilfield and improves overall operational efficiency by reducing economic losses caused by equipment failures and production interruptions and lowering unnecessary maintenance costs.
[0088] It is understood that the above embodiments only illustrate preferred embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. Therefore, all equivalent transformations and modifications made with respect to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A method for early warning of dynamic data from oil wells, characterized in that, include: S1: Obtain data on multiple variables related to oil well production dynamics; S2: Select one variable from the multiple variable data as the dependent variable, and the other variables as independent variables; wherein, the data corresponding to the dependent variable is the dependent variable data, and the data corresponding to the independent variable is the independent variable data; S3: Calculate the correlation between the dependent variable data and the independent variable data based on the dependent variable data, and obtain the mutual information value of the different independent variable data. Filter out the independent variable data that are related to the dependent variable data based on the mutual information value. S4: Perform principal component analysis on the relevant independent variable data and the dependent variable to obtain principal component data; S5: Divide the principal component data and the dependent variable data into a preset number of training sets and test sets. Input the training set into a preset model to optimize the model hyperparameters and obtain a trained model. Use the test set to verify the reliability and generalization ability of the trained model and obtain a tested model. S6: Based on the tested model, predict the dependent variable data for a preset time period to obtain the predicted dependent variable data; S7: Compare the dependent variable data and the predicted dependent variable data with the preset dependent variable warning range respectively to obtain the comparison results, including: calculating the rate of change of the dependent variable data and the predicted dependent variable data within a preset time period respectively, and comparing the rate of change with the preset warning change rate; S8: Based on the comparison results, provide early warning of the oil well production status.
2. The method for early warning of dynamic data of oil wells according to claim 1, characterized in that, S2 includes: The multiple variable data are preprocessed to obtain cleaned multiple variable data. From the cleaned multiple variable data, one cleaned variable is selected as the dependent variable, and the other cleaned variables are the independent variables.
3. The method for early warning of dynamic data of oil wells according to claim 2, characterized in that, The preprocessing includes at least one of the following: missing value processing, outlier processing, and data standardization processing.
4. The method for early warning of dynamic data of oil wells according to claim 1, characterized in that, The step of calculating the correlation between the dependent variable data and the independent variable data to obtain the mutual information values of the different independent variable data includes: The mutual information values between the dependent variable data and different independent variable data are calculated using the formula for calculating mutual information.
5. The method for early warning of dynamic data of oil wells according to claim 4, characterized in that, The formula for calculating the mutual information is: Where X represents the independent variable, Y represents the dependent variable, p(x,y) represents the joint probability of the independent variable X and the dependent variable Y, p(x) and p(y) represent the probabilities of the independent variable X and the dependent variable Y occurring, respectively, and I(X;Y) is the mutual information value.
6. The method for early warning of dynamic data of oil wells according to claim 1, characterized in that, The preset model includes: LSTM neural network.
7. The method for early warning of dynamic data of oil wells according to claim 6, characterized in that, The step of training a preset model by inputting the training set into the preset model to obtain the trained preset model includes: The hyperparameters of the LSTM neural network are optimized using the training set using a genetic algorithm and a particle swarm optimization algorithm to obtain a trained model.
8. The method for early warning of dynamic data of oil wells according to claim 1, characterized in that, The data on the dynamics of oil well production include: oil production, water production, gas production, water cut, wellhead pressure, and wellhead temperature.
9. A system for early warning of dynamic data from oil wells, comprising a processor and a memory storing a computer program, characterized in that, The memory stores a program that is loaded and executed by the processor to implement the method for early warning of dynamic data of oil wells as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Memory, fire risk prediction model construction method, system and device
CN113553754A
Rod-pumped well fault prediction method based on LSTM-VGGNet
CN114004151A