Intelligent control methods, controllers, systems, and media for oil well edge based on hybrid modeling of mechanistic and artificial intelligence.

CN122131619APending Publication Date: 2026-06-02SHANGHAI BONDING WISDOM TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI BONDING WISDOM TECH CO LTD
Filing Date
2026-05-06
Publication Date
2026-06-02

Smart Images

  • Figure CN122131619A_ABST
    Figure CN122131619A_ABST
Patent Text Reader

Abstract

This invention relates to an intelligent control method, controller, system, and medium for oil well edges based on a hybrid modeling approach combining mechanistic and artificial intelligence. The method collects oil well operating data and simultaneously inputs it into a cognitive AI engine and a mechanistic verification model for parallel processing. It outputs operating condition probability prediction results, real-time production soft measurement results, and dynamic fluid level soft measurement results, along with corresponding confidence levels. The mechanistic verification model outputs physical constraint verification results and physical consistency scores based on physical equations. The above results undergo conflict judgment and confidence-weighted fusion. When hard physical constraints are violated, the mechanistic results are accepted; otherwise, a final diagnostic conclusion is output based on the score difference. Based on the diagnostic conclusion, a multi-objective optimization algorithm is used to calculate and execute the optimal control parameters. Deviation analysis is performed between the physical feedback data and the expected results. When the deviation exceeds a preset threshold, a parameter inversion process is triggered to automatically correct internal parameters, achieving cognitive self-repair and environmental adaptation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of petroleum industry automation, and in particular to an intelligent control method, controller, system and medium for oil well edges based on hybrid modeling of mechanism and artificial intelligence. Background Technology

[0002] In the modern petroleum industry, as oilfield development enters its mid-to-late stages, downhole conditions become increasingly complex, and the focus of well management has shifted from simple automated oil production to intelligent, efficient, and safe oil production. Current well control and diagnostic technologies primarily employ automation architectures based on traditional RTUs or PLCs. Wellhead controllers are mostly single-function embedded devices capable of basic data acquisition and simple threshold logic control. Regarding intelligent solutions, one type of technology uses purely data-driven neural network models for condition diagnosis, while another uses traditional chart methods or simplified mechanistic models for computational analysis. Furthermore, the software architecture of existing equipment is typically monolithic firmware, with control logic highly coupled to the underlying drivers. In terms of communication, existing systems usually rely on the cloud for complex data analysis and processing, requiring the raw data to be uploaded to the cloud for condition analysis.

[0003] However, the aforementioned existing technologies face several technical bottlenecks when confronted with increasingly complex intelligent demands. At the hardware computing power level, the lack of high-performance heterogeneous computing power makes it difficult for existing devices to run complex deep learning inference tasks locally, leading to a high dependence on the cloud and potential high latency issues in remote areas with unstable network signals. At the algorithm model level, purely data-driven neural network models exhibit "black box" characteristics, with outputs based on probability statistics and lacking physical constraints, potentially resulting in diagnostic results that do not conform to physical laws. Traditional mechanistic models, on the other hand, heavily rely on preset parameters; when these static parameters are incorrectly entered or change over time, the calculation results may be biased. At the software ecosystem level, traditional controllers lack containerized deployment capabilities; when adding new algorithm modules, it often requires rewriting and flashing the entire firmware. At the control strategy level, existing controllers typically adopt a single-objective linear adjustment method, which makes it difficult to achieve multi-objective optimization when faced with multiple physical constraints. At the same time, when the actual effect after the execution of control commands does not match the expectations, existing systems lack feedback-based parameter inversion and self-correction mechanisms, and are also unable to perceive the dynamic characteristics of reservoir environment evolution over time and automatically adjust the internal model. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide an intelligent control method, controller, system and medium for oil well edge based on hybrid modeling of mechanism and artificial intelligence. By integrating the physical mechanism model with the artificial intelligence model and realizing intelligent control at the edge, the accuracy and physical consistency of oil well condition diagnosis can be improved, the dependence on cloud communication can be reduced, local real-time decision-making and multi-objective optimization control can be realized, and the system can adapt to the dynamic changes of the reservoir environment through the parameter inversion mechanism.

[0005] To achieve the above objectives, the present invention adopts the following technical solution.

[0006] In a first aspect, the present invention provides an intelligent control method for oil well edges based on a hybrid modeling approach combining mechanism and artificial intelligence, employing the following technical solution: Oil well operation data is collected by an edge intelligent controller deployed at the wellhead; The oil well operation data is simultaneously input into the cognitive artificial intelligence engine and the mechanism verification model for parallel processing. The cognitive artificial intelligence engine outputs the probability prediction results of the operating conditions and the corresponding confidence scores of the operating conditions, the soft measurement results of real-time production and the corresponding confidence scores of the production soft measurement, and the soft measurement results of the dynamic fluid level and the corresponding confidence scores of the dynamic fluid level based on the multi-task deep learning model. The mechanism verification model outputs the physical constraint verification results and the physical consistency score based on the physical equation. The logic arbitrator performs a conflict judgment on the working condition probability prediction result and the physical constraint verification result. When the working condition probability prediction result violates the hard physical constraint, the physical constraint verification result is directly adopted as the working condition diagnosis conclusion. When there is no violation of hard physical constraint but there is a conflict, the final working condition diagnosis conclusion is output based on the difference between the artificial intelligence working condition score and the mechanism working condition score and the preset threshold. The logic arbitrator performs a soft measurement consistency check on the real-time production soft measurement results, the dynamic liquid level soft measurement results, and the physical constraint verification results. When the soft measurement results violate the hard physical constraints, the mechanism reference value is directly used as the output. When there is no violation of hard physical constraints, the soft measurement score and the mechanism score are weighted and fused based on confidence to output the final real-time production volume result and the final dynamic liquid level result. Based on the aforementioned operating condition diagnosis conclusions, the optimal control parameters are calculated using a multi-objective optimization algorithm while satisfying physical constraints. Execute the optimal control parameters and collect the physical feedback data after execution; The physical feedback data is compared with the expected results by deviation analysis. When the deviation exceeds a preset threshold, the parameter inversion process is triggered to automatically correct the internal parameters.

[0007] Furthermore, in the above method, the well operation data includes suspension point load data and displacement data collected by load sensors and displacement sensors, as well as three-phase current, voltage, and power data collected by smart meters. The method also includes cleaning and aligning the suspension point load data, displacement data, current, voltage, and power data to generate a real-time production data vector. The real-time production data vector includes at least a real-time dynamometer diagram vector and / or an electrical parameter vector. The multi-task deep learning model includes a shared backbone network and multiple task branches. The shared backbone network is a recurrent neural unit combined with an attention mechanism, used to extract time-series features. The multiple task branches include an operating condition prediction branch, a production volume prediction branch, and a dynamic fluid level prediction branch.

[0008] Furthermore, in the above method, the logic arbitrator includes a working condition diagnosis arbitration module and a soft measurement arbitration module. The working condition diagnosis arbitration module is used to determine the conflict between the working condition probability prediction result and the physical constraint verification result and output the final working condition diagnosis conclusion. The soft measurement arbitration module is used to perform consistency verification and fusion correction on the real-time production soft measurement result, the dynamic liquid level soft measurement result, and the physical constraint verification result. The artificial intelligence working condition score is jointly determined by the working condition prediction confidence and the working condition physical constraint violation penalty term. The soft measurement score is jointly determined by the corresponding soft measurement confidence and the soft measurement deviation penalty term. The mechanism score is jointly determined by the physical consistency score and the dynamic weight.

[0009] Furthermore, in the above method, the mechanism verification model includes the pumping unit kinematic equation, motor balance analysis equation, pump efficiency calculation formula, reservoir to surface multiphase flow temperature / pressure / density / flow differential equation, wellbore rod and tubing three-dimensional elastic mechanical equation, as well as inflow dynamic curve and vertical pipe flow curve. The physical constraint verification results include verification of whether the dynamic fluid level depth exceeds the pump depth and detection of rod string breakage characteristics.

[0010] Furthermore, in the above method, the multi-objective optimization algorithm is a non-dominated sorting genetic algorithm with an elite strategy. The multi-objective optimization algorithm takes maximizing output, minimizing energy consumption, and extending equipment life as optimization objectives, and uses the maximum stress of the rod column, the rated parameters of the motor, and the rated parameters of the pumping unit as the physical constraints. The optimal control parameters include pumping unit start-up and shutdown, stroke frequency, and stroke parameters. The method also includes sending the optimal control parameters to the frequency converter for execution.

[0011] Furthermore, in the above method, the parameter inversion process includes: The deviation was sampled multiple times to confirm that the deviation was not caused by random noise interference; The internal parameters causing the deviation are identified through reverse reasoning, wherein the internal parameters include at least one of the following: pump diameter, rod assembly information, friction coefficient, pump inlet / outlet pressure loss, oil volume change, and leakage; and The identified internal parameters are automatically corrected to bring the deviation between the predicted and measured values ​​closer together.

[0012] Secondly, the present invention provides an intelligent oil well edge controller based on hybrid modeling of mechanism and artificial intelligence, which adopts the following technical solution: The data acquisition module is configured to collect oil well operation data; The cognitive artificial intelligence engine is configured to process the oil well operation data based on a multi-task deep learning model to output the operating condition probability prediction results and corresponding operating condition prediction confidence, real-time production soft measurement results and corresponding production soft measurement confidence, and dynamic fluid level soft measurement results and corresponding dynamic fluid level soft measurement confidence. The mechanism verification model module is configured to process the oil well operation data based on physical equations to output physical constraint verification results and physical consistency scores; The logic arbitrator includes a condition diagnosis arbitration module and a soft measurement arbitration module. The condition diagnosis arbitration module is configured to perform conflict judgment on the condition probability prediction result and the physical constraint verification result. When the condition probability prediction result violates the hard physical constraint, the physical constraint verification result is directly adopted as the condition diagnosis conclusion. When there is no violation of hard physical constraint but there is a conflict, the final condition diagnosis conclusion is output based on the comparison of artificial intelligence condition score and mechanism condition score. The soft measurement arbitration module is configured to perform consistency verification and confidence-weighted fusion on the real-time production soft measurement result, the dynamic liquid level soft measurement result, and the physical constraint verification result. The multi-objective optimization module is configured to calculate the optimal control parameters based on the working condition diagnosis conclusions, provided that physical constraints are met. The control execution module is configured to execute the optimal control parameters. The parameter inversion module is configured to perform deviation analysis between the executed physical feedback data and the expected results, and automatically correct internal parameters when the deviation exceeds a preset threshold; and The cloud-edge collaboration module is configured to collect and comprehensively process the analysis results from various endpoints, and update the underground cognitive map with various functional modules and algorithm models.

[0013] Thirdly, the present invention provides an intelligent control system for oil well edges based on a hybrid modeling approach combining mechanism and artificial intelligence, employing the following technical solution: The physical terminal layer includes multiple well edge smart controllers as described in the second aspect above, deployed at the wellhead of the oil well. The edge node layer, communicatively connected to the physical terminal layer, is configured to perform data aggregation, model collaboration relay, and regional caching functions; and The cloud center layer communicates with the edge node layer and is configured to be responsible for global model aggregation and policy distribution. It transmits model data to the edge node layer through the model distribution channel and receives feature vectors from multiple edge intelligent controllers through the feature upload channel. It performs regional aggregation and spatial interpolation processing on the feature vectors to construct a regional underground cognitive map.

[0014] Furthermore, in the above system, the edge node layer is also configured to perform bidirectional transmission of model data between the physical terminal layer and the cloud center layer, wherein collected data and diagnostic results are uploaded via data stream, and updated models are received from the cloud center layer via model stream; the cloud center layer is also configured to perform global model aggregation optimization based on feature vectors from multiple edge intelligent controllers, and uniformly distribute the optimized models to the edge node layer.

[0015] Fourthly, the present invention provides a readable storage medium, which adopts the following technical solution: A readable storage medium storing computer instructions that, when executed by a processor, implement the method as described in any one of the first aspects above.

[0016] In summary, compared with the prior art, the present invention has at least one of the following beneficial technical effects: This invention achieves a deep integration of data-driven AI models and physical mechanism knowledge by simultaneously inputting oil well operating data into a cognitive AI engine and a mechanism verification model for parallel processing. A logic arbitrator performs conflict judgment and confidence-weighted fusion of the operating condition probability prediction results and physical constraint verification results. This leverages the advantages of deep learning models in complex pattern recognition while ensuring that diagnostic results conform to engineering physics logic through physical constraint verification, avoiding outputs that might violate physical laws from purely AI models. Furthermore, a multi-objective optimization algorithm calculates optimal control parameters under the premise of satisfying physical constraints, and deviation analysis and parameter inversion are performed based on post-execution physical feedback data. This allows the oil well edge intelligent controller to continuously approach the real physical state during operation, achieving cognitive self-repair and environmental adaptation. This improves the accuracy and reliability of oil well operating condition diagnosis, reduces the false diagnosis rate, and achieves multi-objective collaborative optimization among production, energy consumption, and equipment lifespan. Attached Figure Description

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

[0018] Figure 1 The diagram illustrates the cloud-edge-device three-layer distributed architecture of the oil well edge intelligent control system based on hybrid modeling of mechanism and artificial intelligence according to the present invention.

[0019] Figure 2 A hardware and software layered architecture block diagram of the edge intelligent controller of the present invention is shown.

[0020] Figure 3 An architectural block diagram of the edge intelligent controller of the present invention is shown.

[0021] Figure 4 The flowchart illustrating the mechanism of this invention and the hybrid reasoning and logical arbitration of cognitive artificial intelligence is shown.

[0022] Figure 5 The flowchart of the multi-objective optimization closed-loop control based on embodied intelligence of the present invention is shown.

[0023] Figure 6 A schematic diagram of the construction of a regional underground cognitive map based on swarm intelligence according to the present invention is shown. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, it should be understood that the specific embodiments described herein are only for illustration and explanation of this application and are not intended to limit this application.

[0025] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments of this application. Furthermore, the descriptions of each embodiment in the following embodiments have their own emphasis; for parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0026] The method steps described in this embodiment of the invention can be executed in the order described in the specific implementation, or the execution order of each step can be adjusted according to actual needs, provided that the technical problem can be solved. These are not listed one by one here.

[0027] The present invention will be further described in detail below with reference to the accompanying drawings.

[0028] Reference Figure 1 The oil well edge intelligent control system based on hybrid modeling of mechanism and artificial intelligence described in this embodiment of the invention adopts a three-layer distributed architecture of cloud-edge-device. This three-layer distributed architecture includes a cloud center layer, an edge node layer, and a physical terminal layer.

[0029] The cloud center layer, located at the top of the architecture, is configured to handle global model aggregation and policy distribution. It transmits model data to the edge node layer via a model distribution channel and receives feature vectors from multiple edge intelligent controllers via a feature upload channel. In some implementations, new algorithms or features can be deployed from the cloud to the edge with a single click, completing updates within minutes.

[0030] Continue to refer to Figure 1 The edge node layer is located in the middle of the architecture, communicating with both the physical terminal layer and the cloud center layer. The edge node layer is configured to handle data aggregation, model collaboration relay, and regional caching. The edge node layer and the cloud center layer communicate via a bidirectional channel: an upward channel for feature uploading and a downward channel for model distribution.

[0031] The physical terminal layer, located at the bottom of the architecture, comprises multiple edge intelligent controllers deployed at the wellheads of oil wells. For example... Figure 1 As shown, the physical terminal layer includes terminal device A, terminal device B, and terminal device C, each employing a hybrid architecture combining mechanistic and artificial intelligence approaches. Each terminal device is connected to the edge node layer via a data flow channel.

[0032] In some implementations, the oil well edge smart controller supports communication via industrial IoT protocols such as MQTT / OPC-UA. The oil well edge smart controller only uploads compressed feature vectors and diagnostic conclusions calculated at the edge to the cloud, rather than the raw high-frequency waveform data, thereby reducing bandwidth dependence.

[0033] like Figure 1 As further illustrated, the diagram uses solid lines to represent data flow and dashed lines to represent model flow. This architecture implements a layered data processing and model collaboration mechanism from the physical terminal layer to the edge node layer and then to the cloud center layer, enabling local intelligent computing at the edge and global model optimization through cloud-edge collaboration.

[0034] Furthermore, refer to Figure 2 The oil well edge intelligent controller adopts a layered hardware and software architecture, which includes a heterogeneous computing power hardware layer, a container engine layer, and an application layer.

[0035] In the heterogeneous computing hardware layer, the oil well edge intelligent controller adopts a CPU+NPU heterogeneous computing hardware architecture. The CPU general-purpose computing unit is responsible for routine logic control and data preprocessing tasks. In some implementations, the CPU uses a multi-core ARM architecture and is responsible for booting a Linux-based embedded operating system. The NPU deep learning acceleration unit serves as a dedicated acceleration unit, responsible for running complex deep learning model inference tasks. Sensor inputs enter from the heterogeneous computing hardware layer, are received by the CPU general-purpose computing unit, and are preprocessed. In some implementations, the heterogeneous computing hardware layer uses a CPU+GPU architecture instead of a CPU+NPU architecture.

[0036] Continue to refer to Figure 2 At the container engine layer, the oil well edge intelligent controller employs a lightweight container management engine. In some implementations, the lightweight container management engine is implemented using Kubernetes (K8s). In other implementations, it is implemented using Docker. The container engine layer includes a container engine and an edge operating system. The container engine is responsible for managing and scheduling the various microservice containers in the upper application layer. Data interaction exists between the container engine layer and the heterogeneous computing hardware layer, and service calls and status feedback exist between the container engine layer and the application layer. The container engine layer interacts with the heterogeneous computing hardware layer and provides underlying computing resources and system interfaces to the application layer through virtualization technology to support the stable operation of the various microservice containers in the application layer.

[0037] like Figure 2 As further illustrated, at the application layer, the oil well edge intelligent controller adopts a containerized microservice architecture. The application layer comprises multiple functional modules: a production prediction module, a multi-objective optimization module, an operating condition diagnosis module, and an embodied inversion module. These functional modules exist as independent microservices, decoupled and deployed through containerization technology. In some implementations, the microservice containers include data acquisition containers, hybrid inference containers, multi-objective optimization containers, and embodied cognition containers.

[0038] This layered hardware and software architecture enables high-computing tasks such as dynamometer diagram analysis and operational condition diagnostics to achieve millisecond-level real-time response at the edge, completing all computations without uploading to the cloud. This layered hardware and software architecture breaks through the limitations of traditional fixed controller software, packaging different functional modules into independent microservice container images, making the deployment of new algorithms or functions as plug-and-play as installing an app on a mobile phone, with updates completed in minutes.

[0039] Specifically, refer to Figure 3The oil well edge intelligent controller 600 described in this embodiment of the invention is deployed at the wellhead of a beam pumping unit. The oil well edge intelligent controller 600 includes a data acquisition module 602, a cognitive artificial intelligence engine 604, a mechanism verification model module 606, a logic arbitrator 608, a multi-objective optimization module 610, a control execution module 612, and a parameter inversion module 614.

[0040] The data acquisition module 602 is configured to acquire oil well operating data. In some embodiments, the oil well operating data includes suspension load data and displacement data acquired by load sensors and displacement sensors, wherein the load sensors are installed at the polished rod for data acquisition. The data acquisition module 602 is connected to the cognitive artificial intelligence engine 604 and the mechanism verification model module 606 respectively, and transmits the acquired oil well operating data to both the cognitive artificial intelligence engine 604 and the mechanism verification model module 606 for parallel processing.

[0041] Continue to refer to Figure 3 The cognitive AI engine 604 is configured to process oil well operation data based on a multi-task deep learning model to output operating condition probability prediction results and corresponding operating condition prediction confidence levels, real-time production soft measurement results and corresponding production soft measurement confidence levels, and dynamic fluid level soft measurement results and corresponding dynamic fluid level soft measurement confidence levels. The mechanism verification model module 606 is configured to process oil well operation data based on physical equations to output physical constraint verification results and physical consistency scores. Both the cognitive AI engine 604 and the mechanism verification model module 606 are connected to the logic arbitrator 608, transmitting their respective processing results to the logic arbitrator 608.

[0042] The logic arbitrator 608 includes a condition diagnosis arbitration module and a soft measurement arbitration module. The condition diagnosis arbitration module is configured to determine conflict between the condition probability prediction results and the physical constraint verification results. When the condition probability prediction results violate hard physical constraints, the physical constraint verification results are directly adopted as the condition diagnosis conclusion. When there is no violation of hard physical constraints but a conflict exists, the final condition diagnosis conclusion is output based on the difference between the AI ​​condition score and the mechanism condition score and a preset threshold. The soft measurement arbitration module is configured to perform soft measurement consistency verification between the real-time production soft measurement results, the dynamic liquid level soft measurement results, and the physical constraint verification results. When the soft measurement results violate hard physical constraints, the mechanism reference value is directly used as the output. When there is no violation of hard physical constraints, the final real-time production result and the final dynamic liquid level result are output based on a confidence-weighted fusion of the soft measurement score and the mechanism score. The logic arbitrator 608 is connected to the multi-objective optimization module 610, transmitting the condition diagnosis conclusion to the multi-objective optimization module 610.

[0043] In some implementations, the AI ​​operating condition score is jointly determined by the operating condition prediction confidence and the penalty term for violation of the physical constraints of the operating condition; the soft measurement score is jointly determined by the corresponding soft measurement confidence and the soft measurement deviation penalty term; and the mechanism score is jointly determined by the physical consistency score and the dynamic weight, with the dynamic weight adjusted according to the current signal noise level, the uncertainty of the AI ​​model, or the operational stability.

[0044] like Figure 3 As further shown, the multi-objective optimization module 610 is configured to calculate the optimal control parameters based on the diagnostic conclusions, provided that the physical constraints are met. The multi-objective optimization module 610 is connected to the control execution module 612 and transmits the optimal control parameters to the control execution module 612.

[0045] The control execution module 612 is configured to execute optimal control parameters. The control execution module 612 is connected to the parameter inversion module 614 and transmits the executed physical feedback data to the parameter inversion module 614.

[0046] The parameter inversion module 614 is configured to analyze the deviation between the executed physical feedback data and the expected results. When the deviation exceeds a preset threshold, the internal parameters are automatically corrected. The parameter inversion module 614 is connected to the cognitive artificial intelligence engine 604 and the mechanism verification model module 606 respectively, forming a feedback loop. The corrected parameter information is fed back to the cognitive artificial intelligence engine 604 and the mechanism verification model module 606, thereby realizing the self-correction and environmental adaptability of the oil well edge intelligent controller 600.

[0047] Based on the above-mentioned intelligent control system and intelligent controller for oil well edge, this embodiment of the invention also provides an intelligent control method for oil well edge based on hybrid modeling of mechanism and artificial intelligence, including data acquisition and parallel processing flow. Figure 4 The process demonstrates how the dual-drive parallel computing unit works and how it generates diagnostic conclusions.

[0048] In the intelligent control method for oil well edges, oil well operation data is collected by an edge intelligent controller deployed at the wellhead. In some implementations, the data acquisition module uses a 50Hz frequency to collect raw data, employing load and displacement sensors for data acquisition. The collected oil well operation data is then cleaned and aligned to generate a real-time dynamometer vector.

[0049] Continue to refer to Figure 4Oil well operation data is simultaneously input into the cognitive AI engine and the mechanism verification model for parallel processing. The cognitive AI engine employs a multi-task deep learning model, based on recurrent neural units and attention mechanisms, to process the oil well operation data and output operating condition probability prediction results and corresponding operating condition prediction confidence levels, real-time production soft measurement results and corresponding production soft measurement confidence levels, and dynamic fluid level soft measurement results and corresponding dynamic fluid level soft measurement confidence levels. In some implementations, the cognitive AI engine accelerates inference through an NPU, outputting operating condition probability distribution results in just 15 milliseconds. The operating condition probability prediction results are data-driven probability prediction results, such as an 85% probability of gas influence and a 10% probability of insufficient fluid supply.

[0050] like Figure 4 As further illustrated, the mechanism verification model processes well operation data based on physical equations such as kinematics and pump efficiency to output physical constraint verification results. The mechanism verification model transforms physical mechanism knowledge, including pumping unit kinematic equations, motor balance analysis equations, pump efficiency calculation formulas, reservoir-to-surface multiphase flow temperature / pressure / density / flow differential equations, wellbore tubing three-dimensional elastic mechanics equations, inflow dynamic curves, and vertical pipe flow curves, into constraint operators or feature inputs for the AI ​​model, ensuring the model understands physical laws. The physical constraint verification results include physical constraint boundary conditions, such as verification of whether the dynamic fluid level depth exceeds the pump depth and detection of rod breakage characteristics.

[0051] The operating condition probability prediction results and corresponding operating condition prediction confidence levels output by the cognitive AI engine, the real-time output soft measurement results and corresponding output soft measurement confidence levels, and the dynamic fluid level soft measurement results and corresponding dynamic fluid level soft measurement confidence levels are converged with the physical constraint verification results and physical consistency scores output by the mechanism verification model to a logic arbitrator. The logic arbitrator includes an operating condition diagnosis arbitration module and a soft measurement arbitration module. The operating condition diagnosis arbitration module performs operating condition diagnosis conflict judgment on the operating condition probability prediction results and physical constraint verification results. When the operating condition probability prediction results violate hard physical constraints, the physical constraint verification results are directly adopted as the operating condition diagnosis conclusion. When there is no violation of hard physical constraints but a conflict exists, the final operating condition diagnosis conclusion is output based on the difference between the AI ​​operating condition score and the mechanism operating condition score and a preset threshold. The soft measurement arbitration module performs soft measurement consistency verification on the real-time output soft measurement results, dynamic fluid level soft measurement results, and physical constraint verification results. When the soft measurement results violate hard physical constraints, the mechanism reference value is directly used as the output. When there is no violation of hard physical constraints, the final real-time liquid production result and the final dynamic liquid level result are output by performing a confidence-weighted fusion of soft measurement score and mechanism score.

[0052] Continue to refer to Figure 4In some implementations, when the AI ​​model misjudges a serious leak due to noise interference, but the mechanism verification model calculates that the working area within the current effective stroke has not significantly decreased, the logic arbitrator determines that the AI ​​result conflicts with physical common sense, automatically triggers the mechanism priority principle, rejects the AI's misjudgment, and outputs a corrected conclusion regarding gas influence. In some implementations, when the AI ​​prediction is normal, but the mechanism verification model detects that the liquid level height violates the pump depth physical limit, or detects rod breakage characteristics, the logic arbitrator automatically triggers the arbitration mechanism, accepts the conclusion of the mechanism verification model, and issues a warning. In some implementations, the AI ​​operating condition score is jointly determined by the operating condition prediction confidence level and the operating condition physical constraint violation penalty term; the soft measurement score is jointly determined by the corresponding soft measurement confidence level and the soft measurement deviation penalty term; and the mechanism score is jointly determined by the physical consistency score and dynamic weights. After processing by the logic arbitrator, the process outputs the operating condition diagnosis conclusion, the final real-time liquid production result, and the final dynamic liquid level result.

[0053] Furthermore, in the intelligent control method for oil well edges based on hybrid modeling of mechanism and artificial intelligence, the oil well operating data includes suspension point load data and displacement data collected by load sensors and displacement sensors, as well as three-phase current, voltage, and power data collected by smart meters. The load sensor is installed at the polished rod of the pumping unit and configured to measure changes in suspension point load in real time. The displacement sensor is configured to measure changes in suspension point displacement in real time. The smart meter is installed at the motor or control cabinet. In some embodiments, the load sensor and displacement sensor acquire data at a sampling frequency of 50Hz to obtain raw data with high temporal resolution.

[0054] In the intelligent control method for oil well edges, the data on suspension point load, displacement, current, voltage, and power are cleaned and aligned to generate real-time dynamometer vectors and other actual data vectors. Cleaning involves removing outliers and noise interference from the original data. Alignment involves synchronizing the suspension point load data and displacement data on the time axis, ensuring a one-to-one correspondence between the load and displacement data. After cleaning and alignment, the suspension point load data is used as the ordinate and the displacement data as the abscissa to generate a real-time dynamometer vector representing the load-displacement relationship within one complete stroke cycle of the pumping unit.

[0055] In the intelligent control method for oil well edges, the deep learning model is a model combining recurrent neural units (such as Bi-LSTM, a bidirectional long short-term memory network) with an attention mechanism. The recurrent neural units are configured to extract features and classify operating conditions from the actual production data vector. The attention mechanism is configured to perform attention weight analysis on real-time data, oil well parameters, and specific state patterns. By simultaneously capturing forward and backward temporal features from the dynamometer diagram vector through a bidirectional structure, the complete temporal feature information of the dynamometer diagram can be extracted.

[0056] In the intelligent control method for oil well edges, the multi-task deep learning model includes a shared backbone network and multiple task branches. The shared backbone network consists of recurrent neural units incorporating attention mechanisms, used to extract time-series features. The multiple task branches include a condition prediction branch, a production rate prediction branch, and a dynamic fluid level prediction branch. The condition prediction branch outputs the probability distribution of each condition category, the production rate prediction branch outputs the real-time production rate prediction, and the dynamic fluid level prediction branch outputs the dynamic fluid level prediction. Through this multi-task network structure design, the cognitive AI engine can simultaneously generate three types of output results in a single forward computation.

[0057] In some implementations, the confidence level of the operating condition prediction is the maximum probability value in the operating condition probability prediction results or the probability value corrected based on the probability distribution entropy. The confidence levels of the production soft measurement and the dynamic fluid level soft measurement are calculated based on the uncertainty of the model output or the statistical calculation of historical sliding window residuals. The confidence levels are used for scoring calculations in subsequent comprehensive judgments by the logic arbitrator.

[0058] In the intelligent control method for oil well edges, the cognitive artificial intelligence engine accelerates inference on real-time dynamometer map vectors through a neural network processing unit (NPU) to output operating condition probability prediction results. The NPU, as a dedicated acceleration unit, is configured to handle high-concurrency inference tasks for neural network models such as Bi-LSTM, which are based on recurrent neural units and incorporate attention mechanisms. In some implementations, the NPU completes the inference calculation of the real-time dynamometer map vectors within 15 milliseconds, outputting operating condition probability prediction results that include various operating condition types and their corresponding probability values. The operating condition probability prediction results characterize the probability distribution of the current oil well under various operating condition types, such as gas-affected conditions, insufficient fluid supply conditions, and pump leakage conditions, along with their corresponding probability values.

[0059] Furthermore, in the intelligent control method for oil well edges, the mechanism verification model includes the pumping unit kinematic equations, motor balance analysis equations, pump efficiency calculation formulas, differential equations for temperature / pressure / density / flow rate of multiphase flow from the reservoir to the surface, three-dimensional elastic mechanical equations for the wellbore rod and tubing, as well as inflow dynamic curves and vertical pipe flow curves. The pumping unit kinematic equations describe the geometric relationship between the suspension point motion and crank angle of the beam pumping unit, used to calculate the theoretical displacement, velocity, and acceleration of the suspension point at different crank angle positions. The motor balance analysis equations are used to calculate the ratio of motor load during the upstroke and downstroke, reflecting the uniformity of work done by the motor during these strokes. The pump efficiency calculation formulas are used to calculate the ratio between the actual and theoretical displacement of the pumping unit, reflecting the pumping unit's working efficiency. The differential equations for temperature / pressure / density / flow rate of multiphase flow from the reservoir to the surface are used to calculate the state changes of the oil-gas-water mixture in the underground structure of the oil well during the gradual lifting process of production dynamics. The three-dimensional elastic mechanical equations for the wellbore rod and tubing are used to calculate the load state of the pumping unit rod string during the production process. The Inflow Dynamics (IPR) curve describes the reservoir's ability to supply fluid to the bottom of the well, characterizing the relationship between bottom-hole flowing pressure and production rate. The Vertical Pipe Flow (VLP) curve describes the pressure loss pattern of fluid flowing upwards from the bottom of the well along the tubing, characterizing the relationship between bottom-hole flowing pressure and production rate under specific tubing string conditions.

[0060] In the intelligent control method for oil well edges, physical constraint verification results include verification of whether the dynamic fluid level depth exceeds the pump depth, detection of rod breakage characteristics, detection of load sensor data drift inaccuracy, and detection of friction force analysis and wax deposition status. Verification of whether the dynamic fluid level depth exceeds the pump depth is used to determine whether the dynamic fluid level depth value output by the mechanism verification model violates the physical constraint conditions. Under the physical constraint of a fixed pump depth, the dynamic fluid level depth should not exceed the pump's insertion depth. When the dynamic fluid level depth calculated by the mechanism verification model exceeds the pump depth, it indicates a physical logic conflict. Detection of rod breakage characteristics is used to identify whether the sucker rod has broken or tripped. The mechanism verification model analyzes the load change characteristics of the indicator diagram to detect the presence of typical characteristics of rod breakage, such as a sudden drop in load or abnormal load curve shape. Detection of load sensor data drift inaccuracy is used to identify whether the data measured by the load sensor reflects the true stress state. Friction force analysis and wax deposition status detection are used to distinguish between the load generated by oil gravity and the load generated by wax deposition friction in the upstroke and downstroke load differences.

[0061] In some implementations, the mechanism verification model transforms physical mechanism knowledge, such as the pumping unit kinematic equations, motor balance analysis equations, pump efficiency calculation formulas, reservoir-to-surface multiphase flow temperature / pressure / density / flow differential equations, wellbore tubing three-dimensional elasticity equations, inflow dynamic curves, and vertical pipe flow curves, into constraint operators or feature inputs for the cognitive artificial intelligence engine. In some implementations, the mechanism verification model calculates theoretical suspension point loads based on the pumping unit kinematic equations and compares them with measured suspension point loads to verify the physical consistency of the data. In some implementations, the mechanism verification model evaluates the pump efficiency level under current operating conditions based on the pump efficiency calculation formula; when the calculated pump efficiency result is lower than the limit threshold, it outputs the corresponding physical constraint verification result.

[0062] Furthermore, refer to Figure 5 The intelligent control method for oil well edges based on hybrid modeling of mechanisms and artificial intelligence includes a multi-objective optimization decision-making and control execution process. In this method, based on diagnostic conclusions, the optimal control parameters are calculated using a multi-objective optimization algorithm while satisfying physical constraints.

[0063] Continue to refer to Figure 5 The multi-objective optimization algorithm is the Non-Dominated Sorting Genetic Algorithm with Elite Strategy (NSGA-II). The NSGA-II algorithm uses non-dominated sorting and crowding distance calculations to perform rapid iterations in the solution space to find the Pareto optimal solution set. The non-dominated sorting genetic algorithm with elite strategy retains the best individuals in each generation, preventing the loss of excellent solutions during evolution.

[0064] like Figure 5 As further shown, the multi-objective optimization algorithm comprehensively considers maximizing output, minimizing energy consumption, and extending equipment life as optimization objectives. The multi-objective optimization module constructs an objective function with three dimensions: (Maximize output) (Minimize power consumption per ton of liquid per 100 meters) (Minimize equipment mechanical wear). The objective function is used to achieve a high level of fluid production from the oil well. The objective function is used to reduce the energy consumption per unit of liquid production, where the power consumption per ton of liquid per 100 meters represents the electrical energy consumed to lift each ton of liquid 100 meters. The objective function is used to reduce mechanical wear on equipment such as pumping unit rods and pumps, thereby extending the service life of the equipment.

[0065] The multi-objective optimization algorithm uses the maximum stress of the rod and the pump efficiency limit as physical constraints. The maximum stress constraint requires that the peak stress at the top of the rod be less than the material fatigue limit to prevent rod breakage. The pump efficiency limit constraint requires that the pump efficiency be greater than the limit threshold to ensure that the pumping unit's operating efficiency is within a reasonable range. In some implementations, the physical constraints also include equipment operating boundary conditions such as the pumping unit's rated load limit and motor power limit.

[0066] In intelligent control methods for oil well edges, optimal control parameters include stroke frequency and stroke length. Stroke frequency represents the number of reciprocating motions of the pumping unit per minute. Stroke length represents the maximum displacement distance of the pumping unit's suspension point. The NSGA-II algorithm, under the premise of satisfying the maximum stress constraint of the rod string and the pump efficiency limit constraint, performs global optimization on the stroke frequency and stroke length parameters, calculating the Pareto optimal solution between production, energy consumption, and equipment lifespan.

[0067] like Figure 5 As further illustrated, in the intelligent control method for oil well edges, the optimal control parameters are sent to the frequency converter for execution. The frequency converter adjusts the operating frequency of the pumping unit drive motor based on the received stroke parameters, thereby changing the actual stroke rate of the pumping unit. In some implementations, when the diagnostic conclusion is insufficient fluid supply, the Pareto optimal solution calculated by the NSGA-II algorithm adjusts the stroke rate from the current value to a lower value to improve pump efficiency and reduce energy consumption and the risk of rod breakage.

[0068] In the intelligent control method for oil well edges, optimal control parameters are executed and physical feedback data is collected after execution. The control execution module sends the optimal control parameters to the frequency converter, which then drives the pumping unit to operate according to the new stroke and frequency parameters. In some implementations, the data acquisition module continuously collects suspension load and displacement data after the optimal control parameters are executed, generating post-execution physical feedback data for subsequent deviation analysis and parameter inversion processes.

[0069] Furthermore, in the intelligent control method for oil well edges, a deviation analysis is performed between the physical feedback data and the expected results. The parameter inversion module compares the measured suspension point load data collected after executing the optimal control parameters with the theoretical suspension point load value predicted by the mechanism verification model, and calculates the deviation between the measured and predicted values. The deviation analysis process includes calculating the absolute value of the deviation and the trend of deviation changes to determine whether the deviation has systematic characteristics.

[0070] When the deviation exceeds a preset threshold, the parameter inversion process is triggered to automatically correct the internal parameters. In some implementations, the preset threshold is set to 15%. When the deviation between the measured peak load at the suspension point and the theoretical value predicted by the mechanism verification model exceeds 15%, the parameter inversion module determines that there is a systematic deviation. In some implementations, the parameter inversion module triggers the parameter inversion algorithm when the deviation exceeds 15% and exhibits a systematic deviation, wherein the systematic deviation indicates that the deviation persists for multiple sampling periods and the deviation direction is consistent.

[0071] In the parameter inversion process, the deviation is sampled multiple times to confirm that it is not caused by random noise interference. After detecting a deviation exceeding a preset threshold, the parameter inversion module does not immediately perform parameter correction. Instead, it continues to collect physical feedback data for multiple stroke cycles, performing multiple sampling verifications on the deviation. Multiple sampling verifications are used to distinguish between systematic deviations and random noise interference. When multiple sampling results all show that the deviation exceeds the preset threshold and the deviation direction is consistent, the parameter inversion module confirms that the deviation is caused by a systematic deviation rather than random noise interference.

[0072] In the parameter inversion process, internal parameters causing deviations are identified through reverse reasoning. The parameter inversion module uses actual observation data to perform reverse reasoning analysis on the internal parameters in the mechanistic equations, identifying the sources of parameter deviations that cause systematic discrepancies between predicted and measured values. Internal parameters include at least one of the following: pump diameter, rod assembly information, friction coefficient, pump inlet / outlet pressure loss, oil volume change, and leakage. The pump diameter parameter characterizes the diameter of the pump plunger, affecting the calculation of the pump's theoretical displacement. Rod assembly information includes parameters such as the number of sucker rod stages, the length and diameter of each stage, affecting the calculation of elastic deformation and load transfer in the rod assembly. The friction coefficient parameter characterizes the frictional characteristics between the sucker rod and the tubing, affecting the theoretical calculation of the suspension load. The pump inlet / outlet pressure loss characterizes the pressure lost due to frictional energy loss when oil enters the pump inlet / outlet. The oil volume change characterizes the volume change of oil during its journey from the reservoir to the surface, affecting the calculated production value. Leakage volume characterizes the amount of oil lost from the reservoir to the surface due to damage to valves, pump barrels, and tubing seals.

[0073] The parameter inversion module utilizes a gradient descent search algorithm to invert the intrinsic parameters in the mechanistic equation. The gradient descent search algorithm uses the deviation between measured and predicted values ​​as a loss function. By iteratively calculating the gradient of the loss function with respect to each intrinsic parameter, it adjusts the values ​​of the intrinsic parameters along the gradient descent direction, gradually reducing the deviation between the predicted and measured values. In some implementations, the gradient descent search algorithm performs joint inversion on one or more of the following parameters: pump diameter parameters, rod assembly information parameters, and friction coefficient parameters, to identify parameter combinations that produce systematic deviations.

[0074] In the parameter inversion process, the identified internal parameters are automatically corrected to bring the deviation between the predicted and measured values ​​closer together. The parameter inversion module automatically updates the parameter values ​​stored in the internal parameter library based on the inversion results of the gradient descent search algorithm. In some implementations, the deviation between the predicted and measured values ​​converges to within 3% after correction by the parameter inversion module. In some implementations, when the inversion results show that the pump diameter parameter does not match the preset value stored in the internal parameter library, the parameter inversion module automatically corrects the pump diameter parameter in the internal parameter library to the inverted value and uses the corrected pump diameter parameter to recalibrate the mechanism verification model.

[0075] In the intelligent controller for oil well edges, the parameter inversion module is configured to analyze the deviation between the physical feedback data after execution and the expected results. When the deviation exceeds a preset threshold, the internal parameters are automatically corrected. The parameter inversion module is connected to the cognitive artificial intelligence engine and the mechanism verification model module respectively, forming a feedback loop. The corrected parameter information is fed back to the cognitive artificial intelligence engine and the mechanism verification model module, enabling the intelligent controller for oil well edges to continuously approach the real physical state during operation and achieve cognitive self-correction.

[0076] Furthermore, the intelligent well edge control method based on hybrid modeling of mechanism and artificial intelligence described in this embodiment of the invention also includes an active environmental adaptation step. This active environmental adaptation step is used to address the dynamic characteristics of the reservoir environment evolving over time, enabling the intelligent well edge controller to sense changes in formation fluid supply capacity and automatically adjust its internal model.

[0077] In the active environmental adaptation process, when the well's operating conditions tend to stabilize, the frequency converter is controlled to conduct test disturbances on the pumping speed within a safe range. When the well operates at night or during other periods when its operating conditions tend to stabilize, the characteristics of the well's operating data become more homogeneous, leading to a decrease in the confidence of the well's edge intelligent controller in judging the formation's fluid supply capacity. To explore the true formation energy, the well's edge intelligent controller actively initiates test disturbances. These test disturbances are achieved by controlling the frequency converter to adjust the operating frequency of the pumping unit's drive motor, with the frequency converter changing the actual pumping speed within a safe range.

[0078] In the active environmental adaptation step, the frequency converter is controlled to fine-tune the stroke rate via a sinusoidal wave, with a fluctuation range of ±5% for 2 minutes. This sinusoidal stroke fine-tuning ensures that the stroke rate fluctuates periodically according to a sine function based on the current set value, with the fluctuation range limited to ±5% of the current stroke value. This ensures that the test disturbance will not adversely affect oil well production and equipment safety. The 2-minute test disturbance provides sufficient excitation signals and response data for system identification.

[0079] In the active environmental adaptation phase, bottomhole flowing pressure and production response under test disturbances are collected. The data acquisition module collects high-frequency well operation data during the test disturbances, including bottomhole flowing pressure data obtained through load back-calculation and production response data. Bottomhole flowing pressure is obtained through back-calculation using suspension point load data combined with a rod-string mechanical model. Production response data reflects the actual production capacity changes of the well under varying stroke conditions.

[0080] In the active environmental adaptation step, the formation supply index (PI) is identified based on the dynamic transfer function between the test disturbance and the response. The dynamic transfer function describes the dynamic relationship between the input and output signals, where the input signal is the impulse disturbance signal and the output signal is the bottomhole flowing pressure response signal. By analyzing the dynamic transfer function between the impulse disturbance and the bottomhole flowing pressure response, the wellhead intelligent controller identifies the current formation supply index (PI). The formation supply index characterizes the reservoir's ability to supply fluid to the bottom of the well, reflecting the change in production per unit pressure differential.

[0081] In the active environmental adaptation step, the internal inflow dynamic model curve is updated based on the identified formation supply index. The inflow dynamic model curve (IPR curve) describes the reservoir's ability to supply fluid to the bottom of the well, characterizing the relationship between bottom-hole flowing pressure and production rate. When there is a difference between the identified formation supply index and the supply index corresponding to the internally stored inflow dynamic model curve, the well edge intelligent controller automatically updates the parameters of the internal inflow dynamic model curve. In some implementations, when the identification results show that the formation fluid supply capacity has decreased by 10% compared to the previous month, the well edge intelligent controller automatically updates the internal inflow dynamic model curve and recalculates the future control strategy accordingly, achieving dynamic adaptation to environmental changes.

[0082] Furthermore, refer to Figure 6 The intelligent control method for oil well edges based on hybrid modeling of mechanisms and artificial intelligence also includes swarm intelligence and regional cognitive map construction steps. These steps aggregate intelligent cognitive results at the single-well level to form regional collaborative cognition, enabling dynamic perception and visualization of regional subsurface conditions.

[0083] In the swarm intelligence and regional cognitive map construction step, the corrected internal parameters and formation features are encapsulated into feature vectors. The corrected internal parameters include pump diameter parameters, rod string assembly information parameters, and friction coefficient parameters corrected through a parameter inversion process. Formation features include the formation supply index identified through an active environmental adaptation step and the updated inflow dynamic model curve parameters. The well edge intelligent controller encapsulates the corrected internal parameters and formation features according to a predefined data format to generate a feature vector representing the current cognitive state of the well.

[0084] Continue to refer to Figure 6 In the swarm intelligence and regional cognitive map construction steps, feature vectors are uploaded to the cloud via an Industrial Internet of Things (IIoT) protocol. In some implementations, the IIoT protocol uses the MQTT protocol. MQTT (Message Queuing Telemetry Transport) is a lightweight publish / subscribe messaging protocol suitable for bandwidth-constrained and network-unstable oilfield environments. In some implementations, the IIoT protocol uses the OPC-UA protocol. The oil well edge intelligent controller uploads the encapsulated feature vectors to the cloud via the IIoT protocol, rather than uploading the raw high-frequency waveform data, thereby reducing the consumption of communication bandwidth.

[0085] like Figure 6 As further shown, in the swarm intelligence and regional cognitive map construction steps, the inversion data from multiple wells are processed by regional aggregation and spatial interpolation in the cloud. Figure 6 The diagram illustrates multiple single-well intelligent nodes on a distributed edge side, including wells A, B, and C, each with corresponding inversion parameters Pa, Pb, and Pc. These single-well intelligent nodes output their respective inversion parameters to a regional aggregation module. The regional aggregation module receives feature vectors from multiple wells within the region and performs aggregation processing on the inversion data from different well locations. Spatial interpolation processing fuses the discrete inversion data from multiple single wells, estimating the formation parameter distribution between well locations based on the geographical coordinates and inversion parameter values ​​of each well using spatial interpolation algorithms such as linear interpolation and cubic spline interpolation.

[0086] In the oil well edge intelligent control system based on hybrid modeling of mechanism and artificial intelligence, the cloud center layer is configured to perform regional aggregation and spatial interpolation processing on feature vectors to construct a regional underground cognitive map. The cloud center layer receives feature vectors from multiple edge intelligent controllers through a feature upload channel and performs regional aggregation and spatial interpolation processing on the feature vectors.

[0087] Continue to refer to Figure 6 In the swarm intelligence and regional cognitive map construction steps, a regional subsurface cognitive map is constructed based on the results of regional aggregation and spatial interpolation. The regional subsurface cognitive map is presented in a two-dimensional planar form, marking the locations of wells A, B, and C. Each well's location is surrounded by a circular area of ​​a different color, representing the well's influence range or cognitive coverage area. The regional subsurface cognitive map dynamically displays the locations of each well within the region and the distribution of its corresponding formation parameters, providing data support for regional injection-production balance adjustments. In some implementations, the regional subsurface cognitive map presents the distribution of subsurface fluid conductivity within the region, reflecting differences in formation fluid supply capacity across different areas. Through the swarm intelligence and regional cognitive map construction steps, the oil well edge intelligent control system achieves a leap from single-well intelligence to regional collaborative intelligence.

[0088] This invention also discloses a readable storage medium.

[0089] A computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any of the above embodiments. The computer-readable storage medium may include any entity or device capable of carrying a computer program, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc. The computer program includes computer program code. The computer program code may be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable storage medium may include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.

[0090] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0091] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a system including a processing module or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0092] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent control of oil well edges based on hybrid modeling of mechanism and artificial intelligence, characterized in that, include: Oil well operation data is collected by an edge intelligent controller deployed at the wellhead; The oil well operation data is simultaneously input into the cognitive artificial intelligence engine and the mechanism verification model for parallel processing. The cognitive artificial intelligence engine outputs the probability prediction results of the operating conditions and the corresponding confidence scores of the operating conditions, the soft measurement results of real-time production and the corresponding confidence scores of the production soft measurement, and the soft measurement results of the dynamic fluid level and the corresponding confidence scores of the dynamic fluid level based on the multi-task deep learning model. The mechanism verification model outputs the physical constraint verification results and the physical consistency score based on the physical equation. The logic arbitrator performs a conflict judgment on the working condition probability prediction result and the physical constraint verification result. When the working condition probability prediction result violates the hard physical constraint, the physical constraint verification result is directly adopted as the working condition diagnosis conclusion. When there is no violation of hard physical constraint but there is a conflict, the final working condition diagnosis conclusion is output based on the difference between the artificial intelligence working condition score and the mechanism working condition score and the preset threshold. The logic arbitrator performs a soft measurement consistency check on the real-time production soft measurement results, the dynamic liquid level soft measurement results, and the physical constraint verification results. When the soft measurement results violate the hard physical constraints, the mechanism reference value is directly used as the output. When there is no violation of hard physical constraints, the final real-time liquid production result and the final dynamic liquid level result are output by weighted fusion of soft measurement score and mechanism score. Based on the aforementioned operating condition diagnosis conclusions, the optimal control parameters are calculated using a multi-objective optimization algorithm while satisfying physical constraints. Execute the optimal control parameters and collect the physical feedback data after execution; The physical feedback data is compared with the expected results by deviation analysis. When the deviation exceeds a preset threshold, the parameter inversion process is triggered to automatically correct the internal parameters.

2. The method according to claim 1, characterized in that, The well operation data includes suspension point load data and displacement data collected by load sensors and displacement sensors, as well as three-phase current, voltage, and power data collected by smart meters. The method further includes cleaning and aligning the suspension point load data, displacement data, current, voltage, and power data to generate a real-time production data vector. The real-time production data vector includes at least a real-time dynamometer diagram vector and / or an electrical parameter vector. The multi-task deep learning model includes a shared backbone network and multiple task branches. The shared backbone network is a recurrent neural unit combined with an attention mechanism, used to extract time-series features. The multiple task branches include an operating condition prediction branch, a production volume prediction branch, and a dynamic fluid level prediction branch.

3. The method according to claim 1, characterized in that, The logic arbitrator includes a condition diagnosis arbitration module and a soft measurement arbitration module. The condition diagnosis arbitration module is used to determine the conflict between the condition probability prediction result and the physical constraint verification result and output the final condition diagnosis conclusion. The soft measurement arbitration module is used to perform consistency verification and fusion correction on the real-time production soft measurement result, the dynamic liquid level soft measurement result, and the physical constraint verification result. The artificial intelligence condition score is jointly determined by the condition prediction confidence and the condition physical constraint violation penalty term. The soft measurement score is jointly determined by the corresponding soft measurement confidence and the soft measurement deviation penalty term. The mechanism score is jointly determined by the physical consistency score and the dynamic weight.

4. The method according to claim 1, characterized in that, The mechanism verification model includes the kinematic equations of the pumping unit, the motor balance analysis equation, the pump efficiency calculation formula, the differential equations of temperature / pressure / density / flow rate of multiphase flow from the reservoir to the surface, the three-dimensional elastic mechanical equations of the wellbore rod and tubing, as well as the inflow dynamic curve and the vertical pipe flow curve. The physical constraint verification results include the verification of whether the dynamic fluid level depth exceeds the pump depth and the detection of rod breakage characteristics.

5. The method according to claim 1, characterized in that, The multi-objective optimization algorithm is a non-dominated sorting genetic algorithm with an elite strategy. The multi-objective optimization algorithm takes maximizing output, minimizing energy consumption, and extending equipment life as optimization objectives, and uses the maximum stress of the rod column, the rated parameters of the motor, and the rated parameters of the pumping unit as physical constraints. The optimal control parameters include pumping unit start-up and shutdown, stroke frequency, and stroke parameters. The method also includes sending the optimal control parameters to the frequency converter for execution.

6. The method according to claim 1, characterized in that, The parameter inversion process includes: The deviation was sampled multiple times to confirm that the deviation was not caused by random noise interference; The internal parameters causing the deviation are identified through reverse reasoning, wherein the internal parameters include at least one of the following: pump diameter, rod assembly information, friction coefficient, pump inlet / outlet pressure loss, oil volume change, and leakage; and The identified internal parameters are automatically corrected to bring the deviation between the predicted and measured values ​​closer together.

7. An intelligent controller for oil well edges based on hybrid modeling of mechanism and artificial intelligence, characterized in that, include: The data acquisition module is configured to collect oil well operation data; The cognitive artificial intelligence engine is configured to process the oil well operation data based on a multi-task deep learning model to output the operating condition probability prediction results and corresponding operating condition prediction confidence, real-time production soft measurement results and corresponding production soft measurement confidence, and dynamic fluid level soft measurement results and corresponding dynamic fluid level soft measurement confidence. The mechanism verification model module is configured to process the oil well operation data based on physical equations to output physical constraint verification results and physical consistency scores; The logic arbitrator includes a condition diagnosis arbitration module and a soft measurement arbitration module. The condition diagnosis arbitration module is configured to perform conflict judgment on the condition probability prediction result and the physical constraint verification result. When the condition probability prediction result violates the hard physical constraint, the physical constraint verification result is directly adopted as the condition diagnosis conclusion. When there is no violation of hard physical constraint but there is a conflict, the final condition diagnosis conclusion is output based on the comparison of artificial intelligence condition score and mechanism condition score. The soft measurement arbitration module is configured to perform consistency verification and confidence-weighted fusion on the real-time production soft measurement result, the dynamic liquid level soft measurement result, and the physical constraint verification result. The multi-objective optimization module is configured to calculate the optimal control parameters based on the working condition diagnosis conclusions, provided that physical constraints are met. The control execution module is configured to execute the optimal control parameters. The parameter inversion module is configured to perform deviation analysis between the executed physical feedback data and the expected results, and automatically correct internal parameters when the deviation exceeds a preset threshold; and The cloud-edge collaboration module is configured to collect and comprehensively process the analysis results from various endpoints, and update the underground cognitive map with various functional modules and algorithm models.

8. An intelligent control system for oil well edges based on hybrid modeling of mechanism and artificial intelligence, characterized in that, include: The physical terminal layer includes multiple well edge intelligent controllers as described in claim 7, deployed at the wellhead of the oil well; The edge node layer is communicatively connected to the physical terminal layer and is configured to perform data aggregation, model collaboration relay, and regional caching functions. as well as The cloud center layer communicates with the edge node layer and is configured to be responsible for global model aggregation and policy distribution. It transmits model data to the edge node layer through the model distribution channel and receives feature vectors from multiple edge intelligent controllers through the feature upload channel. It performs regional aggregation and spatial interpolation processing on the feature vectors to construct a regional underground cognitive map.

9. The system according to claim 8, characterized in that, The edge node layer is also configured to perform bidirectional transmission of model data between the physical terminal layer and the cloud center layer, wherein collected data and diagnostic results are uploaded via data stream, and updated models are received from the cloud center layer via model stream; the cloud center layer is also configured to perform global model aggregation optimization based on feature vectors from multiple edge intelligent controllers, and uniformly distribute the optimized models to the edge node layer.

10. A readable storage medium, characterized in that, The readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.