Shale oil flowback intelligent system based on horizontal well multiphase critical flow

The intelligent shale oil flowback system, which optimizes pumping rates through adversarial networks and deep reinforcement learning, solves the flow control problem in shale oil wells under varying environments, achieving efficient and stable flow management and energy optimization, and improving shale oil extraction efficiency.

CN121581111BActive Publication Date: 2026-04-21CHENGDU CHUANGYUAN OIL & GAS TECH DEV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU CHUANGYUAN OIL & GAS TECH DEV
Filing Date
2026-01-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies cannot cope with the variable environment of shale oil wells, cannot achieve efficient and stable flow control under different working conditions, and the control effect is not stable enough.

Method used

A shale oil flowback intelligent system based on multiphase critical flow rate in horizontal wells is adopted. By optimizing the pumping rate through adversarial networks and deep reinforcement learning, and combined with real-time data processing and visualization, the system can achieve precise calibration of downhole fluid state and real-time adjustment of flow rate.

Benefits of technology

It enables flexible and precise control of flow rate in variable downhole environments, maximizes flowback efficiency and minimizes energy consumption, thereby improving the production efficiency and economic benefits of shale oil extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581111B_ABST
    Figure CN121581111B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells, relating to the field of intelligent control technology. It includes a data acquisition and generation module that acquires real-time data, preprocesses it, and generates a real-time estimation vector; a construction and writing module that builds an adversarial network, takes the real-time estimation vector as input, outputs the optimal critical vector, defines the state space and action space, and applies a reinforced decision-making mechanism to generate the final pumping rate before writing it into a register to execute the pumping operation; and a calculation and judgment module that, based on the pumping operation, reacquires real-time data to calculate the trigger value and determines whether the pumping operation has fallen into an invalid steady state based on the trigger value. This invention not only optimizes flowback flow rates in real time but also provides a more flexible and precise control strategy in the face of variable downhole environments, thereby effectively improving the production efficiency and economic benefits of shale oil extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent control technology, and in particular to an intelligent system for shale oil flowback based on multiphase critical flow rates in horizontal wells. Background Technology

[0002] With the continuous increase in global energy demand, shale oil, as an important unconventional energy resource, has become one of the key areas of development in the oil and gas industry. Shale oil extraction relies on horizontal well technology, which uses hydraulic fracturing to release oil from underground shale into the wellbore and then pumps it to the surface through flowback. The shale oil flowback process involves complex multiphase fluid flows, including the interaction of liquids, gases, and solids, and flow control and optimization of flowback efficiency have always been challenging engineering problems. In recent years, with the development of intelligent technologies, using advanced computational methods and automated control techniques to optimize flowback has become an important way to improve shale oil extraction efficiency.

[0003] Existing technologies often rely on training with large amounts of historical data. However, shale oil wells are subject to frequent dynamic changes, and a single data-driven approach cannot cope with the changing environment in actual operation. Furthermore, existing technologies mostly focus on flow prediction and control, while failing to adequately consider the comprehensive optimization of factors such as the critical state, pressure, and temperature of downhole multiphase flow. This results in the inability to achieve efficient and stable control under different operating conditions. In addition, they often rely on large offline datasets and are difficult to adapt to real-time field data quickly, leading to unstable control performance. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells, which solves the problems that existing technologies cannot cope with the variable environment in actual operation, cannot achieve efficient and stable control under different working conditions, and have unstable control effects.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells, comprising,

[0008] The data acquisition and generation module collects real-time data, performs preprocessing, and generates a real-time estimation vector.

[0009] A writing module is constructed, an adversarial network is built, the real-time estimated vector is taken as input, the optimal critical vector is output, the state space and action space are defined, and after the final pumping rate is generated by applying a reinforcement decision mechanism, it is written to the register to execute the pumping operation.

[0010] The calculation and judgment module re-acquires real-time data based on the pumping operation to calculate the trigger value, and judges whether the pumping operation has fallen into an invalid steady state based on the trigger value;

[0011] The integrated module is updated. Based on the judgment results, the adjustment value is calculated using the sigmoid function to execute the parameter update feedback, and the final pumping rate is generated. Then, it is visualized, encrypted, and stored.

[0012] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells according to the present invention, the construction of the adversarial network, which takes the real-time estimation vector as input and outputs the optimal critical vector, includes:

[0013] An adversarial network is constructed using a multilayer perceptron architecture, comprising a generator and a discriminator.

[0014] The real-time estimation vector is used as the input of the adversarial network. The generator of the adversarial network receives the real-time estimation vector, and after the real-time estimation vector is nonlinearly transformed through the hidden layer, the critical flow rate value is output by the output layer and concatenated into a critical vector, which includes the critical flow rate at the wellhead, the critical pressure downhole, the critical temperature, and the critical oil-gas-water ratio.

[0015] Backtracking is performed based on the critical vector, the corresponding real-time estimation vector is extracted and combined to generate a training sample set and input into the discriminator. The discriminator evaluates the training sample set through L1 loss and outputs the true and false probabilities of the training sample set.

[0016] Set a judgment threshold and compare the true and false probabilities with the judgment threshold. If the true and false probabilities are greater than the judgment threshold, the critical vector generated by the generator is judged to be true and matches the real-time estimated vector. Otherwise, the critical vector generated by the generator is judged to be false and does not match the real-time estimated vector.

[0017] When the critical vector is real and matches the real-time estimated vector, the critical vector output by the generator is taken as the optimal vector.

[0018] When the critical vector is not real and does not match the real-time estimated vector, the discriminator feeds back the discrimination result to the generator and uses the Adam optimizer to optimize and update the model parameters of the generator in the adversarial network. During the update process, the backpropagation of the model parameters is performed through the backpropagation algorithm. When the loss function no longer decreases significantly, the iteration stops and the optimal critical vector is output.

[0019] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, the definition of the state space and action space, and the application of an enhanced decision-making mechanism to generate the final pumping rate, includes:

[0020] Backtracking is performed based on the optimal critical vector. After extracting the real-time estimation vector, the optimal critical vector is combined to generate a state space, and the components in the real-time estimation vector and the optimal critical vector are defined as states.

[0021] After setting the pumping rate, it serves as the action space, and the pumping rate is defined as the action.

[0022] The Q-network and the target network are constructed using a convolutional neural network architecture;

[0023] Construct a reward function to maximize traffic efficiency and minimize energy consumption;

[0024] Based on the states and actions in the state and action space, the Q-network is used to perform forward propagation to generate the initial Q-value. Combined with the reward function, the Bellman equation is used to update the initial Q-value to obtain the updated Q-value.

[0025] The initial Q value is updated using the Bellman equation;

[0026] Sort the data in descending order based on the updated Q-values, and select the action with the maximum updated Q-value as the pumping rate. After iterating to the maximum number of times, output the final pumping rate.

[0027] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, wherein: the step of writing to the register to perform the pumping operation includes:

[0028] The final pumping rate is used as the basis for shale oil return. After the final pumping rate is written into the field of the pumping equipment register through a digital communication protocol, the pumping equipment adjusts the pumping status and performs pumping operations according to the field.

[0029] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells according to the present invention, the step of re-acquiring real-time data to calculate the trigger value based on the pumping operation, and determining whether the pumping operation has fallen into an invalid steady state based on the trigger value, includes:

[0030] Based on the pumping operation, real-time data is reacquired, wellhead flow rate is extracted, and the absolute difference between the wellhead flow rate at the current time point and the previous time point is calculated and defined as the trigger value.

[0031] Set a feedback threshold. If the trigger value is less than the feedback threshold, it is determined that the current state is in an invalid steady state. Otherwise, it is determined that the current state is in an effective state, and the final pumping rate and trigger value are recorded.

[0032] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells according to the present invention, the step of generating the final pumping rate by calculating the adjustment value of the execution parameter update feedback based on the judgment result and the sigmoid function includes:

[0033] When trapped in an invalid steady state, the sigmoid function is used in conjunction with the trigger value to calculate the adjustment value;

[0034] The adjusted value is summed with the judgment threshold to form the new judgment threshold. The newly acquired real-time data is then fused until a new final pumping rate is output. This is then written into the field of the pumping device register via a digital communication protocol for pumping operation.

[0035] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, the further visualization includes:

[0036] The comparison process of the feedback threshold is displayed using visualization tools. When the system enters an invalid steady state, the current comparison result is indicated in red; otherwise, it is indicated in green.

[0037] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, the encryption includes:

[0038] The final pumping rate or the new final pumping rate and the trigger value are converted into a file package using an editor. The file package is then encrypted using a symmetric encryption algorithm to obtain an encrypted data packet, which is then transmitted to the database.

[0039] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, the storage includes:

[0040] An index table is created in the database, and after adding a timestamp to the encrypted data packet, the encrypted data packets are added to the index table for storage in the order of the timestamps.

[0041] As a preferred embodiment of the intelligent shale oil flowback system based on multiphase critical flow rates in horizontal wells described in this invention, the real-time data acquisition is preprocessed to generate a real-time estimation vector, including:

[0042] Real-time data from the wellhead and downhole is collected through sensors, including wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio data.

[0043] Denoise and standardize real-time data, and integrate them into a real-time dataset;

[0044] Based on the real-time dataset, real-time estimates for each data point are generated using the recursive formula of the standard Kalman filter, including estimates for wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio. The real-time estimates are then concatenated to obtain a real-time estimation vector.

[0045] The beneficial effects of this invention are as follows: By introducing an adversarial network, this invention can accurately calibrate the critical flow rate of downhole fluids and adjust the flow rate according to real-time data. Meanwhile, deep reinforcement learning adaptively optimizes the pumping rate based on feedback rewards, maximizing flowback efficiency and minimizing energy consumption. This not only optimizes flowback flow rate in real time, but also provides a more flexible and precise control strategy when facing a variable downhole environment, thereby effectively improving the production efficiency and economic benefits of shale oil extraction. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a structural diagram of the intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells in Example 1.

[0048] Figure 2 This is a flowchart of constructing the writing module in Example 1.

[0049] Figure 3 This is a flowchart illustrating whether an invalid steady state is trapped in Example 1. Detailed Implementation

[0050] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0051] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0052] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0053] Example 1, referring to Figures 1-3 This is the first embodiment of the present invention, which provides a smart shale oil flowback system based on multiphase critical flow rates in horizontal wells, comprising the following steps:

[0054] S1, Acquisition and Generation Module: Acquires real-time data, performs preprocessing, and generates a real-time estimation vector;

[0055] Specifically, real-time data is collected, preprocessed, and used to generate real-time estimation vectors, including:

[0056] Real-time data from the wellhead and downhole is collected through sensors, including wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio data.

[0057] Sensors include flow sensors, pressure sensors, temperature sensors, flow meters, and water separators;

[0058] Denoise and standardize real-time data, and integrate them into a real-time dataset;

[0059] Based on the real-time dataset, real-time estimates for each data point are generated using the recursive formula of the standard Kalman filter, including estimates for wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio. The real-time estimates are then concatenated to obtain a real-time estimation vector.

[0060] By employing real-time data preprocessing and Kalman filtering techniques, accurate estimation of multi-dimensional downhole flow states is achieved, providing reliable data support for flowback optimization. The Kalman filter effectively removes measurement noise and improves data accuracy, especially in complex downhole environments, accurately estimating key parameters such as wellhead flow rate, pressure, temperature, and oil-gas-water ratio. Furthermore, by generating real-time estimation vectors through multi-dimensional data stitching, the system comprehensively reflects downhole flow dynamics, providing precise input information for subsequent optimization decisions.

[0061] S2. Construct a writing module, build an adversarial network, take the real-time estimated vector as input, output the optimal critical vector, define the state space and action space, and apply a reinforced decision-making mechanism to generate the final pumping rate, and then write it into the register to execute the pumping operation.

[0062] Specifically, an adversarial network is constructed, which takes the real-time estimated vector as input and outputs the optimal critical vector, including:

[0063] An adversarial network is constructed using a multilayer perceptron architecture, comprising a generator and a discriminator.

[0064] The real-time estimation vector is used as the input of the adversarial network. The generator of the adversarial network receives the real-time estimation vector, and after the real-time estimation vector is nonlinearly transformed through the hidden layer, the critical flow rate value is output by the output layer and concatenated into a critical vector, which includes the critical flow rate at the wellhead, the critical pressure downhole, the critical temperature, and the critical oil-gas-water ratio.

[0065] The nonlinear transformation of the real-time estimated value through the hidden layer is expressed by the following formula:

[0066]

[0067] In the formula, Indicates the first Transformation estimation vector of hidden layer Represents the ReLU activation function. Indicates the first The weight matrix of the hidden layer, Indicates the first The transformation estimation vector of the hidden layer (for the first layer, the transformation estimation value is the real-time estimation value). Indicates the first The bias vector of the hidden layer;

[0068] The formula for utilizing the critical flow rate value output by the output layer is as follows:

[0069]

[0070] In the formula, This represents the critical flow rate value. Indicates a point in time. This represents state variables (i.e., pressure, flow rate, temperature, oil-gas-water ratio). The parameters of the generator (weight matrix and bias vector) are represented. Indicates the first Critical flow rate values ​​for each time interval. Indicates the first Generator parameters for each time interval This indicates the indicator function (i.e., at the current time point). Falling within the time range (The critical flow rate value is only valid within this timeframe).

[0071] in, Generated through linear transformation, the formula is:

[0072]

[0073] In the formula, This represents the weight matrix of the output layer. Indicates the first Transformation estimates for hidden layers. This represents the bias vector of the output layer;

[0074] Backtracking is performed based on the critical vector, the corresponding real-time estimation vector is extracted and combined to generate a training sample set and input into the discriminator. The discriminator evaluates the training sample set through L1 loss and outputs the true and false probabilities of the training sample set.

[0075] The discriminator evaluates the training sample set using L1 loss, as shown in the formula:

[0076]

[0077] In the formula, This represents the L1 loss value of the discriminator. This represents the total number of training samples. Represents absolute value. Indicates at a point in time Time state variables Real-time estimated value;

[0078] Set a judgment threshold (this judgment threshold is set based on the range of true and false probabilities, which is usually between 0 and 1, and the judgment threshold is also set to the range of 0 to 1, with 0.5 as the default value of the judgment threshold). Compare the true and false probabilities with the judgment threshold. If the true and false probabilities are greater than the judgment threshold, the judgment generator's generated critical vector is considered true and matches the real-time estimated vector. Otherwise, the judgment generator's generated critical vector is considered false and does not match the real-time estimated vector.

[0079] When the critical vector is real and matches the real-time estimated vector, the critical vector output by the generator is taken as the optimal vector.

[0080] When the critical vector is not real and does not match the real-time estimated vector, the discriminator feeds back the discrimination result to the generator and uses the Adam optimizer to optimize and update the model parameters of the generator in the adversarial network. During the update process, the backpropagation of the model parameters is performed through the backpropagation algorithm. When the loss function no longer decreases significantly, the iteration stops and the optimal critical vector is output.

[0081] By training with an adversarial network, the generator can learn the complex changing characteristics of multiphase fluids and generate critical values ​​that match the actual fluid state. Traditional methods typically rely on static models and cannot adapt to changes in the downhole environment in real time, while GANs can effectively capture these dynamic changes. Furthermore, the generated optimal critical vector allows the system to accurately predict and adjust the pumping rate, avoiding the simplistic assumptions about backflow rate and multiphase flow state in traditional empirical formulas, and enabling precise control of the backflow process. Moreover, this invention employs a multilayer perceptron architecture, using hidden layers to perform nonlinear transformations on the real-time estimation vector to generate critical flow values. The multilayer perceptron can progressively extract deep features from the data through its hierarchical structure, while the ReLU activation function provides the ability for nonlinear transformation, enabling the network to fit complex input-output relationships. The use of nonlinear transformation effectively overcomes the limitations of traditional methods that rely on linear assumptions about the downhole multiphase flow state, thereby improving the accuracy of flow prediction and control. Secondly, when comparing the critical flow value output by the generator with the actual real-time estimation value, L1 loss is used to evaluate the degree of matching. L1 loss is highly robust to outliers, effectively reducing the impact of noise and data errors on model training. Furthermore, the discriminator evaluates the realism of the generator's output by calculating the L1 loss, ensuring that the generated critical vector matches the actual downhole flow state, further improving the system's accuracy and reliability.

[0082] Furthermore, the state space and action space are defined, and a reinforcement decision-making mechanism is applied to generate the final pumping rate, including:

[0083] Backtracking is performed based on the optimal critical vector. After extracting the real-time estimation vector, the optimal critical vector is combined to generate a state space, and the components in the real-time estimation vector and the optimal critical vector are defined as states.

[0084] After setting the pumping rate according to the pump's instruction manual and factory parameters, the pumping rate is used as the operating space and defined as the action.

[0085] The Q-network and the target network are constructed using a convolutional neural network (CNN) architecture.

[0086] It should be noted that the operation steps for training the Q network are the same as standard model training. That is, the mean squared error is used as the objective function of the Q network, the Adam optimizer is used to update and optimize the model parameters of the Q network, the iteration stops when the decrease value of the objective function no longer decreases significantly, and the trained Q network is output. Then, the model parameters of the Q network are copied to the target network.

[0087] Construct a reward function to maximize traffic efficiency and minimize energy consumption, with the following formula:

[0088]

[0089] In the formula, Indicates a point in time The reward function value at that time, Weights representing traffic efficiency Indicates a point in time Traffic efficiency at that time Indicates the weight of energy consumption. Indicates a point in time Energy consumption at that time;

[0090] The formula for calculating flow efficiency is:

[0091]

[0092] In the formula, Indicates a point in time Wellhead flow rate at time Indicates the target traffic (which can be set by consulting relevant books);

[0093] The formula for calculating energy consumption is:

[0094]

[0095] In the formula, Indicates a point in time The pumping power at that time (which can be acquired by a power sensor). Indicates pumping time;

[0096] Based on the states and actions in the state and action space, the Q-network is used to perform forward propagation to generate the initial Q-value. Combined with the reward function, the Bellman equation is used to update the initial Q-value to obtain the updated Q-value.

[0097] The initial Q-value is generated by performing forward propagation using a Q-network, and the formula is as follows:

[0098]

[0099] In the formula, Indicates the state given and actions Q value under, Indicates a point in time The state at that time, Indicates a point in time The action at that time Indicates the first The ReLU activation function of the layer, This represents the weight matrix of the first layer in a Q-network. This represents the bias vector of the first layer in a Q-network;

[0100] It should be noted that: when generating the initial Q-value, the experience replay technique is used to store the state-action-reward-next state quadruple for each time into the experience pool, and samples are randomly selected and the target network's soft update method is used to train and update the parameters of the Q-value network.

[0101] The initial Q value is updated using the Bellman equation, and the formula is as follows:

[0102]

[0103] In the formula, Indicates at a point in time Given a state and actions The updated Q value, This represents the discount factor (which controls the degree of influence of future rewards on the current Q value, and its value ranges from 0 to 1, while the present invention can use 0.9 as the default value). This indicates the operation of retrieving the maximum value. Indicates at a point in time Given a state and actions The Q value below;

[0104] Sort the data in descending order based on the updated Q-values, and select the action with the maximum updated Q-value as the pumping rate. After iterating to the maximum number of times, output the final pumping rate.

[0105] By generating a state space using the optimal critical vector and real-time estimated vector, the system accurately reflects the downhole flow state, providing precise input for subsequent optimization. Compared to traditional methods, this approach can respond to changes in the downhole flow state in real time, effectively improving the accuracy of backflow flow control. Furthermore, this invention uses the pumping rate set based on the pumping equipment manual and factory parameters as the action space, and utilizes deep reinforcement learning to optimize the pumping rate, maximizing backflow efficiency and minimizing energy consumption. The introduction of deep reinforcement learning enables the system to adaptively adjust, automatically optimizing the control strategy based on real-time feedback, overcoming the limitations of traditional empirical models. In addition, a convolutional neural network (CNN) is used to construct a Q-network and a target network, and empirical replay technology is used to improve the stability and efficiency of training. The Q-network generates an initial Q-value through forward propagation and updates it using the Bellman equation, ultimately optimizing the pumping strategy. The soft update mechanism of the target network ensures stability during training, avoiding excessive oscillations. Through the optimized Q-value, the system can select the optimal pumping rate, thereby precisely controlling the backflow flow. Secondly, by designing a reward function that incorporates flow efficiency and energy consumption, fine-grained optimization of the backflow flow is achieved. The advantage of this method is that it can optimize the flowback flow in real time and accurately, reduce energy consumption, improve overall production efficiency, and significantly enhance the level of intelligence in the shale oil extraction process.

[0106] Furthermore, writing to the register performs the pumping operation, including:

[0107] The final pumping rate is used as the basis for shale oil backflow. After the final pumping rate is written into the field of the pumping equipment register (e.g., target flow rate or target speed) through a digital communication protocol, the pumping equipment adjusts the pumping status and performs pumping operations (e.g., speed) according to the field.

[0108] By adjusting the pumping rate in real time, combined with digital communication protocols and intelligent feedback control, precise optimization of the shale oil flowback process is achieved. The pumping rate control signal is transmitted via digital communication protocols, ensuring that the pumping equipment can accurately receive and execute optimal control commands, improving control accuracy and real-time performance. The system adjusts the pumping rate through feedback, dynamically responding to flow changes in complex downhole environments, ensuring optimal flowback volume, maximizing flow efficiency, and minimizing energy consumption. Furthermore, the pumping equipment automatically adjusts its operating status based on target flow rate or rotational speed, improving equipment operating efficiency and stability.

[0109] S3, Calculation and Judgment Module: Based on the pumping operation, re-acquire real-time data to calculate the trigger value, and determine whether the pumping operation has fallen into an invalid steady state based on the trigger value;

[0110] Specifically, based on the pumping operation, real-time data is reacquired to calculate the trigger value. The trigger value is then used to determine whether the pumping operation has fallen into an invalid steady state, including:

[0111] Based on the pumping operation, real-time data is reacquired, wellhead flow rate is extracted, and the absolute difference between the wellhead flow rate at the current time point and the previous time point is calculated and defined as the trigger value.

[0112] Set a feedback threshold (the value of which can be set from 0.1 to 5 cubic meters based on the minimum effective detection threshold of flow rate change, while the present invention can take 1.0 cubic meters as the default value). When the trigger value is less than the feedback threshold, it is determined that the current state is in an invalid steady state; otherwise, it is determined that the current state is in an effective state, and the final pumping rate and trigger value are recorded.

[0113] By introducing a feedback threshold and trigger value mechanism, precise control of shale oil flowback flow is achieved. By calculating changes in wellhead flow rate in real time and comparing them with the set feedback threshold, the system can determine in real time whether it is in an effective or ineffective steady state, thereby automatically adjusting the pumping rate and optimizing the flowback flow. When the flowback flow is in an effective state, the system can maintain the optimal pumping rate, maximizing flow efficiency and reducing energy consumption; while in an ineffective steady state, the system will actively adjust the pumping rate to avoid unnecessary energy waste. Furthermore, by recording and feeding back the trigger value and pumping rate, the system can not only optimize flowback control in real time, but also continuously accumulate data, learn, and adjust over long-term operation, further improving the accuracy and adaptability of flow control.

[0114] S4. Update the integrated module. Based on the judgment result, combine the adjustment value calculated by the sigmoid function to update the execution parameters, generate the final pumping rate, and then perform visualization, encryption and storage.

[0115] Specifically, based on the judgment result, combined with the sigmoid function to calculate the adjustment value and execute the parameter update feedback, the final pumping rate is generated, including:

[0116] When the system enters an invalid steady state, the adjustment value is calculated using the sigmoid function combined with the trigger value, as shown in the formula:

[0117]

[0118] In the formula, Indicates the adjustment value. This represents the feedback increment value. Represents an exponential function. This indicates the sensitivity value to changes in flow rate. Indicates at a point in time The trigger value at that time;

[0119] Feedback increase value and flow rate change sensitivity value It is a constant that controls the adjustment range, and the feedback increase value. This determines the magnitude of the impact of flow rate changes on the adjustment of the judgment threshold; if the feedback increase value... If the value is too small (e.g., 0.01), the impact of flow rate changes on feedback adjustment will be too weak to have a practical effect; conversely, if the value is set too large (e.g., 1.0), the feedback adjustment will become too drastic, potentially causing significant fluctuations in the judgment threshold and affecting system stability. Therefore, this invention uses 0.1 as the default value. Secondly, a larger flow rate change sensitivity value... This allows for rapid adjustment of the feedback when the flow rate changes significantly, while maintaining a sensitivity value for smaller flow rate changes. This would make the feedback adjustment smoother; therefore, 0.5 can be used as the default value in this invention.

[0120] The adjusted value is summed with the judgment threshold to form the new judgment threshold. The newly acquired real-time data is then fused until a new final pumping rate is output. This is then written into the field of the pumping device register via a digital communication protocol for pumping operation.

[0121] By introducing the sigmoid function, feedback amplification value, and flow rate change sensitivity value, precise adjustment of the pumping rate is achieved, significantly improving the system response and stability during shale oil flowback. Utilizing the sigmoid function for non-linear adjustment of flow rate ensures smooth optimization of the pumping rate, avoiding over-reaction or instability and improving the accuracy of flowback flow control. Furthermore, by setting the feedback amplification value and flow rate change sensitivity value, this invention effectively balances the system's response speed and stability to flow rate changes, avoiding overly drastic adjustments or sluggish responses, ensuring stability and efficiency during the flowback process.

[0122] Furthermore, a visual presentation will be provided, including:

[0123] The comparison process of the feedback threshold is displayed using visualization tools. When the system enters an invalid steady state, the current comparison result is indicated in red; otherwise, it is indicated in green.

[0124] By using visualization tools to show the feedback threshold comparison process, the intuitiveness of system operation and decision-making efficiency are significantly improved. Through red and green displays, operators can quickly identify whether the pumping operation is effective, promptly detect and correct "ineffective steady states," and avoid energy waste and equipment damage.

[0125] Furthermore, encryption includes:

[0126] The final pumping rate or the new final pumping rate and the trigger value are converted into a file package using an editor. The file package is then encrypted using a symmetric encryption algorithm to obtain an encrypted data packet, which is then transmitted to the database.

[0127] By converting pumping rates and trigger values ​​into structured data packets and employing symmetric encryption algorithms to ensure data security, the security and efficiency of the pumping control system are improved. The encrypted data packets effectively prevent data leakage or tampering during transmission, ensuring data confidentiality and integrity.

[0128] Furthermore, storage includes:

[0129] An index table is created in the database, and after adding a timestamp to the encrypted data packet, the encrypted data packets are added to the index table for storage in the order of the timestamps.

[0130] By adding timestamps to encrypted data packets and storing them chronologically in an index table, data storage security and retrieval efficiency are significantly improved. The introduction of timestamps ensures the timeliness and orderliness of data, prevents data tampering, and provides a reliable basis for data traceability and auditing. The use of index tables accelerates data retrieval, especially in scenarios involving large-scale data storage and high-frequency access, enabling rapid location of target data and reducing query time.

[0131] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A smart shale oil flowback system based on multiphase critical flow rates in horizontal wells, characterized in that: include, The data acquisition and generation module collects real-time data, performs preprocessing, and generates a real-time estimation vector. The real-time data collected is preprocessed to generate a real-time estimation vector, including: Real-time data from the wellhead and downhole is collected through sensors, including wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio data. Denoise and standardize real-time data, and integrate them into a real-time dataset; Based on the real-time dataset, real-time estimates for each data point are generated using the recursive formula of the standard Kalman filter, including estimates for wellhead flow rate, downhole pressure, temperature, and oil-gas-water ratio. The real-time estimates are then concatenated to obtain a real-time estimation vector. A writing module is constructed, an adversarial network is built, the real-time estimated vector is taken as input, the optimal critical vector is output, the state space and action space are defined, and after the final pumping rate is generated by applying a reinforcement decision mechanism, it is written to the register to execute the pumping operation. The construction of the adversarial network, which takes the real-time estimated vector as input and outputs the optimal critical vector, includes: An adversarial network is constructed using a multilayer perceptron architecture, comprising a generator and a discriminator. The real-time estimation vector is used as the input of the adversarial network. The generator of the adversarial network receives the real-time estimation vector, and after the real-time estimation vector is nonlinearly transformed through the hidden layer, the critical flow rate value is output by the output layer and concatenated into a critical vector, which includes the critical flow rate at the wellhead, the critical pressure downhole, the critical temperature, and the critical oil-gas-water ratio. Backtracking is performed based on the critical vector, the corresponding real-time estimation vector is extracted and combined to generate a training sample set and input into the discriminator. The discriminator evaluates the training sample set through L1 loss and outputs the true and false probabilities of the training sample set. Set a judgment threshold and compare the true and false probabilities with the judgment threshold. If the true and false probabilities are greater than the judgment threshold, the critical vector generated by the generator is judged to be true and matches the real-time estimated vector. Otherwise, the critical vector generated by the generator is judged to be false and does not match the real-time estimated vector. When the critical vector is real and matches the real-time estimated vector, the critical vector output by the generator is taken as the optimal vector. When the critical vector is not real and does not match the real-time estimated vector, the discriminator feeds back the discrimination result to the generator and uses the Adam optimizer to optimize and update the model parameters of the generator in the adversarial network. During the update process, the backpropagation of the model parameters is performed through the backpropagation algorithm. When the loss function no longer decreases significantly, the iteration stops and the optimal critical vector is output. The definition of the state space and action space, and the application of a reinforced decision-making mechanism to generate the final pumping rate, includes: Backtracking is performed based on the optimal critical vector. After extracting the real-time estimation vector, the optimal critical vector is combined to generate a state space, and the components in the real-time estimation vector and the optimal critical vector are defined as states. After setting the pumping rate, it serves as the action space, and the pumping rate is defined as the action. The Q-network and the target network are constructed using a convolutional neural network architecture; Construct a reward function to maximize traffic efficiency and minimize energy consumption; Based on the states and actions in the state and action space, the Q-network is used to perform forward propagation to generate the initial Q-value. Combined with the reward function, the Bellman equation is used to update the initial Q-value to obtain the updated Q-value. The initial Q value is updated using the Bellman equation; Sort the data in descending order based on the updated Q-values, and select the action with the maximum updated Q-value as the pumping rate. After the maximum number of iterations is reached, output the final pumping rate. The calculation and judgment module re-acquires real-time data based on the pumping operation to calculate the trigger value, and judges whether the pumping operation has fallen into an invalid steady state based on the trigger value; The step of re-acquiring real-time data and calculating the trigger value based on the pumping operation, and determining whether the pumping operation has fallen into an invalid steady state based on the trigger value, includes: Based on the pumping operation, real-time data is reacquired, wellhead flow rate is extracted, and the absolute difference between the wellhead flow rate at the current time point and the previous time point is calculated and defined as the trigger value. Set a feedback threshold. If the trigger value is less than the feedback threshold, it is determined that the current state is in an invalid steady state; otherwise, it is determined that the current state is in an effective state, and the final pumping rate and trigger value are recorded. The integrated module is updated based on the judgment results, combined with the sigmoid function to calculate the adjustment value and execute the parameter update feedback, generating the final pumping rate, and then performing visualization, encryption and storage. The process of generating the final pumping rate based on the judgment result, combined with the sigmoid function calculation of the adjustment value execution parameter update feedback, includes: When trapped in an invalid steady state, the sigmoid function is used in conjunction with the trigger value to calculate the adjustment value; The adjusted value is summed with the judgment threshold to form the new judgment threshold. The newly acquired real-time data is then fused until a new final pumping rate is output. This is then written into the field of the pumping device register via a digital communication protocol for pumping operation.

2. The intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells as described in claim 1, characterized in that: The writing to the register performs a pumping operation, including: The final pumping rate is used as the basis for shale oil return. After the final pumping rate is written into the field of the pumping equipment register through a digital communication protocol, the pumping equipment adjusts the pumping status and performs pumping operations according to the field.

3. The intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells as described in claim 2, characterized in that: The subsequent visualization includes: The comparison process of the feedback threshold is displayed using visualization tools. When the system enters an invalid steady state, the current comparison result is indicated in red; otherwise, it is indicated in green.

4. The intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells as described in claim 3, characterized in that: The encryption includes: The final pumping rate or the new final pumping rate and the trigger value are converted into a file package using an editor. The file package is then encrypted using a symmetric encryption algorithm to obtain an encrypted data packet, which is then transmitted to the database.

5. The intelligent shale oil flowback system based on multiphase critical flow rate in horizontal wells as described in claim 4, characterized in that: The storage includes: An index table is created in the database, and after adding a timestamp to the encrypted data packet, the encrypted data packets are added to the index table for storage in the order of the timestamps.

Citation Information

Patent Citations

  • Simulation system and prediction method for dynamic sand-carrying capacity of drilling fluid

    CN114112822A

  • Method and device for optimizing working system of oil nozzle of shale gas horizontal well

    CN118133693A