A Hierarchical Personalized Federated Learning Method for Oilfield Production Prediction
Through a hierarchical personalized federal learning method, the combination of privacy protection and regularization terms is used to solve the problems of data scarcity and privacy leakage in oil field production forecasts, and efficient and accurate oil well production forecasts are achieved, which improves the stability and consistency of the model.
Patent Information
- Application Number
- CN202510644833.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing technology has the problem of limited single well data in oilfield production prediction, which leads to low model prediction accuracy. The traditional centralized training method faces high data transmission and storage costs and data privacy leakage risks, and the existing federated learning methods are difficult to take into account the needs of global generalization and local personalization.
The hierarchical personalized federated learning method is adopted to extract production structure characteristics through privacy-protected oil well clustering and dual-model federal optimization, using Mann-Kendall test and Theil-Sen estimation, encrypted using differential privacy technology, and regularization terms are introduced to update the local model, and personalized training is carried out in combination with hierarchical clustering and cluster proxy models.
It improves the accuracy and stability of oil well production prediction, avoids data privacy leakage, shortens model training time, achieves a global and personalized balance, and improves the prediction accuracy of single wells and prediction consistency between different wells.
Smart Images

Figure CN120163479B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of the integrated application of petroleum engineering and artificial intelligence, and in particular to a hierarchical personalized federated learning method for oilfield production prediction. Background Art
[0002] The prediction of oilfield production is a core link in the development and management of oil and gas fields, and is crucial for optimizing development strategies and improving oil production efficiency. At present, deep learning methods based on data-driven have been widely used in the field of production prediction. However, they rely on large-scale training data, and it is easy to lead to the problem of low prediction accuracy of the model when the production data of a single well is limited. The traditional centralized training method requires collecting the original data of each production unit, which not only faces high data transmission and storage costs, but also has the risk of data privacy leakage. To achieve collaborative modeling among oil wells without centrally sharing the original data, federated learning (FL) is introduced as an effective solution. In a typical federated learning framework (such as FedAvg), the global model is constructed by weighted averaging the local model parameters of each node.
[0003] However, in the scenario of oilfield production data, due to significant differences in geological conditions, operation modes, and production stages of different oil wells, the data of each node presents non-independent and identically distributed (Non-IID) characteristics, which will significantly affect the convergence speed and prediction accuracy of standard algorithms such as FedAvg. To alleviate the performance degradation problem caused by Non-IID data, improved algorithms based on proximal terms such as FedProx are proposed. By adding a regularization term to the local objective function, the deviation of the local model update from the global model is restricted, thereby improving the training stability. However, such methods still only rely on a single global model, and it is difficult to simultaneously consider the global generalization performance and the local personalized prediction requirements of each oil well. Moreover, they mainly focus on data heterogeneity in the statistical sense and fail to link data heterogeneity with geological differences, such as differences in reservoir reserves and structural characteristics, which actually dominate the production characteristics of different oil wells.
[0004] There is still a lack of a systematic solution in the prior art for combining hierarchical clustering and personalized model collaborative training in the scenario of oilfield production prediction. Therefore, there is a need for a federated learning method that can not only protect data privacy but also perform hierarchical clustering and personalized model training for the Non-IID characteristics of production data among oil wells to improve the accuracy and stability of production prediction. Summary of the Invention
[0005] In order to overcome the above problems existing in the prior art, the present invention proposes a hierarchical personalized federated learning method for oilfield production prediction.
[0006] The technical solution adopted by the present invention to solve its technical problems is: a hierarchical personalized federated learning method for oilfield production prediction, specifically including:
[0007] Step 1, privacy-preserving well clustering: Each well extracts production structure features from its private production data and encrypts the production structure features; the encrypted production structure features are uploaded to the server, and the server uses a hierarchical clustering algorithm to group wells with similar encrypted features.
[0008] Step 2, dual-model federated optimization: The server aggregates a global model for capturing cross-cluster common knowledge and multiple cluster proxy models at the same time; each well updates the local version of the global model by minimizing a regularized loss function.
[0009] Step 3, cluster adaptive prediction: For new wells that need to be predicted, they are assigned to the corresponding clusters according to their production structure features, and then the corresponding cluster proxy models are used to generate the production prediction results of these wells.
[0010] In the above-mentioned hierarchical personalized federated learning method for oilfield production prediction, the Mann-Kendall test and Theil-Sen estimation method are used in Step 1 to extract production patterns , and the production structure features of well k are expressed as:
[0011] ;
[0012] where is the cumulative production time, is the average production, is the standard deviation, is the coefficient of variation, is the skewness, is the kurtosis.
[0013] In the above-mentioned hierarchical personalized federated learning method for oilfield production prediction, differential privacy technology is used to encrypt the production structure features in Step 1. Specifically, Laplace noise is added to the production structure features:
[0014] ;
[0015] where represents Laplace noise with a scale parameter of , is the sensitivity, is the privacy budget; the trade-off between privacy protection and prediction efficiency is achieved by adjusting the privacy budget value.
[0016] The above hierarchical personalized federated learning method for oilfield production prediction, the specific steps of step 2 include:
[0017] The global optimization objective is:
[0018] ;
[0019] Among them, is the aggregation weight, satisfying ; Each oil well updates a local version of the global model by minimizing based on its local dataset ; is the learned model on the local dataset the expected loss; represents the loss function;
[0020] After rounds of local updates, each client sends its updated local global model to the server for aggregation:
[0021] ;
[0022] Among them, N represents the total number of oil wells; k is the oil well index;
[0023] The cluster proxy model is expressed as:
[0024] ;
[0025] Among them, K is the number of clusters;
[0026] After the aggregation is completed, the server distributes the global model and the corresponding cluster proxy model to each client for local training; a regularization term is introduced into the optimization objective of each oil well to penalize the deviation between it and the corresponding cluster proxy model.
[0027] The above hierarchical personalized federated learning method for oilfield production prediction, the specific introduction of the regularization term is: each oil well minimizes the modified objective function :
[0028] ;
[0029] Among them, is the weight coefficient, which determines the weight ratio of the regularization term in the objective function.
[0030] The above-mentioned hierarchical personalized federated learning method for oilfield production prediction, and the specific steps of step 3 are as follows: The new oil wells to be predicted extract their own production structure features based on the existing production data, encrypt them using the Laplace differential privacy mechanism, and upload them to the server. The server calculates the distance between the production structure features of the new oil wells and the production structure features of the existing cluster center points, selects the one with the smallest distance as the cluster to which the new production wells belong, and uses the corresponding cluster proxy model to predict the production of the new production wells.
[0031] The beneficial effects of the present invention are as follows. Compared with traditional data-centered training, it avoids the data collection cost. Since the data remains local, the present invention does not disclose data privacy information. Compared with benchmark federated learning algorithms such as FedAvg and FedProx, it improves the convergence speed of the prediction model training; it provides an accurate, privacy-protected, and distributed training platform that is not affected by data heterogeneity for various oil well production prediction models. The personalized prediction strategy not only improves the prediction accuracy at the individual oil well level, but also ensures the consistency of the prediction performance for different oil wells, promotes the fairness of model prediction, and can effectively balance the relationship between global generalization and local personalization, thereby capturing and adapting to the diverse production characteristics inherent in heterogeneous oil wells. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic diagram of the overall framework of the hierarchical personalized federated learning of the present invention;
[0033] Figure 2 is a schematic diagram comparing the convergence speeds of the present invention and existing federated learning algorithms;
[0034] Figure 3 are the verification results of different RNN models under the present invention and existing learning algorithms; among them, (a) is the verification result of LSTM under various federated learning algorithms; (b) is the verification result of GRU under various federated learning algorithms;
[0035] Figure 4 is a schematic diagram of the prediction results of different federated learning algorithms for test wells in the embodiments of the present invention; among them, (a) is the average value of the evaluation index on the data of 6 test wells, and (b) is the standard deviation of the evaluation index on the data of 6 test wells. DETAILED DESCRIPTION OF THE INVENTION
[0036] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] As Figure 1As shown, this embodiment discloses a hierarchical personalized federated learning method for oilfield production prediction. The federated learning algorithm in this embodiment is represented by HierPFL and adopts a client-server architecture, where each oil well serves as a client. Each client independently calculates the encrypted production structure features (PSF) and updates its local model through an optimization objective with regularization. The central server then clusters the clients based on the encrypted PSF and coordinates a dual aggregation process: including a global model that fuses cross-cluster knowledge and a cluster proxy model that captures personalized features within each cluster.
[0038] The technical solution of HierPFL is divided into three steps:
[0039] Step 1, privacy-preserving oil well clustering: Each client extracts the production structure features (PSF) from its private production data and encrypts these features using the Laplace differential privacy mechanism. Subsequently, the encrypted PSF is uploaded to the server. The server-side adopts a hierarchical clustering algorithm to group the oil wells with similar encrypted features.
[0040] Step 2, dual-model federated optimization: The server aggregates both a global model for capturing cross-cluster common knowledge and multiple cluster proxy models simultaneously. Each client updates the local version of the global model by minimizing a loss function with regularization, where the regularization term limits the deviation between the local model and the corresponding cluster proxy model.
[0041] Step 3, cluster-adaptive prediction: For a new oil well to be predicted, it is first assigned to the corresponding cluster according to its PSF, and then the corresponding cluster proxy model is used to generate the production prediction result for this oil well.
[0042] I. Privacy-preserving oil well clustering
[0043] Due to considerations of data security and collection costs, it is difficult to directly use the original production data for clustering. Therefore, first, the production structure features (PSF) are extracted from the production data of each oil well to ensure that these features can reflect both the statistical characteristics and production patterns of the data. Among them, the statistical features include: cumulative production time , average production , standard deviation , coefficient of variation , skewness and kurtosis etc. Considering the sparsity of oil well production data and the interference of data noise, the Mann-Kendall test and Theil-Sen estimation method are adopted in the present invention to extract the production pattern . Then the production structure features of oil well k can be expressed as:
[0044] ;
[0045] Since the PSF still contains the production data distribution information of each oil well, the client needs to encrypt the PSF locally before uploading it to the server. The present invention uses differential privacy technology to achieve a balance between privacy protection and computational efficiency. The specific implementation is as follows:
[0046] The client adds Laplace noise to the PSF:
[0047] ;
[0048] where represents Laplace noise with a scale parameter of , is the sensitivity, is the privacy budget. A smaller means a stronger privacy protection requirement, so a larger noise will be introduced, which may reduce the accuracy of the result. The present invention can achieve a trade-off between privacy protection and prediction performance by adjusting the value of .
[0049] After receiving the encrypted PSF, the server uses a hierarchical clustering method to group the oil wells. This process aims to identify the similarities between oil wells, thereby alleviating the impact of data heterogeneity on federated learning. The number of clusters needs to be consistent with the inherent characteristics of the production data and the training requirements of federated learning. The determination of the number of clusters in the present invention follows the following principles:
[0050] 1. Basic clustering principle: The similarity between oil wells within each cluster should be as large as possible; at the same time, there should be significant differences between oil wells in different clusters.
[0051] 2. Sample balance principle: Each cluster should contain an equal number of oil wells. This principle can prevent a serious skew in the number of cluster members, thereby reducing the risk of model training in federated learning being biased towards certain specific clusters.
[0052] 3. Expert knowledge principle: Based on the previous research on reservoir production patterns, the production rate can usually be divided into types such as violent decline, rapid decline, slow decline, stepwise decline, and fluctuation. This classification helps to make the clustering process consistent with the existing domain knowledge and improve the model's ability to capture relevant production behaviors.
[0053] II. Hierarchical personalized federated learning
[0054] The global optimization objective of federated learning (FL) is:
[0055] ;
[0056] where is the aggregation weight, satisfying . Each client updates a local version of the global model by minimizing based on its local dataset . is the learned model on the local dataset the expected loss:
[0057] ;
[0058] wherein represents the loss function
[0059] After rounds of local updates, each client sends its updated local global model to the server for aggregation:
[0060] .
[0061] After clustering the oil wells based on , it can be reasonably considered that the production data of the oil wells within the same cluster approximately satisfies the independent and identically distributed (IID) assumption. Therefore, aggregating the cluster proxy models for the oil wells within the same cluster can effectively solve the problem of prediction accuracy differences caused by data heterogeneity
[0062] The difference between this embodiment and the prior art is that: in addition to aggregating the global model, the server also aggregates multiple cluster proxy models:
[0063] ;
[0064] wherein is the number of clusters
[0065] After the aggregation is completed, the server distributes the global model and the corresponding cluster proxy models to each client for local training. However, the non-independent and identically distributed (non-IID) characteristics of the production data will exacerbate the differences after local model updates, thereby hindering model convergence and further reducing the overall performance. To prevent this divergence phenomenon, the present invention introduces a regularization term into the optimization objective of each client to penalize the deviation from the corresponding cluster proxy model
[0066] Specifically, each client no longer only minimizes the standard local loss , but approximately minimizes the modified objective function :
[0067] .
[0068] III. Adaptive Prediction for New Wells
[0069] The new production well extracts its own production structure features (PSF) based on the existing production data, encrypts them using the Laplace differential privacy mechanism, and uploads them to the server. The server calculates the distance between its PSF and the PSFs of the existing cluster centers, and selects the one with the minimum distance as the cluster to which the new production well belongs. Then, the corresponding cluster proxy model is used to predict the production of the new production well.
[0070] Based on the above method, in this embodiment, the production records of 172 oil wells distributed in 7 reservoir blocks (as shown in Table 1) are collected as the dataset. To evaluate the performance of HierPFL, 6 wells with the shortest cumulative production time are designated as the test wells. The remaining 166 wells have complete production history data for model training and performance evaluation.
[0071] Table 1 Summary of production data
[0072]
[0073] The training configuration is as follows: the learning rate is set to 0.01, the batch size is 128, 5 local training cycles are performed in each round of communication, and the global model is trained for 100 rounds in total. The Adam optimizer is used to promote the stable and efficient convergence of the model.
[0074] To simulate the deployment of the model on newly developed oil wells, the oil wells with the shortest cumulative production time are designated as the test set. The historical production data of the remaining oil wells is divided into a training set and a validation set according to a ratio of 8:2. Four widely used error metrics are adopted to evaluate the prediction performance of the model: mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and coefficient of determination ( ).
[0075] To evaluate the effectiveness of the proposed HierPFL framework, comparative experiments are conducted with two widely adopted federated learning benchmark methods: FedAvg and FedProx. In addition, to evaluate the stability of the framework, several recurrent neural network (RNN) architectures for time series prediction are implemented, including long short-term memory network (LSTM) and gated recurrent unit (GRU). These experiments help to comprehensively compare the advantages and disadvantages of the HierPFL framework in terms of performance with respect to traditional federated learning methods and different time series prediction models. The evaluation results are as Figure 3 shown. As can be seen from Figure 3 , HierPFL continuously outperforms FedAvg and FedProx in all model types. Especially when using the GRU model, the performance improvement of HierPFL is the most significant. Compared with FedProx, the RMSE is reduced by 7%, the MAE is reduced by 20%, and the is increased by 4%.
[0076] Evaluate the convergence effect of the federated learning algorithm of the present invention and FedAvg and FedProx. The evaluation results are as follows Figure 2 shown. Both HierPFL and FedProx show faster convergence rates than FedAvg and reach convergence at around the 20th round of training. This acceleration can be attributed to the regularization term in the local objective, which effectively reduces the local update bias caused by data heterogeneity. In addition, the convergence rate of HierPFL is slightly faster than that of FedProx, indicating that its clustering strategy further alleviates the negative impact of non-independent and identically distributed (Non-IID) data, thereby improving the overall training efficiency.
[0077] In addition, predict the oil wells in the test set. The obtained prediction results are as follows Figure 4 shown. As can be seen from Figure 4 , HierPFL consistently outperforms FedAvg and FedProx in almost all evaluation metrics. It is worth noting that HierPFL achieves the lowest standard deviation among all methods, highlighting its excellent robustness and stability. These results indicate that the personalized prediction strategy of HierPFL not only improves the prediction accuracy at the individual oil well level but also promotes fairness by ensuring consistent performance across different oil wells. In addition, the research results verify that HierPFL can effectively balance the relationship between global generalization and local personalization, thereby capturing and adapting to the diverse production characteristics inherent in heterogeneous oil wells.
[0078] The above embodiments are only exemplary embodiments of the present invention and are not used to limit the present invention. Those skilled in the art can make various modifications or equivalent replacements to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent replacements should also be regarded as falling within the protection scope of the present invention.
Claims
1. A hierarchical personalized federated learning method for oilfield production prediction, characterized in that, Specifically, it includes: Step 1, privacy-preserving oil well clustering: Each oil well extracts production structure features from its private production data and encrypts the production structure features; the encrypted production structure features are uploaded to the server, and the server uses the hierarchical clustering algorithm to group oil wells with similar encrypted features; Step 2, dual-model federated optimization: The server aggregates a global model for capturing cross-cluster common knowledge and multiple cluster proxy models at the same time; each oil well updates the local version of the global model by minimizing a regularized loss function; Step 3, cluster adaptive prediction: For a new oil well to be predicted, according to its production structure features, it is assigned to the corresponding cluster, and then the corresponding cluster proxy model is used to generate the production prediction result of the oil well; The specific content of Step 2 includes: The global optimization objective is: ; Among them, is the aggregation weight, satisfying ; Each oil well updates a local version of the global model by minimizing ; ; is the learned model on the local dataset the expected loss on; represents the loss function; After performing rounds of local updates, each client sends its updated local global model to the server for aggregation: ; where N represents the total number of oil wells; k is the oil well index; The cluster proxy model is expressed as: ; where K is the number of clusters; After aggregation, the server distributes the global model and the corresponding cluster proxy models to each client for local training; a regularization term is introduced into the optimization objective of each oil well to penalize the deviation between it and the corresponding cluster proxy model; The introduced regularization term is specifically: each oil well minimizes the modified objective function : ; Among them, is the weight coefficient, which determines the weight proportion of the regularization term in the objective function.
2. The hierarchical personalized federated learning method for oilfield production prediction according to claim 1, characterized in that In the above step 1, the Mann-Kendall test and Theil-Sen estimation method are used to extract the production mode , and the production structure characteristics of well k are expressed as: ; wherein, is the cumulative production time, is the average output, is the standard deviation, is the coefficient of variation, is the skewness, is the kurtosis.
3. A hierarchical personalized federated learning method for oilfield production prediction according to claim 1, characterized in that, In Step 1, the differential privacy technology is used to encrypt the production structure features. Specifically, Laplace noise is added to the production structure features: ; Among them, represents Laplace noise with a scale parameter of , is the sensitivity, is the privacy budget; the trade-off between privacy protection and prediction performance is achieved by adjusting the privacy budget value.
4. A hierarchical personalized federated learning method for oilfield production prediction according to claim 1, characterized in that The specific content of Step 3 includes: The new oil well to be predicted extracts its own production structure features based on the existing production data, encrypts them using the Laplace differential privacy mechanism and uploads them to the server. The server calculates the distance between its production structure features and the production structure features of the existing cluster center points, selects the one with the smallest distance as the cluster to which the new production well belongs, and uses the corresponding cluster proxy model to predict the production of the new production well.
Citation Information
Patent Citations
Personalized federal learning method and device with privacy protection and medium
CN117094382A
Integrated circuit core process modeling method and system based on personalized federal learning
CN120012693A