Gas pipeline fault diagnosis method and system based on knowledge reasoning

CN122509318APending Publication Date: 2026-08-04LIAONING JINYUAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIAONING JINYUAN TECHNOLOGY CO LTD
Filing Date
2026-04-08
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

传统的人工巡检和被动应急模式已难以满足现代管网高效管控与预防性维护的要求,尤其在隐蔽工程和复杂环境下故障定位困难、响应滞后

Benefits of technology

融合多源感知、知识图谱与混合推理技术,大幅提升了燃气管道故障诊断的精准性、实时性与智能化水平。通过多类型传感器协同部署与动态采集,结合数据校验、控制图异常剔除、插值补全及加权融合预处理,保障了故障征兆数据的全面性与可靠性;依托知识图谱整合多源知识并实现增量更新,有效消除知识冗余与歧义,为诊断提供结构化支撑。混合符号推理与神经推理的引擎设计,既依托规则库实现逻辑化故障判定,又能通过模型学习识别复杂非线性故障特征,结合阈值触发机制提升推理效率;辅以案例相似度匹配验证与二次推理,搭配分布式光纤监测与管道拓扑定位,实现故障类型精准判定与位置精确定位。同时通过现场验证闭环修正推理规则、更新知识图谱,持续优化引擎性能,可适配管道工况变化与新型故障场景,解决了传统诊断数据零散、推理单一、定位偏差、迭代滞后等问题,显著降低漏诊误诊率,为燃气管道安全稳定运行提供高效可靠的智能诊断保障。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122509318A_ABST
    Figure CN122509318A_ABST
Patent Text Reader

Abstract

The application discloses a gas pipeline fault diagnosis method and system based on knowledge reasoning, relates to the field of knowledge graphs, and comprises the following steps: obtaining high-quality symptom data through dynamic monitoring and data preprocessing, and constructing and continuously updating a fault diagnosis knowledge graph; extracting a standardized fault feature vector based on the graph, performing preliminary diagnosis and confidence evaluation by using a hybrid knowledge reasoning engine, combining case matching and secondary reasoning verification results and accurately positioning; continuously correcting rules and the graph through on-site verification, realizing closed-loop optimization and performance improvement, and forming a continuously self-improving pipeline fault intelligent diagnosis system.The application has the advantages that: through accurate collection and preprocessing of multi-source data, knowledge graph support and a hybrid reasoning engine, accurate fault determination and positioning are realized, and the performance can be continuously improved through closed-loop optimization, thereby effectively guaranteeing the safe operation of the pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graphs, and in particular to a method and system for diagnosing gas pipeline faults based on knowledge reasoning. Background Technology

[0002] As gas pipeline networks continue to expand and age, the risk of leaks, blockages, and ruptures increases significantly due to factors such as corrosion, third-party damage, geological subsidence, and material aging. Traditional manual inspections and reactive emergency response methods are no longer sufficient to meet the requirements of efficient management and preventative maintenance of modern pipeline networks, especially in concealed works and complex environments where fault location is difficult and response is delayed.

[0003] Current gas pipeline fault diagnosis methods on the market generally lack sufficient intelligence, accuracy, and adaptability. Most methods rely on single-type sensors for data collection at fixed frequencies, lacking effective data verification and preprocessing mechanisms. This makes them susceptible to abnormal or missing data, resulting in incomplete and unreliable fault symptom data. Furthermore, the absence of structured knowledge graphs leads to fragmented knowledge, hindering the integration of multi-source maintenance data and fault cases, resulting in knowledge redundancy and ambiguity. The lack of incremental update mechanisms also makes it difficult to adapt to dynamic changes in pipeline operating conditions. Reasoning methods are often simplistic, either relying solely on symbolic reasoning, which is inadequate for complex nonlinear fault characteristics, or solely on neural reasoning, lacking logical rule support, resulting in low reasoning reliability and a lack of secondary reasoning verification mechanisms, leading to high rates of missed and false diagnoses. Simultaneously, most methods fail to deeply integrate fault diagnosis with precise location, resulting in insufficient location accuracy and a lack of on-site verification and closed-loop optimization mechanisms. This prevents timely correction of reasoning rules and updates to fault cases, making it difficult to address new fault scenarios. Overall, the diagnostic efficiency and reliability fail to meet the high requirements for safe and stable operation of gas pipelines. Summary of the Invention

[0004] To improve existing methods and systems, this paper provides a gas pipeline fault diagnosis method and system based on knowledge reasoning. This method achieves accurate fault identification and location through precise acquisition and preprocessing of multi-source data, knowledge graph support, and a hybrid reasoning engine. Through closed-loop optimization, it continuously improves performance and effectively ensures the safe operation of pipelines.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Knowledge-based reasoning-based gas pipeline fault diagnosis methods include: Deploy multiple types of monitoring equipment at pipeline nodes and high-risk areas for failures, dynamically adjust the data collection frequency, and eliminate abnormal data through a data verification mechanism to obtain a comprehensive and real-time dataset of fault symptoms. The fault symptom dataset is preprocessed by using control chart theory to identify and remove outliers, supplementing missing data through interpolation, eliminating dimensional differences through standardization, and obtaining structured preprocessed data through weighted fusion. Based on structured preprocessed data, entities, relationships and attributes are extracted. After knowledge fusion to eliminate redundancy and ambiguity, a knowledge graph for gas pipeline fault diagnosis is constructed. The graph database is used for storage and an incremental update mechanism is established. Based on the knowledge graph of gas pipeline fault diagnosis, the characteristic parameters corresponding to the fault are determined, key features that have a significant impact on diagnosis are selected and quantified, and a standardized fault feature vector is formed after verifying the feature discrimination. A hybrid knowledge reasoning engine is constructed, combining symbolic reasoning and neural reasoning. A rule base and reasoning model are built based on the knowledge graph of gas pipeline fault diagnosis. Reasoning trigger conditions are set, and reasoning is triggered when the threshold is met, outputting preliminary fault diagnosis results and confidence levels. By combining fault cases stored in the graph database, the preliminary diagnosis results are verified through similarity matching. When the similarity is lower than a preset threshold, secondary inference is triggered. The fault location is located and marked by combining distributed optical fiber monitoring with pipeline topology knowledge. The accuracy of the diagnosis is verified through on-site inspections and manual testing. Deviations are analyzed and inference rules are corrected. New cases and corrected parameters are incorporated into the knowledge graph. The performance of the inference engine is regularly evaluated and parameters are adjusted.

[0006] Preferably, the deployment of multiple types of monitoring equipment at pipeline nodes and high-fault-occurrence areas, dynamic adjustment of the data acquisition frequency, and elimination of abnormal data through a data verification mechanism to obtain a comprehensive and real-time fault symptom dataset specifically includes: Based on the laying path of gas pipelines, the distribution of key nodes and areas with high failure rates, multiple types of monitoring equipment are deployed, including distributed fiber optic vibration sensors, pressure sensors, flow sensors, temperature sensors and leakage concentration sensors. The MQTT protocol is used for real-time transmission of monitoring data, and the integrity of the collected data is checked to remove missing or mistransmitted data.

[0007] Preferably, the preprocessing of the fault symptom dataset, including identifying and removing outliers using control chart theory, supplementing missing data using interpolation, eliminating dimensional differences through standardization, and obtaining structured preprocessed data through weighted fusion, specifically includes: By constructing control charts, the upper control limits, lower control limits, and center lines of each monitoring parameter are determined. Abnormal data that exceeds the control range are identified and eliminated based on the dynamic distribution of data points. For missing data, interpolation is used to fill in the missing values. Based on the trend of the surrounding valid data, the missing values ​​are filled in using linear or non-linear interpolation. For monitoring parameters with different dimensions, a normalization technique is used to map each parameter to the same numerical range. The weighted average method is used to assign weights to the multi-source monitoring data according to the accuracy of each sensor, and the comprehensive characteristics of pipeline operation status are analyzed to output structured preprocessed data.

[0008] Preferably, the step of extracting entities, relationships, and attributes from structured preprocessed data, eliminating redundancy and ambiguity through knowledge fusion, constructing a gas pipeline fault diagnosis knowledge graph, and storing it in a graph database with an incremental update mechanism specifically includes: Based on structured preprocessed data, fault diagnosis-related entities, relationships, and attributes are extracted from structured, semi-structured, and unstructured data; The extracted knowledge is fused, entity alignment eliminates redundancy and ambiguity in heterogeneous knowledge, relation merging unifies relations with the same semantics, and attribute completion improves the completeness of knowledge. A graph database is used to store the fused knowledge, and a knowledge graph for gas pipeline fault diagnosis is constructed, which includes an entity layer, a relation layer, and an attribute layer. Establish a knowledge update mechanism to regularly incorporate new fault cases, operation and maintenance data and industry standards, and adopt incremental update technology to avoid knowledge redundancy.

[0009] Preferably, the step of determining the feature parameters corresponding to the fault based on the gas pipeline fault diagnosis knowledge graph, screening out key features that have a significant impact on diagnosis and quantifying them, and forming a standardized fault feature vector after verifying the feature distinguishability specifically includes: Based on the constructed knowledge graph of gas pipeline fault diagnosis, the correlation between faults and monitoring parameters is extracted, and the characteristic parameters and characteristic ranges corresponding to different fault types are determined. The random forest algorithm is used for feature selection. Training samples are obtained by random sampling with replacement, different types of feature parameters are selected, and the importance of each feature is calculated using the Gini coefficient to select key features. The key features after screening are quantified and transformed into numerical or semantic descriptions. By comparing the differences in characteristics between normal operating conditions and fault operating conditions, the distinguishability of the features is verified, and a standardized fault feature vector is formed.

[0010] Preferably, the construction of the hybrid knowledge reasoning engine, combining symbolic reasoning and neural reasoning, constructs a rule base and reasoning model based on the gas pipeline fault diagnosis knowledge graph, sets reasoning trigger conditions, and triggers reasoning when a threshold is met, outputting preliminary fault diagnosis results and confidence levels, specifically includes: A hybrid reasoning mechanism combining symbolic reasoning and neural reasoning is used to construct a knowledge reasoning engine for gas pipeline fault diagnosis; The symbolic reasoning is based on the fault rules in the gas pipeline fault diagnosis knowledge graph to build a rule base. The rule base contains the judgment conditions, feature matching logic and reasoning priority of various faults. The forward reasoning method starts from the preprocessed fault features, matches the fault rules in the knowledge graph, and initially judges the fault type. The neural reasoning is based on historical fault feature data and diagnostic results to construct a reasoning model. Through learning from historical data, it can identify and reason about complex nonlinear fault features. When the extracted fault feature vector meets the trigger threshold in the rule base or the similarity with historical fault cases reaches the preset standard, the knowledge reasoning engine is triggered. Combining the results of symbolic reasoning and neural reasoning, the preliminary fault diagnosis results and diagnosis confidence are output.

[0011] Preferably, the preliminary diagnostic results of the fault cases stored in the graph database are verified by similarity matching. When the similarity is lower than a preset threshold, secondary inference is triggered. A combination of distributed optical fiber monitoring and pipeline topology knowledge is used to locate and mark the fault location. Specifically, this includes: Based on the output of the preliminary fault diagnosis results, combined with the fault case library in the knowledge graph, the case matching method is used to further verify the diagnosis results and calculate the feature similarity between the preliminary diagnosis results and historical fault cases. When the similarity is higher than the preset threshold, the fault type is confirmed. When the similarity is lower than the preset threshold, a second reasoning is triggered to collect additional pipeline operation data for the area, re-extract fault features, and optimize the reasoning process until the fault type is confirmed. Based on the spatial distribution of vibration signals and leakage concentration data collected by sensors, and combined with the pipeline topology in the knowledge graph, the time-location mapping of vibration events is performed through phase difference operation to obtain the specific location of the fault, while marking the pipeline component information and surrounding environment information at the fault location.

[0012] Preferably, the steps of verifying diagnostic accuracy through on-site inspections and manual testing, analyzing deviations and correcting inference rules, incorporating new cases and corrected parameters into the knowledge graph, and periodically evaluating the performance of the inference engine and adjusting parameters specifically include: A combination of on-site inspections and manual testing was used to collect on-site fault data, which was then compared with the diagnostic results to verify the accuracy of the diagnostic results. If there is a discrepancy between the diagnostic results and the on-site test results, analyze the reasons for the discrepancy and revise the reasoning rules of the knowledge reasoning engine, the feature selection parameters, and the similarity calculation standards of the case library. New failure cases, on-site detection data and revised reasoning rules are incorporated into the knowledge graph, and the knowledge graph and reasoning engine are updated through incremental update technology. Regularly evaluate the performance of the knowledge reasoning engine and adjust the reasoning parameters based on changes in pipeline operating conditions and the emergence of new fault types.

[0013] Furthermore, a gas pipeline fault diagnosis system based on knowledge reasoning is proposed, including: Multi-source data sensing module: Deploys multiple types of sensors at key nodes of the pipeline, dynamically adjusts the acquisition frequency, and forms a raw symptom dataset; Data preprocessing and fusion module: Uses control charts to remove outliers, interpolates to fill in missing data, performs normalization and weighted fusion, and outputs structured preprocessed data; Knowledge graph construction module: Extracts entities, relationships and attributes from preprocessed data, constructs a fault diagnosis knowledge graph after knowledge fusion, and stores it using a graph database and supports incremental updates; Feature extraction and quantization module: Based on knowledge graph, fault feature parameters are determined, key features are selected using random forest, and the discriminative power is verified after quantization to generate standardized fault feature vectors; Hybrid knowledge reasoning module: integrates symbolic reasoning and neural reasoning, sets trigger thresholds, and outputs preliminary diagnostic results and confidence levels; Result verification and location module: Verifies diagnostic results through case similarity matching. When the similarity is low, it triggers secondary reasoning and locates the fault location by combining fiber optic monitoring and topology knowledge. Learning optimization and evaluation module: Verify diagnostic accuracy through on-site inspections, analyze deviations and correct inference rules and graphs, and regularly evaluate the performance of the inference engine and adjust parameters; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.

[0014] Compared with the prior art, the advantages of the present invention are: By integrating multi-source sensing, knowledge graphs, and hybrid reasoning technologies, the accuracy, real-time performance, and intelligence of gas pipeline fault diagnosis are significantly improved. Through the collaborative deployment and dynamic acquisition of multiple types of sensors, combined with data verification, control chart anomaly removal, interpolation completion, and weighted fusion preprocessing, the comprehensiveness and reliability of fault symptom data are ensured. Relying on the knowledge graph to integrate multi-source knowledge and achieve incremental updates, knowledge redundancy and ambiguity are effectively eliminated, providing structured support for diagnosis. The hybrid symbolic reasoning and neural reasoning engine design not only relies on a rule base for logical fault determination but also identifies complex nonlinear fault characteristics through model learning, and improves reasoning efficiency with a threshold triggering mechanism. Supplemented by case similarity matching verification and secondary reasoning, coupled with distributed fiber optic monitoring and pipeline topology positioning, accurate fault type determination and precise location are achieved. Simultaneously, through closed-loop correction of reasoning rules and updating of the knowledge graph through on-site verification, engine performance is continuously optimized, adapting to changes in pipeline operating conditions and new fault scenarios. This solves the problems of fragmented diagnostic data, singular reasoning, positioning bias, and iteration lag in traditional diagnostics, significantly reducing the rate of missed and misdiagnosed diagnoses, and providing efficient and reliable intelligent diagnostic assurance for the safe and stable operation of gas pipelines. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the method proposed in this invention; Figure 2 This is a schematic diagram of gas pipeline operation data acquisition proposed in this invention; Figure 3 This is a schematic diagram of the data preprocessing proposed in this invention; Figure 4 This is a schematic diagram of the knowledge graph for constructing gas pipeline fault diagnosis proposed in this invention; Figure 5 This is a schematic diagram of the fault feature extraction proposed in this invention; Figure 6 This is a schematic diagram illustrating the construction of a knowledge reasoning engine and the triggering of reasoning proposed in this invention; Figure 7 This is a schematic diagram illustrating the fault type identification and fault location proposed in this invention; Figure 8 This is a schematic diagram illustrating the diagnostic result verification and knowledge update proposed in this invention. Detailed Implementation

[0016] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0017] A gas pipeline fault diagnosis system based on knowledge reasoning includes: Multi-source data sensing module: Deploys multiple types of sensors at key nodes of the pipeline, dynamically adjusts the acquisition frequency, and forms a raw symptom dataset; Data preprocessing and fusion module: Uses control charts to remove outliers, interpolates to fill in missing data, performs normalization and weighted fusion, and outputs structured preprocessed data; Knowledge graph construction module: Extracts entities, relationships and attributes from preprocessed data, constructs a fault diagnosis knowledge graph after knowledge fusion, and stores it using a graph database and supports incremental updates; Feature extraction and quantization module: Based on knowledge graph, fault feature parameters are determined, key features are selected using random forest, and the discriminative power is verified after quantization to generate standardized fault feature vectors; Hybrid knowledge reasoning module: integrates symbolic reasoning and neural reasoning, sets trigger thresholds, and outputs preliminary diagnostic results and confidence levels; Result verification and location module: Verifies diagnostic results through case similarity matching. When the similarity is low, it triggers secondary reasoning and locates the fault location by combining fiber optic monitoring and topology knowledge. Learning optimization and evaluation module: Verify diagnostic accuracy through on-site inspections, analyze deviations and correct inference rules and graphs, and regularly evaluate the performance of the inference engine and adjust parameters; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.

[0018] See Figure 1 As shown, the gas pipeline fault diagnosis method based on knowledge reasoning includes: Step 1: Deploy multiple types of monitoring equipment at pipeline nodes and high-risk areas, dynamically adjust the data collection frequency, and use a data verification mechanism to remove abnormal data to obtain a comprehensive and real-time dataset of fault symptoms. Step 2: Preprocess the fault symptom dataset, use control chart theory to identify and remove outliers, use interpolation to supplement missing data, use standardization to eliminate dimensional differences, and use weighted fusion to obtain structured preprocessed data; Step 3: Based on the structured preprocessed data, extract entities, relationships and attributes, and after knowledge fusion to eliminate redundancy and ambiguity, construct a knowledge graph for gas pipeline fault diagnosis, store it in a graph database and establish an incremental update mechanism; Step 4: Based on the knowledge graph of gas pipeline fault diagnosis, determine the characteristic parameters corresponding to the fault, screen out the key features that have a significant impact on the diagnosis and quantify them, and form a standardized fault feature vector after verifying the feature discrimination. Step 5: Construct a hybrid knowledge reasoning engine, combining symbolic reasoning and neural reasoning. Based on the gas pipeline fault diagnosis knowledge graph, build a rule base and reasoning model, set reasoning trigger conditions, and trigger reasoning when the threshold is met, outputting preliminary fault diagnosis results and confidence levels. Step 6: Combine the fault cases stored in the graph database to verify the preliminary diagnosis results through similarity matching. When the similarity is lower than the preset threshold, trigger secondary reasoning. Use a combination of distributed optical fiber monitoring and pipeline topology knowledge to locate and mark the fault location. Step 7: Verify the accuracy of the diagnosis through on-site inspections and manual testing, analyze deviations and correct the reasoning rules, incorporate new cases and corrected parameters into the knowledge graph, and regularly evaluate the performance of the reasoning engine and adjust the parameters.

[0019] See Figure 2 As shown, multiple types of monitoring equipment are deployed at pipeline nodes and high-fault areas, the data collection frequency is dynamically adjusted, and abnormal data is eliminated through a data verification mechanism to obtain a comprehensive and real-time dataset of fault symptoms. Specifically, this includes: Based on the laying path of gas pipelines, the distribution of key nodes and areas with high failure rates, multiple types of monitoring equipment are deployed, including distributed fiber optic vibration sensors, pressure sensors, flow sensors, temperature sensors and leakage concentration sensors. The MQTT protocol is used for real-time transmission of monitoring data, and the integrity of the collected data is checked to remove missing or mistransmitted data.

[0020] See Figure 3 As shown, the fault symptom dataset undergoes preprocessing. Outliers are identified and removed using control chart theory, missing data is supplemented using interpolation, dimensional differences are eliminated through standardization, and structured preprocessed data is obtained through weighted fusion. Specifically, the preprocessed data includes: By constructing control charts, the upper control limits, lower control limits, and center lines of each monitoring parameter are determined. Abnormal data that exceeds the control range are identified and eliminated based on the dynamic distribution of data points. For missing data, interpolation is used to fill in the missing values. Based on the trend of the surrounding valid data, the missing values ​​are filled in using linear or non-linear interpolation. For monitoring parameters with different dimensions, a normalization technique is used to map each parameter to the same numerical range. The weighted average method is used to assign weights to the multi-source monitoring data according to the accuracy of each sensor, and the comprehensive characteristics of pipeline operation status are analyzed to output structured preprocessed data.

[0021] Specifically, historical monitoring data under normal pipeline operation conditions are selected as samples, and the mean and standard deviation of each monitoring parameter are calculated. Based on this, a Shewhart control chart is constructed, and the upper control limit, lower control limit and center line of each parameter are defined. The upper control limit is set as the mean plus 3 times the standard deviation, the lower control limit is set as the mean minus 3 times the standard deviation, and the center line is the mean of the parameter. The preprocessed data collected in real time is mapped point by point to the control chart. Outliers are identified by judging the distribution of data points. If three consecutive data points exceed the control limit, or seven consecutive data points are offset on the same side of the center line, or the data points show an obvious increasing or decreasing trend and exceed the reasonable fluctuation range, they are judged as abnormal data and are directly removed. To address missing data encountered during data collection, a scenario-specific interpolation method is employed for supplementation. Specifically, the interpolation method is selected based on the type of missing data and the distribution characteristics of surrounding data: When the missing data is a single point and the surrounding data fluctuates smoothly, linear interpolation is used, selecting three valid data points before and after the missing point and calculating the missing value by fitting a linear function; when the missing data is multiple consecutive points or the surrounding data fluctuates significantly, cubic spline interpolation is used, constructing a piecewise cubic polynomial curve and setting an interpolation error threshold. If the interpolation error exceeds a preset range, more valid surrounding data is selected for re-interpolation optimization to ensure the accuracy of the supplemented data.

[0022] See Figure 4 As shown, based on structured preprocessed data, entities, relationships, and attributes are extracted. After knowledge fusion to eliminate redundancy and ambiguity, a knowledge graph for gas pipeline fault diagnosis is constructed. This graph database is used for storage, and an incremental update mechanism is established, specifically including: Based on structured preprocessed data, fault diagnosis-related entities, relationships, and attributes are extracted from structured, semi-structured, and unstructured data; The extracted knowledge is fused, entity alignment eliminates redundancy and ambiguity in heterogeneous knowledge, relation merging unifies relations with the same semantics, and attribute completion improves the completeness of knowledge. A graph database is used to store the fused knowledge, and a knowledge graph for gas pipeline fault diagnosis is constructed, which includes an entity layer, a relation layer, and an attribute layer. Establish a knowledge update mechanism to regularly incorporate new fault cases, operation and maintenance data and industry standards, and adopt incremental update technology to avoid knowledge redundancy.

[0023] Specifically, knowledge extraction employs a hybrid technique combining natural language processing and machine learning. Entity extraction utilizes a BERT-based named entity recognition model to segment, tag, and identify entity boundaries from collected multi-source data, accurately extracting core entities such as pipeline components, fault types, and monitoring parameters. Model training optimizes entity recognition accuracy and eliminates ambiguous entities. Relationship extraction combines syntactic dependency analysis with deep learning, analyzing sentence grammatical structures to uncover relationships between entities. This is supplemented by manual rule additions to clarify correspondences between components and faults, and between faults and monitoring parameters. Attribute extraction combines regular expression matching with semantic understanding to extract attribute information from the data, such as specifications of pipeline components and characteristic parameters of faults, forming structured knowledge triples. Knowledge fusion employs a layered fusion strategy. Entity alignment combines string similarity calculation with semantic similarity matching to identify entities with different names but consistent semantics from different data sources, eliminating redundancy and ambiguity, such as unifying "pipe interface" and "pipe connector" as the same entity. Relationship merging uses ontology mapping technology to uniformly name and classify relations with the same semantics, ensuring consistency in relation representation. Attribute completion uses association rule mining algorithms to mine the association patterns between entity attributes based on existing knowledge triples, supplementing missing attribute information.

[0024] See Figure 5 As shown, based on the knowledge graph of gas pipeline fault diagnosis, the characteristic parameters corresponding to the fault are determined, key features that have a significant impact on diagnosis are screened and quantified, and after verifying the feature discrimination, a standardized fault feature vector is formed, which specifically includes: Based on the constructed knowledge graph of gas pipeline fault diagnosis, the correlation between faults and monitoring parameters is extracted, and the characteristic parameters and characteristic ranges corresponding to different fault types are determined. The random forest algorithm is used for feature selection. Training samples are obtained by random sampling with replacement, different types of feature parameters are selected, and the importance of each feature is calculated using the Gini coefficient to select key features. The key features after screening are quantified and transformed into numerical or semantic descriptions. By comparing the differences in characteristics between normal operating conditions and fault operating conditions, the distinguishability of the features is verified, and a standardized fault feature vector is formed.

[0025] Specifically, the feature selection uses the random forest algorithm, selecting preprocessed standardized data as training samples, classifying and labeling them according to fault type and normal operating condition, and drawing multiple sub-samples from the samples through random sampling with replacement. Each sub-sample corresponds to a decision tree. Each decision tree selects features by splitting nodes, and the importance of each feature is calculated using the Gini coefficient. The smaller the Gini coefficient, the greater the contribution of the feature to fault classification. At the same time, information gain is combined to assist in the judgment, further optimizing the feature selection accuracy. The formula for the Gini coefficient is: in, This refers to the Gini coefficient of the nodes; the smaller the value, the higher the feature importance. The total number of fault categories. Let be the probability of the proportion of the k-th type of fault sample in the current node; A threshold for feature importance is set to remove redundant features below the threshold, retaining key features that have a significant impact on fault diagnosis, ensuring the relevance of feature selection. Key feature quantification employs multi-dimensional feature transformation technology. For vibration signals, peak value, mean, and variance are extracted through time-domain analysis, and the time-domain vibration signal is converted into a frequency-domain signal through frequency-domain analysis to extract the amplitude of the characteristic frequency range and quantify the degree of vibration anomaly. For pressure fluctuations, the two core parameters of pressure change amplitude and duration are quantified to clarify the correlation between pressure fluctuations and faults. For flow rate changes, the change rate and change amplitude are quantified, transforming these feature parameters into standardized numerical or semantic descriptions. Feature discrimination verification adopts a comparative analysis method, selecting feature data of normal operating conditions and various fault conditions, calculating the similarity of feature data under different operating conditions, and quantifying feature differences through the cosine similarity algorithm. If the feature similarity between normal operating conditions and a certain type of fault condition is lower than the preset threshold, and the feature similarity between different fault types is also lower than the threshold, it indicates that the feature discrimination meets the standard. If the discrimination is insufficient, the feature selection parameters are readjusted, associated features are supplemented, and the feature quantification method is optimized until the discrimination requirements are met.

[0026] See Figure 6 As shown, a hybrid knowledge reasoning engine is constructed, combining symbolic reasoning and neural reasoning. A rule base and reasoning model are built based on a gas pipeline fault diagnosis knowledge graph. Reasoning trigger conditions are set; when a threshold is met, reasoning is triggered, and preliminary fault diagnosis results and confidence levels are output. Specifically, these include: A hybrid reasoning mechanism combining symbolic reasoning and neural reasoning is used to construct a knowledge reasoning engine for gas pipeline fault diagnosis; The symbolic reasoning is based on the fault rules in the gas pipeline fault diagnosis knowledge graph to build a rule base. The rule base contains the judgment conditions, feature matching logic and reasoning priority of various faults. The forward reasoning method starts from the preprocessed fault features, matches the fault rules in the knowledge graph, and initially judges the fault type. The neural reasoning is based on historical fault feature data and diagnostic results to construct a reasoning model. Through learning from historical data, it can identify and reason about complex nonlinear fault features. When the extracted fault feature vector meets the trigger threshold in the rule base or the similarity with historical fault cases reaches the preset standard, the knowledge reasoning engine is triggered. Combining the results of symbolic reasoning and neural reasoning, the preliminary fault diagnosis results and diagnosis confidence are output.

[0027] Specifically, the neural reasoning part is built based on a deep learning model. Extracted fault feature data and historical fault case data from the knowledge graph are selected as training samples and labeled according to fault type. A hybrid reasoning model based on CNN-LSTM is constructed. The input of the model is a standardized fault feature vector, and the output is the matching probability of each type of fault. During the model training process, cross-validation is used to divide the samples into training set, validation set and test set. By adjusting the number of network layers and activation function of the model, the inference accuracy of the model is optimized to make up for the shortcomings of symbolic reasoning in handling complex nonlinear fault features. The rule base is built using a combination of manual sorting and machine optimization. Gas pipeline fault diagnosis experts sort out mature fault judgment rules and feature matching logic in the industry, clarify the core judgment conditions, feature priorities and reasoning logic of various faults; then machine learning algorithms are used to mine historical fault data, extract implicit reasoning rules and supplement them to the rule base.

[0028] See Figure 7 As shown, the preliminary diagnosis results are verified by similarity matching based on fault cases stored in the graph database. When the similarity is lower than a preset threshold, secondary inference is triggered. A combination of distributed fiber optic monitoring and pipeline topology knowledge is used to locate and mark the fault location. Specifically, this includes: Based on the output of the preliminary fault diagnosis results, combined with the fault case library in the knowledge graph, the case matching method is used to further verify the diagnosis results and calculate the feature similarity between the preliminary diagnosis results and historical fault cases. When the similarity is higher than the preset threshold, the fault type is confirmed. When the similarity is lower than the preset threshold, a second reasoning is triggered to collect additional pipeline operation data for the area, re-extract fault features, and optimize the reasoning process until the fault type is confirmed. Based on the spatial distribution of vibration signals and leakage concentration data collected by sensors, and combined with the pipeline topology in the knowledge graph, the time-location mapping of vibration events is performed through phase difference operation to obtain the specific location of the fault, while marking the pipeline component information and surrounding environment information at the fault location.

[0029] Specifically, based on the output preliminary fault diagnosis results, combined with the fault case library in the knowledge graph, a combination of case matching and secondary reasoning techniques is used. The case query interface of the knowledge graph is called to extract all historical fault cases corresponding to the preliminary diagnosis results. The cosine similarity algorithm and the edit distance method are combined to calculate the similarity between the fault features of the preliminary diagnosis results and the features of historical cases. The cosine similarity measures the degree of matching of feature vectors, and the edit distance method corrects subtle differences in feature descriptions. A similarity threshold is set. If the similarity between a historical case and the preliminary diagnosis result is higher than the threshold, and the fault occurrence scenario and pipeline conditions are consistent with the current one, then the fault type is confirmed; if the similarity is lower than the threshold, secondary reasoning is triggered immediately. During the second inference process, supplementary historical operation and maintenance data and real-time environmental data of the pipeline in the area are collected, fault features are re-extracted, and fault mechanism knowledge in the knowledge graph is combined to adjust the inference rules. The focus is on matching the correlation between fault features and pipeline component attributes, eliminating ambiguous fault types, until a unique fault type is identified.

[0030] See Figure 8 As shown, the accuracy of diagnosis is verified through on-site inspections and manual testing. Deviations are analyzed and inference rules are corrected. New cases and corrected parameters are incorporated into the knowledge graph. The performance of the inference engine is regularly evaluated and parameters are adjusted, specifically including: A combination of on-site inspections and manual testing was used to collect on-site fault data, which was then compared with the diagnostic results to verify the accuracy of the diagnostic results. If there is a discrepancy between the diagnostic results and the on-site test results, analyze the reasons for the discrepancy and revise the reasoning rules of the knowledge reasoning engine, the feature selection parameters, and the similarity calculation standards of the case library. New failure cases, on-site detection data and revised reasoning rules are incorporated into the knowledge graph, and the knowledge graph and reasoning engine are updated through incremental update technology. Regularly evaluate the performance of the knowledge reasoning engine and adjust the reasoning parameters based on changes in pipeline operating conditions and the emergence of new fault types.

[0031] Specifically, by comparing the diagnostic results with the on-site detection data, the degree of deviation is quantified using a data comparison method to determine whether the deviation originates from feature extraction, knowledge reasoning, or the localization process. If the deviation originates from feature extraction, the feature selection parameters and quantification methods are readjusted to optimize feature discrimination. If the deviation originates from knowledge reasoning, the reasoning rules and model parameters are corrected, and the weight allocation between symbolic reasoning and neural reasoning is adjusted. If the deviation originates from fault localization, the phase difference operation parameters and multi-sensor fusion localization strategy are optimized to reduce localization errors. To address the causes of deviations, targeted corrective measures were developed to ensure that the corrected diagnostic results matched the actual faults on-site. New fault cases, on-site detection data, and corrected reasoning rules were incorporated into the knowledge update process. Incremental extraction techniques were used to extract entities, relationships, and attributes from the new data, avoiding a full update of the original knowledge graph and reducing redundancy. Entity alignment and relationship merging techniques were used to integrate the new knowledge with the original knowledge graph, supplementing missing attribute and relationship information. A manual review mechanism was established, where experts verified the accuracy of the new knowledge and corrected rules, incorporating them into the knowledge graph only after confirmation.

[0032] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0033] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0034] 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 principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A gas pipeline fault diagnosis method based on knowledge reasoning, characterized in that, include: Deploy multiple types of monitoring equipment at pipeline nodes and high-risk areas for failures, dynamically adjust the data collection frequency, and eliminate abnormal data through a data verification mechanism to obtain a comprehensive and real-time dataset of fault symptoms. The fault symptom dataset is preprocessed by using control chart theory to identify and remove outliers, supplementing missing data through interpolation, eliminating dimensional differences through standardization, and obtaining structured preprocessed data through weighted fusion. Based on structured preprocessed data, entities, relationships and attributes are extracted. After knowledge fusion to eliminate redundancy and ambiguity, a knowledge graph for gas pipeline fault diagnosis is constructed. The graph database is used for storage and an incremental update mechanism is established. Based on the knowledge graph of gas pipeline fault diagnosis, the characteristic parameters corresponding to the fault are determined, key features that have a significant impact on diagnosis are selected and quantified, and a standardized fault feature vector is formed after verifying the feature discrimination. A hybrid knowledge reasoning engine is constructed, combining symbolic reasoning and neural reasoning. A rule base and reasoning model are built based on the knowledge graph of gas pipeline fault diagnosis. Reasoning trigger conditions are set, and reasoning is triggered when the threshold is met, outputting preliminary fault diagnosis results and confidence levels. By combining fault cases stored in the graph database, the preliminary diagnosis results are verified through similarity matching. When the similarity is lower than a preset threshold, secondary inference is triggered. The fault location is located and marked by combining distributed optical fiber monitoring with pipeline topology knowledge. The accuracy of the diagnosis is verified through on-site inspections and manual testing. Deviations are analyzed and inference rules are corrected. New cases and corrected parameters are incorporated into the knowledge graph. The performance of the inference engine is regularly evaluated and parameters are adjusted.

2. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The deployment of multiple types of monitoring equipment at pipeline nodes and high-fault-incidence areas, dynamic adjustment of the data acquisition frequency, and the elimination of abnormal data through a data verification mechanism to obtain a comprehensive and real-time dataset of fault symptoms specifically includes: Based on the laying path of gas pipelines, the distribution of key nodes and areas with high failure rates, multiple types of monitoring equipment are deployed, including distributed fiber optic vibration sensors, pressure sensors, flow sensors, temperature sensors and leakage concentration sensors. The MQTT protocol is used for real-time transmission of monitoring data, and the integrity of the collected data is checked to remove missing or mistransmitted data.

3. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The preprocessing of the fault symptom dataset, including identifying and removing outliers using control chart theory, supplementing missing data using interpolation, eliminating dimensional differences through standardization, and obtaining structured preprocessed data through weighted fusion, specifically includes: By constructing control charts, the upper control limits, lower control limits, and center lines of each monitoring parameter are determined. Abnormal data that exceeds the control range are identified and eliminated based on the dynamic distribution of data points. For missing data, interpolation is used to fill in the missing values. Based on the trend of the surrounding valid data, the missing values ​​are filled in using linear or non-linear interpolation. For monitoring parameters with different dimensions, a normalization technique is used to map each parameter to the same numerical range. The weighted average method is used to assign weights to the multi-source monitoring data according to the accuracy of each sensor, and the comprehensive characteristics of pipeline operation status are analyzed to output structured preprocessed data.

4. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The process of extracting entities, relationships, and attributes from structured preprocessed data, eliminating redundancy and ambiguity through knowledge fusion, and constructing a gas pipeline fault diagnosis knowledge graph, which is stored in a graph database and has an incremental update mechanism, specifically includes: Based on structured preprocessed data, fault diagnosis-related entities, relationships, and attributes are extracted from structured, semi-structured, and unstructured data; The extracted knowledge is fused, entity alignment eliminates redundancy and ambiguity in heterogeneous knowledge, relation merging unifies relations with the same semantics, and attribute completion improves the completeness of knowledge. A graph database is used to store the fused knowledge, and a knowledge graph for gas pipeline fault diagnosis is constructed, which includes an entity layer, a relation layer, and an attribute layer. Establish a knowledge update mechanism to regularly incorporate new fault cases, operation and maintenance data and industry standards, and adopt incremental update technology to avoid knowledge redundancy.

5. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The process of determining the feature parameters corresponding to the fault based on the gas pipeline fault diagnosis knowledge graph, screening out key features that have a significant impact on diagnosis and quantifying them, and forming a standardized fault feature vector after verifying the feature distinguishability specifically includes: Based on the constructed knowledge graph of gas pipeline fault diagnosis, the correlation between faults and monitoring parameters is extracted, and the characteristic parameters and characteristic ranges corresponding to different fault types are determined. The random forest algorithm is used for feature selection. Training samples are obtained by random sampling with replacement, different types of feature parameters are selected, and the importance of each feature is calculated using the Gini coefficient to select key features. The key features after screening are quantified and transformed into numerical or semantic descriptions. By comparing the differences in characteristics between normal operating conditions and fault operating conditions, the distinguishability of the features is verified, and a standardized fault feature vector is formed.

6. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The construction of a hybrid knowledge reasoning engine, combining symbolic reasoning and neural reasoning, builds a rule base and reasoning model based on a gas pipeline fault diagnosis knowledge graph, sets reasoning trigger conditions, and triggers reasoning when a threshold is met, outputting preliminary fault diagnosis results and confidence levels. Specifically, this includes: A hybrid reasoning mechanism combining symbolic reasoning and neural reasoning is used to construct a knowledge reasoning engine for gas pipeline fault diagnosis; The symbolic reasoning is based on the fault rules in the gas pipeline fault diagnosis knowledge graph to build a rule base. The rule base contains the judgment conditions, feature matching logic and reasoning priority of various faults. The forward reasoning method starts from the preprocessed fault features, matches the fault rules in the knowledge graph, and initially judges the fault type. The neural reasoning is based on historical fault feature data and diagnostic results to construct a reasoning model. Through learning from historical data, it can identify and reason about complex nonlinear fault features. When the extracted fault feature vector meets the trigger threshold in the rule base or the similarity with historical fault cases reaches the preset standard, the knowledge reasoning engine is triggered. Combining the results of symbolic reasoning and neural reasoning, the preliminary fault diagnosis results and diagnosis confidence are output.

7. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The fault cases stored in the graph database are used to verify the preliminary diagnosis results through similarity matching. When the similarity is lower than a preset threshold, secondary inference is triggered. A combination of distributed optical fiber monitoring and pipeline topology knowledge is used to locate and mark the fault location. Specifically, this includes: Based on the output of the preliminary fault diagnosis results, combined with the fault case library in the knowledge graph, the case matching method is used to further verify the diagnosis results and calculate the feature similarity between the preliminary diagnosis results and historical fault cases. When the similarity is higher than the preset threshold, the fault type is confirmed. When the similarity is lower than the preset threshold, a second reasoning is triggered to collect additional pipeline operation data for the area, re-extract fault features, and optimize the reasoning process until the fault type is confirmed. Based on the spatial distribution of vibration signals and leakage concentration data collected by sensors, and combined with the pipeline topology in the knowledge graph, the time-location mapping of vibration events is performed through phase difference operation to obtain the specific location of the fault, while marking the pipeline component information and surrounding environment information at the fault location.

8. The gas pipeline fault diagnosis method based on knowledge reasoning according to claim 1, characterized in that, The process of verifying diagnostic accuracy through on-site inspections and manual testing, analyzing deviations and correcting inference rules, incorporating new cases and corrected parameters into the knowledge graph, and periodically evaluating and adjusting the performance of the inference engine specifically includes: A combination of on-site inspections and manual testing was used to collect on-site fault data, which was then compared with the diagnostic results to verify the accuracy of the diagnostic results. If there is a discrepancy between the diagnostic results and the on-site test results, analyze the reasons for the discrepancy and revise the reasoning rules of the knowledge reasoning engine, the feature selection parameters, and the similarity calculation standards of the case library. New failure cases, on-site detection data and revised reasoning rules are incorporated into the knowledge graph, and the knowledge graph and reasoning engine are updated through incremental update technology. Regularly evaluate the performance of the knowledge reasoning engine and adjust the reasoning parameters based on changes in pipeline operating conditions and the emergence of new fault types.

9. A gas pipeline fault diagnosis system based on knowledge reasoning, used to implement the gas pipeline fault diagnosis method based on knowledge reasoning as described in any one of claims 1-8, characterized in that, include: Multi-source data sensing module: Deploys multiple types of sensors at key nodes of the pipeline, dynamically adjusts the acquisition frequency, and forms a raw symptom dataset; Data preprocessing and fusion module: Uses control charts to remove outliers, interpolates to fill in missing data, performs normalization and weighted fusion, and outputs structured preprocessed data; Knowledge graph construction module: Extracts entities, relationships and attributes from preprocessed data, constructs a fault diagnosis knowledge graph after knowledge fusion, and stores it using a graph database and supports incremental updates; Feature extraction and quantization module: Based on knowledge graph, fault feature parameters are determined, key features are selected using random forest, and the discriminative power is verified after quantization to generate standardized fault feature vectors; Hybrid knowledge reasoning module: integrates symbolic reasoning and neural reasoning, sets trigger thresholds, and outputs preliminary diagnostic results and confidence levels; Result verification and location module: Verifies diagnostic results through case similarity matching. When the similarity is low, it triggers secondary reasoning and locates the fault location by combining fiber optic monitoring and topology knowledge. Learning optimization and evaluation module: Verify diagnostic accuracy through on-site inspections, analyze deviations and correct inference rules and graphs, and regularly evaluate the performance of the inference engine and adjust parameters; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.