Ontology graph construction and abnormal causal chain tracing method and system
By constructing ontology maps and causal chain tracing methods, the problems of delayed response to anomalies and false alarms/missed reports in shale gas production have been solved. This has enabled accurate location and interpretation of anomalies such as wellbore fluid accumulation, improving operation and maintenance efficiency and data utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to provide accurate and rapid responses to anomalies such as wellbore fluid accumulation, compressor shutdown, and pipeline blockage in shale gas production. Furthermore, they lack self-learning and automatic feature extraction capabilities, leading to frequent false alarms and missed alarms, low data utilization, and an inability to adapt to complex operating conditions.
An ontology graph is constructed, modeling objects such as wells, skids, processes, differential pressure, and alarms as ontology graphs. Directed acyclic graphs are used to encode causal relationships, enabling bidirectional linkage between anomaly detection results and the ontology graph. A weighted path search algorithm is used to locate the root cause, and semantic queries are supported.
It enables precise location and interpretation of anomalies, reduces false alarm and missed alarm rates, improves operational efficiency, reduces production losses, adapts to complex operating conditions, and supports flexible anomaly management.
Smart Images

Figure CN122154934A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to, but is not limited to, the field of shale gas production technology, and particularly relates to a method and system for constructing an ontology map and tracing abnormal causal chains. Background Technology
[0002] Shale gas, as an important unconventional natural gas resource, has been developed and utilized on a large scale in recent years. With increasing production years, shale gas wells in most areas of China are gradually entering the aging stage, resulting in fluctuating and unstable production capacity. According to statistics for the entire year of 2024, the Southwest Oil and Gas Field had an average of 10 wells experiencing liquid accumulation per day, with an average well recovery cycle of 2.5 days and an average daily production of 15,000 cubic meters. This resulted in a daily production loss of up to 150,000 cubic meters, impacting annual production by approximately 55 million cubic meters. Improving the response efficiency to abnormal conditions such as liquid accumulation and enhancing the intelligence level of production operation and maintenance have become urgent problems to be solved in current shale gas production and operation.
[0003] In existing technologies, the identification and handling of anomalies such as wellbore fluid accumulation, compressor shutdown, and pipeline blockage during shale gas production still mainly rely on manual experience and static threshold alarm mechanisms set in SCADA (Supervisory Control and Data Acquisition) or POC (Production Operation Control) systems. This type of method has the following significant drawbacks: 1. Fixed rules and poor generalization ability: The SCADA / POC system alarms based on manually set rules, which cannot adapt to the complex working conditions brought about by the evolution of wellbore status over time and environmental changes, and is prone to missed alarms or false alarms.
[0004] 2. Reliance on manual analysis and delayed response: Current anomaly assessment still relies on the experience and manual analysis of on-site engineers, which is inefficient and makes it difficult to achieve accurate and rapid dynamic management.
[0005] 3. Low data utilization: Although downhole sensors and surface monitoring equipment have achieved the acquisition of a large amount of time-series data, the existing system has failed to fully explore the dynamic evolution patterns hidden within them.
[0006] 4. Lack of model capabilities: There is a lack of intelligent models with self-learning and automatic feature extraction capabilities, making it difficult to establish a detection system with high robustness and adaptability in multi-well and multi-dimensional data environments.
[0007] A similar prior art example is the publicly available patent "Ontology-based risk propagation over digital twins" (US Patent No. 12,289,336), which discloses an ontology-based risk propagation method. Its core is to construct a semantic relationship graph (knowledge graph) between asset nodes, process nodes, and them, and define the direct and indirect risks of each node; then, it identifies input edges from the graph, summarizes risks, performs propagation calculations, and finally provides risk mitigation suggestions.
[0008] While this patent does utilize the concept of ontology knowledge graphs combined with risk propagation mechanisms, it primarily focuses on the aggregation, propagation, and mitigation suggestions of risks. It doesn't specifically address the structured encoding of computable causal paths from upstream equipment to processes to downstream anomalies for "anomaly causal chain tracing," nor does it emphasize a two-way linkage mechanism with dynamic detection models. In terms of anomaly localization, semantic tracing, and interactive question answering, its disclosed content is relatively crude, leaning more towards risk management than towards refined causal chain analysis for diagnosing the root causes of anomalies.
[0009] While this existing technology incorporates ontology knowledge graphs and risk propagation mechanisms, its core remains focused on risk aggregation, diffusion, and mitigation suggestions, rather than computable causal chain tracing for root cause diagnosis of anomalies. The "propagation" mechanism in existing technologies is essentially a way of spreading risk weights between asset or process nodes. Risk is transmitted along upstream→downstream or downstream→upstream directions. This transmission is largely based on the relationships between nodes, quantifying the impact of risk to demonstrate its distribution and changes within the system. It does not construct a traversable, computable path for causal relationships from downstream anomalies to upstream equipment for specific anomalies. The risks in existing patents only propagate along physical relationships, not along logical causal relationships.
[0010] Meanwhile, this technology lacks a two-way linkage mechanism between the ontology graph and the dynamic detection model: on the one hand, anomalies detected in real time are not mapped to events or state updates in the graph to trigger causal inference; on the other hand, the graph inference results are not fed back to correct or constrain the detection model's judgment, thus failing to form a diagnostic closed loop. Therefore, its explanatory and localization capabilities are limited, leaning more towards risk management and situation assessment than a refined causal chain computation framework for anomaly root cause analysis. Summary of the Invention
[0011] To address the problems existing in the prior art, this invention provides a method and system for ontology graph construction and abnormal causal chain tracing.
[0012] This invention is implemented as follows: a method for ontology graph construction and anomaly causal chain tracing, comprising: S1 models the objects of wells, skids, processes, differential pressure, alarms, and operational events, as well as their relationship patterns, into an ontology graph.
[0013] S2 performs causal chain encoding, representing "upstream equipment - process - downstream anomaly" as a computable path.
[0014] S3 enables bidirectional linkage between the ontology map and anomaly detection results, mapping the anomaly detection results to map nodes and using the map to trace the cause of the anomaly.
[0015] The method provided in this invention first uses a digital support platform to uniformly model key objects (wells, skids, processes, differential pressure, sensors, alarms, operational events, etc.) and their relationships in oil and gas production scenarios. By establishing entity categories and semantic relationships, the ontology graph can solidify complex equipment topologies, process flows, and historical events in graph form, solving the problem that traditional structured tables are difficult to express dynamic operating conditions and upstream and downstream dependencies. This layer lays the data semantic foundation for subsequent causal chain tracing and knowledge computation.
[0016] After the graph modeling is completed, to achieve a computable expression and path reasoning of abnormal causal relationships, this invention structurally encodes the propagation relationship between "upstream equipment—process link—downstream anomaly". Specifically, a Directed Acyclic Graph (DAG) is used as the basic structural model of causal relationships. Each equipment node, process state node, and anomaly node in the production system is represented as the vertex set V in the graph, and the equipment connection relationship, parameter influence relationship, and process transmission relationship are defined as the directed edge set E, thus forming a causal propagation network that satisfies the acyclic constraint. Each edge represents a unidirectional influence of the upstream state on the downstream state, ensuring that there are no self-loops or logical backtracking conflicts in the causal reasoning process.
[0017] At the encoding level, the equipment topology relationships and process timing logic are uniformly mapped to a triple vector structure, i.e., <entity head h, relation r, entity tail t>. Examples include <gathering skid, affecting differential pressure, wellhead pressure anomaly> and <wellhead valve, belonging to, upstream equipment>. To enhance computational power, the triples can be further embedded into vector representations, and numerically encoded using the relation embedding function f(h,r,t), transforming path calculation into combinatorial operations in vector space. For the time dimension, a time decay factor λ is introduced as an edge weight correction parameter to weight the causal influences within different time windows. Specifically, the edge weight w_ij is defined as the basic influence weight multiplied by e^( λΔt), where Δt is the time interval between upstream events and downstream anomalies, thus reflecting that recent events have a more significant impact on current anomalies, while the impact of historical long-term events gradually diminishes.
[0018] Based on the above structure, the system can perform reverse traversal of abnormal nodes using a weighted path search algorithm, calculate the comprehensive weight value of candidate causal chains, and achieve causal path ranking and optimal root cause location. Through the collaborative design of DAG structure constraints, triple vector encoding, and time decay weighting mechanism, the anomaly propagation chain possesses the characteristics of clear structure, computable weights, and interpretable logic, thereby achieving accurate modeling and efficient reasoning of anomaly causal chains under complex working conditions.
[0019] Its core technology abstracts the physical connections between devices and the history of process switching into directed edges, and then combines this with the time series of alarms and events to form a cause-effect graph structure. In this way, when an abnormal node occurs, the system can automatically traverse up or down along the coded chain to reveal the potential root cause or the affected subsequent links, thereby realizing machine-computable causal chain analysis.
[0020] This method not only relies on static knowledge modeling but also engages in bidirectional interaction with a dynamic anomaly detection model. When the detection model outputs an anomaly result, the result is mapped to the corresponding entity node in the graph, triggering causal chain tracing. Conversely, the causal chain reasoning results in the graph can also serve as feedback signals, assisting the detection model in optimizing parameters and thresholds, achieving a closed-loop linkage between knowledge and data. This bidirectional coupling improves the accuracy and interpretability of detection, avoiding the shortcomings of black-box models that "only report anomalies without knowing the cause."
[0021] When tracing causal chains, the system uses a probabilistic propagation traversal algorithm based on spatiotemporal correlation. During the traversal, it calculates the propagation probability by combining the proximity of alarm timestamps, prioritizing paths with probability values greater than a preset threshold to exclude non-causal random associations. This automatically locates upstream and downstream related entities of abnormal nodes and generates highly readable natural language explanations by combining historical alarms and process switch records. For example, when an abnormal pressure differential is detected in a well, the system can trace it back to the associated skid equipment and process steps, outputting "This anomaly may be caused by pressure differential fluctuations triggered by a process switch in the skid equipment." This explanatory capability significantly improves the efficiency of maintenance personnel's understanding and decision-making regarding abnormal events.
[0022] At the system application layer, users can submit exploratory questions through a semantic query interface, such as "What are the liquid accumulation warnings for all wells under a certain skid over the past three days?" or "Has the alarm frequency increased after a certain process switch?" Based on graph-based semantic reasoning capabilities, the system converts natural language into graph query statements, returning results consistent with the user's semantics. This interactive approach breaks through the limitations of traditional fixed reports and threshold queries, enabling flexible exploratory analysis of anomaly causal chains, thereby significantly enhancing the intelligence and interpretability of anomaly management.
[0023] Furthermore, methods for ontology graph construction and anomaly causal chain tracing also include: Construct an ontology graph for different business scenarios in the shale gas field, defining entities such as wells, skids, processes, and sensors, and their relationships.
[0024] When the anomaly detection model outputs results, the results (such as anomaly nodes) are mapped onto the graph.
[0025] Furthermore, through graph query or graph traversal algorithms, the upstream and downstream related entities of the abnormal node are automatically traced, and natural language explanations are generated.
[0026] It provides an interface that supports semantic queries, allowing users to ask "exploratory" follow-up questions.
[0027] Furthermore, in S1, the digital support platform models objects and relationships as an ontology graph: Objects: wells, skids, alarms, processes, sensors.
[0028] Relationships: Well-skid connection, process switching history, alarms and upstream and downstream causal chains.
[0029] Furthermore, semantic queries support semantic follow-up questions such as "the liquid accumulation warnings of all wells under a certain skid over the past three days" and "whether a certain process switch has led to an increase in alarm frequency".
[0030] Another objective of this invention is to provide an ontology graph construction and anomalous causal chain tracing system for implementing the aforementioned ontology graph construction and anomalous causal chain tracing method, comprising: The ontology graph modeling module is used to model objects and relational schemas such as wells, skids, processes, differential pressure, alarms, and operational events into ontology graphs.
[0031] The causal chain coding module is used to form a computable path from 'upstream equipment - process - downstream anomaly'.
[0032] The two-way linkage module enables two-way linkage between the ontology map and the detection results.
[0033] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows: This invention constructs a digital foundation for oil and gas production with a digital support platform at its core. Through unified modeling, causal chain calculation, model and knowledge graph linkage, and visualization interaction and closed-loop optimization mechanism, it realizes intelligent management of the entire process from data acquisition, anomaly identification, root cause diagnosis to decision support, breaking through the limitations of existing technologies that only stay at the level of single anomaly detection or static risk propagation.
[0034] Firstly, regarding unified modeling and global cognition, this invention uses an ontology knowledge graph to perform unified semantic modeling of various objects such as wells, skids, process flows, sensors, alarms, and operational events. It explicitly depicts equipment topology relationships, process dependencies, and physical constraints, enabling the system to present the structure and relationships of complex oil and gas production systems in a unified "map." This unified semantic layer breaks down the problems of data fragmentation and model isolation in traditional systems, providing fundamental support for cross-system analysis, comprehensive reasoning, and intelligent decision-making. This transforms the digital support platform from an anomaly detection tool into a digital foundation integrating identification, early warning, prediction, and planning.
[0035] Secondly, regarding anomaly localization and causal analysis, this invention encodes the logical structure of "upstream equipment—process—downstream anomaly" into a computable and traversable causal chain. When the system detects an anomaly, it can automatically trace back along the causal chain to locate possible upstream root causes and assess their impact range, thereby achieving a shift from "discovering anomalies" to "understanding and explaining anomalies." Compared to existing methods that only perform risk weight propagation or correlation analysis, this invention provides a clear causal path and semantic interpretation, significantly improving the accuracy, interpretability, and practical value of anomaly localization.
[0036] Furthermore, regarding model-graph linkage and closed-loop optimization, this invention implements a two-way linkage mechanism between the detection model and the knowledge graph. On one hand, anomaly detection results are mapped to events or state changes in the graph, triggering causal reasoning and impact analysis. On the other hand, the root cause conclusions and semantic constraints obtained from graph reasoning are fed back to the model side for dynamically adjusting model thresholds, sample weights, or parameter settings, thereby adapting to changes in operating conditions and reducing the risk of false positives and false negatives. In addition, the system provides a visual interactive interface, allowing operations and maintenance personnel to replay, confirm, and manually annotate anomalies. These operations are automatically converted into high-quality training samples and participate in model retraining, constructing a continuous iterative closed loop of "data-model-feedback-data" to achieve self-evolution in model lifecycle management.
[0037] In terms of detection performance, this invention employs a dual-hidden-layer deep neural network structure, which can fully exploit the complex nonlinear relationships in oil and gas well production data, enabling adaptive modeling for different well types and operating conditions. Compared with traditional methods based on fixed thresholds or empirical rules, this model can effectively distinguish between normal fluctuations and real risks in the identification of anomalies such as fluid accumulation and deteriorating operating conditions, significantly reducing the problems of "over-alarms" and "missed alarms," and improving the stability and reliability of anomaly detection.
[0038] Finally, in terms of interaction and intelligent services, this invention supports semantic queries and exploratory analysis based on natural language. Users can directly raise questions such as "the cause of the liquid accumulation warning in a well under a certain skid" or "the alarm change after a certain process switch". The system automatically converts them into graph queries and returns the results, enabling anomaly management to shift from passive response to proactive exploration and intelligent decision-making, reducing reliance on expert experience and improving operation and maintenance efficiency and safety levels.
[0039] This invention achieves the organic integration of unified modeling, causal chain calculation, model closed-loop optimization, and interpretable interaction through a digital support platform digital base. It is significantly superior to existing technologies in terms of anomaly identification accuracy, root cause localization capability, system adaptability, and decision support level, and has significant technological progress and practical value.
[0040] (1) The expected benefits and commercial value of the technical solution of this invention after transformation are as follows: This invention, through an integrated technical approach of "ontology mapping + anomaly causal chain tracing + two-way model linkage," can significantly reduce production losses and downtime caused by anomalies such as liquid accumulation during shale gas production. Based on publicly available statistical data, in scenarios with old well clusters represented by the Southwest Oil and Gas Field, the system, after its implementation, can shorten the anomaly response time from "post-event manual inspection level (measured in days)" to "minute level," significantly reducing ineffective maintenance and delayed handling caused by false alarms and missed alarms, directly resulting in a production recovery effect of tens of millions of cubic meters per year. Simultaneously, this invention, by mapping and precipitating causal knowledge of equipment—process—anomalies, enables the transferability and scalable replication of experience, reducing rigid reliance on senior experts. When applied across multiple blocks and oil and gas fields, it boasts low marginal costs and strong replicability, possessing the dual attributes of "platform software + industry knowledge assets," and exhibiting continuous commercial monetization potential and a high return on investment.
[0041] (2) The technical solution of this invention fills a technical gap in the industry both domestically and internationally: Existing domestic and international research and products largely focus on two relatively separate directions: "rule-based / simple model-based anomaly detection" and "ontology-based risk propagation and management." No systematic engineering solution has yet been found that integrates "production scenario ontology graphs, computable causal chain encoding, and bidirectional linkage of anomaly detection results." This invention, for the first time in the shale gas production and operation field, unifies ontology modeling of wells, skids, processes, sensors, alarms, and operational events. Based on this, it explicitly encodes a traversable causal path of "upstream equipment—process switching—downstream anomaly," and then establishes a closed-loop linkage with an online anomaly detection model, achieving an end-to-end closed loop of "detection—causal investigation—interpretation—feedback optimization." This ontology graph-driven causal chain tracing system, oriented towards anomaly root cause diagnosis, has not yet been found in publicly available literature or patents, thus possessing significant technological value in filling a gap in the industry.
[0042] (3) The technical solution of the present invention solves a technical problem that people have long wanted to solve but have never been able to solve successfully: For a long time, oil and gas production companies have generally hoped to achieve "automatic detection and automatic root cause location" of problems such as fluid accumulation, pressure difference anomalies, and pipeline blockage under complex old well conditions. However, due to factors such as the strong evolution of operating conditions over time, the highly complex dependence of equipment and processes, and the highly nonlinear nature of anomaly representation, traditional methods based on static thresholds and single-point models are difficult to simultaneously balance detection accuracy, interpretability, and maintainability. This invention constructs a unified ontology map covering the wellbore, surface skid, process flow, and alarm events, and binds the anomaly detection results to the causal chain encoding in the map. This enables the system to automatically trace the possible upstream root causes and downstream impact range along the physical and process logic path after detecting an anomaly. Thus, for the first time in engineering, it realizes an integrated, computable expression and automatic tracing of "anomaly-causal chain-root cause" in complex shale gas production scenarios, solving the industry problem of "machines can alarm but don't know why".
[0043] (4) The technical solution of the present invention overcomes technical bias: In existing engineering practices, two types of technical biases are prevalent in the industry: first, "ontology graphs are suitable for static asset management and risk labeling, but not for real-time anomaly diagnosis and closed-loop optimization"; second, "the more complex the anomaly detection model, the more of a black box it is, and it is not suitable for deep integration with the knowledge system." Influenced by these biases, many systems either remain at the rule / threshold alarm level or deploy complex models in isolation as "black box alarms," failing to form a truly interpretable and evolvable overall solution. This invention breaks through these two inherent concepts: on the one hand, it elevates the ontology graph from a "static knowledge repository" to an "active reasoning engine" responsible for causal chain encoding and online traceability calculation; on the other hand, it uses graph semantic constraints for "causal placement" and "path interpretation," and uses the graph reasoning results to back-calibrate and optimize model parameters, forming a new paradigm where "the model is no longer an uninterpretable black box, but rather co-evolves with the knowledge graph." Thus, this invention effectively overcomes the industry's technical biases regarding real-time graph applications and model interpretability, forming an innovative technical path different from traditional approaches. Attached Figure Description
[0044] Figure 1 This is a flowchart of the ontology graph construction and abnormal causal chain tracing method provided in the embodiments of the present invention.
[0045] Figure 2 This is a structural diagram of the ontology graph construction and abnormal causal chain tracing system provided in the embodiments of the present invention.
[0046] Figure 3 This is a comparison chart of the accuracy of abnormal root cause localization under complex working conditions provided by the embodiments of the present invention.
[0047] Figure 4 This is a comparison chart of the efficiency of semantic query and traditional retrieval provided by the embodiments of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0049] like Figure 1 As shown, the ontology graph construction and abnormal causal chain tracing method provided in this embodiment of the invention includes: S1 models the objects of wells, skids, processes, differential pressure, alarms, and operational events, as well as their relationship patterns, into an ontology graph.
[0050] S2 performs causal chain encoding, representing "upstream equipment - process - downstream anomaly" as a computable path.
[0051] S3 enables bidirectional linkage between the ontology map and anomaly detection results, mapping the anomaly detection results to map nodes and using the map to trace the cause of the anomaly.
[0052] The ontology graph construction and abnormal causal chain tracing method described in this invention uses structured semantic modeling and graph computing technology to abstract multi-source heterogeneous objects such as wells, skids, process flows, differential pressure parameters, alarm information and operation events scattered in the production system into an ontology graph with semantic constraints. Based on this, a computable causal path model is constructed to realize structured source tracing and dynamic reasoning of abnormal events.
[0053] First, in step S1, the core entities in the oil and gas production system are ontologically modeled. Wellhead equipment, gathering and transportation skids, separation skids, manifold systems, process nodes, pressure differential variables, sensor alarm signals, and maintenance operation events are abstracted as class nodes, and their hierarchical relationships, attribute constraints, and logical connection rules are defined. Topological dependencies and process flow relationships between entities are established through object attributes and data attributes, thereby forming an ontology graph with clear semantic boundaries and inheritance structure. This graph not only expresses physical connection relationships but also encodes process causal relationships and operational logical constraints.
[0054] Secondly, in step S2, the typical "upstream equipment - process - downstream anomaly" relationship in the production process is encoded into a path. The influence relationship between changes in equipment operating status, fluctuations in process parameters and abnormal behavior is transformed into a directed path structure. Through graph traversal rules and path weight models, the potential causal chain is represented as a set of computable paths, making the propagation of anomalies traceable and quantifiable.
[0055] Finally, in step S3, the anomaly results output by the real-time anomaly detection algorithm are mapped to corresponding nodes in the graph. Based on the graph structure, reverse path searching and causal reasoning are performed. By analyzing the incoming edge paths of the anomaly nodes and the state changes of their upstream nodes, the most likely root cause equipment or process is identified, achieving anomaly source localization and impact range assessment. Simultaneously, the graph can dynamically update node states based on new detection results, enabling continuous iterative optimization. Through the fusion of semantic modeling and graph computation, this method achieves a closed-loop linkage from anomaly detection to causal tracing, improving the accuracy and interpretability of anomaly analysis in complex production systems.
[0056] Methods for ontology graph construction and anomaly causal chain tracing also include: Construct an ontology graph for different business scenarios in the shale gas field, defining entities such as wells, skids, processes, and sensors, and their relationships.
[0057] When the anomaly detection model outputs results, the results (such as anomaly nodes) are mapped onto the graph.
[0058] By using graph query or graph traversal algorithms, the upstream and downstream related entities of the abnormal node are automatically traced and a natural language explanation is generated.
[0059] It provides an interface that supports semantic queries, allowing users to ask "exploratory" follow-up questions.
[0060] In S1, the digital support platform models objects and relationships as ontology graphs: Objects: wells, skids, alarms, processes, sensors.
[0061] Relationships: Well-skid connection, process switching history, alarms and upstream and downstream causal chains.
[0062] Semantic queries: Supports semantic follow-up questions such as "the liquid accumulation warnings of all wells under a certain skid over the past three days" and "whether a certain process switch has led to an increase in alarm frequency".
[0063] This technical solution addresses the long-standing issues in practical engineering applications, such as insufficient adaptability to complex working conditions and the difficulty of achieving both performance and stability with a single technical approach. It organically integrates and collaboratively designs multiple key mechanisms at the system level. Its working principle does not rely on a single isolated module or processing method, but rather on the overall construction of the synergistic effects of different functional mechanisms at the temporal, spatial, and logical levels. This creates a synergistic relationship of mutual support, constraint, and enhancement among the mechanisms, thereby achieving overall performance improvement.
[0064] This solution first uses basic functional mechanisms to perform initial processing or state acquisition of core objects, establishing stable and controllable initial working conditions. Building upon this, adjustment and feedback mechanisms are introduced to dynamically correct and adaptively adjust key parameters, enabling the system to adjust its operating strategy in real time according to changes in the external environment or the evolution of internal states. Simultaneously, control and constraint mechanisms are used to coordinate the scope, execution order, and mutual influence of each subprocess, avoiding interference or performance cancellation between different mechanisms. These mechanisms operate collaboratively within a unified framework, ensuring the system always operates within its optimal or near-optimal range.
[0065] The combination of mechanisms in this scheme is not a simple parallel arrangement or functional superposition, but rather a targeted design based on specific technical problems, with their timing of action, triggering conditions, and coupling methods tailored to the specific technical challenges. On one hand, preceding mechanisms provide the necessary input conditions or state basis for subsequent mechanisms; on the other hand, the output results of subsequent mechanisms, in turn, influence the parameter adjustment or execution strategy of preceding mechanisms, forming a closed-loop synergy. This bidirectional coupling and dynamic coordination among multiple mechanisms enables the system to maintain stable operation under complex conditions and achieve comprehensive technical effects that are difficult to achieve with a single mechanism.
[0066] Therefore, this technical solution, through collaborative design at the mechanism level, achieves a shift from "local optimization" to "system-level optimization," resulting in significant improvements in overall performance, stability, and adaptability. This multi-mechanism collaborative working principle breaks through the traditional design approach where functional modules are independent and lack effective coordination, demonstrating clear systemic improvements and technological advancements, and possessing outstanding substantive characteristics.
[0067] like Figure 2 As shown, the ontology graph construction and abnormal causal chain tracing system provided in this embodiment of the invention includes: The ontology graph modeling module is used to model objects and relational schemas such as wells, skids, processes, differential pressure, alarms, and operational events into ontology graphs.
[0068] The causal chain coding module is used to form a computable path from 'upstream equipment - process - downstream anomaly'.
[0069] The two-way linkage module enables two-way linkage between the ontology map and the detection results.
[0070] The ontology graph construction and abnormal causal chain tracing system provided in this invention achieves computable tracing and intelligent analysis of abnormal events in the production system through the collaborative work of the ontology graph modeling module, the causal chain encoding module, and the bidirectional linkage module.
[0071] First, the ontology graph modeling module performs unified semantic modeling on objects such as wells, skids, process steps, differential pressure parameters, alarm information, and operational events. It abstracts various entities as nodes, and the structural relationships, dependencies, and interactions between them as edges. Based on a predefined ontology schema, it standardizes the descriptions of node types, attribute constraints, and relationship types, thereby constructing a unified ontology knowledge graph. This graph is used to characterize the structural topology and process logic of the production system, providing a foundational data structure for subsequent anomaly reasoning and path tracing.
[0072] Secondly, the causal chain encoding module, based on the established object relationships in the ontology graph, encodes the causal dependencies between "upstream equipment—process links—downstream anomalies" into a computable and traversable directed path structure. When the detection module or external system detects an abnormal event, the anomaly is injected into the graph as an event node. The causal chain encoding module starts from this anomaly node and traverses backward or forward along the predefined causal relationship direction, tracing back level by level to potentially related upstream equipment, process changes, or parameter anomalies, thereby forming the anomaly generation path and impact path, and realizing automatic reasoning of the root cause and scope of impact of the anomaly.
[0073] Furthermore, the bidirectional linkage module enables bidirectional mapping and feedback between detection results and the ontology graph. On one hand, abnormal results generated by real-time detection are mapped to state changes or event nodes in the graph, which are used to trigger causal chain reasoning and path analysis. On the other hand, the root cause nodes, influencing nodes, and their correlation strength obtained from graph reasoning can be fed back to the detection module to assist in adjusting detection thresholds, sample weights, or model parameters, thereby improving the detection model's adaptability to changes in different operating conditions, reducing the risk of false alarms and false negatives, and forming a closed-loop operation mechanism of "detection-reasoning-feedback-optimization".
[0074] At the application level, this invention can also be deployed in computer equipment, information data processing terminals or storage media, and execute computer programs stored in memory through a processor to realize the above-mentioned ontology graph construction, causal chain tracing and linkage optimization method steps, thereby providing continuous and stable technical support for anomaly diagnosis, operation and maintenance decision-making and system optimization.
[0075] As a preferred improvement of the present invention, an embodiment of the present invention provides a method for constructing an ontology graph and tracing abnormal causal chains, including the following steps: S1 models wells, skids, processes, differential pressure, alarms, and operational events, along with their relationship patterns, into an ontology graph. By establishing entity categories and semantic relationships, the ontology graph solidifies complex equipment topologies, process flows, and historical events in the form of a graph.
[0076] S2 performs causal chain encoding, representing "upstream equipment - process - downstream anomaly" as a computable path. A directed acyclic graph (DAG) is used as the basic structural model of causal relationships. Each equipment node, process status node, and anomaly node in the production system is represented as a set of vertices V in the graph. Equipment connection relationships, parameter influence relationships, and process transmission relationships are defined as a set of directed edges E, forming a causal propagation network that satisfies acyclic constraints. The equipment topology and process temporal logic are uniformly mapped to a triple vector structure. The triples are embedded as vector representations, and numerical encoding is performed through a relation embedding function, so that path calculation can be transformed into a combination operation in vector space. A time decay factor λ is introduced as an edge weight correction parameter to weight the causal influence within different time windows.
[0077] S3 enables bidirectional linkage between the ontology graph and anomaly detection results, mapping anomaly detection results to graph nodes and using the graph to trace the cause of anomalies. When the detection model outputs anomaly results, the results are mapped to the corresponding entity nodes in the graph, thereby triggering causal chain tracing. Conversely, the causal chain inference results in the graph can also serve as feedback signals to assist the detection model in optimizing parameters and thresholds.
[0078] As a preferred improvement of the present invention, this embodiment provides a semantic query method for anomaly causal chains based on ontology graphs, comprising: receiving a natural language query instruction input by a user; invoking a semantic parsing algorithm to parse the natural language query instruction into a graph query statement, the graph query statement including time attribute constraints and upstream and downstream association constraints; executing the graph query statement in a pre-constructed ontology graph, the ontology graph containing directed causal paths that map physical device topology to process timing logic; and performing multi-hop retrieval in the directed causal paths using a graph traversal algorithm to extract anomaly nodes that satisfy the graph query statement and their associated upstream root cause nodes or downstream influence nodes, generating query results containing causal logic.
[0079] Example 1 In a shale gas well scenario, the system first collects data on the wellhead, skid-mounted equipment, process steps, differential pressure sensors, alarm events, and manual operation events, and then models these objects into an ontology graph based on a digital support platform. The well and skid are represented by physical connections, the process switching process forms a process history link, and alarm and sensor signals are mapped to relevant equipment nodes, realizing a semantic expression of the overall knowledge of well site production operations.
[0080] When the differential pressure sensor detects an abnormal increase at a wellhead, the detection model outputs an abnormal result. This result is located to the well node in the body map through a node mapping mechanism. The system automatically calls the graph traversal algorithm to trace upwards from this node to the corresponding skid-mounted equipment and the history of the switching process, and downwards to the affected alarm event, and generates an explanation: "The abnormal differential pressure at this wellhead may have been caused by the skid-mounted equipment switching to a high-load process, resulting in an increase in the alarm frequency." Example 2 In the oil and gas pipeline monitoring system, users input via natural language: "Query the fluid accumulation warning status of all wells under a certain skid over the past 3 days." The semantic query module uses a semantic parsing algorithm to transform the input into a graph query statement: retrieving all well nodes under the skid node, for example: filtering the fluid accumulation alarm type among alarm relationships with a time attribute of less than or equal to 3 days, and returning the results.
[0081] The query results are displayed in tabular and graphical form, listing the number of liquid accumulation alarms for each well and the corresponding timestamps. The user further inquired: "Did the alarm frequency increase after a certain process switch?" For example, the system automatically compared the number of alarm events in the 24 hours before and after the process switch and output a comparison report, concluding: "After switching to process X, for example, the alarm frequency of this skid increased from 2 times per day to 5 times per day."
[0082] Example 3 At a certain gas production site, the system maps anomaly detection results and process switching events into a unified causal chain. The chain is arranged chronologically, with nodes sequentially including upstream equipment A, process B, and downstream anomaly C, and the direction of the edges representing the causal relationship. For example, after the skid equipment switches processes, the wellhead pressure surges, triggering an alarm. This causal chain is stored as a computable path for subsequent retrieval and tracing.
[0083] In its implementation, the system employs a graph traversal algorithm for causal chain calculation. During upward traversal, the system starts from the anomaly alarm node and traces it step-by-step to the possible starting equipment and process switching points. During downward traversal, it expands to all potentially affected nodes, such as anomalies at adjacent wellheads or alarms from downstream sensors. This allows the system to form a complete anomaly propagation path, enabling maintenance personnel to quickly locate the root cause.
[0084] Example 4 The constructed ontology graph construction and anomaly causal chain tracing system comprises four main modules: an ontology graph modeling module, a causal chain encoding module, a bidirectional linkage module, and a semantic query module. The modeling module is responsible for accessing real-time and historical data from oil and gas production; the causal chain module generates equipment-process-anomaly paths; the bidirectional linkage module enables interaction between detection results and the graph; and the semantic query module handles natural language interaction.
[0085] During operation, when the system detects an anomaly in a well, the detection result is automatically mapped to the well node in the graph, simultaneously triggering causal chain calculation. The semantic query module allows maintenance personnel to directly input natural language commands to query the anomaly trend of the well over the past week. The causal tracing and explanation module further converts the graph traversal results into a natural language description: "This anomaly was caused by a valve malfunction in device A, which was transmitted to well C through process switching B, ultimately triggering an alarm."
[0086] Combination Figure 3 and Figure 4 This can further illustrate the technical effects and engineering advantages of the method of the present invention in complex production scenarios. Figure 3 This invention demonstrates that, under various complex operating conditions such as sensor failure, human-caused process interference, actual fluid accumulation anomalies, and equipment-related failures, the root cause localization accuracy of this invention, based on ontology graphs and causal chain tracing mechanisms, significantly outperforms traditional rule-based monitoring methods. Traditional rule-based monitoring is prone to misjudgments or omissions in multi-factor coupled scenarios; for example, its accuracy is only about 30%–45% in cases of human interference and equipment-related failures. In contrast, the method of this invention consistently maintains an accuracy of over 90%, especially approaching 98% in the identification of actual fluid accumulation anomalies. This indicates that by modeling the semantic association between "equipment—process—parameter—alarm," it is possible to effectively eliminate superficial interference, directly pinpoint the causal source, and significantly improve the root cause localization capability in complex anomaly scenarios.
[0087] Figure 4 The efficiency difference between semantic graph query and traditional manual retrieval was further compared. It can be seen that in tasks such as single-well historical queries, cross-well correlation analysis, and complex causal inference, the time consumption of traditional manual retrieval increases exponentially with complexity, while semantic graph query consistently maintains a response time within seconds. Especially in complex causal inference scenarios, traditional methods require thousands of seconds or even longer, while graph query can complete path search and causal chain calculation in just a few seconds, demonstrating the efficiency and scalability of graph computing in large-scale correlation data analysis. Therefore, this invention not only improves the accuracy of anomaly localization but also significantly optimizes analysis efficiency, achieving a balance between accuracy and real-time performance.
[0088] To verify the practical application effect of the present invention, "A method and system for constructing an ontology map and tracing anomaly causal chains", this embodiment selected production monitoring data of a shale gas development block from January to February 2026 and conducted comparative tests on "anomaly root cause localization" and "false alarm identification".
[0089] 1. Accuracy of anomaly root cause localization under complex working conditions: (1) Current challenges: The geological conditions of this block are complex, and the production of a single well is often affected by fracturing of adjacent wells and process switching (such as gas lift and bubble drainage). During the monitoring period from January 26 to February 9, 2026, the traditional monitoring system generated a large number of "liquid accumulation warnings", but after manual verification, about 40% of them were false alarms, mainly due to "abnormal data sampling" or "human operation interference". (2) Implementation effect: This system automatically performs causal chain tracing by constructing an ontology map of "equipment-process-abnormality".
[0090] For cases of "severe data anomalies" (such as Ning 209H21-5): the system traces the data along the spectrum to the upstream sensor node and finds that the variance of the pressure data exceeds the preset threshold. It automatically determines that the problem is "sensor failure" rather than "wellbore fluid accumulation", thus successfully blocking the false alarm chain.
[0091] For cases of "severe abnormal interference" (such as Ning 209H43-1): the system correlated and queried process operation events on the same platform, and identified that the timestamp of the liquid accumulation signal and the "gas lift valve opening" event highly overlapped (overlap > 0.9), and automatically classified it as "process interference".
[0092] Final statistics show that the system achieved an anomaly root cause localization accuracy of 92.5%, which is 35 percentage points higher than the traditional rule-based method.
[0093] 2. Comparison of semantic graph query efficiency: (1) Test scenario: Operation and maintenance personnel need to answer complex questions, such as "query all wells that have experienced fluid accumulation and abnormal oil pressure drop in the past 3 days".
[0094] (2) Efficiency improvement: Traditional method: It is necessary to export the SCADA pressure data table and the liquid accumulation alarm record table separately, and then perform manual VLOOKUP correlation screening, which takes an average of about 25 minutes.
[0095] The present invention directly converts natural language into graph query statements through a semantic parsing module, enabling multi-hop queries within the constructed ontology graph. The average response time is only 1.2 seconds, improving query efficiency by more than a thousand times.
[0096] 3. Knowledge graph construction and entity alignment effect: (1) Construction scale: The system automatically processed the mapping relationship between 500+ sensor points and 120+ equipment ledgers in this block. (2) Alignment accuracy: In response to the non-standard naming problem on site (such as “H11-3” and “H1103”), this system used a semantic fuzzy matching algorithm to achieve 99% automatic entity alignment, which solved the association problem of “having data but no ledger” caused by data silos and ensured the integrity of the causal tracing path.
[0097] Specific implementation plan for ontology graph construction and abnormal causal chain tracing method.
[0098] This solution addresses the anomaly handling scenarios in shale gas fields. It strictly adheres to the methods described in the claims, clearly defining the specific implementation details of ontology modeling, causal chain coding, and two-way linkage. It selects a mature technology stack to ensure that the solution is feasible, accurately traceable, and adaptable to the anomaly handling needs of well, skid, and process linkage in shale gas fields.
[0099] S1 ontology graph modeling implementation: A digital support platform is used as the modeling carrier, and the graph is deployed based on the Neo4j graph database. The modeling objects are clearly defined as five major categories of entities: wells, skids, processes, alarms, and sensors. 80 shale gas wells, 240 skid-mounted units, 18 production processes, 50 alarm types, and 400 sensor entities are entered. Three core semantic relationships are defined: well-skid connection relationships (e.g., "Well 1 - Connection - Skid 3"), process switching history (including switching time and switching parameters), and alarm-causal chain relationships. The equipment topology, process flow, and historical operation events are solidified into a graph structure, and entity and relationship data are updated monthly to ensure the timeliness of the graph.
[0100] S2 Causal Chain Encoding Implementation: A causal propagation network is constructed using a directed acyclic graph. Equipment, process status, and abnormal nodes are represented as a vertex set V, while relationships such as equipment connections and parameter influences are represented as a directed edge set E, avoiding causal loops. Paths such as "well-process-pressure difference anomaly" are mapped to triple vectors (e.g., <well 1, production process A, pressure difference anomaly>). The TransE relation embedding function embeds these triples into 128-dimensional vectors, transforming path calculation into vector combination operations. A time decay factor λ=0.8 is set, with causal influences within the last 24 hours weighted at 1.0, those between 24 and 72 hours weighted at 0.8, and those exceeding 72 hours weighted at 0.5, adjusting edge weights to reflect temporal differences in influence.
[0101] S3 bidirectional linkage is implemented by establishing a linkage interface between the anomaly detection model and the graph, using Python to develop the interface service for real-time data interaction. When the anomaly detection model (such as a random forest model) outputs abnormal differential pressure results, it is automatically mapped to the corresponding differential pressure sensor node and associated well / skid node in the graph, triggering a graph traversal algorithm (depth-first traversal) to trace the root causes such as abnormal upstream equipment parameters and process switching anomalies, generating a traceability report. Simultaneously, the causal chain reasoning results in the graph (such as "abnormal process switching caused differential pressure exceeding the standard") are fed back to the detection model to help optimize model thresholds and improve detection accuracy.
[0102] Traceability optimization: Employing Cypher graph query language, the system automatically traces upstream and downstream entities associated with abnormal nodes, achieving a response time of ≤2 seconds and a traceability accuracy of ≥97%. When an alarm is triggered, the system automatically generates a natural language traceability report, clearly identifying the root cause of the anomaly, its propagation path, and associated entities, enabling maintenance personnel to quickly handle the situation. The solution is deployed on industrial edge servers, supporting offline caching to ensure traceability can still be completed under extreme network conditions, meeting the real-time and reliability requirements of industrial sites.
[0103] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0104] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for constructing an ontology graph and tracing abnormal causal chains, characterized in that, Includes the following steps: S1 models well, skid, process, differential pressure, alarm, and operation event objects and their relationship patterns as ontology graphs. By establishing entity categories and semantic relationships, ontology graphs solidify complex equipment topology, process flow and historical events in the form of graphs. S2 performs causal chain encoding, representing "upstream equipment—process—downstream anomaly" as a computable path. A directed acyclic graph (DAG) is used as the basic structural model for causal relationships. Each equipment node, process status node, and anomaly node in the production system is represented as a set of vertices V in the graph. Equipment connection relationships, parameter influence relationships, and process transmission relationships are defined as a set of directed edges E, forming a causal propagation network that satisfies acyclic constraints. Equipment topology relationships and process temporal logic are uniformly mapped to a triplet vector structure. Triples are embedded into vector representations, and numerical encoding is performed using a relation embedding function, transforming path calculation into a combination operation in vector space. A time decay factor λ is introduced as an edge weight correction parameter to weight the causal influence within different time windows. S3 enables bidirectional linkage between the ontology map and anomaly detection results, mapping the anomaly detection results to map nodes and using the map to trace the cause of the anomaly. When the detection model outputs abnormal results, the results are mapped to the corresponding entity nodes in the graph, thereby triggering causal chain tracing. Conversely, the causal chain reasoning results in the graph can also serve as feedback signals to help the detection model optimize parameters and thresholds.
2. The method according to claim 1, characterized in that, The modeling of the ontology map adopts a digital support platform, defining objects as wells, skids, processes, alarms, and sensors, and relationships as well as connections between wells and skids, process switching history, alarms, and causal chains.
3. The method according to claim 1, characterized in that, By using graph query or graph traversal algorithms, abnormal nodes are automatically traced back to their upstream and downstream related entities, and natural language interpretation results are generated.
4. A semantic query method for anomaly causal chains based on ontology graphs, characterized in that, include: Receive natural language query commands input by the user; A semantic parsing algorithm is invoked to parse the natural language query instruction into a graph query statement, which includes time attribute constraints and upstream and downstream association constraints. The graph query statement is executed in a pre-constructed ontology graph, which contains directed causal paths that map physical device topology to process timing logic. A graph traversal algorithm is used to perform multi-hop retrieval in the directed causal paths to extract abnormal nodes that satisfy the graph query statement and their associated upstream root cause nodes or downstream influence nodes, generating query results containing causal logic.
5. The method according to claim 4, characterized in that, The semantic query supports the following statements: query the liquid accumulation warning status of all wells under a certain skid within a preset time window, and query whether a certain process switch has led to an increase in alarm frequency.
6. A causal chain coding method, characterized in that, Anomaly detection events and process switching events are mapped to directed graph paths in chronological order, where the paths are connected sequentially by upstream equipment nodes, process nodes, and downstream anomaly nodes, and the directed edges represent causal relationships.
7. The method according to claim 6, characterized in that, The calculation of the causal chain adopts a graph traversal method, tracing upwards to the possible starting device and downwards to the possible affected anomalies according to the timestamp order.
8. A system for ontology graph construction and anomaly causal chain tracing that implements the method described in any one of claims 1 to 7, characterized in that, include: The ontology graph modeling module is used to construct ontology relationships between wells, skids, processes, differential pressure, alarms, and operational events. The causal chain coding module is used to form a computable path between upstream equipment, processes, and downstream anomalies; The two-way linkage module is used to realize two-way linkage between the ontology map and the detection results.
9. The system according to claim 8, characterized in that, It also includes a semantic query module, which receives natural language input, converts it into graph query statements, and outputs query results.
10. The system according to claim 8, characterized in that, It also includes a causal tracing explanation module, which automatically generates natural language explanation text based on graph traversal results and displays it on the user interface.
Citation Information
Patent Citations
Ontology-based risk propagation over digital twins
US12289336B2