Pumping unit fault cause tracing and maintenance scheme recommendation method based on knowledge graph

CN123014205APending Publication Date: 2026-10-30YANAN YANCHANG EQUIP MFG GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611334256.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]然而该人工经验匹配故障维修方案方法仅依靠静态离散案例记录单机型、单故障与单一维修措施的浅层对应关系,无法统一关联常规、双驴头、调径变矩、异相多类抽油机设备结构、油藏工况、故障传导路径之间的多层级因果关联,从而难以完成跨机型、多耦合因素下的深层故障根因完整溯源,最终仅能匹配表象故障对应的表层处置手段,无法定位不同机型抽油机故障产生的底层诱因,维修方案推荐匹配精准度不足

Benefits of technology

本发明构建油藏层、井筒层、抽油机设备层三层架构并绑定机型专属故障因果链路的分层溯源知识图谱,能够依托层级化关联关系完整梳理故障从底层诱因到表层异常的全传导链路,精准定位多层级故障根本原因,可直接输出结构化故障溯源路径,便于运维人员直观掌握故障诱发逻辑,针对性制定处置措施,有效减少同类故障反复发生,稳定延长油井检泵作业周期。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014205A_ABST
    Figure CN123014205A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence knowledge reasoning and fault diagnosis, and specifically discloses a pumping unit fault cause tracing and maintenance scheme recommendation method based on a knowledge graph, collects various pumping unit model parameters, oil reservoirs, production, indicator diagrams and sub-model historical faults and maintenance data, completes data cleaning and classification, and obtains a standardized sub-model data set; divides three-layer graph ontologies based on the sub-model data set, extracts various entities and constructs model-specific fault cause and effect conduction relationships, and generates a hierarchical tracing knowledge graph; relies on the hierarchical tracing knowledge graph to develop model recognition, fault layer-by-layer tracing and maintenance matching fixed rules, and completes the framework building of logical deduction; inputs real-time data of a pumping unit to be diagnosed, calls corresponding graphs and reasoning rules to deduce fault root causes layer by layer, obtains fault tracing links and an optimal maintenance scheme; writes back new data in the field to the knowledge graph, manually supplements and adjusts the reasoning rules, and obtains a continuously updated and iterated graph and rule base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence knowledge reasoning and fault diagnosis technology, and relates to a method for tracing the causes of oil pumping unit faults and recommending maintenance solutions based on knowledge graphs. Background Technology

[0002] Beam pumping units are the mainstream mechanical oil production equipment in onshore oilfields, suitable for well production in formations with insufficient energy. Through continuous iteration, the industry has developed various mature models, including conventional, heterogeneous, dual-beam, and adjustable-diameter / variable-torque models, with load and stroke specifications covering all operating conditions. They are adaptable to common crude oil, high water cut, heavy oil, low permeability, and deviated and horizontal well production scenarios. Various pumping units have simple and reliable structures and are convenient for field maintenance, and have been widely used in oilfields. However, during long-term reciprocating operation, pumping units are prone to coupled surface and downhole faults due to factors such as sand production, wax deposition, alternating loads, and rod and tubing wear. This can lead to reduced production, shortened pump inspection cycles, and increased maintenance costs. Therefore, using digital means to trace pumping unit faults and intelligently recommend maintenance solutions is an important development direction for intelligent operation and maintenance in oilfields.

[0003] Existing mature traditional handling methods mostly rely on manual experience to match fault repair solutions. This method depends on the long-term accumulation of operation and maintenance logs for various types of pumping units in various oilfields. It involves manually collecting parameters of various pumping unit types, such as conventional, double-head, diameter-adjusting, torque-changing, and anomaly-type pumping units, as well as reservoir properties, production conditions, indicator diagram characteristics, historical fault records, and corresponding maintenance and handling cases, and compiling them into a paper-based or local static fault handling rule library. When any type of beam pumping unit in the field experiences an operational anomaly, the operation and maintenance personnel collect data such as equipment stroke, stroke count, suspension point load, indicator diagram, and motor operating parameters on-site. They then manually search and compare the data against the static rule library, based on the structural characteristics of the equipment model. Relying on the years of practical experience of on-site technicians, they determine the fault type and manually select corresponding maintenance, adjustment, cleaning, and operation-related handling solutions from the historical case library.

[0004] However, this manual experience-based fault repair solution matching method relies solely on static discrete case records to establish a superficial correspondence between single machine type, single fault, and single repair measure. It cannot unify and associate the multi-level causal relationships between conventional, dual-head, diameter-adjusting, and heterogeneous pumping unit equipment structures, reservoir conditions, and fault propagation paths. Consequently, it is difficult to complete the comprehensive tracing of deep fault root causes across machine types and multiple coupling factors. Ultimately, it can only match the surface-level treatment measures corresponding to the apparent faults, and cannot locate the underlying causes of faults in different types of pumping units. Therefore, the accuracy of the repair solution recommendation matching is insufficient. Summary of the Invention

[0005] In view of the problems existing in the prior art, the present invention provides a method for tracing the causes of oil pumping unit failures and recommending maintenance solutions based on knowledge graphs, in order to solve the above-mentioned technical problems.

[0006] To achieve the above and other objectives, the technical solution adopted by the present invention is as follows: This invention provides a method for tracing the causes of oil pumping unit failures and recommending repair solutions based on knowledge graphs. The method includes the following steps: Collect parameters of various pumping units, reservoir data, production data, indicator diagrams, and historical fault and maintenance data for each unit type. Clean and classify the data according to the specific rules for each unit type to obtain a standardized unit type dataset. Based on the model-specific dataset, a three-layer graph ontology is divided, various entities are extracted, and a model-specific fault causal transmission relationship is constructed to generate a hierarchical traceability knowledge graph with model labels. Based on the hierarchical traceability knowledge graph, fixed rules for model identification, fault tracing, and maintenance matching are formulated for different pumping unit models, and a framework for logical deduction is built. Input the real-time data of the pumping unit to be diagnosed, call the corresponding graphs and reasoning rules to deduce the root cause of the fault layer by layer, match cases of the same model, and obtain the fault tracing link and the optimal maintenance plan; On-site data is added back to the knowledge graph, and reasoning rules are manually supplemented and adjusted to obtain a continuously updated and iterated knowledge graph and rule base.

[0007] As described above, the knowledge graph-based method for tracing the causes of oil pumping unit failures and recommending repair solutions provided by this invention has at least the following beneficial effects: This invention constructs a three-layer architecture of reservoir, wellbore, and pumping unit equipment, and binds a hierarchical knowledge graph of fault causal links specific to each model. It can rely on hierarchical relationships to completely sort out the entire transmission link of faults from the underlying causes to the surface anomalies, accurately locate the root causes of multi-level faults, and directly output structured fault tracing paths. This makes it easy for operation and maintenance personnel to intuitively understand the fault induction logic, formulate targeted disposal measures, effectively reduce the recurrence of similar faults, and stably extend the pump inspection operation cycle of oil wells.

[0008] This invention combines the fault tracing link generation step with a multi-dimensional weighted screening mechanism. While outputting the root cause path of the fault, it automatically outputs the highest priority maintenance plan by quantitatively scoring and ranking the solutions based on multiple dimensions such as treatment timeliness, operating cost, downtime loss, and long-term treatment effect. This provides on-site maintenance personnel with quantitative and referable decision-making basis, simplifies the workload of manually comparing multiple treatment plans, and improves the efficiency of on-site fault handling decision-making in oilfields.

[0009] This invention supports the direct writing of newly added production, fault, and maintenance data from the field back to a hierarchical traceability knowledge graph to expand its volume and relationships. At the same time, the reasoning rules can be supplemented, deleted, and corrected manually, which can continuously expand the fault case library and the boundary of the judgment logic. This allows the system's diagnostic logic to be dynamically updated and adapted to the working conditions of the oilfield, ensuring that the results of fault identification, root cause location, and maintenance plan recommendation are consistent with the actual on-site operation scenario in the long term, and continuously improving the accuracy of diagnosis matching and the adaptability of the plan. Attached Figure Description

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

[0011] Figure 1 This is a schematic diagram showing the connections between the steps of the method of the present invention.

[0012] Figure 2 This is a schematic diagram of the fault tracing knowledge graph of the present invention.

[0013] Figure 3 This is a schematic diagram of the system architecture of the present invention.

[0014] Figure 4 This is a schematic diagram of data flow according to the present invention. Detailed Implementation

[0015] The following description, in conjunction with the implementation of this invention, is merely an example and illustration of the concept of this invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the inventive concept or exceed the scope defined in these claims, all of which should fall within the protection scope of this invention.

[0016] Please see Figure 1-4 As shown, the knowledge graph-based method for tracing the causes of pumping unit failures and recommending repair solutions includes: Collect parameters of various pumping units, reservoir data, production data, indicator diagrams, and historical fault and maintenance data for each unit type. Clean and classify the data according to the specific rules for each unit type to obtain a standardized unit type dataset.

[0017] Preferably, the specific steps for obtaining the standardized sub-model dataset include: Define the range of data collection devices and clarify the data sources for each type of device; Connect to the multi-business database interface of the oilfield to batch pull the original multi-source heterogeneous data corresponding to four types of pumping units; Using the pumping unit equipment number as the unique primary key, an independent data storage partition is established according to the unit model. Three categories of labels are added to all raw data: surface equipment, wellbore and downhole, and reservoir conditions, to complete the initial data classification. Differentiated cleaning rules are customized for different machine models. For samples in each zone that are missing key operating parameters, the average value of the neighborhood under the same operating conditions in the same block is used to fill in the numerical values. Abnormal data is removed, and duplicate fault repair records that are entered repeatedly are deduplicated. Standardize the format of all data and bind a unique model classification identifier to each piece of data; Perform data integrity verification on the standardized and cleaned data for each sub-model. Once the verification is successful, output a standardized dataset for each sub-model.

[0018] First, the scope of data collection was defined based on the actual application volume and structural differences of beam pumping units in domestic onshore oilfields. Four types of pumping units were selected as data collection targets: conventional beam pumping units, heterogeneous beam pumping units, double-head irregular beam pumping units, and adjustable-diameter, variable-torque beam pumping units. Conventional beam pumping units are the basic standard equipment in oilfield production scenarios and have the highest overall usage. Heterogeneous beam pumping units have undergone structural optimization to address the energy consumption deficiencies of conventional models and are widely used in low-permeability reservoirs. Double-head irregular beam pumping units have optimized the beam head stress structure, making them suitable for heavy oil production and high-load lifting conditions. Adjustable-diameter, variable-torque beam pumping units can dynamically adjust crank torque and are suitable for oil wells with severe dynamic fluid level fluctuations and large load variations. These four types of units collectively cover more than 95% of the beam pumping units used in onshore oilfields, possessing universal applicability for large-scale data collection and field implementation. Meanwhile, the four types of pumping units differ in their four-bar linkage structure, balance adjustment methods, and the location of vulnerable components. Their fault induction mechanisms and typical fault manifestations are clearly distinguishable, making them suitable for the technical architecture of this invention, which involves building dedicated fault causal transmission links for each model, constructing knowledge graphs by region, and customizing inference rules for each model. This effectively avoids confusion in fault tracing and determination caused by mixing data from multiple models. Other niche customized and modified models, and beamless pumping units, have scattered application scenarios and very few deployments, with no need for large-scale intelligent operation and maintenance diagnosis. Including them would cause data redundancy and an overly complex rule system; therefore, they are not included in the scope of this data collection.

[0019] The system identifies six major data sources for each type of pumping unit: static equipment files, reservoir basic ledgers, real-time dynamic production monitoring, dynamometer curves, historical fault ledgers, and downhole maintenance operations. It then connects to the oilfield's multi-business database interface to batch retrieve all original, multi-source, heterogeneous data for the four types of pumping units, including suspension load, stroke, stroke count, reducer torque, reservoir permeability, crude oil viscosity, production volume, water cut, dynamic fluid level, valve leakage, rod and tube wear, hot washing operations, sucker rod replacement, and balance adjustment. Referring to the industry standard "Walking Beam Pumping Unit", the mechanical structure and suspension point load design of the equipment at the factory are designed with a 5% safety redundancy for instantaneous load fluctuations. This range is within the allowable range of normal mechanical vibration and minor acquisition errors. If the single-coordinate load exceeds the rated load range by 5%, it is considered dirty data such as sensor jumps and garbled transmission, which has no reference value for fault diagnosis. Therefore, this tolerance rejection boundary is set. Referring to the quality grading requirements of dynamometer diagram data in "Testing of Pumping Unit Well Dynamometer Diagrams" and combined with the statistical experience of multiple oilfield digital projects, when the proportion of invalid noise points does not exceed 12%, the key diagnostic features of the curve can be effectively recovered through interpolation fitting and wavelet denoising methods, and the accuracy of pump condition identification can be maintained within the acceptable range for engineering. If the proportion exceeds this, the curve shape is severely distorted, and it is impossible to accurately extract the seven structured parameters such as the maximum suspension point load, load range, and upper and lower stroke areas. It is also impossible to effectively fit fault modes such as pump condition, uneven wear, and abnormal fluid supply. Therefore, it is set as the judgment boundary between valid and invalid samples. For indicator diagram curve data sources, the original closed indicator diagram is first decomposed into a two-dimensional coordinate sequence of stroke and load. Then, the mean of the neighborhood of missing coordinate points is used to complete the process, abnormal points exceeding the ±5% tolerance range of the rated load of the model are removed, and duplicate time series samples are deduplicated. If the proportion of abnormal coordinate points in a single indicator diagram exceeds 12%, the invalid sample is directly discarded. The structured parameters that can be directly mounted as entity attributes are extracted from the cleaned indicator diagram: maximum suspension point load, minimum suspension point load, load range, area enclosed by upstroke load, area enclosed by downstroke load, left and right offset of the graph, and difference between upstroke and downstroke. The above seven quantitative indicators are used as fixed attribute fields and are included in the original dataset along with the storage path index of the original indicator diagram file, thus completing the overall collection of the original data. Then, using the pumping unit equipment number as the unique primary key, independent data storage partitions were divided according to the pumping unit model. At the same time, three data classification tags were uniformly added to all raw data: surface equipment, wellbore downhole, and reservoir conditions. The seven structured attributes extracted from the dynamometer card were assigned to the surface equipment layer tag and bound to the corresponding surface fault manifestation entity. Based on the tags, the initial classification of all raw data was completed.

[0020] Next, differentiated data cleaning rules are customized for each machine model. For samples lacking key operating parameters within each storage partition, the average values ​​of corresponding parameters from adjacent wells with highly consistent production conditions within the same block are calculated to fill the missing parameters. If four conditions are met—belonging to the same block (same block number, same production layer, pump hanger depth deviation not exceeding ±50m, and relative production volume deviation not exceeding ±15%)—then the well location is considered to have highly consistent production conditions with the missing sample well location. Conditions within the same block ensure that geological conditions such as reservoir permeability, formation pressure, and crude oil properties are basically consistent, which is the most basic prerequisite for similar operating conditions. Conditions within the same production layer ensure that reservoir pressure, fluid properties, and fluid supply capacity are at the same level, avoiding operating condition deviations caused by differences in cross-layer extraction. The criterion for determining that the pump hanger depth deviation does not exceed ±50m is as follows: the pump hanger depth directly affects the pump's submersion, lift height, and rod string stress state. Referring to the "Statistical Method for Production Indicators of Oil Wells with Pumping Units, Electric Submersible Pumps, and Screw Pumps," pump hanger depth is one of the core production indicators for pumping unit wells. The design grading standard for pump hanger depth in oilfields typically uses 50m as the engineering adjustment increment. Within this deviation range, the pump's working environment and rod string stress state can be considered basically consistent. Production volume is a core indicator comprehensively reflecting the well's fluid supply capacity and the matching degree of the lift system. Referring to the reasonable fluctuation range of production indicators in the "Statistical Method for Production Indicators of Oil Wells with Pumping Units, Electric Submersible Pumps, and Screw Pumps" and the oilfield's experience in grading and managing production volume, this standard uses the average daily production volume as the statistical benchmark. In oilfields, a daily average production volume of 10% to 15% is typically used as the classification standard for wells of the same production level. When the relative deviation is within this range, the wells are at the same production capacity level, and the pump's filling degree and load characteristics are similar. The formula for calculating the neighborhood mean filling is as follows: ; in, This represents the mean value of the neighborhood under the same operating conditions in the same block used for filling in missing parameters, and n represents the total number of neighboring well location samples under the same operating conditions in the same block that participated in the mean calculation. This represents the original measured value of the operating parameter corresponding to the i-th neighboring well location. The calculated result directly replaces the missing corresponding parameter in the current sample. When no adjacent wells within the same block meet the conditions of high consistency in operating status, the cross-well neighborhood mean filling scheme is abandoned. Instead, the most recent 5 consecutive valid historical parameters of the single well to which the current missing parameter sample belongs are retrieved, and the arithmetic mean is calculated as the missing value. If the number of valid historical data records of the well itself is also 0, the sample is marked as missing and cannot be filled, and the entire sample is directly removed. After completing the missing parameter filling, the operating parameters are judged to exceed the limits. The generated maximum suspension load attribute field is retrieved for boundary verification. The original measured data of the suspension load corresponding to the sample whose attribute value exceeds the factory rated operating range of the pumping unit equipment and exceeds the ±5% fault tolerance margin is directly removed. For the fault and maintenance records that are repeatedly entered, the duplicate items are identified based on the operation timestamp and corresponding well number information carried in the single record. The duplicate and redundant items are deleted and deduplicated, completing the differentiated data cleaning work by region.

[0021] After data cleaning, the entire dataset is standardized with uniform physical units, time formats, equipment model names, fault names, and textual descriptions of maintenance measures. Each data entry is also assigned a unique and fixed model classification identifier, ensuring accurate correspondence between individual data entries and their respective pumping unit types. Finally, the standardized and cleaned data by model type undergoes a data integrity check, verifying that no data fields are missing, tags match model identifiers correctly, and all redundant and abnormal data has been removed. Once the entire verification process is complete, a standardized model-specific dataset is output, ready for direct use in constructing a hierarchical traceability knowledge graph.

[0022] Based on the model-specific dataset, a three-layer graph ontology is divided, various entities are extracted, and a model-specific fault causal transmission relationship is constructed to generate a hierarchical traceability knowledge graph with model labels.

[0023] Preferably, the construction steps of a hierarchical knowledge graph include: A three-layered body framework is constructed, dividing the reservoir body, the wellbore downhole body, and the pumping unit equipment body from top to bottom, and clarifying the hierarchical relationship logic between the three bodies. Multi-dimensional entity extraction is carried out based on standardized sub-model datasets, extracting corresponding entity data from reservoir layers, wellbore layers, and equipment respectively; Construct a general cross-layer fault causal transmission relationship, sort out the fault progression logic, and build a basic fault transmission network; Based on the structural characteristics of the four types of pumping units, a unique fault causal link corresponding only to a single unit model was established. Configure attribute fields for all extracted entities in a unified manner, and bind data such as model parameters, operating condition values, fault characteristics, and maintenance parameters to the corresponding entities; Batch import entities, entity attributes, general relationships, and model-specific relationships from the standardized model dataset into the graph database to complete entity alignment, relationship binding, and attribute assignment. Verify the integrity of entity associations, the smoothness of hierarchical transmission logic, and the accuracy of model-specific link matching. After verification, generate a hierarchical fault tracing knowledge graph with multi-level fault root cause tracing capabilities.

[0024] First, a three-layered body framework is constructed, dividing the reservoir body, the wellbore downhole body, and the pumping unit equipment body from top to bottom, and clarifying the hierarchical relationship logic between the three bodies. The reservoir itself, as the upstream root cause level for fault tracing, is used to record the inherent physical properties of the reservoir and dynamic parameters of production, and is the source of the fault. The wellbore and downhole layers, as the intermediate transmission level, receive the influence of reservoir conditions and transmit the fault causes downward to the surface pumping equipment. The pumping unit equipment layer, as the terminal level of the external manifestation of the fault, directly reflects the abnormal operation of the equipment and the obvious fault phenomena. The overall rule is that fault tracing must start from the pumping unit equipment layer and traverse the wellbore and downhole layers backward to finally locate the reservoir itself. At the same time, the scope of the entities that each layer can bear is defined. The reservoir itself includes four types of entities: reservoir permeability, crude oil viscosity, production rate, and water cut. The wellbore and downhole layers include three types of entities: dynamic fluid level, valve leakage, and rod and tubing wear. The pumping unit equipment layer includes four types of entities: suspension load, stroke, number of strokes, and reducer torque. This completes the definition of the top-level architecture and layer boundaries of the map.

[0025] Subsequently, multi-dimensional entity extraction was conducted based on the standardized model-specific dataset. Data was categorized and grouped according to three pre-labeled classification tags: surface equipment, wellbore and downhole, and reservoir conditions. Reservoir entities included four categories: reservoir permeability, crude oil viscosity, production, and water cut. Data was sourced from structured monitoring data in the reservoir dynamics database and unstructured text in reservoir description reports. Wellbore downhole entities included three categories: dynamic fluid level, valve leakage, and rod / tube wear. Data was sourced from structured fields in the downhole operation and maintenance log database and unstructured text in well workover summaries and well history data. Pumping unit equipment entities included four categories: suspension load, stroke, stroke rate, and reducer torque. Data was sourced from real-time structured monitoring data from the oil production data acquisition and monitoring control system and model parameters in the equipment static archive. Standardized attribute field templates were pre-configured for each entity category, clearly defining the numerical range, data type, unit, and value boundaries.

[0026] For structured data originating from the oilfield's multi-business database, a direct extraction method based on mapping rules is adopted. Using the predefined mapping relationship between database field names and map entity attributes as the extraction basis, each record in the database table is directly converted into a corresponding entity node. Specifically, using the pumping unit equipment number as the primary key, each structured record carrying a surface equipment classification label in the standardized sub-model dataset is traversed, and field values ​​such as suspension load, stroke, stroke rate, and reducer torque are assigned to the corresponding pumping unit equipment layer entity node according to the field-attribute mapping table; structured records carrying wellbore downhole classification labels are traversed, and field values ​​such as dynamic fluid level, valve leakage level, and rod / tube wear degree are assigned to the corresponding wellbore downhole layer entity nodes; structured records carrying reservoir condition classification labels are traversed, and field values ​​such as reservoir permeability, crude oil viscosity, production rate, and water cut are assigned to the corresponding reservoir layer entity nodes.

[0027] For entity information derived from unstructured data such as oilfield operation and maintenance reports, well workover summaries, well history data, and fault description texts, a deep learning-based named entity recognition method is used for extraction. A specialized dictionary for pumping unit fault diagnosis is pre-built, collecting professional terms such as fault names, equipment component names, operating parameter names, maintenance operation names, and unit model names. A BERT-BiLSTM-CRF model architecture is used for named entity recognition. The BERT pre-trained language model obtains the global semantic feature vector of each character in the input text, BiLSTM captures the contextual dependencies in the text sequence, and the CRF layer performs global optimization decoding on the entity label sequence, outputting the entity category label for each character. During model training, historical fault description texts and maintenance operation reports accumulated in the oilfield are used as training corpora. Experts manually annotate the entities in the corpus, generating a training dataset with entity labels to complete model fine-tuning training. Building upon BERT word vectors, this model integrates domain dictionary features and character-level local features. Domain dictionary features are generated by matching domain dictionary words from the input text using a bidirectional maximum length matching method. Character-level local features are extracted using a convolutional neural network. The three types of feature vectors are concatenated and input into the BiGRU-Attention-CRF model to complete entity recognition. Recognized entities are categorized and labeled according to preset types, assigned to the corresponding hierarchical entity category, and their contextual descriptions in the original text are extracted as supplementary explanations of entity attributes.

[0028] For indicator diagram curve data, entity extraction is performed using curve feature extraction and structured transformation. The original closed indicator diagram is decomposed into a two-dimensional coordinate sequence of stroke and load. The process involves filling in the mean of the neighborhood of missing coordinate points, removing abnormal points that exceed the ±5% tolerance range of the rated load of the model, and deduplicating duplicate time series samples. Seven structured parameters are extracted from the cleaned indicator diagram curve: maximum suspension point load, minimum suspension point load, load range, area enclosed by upstroke load, area enclosed by downstroke load, left and right offset of the graph, and difference between upstroke and downstroke. These seven quantitative indicators are used as fixed attribute fields and bound to the attributes of the corresponding pumping unit equipment layer entity nodes along with the storage path index of the original indicator diagram file.

[0029] For entities extracted from heterogeneous data sources such as structured data, unstructured text, and dynamometer curves, entity alignment and fusion operations are performed. Using the pumping unit equipment number and entity name as the joint matching key, duplicate extraction results from different data sources that point to the same entity are identified and merged into a single entity node. Attribute information of the same entity extracted from different data sources is merged and deduplicated, with the union taken as the entity's complete attribute set. When different data sources provide different values ​​for the same attribute of the same entity, the data source credibility priority is applied: structured databases take precedence over expert-reviewed unstructured documents, and then over raw collected data. Values ​​from highly reliable sources are selected, and conflicts are marked for manual review. Based on the hierarchical division of the three-layer ontology framework, the hierarchical classification of each entity node is verified, and entities with incorrect classifications are reclassified. After the above steps, a structured entity list that can be directly used for graph import is output, including each entity's unique identifier, entity name, entity type, hierarchical classification, attribute field list and attribute values, and data source identification information.

[0030] Next, a general cross-layer fault causal transmission relationship was constructed, and the fault progression logic applicable to all four types of pumping units was sorted out: the reservoir entity drives wellbore layer faults from the source. Among them, the reservoir permeability disturbs the dynamic fluid level in the wellbore by changing the formation fluid supply rate, the increase in crude oil viscosity will increase the fluid resistance in the wellbore, the production rate directly determines the fluid filling degree of the wellbore, and the increase in water cut will carry solid impurities into the wellbore. The above four types of reservoir parameter anomalies will all destroy the downhole valve sealing conditions and thus produce valve leakage. At the same time, they will reduce the lubrication effect between the rod and the tubing and introduce abrasive particles, inducing rod and tubing wear. Thus, the transmission of reservoir-induced causes to wellbore downhole layer faults is completed. Three types of wellbore downhole faults can propagate upwards to the surface pumping equipment: deviations from the optimal fluid level alter the pump's lifting resistance; valve leakage causes backflow of the lifting medium, resulting in ineffective work; and rod and tubing wear leads to eccentric stress and structural damage to the sucker rod string. These three wellbore faults sequentially cause excessive or drastic fluctuations in the pumping unit's suspension point load, actual strokes failing to reach preset values, decreased overall unit operating stroke stability, and abnormal fluctuations in reducer output torque. Ultimately, this manifests as deviations in various operating parameters of the pumping unit equipment from normal conditions, thus clearly defining a complete top-down fault propagation chain. Establishing a common directional causal relationship across all models forms a universal underlying framework for fault propagation across the entire system.

[0031] Subsequently, based on the differentiated structural characteristics of the four types of pumping units—namely, their mechanical structures, stress patterns, vulnerable components, and frequent failures—specific fault causal links were established, each effective only for a single unit model. For conventional beam pumping units, the focus was on supplementing fault links derived from rod and tube wear; for non-phase beam pumping units, a causal link related to balance phase shift was added; for double-donkey-head non-standard beam pumping units, a dedicated transmission link for stress wear in the four-bar linkage was added; and for adjustable-diameter, variable-torque beam pumping units, the fault causal relationship corresponding to crank torque adjustment failure was recorded. Each dedicated link is bound to a corresponding unit model identifier and can only be invoked when searching for and matching the corresponding unit model, supplementing differentiated fault association content that cannot be covered by the general fault transmission framework.

[0032] Then, standardized attribute fields are uniformly configured for all extracted entities. For reservoir entities, reservoir permeability, crude oil viscosity, single-well production, and water cut data are bound; for wellbore and downhole entities, dynamic fluid level monitoring height, valve leakage severity level, and rod and tubing wear damage degree are bound; for pumping unit equipment entities, measured suspension load, stroke length, number of operating strokes, and reducer output torque are bound. At the same time, four common attributes are uniformly configured for all entities: machine type classification number, data acquisition timestamp, fault status marker, and corresponding maintenance log index. The machine type parameters, operating condition values, fault characteristic identifiers, and maintenance-related parameters stored in the standardized machine type dataset are bound one by one to the target entities under the corresponding level, completing the attribute information assignment for all entities.

[0033] All entities, entity attributes, global general cross-layer relationships, and sub-model specific relationships generated within the standardized sub-model dataset are imported into the graph database in batches. The oil pumping unit equipment number is used as the unique primary key to complete the alignment and merging of multi-level entities with the same oil well. Redundant entity nodes that are repeatedly generated are removed. Entity node creation, directed causal relationship edge binding, and batch entry and assignment of entity attributes are completed in sequence. The structured knowledge system is stored and built within the graph database.

[0034] Finally, the database content of the fault graph was verified item by item. First, the integrity of entity associations was verified by traversing all entity nodes and identifying and supplementing isolated and independent entities without any relationship. Second, the smoothness of hierarchical transmission logic was verified by randomly selecting fault entities in the pumping unit equipment layer for reverse retrieval to confirm that the source of the fault can be traced upwards along the associated links to the wellbore and reservoir layers, with no logical disconnections or jump errors. Third, the accuracy of the matching of the specific links for each machine model was verified by checking the machine model binding identifier of each specific fault causal link to confirm that it will not be retrieved and matched across different machine models. After all three verifications were verified to be correct, a hierarchical fault tracing knowledge graph with multi-level fault root cause tracing and machine model-differentiated fault reasoning capabilities was finally generated.

[0035] Based on a hierarchical knowledge graph, fixed rules for model identification, fault tracing, and maintenance matching are formulated for different pumping unit models, and a framework for logical deduction is built.

[0036] Preferably, the steps for model identification, fault tracing layer by layer, and establishing fixed rules for repair matching include: Traverse all entities, entity attributes, and cross-layer causal semantic relationships in the hierarchical fault tracing knowledge graph, extract causal features, and integrate them to form a structured knowledge feature set; Extract the equipment distinguishing attributes within the map, set multi-field joint judgment conditions, and distinguish the pumping unit type by multi-attribute combination matching to obtain fixed rules for model identification; Based on the three-layer causal transmission semantic edge of reservoir-wellbore-equipment map, forward fault evolution judgment rules and reverse root cause tracing judgment rules are set respectively. Search paths, judgment thresholds and logical jump conditions are defined to obtain fixed rules for fault tracing layer by layer. Based on the relationship between the root cause entities of the fault map and the maintenance plan entities, the matching logic is divided into three categories according to the type of treatment: on-site adjustment, preventive maintenance, and downhole overhaul. Multi-dimensional matching judgment conditions are set to distinguish the appropriate treatment methods corresponding to different fault causes and obtain fixed rules for maintenance matching.

[0037] Preferably, the steps for building a logical deduction framework include: Retrieve the completed fixed rules for model identification, fixed rules for fault tracing, and fixed rules for maintenance matching, and bind them to the entity and causal relationship index of the corresponding model in the hierarchical tracing knowledge graph; Set the triggering conditions for graph retrieval, the execution priority of rule matching, and the fixed execution process; define the fallback logic for cross-branch graph retrieval when a single rule fails to match. Anchoring the retrieval paths of the three-layer entities of reservoir, wellbore, and pumping unit equipment within the hierarchical traceability knowledge graph, the judgment statement of each fixed rule is transformed into a retrieval query statement that can be executed by the graph database; A mechanism for merging and deduplicating redundant path results is pre-set during the simulation process. For scenarios where multiple tracing paths point to the same root cause of the fault, duplicate links are simplified and integrated according to the weight of the fault impact. The calculation logic of multi-index weighted ranking of pre-set maintenance plans is used to solidify the weight judgment criteria into the fixed rules of maintenance matching, determine the judgment basis for the ranking of plan superiority and inferiority, and complete the construction of the entire logical deduction and operation framework.

[0038] First, we conducted research on model identification, layer-by-layer fault tracing, and the development of fixed rules for maintenance matching. We traversed all entities, entity attributes, and cross-layer causal semantic relationships in the layered fault tracing knowledge graph. We dissected the causal logic between entities, parameter constraints, fault propagation sequence, and model binding identifiers. We then categorized, collected, and eliminated redundancy in the various associated features, threshold features, and hierarchical subordinate features obtained from the dissected data. The threshold features were taken from the rated operating parameter range of the pumping unit equipment defined in the previous standardized dataset cleaning process. We standardized and encapsulated them according to hierarchical categories and relational uses, and integrated them to form a structured knowledge feature set.

[0039] The inherent distinguishing attribute fields that can differentiate equipment types are extracted from the structured knowledge feature set. These fields are static attributes that do not change after the pumping unit leaves the factory. Specifically, they include the basic dimensions of the four-bar linkage, the structural type of the balancing mechanism, the form of the lever head structure, the configuration identifier of the crank torque adjustment module, the adapter model of the reducer, and the factory model code. The above six types of static attributes are all structural and configuration parameters that are fixed and unchanging after the pumping unit leaves the factory. No single attribute is sufficient to uniquely identify the model; multiple attributes must be matched simultaneously to finally determine the equipment's category. To avoid misclassification of the model due to matching a single attribute, it is necessary to construct joint judgment conditions based on multi-field logic and relationships. That is, the equipment's category can be determined only when all six static attributes completely match the technical parameters and structural features of the corresponding model. This generates fixed rules for model identification.

[0040] Based on the causal transmission semantic edges between the three-layer structure of reservoir-wellbore-equipment in the hierarchical fault tracing knowledge graph, forward fault evolution judgment rules and reverse root cause tracing judgment rules are established respectively. The graph retrieval path, operating parameter judgment thresholds, and logical jump conditions in multi-branch scenarios corresponding to each retrieval branch are clearly defined. The operating parameter judgment thresholds are the rated operating parameters of the equipment set during the data cleaning stage. The interval delineation is based on the original manufacturer's technical specifications for pumping units, oilfield block reservoir development plans, single-well production allocation documents, oil production engineering industry operation and maintenance testing standards, and long-term on-site production statistics of safe operating range. These criteria are applied to reservoir permeability, crude oil viscosity, production volume, water cut, and dynamic fluid level. Normal value boundaries are defined for parameters such as degree of leakage, valve leakage level, rod and tube wear degree, suspension point load, stroke, stroke rate, and reducer torque. If the measured data exceeds the corresponding boundary, the parameter is judged to be abnormal. At the same time, the logical jump conditions in multi-branch scenarios are defined. When no abnormal entity is matched after traversing a single search branch, the search is switched to other related branches of the same level according to the fault impact weight. When a single fault corresponds to multiple upstream causes, the source is traced in sequence according to the hierarchical priority from the reservoir layer to the wellbore layer and then to the equipment layer. When the parameter is in the critical range, the search is switched to the adjacent branch for cross-verification. If there are no results in all branches of the same level, the search scope is expanded to the upper level. The fixed rules for fault tracing layer by layer are completed.

[0041] Based on the pre-established association between the root cause entities and maintenance plan entities within the hierarchical fault tracing knowledge graph, the matching logic system is divided into three categories: on-site adjustment, preventive maintenance, and downhole overhaul. The on-site adjustment category corresponds to operation scenarios where no downhole tubing needs to be pulled out and only parameter and mechanism fine-tuning is completed on the surface. The preventive maintenance category corresponds to periodic hidden danger investigation and maintenance operation scenarios. The downhole overhaul category corresponds to scenarios where downhole tubing must be pulled out and lowered into the wellbore for maintenance operations. For each type of matching logic, a multi-dimensional joint judgment condition is set, consisting of fault root cause type, fault severity level, oil well production condition constraints, and pumping unit model compatibility. The four constraints work together to complete the solution screening and accurately distinguish the appropriate treatment methods corresponding to different fault causes: for faults with unbalanced surface parameters, on-site adjustment methods such as crank balance adjustment and stroke parameter modification are matched; for faults with hidden dangers such as component aging and leakage and lack of lubrication, preventive maintenance methods such as adding lubrication, pipeline hot washing, and packing replacement are matched; for irreversible wellbore faults such as downhole pump failure and severe wear and leakage of rod and tubing, downhole overhaul treatment methods such as running and pulling tubing to replace pump, sand flushing and unblocking, and casing repair are matched. In this way, the fixed rules for maintenance matching are compiled.

[0042] After the three types of fixed rules are compiled, the logical deduction framework is built. The compiled fixed rules for model identification, fault tracing, and maintenance matching are retrieved, and the retrieval nodes and relationships involved in each rule are bound and mapped one by one to the entities and causal relationship indexes under the corresponding model in the hierarchical tracing knowledge graph, thus establishing a directed calling relationship between the rules and the knowledge graph base. The system sets the trigger conditions for graph retrieval, the execution priority of multiple rules, and the fixed execution order of the entire process. The graph retrieval trigger conditions are when the system receives real-time collected operating parameters of the pumping unit and the parameters exceed the preset judgment threshold, or when it receives manually entered fault alarms or abnormal records. The execution priority of multiple rules is fixed from high to low as follows: fixed rules for machine identification, fixed rules for fault tracing, and fixed rules for maintenance matching. The fixed execution order of the entire process is as follows: first, the reasoning framework is triggered and the machine identification rule is executed to lock the corresponding machine sub-graph; then, the fault tracing rule is run to traverse the graph to retrieve the root cause of the fault; finally, based on the tracing results, the maintenance matching rule is executed to filter and sort the treatment plans, and the results are simplified before outputting the diagnostic conclusion.

[0043] Simultaneously, a fallback retrieval logic is defined whereby, when a single rule match yields no valid result, the system performs a cross-branch traversal search within the current machine model's sub-graph, preventing the tracing process from being interrupted due to the failure of a single retrieval path. The system anchors the standard retrieval traversal paths corresponding to the association edges between the three layers of entities—reservoir, wellbore, and pumping unit equipment—in the hierarchical tracing knowledge graph. Each fixed rule's textual judgment conditions, constraint ranges, and branch jump logic are converted into retrieval query statements that the graph database can directly parse and execute, enabling interactive execution between upper-level inference commands and the lower-level graph database.

[0044] A pre-established naming convention for graph database node labels and attributes is implemented. Oil reservoir entity nodes are labeled "OilReservoir," wellbore and downhole entity nodes are labeled "Wellbore," and pumping unit equipment entity nodes are labeled "Equipment." Each entity node carries a `node_type` attribute recording its hierarchy. Directed edges between entities are labeled "CAUSES," carrying a `relationship_type` attribute to indicate the causal transmission type, a `weight` attribute to indicate the fault impact weight, and a `description` attribute to record the causal logic description. Equipment static attribute fields, operating condition parameter thresholds, hierarchy relationships, and machine type binding identifiers are all stored as node attributes or edge attributes.

[0045] For fixed rules governing machine model identification, the judgment statements are transformed into graph database query statements that match multiple static attribute combinations. The query targets a machine node and sets matching conditions where six attributes—four-bar linkage size, balancing mechanism type, donkey head structure form, crank torque adjustment identifier, reducer model, and factory model code—simultaneously equal the input parameter values. The query returns the machine model identifier field of the matching machine, thus achieving machine model locking.

[0046] For the reverse root cause tracing rule in the fixed rules for fault layer-by-layer tracing, it is transformed into a path matching query statement that traces layer by layer from the current fault manifestation entity node along the incoming edge direction of the CAUSES type associated edge. The upper limit of the path depth is set to three layers, corresponding to the three-layer structure of reservoir layer, wellbore downhole layer, and pumping unit equipment layer. Simultaneously, the hierarchical affiliation of all nodes on the path must be within the three layers of the main body. When executing the query, the input surface fault entity name is used as a parameter, and backtracking is performed along the incoming edge direction to return all directed paths from the root cause node to the fault manifestation entity, sorted in descending order of path length to prioritize displaying complete tracing links. For the forward fault evolution judgment rule, it is transformed into a query statement that retrieves the downstream propagation path from the current abnormal entity node along the outgoing edge direction of the CAUSES type associated edge, used to verify whether the abnormality has the conditions to propagate downstream.

[0047] For tracing rules that carry threshold values ​​for determining operating conditions, attribute comparison conditions are embedded in the query statement. For example, the measured value of the suspension point load being greater than 1.05 times the rated load is used as an anomaly determination condition and directly written into the query matching conditions. In multi-branch scenarios, the logic of switching retrieval branches based on fault impact weight is transformed into a weight sorting clause in the query statement. The branch paths are arranged in descending order of the weight attribute value of the associated edges, and the application layer executes the query for each branch sequentially until an abnormal entity is found. When no abnormal entity is matched in all associated branches at the current level, a fallback logic is triggered. The corresponding query statement is designed to progressively increase the retrieval depth, with the path depth gradually increasing from 1 to 3. Through the union operation of multi-level queries, the retrieval scope is progressively expanded, first searching for direct causes, then indirect causes, and finally the root cause at the lowest level.

[0048] A mechanism for merging and deduplicating redundant tracing results is pre-defined during the inference and calculation process. When multiple tracing paths ultimately point to the same root cause of the fault, the duplicate links with the same source are simplified and integrated based on the fault impact weight carried by the causal relationship edge, retaining the core tracing path and eliminating redundant branch content.

[0049] The pre-defined maintenance plan employs a multi-indicator weighted ranking logic, selecting four evaluation indicators: fault eradication effectiveness, construction operation cost, construction time, and fault recurrence probability. These four evaluation dimensions comprehensively cover all fault handling scenarios for four types of pumping units, including on-site adjustment, preventive maintenance, and downhole overhauls, ensuring the indicator system's universality. A multiple linear regression least squares fitting model is constructed by extracting samples from all historical fault handling records within the block over the past three years, with each case representing one sample group. The model expression is defined as follows: Where Y is the overall evaluation score of the maintenance plan. The four indicators—fault eradication effectiveness, construction operation cost, construction time, and fault recurrence probability—were normalized and then input as independent variables. The regression weight coefficients are to be solved; the maintenance plan ultimately selected and implemented manually on-site within a single ledger is marked as the optimal decision sample, and a target standard score is set. The target score for other alternative repair solutions in the same scenario. The least squares objective function is constructed by minimizing the sum of squared residuals between the scores calculated from all sample models and the scores of the labeled standard. , where m represents the total number of historical ledger samples participating in the fitting. Output a comprehensive score for the model of the k-th sample group. Label the standard scores for the manual decision-making of the k-th sample group; obtain a set of original fitting weights by solving this unconstrained optimization problem. Then, a global normalization operation is performed on the original weights: Then, by combining the oilfield downhole operation management assessment system, oil well stable production control indicators, and operation cost quota management specifications, the numerical values ​​are constrained and normalized to obtain fixed weights. , , , The sum of the four weights is 1.

[0050] The following conditions must be met simultaneously to be defined as a normal operating condition without special production constraints: the oil well is not included in the key supply guarantee and emergency production stabilization special list, and there is no mandatory continuous production order; the block to which it belongs is not a cost-strict control pilot unit, and the general operating expense quota is implemented; the frequency of failure recurrence in the past 90 days is no more than 2 times, and it is not a well with a normalized recurring failure; well shut-in operations can be carried out according to the monthly routine maintenance schedule, and there is no hard order to reduce the well shutdown time; there are 5 or more historical closed-loop handling cases of the same machine model and the same failure type. Under normal operating conditions without special production constraints, all machine models and failure scenarios are uniformly ranked and scored using this set of weights. Meanwhile, the logical deduction framework reserves a weight parameter configuration interface. For a few special scenarios, the weight of individual indicators can be adjusted for adaptability without changing the core logic of weighted sorting and the four evaluation indicators. This balances the universality of the standard with the flexibility of on-site working conditions. For example, for oil wells in key supply blocks that are not allowed to be shut down for a long time, the weight of construction time can be increased and the weight of other indicators can be appropriately decreased. For pilot blocks with strict cost control, the weight of construction operation cost can be increased. For well groups with high sand content that are prone to repeated failures, the weight of failure recurrence probability can be increased.

[0051] The standardized scores of the four indicators for the i-th candidate maintenance plan are set as follows: , , , All scores are constrained within the interval Within. Fault eradication effectiveness score. The fault recurrence suppression rate (r) is assigned a score based on the degree of link disruption: A score of 1 is assigned if the fault can be completely blocked, the root cause permanently eliminated, and the structural and operational conditions that prevent recurrence are unlikely. A score between 0.4 and 0.9 is assigned linearly based on the degree of elimination if the fault can only be reduced. The calculation data for the fault recurrence suppression rate (r) is based on the statistical results of the recurrence frequency of faults with the same root cause in the historical maintenance log of the block. The calculation formula is as follows: ,in To determine the average number of recurrences of this root cause fault within a given period before implementing this type of repair method. To determine the average recurrence rate of faults within the same period after maintenance measures are implemented, the statistical period is uniformly set at 90 days. This period is implemented in accordance with the "Detailed Rules for the Management of Fault Ledgers of Oilfield Oil and Gas Production Wells." These rules explicitly require each oil production area to use a natural quarter, i.e., 90 days, as a fixed statistical period for fault frequency statistics, post-maintenance effectiveness evaluation, and well group problem classification. The "Management Specification for Quality Acceptance of Pumping Unit Well Fault Maintenance" stipulates that a decrease in fault recurrence frequency of ≥45% within the 90-day statistical period after maintenance is considered effective treatment. Therefore, [the following is omitted as it is not directly related to the previous sentence]. Set to 0.45, when r is exactly equal to The time-limited score is set to a lower limit of 0.4; the upper limit is set to 0.9 instead of 1. This is because this type of solution differs fundamentally from a complete eradication solution; the former can only reduce the probability of failure but cannot permanently eliminate the cause. To reflect this difference in the score and to avoid overlap with the score for the scenario where r=1, the upper limit is set to 0.9. Definition The linear calculation formula is as follows: ; If the root cause of the fault is not addressed, it is highly likely to recur in the short term, and a score of 0.1-0.3 is assigned. To avoid confusion with the previous level's score, the highest score is set to 0.3, which is immediately adjacent to the lower limit of the previous interval. Simultaneously, a score of 0 is used alone to determine a completely ineffective solution; therefore, the lowest score for this level is set to 0.1. According to the block's "Detailed Rules for Follow-up Management after Well Fault Handling," all temporary treatment operations that only adjust parameters and do not address the underlying causes in the wellbore must undergo on-site verification and follow-up visits 7 days after the completion of the operation to determine whether the fault has rebounded or recurred. 7 days is the minimum mandatory verification period on-site; therefore, this timeframe is selected as the statistical window for the recurrence probability. Within this interval, the fault recurrence suppression rate... , The value is 0.45, therefore the corresponding expected probability of the fault recurring within 7 days. The linear calculation formula is as follows: ; If the current fault cannot be resolved at all, a score of 0 is assigned, and the solution is automatically removed from the list of alternative solutions. Using the extreme cost value of alternative solutions in the same batch as a reference, a standardized construction cost score is calculated using a linear normalization formula: ; in, The total construction cost for scheme i; The lowest cost among all options in this group; This represents the highest cost among all options in this group. Using the extreme construction time of the alternative options in the same batch as a reference, a standardized score for construction time is calculated using a linear normalization formula: ; in, The total well shut-in construction time for scheme i; This is the shortest duration among all the options in this group; The longest duration among all schemes in this group; the fault recurrence probability score is based on... The conversion yields, The historical failure recurrence probability of this scheme is represented, with a value range of 0-1. If no historical statistical samples are available, a default value of 0.5 is assigned. The formula for calculating the comprehensive weighted score of a single scheme is as follows: ; Based on the overall score The repair solutions are sorted in descending order of score, with the highest-scoring solution being the preferred option. If two solutions have the same overall score, the individual score for fault eradication effectiveness is compared, and the solution with the higher score is recommended. The above-mentioned indicator definitions, standardized scoring formulas, and weighted ranking rules are embedded into the fixed rules for repair matching, clarifying the quantitative criteria for prioritizing different repair solutions. Once all the above configuration work is completed, a complete and automatically executable logical deduction framework for diagnostic reasoning can be constructed.

[0052] The essence of the aforementioned weighted summation formula is to construct a multi-attribute utility function for decision-making regarding pumping unit maintenance solutions. In the oilfield operation and maintenance decision-making scenario, the four evaluation indicators correspond to four independent decision objectives: technical effectiveness in eliminating faults, operational economy, minimization of production losses, and long-term reliability. Since these objectives are incommensurable and conflicting—for example, high eradication effectiveness often comes with high costs—by constructing a linear weighted utility function, the multi-objective decision problem is transformed into a single-objective optimization problem. This allows for the selection of the solution that maximizes overall utility from a finite set of solutions, providing quantifiable decision-making basis for on-site operation and maintenance personnel.

[0053] Input the real-time data of the pumping unit to be diagnosed, call the corresponding graphs and reasoning rules to deduce the root cause of the fault layer by layer, match cases of the same model, and obtain the fault tracing link and the optimal maintenance plan.

[0054] Preferably, the steps for constructing the fault tracing link include: Based on the model identification rules, the hierarchical knowledge graph partition corresponding to the target pumping unit is located, and the set of three-layer causal transmission association edges specific to that model is retrieved; Extract various operating parameters from real-time monitoring data, filter out abnormal operating condition features that deviate from normal values, and locate the corresponding surface fault manifestation entities within the map. Initiate a fixed rule for tracing faults layer by layer, using the surface fault manifestation entity as the search endpoint, and then search in reverse for the direct cause entity, indirect cause entity, and the root cause entity at the lowest level. After each level of retrieval is completed, record the relationship and influence logic between the current entity and the previous level entity, and retain each branch path obtained from multiple parallel retrievals; Eliminate duplicate and redundant related nodes and cyclic search paths, and connect the causal relationships between entities according to the order in which the root cause is transmitted layer by layer to the surface fault. The hierarchical affiliation and fault impact weight of the entire serial path are labeled, and all nodes and related information are structurally integrated to finally generate a complete and displayable fault tracing link.

[0055] Preferably, the steps for retrieving the optimal repair solution include: Using the pumping unit model and all underlying root cause entities of all faults as dual-limited search conditions, and calling fixed maintenance matching rules, all maintenance solutions are traversed and searched in the hierarchical traceability knowledge graph. Extract the solution attributes corresponding to each search result, and calculate the comprehensive score of each solution according to the pre-set weight coefficients of various indicators in the maintenance matching rules; All alternative repair solutions are sorted in descending order of their comprehensive scores, and the solution ranked first is selected as the optimal repair solution for this fault scenario.

[0056] First, input three categories of real-time monitoring data for the pumping unit to be diagnosed: reservoir operating parameters, wellbore operating parameters, and pumping unit equipment operating parameters. Based on the model identification rules, locate the hierarchical knowledge graph partition corresponding to the target pumping unit, retrieve the reservoir-wellbore-equipment three-layer causal transmission association edge set specific to this model, extract various operating parameters from the real-time monitoring data, compare them with the preset normal parameter thresholds of entities in the graph, filter out all abnormal operating condition features that deviate from the normal values, and locate the abnormal feature as the corresponding surface fault manifestation entity in the graph.

[0057] Subsequently, a fixed rule for tracing the fault layer by layer is initiated. Taking the surface fault manifestation entity as the search endpoint, the system searches upstream along the causal relationship edges of the graph in reverse order, sequentially searching for the direct cause entity, indirect cause entity, and the root cause entity at the lowest level. After each layer of retrieval, the association relationship and influence logic between the current entity and the previous level entity are recorded. Each branch path obtained from multiple parallel searches is retained, and duplicate and redundant association nodes and loop search paths are removed. The causal relationship between entities is connected according to the order of transmission from the root cause to the surface fault. Based on this, the corresponding hierarchical affiliation information of each entity node in the entire connected path is marked, distinguishing whether each node belongs to the reservoir layer, wellbore layer, or pumping unit equipment layer. At the same time, the fault influence weight value pre-entered by the causal relationship edges of the graph is retrieved and bound to the corresponding transmission relationship. All entity nodes, hierarchical labels, upstream and downstream causal points, fault influence weights, parameter anomaly descriptions, etc. in the link are uniformly collected and packaged to complete the structured information integration. Based on the integrated standardized dataset, a fault tracing link with a standardized structure, complete information, and direct visualization is finally generated. Based on the historical fault logs for each model, the total number of upstream fault cases (T) and the number of downstream fault cases induced by this causal edge are calculated for the fault impact weights bound to the causal relationship edges in the graph. ,according to Complete the calculation and assignment; if the total number of upstream failure cases T is less than 5, then according to the petroleum industry standard "Guideline for Failure Mode and Effects Analysis of Pumping Units", the risk priority number RPN is used to divide the risk level into five levels and the weights are fixed by arithmetic progression: RPN∈[100,125] is the extremely high risk corresponding to a weight of 0.9, RPN∈[70,99] is the high risk corresponding to a weight of 0.7, RPN∈[40,69] is the medium risk corresponding to a weight of 0.5, RPN∈[15,39] is the low risk corresponding to a weight of 0.3, and RPN∈[1,14] is the extremely low risk corresponding to a weight of 0.1; when there is no reference data, the initial weight is uniformly preset to 0.5, and the weight value is updated iteratively with the addition of new failure samples.

[0058] Then, using the pumping unit model and all underlying root cause entities of the fault as dual-limited search conditions, the fixed rules of maintenance matching are invoked. The hierarchical traceability knowledge graph is traversed and searched to find all maintenance solutions that are simultaneously bound to the model and the corresponding root cause of the fault. The solution attributes corresponding to each search result are extracted. According to the pre-set weight coefficients and normalized scoring calculation method of each indicator in the maintenance matching rules, each maintenance solution is weighted and scored item by item to obtain the comprehensive score of a single solution. All candidate maintenance solutions are ranked from high to low according to the comprehensive score. The solution with the highest comprehensive score is the optimal maintenance solution in this fault scenario. All remaining ranked items are uniformly organized into a list of second-best candidate solutions. For each solution in the list, a unique applicable description is output, which is marked in sequence: the root cause of the fault to be dealt with by the solution, the suitable oil well operating conditions, the detailed construction procedures, the estimated construction cost and well shutdown time, the operation constraints and on-site construction precautions. Historical cases of the same model are matched to obtain the fault traceability link and the optimal maintenance solution.

[0059] On-site data is added back to the knowledge graph, and reasoning rules are manually supplemented and adjusted to obtain a continuously updated and iterated knowledge graph and rule base.

[0060] The preferred steps for constructing a continuously updated and iterative graph and rule base are as follows: Regularly collect new real-time business data generated by oilfield pumping units, bind the corresponding pumping unit model identifier according to data classification specifications, and complete the format standardization and basic verification of the new data. The newly added data that has been verified is imported into the hierarchical traceability knowledge graph, new entities not included in the data are identified, the creation of new entities and the assignment of attributes are completed, and the causal relationships between the new entities and between the new entities and the original graph entities are supplemented, thus completing the incremental update of the knowledge graph content. Retrieve the newly added fault diagnosis cases and maintenance implementation results, compare them with the original three fixed rules of model identification, fault tracing, and maintenance matching, and check for any abnormal rule entries. Based on the actual business logic of the newly added field cases, the original reasoning rules were improved. New exclusive reasoning rules were manually written for unprecedented fault scenarios and handling methods, and the new rules were assigned to the rule groups of the corresponding models. The newly added samples were used to test and verify the modified and supplemented rule base, eliminating logical conflicts and overlapping judgment conditions between rules, and confirming that the diagnostic simulation results were consistent with actual on-site operation and maintenance experience. The updated hierarchical tracing knowledge graph database and the revised full-scale reasoning rule base are solidified and saved to form a graph and rule base that can be continuously iterated and updated.

[0061] Regularly collect newly generated real-time business data during the operation of pumping units in the oilfield. Specifically, for production monitoring data such as suspension load, stroke, stroke rate, reducer torque, and indicator curves collected in real time by the SCADA system, considering that this type of data fluctuates significantly with the well's operating conditions daily and is a direct input source for fault symptom identification, a collection cycle of 24 hours is set, i.e., a fixed time window each day, such as from 0:00 to 2:00 AM, to batch retrieve the complete data of the previous day and complete the daily operating condition snapshot update to ensure that fault tracing is timely at the daily level. For records of pump inspection, hot washing, sucker rod replacement, sand flushing and unblocking, and casing repair in the downhole operation and maintenance log database, this type of data is directly triggered by on-site construction events and does not have a periodic change pattern. Therefore, it is set as event-triggered collection, i.e., data is written back within 2 hours after the completion of each operation to ensure that the correlation between maintenance cases and fault root causes can be promptly established. To prevent missed diagnoses of similar faults due to delayed data entry, the data is incorporated into the knowledge graph. For physical properties such as reservoir permeability, crude oil viscosity, production rate, and water cut in the reservoir dynamic database, these parameters are determined by formation fluid supply capacity and are relatively stable within a calendar month, exhibiting a phased, gradual change trend. The data collection cycle is set to once a month, completed within three days after the end of the calendar month, to match the data update rhythm of the oilfield geological monthly report and avoid unnecessary high-frequency collection causing storage redundancy. For inherent equipment attribute information in the equipment static archive, such as the dimensions of four-bar linkages, the type of balancing mechanism, the form of the lever head structure, the crank torque adjustment mark, the reducer model, and the factory model code, this data only changes when pumping unit equipment is modified, major overhauls replace key components, or the archive information is corrected. It is set to trigger immediate collection upon change, while maintaining existing data at other times to ensure that the static attribute fields upon which the model identification rules rely are always consistent with the actual on-site condition.

[0062] According to the preset data classification specifications, each data entry is bound to a corresponding pumping unit model identifier. All newly added data undergoes unified format standardization and basic verification of data integrity and rationality, eliminating abnormal data and invalid redundant information. The standardized new data that has been verified is imported into the hierarchical traceability knowledge graph, which automatically identifies new fault entities, operating condition entities, and equipment status entities that have not yet been included in the graph. The creation of new entity nodes is completed, and attribute values ​​such as parameter thresholds, hierarchical affiliation, and basic weights are assigned. At the same time, the causal transmission logic relationships and corresponding influence weights between new entities and between new entities and existing entities in the graph are sorted out and supplemented, completing the incremental content update of the hierarchical traceability knowledge graph.

[0063] The newly added business data is divided into four categories according to its source system and data nature. The first category is real-time production monitoring data, which comes from the SCADA system and includes equipment operating parameters such as suspension load, stroke, stroke rate, and reducer torque, as well as time-series dynamometer curves, with the equipment number plus timestamp as the unique identifier. The second category is reservoir dynamic data, which comes from the reservoir dynamic database and includes physical property parameters such as reservoir permeability, crude oil viscosity, production rate, and water cut, with the well number plus data date as the unique identifier. The third category is downhole operation and maintenance record data, which comes from the downhole operation and maintenance ledger database and includes downhole operation records and maintenance plan descriptions such as pump inspection, hot washing, sucker rod replacement, sand flushing and unblocking, and casing repair, with the well number plus operation number as the unique identifier. The fourth category is equipment file change data, which comes from the equipment static file library and includes inherent equipment attribute information such as pumping unit model parameters, four-bar linkage dimensions, balancing mechanism type, reducer model, and factory code, with the equipment number as the unique identifier. Each type of data is assigned to the reservoir layer, wellbore downhole layer, or pumping unit equipment layer according to the pre-set hierarchy, and is bound to the corresponding entity type.

[0064] The basic verification process includes the following six items: First, format integrity verification: checking whether newly added data contains missing values ​​in key fields. For reservoir entities, the well number, data date, and corresponding physical property parameter values ​​are mandatory. For wellbore and downhole entities, the well number, operation time, and fault description or operation measure name are mandatory. For pumping unit and equipment entities, the equipment number, acquisition time, and operating parameter values ​​are mandatory. If any mandatory field is missing, the verification fails, the data is not entered into the database, and a supplementary production list is generated. Second, data type verification: checking whether numeric fields are stored in numeric format, whether date fields conform to standard time formats, and whether text fields contain illegal control characters. If the types do not match, an automatic conversion is attempted; if the conversion fails, the record is marked as invalid. Third, numerical range verification: checking whether the operating parameters and physical property parameter values ​​are within the physically achievable range. If they exceed the range, they are judged as outlier records and a manual review process is triggered. Fourth, consistency verification... The system performs the following checks: First, it verifies the consistency between newly added data and existing static archive information. Equipment numbers in equipment archive change data must exist in the equipment static archive database. Equipment numbers in real-time monitoring data must correspond one-to-one with equipment numbers in the archive database. The well number associated with newly added maintenance records must be consistent with the well number in real-time monitoring data. If consistency comparison fails, the data will be rejected and a message indicating a mismatch between equipment number and well number will be displayed. Second, it verifies the time logic, checking the logical order of data acquisition time or operation time and performing deduplication. The timestamp of real-time monitoring data must not be later than the current system time and must not be earlier than the equipment commissioning date. The operation time of maintenance records must not be earlier than the equipment commissioning date and must not be later than the current system time. Third, it verifies the machine type identification, checking whether the machine type identification bound to newly added data belongs to one of the four established models: conventional walking beam, non-phase walking beam, double-donkey-head non-shaped walking beam, and adjustable diameter and torque walking beam. Data with null values ​​or not belonging to the above machine type range will be rejected and a message indicating that the machine type should be relabeled will be displayed. Only newly added data that has passed the formatting and all six basic checks mentioned above can proceed to the subsequent incremental map update process; data that fails the checks will be recorded in a complete log, the reason for the anomaly will be marked and pushed to the review queue, where manual review will determine the correction method.

[0065] We retrieved complete cases of newly added fault diagnosis and the on-site implementation results of repair solutions. We compared the actual root cause conclusions and repair effects with the diagnostic matching results output by the original fixed rules for model identification, fault tracing, and repair matching to identify rule entries with abnormal issues such as inference bias, matching failure, and omissions. Based on the real business logic and fault propagation mechanism of the newly added on-site cases, we modified and optimized the original abnormal inference rules one by one. For new fault scenarios, new fault causes, and corresponding handling methods not covered by the previous knowledge base, we wrote exclusive new inference rules and classified them into the rule groups corresponding to the model.

[0066] The newly added business sample dataset was used to conduct trial calculations and simulations to verify the modified and supplemented rule base. This identified and eliminated issues such as logical conflicts, overlapping and intersecting judgment conditions, and closed-loop or dead-loop retrieval paths among multiple rules. The results of the iterative diagnostic simulation were verified to be consistent with actual oilfield operation and maintenance experience and historical fault handling patterns. Figure 4 As shown, the data flow is divided into four layers from bottom to top: the data acquisition and input layer, the graph construction layer, the inference and application layer, and the iterative feedback layer. The data acquisition and input layer connects to the oilfield's multi-business database interface, batches pulls heterogeneous data from multiple sources, and outputs standardized model-specific datasets after model-specific cleaning and format standardization. The graph construction layer builds a three-layer ontology framework based on the standardized model-specific datasets, extracts multi-dimensional entities and binds general cross-layer causal relationships and model-specific fault causal links. After batch importing into the graph database, it generates a hierarchical traceability knowledge graph with model-specific tags. The inference and application layer relies on the hierarchical traceability knowledge graph to formulate three types of fixed rules and complete the logical deduction framework. When real-time data of the pumping unit to be diagnosed is input, the root cause of the fault is traced back layer by layer, and finally, a structured fault traceability link and the optimal maintenance plan after weighted sorting are output. The iterative feedback layer writes back the newly added production monitoring, downhole operation maintenance, and equipment file change data from the oilfield to the knowledge graph according to the differentiated cycle, and simultaneously performs manual verification and corrects the inference rules. Finally, the incrementally updated hierarchical traceability knowledge graph database and the revised and verified full-scale reasoning rule base are version-fixed and archived, thus forming a knowledge graph and reasoning rule base that can be continuously expanded and dynamically iterated based on on-site business data.

[0067] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0068] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0069] It should be understood that determining B based on A does not mean determining B solely based on A; it also means determining B based on A and / or other information.

[0070] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0071] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for tracing the causes of pumping unit failures and recommending repair solutions based on knowledge graphs, characterized in that, include: Collect parameters of various pumping units, reservoir data, production data, indicator diagrams, and historical fault and maintenance data for each unit type. Clean and classify the data according to the specific rules for each unit type to obtain a standardized unit type dataset. Based on the model-specific dataset, a three-layer graph ontology is divided, various entities are extracted, and a model-specific fault causal transmission relationship is constructed to generate a hierarchical traceability knowledge graph with model labels. Based on the hierarchical traceability knowledge graph, fixed rules for model identification, fault tracing, and maintenance matching are formulated for different pumping unit models, and a framework for logical deduction is built. Input the real-time data of the pumping unit to be diagnosed, call the corresponding graphs and reasoning rules to deduce the root cause of the fault layer by layer, match cases of the same model, and obtain the fault tracing link and the optimal maintenance plan; On-site data is added back to the knowledge graph, and reasoning rules are manually supplemented and adjusted to obtain a continuously updated and iterated knowledge graph and rule base.

2. The method for tracing the causes of pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 1, characterized in that, The specific steps to obtain the standardized sub-model dataset are as follows: Define the range of data collection devices and clarify the data sources for each type of device; Connect to the multi-business database interface of the oilfield to batch pull the original multi-source heterogeneous data corresponding to four types of pumping units; Using the pumping unit equipment number as the unique primary key, an independent data storage partition is established according to the unit model. Three categories of labels are added to all raw data: surface equipment, wellbore and downhole, and reservoir conditions, to complete the initial data classification. Differentiated cleaning rules are customized for different machine models. For samples in each zone that are missing key operating parameters, the average value of the neighborhood under the same operating conditions in the same block is used to fill in the numerical values. Abnormal data is removed, and duplicate fault repair records that are entered repeatedly are deduplicated. Standardize the format of all data and bind a unique model classification identifier to each piece of data; Perform data integrity verification on the standardized and cleaned data for each sub-model. Once the verification is successful, output a standardized dataset for each sub-model.

3. The method for tracing the causes of oil pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 1, characterized in that, The steps for constructing a hierarchical knowledge graph are as follows: A three-layered body framework is constructed, dividing the reservoir body, the wellbore downhole body, and the pumping unit equipment body from top to bottom, and clarifying the hierarchical relationship logic between the three bodies. Multi-dimensional entity extraction is carried out based on standardized sub-model datasets, extracting corresponding entity data from reservoir layers, wellbore layers, and equipment respectively; Construct a general cross-layer fault causal transmission relationship, sort out the fault progression logic, and build a basic fault transmission network; Based on the structural characteristics of the four types of pumping units, a unique fault causal link corresponding only to a single unit model was established. Configure attribute fields for all extracted entities in a unified manner, and bind data such as model parameters, operating condition values, fault characteristics, and maintenance parameters to the corresponding entities; Batch import entities, entity attributes, general relationships, and model-specific relationships from the standardized model dataset into the graph database to complete entity alignment, relationship binding, and attribute assignment. Verify the integrity of entity associations, the smoothness of hierarchical transmission logic, and the accuracy of model-specific link matching. After verification, generate a hierarchical fault tracing knowledge graph with multi-level fault root cause tracing capabilities.

4. The method for tracing the causes of oil pumping unit failures and recommending repair solutions based on knowledge graphs as described in claim 1, characterized in that, The steps for model identification, fault tracing layer by layer, and establishing fixed rules for repair matching are as follows: Traverse all entities, entity attributes, and cross-layer causal semantic relationships in the hierarchical fault tracing knowledge graph, extract causal features, and integrate them to form a structured knowledge feature set; Extract the equipment distinguishing attributes within the map, set multi-field joint judgment conditions, and distinguish the pumping unit type by multi-attribute combination matching to obtain fixed rules for machine type identification; Based on the three-layer causal transmission semantic edge of reservoir-wellbore-equipment map, forward fault evolution judgment rules and reverse root cause tracing judgment rules are set respectively. Search paths, judgment thresholds and logical jump conditions are defined to obtain fixed rules for fault tracing layer by layer. Based on the relationship between the root cause entities of the fault map and the maintenance plan entities, the matching logic is divided into three categories according to the type of treatment: on-site adjustment, preventive maintenance, and downhole overhaul. Multi-dimensional matching judgment conditions are set to distinguish the appropriate treatment methods corresponding to different fault causes and obtain fixed rules for maintenance matching.

5. The method for tracing the causes of pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 4, characterized in that, The steps for building a logical deduction framework are as follows: Retrieve the completed fixed rules for model identification, fixed rules for fault tracing, and fixed rules for maintenance matching, and bind them to the entity and causal relationship index of the corresponding model in the hierarchical tracing knowledge graph; Set the graph retrieval trigger conditions, rule matching execution priority, and fixed execution flow, and define the graph cross-branch retrieval fallback logic when a single rule fails to match; Anchoring the retrieval paths of the three-layer entities of reservoir, wellbore, and pumping unit equipment within the hierarchical traceability knowledge graph, the judgment statement of each fixed rule is transformed into a retrieval query statement that can be executed by the graph database; A mechanism for merging and deduplicating redundant path results is pre-set during the simulation process. For scenarios where multiple tracing paths point to the same root cause of the fault, duplicate links are simplified and integrated according to the weight of the fault impact. The calculation logic of multi-index weighted ranking of pre-set maintenance plans is used to solidify the weight judgment criteria into the fixed rules of maintenance matching, determine the judgment basis for the ranking of plan superiority and inferiority, and complete the construction of the entire logical deduction and operation framework.

6. The method for tracing the causes of pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 1, characterized in that, The steps for constructing a fault tracing link are as follows: Based on the model identification rules, the hierarchical knowledge graph partition corresponding to the target pumping unit is located, and the set of three-layer causal transmission association edges specific to that model is retrieved; Extract various operating parameters from real-time monitoring data, filter out abnormal operating condition features that deviate from normal values, and locate the corresponding surface fault manifestation entities within the map. Initiate a fixed rule for tracing faults layer by layer, using the surface fault manifestation entity as the search endpoint, and then search in reverse for the direct cause entity, indirect cause entity, and the root cause entity at the lowest level. After each level of retrieval is completed, record the relationship and influence logic between the current entity and the previous level entity, and retain each branch path obtained from multiple parallel retrievals; Eliminate duplicate and redundant related nodes and cyclic search paths, and connect the causal relationships between entities according to the order in which the root cause is transmitted layer by layer to the surface fault. The hierarchical affiliation and fault impact weight of the entire serial path are labeled, and all nodes and related information are structurally integrated to finally generate a complete and displayable fault tracing link.

7. The method for tracing the causes of oil pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 6, characterized in that, The steps for finding the optimal repair solution are as follows: Using the pumping unit model and all underlying root cause entities of all faults as dual-limited search conditions, and calling fixed maintenance matching rules, all maintenance solutions are traversed and searched in the hierarchical traceability knowledge graph. Extract the solution attributes corresponding to each search result, and calculate the comprehensive score of each solution according to the pre-set weight coefficients of various indicators in the maintenance matching rules; All alternative repair solutions are sorted in descending order of their comprehensive scores, and the solution ranked first is selected as the optimal repair solution for this fault scenario.

8. The method for tracing the causes of oil pumping unit failures and recommending repair solutions based on knowledge graphs according to claim 1, characterized in that, The steps for building a continuously updated and iterative graph and rule base are as follows: Regularly collect new real-time business data generated by oilfield pumping units, bind the corresponding pumping unit model identifier according to data classification specifications, and complete the format standardization and basic verification of the new data. The newly added data that has been verified is imported into the hierarchical traceability knowledge graph, new entities not included in the data are identified, the creation of new entities and the assignment of attributes are completed, and the causal relationships between the new entities and between the new entities and the original graph entities are supplemented, thus completing the incremental update of the knowledge graph content. Retrieve the newly added fault diagnosis cases and maintenance implementation results, compare them with the original three fixed rules of model identification, fault tracing, and maintenance matching, and check for any abnormal rule entries. Based on the actual business logic of the newly added field cases, the original reasoning rules were improved. New exclusive reasoning rules were manually written for unprecedented fault scenarios and handling methods, and the new rules were assigned to the rule groups of the corresponding models. The newly added samples were used to test and verify the modified and supplemented rule base, eliminating logical conflicts and overlapping judgment conditions between rules, and confirming that the diagnostic simulation results were consistent with actual on-site operation and maintenance experience. The updated hierarchical tracing knowledge graph database and the revised full-scale reasoning rule base are solidified and saved to form a graph and rule base that can be continuously iterated and updated.