Drilling risk determination method, apparatus, and electronic device based on federated learning
By using federated learning to collaborate across different well areas, a global risk prediction model with strong generalization ability and high accuracy is constructed, which solves the problem of large risk prediction errors caused by data isolation during drilling operations and ensures the safety of drilling operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF PETROLEUM (BEIJING)
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-24
AI Technical Summary
During drilling operations, due to data isolation between different well areas, existing technologies struggle to effectively utilize sample data from multiple well areas to train risk prediction models with poor generalization, resulting in large drilling risk prediction errors and impacting construction safety.
By employing a federated learning approach, and under the premise of protecting data privacy, a global risk prediction model with strong generalization ability and high accuracy is constructed through collaboration between a central node server and node terminals in multiple well areas. This model is then adjusted based on information freshness and asynchronous updates, and used to detect drilling risks in each well area.
It enables the training of a high-precision global risk prediction model using multi-well area data while protecting data privacy. This model can accurately detect drilling risks and ensure drilling safety.
Smart Images

Figure CN121660030B_ABST
Abstract
Description
Technical Field
[0001] This manual belongs to the field of drilling construction technology, and in particular relates to drilling risk determination methods, devices and electronic equipment based on federated learning. Background Technology
[0002] During drilling operations, various complex drilling risks such as overflow, lost circulation, and stuck pipe are often encountered, which affect drilling safety.
[0003] Based on existing methods, due to environmental limitations or data privacy considerations, data is often isolated between different well areas, preventing direct exchange and transmission of important sample data. Therefore, most methods rely on sample data collected from a single well area to train risk prediction models for drilling risk forecasting. However, due to the complex and variable conditions during drilling operations, risk prediction models trained solely on sample data from a single well area often exhibit poor generalization ability, leading to frequent errors in drilling risk prediction.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This specification provides a method, apparatus, and electronic device for determining drilling risks based on federated learning. It can effectively utilize sample data from different oil and gas regions to train a global risk prediction model with strong generalization ability and high accuracy, while protecting the data privacy of relevant oil and gas regions. Based on this global risk prediction model, it can accurately detect and judge the drilling risks of relevant wells in each oil and gas region, ensuring the safety of oil and gas well drilling operations.
[0006] This specification provides a drilling risk determination method based on federated learning, applied to a first node terminal deployed in a first oil and gas region. The method includes:
[0007] The system acquires reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by performing preset federated learning based on preset joint training rules, using sample data from multiple different oil and gas regions to protect the privacy of oil and gas region data, and then performing preset asynchronous updates at preset time intervals based on information freshness.
[0008] The current global risk prediction model is matched and adjusted using reference data from drilled wells to obtain a current first risk prediction model that matches the current first oil and gas region.
[0009] The current first risk prediction model is used to process the associated data of the target well to obtain the target prediction results for the target well;
[0010] Based on the target prediction results, determine whether there is currently a drilling risk for the target well.
[0011] In one embodiment, the method further includes:
[0012] Receive joint training requests;
[0013] In response to the joint training request, sample data of the first oil and gas region is obtained;
[0014] Based on the preset joint training rules, construct the initial first prediction model;
[0015] Using sample data from the first oil and gas region, an initial prediction model is trained locally to obtain the corresponding first prediction model. Simultaneously, based on the sample data from the first oil and gas region and the first prediction model, model auxiliary data for the first prediction model is determined. The model auxiliary data includes at least: statistical results of the distribution characteristics of the sample data from the first oil and gas region, the collection time of the sample data from the first oil and gas region, the training completion time of the first prediction model, and the contribution parameters of the sample data from the first oil and gas region to the first prediction model.
[0016] According to the preset joint training rules, the model parameters and model auxiliary data of the first prediction model are respectively encrypted to obtain the encrypted data of the model parameters and the encrypted data of the model auxiliary data of the first prediction model.
[0017] The encrypted data of the model parameters and the encrypted data of the model auxiliary data of the first prediction model are sent to the central node server; wherein, the central node server receives the encrypted data of the model parameters and the encrypted data of the model auxiliary data of multiple prediction models based on different oil and gas regions uploaded by node terminals in different oil and gas regions; the central node server also obtains a global risk prediction model by dynamically weighting and aggregating the encrypted data of the model parameters and the encrypted data of the model auxiliary data of multiple prediction models in the encrypted state according to the preset joint training rules and based on the reinforcement learning framework.
[0018] Receive the global risk prediction model issued by the central node server.
[0019] In one embodiment, constructing an initial first prediction model according to a preset joint training rule includes:
[0020] Based on the preset joint training rules, the initial first prediction model is constructed using the Tiny-LSTM structure.
[0021] In one embodiment, the central node server, based on a reinforcement learning framework and according to preset joint training rules, dynamically weights and aggregates the encrypted data of model parameters and model auxiliary data of multiple prediction models in the encrypted state:
[0022] According to the preset joint training rules, the encrypted data of the model auxiliary data is decrypted to obtain the model auxiliary data.
[0023] Based on the model-aided data, the characteristic distribution statistics of sample data from multiple oil and gas regions are extracted, as well as the contribution parameters of sample data from multiple oil and gas regions to the prediction model.
[0024] Based on the encrypted data of the model parameters of multiple prediction models, the encrypted data of the gradient parameters of the prediction models for multiple oil and gas regions are determined.
[0025] By utilizing the statistical results of the characteristic distribution of sample data from multiple oil and gas regions, and by clustering the contribution parameters of the sample data from multiple oil and gas regions to the prediction model, multiple oil and gas region groups are divided; each oil and gas region group corresponds to a training condition type.
[0026] According to the preset joint training rules, based on the reinforcement learning framework, the agent performs local weighted aggregation of the encrypted data of the model parameters of the prediction models of different oil and gas regions in each oil and gas region group, and obtains the encrypted data of the model parameters of multiple local prediction models corresponding to multiple oil and gas region groups respectively.
[0027] Based on the encrypted data of model parameters of multiple local prediction models, as well as the encrypted data of model parameters and gradient parameters of prediction models of different oil and gas regions in the corresponding oil and gas region group, the variation characteristics of model parameters of multiple local prediction models are determined.
[0028] Based on the preset joint training rules and the reinforcement learning framework, the agent performs global weighted aggregation based on the variation characteristics of the model parameters of each local prediction model and the encrypted data of the model parameters of multiple local prediction models to obtain the corresponding global risk prediction model.
[0029] In one embodiment, the method further includes:
[0030] The system receives an update request for the second time period initiated by the central node server. The central node server acquires and calculates the information freshness of the update data of each node terminal based on the update data provided by each node terminal at a preset time interval after the first time period. Based on the information freshness, the central node server determines the node terminal that meets the update triggering condition for the second time period and sends the corresponding update request for the second time period to that node terminal.
[0031] In response to the update request of the second time period, according to the preset joint training rules, the newly added sample data of the first oil and gas region in the second time period is obtained;
[0032] According to the preset joint training rules, the global risk prediction model for the first time period is trained locally using the newly added sample data of the first oil and gas region in the second time period to obtain the first updated model for the second time period; at the same time, the updated model auxiliary data for the first updated model in the second time period is obtained; wherein, the updated model auxiliary data carries at least the relevant timestamp information.
[0033] The encrypted data of the model parameters of the first updated model in the second time period and the encrypted data of the updated model auxiliary data are sent to the central node server as update data; wherein, the central node server asynchronously updates the global risk prediction model of the first time period based on the received encrypted data of the model parameters of the updated model in the second time period and the encrypted data of the updated model auxiliary data, to obtain the global risk prediction model of the second time period.
[0034] Receive the global risk prediction model for the second time period issued by the central node server.
[0035] In one embodiment, the central node server calculates the information freshness of the updated data from the first node terminal in the following manner:
[0036] Based on the updated data from the first node terminal, obtain the relevant timestamp information;
[0037] Obtain the communication network parameters and / or processing resource parameters of the first node terminal for the second time period;
[0038] Based on the relevant timestamp information, and the communication network parameters and / or processing resource parameters of the first node terminal in the second time period, the information freshness of the updated data of the first node terminal is determined.
[0039] In one embodiment, if the central node server does not receive updated data uploaded by the first node terminal within a preset waiting period, the method further includes:
[0040] The central node server obtains the update data provided by the first node terminal at the nearest time point and uses it as the pseudo update data for the first time period of the first node terminal; and adjusts the weight parameters of the first oil and gas region to which the first node terminal belongs in the reinforcement learning framework to obtain the adjusted reinforcement learning framework.
[0041] Based on the adjusted reinforcement learning framework, the central node server asynchronously updates the global risk prediction model for the first time period using pseudo-update data from the first node terminal in the first time period and update data from the second time period uploaded by other node terminals, thus obtaining the global risk prediction model for the second time period.
[0042] In one embodiment, the step of performing matching encryption processing on the model parameters of the first prediction model according to preset joint training rules includes:
[0043] Determine the sample data corresponding to the model parameters of the first prediction model;
[0044] The importance and frequency of change of the sample data, as well as the computing power and / or bandwidth resource parameters of the first node terminal;
[0045] Based on the importance and frequency of change of the sample data, as well as the computing power and / or bandwidth resource parameters of the first node terminal, the encryption level of the model parameters of the first prediction model corresponding to the sample data is determined.
[0046] Based on the encryption level of the model parameters of the first prediction model corresponding to the sample data, the model parameters of the first prediction model are encrypted in a matching manner.
[0047] In one embodiment, the reinforcement learning framework also integrates a feature mapping and alignment network to map the encrypted data of model parameters of multiple prediction models in different oil and gas regions to the same shared feature space and perform semantic alignment processing.
[0048] This specification also provides a drilling risk determination device based on federated learning, applied to a first node terminal, which is deployed in a first oil and gas region. The device includes:
[0049] The acquisition module is used to acquire reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by using sample data from multiple different oil and gas regions to perform preset federated learning based on the privacy protection of oil and gas region data, and asynchronously updating the model based on the information freshness of the current time period, according to preset joint training rules.
[0050] The adjustment module is used to match and adjust the current global risk prediction model using reference data from drilled wells, so as to obtain the current first risk prediction model that matches the current first oil and gas region.
[0051] The processing module is used to process the associated data of the target well using the current first risk prediction model to obtain the target prediction results for the target well;
[0052] The determination module is used to determine whether there is a drilling risk in the target well based on the target prediction results.
[0053] Based on the federated learning-based drilling risk determination method, apparatus, and electronic equipment provided in this specification, before specific implementation, multiple node terminals deployed in multiple different oil and gas regions and a central node server can collaboratively conduct pre-set federated learning based on oil and gas region data privacy protection, according to preset joint training rules, provided that the sample data does not leave the local oil and gas region. Pre-set asynchronous updates are performed at preset time intervals based on information freshness to obtain a global risk prediction model that meets the requirements and has strong generalization capabilities. In specific implementation, for the first node terminal in the first oil and gas region, reference data of drilled wells, associated data of target wells, and the current global risk prediction model can be obtained firstly. The reference data of drilled wells is then used to match and adjust the current global risk prediction model to obtain a current first risk prediction model that matches the current first oil and gas region. The current first risk prediction model is then used to process the associated data of the target well to obtain the target prediction result for the target well. Based on the target prediction result, it is determined whether the target well currently has drilling risk. This allows it to be well adapted to complex operating scenarios that require data privacy protection in oil and gas regions. Under the premise of protecting the data privacy of relevant oil and gas regions, it can effectively unite different node terminals to train a global risk prediction model with strong generalization ability and high accuracy using sample data from different oil and gas regions. Then, the node terminals in each oil and gas region can accurately detect and judge the drilling risks of relevant wells in their respective oil and gas regions based on this global risk prediction model, ensuring the drilling safety of oil and gas wells in that region. Attached Figure Description
[0054] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart illustrating a federated learning-based drilling risk determination method provided in one embodiment of this specification.
[0056] Figure 2 This is a schematic diagram illustrating an embodiment of the federated learning-based drilling risk determination method provided in this specification, applied in a scenario example.
[0057] Figure 3 This is a schematic diagram illustrating an embodiment of the federated learning-based drilling risk determination method provided in this specification, applied in a scenario example.
[0058] Figure 4 This is a schematic diagram illustrating an embodiment of the federated learning-based drilling risk determination method provided in this specification, applied in a scenario example.
[0059] Figure 5 This is a schematic diagram illustrating an embodiment of the federated learning-based drilling risk determination method provided in this specification, applied in a scenario example.
[0060] Figure 6 This is a schematic diagram illustrating an embodiment of the federated learning-based drilling risk determination method provided in this specification, applied in a scenario example.
[0061] Figure 7 This is a schematic diagram of the structural composition of an electronic device provided in one embodiment of this specification;
[0062] Figure 8 This is a schematic diagram of the structural composition of a drilling risk determination device based on federated learning, provided in one embodiment of this specification.
[0063] Figure 9 This is a schematic diagram illustrating one embodiment of the federated learning-based drilling risk determination method provided in the embodiments of this specification, applied in a scenario example. Detailed Implementation
[0064] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0065] It should be noted that the information and data related to users involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by the relevant parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, and necessary confidentiality measures have been taken. They do not violate public order and good morals, and corresponding operation entry points are provided for users or relevant parties to choose to authorize or refuse.
[0066] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.
[0067] See Figure 1 As shown in the embodiments of this specification, a drilling risk determination method based on federated learning is provided. In specific implementation, this method may include the following:
[0068] S101: Obtain reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period; wherein, the current global risk prediction model is a model obtained by performing preset federated learning based on preset joint training rules, using sample data from multiple different oil and gas regions to protect the privacy of oil and gas region data, and performing preset asynchronous updates at preset time intervals based on information freshness.
[0069] S102: Use reference data from drilled wells to match and adjust the current global risk prediction model to obtain a current first risk prediction model that matches the current first oil and gas region;
[0070] S103: Use the current first risk prediction model to process the correlation data of the target well and obtain the target prediction results for the target well;
[0071] S104: Based on the target prediction results, determine whether there is a drilling risk in the target well.
[0072] The aforementioned "first oil and gas region" can be specifically understood as the oil and gas region of current interest. The aforementioned "target well" can be specifically understood as the oil and gas well in the first oil and gas region for which drilling risks are currently being monitored.
[0073] The aforementioned first-node terminal can be understood as a terminal device deployed locally in the first oil and gas region, used to collect and process relevant data from the first oil and gas region, and to perform drilling risk detection for the first oil and gas region. (See also...) Figure 2 As shown.
[0074] Specifically, the aforementioned terminal devices can be front-end devices capable of data acquisition, data transmission, and other functions. Specifically, the first node terminal can be, for example, an electronic device such as a desktop computer, tablet computer, laptop computer, or edge gateway.
[0075] The aforementioned first-node terminal is also connected to the central node server via wired or wireless means.
[0076] Specifically, the aforementioned central node server can be a backend server applied to a data center or cloud service platform, capable of data transmission, data processing, and other functions. Specifically, the central node server can be, for example, an electronic device with data computing, storage, and network interaction capabilities. Alternatively, the central node server can also be a software program running on the electronic device, providing support for data processing, storage, and network interaction. In this embodiment, the number of servers is not specifically limited. The central node server can be a single server, several servers, or a server cluster formed by several servers.
[0077] For details, please refer to [link / reference]. Figure 2 As shown, in addition to processing the first node terminal of the first oil and gas region, the aforementioned central node server is also connected to multiple different node terminals in different oil and gas regions, such as the second node terminal of the first oil and gas region and the third node terminal of the third oil and gas region.
[0078] It should be noted that the aforementioned different oil and gas regions can be understood as different oil and gas fields, drilling platforms, or drilling companies scattered across different areas. Each oil and gas region accumulates sample data related to drilling in that region. However, due to data privacy protection requirements or other reasons, data isolation exists between different oil and gas regions, making it impossible to directly exchange and transmit sample data between them.
[0079] The reference data for the drilled wells mentioned above may specifically include: drilling records of the drilled wells, logging data of the drilled wells, operating information of the drilled wells, and related data of the drilled wells.
[0080] The aforementioned associated data may specifically include at least one of the following: engineering parameters, logging data, equipment parameters, etc. Specifically, the aforementioned engineering parameters may include one or more of the following: drilling rate, pump pressure, drilling pressure, torque, hook load, outlet flow rate, total pool volume, inlet flow rate, outlet density, inlet density, etc. The aforementioned logging data may specifically include one or more of the following: sonic logging parameters, resistivity logging parameters, gamma logging parameters, etc. The aforementioned equipment parameters may specifically include one or more of the following: equipment power, equipment energy consumption, computing power information, bandwidth information, etc. It should be noted that the associated data listed above is only illustrative. In actual implementation, depending on the specific circumstances and processing requirements, the aforementioned associated data may also include other types of parameter data. This specification does not limit this.
[0081] The aforementioned global risk prediction model can be understood as a model jointly trained by a central node server and multiple node terminals based on preset joint training rules. Under the premise of protecting the data privacy of oil and gas regions, it makes full use of sample data from different oil and gas regions and comprehensively utilizes federated learning and reinforcement learning to obtain an algorithm model for predicting drilling risks based on correlated data.
[0082] Specifically, the aforementioned pre-defined joint training rules can be understood as data processing rules based on federated learning, while also incorporating reinforcement learning, encryption algorithms, and other techniques. The federated learning specifically includes: Personalized Federated Learning (FL) and / or Clustered Federated Learning (FL). The reinforcement learning specifically includes: Deep Reinforcement Learning (DRL).
[0083] Furthermore, after obtaining the global risk prediction model, according to the preset joint training rules, the central server node also acquires and, based on the freshness of the information, collaborates with the node terminals in the corresponding oil and gas areas to asynchronously update the global risk prediction model at each preset time period, so that the model can continuously learn and master the knowledge of newly emerging working conditions and continuously improve the model accuracy.
[0084] The aforementioned drilling risks may specifically include at least one of the following: overflow risk, lost circulation risk, stuck pipe risk, wellbore collapse risk, etc.
[0085] In practice, when it is necessary to predict whether there is a drilling risk in the target well of the first oil and gas area, the relevant data of the target well in the current time period (e.g., the most recent week) can be obtained first, and the reference data of the drilled wells in the first oil and gas area in the current time period can be obtained at the same time.
[0086] Based on the reference data from the drilled wells, a migration sample is extracted that reflects the latest changes in operating conditions in the first oil and gas region during the current time period. Then, this migration sample is used to perform transfer learning on the current global risk prediction model (i.e., the latest global risk prediction model issued by the central server node) to achieve matching and adjustment of the current global risk prediction model, thereby obtaining the current first risk prediction model that is suitable for the latest changes in operating conditions in the first oil and gas region.
[0087] The current first risk prediction model is then used to process the associated data of the target well to obtain the target prediction result; based on the target prediction result, it is determined whether there is a drilling risk for the target well.
[0088] In practice, if it is determined that there is a drilling risk in the target well, the type of drilling risk can be determined based on the target prediction results; then, based on the type of drilling risk, a corresponding drilling risk warning message can be generated; and the drilling risk warning message can be sent to the construction personnel.
[0089] Furthermore, after generating the corresponding drilling risk warning information, it is not possible to determine the matching risk elimination strategy based on the type of drilling risk; and then send the risk elimination strategy along with the drilling risk warning information to the construction personnel.
[0090] Based on the above embodiments, by acquiring and matching the reference data of drilled wells in the first oil and gas region on the basis of the current global risk prediction model, a current first risk prediction model adapted to the current first oil and gas region can be obtained. Then, the current first risk prediction model can be used to process the associated data of target wells in the current time period in a targeted manner to accurately detect and judge the drilling risks of related wells in each oil and gas region, so as to ensure the drilling safety of oil and gas wells.
[0091] In some embodiments, see Figure 3 As shown, in specific implementations, the method may also include the following:
[0092] S3-1: Receive joint training requests;
[0093] S3-2: In response to the joint training request, obtain sample data of the first oil and gas region;
[0094] S3-3: Construct the initial first prediction model according to the preset joint training rules;
[0095] S3-4: Using sample data from the first oil and gas region, train an initial prediction model locally to obtain a corresponding first prediction model; simultaneously, based on the sample data from the first oil and gas region and the first prediction model, determine model auxiliary data for the first prediction model; wherein, the model auxiliary data includes at least: statistical results of the distribution of characteristics of the sample data from the first oil and gas region, the collection time of the sample data from the first oil and gas region, the training completion time of the first prediction model, and the contribution parameters of the sample data from the first oil and gas region to the first prediction model;
[0096] S3-5: According to the preset joint training rules, the model parameters and model auxiliary data of the first prediction model are encrypted in a matching manner to obtain the encrypted data of the model parameters and the encrypted data of the model auxiliary data of the first prediction model.
[0097] S3-6: Send the encrypted data of the model parameters and the encrypted data of the model auxiliary data of the first prediction model to the central node server; wherein, the central node server receives the encrypted data of the model parameters and the encrypted data of the model auxiliary data of multiple prediction models based on different oil and gas regions uploaded by node terminals in different oil and gas regions; the central node server also, according to the preset joint training rules, based on the reinforcement learning framework, uses the encrypted data of the model parameters and the encrypted data of the model auxiliary data of multiple prediction models to dynamically weight and aggregate the multiple prediction models in the encrypted state to obtain a global risk prediction model;
[0098] S3-7: Receive the global risk prediction model issued by the central node server.
[0099] Specifically, the aforementioned model auxiliary data can be understood as parameter data used to characterize the influence of sample data from the first oil and gas region on the first prediction model trained at the first node terminal.
[0100] Here, by constructing and introducing model-aided data, on the one hand, the data characteristics of the sample data of the first oil and gas region can be characterized more accurately and specifically to influence the effect of the first prediction model; on the other hand, the direct appearance and use of the sample data of the first oil and gas region can be avoided, thus better protecting the data privacy and security of the first oil and gas region.
[0101] The aforementioned model-aided data may carry a first timestamp and a second timestamp. The first timestamp is used to indicate the time of collection of sample data from the first oil and gas region used to train the first prediction model, and the second timestamp is used to indicate the time when the training of the first prediction model is completed.
[0102] The aforementioned model-aided data may further include: construction process parameters of the first oil and gas pipeline, and other relevant information.
[0103] The aforementioned characteristics may specifically include at least one of the following: geological characteristics, working condition characteristics, construction technology characteristics, construction equipment characteristics, etc.
[0104] In practice, during the initial training of the prediction model using sample data from the first oil and gas region, the sample data used in each training round and the corresponding model loss function value can be recorded to obtain a model training record. After the first prediction model is trained, based on the model training record, for each training round, the sample data and model loss function value in that round, as well as the sample data and model loss function values in the preceding and following rounds (a specified number of rounds adjacent to that round), are used to calculate the difference in sample data between adjacent rounds and the corresponding difference in model loss function values. Based on these differences, a local difference mapping relationship between the local sample data difference and the model loss function value difference for that round of training is constructed. Based on the local difference mapping relationship across multiple training rounds, statistical learning is used to determine the contribution parameter of the sample data from the first oil and gas region to the first prediction model.
[0105] In practice, feature extraction can be performed first based on the sample data of the first oil and gas region to obtain the required situation features; then, based on the situation features, the statistical results of the situation feature distribution of the sample data of the first oil and gas region can be determined through data statistics.
[0106] In practice, the model parameters and auxiliary data of the first prediction model can be encrypted according to the preset joint training rules to obtain the encrypted data of the model parameters and the encrypted data of the auxiliary data of the first prediction model. Then, the encrypted data of the model parameters and the encrypted data of the auxiliary data of the first prediction model are associated and sent to the central node server.
[0107] Specifically, based on preset joint training rules, homomorphic encryption and / or differential privacy rules can be used to perform first-type encryption on the model parameters of the first prediction model. This allows the subsequent central node server to use the model parameters of the first prediction model in encrypted form, and combine them with the model parameters of other prediction models provided by other node terminals for federated learning. At the same time, it can also prevent the leakage of the prediction model during federated learning, thus avoiding the derivation of data information of oil and gas areas associated with the prediction model.
[0108] Simultaneously, based on preset joint training rules, the private key held by the first node terminal can be used to encrypt the model auxiliary data, obtaining the corresponding encrypted model auxiliary data. The central node server also holds the public keys provided by each node terminal. In this way, without directly providing the sample data of the first oil and gas region to the central node server, the central node server can understand the relevant information of the sample data of the first oil and gas region during model training from a holistic perspective based on the model auxiliary data. Therefore, without disclosing the sample data of the oil and gas region, the central node server can dynamically weight and aggregate different prediction models for different oil and gas regions based on the aforementioned relevant information.
[0109] Correspondingly, the central node server can receive encrypted data of model parameters and model auxiliary data of multiple prediction models based on different oil and gas regions, uploaded by multiple node terminals from different oil and gas regions. Then, according to preset joint training rules, based on a reinforcement learning framework, the encrypted data of model parameters and model auxiliary data of multiple prediction models are used to dynamically weight and aggregate the multiple prediction models in encrypted state through a reinforcement learning agent to obtain a global risk prediction model that meets the requirements. The reinforcement learning framework is at least deployed with an agent. The global risk prediction model is then distributed to each node terminal. The node terminal can use the global risk prediction model to locally detect and determine whether there is drilling risk in relevant wells in its oil and gas region.
[0110] Based on the above embodiments, for node terminals, a prediction model can be trained locally using sample data; and based on the sample data, model auxiliary data associated with the prediction model can be determined through data statistics; then, the encrypted data of the prediction model's parameters and the encrypted data of the model auxiliary data are uploaded to the central node server. This effectively reduces data transmission volume and bandwidth usage, improving overall transmission efficiency; furthermore, it ensures that the sample data never leaves the local area, effectively protecting the data privacy and security of the oil and gas region.
[0111] In some embodiments, constructing an initial first prediction model according to a preset joint training rule may specifically include:
[0112] Based on the preset joint training rules, the initial first prediction model is constructed using the Tiny-LSTM structure.
[0113] Tiny-LSTM can be understood as a lightweight Long Short-Term Memory (LSTM) network structure. Based on this model structure, through model compression and optimization, it is possible to reduce the consumption of computing resources while maintaining high model prediction accuracy.
[0114] In practice, depending on the specific circumstances, lightweight architectures such as MobileNet can be chosen to build the initial prediction model. MobileNet can be understood as a lightweight convolutional neural network that significantly reduces computational cost and parameter count through depthwise separable convolution techniques, supporting various tasks such as classification, detection, and segmentation.
[0115] Based on the above embodiments, by choosing to use a lightweight structure to construct the initial first prediction model, the data processing burden during the training of the first node terminal model can be effectively reduced, and the local model training time can be effectively shortened while taking into account the model prediction accuracy.
[0116] In some embodiments, see Figure 4 As shown, the central node server can specifically perform dynamic weighted aggregation of the multiple prediction models in the encrypted state according to the following method based on the preset joint training rules and the reinforcement learning framework, using the encrypted data of the model parameters and model auxiliary data of multiple prediction models:
[0117] S4-1: According to the preset joint training rules, the encrypted data of the model auxiliary data is decrypted to obtain the model auxiliary data;
[0118] S4-2: Based on the model-aided data, extract the characteristic distribution statistics of sample data from multiple oil and gas regions, as well as the contribution parameters of sample data from multiple oil and gas regions to the prediction model;
[0119] S4-3: Based on the encrypted data of the model parameters of multiple prediction models, determine the encrypted data of the gradient parameters of the prediction models for multiple oil and gas regions.
[0120] S4-4: By utilizing the statistical results of the characteristic distribution of sample data from multiple oil and gas regions, and clustering the contribution parameters of the sample data from multiple oil and gas regions to the prediction model, multiple oil and gas region groups are divided; each oil and gas region group corresponds to a training condition type.
[0121] S4-5: According to the preset joint training rules, based on the reinforcement learning framework, the agent performs local weighted aggregation of the encrypted data of the model parameters of the prediction models of different oil and gas regions in each oil and gas region group to obtain the encrypted data of the model parameters of multiple local prediction models corresponding to multiple oil and gas region groups respectively.
[0122] S4-6: Based on the encrypted data of the model parameters of multiple local prediction models, as well as the encrypted data of the model parameters of the prediction models of different oil and gas regions in the corresponding oil and gas region group and the encrypted data of the gradient parameters of the prediction models, the variation characteristics of the model parameters of multiple local prediction models are determined.
[0123] S4-7: Based on the preset joint training rules and the reinforcement learning framework, the agent performs global weighted aggregation based on the change characteristics of the model parameters of each local prediction model and the encrypted data of the model parameters of multiple local prediction models to obtain the corresponding global risk prediction model.
[0124] The model parameters of the prediction model include at least the network parameters and gradient parameters of the prediction model.
[0125] In practice, after receiving the encrypted model parameters of prediction models for multiple oil and gas regions, as well as the encrypted model auxiliary data, the central node server can first perform clustering based on the statistical results of the characteristic distribution of sample data from multiple oil and gas regions and the contribution parameters of sample data from multiple oil and gas regions to the prediction models. This clustering process considers both the overall characteristics of the oil and gas regions and the overall contribution of sample data to the model during training. The encrypted model parameters of prediction models belonging to the same training condition type are grouped together, resulting in multiple oil and gas region groups. Each oil and gas region group corresponds to a training condition type and contains the encrypted model parameters of prediction models for multiple oil and gas regions within that corresponding training condition type.
[0126] After clustering is completed as described above to obtain multiple oil and gas region groups, the central node server can, for each oil and gas region group, determine the key elements of model training for the corresponding training status type using an agent based on a reinforcement learning framework and pre-defined joint training rules. Then, based on these key elements and model auxiliary data associated with the encrypted data of the prediction model's parameters, the server calculates the local weight coefficients of the encrypted data of the prediction model's parameters in that oil and gas region group. Based on these local weight coefficients, the encrypted data of the model parameters of multiple prediction models in that oil and gas region group is locally weighted and aggregated in the encrypted state to obtain the encrypted data of the model parameters of the corresponding local prediction model, thus achieving local aggregation. The encrypted data of the model parameters of the local prediction model corresponds to a training status type.
[0127] Furthermore, the central node server can, according to preset continuous training rules and based on a reinforcement learning framework, utilize the encrypted data of the parameters of each local prediction model to acquire and utilize the encrypted data of the model parameters of multiple prediction models for the corresponding oil and gas region, as well as the encrypted data of the gradient parameters of the prediction models. In the encrypted state, by analyzing the changing trends of the model parameters during model training, the server can determine the changing characteristics of the model parameters of each local prediction model. Then, according to preset joint training rules and based on a reinforcement learning framework, the server can utilize the agent to consider the changing characteristics of the model parameters of each local prediction model from the perspective of overall model aggregation, taking into account the role and influence of different local prediction models on the convergence of global model training, and determine the global weight coefficients for the encrypted data of the model parameters of each local prediction model. Finally, based on the global weight coefficients, the encrypted data of the model parameters of multiple local prediction models are dynamically weighted and aggregated to obtain the corresponding global risk prediction model, thus achieving global aggregation.
[0128] Based on the above embodiments, by following preset training rules and using a reinforcement learning framework, the agent first performs local aggregation on the encrypted data of model parameters of multiple prediction models, and then performs global aggregation, thereby efficiently aggregating a global risk prediction model with high fusion and good performance.
[0129] In some embodiments, the sample data collected and used in different oil and gas regions may vary significantly in terms of specifications, patterns, etc. (e.g., units, precision, collection frequency, etc.). This can lead to corresponding biases in the prediction models directly trained based on sample data from different oil and gas regions, affecting the accuracy of subsequent aggregation. To specifically eliminate the biases introduced by the differences in sample data between the prediction models, in specific implementations, the reinforcement learning framework may also integrate a feature mapping and alignment network. This network maps the encrypted data of the model parameters of multiple prediction models from different oil and gas regions to the same shared feature space and performs semantic alignment processing.
[0130] Specifically, the Feature Alignment Network can be understood as a network structure that integrates and unifies the encrypted data of model parameters of different models by pre-training multiple sets of different test data with encrypted state, mapping the encrypted data of model parameters of different models trained with sample data of different specifications and patterns obtained in different ways to the same shared feature space, and performing semantic alignment processing.
[0131] Furthermore, the reinforcement learning framework described above can also integrate federated representation learning and / or adaptive embedding layers based on federated learning; and the federated representation learning and / or adaptive embedding layers are connected to a feature mapping and alignment network.
[0132] In specific implementation, before using an agent to perform local weighted aggregation of the encrypted data of the model parameters of the prediction models of different oil and gas regions in each oil and gas region group based on the reinforcement learning framework, a feature mapping and alignment network, combined with a federated learning representation layer and / or an adaptive embedding layer, can be used to preprocess the encrypted data of the model parameters of multiple prediction models in different oil and gas regions. This includes: firstly, using the feature mapping and alignment network alone to map the encrypted data of the model parameters of multiple prediction models in different oil and gas regions to the same shared feature space; and then, using the federated learning representation layer and / or the adaptive embedding layer together to perform semantic alignment processing on the encrypted data of the model parameters of multiple prediction models in the shared feature space. This allows for the unification of prediction models for different oil and gas regions at the model level without modifying the original sample data, avoiding deviations between prediction models caused by sample data that affect the accuracy of subsequent model aggregation, and further improving the model accuracy of the final global risk prediction model, effectively reducing model errors.
[0133] In some embodiments, see Figure 5 As shown, in specific implementations, the method may also include the following:
[0134] S5-1: Receive the update request for the second time period initiated by the central node server; wherein, after the first time period, the central node server acquires and calculates the information freshness of the update data of each node terminal based on the update data provided by each node terminal at the previous adjacent time point after a preset time interval; and determines the node terminal that meets the update trigger condition of the second time period based on the information freshness, and sends the corresponding update request for the second time period to the node terminal.
[0135] S5-2: In response to the update request of the second time period, obtain the new sample data of the first oil and gas region in the second time period according to the preset joint training rules;
[0136] S5-3: According to the preset joint training rules, using the newly added sample data of the first oil and gas region in the second time period, train the global risk prediction model of the first time period locally to obtain the first updated model of the second time period; at the same time, obtain the update model auxiliary data of the first updated model in the second time period; wherein, the update model auxiliary data carries at least the relevant timestamp information.
[0137] S5-4: Send the encrypted data of the model parameters of the first updated model in the second time period and the encrypted data of the updated model auxiliary data as update data to the central node server; wherein, the central node server asynchronously updates the global risk prediction model of the first time period based on the received encrypted data of the model parameters of the updated model in the second time period and the encrypted data of the updated model auxiliary data to obtain the global risk prediction model of the second time period.
[0138] S5-5: Receives the global risk prediction model for the second time period issued by the central node server.
[0139] Specifically, the first time period can be understood as any preceding time period. The second time period can be understood as a time period following the first time period, with a preset time interval.
[0140] The aforementioned nearest time point can be specifically understood as the time point before the second time period when the node terminal most recently provided updated data.
[0141] The aforementioned timestamp information includes at least: a timestamp indicating the completion time of the first updated model training, and a timestamp indicating the collection time of new sample data in the first oil and gas region during the second time period.
[0142] The aforementioned Age of Information (AoI) can be understood as a parameter used to characterize the timeliness of model data (including the encrypted data of the prediction model and subsequent update data of the prediction model) for the global risk prediction model of oil and gas regions.
[0143] In practice, after distributing the global risk prediction model, the central node server can calculate the freshness of the most recent model data of each node terminal (or each oil and gas region) relative to the current global risk prediction model at preset time intervals (e.g., every week). Based on the freshness, it identifies the node terminals that meet the update trigger conditions and sends an update request to those node terminals to obtain their latest updated data. Simultaneously, it can also receive update data proactively uploaded by other node terminals that do not meet the update trigger conditions. Therefore, without needing to simultaneously obtain update data from all oil and gas regions, the acquired update data can be used to asynchronously update the current global risk prediction model in encrypted form. This effectively distinguishes the specific scenarios of different oil and gas regions, enabling reasonable and efficient online updates of the global risk prediction model to continuously improve model accuracy and precision.
[0144] In practice, after the central node server completes the asynchronous update for the first time period, after a preset time interval, it can acquire and calculate the information freshness of the update data provided by each node terminal at a nearby time point (e.g., the most recent time point). Then, based on the information freshness, it determines the node terminals that meet the update triggering conditions for the second time period. The second time period can be understood as a time period that occurs after the first time period and is separated from the first time period by a preset time interval.
[0145] In some embodiments, the central node server may calculate the information freshness of the updated data of the first node terminal in the following manner:
[0146] S1: Obtain relevant timestamp information based on the updated data from the first node terminal;
[0147] S2: Obtain the communication network parameters and / or processing resource parameters of the first node terminal for the second time period;
[0148] S3: Determine the freshness of the updated data of the first node terminal based on the relevant timestamp information and the communication network parameters and / or processing resource parameters of the second time period of the first node terminal.
[0149] Specifically, the aforementioned communication network parameters may include information such as the health, bandwidth, and stability of the communication network of the first node terminal. The aforementioned processing resource parameters may specifically include information such as the remaining computing power resources of the first node terminal, the computing power resources currently in use, and the reliability of the computing power resources.
[0150] In practice, the training completion time of the model updated in the latest update data provided by the first node terminal at the nearest neighbor time point can be determined based on relevant timestamp information, as well as the sample collection time of the newly added sample data used to train the updated model; at the same time, the model reception time of the updated data received by the central node server can be obtained; and then the information freshness of the updated data can be calculated based on the above training completion time, sample collection time, and model reception time.
[0151] In practice, the communication network parameters and / or processing resource parameters of the first node terminal in the second time period can also be obtained simultaneously. By combining the training completion time, sample collection time, model receiving time, and communication network parameters and / or processing resource parameters, the actual communication network situation and processing resource situation of the first node terminal in the second time period can be further considered to more reasonably calculate the information freshness with higher reference value.
[0152] For example, if, based on communication network parameters and / or processing resource parameters, it is found that the actual communication network of the first node terminal is not very stable in the second time period, and / or the processing resources are relatively tight, an appropriate adjustment value can be added based on the initial information freshness determined by the training completion time, sample collection time, and model reception time, according to the corresponding adaptive adjustment rules. This can increase the information freshness of the first node terminal, reduce the frequency of data upload and update by the first node terminal, and alleviate the data transmission pressure and / or data processing pressure of the first node terminal.
[0153] Conversely, when the communication network and / or processing resource parameters of the first node terminal are found to be healthy, stable, and have ample capacity in the second time period, the corresponding adjustment value can be reduced based on the initial information freshness determined by the training completion time, sample collection time, and model reception time, according to the corresponding adaptive adjustment rules. This reduces the information freshness of the first node terminal, increases the frequency of data upload and updates, and thus fully utilizes the communication network and processing resources of the first node terminal to generate more and more frequent data updates, enabling more real-time improvements and updates to the global risk prediction model.
[0154] In practice, the central node server can determine whether the conditions for triggering the second time period update are met by detecting whether the freshness of the information on the first node terminal is greater than the preset peak information age.
[0155] Among them, the Peak Information Age (AoP) can be set separately for different node terminals. It can be understood as a threshold parameter used to measure whether the latest updated data provided by the nearest neighbor time point is valid.
[0156] Specifically, when the information freshness of the first node terminal is detected to be greater than the preset peak information age, it can be determined that the second time period update trigger condition is met; conversely, when the information freshness of the first node terminal is detected to be less than or equal to the preset peak information age, it can be determined that the second time period update trigger condition is not met.
[0157] Specifically, initially, the central node server can use a unified default threshold as the preset peak information age for each node terminal. In practice, the central node server can monitor and update the update data upload records of each node terminal; based on the update data upload records of each node terminal, it can plot and update the information freshness change curve of each node terminal; then, at preset time intervals, based on the current information freshness change curve of each node terminal, it can analyze and filter out peak points based on the recent changes in information freshness data; then, based on the peak points and the data adjacent to the peak points, it can filter out peak points with a stable duration greater than a preset duration threshold as the preset peak information age used for that node terminal during that time period.
[0158] Specifically, for example, if an oilfield fails to upload a new model for 20 minutes due to network instability, its AoI gradually increases, and AoP reaches 20 minutes. When the oilfield re-uploads the update, the AoI returns to zero and is recalculated. The server calculates AoP_max = max(AoI(t)) using a rolling window approach (e.g., every hour or every training cycle) and uses it as the trigger threshold for model refresh or forced retraining. When a node's AoP exceeds a set limit (e.g., 30 minutes), the system requires an immediate upload of the latest model or initiates emergency synchronization to prevent the global model from being affected by outdated data. In this way, AoI reflects the freshness of current information, while AoP measures the limit of information aging. The combination of the two enables the federated learning system to dynamically adjust the model update frequency and aggregation strategy based on real-time data changes and network conditions during drilling operations, thereby ensuring that the model maintains real-time performance and reliability in complex and time-varying downhole conditions.
[0159] In practice, after receiving the encrypted data of the model parameters of the updated model in the second time period and the encrypted data of the auxiliary data of the updated model (or the updated data of the second time period), the central node server can obtain the information freshness of the node terminal that sent the updated data of the second time period; then, based on the information freshness and combined with the auxiliary data of the updated model, it can perform corresponding weighted processing using the updated data of the second time period to achieve asynchronous updates and obtain the global risk prediction model for the second time period.
[0160] Specifically, the weighted average can be calculated using the following formula:
[0161] θ_global^(new) = (1-α_i)θ_global^(old) + α_i Δθ_i
[0162] Wherein, θ_global^(new) is the global risk prediction model for the second time period, θ_global^(old) is the global risk update model for the first time period, α_i is the information freshness of the node terminal with number i, and Δθ_i is the encrypted data of the model parameters of the update model for the second time period uploaded by the node terminal with number i.
[0163] In this way, the central node server can intelligently and flexibly update the current global risk prediction model asynchronously based on the information freshness of each node terminal and the corresponding preset peak information age. This ensures the accuracy of the global risk prediction model while taking into account complex working conditions, and ensures that each node terminal can participate in updating the global risk prediction model within its own capabilities, thereby continuously improving the model's accuracy and generalization ability.
[0164] In some embodiments, if the central node server does not receive updated data uploaded by the first node terminal within a preset waiting period, the method may further include the following:
[0165] S1: The central node server obtains the update data provided by the first node terminal at the nearest time point, and uses it as the pseudo update data for the first time period of the first node terminal; and adjusts the weight parameters of the first oil and gas region to which the first node terminal belongs in the reinforcement learning framework to obtain the adjusted reinforcement learning framework.
[0166] S2: Based on the adjusted reinforcement learning framework, the central node server uses the pseudo-update data of the first time period from the first node terminal and the update data of the second time period uploaded by other node terminals to asynchronously update the global risk prediction model of the first time period, thereby obtaining the global risk prediction model of the second time period.
[0167] In practice, the weight parameters for the first oil and gas region to which the first node terminal belongs can be adaptively adjusted in the reinforcement learning framework based on the interval between the current time point and the nearest prior time point to the most recent data update provided by the first node terminal. For example, the longer the interval, the smaller the weight parameter should be.
[0168] Based on the above embodiments, when the central node server does not receive the updated data for the second time period uploaded by the first node terminal, it temporarily uses the updated data provided by the first node terminal at a previously adjacent time point as pseudo-update data. This ensures that the operating characteristics of the first oil and gas region to which the first node terminal belongs are taken into account during the asynchronous update process, preventing the operating characteristics of the first oil and gas region to which the first node terminal belongs from being directly ignored after multiple asynchronous updates, which would lead to a decrease in the model's generalization ability. At the same time, the weight parameters of the first oil and gas region to which the first node terminal belongs are adaptively adjusted in the reinforcement learning framework according to the interval duration, preventing potentially expired update data from having an excessive impact on the current global risk prediction model, and ensuring that the global risk prediction model after asynchronous updates still has high reliability.
[0169] In some embodiments, see Figure 6 As shown, the above-mentioned encryption processing of the model parameters of the first prediction model according to the preset joint training rules may include the following:
[0170] S6-1: Determine the sample data corresponding to the model parameters of the first prediction model;
[0171] S6-2: Obtain the importance and frequency of change of the sample data, as well as the computing power resource parameters and / or bandwidth resource parameters of the first node terminal;
[0172] S6-3: Determine the encryption level of the model parameters of the first prediction model corresponding to the sample data based on the importance and frequency of change of the sample data, as well as the computing power resource parameters and / or bandwidth resource parameters of the first node terminal.
[0173] S6-4: Based on the encryption level of the model parameters of the first prediction model corresponding to the sample data, perform matching encryption processing on the model parameters of the first prediction model.
[0174] In practice, the initial encryption level of the sample data can be determined based on its importance and rate of change.
[0175] For example, when the importance of the sample data is greater than a preset importance threshold and the rate of change is less than or equal to a preset rate of change threshold, the initial encryption level of the sample data can be set to the first encryption level.
[0176] When the importance of the sample data is greater than the preset importance threshold and the rate of change is greater than the preset rate of change threshold, the initial encryption level of the sample data can be set to the second encryption level.
[0177] When the importance of the sample data is less than or equal to the preset importance threshold, and the rate of change is less than or equal to the preset rate of change threshold, the initial encryption level of the sample data can be set to the third encryption level.
[0178] When the importance of the sample data is less than or equal to the preset importance threshold, and the rate of change is greater than the preset rate of change threshold, the initial encryption level of the sample data can be set to the fourth encryption level.
[0179] The encryption level is higher than the second encryption level, the second encryption level is higher than the third encryption level, and the third encryption level is higher than the fourth encryption level. Each encryption level corresponds to a specific encryption algorithm. These encryption algorithms are based on homomorphic encryption rules and / or differential privacy rules.
[0180] The first encryption level corresponds to the first encryption algorithm, the second encryption level corresponds to the second encryption algorithm, the third encryption level corresponds to the third encryption algorithm, and the fourth encryption level corresponds to the fourth encryption algorithm. The first encryption algorithm is more secure than the second encryption algorithm, and it also requires more resources (including computing power and / or bandwidth). The second encryption algorithm is more secure than the third encryption algorithm, and it also requires more resources (including computing power and / or bandwidth). The third encryption algorithm is more secure than the fourth encryption algorithm, and it also requires more resources (including computing power and / or bandwidth).
[0181] Then, based on the computing power and / or bandwidth resource parameters of the first node terminal, the initial encryption level is dynamically adjusted to obtain the final encryption level of the sample data.
[0182] For example, when the computing power resource parameter indicates that the first node terminal has sufficient computing power resources, and the bandwidth resource parameter indicates that the first node terminal has sufficient bandwidth resources, the encryption level can be dynamically increased by one level based on the initial encryption level.
[0183] When the computing power resource parameter indicates that the computing power resources of the first node terminal are insufficient, or the bandwidth resource parameter indicates that the bandwidth resources of the first node terminal are insufficient, the encryption level can be dynamically reduced by one level based on the initial encryption level.
[0184] Based on the above embodiments, the characteristics of the sample data itself and the available resources of the node terminal can be taken into account at the same time, so as to achieve the encryption processing of the sample data in a reasonable and efficient manner.
[0185] In some embodiments, the above-mentioned matching and adjustment of the current global risk prediction model using reference data from drilled wells may further include the following: using reference data from drilled wells to determine the operating characteristics of the target oil and gas region for the current time period; wherein the operating characteristics include at least one of the following: formation pressure distribution, lithological characteristics, mud density window, drilling process parameters; based on the operating characteristics of the target oil and gas region for the current time period, fine-tuning the current global risk prediction model through transfer learning to achieve matching and adjustment of the current global risk prediction model.
[0186] As can be seen from the above, based on the federated learning-based drilling risk determination method provided in the embodiments of this specification, before specific implementation, multiple node terminals deployed in multiple different oil and gas regions and the central node server can simultaneously cooperate to perform preset federated learning based on oil and gas region data privacy protection, under the premise that the sample data does not leave the local oil and gas region, according to preset joint training rules. Furthermore, preset asynchronous updates are performed at preset time intervals based on information freshness to obtain a global risk prediction model that meets the requirements. In specific implementation, for the first node terminal, it can first obtain reference data of drilled wells in the first oil and gas region during the current time period, associated data of the target well, and the current global risk prediction model; then, it uses the reference data of drilled wells to match and adjust the current global risk prediction model to obtain a current first risk prediction model that matches the current first oil and gas region; then, it uses the current first risk prediction model to process the associated data of the target well to obtain the target prediction result for the target well; based on the target prediction result, it is determined whether the target well currently has drilling risk. This allows it to be well adapted to complex operating scenarios that require data privacy protection in oil and gas regions. Under the premise of protecting the data privacy of relevant oil and gas regions, it can effectively utilize sample data from different oil and gas regions to train a global risk prediction model with strong generalization ability and high accuracy. Based on this global risk prediction model, it can accurately detect and judge the drilling risks of relevant wells in each oil and gas region, ensuring the safety of oil and gas well drilling operations.
[0187] This specification provides an electronic device through its embodiments. (See attached document.) Figure 7 As shown. The electronic device includes a network communication port 701, a processor 702, and a memory 703. These structures are connected by internal cables so that they can perform specific data interaction.
[0188] Specifically, the network communication port 701 can be used to acquire reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by performing preset federated learning based on preset joint training rules, using sample data from multiple different oil and gas regions to protect the data privacy of oil and gas regions, and performing preset asynchronous updates at preset time intervals based on information freshness.
[0189] The processor 702 can be specifically used to match and adjust the current global risk prediction model using reference data from drilled wells to obtain a current first risk prediction model that matches the current first oil and gas region; to process the associated data of the target well using the current first risk prediction model to obtain the target prediction result for the target well; and to determine whether there is a drilling risk for the target well based on the target prediction result.
[0190] The memory 703 can be used to store the corresponding instruction program and related intermediate data.
[0191] Based on the above method, the relevant structural performance of electronic equipment can be effectively utilized to improve the data processing speed of electronic equipment and efficiently realize drilling risk data processing based on federated learning.
[0192] In this embodiment, the network communication port 701 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.
[0193] In this embodiment, the processor 702 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.
[0194] In this embodiment, the memory 703 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0195] This specification also provides a computer-readable storage medium based on the above-described federated learning-based drilling risk determination method. The computer-readable storage medium stores computer program instructions that, when executed, perform the following: acquiring reference data of drilled wells in a first oil and gas region during the current time period, associated data of target wells, and a current global risk prediction model; wherein the current global risk prediction model is obtained by performing a preset federated learning based on sample data from multiple different oil and gas regions, prioritizing data privacy protection for oil and gas regions, and combining this with information freshness through preset asynchronous updates at preset time intervals; matching and adjusting the current global risk prediction model using the reference data of drilled wells to obtain a current first risk prediction model that matches the current first oil and gas region; processing the associated data of the target well using the current first risk prediction model to obtain a target prediction result for the target well; and determining whether the target well currently faces drilling risk based on the target prediction result.
[0196] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.
[0197] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other embodiments, and will not be repeated here.
[0198] This specification also provides a computer program product, comprising at least a computer program, which, when executed by a processor, implements the following method steps: acquiring reference data of drilled wells in a first oil and gas region during the current time period, associated data of target wells, and a current global risk prediction model; wherein, the current global risk prediction model is a model obtained by performing preset federated learning based on sample data from multiple different oil and gas regions with oil and gas region data privacy protection, and by combining information freshness with preset asynchronous updates at preset time intervals; matching and adjusting the current global risk prediction model using the reference data of drilled wells to obtain a current first risk prediction model that matches the current first oil and gas region; processing the associated data of target wells using the current first risk prediction model to obtain target prediction results for the target wells; and determining whether the target well currently has drilling risk based on the target prediction results.
[0199] See Figure 8 As shown in the embodiments of this specification, a drilling risk determination device based on federated learning is also provided. This device may specifically include the following structural modules:
[0200] The acquisition module 801 can be used to acquire reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by using sample data from multiple different oil and gas regions to perform preset federated learning based on the privacy protection of oil and gas region data, and asynchronously updating the model based on the information freshness of the current time period, according to preset joint training rules.
[0201] The adjustment module 802 can be used to match and adjust the current global risk prediction model using reference data from drilled wells, so as to obtain the current first risk prediction model that matches the current first oil and gas region.
[0202] The processing module 803 can be used to process the associated data of the target well using the current first risk prediction model to obtain the target prediction results for the target well.
[0203] The determination module 804 can be used to determine whether there is a drilling risk in the target well based on the target prediction results.
[0204] In some embodiments, the above-described apparatus may further be used to: receive a joint training request; respond to the joint training request and acquire sample data of a first oil and gas region; construct an initial first prediction model according to preset joint training rules; train the initial prediction model locally using the sample data of the first oil and gas region to obtain a corresponding first prediction model; simultaneously, determine model auxiliary data for the first prediction model based on the sample data of the first oil and gas region and the first prediction model; wherein the model auxiliary data includes at least: statistical results of the distribution of characteristics of the sample data of the first oil and gas region, the collection time of the sample data of the first oil and gas region, the training completion time of the first prediction model, and the contribution parameter of the sample data of the first oil and gas region to the first prediction model; and train the first prediction model according to preset joint training rules. The model parameters and model auxiliary data are respectively encrypted to obtain encrypted data of the model parameters and model auxiliary data of the first prediction model; the encrypted data of the model parameters and model auxiliary data of the first prediction model are sent to the central node server; wherein, the central node server receives encrypted data of the model parameters and model auxiliary data of multiple prediction models based on different oil and gas regions uploaded by node terminals in different oil and gas regions; the central node server also, according to preset joint training rules, based on a reinforcement learning framework, uses the encrypted data of the model parameters and model auxiliary data of multiple prediction models to dynamically weight and aggregate the multiple prediction models in encrypted state to obtain a global risk prediction model; and receives the global risk prediction model issued by the central node server.
[0205] In some embodiments, when the above-described apparatus is specifically implemented, an initial first prediction model can be constructed according to a preset joint training rule in the following manner: the initial first prediction model is constructed using a Tiny-LSTM structure according to the preset joint training rule.
[0206] In some embodiments, the central node server can specifically perform dynamic weighted aggregation of the multiple prediction models in the encrypted state by using encrypted data of model parameters and encrypted data of model auxiliary data of multiple prediction models based on a reinforcement learning framework and according to preset joint training rules: Decrypting the encrypted data of model auxiliary data according to preset joint training rules to obtain model auxiliary data; extracting the characteristic distribution statistics of sample data from multiple oil and gas regions, and the contribution parameters of sample data from multiple oil and gas regions to the prediction models based on the model auxiliary data; determining the encrypted gradient parameters of the prediction models for multiple oil and gas regions based on the encrypted data of model parameters of multiple prediction models; and performing clustering processing using the characteristic distribution statistics of sample data from multiple oil and gas regions and the contribution parameters of sample data from multiple oil and gas regions to the prediction models to divide the regions into... Multiple oil and gas region groups are identified, with each group corresponding to a training state type. Based on a pre-defined joint training rule and a reinforcement learning framework, an agent performs local weighted aggregation of the encrypted data of the model parameters of prediction models for different oil and gas regions within each oil and gas region group. This yields encrypted data of the model parameters of multiple local prediction models corresponding to each oil and gas region group. Based on the encrypted data of the model parameters of these local prediction models, along with the encrypted data of the model parameters and gradient parameters of the prediction models for different oil and gas regions within the corresponding oil and gas region groups, the variation characteristics of the model parameters of these local prediction models are determined. Finally, based on the pre-defined joint training rule and a reinforcement learning framework, an agent performs global weighted aggregation of the model parameters of these local prediction models, along with the encrypted data of the model parameters of these local prediction models, to obtain the corresponding global risk prediction model.
[0207] In some embodiments, the above-described apparatus may further be used to: receive an update request for a second time period initiated by a central node server; wherein the central node server acquires and calculates the information freshness of the update data of each node terminal based on the update data provided by each node terminal at prior adjacent time points after a preset time period following the first time period; and determines, based on the information freshness, the node terminal that meets the update triggering condition for the second time period, and sends a corresponding update request for the second time period to that node terminal; responding to the update request for the second time period, acquiring new sample data of the first oil and gas region in the second time period according to a preset joint training rule; and, based on the preset joint training rule, using the new sample data of the first oil and gas region in the second time period, training the first... A global risk prediction model for a first time period is obtained, resulting in a first updated model for a second time period. Simultaneously, auxiliary data for updating the first updated model for the second time period is acquired, wherein the auxiliary data carries at least relevant timestamp information. The encrypted data of the model parameters of the first updated model for the second time period and the encrypted data of the auxiliary data are sent as update data to a central node server. The central node server asynchronously updates the global risk prediction model for the first time period based on the received encrypted data of the model parameters and the encrypted data of the auxiliary data for updating the model for the second time period, thus obtaining the global risk prediction model for the second time period. The central node server then receives the global risk prediction model for the second time period from the central node server.
[0208] In some embodiments, when the central node server is specifically implemented, the information freshness of the updated data of the first node terminal can be calculated in the following manner: obtaining relevant timestamp information based on the updated data of the first node terminal; obtaining communication network parameters and / or processing resource parameters of the first node terminal for a second time period; determining the information freshness of the updated data of the first node terminal based on the relevant timestamp information and the communication network parameters and / or processing resource parameters of the first node terminal for the second time period.
[0209] In some embodiments, when the central node server does not receive updated data uploaded by the first node terminal within a preset waiting period, the device may further be used for: the central node server obtaining updated data provided by the first node terminal at a prior adjacent time point as pseudo-update data for the first time period of the first node terminal; and adjusting the weight parameters of the first oil and gas region to which the first node terminal belongs in the reinforcement learning framework to obtain an adjusted reinforcement learning framework; based on the adjusted reinforcement learning framework, the central node server asynchronously updates the global risk prediction model for the first time period using the pseudo-update data of the first time period of the first node terminal and the updated data for the second time period uploaded by other node terminals to obtain the global risk prediction model for the second time period.
[0210] In some embodiments, when the above-described apparatus is specifically implemented, the model parameters of the first prediction model can be encrypted in a matching manner according to a preset joint training rule as follows: determine the sample data corresponding to the model parameters of the first prediction model; obtain the importance and frequency of change of the sample data, as well as the computing power resource parameters and / or bandwidth resource parameters of the first node terminal; determine the encryption level of the model parameters of the first prediction model corresponding to the sample data based on the importance and frequency of change of the sample data, as well as the computing power resource parameters and / or bandwidth resource parameters of the first node terminal; and perform matching encryption processing on the model parameters of the first prediction model according to the encryption level of the model parameters of the first prediction model corresponding to the sample data.
[0211] In some embodiments, the reinforcement learning framework may further integrate a feature mapping and alignment network to map the encrypted data of model parameters of multiple prediction models in different oil and gas regions to the same shared feature space and perform semantic alignment processing.
[0212] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0213] As can be seen from the above, the well risk determination device based on federated learning provided in the embodiments of this specification can be well adapted to complex working conditions that require data privacy protection in oil and gas areas. Under the premise of protecting the data privacy of relevant oil and gas areas, it can effectively utilize sample data from different oil and gas areas to train a global risk prediction model with strong generalization ability and high accuracy. Then, based on the global risk prediction model, it can accurately detect and judge the drilling risks of relevant wells in each oil and gas area, ensuring the safety of oil and gas well drilling operations.
[0214] In a specific scenario example, the well risk determination method based on federated learning provided in this manual can be used to achieve intelligent early warning of well risks based on federated learning.
[0215] In this scenario example, considering the significant risks involved in drilling operations such as overflows, lost circulation, stuck pipe, and wellbore collapse, traditional risk prediction models lack generalization ability due to their reliance on data from a single oilfield, making them unsuitable for different geological conditions. Oilfield data requires data security and is difficult to share, creating data silos. Federated learning offers a new approach to address this problem, but traditional federated learning suffers from two prominent issues: first, in real-time applications, global model updates lag, affecting prediction accuracy and model transferability; second, parameter aggregation typically relies solely on data size to allocate weights, neglecting the actual contribution of different oilfield data to model accuracy, resulting in performance degradation.
[0216] To address the aforementioned issues and their root causes, this scenario further considers the following approach: Collecting multi-source data from multiple oilfields, including drilling rate, pump pressure, mud density, flow rate, well volume, and historical well control incidents, to train a drilling risk prediction model locally. Encrypted model parameters are then uploaded to a central coordination server via a federated learning framework without sharing the original data. The central server dynamically weights and aggregates data based on different oilfield geological conditions and drilling parameters, incorporating reinforcement learning to optimize the aggregation weights and generate a global risk prediction model, which is then distributed to each oilfield. Each oilfield can fine-tune its model based on the global model, considering local formation pressure distribution, lithological characteristics, mud density windows, and drilling process parameters. The system also features asynchronous and real-time model updates, enhancing model portability and adaptability, and enabling intelligent early warning of risks such as lost circulation, overflow, and stuck pipe. Based on this intelligent drilling risk early warning method and system incorporating federated learning, cross-oilfield joint modeling is achieved while ensuring data privacy, improving the model's real-time performance and accuracy. Furthermore, while protecting data privacy, it improves model accuracy and usability, significantly reducing drilling operation accident rates. For specific implementation details, please refer to [link / reference needed]. Figure 9 As shown, it may include the following:
[0217] 1. Local data acquisition and training: Each oilfield independently acquires real-time drilling parameters and historical accident data, including drilling speed, pump pressure, mud density, flow rate, pool volume, and well control accident tags, and trains risk prediction models on local servers.
[0218] 2. Secure parameter upload and aggregation: Each oilfield uploads its local model parameters to the central coordination server after homomorphic encryption or differential privacy processing to avoid leakage of raw data.
[0219] 3. Reinforcement learning optimizes aggregation weights: The central coordination server introduces a deep reinforcement learning algorithm when aggregating parameters. It dynamically adjusts the aggregation weights of each oilfield parameter by combining the scale of oilfield data, model similarity, and actual contribution to prediction accuracy, thereby balancing the advantages of data scale with the improvement of model accuracy.
[0220] 4. Real-time update and asynchronous mechanism: The system adopts an asynchronous update mechanism and introduces information freshness (AoI) and peak information age (AoP) as constraints to ensure that the global model can be continuously updated under real-time drilling conditions, reduce model lag problems, and enhance transferability and timeliness.
[0221] 5. Localized fine-tuning and personalized adaptation: After the global model is distributed, each oilfield can fine-tune it according to local formation pressure distribution, lithological characteristics, mud density window and drilling process parameters (such as drilling pressure, rotation speed and pump displacement), so that the model can adapt to different wellbore structures and geological conditions, thereby improving the personalized prediction capability of typical risks such as well leakage, overflow and stuck pipe.
[0222] In practice, (node terminals) can collect real-time and historical drilling data from multiple oilfields, train risk prediction models locally, and upload the model parameters to a central coordination server (e.g., a central node server). The server combines the drilling conditions of each oilfield and dynamically optimizes the aggregation weights through reinforcement learning to generate a global model (e.g., a global risk prediction model) and distributes it to each oilfield (e.g., each oil and gas region) for risk warning.
[0223] In practice, the uploaded model parameters are homomorphically encrypted or differential privacy processed to avoid leakage of the original data.
[0224] In practice, the central coordination server employs a robust aggregation algorithm and a weight optimization mechanism based on deep reinforcement learning to improve model accuracy while taking into account the scale of the data.
[0225] In practice, after the global model is distributed to each oilfield, it can be fine-tuned by combining local formation pressure distribution, lithological characteristics, mud density window and drilling process parameters (including drilling pressure, rotation speed, pump discharge, etc.), thereby improving the personalized prediction accuracy of drilling risks such as well leakage, overflow and stuck pipe under different wellbore structures and geological conditions.
[0226] In practice, the system has an asynchronous update mechanism that can dynamically refresh global model parameters during real-time drilling data input, using information freshness (AoI) or peak information age (AoP) as constraints, thereby improving the model's portability and timeliness.
[0227] In this scenario example, within a drilling operation, federated learning serves as an intelligent framework for cross-oilfield collaborative modeling. It leverages massive amounts of real-time and historical data scattered across different oilfields, drilling platforms, or operating companies, eliminating the need for centralized transmission of raw data. The drilling process generates a large amount of multi-source heterogeneous data, including real-time engineering parameters (such as drilling speed, pump pressure, drilling weight, torque, hook load, outlet flow rate, total pool volume, inlet flow rate, outlet density, and inlet density), logging data (such as acoustic waves, resistivity, and gamma rays), and equipment parameters (such as power and energy consumption). Each oilfield or drilling team can use this data locally to train a risk prediction model, uploading only encrypted model parameters or gradients to the central coordination server. The central server, without accessing the raw data, aggregates, optimizes, and updates the parameters uploaded by each node, forming a global risk prediction model. This model is then distributed to each oilfield for real-time risk identification and early warning, thereby achieving collaborative learning and knowledge sharing across multiple regions and geological conditions. This combination approach can break down data silos and protect oilfield data privacy, while also significantly improving the accuracy of predicting drilling risks such as well leakage, overflow, and stuck pipe, as well as the generalization ability of the model.
[0228] In drilling scenarios, the geological conditions, processes, and equipment of different oilfields vary greatly, leading to inconsistent data feature distributions and exhibiting obvious non-independent identically distributed (Non-IID) characteristics. Traditional federated learning is easily affected by this during aggregation, causing the model to favor nodes with larger data volumes, thereby reducing overall accuracy. To address this, a dynamic weighted aggregation mechanism can be introduced, adaptively allocating weights based on model gradient similarity, oilfield data feature distribution, and prediction contribution during parameter fusion. Simultaneously, personalized federated learning (Personalized FL) or clustered federated learning (Clustered FL) methods can be employed to group oilfields with similar geological environments or drilling conditions into the same subgroup, replacing global uniform aggregation with local aggregation, thus mitigating the degradation problem caused by inconsistent data distribution.
[0229] Drilling sites are often located in remote areas with limited network bandwidth and unstable communication links. Traditional federated learning requires frequent uploading and distribution of model parameters, which can easily lead to accumulated latency. To address this issue, an asynchronous federated learning mechanism can be adopted, allowing different oilfield nodes to upload parameters at different times. The central server aggregates existing updates in real time, avoiding waiting for "slow nodes." At the same time, model compression, gradient quantization, and sparsity techniques are combined to reduce the amount of data uploaded. Furthermore, by introducing the Age of Information (AoI) metric, the upload frequency is dynamically scheduled to ensure that the model parameters maintain high update timeliness under limited bandwidth conditions.
[0230] The computing performance of edge servers at drilling sites is relatively limited, and directly training complex models may lead to excessively long training cycles and high energy consumption. To address this issue, lightweight model structures (such as Tiny-LSTM and MobileNet) can be adopted to reduce computational complexity. Simultaneously, a cloud-edge collaborative architecture can be used to execute complex model optimization and reinforcement learning scheduling tasks in the cloud, while edge nodes are only responsible for local incremental updates and small-batch data training. Furthermore, an energy-aware scheduling mechanism can adaptively adjust the local training rounds and upload frequency based on the remaining resources of the nodes, thereby achieving a dynamic balance between computing power and energy consumption.
[0231] Although federated learning does not share raw data, uploaded model parameters may still be used by malicious nodes or third parties to infer some sensitive information. To prevent information leakage, homomorphic encryption or differential privacy methods can be used before parameters are uploaded to ensure that the model remains valid even after parameter perturbation. Simultaneously, the central server uses a secure aggregation protocol during aggregation, preventing it from parsing uploads from individual nodes. For potential model poisoning or inversion attacks, robust aggregation algorithms and abnormal parameter detection mechanisms can be introduced to eliminate uploads from suspicious nodes, ensuring system security and model reliability.
[0232] Different oilfields exhibit significant differences in data units, sampling frequencies, sensor accuracy, and the number of features. Traditional solutions involve data cleaning and format standardization, but this is impractical in environments requiring data security. This invention proposes an intelligent solution at the algorithmic level: introducing a Feature Alignment Network into a federated learning framework, enabling the model to automatically learn the mapping relationships between data features from different oilfields before aggregation. Simultaneously, federated representation learning or an adaptive embedding layer can be used to project data with different units and sampling frequencies onto a shared feature space, achieving semantic alignment without altering the original data structure. This method leverages the intelligent feature extraction capabilities of federated learning to automatically achieve implicit unification between heterogeneous data, ensuring model consistency and fusionability during cross-oilfield training.
[0233] In practical implementation, in drilling scenarios, to achieve "weighted aggregation by dynamically optimizing aggregation weights through reinforcement learning, combined with oilfield operating conditions," the system extracts representative statistical information through a privacy protection mechanism after the local models of each oilfield are uploaded, without directly accessing or transmitting the original data. After training, each oilfield node generates three types of controlled indicators locally: a consistent signature of the model gradient direction, a distribution embedding description of formation and process conditions, and the prediction contribution of the node's model on the standard validation set. This information is uploaded to the central coordination server after being homomorphically encrypted or subjected to differential privacy perturbations. The reinforcement learning agent on the server side judges the freshness, stability, and representativeness of each node's data based on these encrypted indicators, and dynamically outputs the aggregation weight of each node. The higher the weight of the node, the greater its update has an impact on the global model. Thus, without leaking data content, it achieves differentiated utilization and weighted aggregation of the value of data from different oilfields, maintaining the robustness and accuracy of the model in complex geological environments.
[0234] In the drilling risk prediction system, to achieve an asynchronous update mechanism that dynamically refreshes global model parameters based on information freshness or peak information age, the central server continuously tracks the timestamps of model uploads from each oilfield node and the local data update cycle. This allows the calculation of the model information freshness (AoI) and peak information age (AoP) for each node. AoI reflects the time delay between the node's model and the latest drilling data in the field, while AoP represents the longest duration of this delay. When a node's AoI exceeds a set threshold or its AoP reaches its peak limit, the system automatically triggers an asynchronous update, requiring the node to upload the latest model parameters or perform an incremental update. The server adaptively adjusts the node's weight in the global model fusion based on its AoI value, giving a higher weight to newer data and automatically reducing the weight of lagging nodes. The updated global model is immediately refreshed and distributed hierarchically to each oilfield, ensuring that core nodes receive the real-time model and other nodes synchronize within an acceptable time delay. This guarantees that the risk identification model always reflects the latest changes in downhole conditions.
[0235] In this scenario example, within the drilling risk detection context, privacy protection must first align with the business attributes of the industry data: well sites simultaneously generate commercially valuable and highly sensitive data (such as formation pressure distribution, lithological parameters, wellbore stability evaluation, mud density windows, and accident tags), as well as high-frequency, dynamic, but relatively less sensitive operational data (such as drilling speed, pump pressure, rotational speed, pump displacement, flow rate, and torque). This data spans multiple organizations (the client oilfield, contractors, service companies, and multi-platform collaboration), requires real-time availability (risks are triggered by second-level fluctuations), and exists in a field environment with complex network conditions and limited edge computing power. Therefore, the privacy mechanism must achieve an engineered balance among "confidentiality level—real-time performance—computing power / bandwidth."
[0236] Based on the aforementioned scenario characteristics, the data can be stratified and categorized according to sensitivity and usage: Category A consists of highly sensitive, high-value, relatively slow-updating "confidential information" that can influence model bias, such as formation pressure curves, lithology and key process windows, and detailed accident labels; Category B consists of medium-to-low sensitivity, high-timeliness real-time operational data streams. Further, Category B data is split into two sub-data based on its "contribution structure to the global model": the first sub-data consists of statistically describable features highly relevant to risk modeling (such as windowed mean / variance, extreme values, frequency domain energy, trend slope, etc.); the second sub-data consists of real-time fluctuating atomic-level fragments or short-period sequence pieces (providing timely signals for online identification). This stratification and splitting provides the foundation for differentiated encryption / perturbation and upload paths.
[0237] In terms of specific encryption and protection strategies, Class A data employs a highly secure but computationally expensive approach, such as homomorphic encryption (CKKS / Paillier) or secure multi-party computation (MPC), allowing it to participate in gradient / parameter calculations or corrections without decryption. Combined with necessary ciphertext aggregation and ciphertext domain screening, this ensures that no single point can deduce the original secret. For Class B data, the first sub-data undergoes differential privacy (DP) processing, using noise injection and privacy budgets (ε, δ) to mask individual information while preserving statistical structure. The second sub-data uses a low-latency, lightweight channel, employing symmetric encryption such as AES / GCM or fast masking to ensure confidentiality and integrity at the link and edge. To avoid excessive degradation of the model due to DP, adaptive noise scheduling can be introduced: reducing noise intensity during periods of escalating risk (high timeliness requirements) and increasing protection strength during stable periods, thus dynamically balancing availability and privacy.
[0238] When coupling hierarchical privacy with the federated learning process, the edge first performs data hierarchical classification, feature extraction, and corresponding encryption / perturbation locally, then performs local training and uploads only controlled parameter updates or encrypted gradients. Upon receiving the data, the server performs separate aggregation based on "data category labels" and "privacy metadata": updates for category A use homomorphic aggregation or MPC protocol to complete encrypted domain fusion; updates for the first sub-data of category B use differential aggregation with privacy budget auditing; online updates for the second sub-data of category B use a lightweight, fast channel linked to the Information Freshness (AoI) threshold to ensure timely updates of the global model. Furthermore, a reinforcement learning (DRL) controller can be introduced on the server to dynamically allocate privacy budgets and encryption strengths, upload frequencies, and batch sizes for various data types based on historical aggregation errors, task losses, data size / quality at each node, and real-time network status, achieving closed-loop optimization of "accuracy-latency-privacy."
[0239] In this example scenario, within the federated learning framework, after receiving local model parameters from different oilfields, the central coordination server first extracts and analyzes the corresponding oilfield's operating condition feature descriptors. These descriptors originate from non-sensitive statistical features uploaded by the oilfields, such as formation pressure gradients, mud density windows, lithological distribution, well depth ranges, fluctuations in drilling pressure and rotation speed, and historical accident frequencies. These features can be embedded into vectors or encoded features to form a low-dimensional representation describing the operating environment and data feature distribution of each oilfield. The server uses these descriptors to measure the geological similarity and data representativeness between oilfields, thus considering the differences in the contribution of oilfield operating conditions to the model during aggregation.
[0240] In traditional federated averaging, the parameter weights of each node are usually proportional to the amount of data, neglecting the model quality and task relevance. To address this limitation, this invention introduces Deep Reinforcement Learning (DRL) as the core of the aggregation control. The reinforcement learning agent resides on a central server and is used to decide the weight allocation of the oilfield model parameters in each round of aggregation.
[0241] In each federated training round, the Agent outputs a set of dynamic weights ω to guide model aggregation based on state information such as the feature vectors of each oilfield's operating conditions, historical aggregation contribution, model convergence speed, and error change rate. The reward function is designed to comprehensively consider the global model accuracy improvement rate, the rate of reduction in model differences between oilfields, and the balance of computational and communication costs. Through continuous training, the Agent can learn the optimal weight adjustment strategy under different drilling operating condition distributions, achieving a closed-loop update of "dynamic aggregation—feedback evaluation—adaptive optimization".
[0242] In practical implementation, the core idea of local aggregation in drilling scenarios is to first identify oilfields with similar geological environments, drilling processes, and operational characteristics, and then divide them into the same cluster. Local model aggregation is then performed within each cluster. To achieve this, the system first needs to securely obtain several non-sensitive geological and operational feature summaries from each oilfield node, such as well depth range, formation pressure gradient, lithology type encoding, mud density window, drilling fluid rheological properties, pump pressure and rotation speed variation range, drill string assembly parameters, and historical well control accident frequency. This data does not include original logging curves or confidential production indicators, but rather feature distribution statistics calculated by local nodes or low-dimensional embedding vectors after differential privacy perturbation. After receiving these embedding descriptions, the central coordination server automatically divides oilfields with similar geology and operational conditions into several clusters using similarity clustering algorithms (such as K-means, spectral clustering, or hierarchical clustering based on cosine distance). Subsequently, a local aggregation operation is performed within each subgroup—that is, model parameters or gradient information are merged only among the oilfields in that group to form a local model that accurately reflects the drilling risk patterns under such geological and operational conditions. A secure aggregation protocol is still used during the aggregation process, and all uploaded data are encrypted or anonymized statistical results, thereby achieving local knowledge sharing while protecting privacy.
[0243] After local aggregation, each subgroup forms several representative local models. The system then performs a second-stage global aggregation to integrate knowledge from different geological categories and improve the overall generalization ability of the model. For this, the central server needs to acquire local model feature information from each subgroup, including model parameter variation trends, intra-group validation set accuracy, intra-group sample coverage, model gradient direction consistency, and time freshness. Unlike the local stage which uses raw working condition features, only encrypted model statistics or performance indicators are uploaded here. The server calculates the weights of each subgroup at the global level based on these controlled signals, considering factors such as intra-group data volume, model stability, prediction contribution, and information freshness, and uses weighted aggregation to form a global model. The result of the global aggregation is then fine-tuned locally within each subgroup to maintain personalized adaptation. Through this two-level federated architecture of "local fusion first, global coordination second," the system can capture the differences in risk characteristics under different geological environments and share cross-regional knowledge, thereby significantly mitigating the model degradation problem caused by inconsistent data distribution and improving the accuracy and stability of drilling risk prediction.
[0244] In this scenario example, the "asynchronous update mechanism" uses Information Freshness (AoI) and Peak Information Age (AoP) as constraints to address issues such as inconsistent upload frequencies, communication delays, and drastic changes in operating conditions among oilfield nodes in drilling scenarios.
[0245] In practical implementation, the Information Freshness (AoI) of the drilling risk intelligent early warning system is used as a core indicator to measure the timeliness of model updates, and is used to dynamically schedule the upload frequency of each oilfield node. The system records in real time the timestamp of the model parameter upload for each oilfield node, the corresponding latest drilling data sampling time, and the server receiving time, thereby calculating the node's AoI value, which is the lag time of the information represented by the model. When the AoI value of a node is low, it indicates that the model information of that node is still fresh. At this time, the system can extend the next upload interval and reduce the communication frequency. When the AoI value continues to rise and approaches a set threshold (e.g., 10 minutes or 20 minutes), the system shortens the upload interval and triggers the node to upload new incremental parameters or differential updates to maintain the real-time performance of the global model. If the AoI value of a node exceeds the peak information age (AoP) limit for a long period of time, such as 30 minutes, the system will force a refresh of its model and increase the aggregation weight decay of that node to prevent outdated information from affecting the overall accuracy. In this way, the AoI index makes the upload frequency no longer fixed, but dynamically adjusted according to the rate of change of drilling site conditions, network status and model lag, achieving the goal of controllable communication load, real-time information updates and global model always keeping in sync with downhole conditions under weak network conditions.
[0246] In traditional synchronous federated learning, all nodes must complete training simultaneously before they can be aggregated. In environments where drilling conditions change in real time and network conditions are complex, this can lead to data delays for some nodes and outdated models.
[0247] After introducing AoI / AoP, the system no longer updates only according to time cycles, but uses the freshness and effectiveness of information as trigger conditions to achieve "dynamic refresh" of the global model, thereby ensuring that the risk prediction model can reflect the latest drilling status in real time.
[0248] Information Freshness (AoI): Represents the "timeliness" of information about a specific oilfield node model held by the central server.
[0249] Peak Age of Information (AoP): Measures the persistence of information latency, i.e., the peak upload latency reached by a node. AoP controls the maximum tolerable limit for information aging; exceeding the threshold triggers a forced refresh.
[0250] When a node's AoI exceeds a threshold, it indicates that the node's information is outdated, and the system automatically triggers a "differential upload" or "incremental update." If the AoP (peak age) continuously exceeds the safety limit, it means that the node has not been updated for a long time, and its model will be temporarily removed from the aggregation or downweighted to prevent outdated parameters from polluting the global model. The system combines the network bandwidth and energy consumption status of each oilfield and uses reinforcement learning to adjust the upload interval of each node, so that the overall AoI distribution tends to be balanced. Nodes with good network conditions can upload frequently, while nodes with weak network conditions have extended upload cycles to maintain system stability.
[0251] In the intelligent early warning system for drilling risks, the dynamic refresh process of the global model is driven by Information Freshness (AoI) and Peak Information Age (AoP). The central coordination server continuously monitors the model status uploaded by each oilfield node and its corresponding timestamp, calculating AoI and AoP values in real time to determine the freshness and lag risk of information at each node. When a node's AoI exceeds a set threshold or its AoP approaches its upper limit, the system immediately triggers the asynchronous update process for that node, causing it to upload the latest local model parameters or incremental parameter differences (Δθ_i), along with a timestamp to ensure time sequence consistency. After receiving the new parameters, the server does not wait for other nodes but performs dynamic weighted fusion based on the AoI value: the newer the information, the higher the weight, resulting in the update formula θ_global^(new) = (1-α_i)θ_global^(old) + α_i Δθ_i, where α_i = e^(-λ) The updated global model is refreshed instantly on the central server and distributed in layers based on node network conditions and job priorities—core nodes receive it in real time, while ordinary nodes synchronize with a delay, thereby reducing communication burden while ensuring continuous model optimization. The entire process constitutes a closed-loop dynamic refresh mechanism of "monitoring—triggering—uploading—weighted fusion—distribution," enabling the global model to continuously reflect the latest changes in drilling conditions and achieving a balance between timeliness, adaptability, and stability in the risk warning model.
[0252] Where, θ_global^(new): represents the global model parameters obtained after the current round of updates, i.e., the latest model after dynamic weighted fusion; θ_global^(old): represents the global model parameters before the update, i.e., the previous version of the model stored on the server; Δθ_i: represents the model parameter increment or gradient update amount from oilfield node i, reflecting the model change of this node after training based on its latest drilling data; α_i: is the dynamic aggregation weight coefficient of node i, used to control the magnitude of the impact of the node's update on the global model; λ: is the AoI decay factor (positive real number), used to adjust the sensitivity of information freshness to weights. The larger λ is, the more sensitive the system is to latency; AoI_i: represents the information freshness (Age of Information) of node i, i.e., the time difference between the model parameters uploaded by this node and its latest drilling data; e^(-λ AoI_i): This function represents an exponential decay as AoI increases. It is used to dynamically calculate the aggregation weight based on the freshness of the information, so that the more recently updated the node is, the higher the weight in the aggregation, and the more recently updated the node is, the lower the weight.
[0253] In practical implementation, in drilling risk prediction scenarios, the central server employs a secure aggregation protocol when aggregating model parameters to prevent the server or potential third parties from inferring sensitive information from the uploaded parameters of a single oilfield. The basic idea of secure aggregation is that the server only obtains the sum of all uploaded parameters from all nodes, without being able to parse the plaintext parameter content of any single node. At the beginning of each training round, each oilfield node generates paired random mask values through a one-time handshake or key negotiation (such as through Diffie-Hellman key exchange), or generates an independent random vector mask for each node using secret sharing technology. Before uploading model parameters, each node superimposes its local model update with these random masks, thus forming perturbed uploaded data. When the parameters uploaded by all nodes are summed on the server side, these mask values, due to their design of being paired positive and negative or automatically canceling out within a threshold range, ensure that the aggregation result only retains the sum of all oilfield model updates, completely masking the specific updates of any single node.
[0254] To ensure the mechanism remains effective even in environments with unstable networks and frequent node disconnections at drilling sites, the system incorporates a "disconnect-safe aggregation" design into the protocol. Each node, when generating a mask, splits it into several random shares and distributes these shares to other nodes or designated auxiliary servers using a secret sharing algorithm (such as Shamir's Secret Sharing). When some nodes temporarily disconnect or transmission is interrupted, the central server can recover the necessary offset mask by collecting the shares from online nodes, allowing the aggregation process to complete smoothly. This threshold recovery mechanism ensures computational availability without compromising the privacy of any individual node, as the server still cannot obtain the complete mask information of any single node. Simultaneously, the system performs integrity verification on uploaded packets (e.g., using hash checksums or commitment mechanisms) to prevent nodes from uploading malicious data. After aggregation, robust aggregation algorithms (such as median aggregation, truncated mean, or Krum algorithm) are used to identify and remove anomalous updates, thereby defending against model poisoning attacks.
[0255] The secure aggregation protocol fundamentally prevents a central server from parsing content uploaded from a single oil field because each uploaded parameter is mathematically completely perturbed by random noise. Throughout the aggregation process, the server never obtains the complete mask information of any single node; any individual uploaded packet is equivalent to random noise data to the server. Only when the parameters uploaded by all nodes are summed together do these random masks automatically cancel each other out according to the protocol design, revealing the aggregated result, making it impossible to reconstruct the independent parts of each node. Even if the server colludes with some nodes, it cannot crack the parameters of other nodes because recovering a single plaintext update requires mastering all its mask shares, which are securely distributed across different nodes, making recovery impossible unless a threshold is reached. The entire process ensures the mathematical irreversibility and information isolation of uploaded content; any attempt to extract single-node features through statistical inference or inversion attacks will be ineffective.
[0256] Furthermore, to enhance system security, homomorphic encryption or secure multi-party computation (MPC) mechanisms can be layered in certain highly sensitive data rounds. With homomorphic encryption, each oilfield node encrypts the model parameters locally using its public key. The server directly performs addition operations in the ciphertext domain, completing the aggregation without decryption. The nodes then collaboratively decrypt the data to obtain a global update. With MPC, the aggregation computation process is distributed among multiple independent computational participants, preventing any single party from accessing the complete plaintext information. These enhancements, combined with secure aggregation protocols, can completely eliminate the possibility of single-node information leakage at the communication protocol and cryptographic levels while maintaining communication efficiency, thus ensuring the security, confidentiality, and robustness of the drilling federated learning system during multi-oilfield collaborative modeling.
[0257] In federated learning systems for drilling risk prediction, the raw data from different oilfield nodes suffer from inconsistencies in units, sampling frequencies, sensor accuracies, and feature counts, making direct model aggregation prone to feature space misalignment. This invention introduces a Feature Alignment Network (FAN) into the model structure as an adaptive bridging module between the main model's input layer and hidden layers. This network consists of several lightweight nonlinear mapping layers, employing a multilayer perceptron (MLP) or attention embedding structure. Each oilfield node retains an independent FAN submodule to map its local raw feature vectors to a unified semantic feature space. The system establishes an "input adapter" structure at the local node, first performing local encoding on the raw data (including normalization, sampling window embedding, and temporal feature compression), then inputting it into the FAN network for nonlinear mapping, enabling each oilfield to learn a set of matching intermediate feature representations locally. The central server does not require raw input. Instead, it receives the shared feature distribution statistics (such as mean, covariance matrix, or low-dimensional embedding representation) of the FAN output layers of each node. It learns the global alignment parameters through a secure aggregation protocol, so that the feature embeddings of different nodes gradually become consistent in the global space.
[0258] During federated training, the feature mapping and alignment network is trained jointly with the main risk prediction model (such as LSTM, Transformer, or deep neural network) using a joint optimization approach. Each oilfield node locally calculates a local loss function using its own raw data and labels as input. This function consists of two parts: a task loss for drilling risk prediction (such as classification or regression error) and a feature alignment constraint loss. The alignment loss can be based on a global alignment center vector (aggregated by the server) or achieved through contrastive learning or distribution matching (such as minimizing the maximum mean difference (MMD) or Wasserstein distance between feature distributions of different nodes). During training, each node independently updates its FAN parameters, ensuring that its output features are not only applicable to the local task but also maintain a similar distribution to the global feature space. The server periodically aggregates some parameters of these FAN networks (such as shared layer weights or alignment centers) and distributes the updated global alignment parameters to each node, thereby achieving dynamic unification of feature spaces across different oilfields without altering the original data.
[0259] Through this architecture, the feature mapping and alignment network forms a "local adaptation-global collaboration" mechanism within the federated learning framework: each node dynamically adjusts its input mapping function based on its own data characteristics, and the system gradually calibrates the feature representations between different nodes through multiple rounds of aggregation, ensuring that the models from different oilfields are aligned in the semantic space. In this way, even if the input features differ significantly in units, dimensions, or sampling methods, the model can automatically learn the correspondences between data from different sources, achieving implicit semantic unification across oilfields. This ensures that the parameters of the aggregated federated model have a consistent expressive basis, improving the overall training stability and generalization ability. This mechanism eliminates the need for standardized data formats or manual cleaning required in traditional methods, making it particularly suitable for environments where data security is crucial. It preserves the local characteristics of each oilfield's data while achieving intelligent fusion of cross-regional models.
[0260] In federated learning, the central server never directly receives or trains on raw drilling sample data. Even when a "forced update" is triggered when the AoI exceeds a threshold, the node is not forced to upload the data itself. Here, "differential upload" or "incremental update" refers to the following: when the system detects that the model information of a certain oilfield node is outdated (AoI exceeds a set threshold, such as 10 minutes), the node immediately performs a rapid retraining or fine-tuning process locally, updating its local model parameters based on the most recently acquired drilling data (e.g., real-time sensor data from the last 5 minutes). After the update, the node does not transmit the original data; instead, it calculates the parameter difference (Δθ) "relative to the previously uploaded model," which is the change in model weights or gradients, and then compresses, quantizes, and encrypts this part before uploading it to the central server.
[0261] After receiving the differential parameters from the node, the server does not immediately begin a new round of global training. Instead, it performs an incremental aggregation asynchronously: the newly uploaded parameters are weighted and fused with the current global model according to certain weights (related to factors such as AoI, data quality, and node contribution) to generate an updated global model. This process, which involves parameter fusion rather than model training on the server side, ensures that the entire system still adheres to the privacy constraint principle of "data not leaving the local machine."
[0262] The above scenario examples verify that the federated learning-based drilling risk determination method provided in this specification can indeed improve model accuracy and practicality while protecting data privacy, and significantly reduce the drilling operation accident rate.
[0263] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.
[0264] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.
[0265] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer-readable storage media, including storage devices.
[0266] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.
[0267] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.
[0268] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended contents include such variations and modifications without departing from the spirit of this specification.
Claims
1. A drilling risk determination method based on federated learning, characterized in that, Applied to a first node terminal, which is deployed in a first oil and gas region, the method includes: The system acquires reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by performing preset federated learning based on preset joint training rules, using sample data from multiple different oil and gas regions to protect the privacy of oil and gas region data, and then performing preset asynchronous updates at preset time intervals based on information freshness. The current global risk prediction model is matched and adjusted using reference data from drilled wells to obtain a current first risk prediction model that matches the current first oil and gas region. The current first risk prediction model is used to process the associated data of the target well to obtain the target prediction results for the target well; Based on the target prediction results, determine whether there is currently any drilling risk in the target well; The method further includes: receiving a joint training request; responding to the joint training request and acquiring sample data from a first oil and gas region; constructing an initial first prediction model according to preset joint training rules; training the initial prediction model locally using the sample data from the first oil and gas region to obtain a corresponding first prediction model; simultaneously, determining model auxiliary data for the first prediction model based on the sample data from the first oil and gas region and the first prediction model; wherein the model auxiliary data includes at least: statistical results of the distribution of characteristics of the sample data from the first oil and gas region, the collection time of the sample data from the first oil and gas region, the training completion time of the first prediction model, and the contribution parameters of the sample data from the first oil and gas region to the first prediction model; and adjusting the model parameters of the first prediction model according to preset joint training rules. The model auxiliary data are encrypted to obtain encrypted data of the model parameters of the first prediction model and encrypted data of the model auxiliary data. The encrypted data of the model parameters of the first prediction model and the encrypted data of the model auxiliary data are then sent to the central node server. The central node server receives encrypted data of the model parameters and encrypted data of multiple prediction models based on different oil and gas regions, uploaded by node terminals in different oil and gas regions. Furthermore, according to preset joint training rules and based on a reinforcement learning framework, the central node server dynamically weights and aggregates the encrypted data of the model parameters and encrypted data of multiple prediction models in encrypted state to obtain a global risk prediction model. The central node server then receives the global risk prediction model.
2. The method according to claim 1, characterized in that, The step of constructing an initial first prediction model according to preset joint training rules includes: Based on the preset joint training rules, the initial first prediction model is constructed using the Tiny-LSTM structure.
3. The method according to claim 1, characterized in that, The central node server, based on a reinforcement learning framework and according to preset joint training rules, dynamically weights and aggregates the encrypted data of model parameters and model auxiliary data of multiple prediction models in the encrypted state: According to the preset joint training rules, the encrypted data of the model auxiliary data is decrypted to obtain the model auxiliary data. Based on the model-aided data, the characteristic distribution statistics of sample data from multiple oil and gas regions are extracted, as well as the contribution parameters of sample data from multiple oil and gas regions to the prediction model. Based on the encrypted data of the model parameters of multiple prediction models, the encrypted data of the gradient parameters of the prediction models for multiple oil and gas regions are determined. By utilizing the statistical results of the characteristic distribution of sample data from multiple oil and gas regions, and by clustering the contribution parameters of the sample data from multiple oil and gas regions to the prediction model, multiple oil and gas region groups are divided; each oil and gas region group corresponds to a training condition type. According to the preset joint training rules, based on the reinforcement learning framework, the agent performs local weighted aggregation of the encrypted data of the model parameters of the prediction models of different oil and gas regions in each oil and gas region group, and obtains the encrypted data of the model parameters of multiple local prediction models corresponding to multiple oil and gas region groups respectively. Based on the encrypted data of model parameters of multiple local prediction models, as well as the encrypted data of model parameters and gradient parameters of prediction models of different oil and gas regions in the corresponding oil and gas region group, the variation characteristics of model parameters of multiple local prediction models are determined. Based on the preset joint training rules and the reinforcement learning framework, the agent performs global weighted aggregation based on the variation characteristics of the model parameters of each local prediction model and the encrypted data of the model parameters of multiple local prediction models to obtain the corresponding global risk prediction model.
4. The method according to claim 1, characterized in that, The method further includes: The system receives an update request for the second time period initiated by the central node server. The central node server acquires and calculates the information freshness of the update data of each node terminal based on the update data provided by each node terminal at a preset time interval after the first time period. Based on the information freshness, the central node server determines the node terminal that meets the update triggering condition for the second time period and sends the corresponding update request for the second time period to that node terminal. In response to the update request of the second time period, according to the preset joint training rules, the newly added sample data of the first oil and gas region in the second time period is obtained; According to the preset joint training rules, the global risk prediction model for the first time period is trained locally using the newly added sample data of the first oil and gas region in the second time period to obtain the first updated model for the second time period; at the same time, the updated model auxiliary data for the first updated model in the second time period is obtained; wherein, the updated model auxiliary data carries at least the relevant timestamp information. The encrypted data of the model parameters of the first updated model in the second time period and the encrypted data of the updated model auxiliary data are sent to the central node server as update data; wherein, the central node server asynchronously updates the global risk prediction model of the first time period based on the received encrypted data of the model parameters of the updated model in the second time period and the encrypted data of the updated model auxiliary data, to obtain the global risk prediction model of the second time period. Receive the global risk prediction model for the second time period issued by the central node server.
5. The method according to claim 4, characterized in that, The central node server calculates the information freshness of the updated data from the first node terminal in the following manner: Based on the updated data from the first node terminal, obtain the relevant timestamp information; Obtain the communication network parameters and / or processing resource parameters of the first node terminal for the second time period; Based on the relevant timestamp information, and the communication network parameters and / or processing resource parameters of the first node terminal in the second time period, the information freshness of the updated data of the first node terminal is determined.
6. The method according to claim 4, characterized in that, If the central node server does not receive updated data uploaded by the first node terminal within a preset waiting period, the method further includes: The central node server obtains the update data provided by the first node terminal at the nearest time point and uses it as the pseudo update data for the first time period of the first node terminal; and adjusts the weight parameters of the first oil and gas region to which the first node terminal belongs in the reinforcement learning framework to obtain the adjusted reinforcement learning framework. Based on the adjusted reinforcement learning framework, the central node server asynchronously updates the global risk prediction model for the first time period using pseudo-update data from the first node terminal in the first time period and update data from the second time period uploaded by other node terminals, thus obtaining the global risk prediction model for the second time period.
7. The method according to claim 1, characterized in that, The step of performing matching encryption processing on the model parameters of the first prediction model according to preset joint training rules includes: Determine the sample data corresponding to the model parameters of the first prediction model; The importance and frequency of change of the sample data, as well as the computing power and / or bandwidth resource parameters of the first node terminal; Based on the importance and frequency of change of the sample data, as well as the computing power and / or bandwidth resource parameters of the first node terminal, the encryption level of the model parameters of the first prediction model corresponding to the sample data is determined. Based on the encryption level of the model parameters of the first prediction model corresponding to the sample data, the model parameters of the first prediction model are encrypted in a matching manner.
8. The method according to claim 1, characterized in that, The reinforcement learning framework also integrates a feature mapping and alignment network, which is used to map the encrypted data of model parameters of multiple prediction models in different oil and gas regions to the same shared feature space and perform semantic alignment processing.
9. A drilling risk determination device based on federated learning, characterized in that, The device is applied to a first node terminal, which is deployed in a first oil and gas region, and includes: The acquisition module is used to acquire reference data of drilled wells, associated data of target wells, and the current global risk prediction model in the first oil and gas region during the current time period. The current global risk prediction model is a model obtained by using sample data from multiple different oil and gas regions to perform preset federated learning based on the privacy protection of oil and gas region data, and asynchronously updating the model based on the information freshness of the current time period, according to preset joint training rules. The adjustment module is used to match and adjust the current global risk prediction model using reference data from drilled wells, so as to obtain the current first risk prediction model that matches the current first oil and gas region. The processing module is used to process the associated data of the target well using the current first risk prediction model to obtain the target prediction results for the target well; The determination module is used to determine whether there is a drilling risk in the target well based on the target prediction results; The device is further configured to: receive a joint training request; respond to the joint training request and acquire sample data from a first oil and gas region; construct an initial first prediction model according to preset joint training rules; train the initial prediction model locally using the sample data from the first oil and gas region to obtain a corresponding first prediction model; simultaneously, determine model auxiliary data for the first prediction model based on the sample data from the first oil and gas region and the first prediction model; wherein the model auxiliary data includes at least: statistical results of the distribution of characteristics of the sample data from the first oil and gas region, the acquisition time of the sample data from the first oil and gas region, the training completion time of the first prediction model, and the contribution parameters of the sample data from the first oil and gas region to the first prediction model; and, according to preset joint training rules, adjust the model parameters of the first prediction model and... The model auxiliary data are encrypted to obtain encrypted data of the model parameters of the first prediction model and encrypted data of the model auxiliary data. The encrypted data of the model parameters of the first prediction model and the encrypted data of the model auxiliary data are then sent to the central node server. The central node server receives encrypted data of the model parameters and encrypted data of multiple prediction models based on different oil and gas regions, uploaded by node terminals in different oil and gas regions. Furthermore, according to preset joint training rules and based on a reinforcement learning framework, the central node server dynamically weights and aggregates the encrypted data of the model parameters and encrypted data of multiple prediction models in encrypted state to obtain a global risk prediction model. The central node server then receives the global risk prediction model.
Citation Information
Patent Citations
Well drilling risk early determination method and device
CN116050822A
Method and device for determining drilling risk
CN120725424A