Development trend prediction method of small sample oil well time series data
By using Soft-DTW-MSE loss function and integrated learning model in the prediction of oil well timing data, the problem of inaccurate delay and shape prediction of oil well timing data in the prior art is solved, especially under small sample conditions, Higher prediction accuracy and reliability.
Patent Information
- Application Number
- CN202411256987.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-02-07
AI Technical Summary
The existing oil well timing data prediction methods have problems of inaccurate time delay, trend and shape prediction in accurately predicting the change trend of oil well timing data, especially in the condition of small sample data, which is difficult to train an effective prediction model.
The Soft-DTW-MSE loss function is used, combined with the two parts of Soft-DTW and MSE losses, and the integrated learning model is constructed by optimizing the basic prediction model, and uncertain prediction is added to improve the accuracy and reliability of the prediction results.
It improves the accuracy and stability of oil well timing data prediction, especially under small sample conditions, which can better learn historical data information, and provide uncertain predictions, enhancing the reliability of prediction results.
Smart Images

Figure CN119398208A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data analysis and petroleum engineering, and in particular to a method for predicting the development trend of small sample oil well time series data. Background Art
[0002] During the operation of oil wells, with the widespread application of various sensors, a large amount of oil well time series data is obtained. Accurate prediction of these time series data will bring huge benefits to the petroleum engineering industry. However, the existing oil well time series prediction methods still have challenges in accurately predicting the changing trend of oil well time series data.
[0003] Most of the existing oil well time series data prediction models use loss functions such as MSE and RMSE. This type of loss function mainly measures the point-to-point error between the predicted value and the true value at the same time. For time series prediction, the shape and trend of the prediction result are often more important than the predicted value at a single time point. However, loss functions such as MSE may not fully reflect the difference between the shape of the predicted result and the shape of the true sequence, resulting in poor performance of the model in shape prediction. The DTW (Dynamic Time Warping) algorithm is mainly used to measure the similarity between two time series. By calculating the DTW distance between the predicted sequence and the true value, the accuracy of the model prediction can be evaluated, rather than just relying on point-to-point comparisons. This can make up for the shortcomings of using loss functions such as MSE, but the DTW algorithm will also bring about problems such as delayed prediction results. Therefore, there is an urgent need for a loss function suitable for the oil well time series prediction model.
[0004] In addition, training an effective prediction model for oil well time series data often requires a large number of data samples. Oil wells with short data collection time have only a small number of data samples. It is often difficult to train an effective prediction model based on the data of this well, and a large amount of data from other oil wells is required for pre-training. However, the data patterns of different oil wells are different, and it is difficult for the model to learn knowledge applicable to this well from the data of other wells, resulting in the existing training methods being difficult to train an effective prediction model for small sample oil well time series data. Summary of the invention
[0005] In view of this, the present invention provides a development trend prediction method for small sample oil well time series data to solve the above problems.
[0006] The present invention provides a method for predicting the development trend of small sample oil well time series data, comprising: obtaining oil well data to be predicted with only a small number of samples and a historical database; screening out multiple oil well time series data with similar shapes and rules to the oil well data to be predicted from the historical database, and preprocessing the multiple oil well time series data; constructing a data set according to the preprocessed multiple oil well time series data, the data set comprising a training set, a validation set and a test set; selecting a model suitable for processing time series data as a basic prediction model; optimizing the basic prediction model according to the data set and a Soft-DTW-MSE loss function to obtain a target prediction model; integrating the prediction results of multiple target prediction models to construct an integrated learning model; predicting the oil well time series data to be predicted by using the integrated learning model, and calculating the uncertainty of the prediction to obtain a prediction result.
[0007] In another implementation of the present invention, the preprocessing includes data cleaning, removing outliers and missing values, and performing noise reduction and standardization on the data.
[0008] In another implementation of the present invention, the Soft-DTW-MSE loss function includes Soft-DTW loss and MSE loss.
[0009] In another implementation of the present invention, the Soft-DTW loss changes the recursive relationship of the minimum cumulative distance of the DTW algorithm from discrete to continuous, which is expressed as:
[0010]
[0011] Among them, R(i,j) is the element of the cumulative cost matrix, the minimum is the cumulative distance, and the size of the last R(i,j) is the loss calculated by Soft-DTW; D(i,j) is the Euclidean distance between the two sequences at positions i and j; γ is a smoothing parameter used to control the degree of softening. The larger the value of γ, the more obvious the softening effect, and the smaller the value of γ, the weaker the softening effect.
[0012] In another implementation of the present invention, the MSE loss is expressed as:
[0013]
[0014] Where n is the number of data points; Y i is the true value of sample i; is the corresponding predicted value.
[0015] In another implementation of the present invention, the Soft-DTW-MSE loss function is expressed as:
[0016] Loss = w·log 10 (losssoftdtw +1)+(1-w)·log 10 (loss mse +1)
[0017] Among them, loss softdtw is the Soft-DTW loss; loss mse is the MSE loss; w is the weight parameter; adding 1 after the loss is to make the calculated loss always positive, so as to facilitate the correct training of the model.
[0018] The development trend prediction method of small sample oil well time series data of the present invention solves the problems of inaccurate delay, trend and shape prediction existing in the loss function used in the existing neural network prediction model through the Soft-DTW-MSE loss function, improves the accuracy of the prediction results, and provides a parameter that can be optimized by the hyperparameter algorithm; compared with the existing methods, the integrated prediction method more comprehensively considers the information of data from different wells in the historical data in the small sample time series prediction task, can better learn the information of historical data for small sample prediction, and adds uncertainty prediction to improve the reliability of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. By reading the detailed description of the following implementations, the advantages and benefits of the solutions become clear to those skilled in the art. The drawings are only used to illustrate the preferred implementations and are not to be considered as limiting the present invention.
[0020] In the attached picture:
[0021] Figure 1 The present invention is a flowchart of a method for predicting development trends of small sample oil well time series data according to an embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of prediction results using Soft-DTW as a loss function according to an embodiment of the present invention.
[0023] Figure 3 The figure is a schematic diagram of prediction results using Soft-DTW-MSE as a loss function according to an embodiment of the present invention.
[0024] Figure 4 The figure is a schematic diagram of prediction results of an example of an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and in detail below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0026] Figure 1 A flow chart of a method for predicting development trend of small sample oil well time series data provided by an embodiment of the present invention is as follows: Figure 1 As shown, this embodiment mainly includes:
[0027] S101. Obtaining oil well data to be predicted with only a small number of samples and a historical database.
[0028] S102, selecting from the historical database a plurality of oil well time series data having shapes and patterns similar to the oil well data to be predicted, and preprocessing the plurality of oil well time series data.
[0029] S103, constructing a data set according to the preprocessed time series data of multiple oil wells, wherein the data set includes a training set, a validation set and a test set.
[0030] Exemplarily, the training set, validation set, and test set are divided, and data samples (the size and dimension of input data and label data) are determined.
[0031] S104. Select a model suitable for processing time series data as a basic prediction model.
[0032] Exemplarily, deep learning models such as long short-term memory network (LSTM), recurrent neural network (RNN), Transformer, or some integrated models such as CNN-LSTM, etc. can be selected as the basic prediction model.
[0033] S105 . Optimize the basic prediction model according to the data set and the Soft-DTW-MSE loss function to obtain a target prediction model.
[0034] Exemplarily, parameters such as input and output dimensions are set for the basic prediction model according to the constructed data set, and optimizers and optimization algorithms are designed for the model, including hyperparameter optimization algorithms, model weight optimization algorithms, etc. In the training process of the basic prediction model, the Soft-DTW-MSE loss function is introduced, which includes two parts: Soft-DTW and MSE.
[0035] Design the recursive relationship of the minimum cumulative distance of the DTW algorithm:
[0036] (1) Define distance measurement: First, define the distance measurement method between the two sequence points of the true value and the predicted value. Commonly used ones include Euclidean distance and Manhattan distance.
[0037] (2) Create a distance matrix: Create a distance matrix by calculating the distance between any two points in the two sequences.
[0038] (3) Calculate the cumulative distance matrix: Starting from the upper left corner of the distance matrix, use the dynamic programming method to gradually calculate the minimum cumulative distance to each point to form a cumulative distance matrix. The recursive relationship of the minimum cumulative distance is as follows:
[0039] R(i,j)=D(i,j)+min(R(i-1,j),R(i,j-1),R(i-1,j-1))
[0040] Where D(i,j) is the Euclidean distance between two sequences at positions i and j, and R(i,j) is the minimum cumulative distance at position (i,j).
[0041] The Soft-DTW algorithm is designed to make the DTW algorithm differentiable. Soft-DTW makes the DTW algorithm differentiable to be suitable for neural networks. The main change is to change the recursive relationship of the minimum cumulative distance of the DTW algorithm from discrete to continuous. The main function of MSE is to measure the difference between the model prediction value and the true value. Unlike Soft-DTW, it is a point-to-point error calculation method.
[0042] Soft-DTW-MSE is specified as the loss function for the basic prediction model. The preprocessed time series data of multiple oil wells are separated according to different wells and input into a basic prediction model for training. That is, each basic prediction model is trained using data from only one well. Using the designed optimization algorithm, the hyperparameters of each basic prediction model are optimized during the training process, and the trained basic prediction model is saved.
[0043] S106: Integrate the prediction results of multiple target prediction models to construct an integrated learning model.
[0044] Exemplarily, the data of new oil wells to be predicted are divided into training data and test data, the training data is used to fine-tune the saved trained basic prediction models of different wells, and the error value of the last iteration of the training process is saved and predicted.
[0045] Different weights are assigned according to the error size of the last iteration of the basic prediction model of different wells, and the predicted values of the basic prediction models of different wells are weighted averaged according to the weights to obtain the predicted value S1.
[0046] The weight calculation formula is as follows:
[0047]
[0048] Here, δ is a very small number used to prevent the denominator from being zero.
[0049] The calculation formula of the predicted value S1 is as follows:
[0050]
[0051] Among them, x i Represents the predicted value of each basic prediction model.
[0052] A prediction model is trained using the data of all oil wells in the historical data. In one iteration, a loop structure is used to form the training process. Each loop uses the data of one well to update the model parameters. When all the data of the oil wells are used up, the iteration process ends.
[0053] The data of the new oil wells to be predicted are divided into training data and test data. The trained prediction model is fine-tuned using the training data of the new oil wells to be predicted, and prediction is performed, and the predicted value is recorded as S2.
[0054] The predicted value S1 and the predicted value S2 are fused into the predicted value S3 using the weighted average method according to certain weights.
[0055] Integrating the prediction results of multiple basic prediction models can improve the stability and accuracy of the prediction.
[0056] S107, predicting the time series data of the oil well to be predicted by using the integrated learning model, and calculating the uncertainty of the prediction to obtain a prediction result.
[0057] Exemplarily, the oil well time series data is predicted through an integrated learning model, and the uncertainty of the prediction is calculated. Specifically, the uncertainty can be estimated by using the prediction differences of each basic model in the integrated learning model.
[0058] Repeat step S106 and make multiple predictions to obtain the predicted distribution. Calculate the average (S) and variance of multiple prediction results (S3) to obtain the prediction uncertainty. Use the average as the prediction result and use the standard deviation (or variance) to represent the prediction uncertainty. The calculation formula of the standard deviation is as follows:
[0059]
[0060] Among them, σ represents the standard deviation, N represents the number of samples, and x i represents each sample value, and μ represents the mean.
[0061] Plot the predicted and actual values, as well as the uncertainty intervals. Plot the calculated mean S as the prediction result, and for each time step, plot the uncertainty prediction interval by adding or subtracting the standard deviation of the time step from the mean, and compare it with the actual value.
[0062] The development trend prediction method of small sample oil well time series data of the present invention solves the problems of inaccurate delay, trend and shape prediction existing in the loss function used in the existing neural network prediction model through the Soft-DTW-MSE loss function, improves the accuracy of the prediction results, and provides a parameter that can be optimized by the hyperparameter algorithm; compared with the existing methods, the integrated prediction method more comprehensively considers the information of data from different wells in the historical data in the small sample time series prediction task, can better learn the information of historical data for small sample prediction, and adds uncertainty prediction to improve the reliability of the prediction results.
[0063] In another implementation of the present invention, the preprocessing includes data cleaning, removing outliers and missing values, and performing noise reduction and standardization on the data.
[0064] In another implementation of the present invention, the Soft-DTW-MSE loss function includes Soft-DTW loss and MSE loss.
[0065] In another implementation of the present invention, the Soft-DTW loss changes the recursive relationship of the minimum cumulative distance of the DTW algorithm from discrete to continuous, which is expressed as:
[0066]
[0067] Among them, R(i,j) is the element of the cumulative cost matrix, the minimum is the cumulative distance, and the size of the last R(i,j) is the loss calculated by Soft-DTW; D(i,j) is the Euclidean distance between the two sequences at positions i and j; γ is a smoothing parameter used to control the degree of softening. The larger the value of γ, the more obvious the softening effect, allowing more flexible alignment; the smaller the value of γ, the weaker the softening effect, and the closer it is to traditional DTW.
[0068] In another implementation of the present invention, the MSE loss is expressed as:
[0069]
[0070] Where n is the number of data points; Y i is the true value of sample i; is the corresponding predicted value.
[0071] In another implementation of the present invention, the Soft-DTW-MSE loss function is expressed as:
[0072] Loss = w·log 10 (loss softdtw +1)+(1-w)·log 10 (loss mse +1)
[0073] Among them, loss softdtw is the Soft-DTW loss; loss mse is the MSE loss; w is the weight parameter; adding 1 after the loss is to make the calculated loss always positive, so as to facilitate the correct training of the model.
[0074] For example, sometimes the difference between the loss calculated by MSE and the loss calculated by Soft-DTW is too large, which leads to the tendency to optimize the one with a larger loss magnitude and ignore the other during the optimization process. In order to solve this problem, the present invention provides a new combination method, which combines the two in logarithmic form and adds a weight parameter, and can be optimized using a hyperparameter optimization method, so that the two losses can be combined with a suitable weight.
[0075] The method of the present invention innovatively combines the Soft-DTW loss function and the MSE loss function to obtain a new Soft-DTW-MSE loss function, which effectively combines the advantages and disadvantages of the two and can improve the model prediction effect.
[0076] In another implementation of the present invention, the method proposed in the present invention is verified.
[0077] This example collects historical monitoring data of oil wells from 33 oil wells in an oil field in my country. The time span of these data is from June 2016 to March 2022, with a sampling interval of 30 minutes. The total amount of data collected is 970,234, including 56 indicators such as temperature and pressure. The features with many missing values and outliers are eliminated, and finally 24 features are retained, and the feature of oil well dynamometer area is selected for prediction.
[0078] In addition, an oil well with only 1,400 data points was selected as the oil well that needed to be predicted. Eight wells with similar shapes and patterns of dynamometer area data to the oil well that needed to be predicted were found from the historical database. The time series data of these oil wells were collected, and the Kalman filter was used to reduce the noise of the data. The denoised data was then standardized.
[0079] 80% of the above data are divided into training sets, 10% of the data are divided into validation sets, and 10% of the data are divided into test sets. The input data of the data sample is 48 data in the past 24 hours, and the label data is 48 data in the next 24 hours.
[0080] Four models, including LSTM, LSTM-SA, Transformer, and CNN-LSTM, were selected as basic prediction models, with two of each model. The parameters of the basic prediction model were set according to the constructed data set. The optimizer used Adam, the learning rate was 0.001, and the optimization algorithm used PSO optimization algorithm.
[0081] In the training process of the basic prediction model, the Soft-DTW-MSE loss function proposed in this invention is introduced. The recursive relationship of the minimum cumulative distance of the DTW algorithm is changed from discrete to continuous. The change method is as follows:
[0082]
[0083] Where R(i,j) is the element of the cumulative cost matrix, D(i,j) is the Euclidean distance between the two sequences at positions i and j, and γ is a smoothing parameter used to control the degree of softening. In this example, the smoothing parameter is set to 1.
[0084] Combining Soft-DTW loss and MSE loss, the combined weight of this example is set to 0.5. The specific formula is as follows:
[0085] Loss = 0.5 log 10 (loss softdtw +1)+0.5·log 10 (loss mse +1)
[0086] Among them, loss softdtw The loss calculated for Soft-DTW, loss mse The loss calculated for MSE.
[0087] In order to verify the effectiveness of the loss function proposed in this invention, this example uses randomly generated data to respectively use the prediction effects of using Soft-DTW as the loss function and using Soft-DTW-MSE as the loss function. Figure 2 and Figure 3 As shown. Figure 2 It can be seen that only using Soft-DTW as the loss function can accurately predict the shape of the data sequence, but there will be a phenomenon of backward (or forward) delay in the predicted sequence. After adding MSE, this problem can be solved, which proves the superiority of the loss function proposed in the present invention.
[0088] Use the preprocessed oil well time series data to train the basic prediction model, and use the Soft-DTW-MSE loss function to improve the prediction performance of the model. Use the designed PSO optimization algorithm to optimize the hyperparameters of each basic prediction model during the training process. In this example, the optimized hyperparameters are mainly the parameters of the neural network layer in each basic prediction model, such as the convolution kernel size of the CNN layer, the number of neurons in the LSTM layer, etc. Save the trained basic prediction model for easy calling in the subsequent integrated learning model.
[0089] The data of new oil wells that need to be predicted are divided into training data and test data. The training data is used to fine-tune the basic prediction models of different wells that have been saved and trained. In this example, the training data is used to perform 10 iterative training in each basic prediction model, the error value of the last iteration of the training process is saved, and then the test set data is used for prediction.
[0090] This example has a total of 8 basic prediction models and 8 prediction results. The calculation formula of the prediction value S1 is as follows:
[0091]
[0092] Among them, x i Represents the predicted value of each basic prediction model.
[0093] A prediction model is trained using the data of all oil wells in the historical data. In this example, the model uses the CNN-LSTM-SA model, the loss uses Soft-DTW-MSE, the optimizer uses Adam, and the learning rate is 0.001. In one iteration, a loop structure is used to form the training process. Each loop uses the data of one well to update the model parameters. When the data of all 8 oil wells are used up, the iteration process ends.
[0094] The data of the new oil wells that need to be predicted are divided into training data and test data. The trained prediction model is trained using the training data of the new oil wells that need to be predicted. Unlike fine-tuning, the number of training times here is a little more, until the loss no longer decreases significantly. In this example, the number of training times is set to 200, and prediction is made, and the predicted value is recorded as S2.
[0095] The predicted value S1 and the predicted value S2 are fused into the predicted value S3 by weighted averaging according to certain weights. In this example, the predicted value S1 is assigned a weight of 0.3, and the predicted value S2 is assigned a weight of 0.7.
[0096] Through the ensemble learning model, the oil well time series data is predicted and the uncertainty of the prediction is calculated. Specifically, the uncertainty can be estimated by using the prediction differences of each basic model in the ensemble learning model.
[0097] This example calculates the average (S: S is the final prediction value) and variance of the five prediction results (S3) to obtain the uncertainty of the prediction. (It is not recommended to repeat step 106 too many times. The prediction mean obtained by too many times will be smoother, which is not conducive to the prediction of uncertainty. If the number of times is too small, more prediction situations cannot be considered. It is recommended to repeat the number of times within 10 times) Use the average value as the prediction result and use the standard deviation (or variance) to represent the uncertainty of the prediction.
[0098] The calculated average value S is plotted as the prediction result. For each time step, the uncertainty prediction interval is plotted by adding the mean value to the standard deviation of the time step and subtracting it from the standard deviation. The uncertainty prediction interval is then compared with the true value. The results are shown in Figure 2. Figure 4 As shown in Figure 1, the prediction results for the next 48 data points are shown. Figure 4 The results show that the prediction method proposed by the present invention accurately predicts the change trend of the data, that is, it is stable first and then has an upward and downward trend, and the predicted rising and falling time points are not much different from the actual data. This proves the effectiveness of the prediction method proposed by the present invention.
[0099] Prediction based on the idea of ensemble learning, that is, by taking the prediction model suitable for different wells as the basic prediction model and combining the integrated prediction results after fine-tuning with the prediction results of a prediction model trained with a large amount of data, and predicting multiple times to obtain the uncertainty prediction interval, the accuracy of the prediction results is improved.
[0100] In another aspect of the present invention, an electronic device includes: a processor, a memory, a communication bus, and a communication interface.
[0101] in:
[0102] The processor, memory and communication interface communicate with each other through a communication bus.
[0103] Communication interface, used to communicate with other electronic devices or servers.
[0104] The processor is used to execute the program, and specifically can execute the steps of any one of the methods for predicting the development trend of small sample oil well time series data in the above embodiments.
[0105] Specifically, the program may include program codes including computer operation instructions.
[0106] The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0107] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0108] The program can be specifically used to enable the processor to execute the steps of any of the methods for predicting the development trend of small sample oil well time series data described in the embodiments. The specific implementation of each step in the program can refer to the corresponding descriptions in the steps and units executed by any of the methods for predicting the development trend of small sample oil well time series data in the above steps, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiments.
[0109] The exemplary embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the methods of the various embodiments of the present application.
[0110] The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, processor, or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0111] Thus far, specific embodiments of the present invention have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing may be advantageous.
[0112] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0113] In the description of the present invention, the terms "first" and "second" are only used to facilitate the description of different components or names, and cannot be understood as indicating or implying a sequential relationship, relative importance, or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.
[0114] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0115] It should be noted that although the specific embodiments of the present invention are described in detail in conjunction with the accompanying drawings, it should not be understood as limiting the scope of protection of the present invention. Within the scope described in the claims, various modifications and variations that can be made by those skilled in the art without creative work still belong to the scope of protection of the present invention.
[0116] The examples of the embodiments of the present invention are intended to concisely illustrate the technical features of the embodiments of the present invention so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to be improper limitations of the embodiments of the present invention.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the development trend of small sample oil well time series data, characterized in that: include: Obtain the oil well data and historical database with only a small number of samples to be predicted; Filter out multiple oil well time series data with similar shapes and rules to the oil well data to be predicted from the historical database, and pre-process the multiple oil well time series data; Constructing a data set based on the preprocessed time series data of multiple oil wells, wherein the data set includes a training set, a validation set, and a test set; Select a model suitable for processing time series data as the basic prediction model; Optimizing the basic prediction model according to the data set and the Soft-DTW-MSE loss function to obtain a target prediction model; Integrate the prediction results of multiple target prediction models to build an integrated learning model; The time series data of the oil well to be predicted is predicted by using the integrated learning model, and the uncertainty of the prediction is calculated to obtain a prediction result.
2. The method according to claim 1, characterized in that The preprocessing includes data cleaning, removing outliers and missing values, and performing noise reduction and standardization on the data.
3. The method according to claim 1, characterized in that The Soft-DTW-MSE loss function includes Soft-DTW loss and MSE loss.
4. The method according to claim 3, characterized in that The Soft-DTW loss changes the recursive relationship of the minimum cumulative distance of the DTW algorithm from discrete to continuous, which is expressed as: Among them, R(i,j) is the element of the cumulative cost matrix, the minimum is the cumulative distance, and the size of the last R(i,j) is the loss calculated by Soft-DTW; D(i,j) is the Euclidean distance between the two sequences at positions i and j; γ is a smoothing parameter used to control the degree of softening. The larger the value of γ, the more obvious the softening effect, and the smaller the value of γ, the weaker the softening effect.
5. The method according to claim 3, characterized in that: The MSE loss is expressed as: Where n is the number of data points; Y i is the true value of sample i; is the corresponding predicted value.
6. The method according to claim 3, characterized in that The Soft-DTW-MSE loss function is expressed as: Loss=w·log 10 (loss softdtw +1)+(1-w)·log 10 (loss mse +1) Among them, loss softdtw is the Soft-DTW loss; loss mse is the MSE loss; w is the weight parameter; adding 1 after the loss is to make the calculated loss always positive, so as to facilitate the correct training of the model.
Citation Information
Cited By
Intelligent fire-fighting remote monitoring method based on Internet of Things platform
CN121011041A