A gas pipeline network maintenance method, system, and electronic equipment based on a large language model

By processing and fusing multi-source heterogeneous data from gas pipeline networks using large language models, a multimodal vector database is constructed, enabling comprehensive perception of the gas pipeline network status and intelligent reasoning of fault root causes. This solves the problems of data silos and automated operation and maintenance, improves diagnostic efficiency and process efficiency, and ensures the safe and stable supply of urban gas.

CN120780816BActive Publication Date: 2025-11-14CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511261613.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-11-14
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

The existing gas pipeline network management system suffers from data silos, relies on manual fault diagnosis, and has a low degree of automation in operation and maintenance processes, which fails to meet the needs of smart cities for refined management of gas pipeline networks.

Method used

A large language model is used to standardize, vectorize, and fuse multi-source heterogeneous data, construct a unified multimodal vector database, combine retrieval enhancement generation technology to perform intelligent reasoning of fault root causes, and automatically generate structured maintenance instructions to achieve full-process automation of data monitoring, analysis, work order generation and dispatch.

Benefits of technology

It enables comprehensive and accurate situational awareness of the gas pipeline network, significantly improves the efficiency and accuracy of fault diagnosis, reduces operating costs, ensures the efficiency and safety of the operation and maintenance process, and provides good interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780816B_ABST
    Figure CN120780816B_ABST
Patent Text Reader

Abstract

This invention discloses a gas pipeline network maintenance method, system, and electronic equipment based on a large language model, aiming to solve common problems in gas pipeline networks such as difficulties in data fusion, reliance on manual fault analysis, and low levels of automation in operation and maintenance. The method involves: first, acquiring and processing multi-source heterogeneous data from the gas pipeline network; then, vectorizing this data to construct a unified multimodal database; when data anomalies are detected, a large language model is generated using retrieval enhancement to retrieve relevant information from the database, perform intelligent reasoning about the root causes of faults, and generate an analysis report; finally, structured maintenance instructions are automatically generated based on the report and integrated with the operation and maintenance system to form a fully automated closed loop from monitoring to handling. The system and electronic equipment are used to execute the above method. The advantages of this invention are: breaking down data silos, achieving accurate situational awareness, significantly improving the efficiency and accuracy of fault diagnosis, and demonstrating significant effectiveness in reducing operating costs and safety risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of urban infrastructure safety and intelligent operation and maintenance technology, and in particular to a gas pipeline network maintenance method, system and electronic equipment based on a large language model. Background Technology

[0002] Urban gas pipeline networks are the "lifeline" for maintaining the normal operation of a city, and their safety and stability are of paramount importance. Traditional pipeline management systems typically rely on digitized maps and basic sensor data monitoring to build preliminary digital twin models; however, these systems have revealed significant technical bottlenecks when dealing with complex operational conditions.

[0003] First, there is a serious problem of data silos. The operational status of the pipeline network is reflected by a variety of data, including time-series sensor data such as pressure and flow, textual maintenance and inspection records, images and videos taken by drones or robots, and geological subsidence monitoring reports. The existing system lacks effective technical means to deeply integrate and correlate these multimodal data from different sources and in different formats, resulting in a one-sided and fragmented understanding of the pipeline network status.

[0004] Secondly, the fault diagnosis and root cause analysis capabilities are insufficient. When the monitoring system detects abnormalities in data such as pressure and flow, it can usually only issue simple threshold alarms. As for the root cause of the abnormality, it relies heavily on experienced operation and maintenance experts to conduct manual investigations. Experts need to review historical maintenance records and compare different types of data. The whole process is time-consuming and laborious, and the accuracy of the diagnostic results is limited by the individual's experience level, making it difficult to cope with the challenges of emergencies and the shortage of expert resources.

[0005] Furthermore, the level of automation in the operation and maintenance process is low. From discovering anomalies and analyzing the causes to finally generating maintenance work orders and dispatching personnel, the entire workflow involves a large number of manual intervention steps, resulting in a long response chain and low processing efficiency. This not only increases operating costs, but more importantly, in emergency situations, response delays may cause the best handling opportunity to be missed, creating serious safety hazards.

[0006] Therefore, existing technologies cannot meet the refined management needs of modern smart cities for gas pipeline networks, which require "proactive early warning, accurate diagnosis, and efficient handling." There is an urgent need for a new technical solution that can connect multimodal data, realize intelligent reasoning of fault root causes, and automatically generate executable maintenance instructions. Summary of the Invention

[0007] To address the aforementioned technical problems, this invention provides a gas pipeline network maintenance method, system, and electronic equipment based on a large language model, aiming to solve the problems of difficulty in data fusion, reliance on manual fault root cause analysis, and low degree of automation in operation and maintenance processes in the prior art.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0009] Firstly, a gas pipeline network maintenance method based on a large language model is provided, including the following steps:

[0010] S100. Acquire multi-source heterogeneous data corresponding to the gas pipeline network and standardize the multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes time-series data, text data and image data, the time-series data includes pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude and sound signal data of the gas pipeline network, the text data includes maintenance records and geological reports of the gas pipeline network, and the image data includes pipeline network images of the gas pipeline network taken by drone inspections;

[0011] S200. Vectorize and fuse the standardized multi-source heterogeneous data to build a unified multimodal vector database.

[0012] S300: When abnormal gas pipeline network data is detected, a query is initiated to the large language model that has been fine-tuned with professional knowledge instructions in the gas field based on enhanced retrieval, and the root cause of the detected abnormal gas pipeline network data is intelligently inferred to generate an analysis report.

[0013] S400: Based on the analysis report, automatically generate structured maintenance instructions and interface with the operation and maintenance system to form a feedback loop.

[0014] Preferably, step S100 includes the following steps:

[0015] S101. The time-series data is collected in real time through an IoT gateway, and the time-series data is cleaned and time-aligned; wherein, the data cleaning of the time-series data includes filling in missing values ​​in the time-series data and standardizing the time-series data; the time alignment of the time-series data includes resampling the time-series data based on a unified time grid.

[0016] S102. Obtain the text data through an application programming interface or optical character recognition technology, and extract predefined key entities from the text data using a named entity recognition model, wherein the predefined key entities include core entities, event entities, and spatiotemporal and attribute entities.

[0017] S103. Acquire the image data and use a target detection model to identify features in the pipeline network image, wherein the features include pipeline corrosion, structural cracks and external environmental risks.

[0018] Preferably, step S101, which involves imputing missing values ​​in the time series data and standardizing the time series data, includes the following steps:

[0019] Linear interpolation is used to fill in time-series data containing gas pipeline temperature.

[0020] Time series data containing gas pipeline flow are populated based on spline interpolation or ARIMA model predictions from preceding and following data points.

[0021] The time series data is standardized using the minimum-maximum normalization method, and the data of each dimension are linearly mapped to the [0,1] interval.

[0022] Preferably, step S200 includes the following steps:

[0023] S201. Based on multi-source heterogeneous data, a corresponding deep learning encoder is constructed; wherein, the deep learning encoder includes a time-series encoder, a text encoder, and an image encoder; the time-series encoder is constructed based on a time-series converter model with a self-attention mechanism, used to convert multivariate data slices within a fixed time window into vectors representing the dynamic operation mode of the gas pipeline network; the text encoder is based on... The architecture, fine-tuned using a corpus from the gas industry, is used to convert input text into a dense vector of fixed dimensions; the image encoder, built based on a visual converter model, is used to convert input pipeline images into high-dimensional feature vectors.

[0024] S202. Cross-modal semantic alignment training based on contrastive learning; that is, after constructing the deep learning encoder, the three independent encoders of time sequence, text and image learn to describe the same event in the same language;

[0025] S203. Construct and deploy a unified multimodal vector database; that is, all historical and real-time accessed standardized multi-source heterogeneous data are subjected to forward reasoning through their corresponding trained deep learning encoders to generate corresponding semantic vectors, and the semantic vectors, together with their metadata, are uniformly stored in a multimodal vector database specifically designed for efficient similarity retrieval.

[0026] Preferably, in the comparative learning, using The loss function optimizes the training objective, the The mathematical expression for the loss function is as follows:

[0027]

[0028] Mode middle: It is the vector of the anchor point sample; It is the corresponding positive sample vector; It is the first A vector of negative samples; This represents the calculation of cosine similarity between vectors, and its range is... It is a temperature hyperparameter.

[0029] Preferably, step S300 includes the following steps:

[0030] S301. Based on the abnormal event, generate a query object containing metadata and abnormal data, including:

[0031] The abnormal data corresponding to the description of the abnormal event is compared with the historical data of the same period to quantify the degree of abnormality and statistical significance.

[0032] The abnormal event is encapsulated in a structured manner to generate a query object containing metadata and abnormal data;

[0033] S302. Constructing a multimodal evidence chain based on a hybrid query, semantic retrieval, and cross-attention re-ranking model, including:

[0034] Based on the metadata contained in the query object, keyword and metadata filtering is performed in the multimodal vector database to obtain a filtered subset of data;

[0035] Obtain the query vector corresponding to the query object, and perform semantic retrieval on the filtered data subset based on the cosine similarity method to obtain one or more candidate data;

[0036] The relevance score between each candidate data and the query object is calculated based on the cross-attention reordering model, and a multimodal evidence chain is constructed by selecting a preset number of candidate data according to the relevance score order.

[0037] S303. Construct prompt words based on the description of the abnormal event and the multimodal evidence chain, and input the prompt words into a large language model that has been fine-tuned by professional knowledge instructions in the gas field;

[0038] S304. After logical association through the large language model fine-tuned by the professional knowledge instructions in the gas field, an analysis report containing root cause inferences and maintenance suggestions is generated.

[0039] Preferably, step S400 includes the following steps:

[0040] S401. Based on a predefined structure, generate a standardized JSON work order from the analysis report, including:

[0041] Construct a predefined structure that includes urgency, location, fault inference, and maintenance recommendations;

[0042] Based on the predefined structure and the analysis report, a standardized JSON work order is generated using a large language model fine-tuned with professional knowledge instructions in the gas field. The JSON work order includes structured maintenance instructions.

[0043] S402. Push the JSON work order to the operation and maintenance system through the API interface, so that the operation and maintenance system can automatically create and dispatch maintenance tasks according to the structured maintenance instructions contained in the JSON work order;

[0044] S403. Receive the maintenance report, form a closed-loop feedback, and update the large language model based on supervised fine-tuning data; that is, re-collect the maintenance report completed on-site as new text data, and use iteratively update the multimodal vector database and the large language model fine-tuned by gas field professional knowledge instructions to form a data-driven closed-loop optimization; wherein, the large language model fine-tuned by gas field professional knowledge instructions is iteratively updated based on the abnormal description of the abnormal event, selecting a preset number of candidate data according to the correlation score order, the analysis report, and the JSON work order.

[0045] Secondly, a gas pipeline maintenance system based on a large language model is also provided, including:

[0046] The data fusion module is used to acquire multi-source heterogeneous data corresponding to the gas pipeline network, and to standardize the multi-source heterogeneous data, as well as to perform vectorized encoding and fusion on the standardized multi-source heterogeneous data to construct a unified multimodal vector database.

[0047] The reasoning module is used to initiate queries to a large language model that has been fine-tuned with professional knowledge instructions in the gas field when abnormalities are detected in gas pipeline network data. It performs intelligent reasoning on the root causes of the detected abnormalities in gas pipeline network data and generates an analysis report.

[0048] The workflow generation module is used to automatically generate structured maintenance instructions based on the analysis report and interface with the operation and maintenance system to form a feedback loop.

[0049] Furthermore, the multi-source heterogeneous data includes time-series data, text data, and image data. The time-series data includes pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude, and sound signal data of the gas pipeline network. The text data includes maintenance records and geological reports of the gas pipeline network. The image data includes pipeline network images taken by drones during inspections.

[0050] Specifically, when the data fusion module acquires multi-source heterogeneous data corresponding to the gas pipeline network and performs standardization processing on the multi-source heterogeneous data, it specifically collects time-series data including pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude, and sound signals of the gas pipeline network in real time through an IoT gateway, and performs data cleaning and time alignment on the time-series data; and specifically acquires text data including maintenance records and geological reports of the gas pipeline network through an application programming interface or optical character recognition technology, and extracts predefined key entities from the text data using a named entity recognition model.

[0051] Thirdly, an electronic device is also provided, including at least one processor and a memory communicatively connected to the at least one processor; characterized in that the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the gas pipeline maintenance method based on a large language model of the first aspect.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] (1) Achieved comprehensive and accurate situational awareness, completely breaking down data silos: Due to technical limitations, traditional pipeline management systems suffer from fragmented data, including time-series data such as pressure and flow, text-based inspection records, images and videos, and geological reports, forming "data silos." This invention fundamentally solves this problem by constructing a unified multimodal data fusion platform. First, it can standardize the access and processing of all relevant data sources, such as time-series, text, and images. Second, through innovative multimodal data vectorization technology, it maps different types of data to the same high-dimensional vector space, making semantically related data spatially adjacent. This constructs a comprehensive and three-dimensional cognitive model of the gas pipeline network status, enabling fault analysis to move beyond isolated sensor readings and to make comprehensive judgments based on historical maintenance background, on-site visual evidence, and environmental factors, greatly improving the depth and accuracy of overall situational awareness of the pipeline network.

[0054] (2) It achieves efficient and intelligent root cause analysis, significantly improving diagnostic efficiency and accuracy: When faced with data anomalies, existing technologies can usually only issue simple threshold alarms. Subsequent fault diagnosis relies heavily on the personal experience of maintenance experts, which is not only time-consuming and laborious, but also cannot guarantee accuracy. This invention adopts a large language model reasoning paradigm with retrieval enhancement generation as its core, shortening this process from hours of manual investigation to seconds of automatic analysis. When an anomaly occurs, the system does not simply rely on the internal knowledge of the large language model, but first retrieves the most relevant historical and real-time data (such as historical maintenance records, recent inspection images, and relevant time-series data) from the multimodal vector database in real time. Subsequently, this rich and verifiable multi-source information is used as context and handed over to the large language model, which has been fine-tuned by professional knowledge in the gas field, for logical reasoning, thereby generating a root cause inference that conforms to professional logic and is supported by data, which greatly shortens the fault diagnosis time and effectively avoids the challenges brought about by the shortage of expert resources.

[0055] (3) A closed-loop automated operation and maintenance process has been achieved, significantly reducing operating costs and security risks: Traditional operation and maintenance processes involve a large number of manual intervention steps, resulting in long response chains, low processing efficiency, and a tendency to miss the best handling opportunity in emergency situations, creating serious security risks. This invention establishes a fully automated closed loop from "data monitoring - intelligent analysis - work order generation - task dispatch - result feedback". After the intelligent analysis module generates a root cause report, the system uses the function call capability of the large language model to automatically convert the analysis results into a standardized JSON structured work order. This work order is then seamlessly connected to the enterprise's existing work order system (FSM) through an API interface to realize the automatic creation and intelligent dispatch of maintenance tasks.

[0056] More importantly, the maintenance reports submitted by engineers after completing on-site tasks will be automatically collected by the system as a new data source, feeding back into and optimizing the multimodal vector database and large language model, forming a data-driven, continuously iterating, and constantly optimizing intelligent closed loop. This not only minimizes labor costs and risks caused by delays or errors due to manual operation, but also ensures that maintenance tasks can be executed accurately at the fastest speed, providing a solid technical guarantee for the safe and stable supply of urban gas.

[0057] (4) It ensures good interpretability and credibility, and effectively solves the "illusion" problem of large language models: traditional artificial intelligence models are often like a "black box", their decision-making process is not transparent and it is difficult to gain the trust of operation and maintenance personnel; the retrieval augmented generation (RAG) architecture adopted in this invention has one of its core advantages in its high interpretability; since every analysis and judgment of the large language model is clearly based on the specific data fragments retrieved from the vector database, any conclusions it outputs are based on evidence.

[0058] (5) The system can clearly show users which historical maintenance record, which drone inspection image, or which pressure time series data it is based on to arrive at the current fault inference; this mechanism of making the basis of judgment transparent effectively avoids the "illusion" problem of large language models fabricating answers out of thin air, significantly enhances the trust of maintenance personnel in the system's decision-making, and is the core guarantee for promoting the successful implementation of intelligent technology in the field of critical infrastructure security. Attached Figure Description

[0059] Figure 1 This is a schematic diagram illustrating the workflow of the gas pipeline maintenance method based on a large language model, which relates to the present invention.

[0060] Figure 2 A schematic diagram illustrating the workflow for building a unified multimodal vector database;

[0061] Figure 3 A flowchart illustrating the workflow for generating analysis reports;

[0062] Figure 4 A flowchart illustrating the workflow for establishing a feedback loop with the operations and maintenance system;

[0063] Figure 5 This invention relates to a system block diagram of a gas pipeline maintenance system based on a large language model.

[0064] Figure 6 This is a schematic diagram of the structure of the electronic device involved in the present invention. Detailed Implementation

[0065] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0066] Example 1: Refer to Figure 1 This invention provides a gas pipeline network maintenance method based on a large language model, aiming to solve the problems of data fusion difficulties, reliance on manual fault analysis, and low automation in existing technologies. Specifically, the implementation steps of this gas pipeline network maintenance method based on a large language model are as follows:

[0067] S100. Acquire multi-source heterogeneous data corresponding to the gas pipeline network and perform standardization processing on the multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes time-series data such as pressure, flow, temperature, gas concentration, vibration frequency and amplitude and sound signals of the gas pipeline network collected in real time through the Internet of Things gateway, and text data such as maintenance records and geological reports of the gas pipeline network obtained through application programming interface (API) or optical character recognition (OCR) technology, as well as pipeline image data captured by equipment such as drones during inspection; after acquiring the multi-source heterogeneous data, perform standardization processing on the multi-source heterogeneous data, including cleaning and time alignment of the time-series data, extracting key information such as equipment number and fault phenomenon from the text using the named entity recognition (NER) model, and identifying features such as pipeline corrosion and structural cracks in the images through the target detection model.

[0068] S200. The standardized multi-source heterogeneous data is vectorized, encoded, and fused to construct a unified multimodal vector database. Specifically, this step first employs a contrastive learning method to construct dedicated encoders for time-series, text, and image data, such as encoders based on time-series converters, BERT architectures, and visual converter models. Then, through… The loss function is used to train the constructed dedicated encoder, which brings different modal data (positive samples) describing the same event closer in the vector space, while pushing away irrelevant samples (negative samples), thereby constructing a semantically unified multimodal vector database.

[0069] S300. When an anomaly is detected in the gas pipeline network data, a query is initiated based on Retrieval Enhanced Generation (RAG) to the Large Language Model (LLM), which has been fine-tuned with instructions from gas industry expertise. This performs intelligent root cause reasoning on the detected anomaly in the gas pipeline network data and generates an analysis report. Specifically, when an anomaly is detected in the gas pipeline network data, the intelligent root cause reasoning process based on Retrieval Enhanced Generation (RAG) is initiated. First, the most relevant real-time and historical data to the current anomaly is retrieved from the multimodal vector database. Then, this retrieved related information, along with a description of the anomaly, is input into the Large Language Model (LLM), which has been fine-tuned with instructions from gas industry expertise. Finally, the Large Language Model performs logical association and reasoning to generate an analysis report containing root cause inferences and maintenance recommendations.

[0070] S400 automatically generates structured maintenance instructions based on the analysis report and interfaces with the operation and maintenance system to form a feedback loop. Specifically, this step first utilizes the function call capabilities of the large language model to convert the natural language analysis report into a standardized JSON work order containing fields such as urgency, location, and fault inference. Then, the standardized JSON work order is automatically pushed to an external work order system or field service management platform via an API interface, enabling automatic creation and dispatch of maintenance tasks. Finally, after the maintenance task is completed, the maintenance report from the field is re-collected as new text data and used to iteratively update the multimodal vector database and fine-tune the large language model, forming a data-driven, continuously optimized closed-loop system.

[0071] Specifically, the first stage of the gas pipeline network maintenance method based on a large language model provided in Embodiment 1 of this invention is to construct a comprehensive and standardized process for multi-source heterogeneous data fusion. The core task of this stage is to systematically acquire, deeply process, and rigorously standardize gas pipeline network-related data from diverse sources and in various formats through technical means, laying a solid and high-quality data foundation for subsequent vectorized fusion, intelligent reasoning, and automated operation and maintenance. In this embodiment of the invention, this stage specifically covers the processing of time-series data, text data, and image data.

[0072] The processing of time-series data includes:

[0073] First, industrial-grade smart IoT gateways are deployed at key nodes in the gas pipeline network, such as regional pressure regulating stations, building pressure regulating boxes, critical valve wells, and pipe sections prone to geological subsidence. These gateways have edge computing capabilities and are equipped with multiple industrial communication protocol stacks, such as Modbus and OPC UA, to ensure compatibility with sensor devices from different manufacturers.

[0074] Then, sensors connected to these gateways are used to collect multi-dimensional physical quantities in real time at high frequency, including but not limited to conventional pressure. ,flow ,temperature Gas concentration The frequency and amplitude of pipeline vibration, i.e. and Data includes pipe network sound signals collected using acoustic sensors. This data is processed using lightweight... The protocol is used for transmission; to ensure data transmission security, The entire communication process adopts encryption.

[0075] Next, the collected raw data stream is sent to a distributed time-series database designed for high-throughput read and write operations, such as... or The database is used for persistent storage. After the data is written, a series of data cleaning and standardization processes are performed.

[0076] Next, statistical methods are used, such as... The rules are used to eliminate isolated, obvious "outliers" caused by momentary electrical faults in sensors or communication interference. For more complex anomalies, unsupervised anomaly detection is performed using machine learning algorithms such as Isolation Forest.

[0077] Next, for missing time-series data caused by network fluctuations or other reasons, appropriate interpolation methods are used to fill in the gaps based on the data characteristics. For example, linear interpolation is used for temperature data with gradual changes; for flow data with strong fluctuations, spline interpolation based on preceding and following data points or predictions from the ARIMA model are used to fill in the gaps, ensuring the integrity of the data sequence. To reduce interference from inherent sensor noise, a moving average filter or exponential smoothing method is applied to the data to better reveal its potential trends.

[0078] Finally, due to the significant differences in the dimensions and numerical ranges of different physical quantities, for example, the unit of pressure is... The unit of flow rate is To eliminate the dominant influence of large numerical features in subsequent model training, normalization is necessary. This embodiment prioritizes min-max normalization, linearly mapping the data of each dimension to... The interval is calculated using the following formula:

[0079]

[0080] in, For the original data points, and These represent the maximum and minimum values ​​of the data within a specific time window. Normalized data. In some scenarios, this can also be used. Standardize it so that it conforms to the mean. The standard deviation is It follows a standard normal distribution.

[0081] Furthermore, since timestamp alignment is a fundamental prerequisite for multivariate time series analysis, this embodiment deploys a Network Time Protocol (NTP) client at the gateway layer to ensure high time synchronization between all acquisition devices and the central server. To ensure that at any given time point there is a complete data snapshot containing measurements across all dimensions, providing a guarantee for subsequent construction of multivariate time series feature vectors, this embodiment resamples all sensor data (or time series data) using a unified time grid in the data processing flow.

[0082] The processing of text data includes:

[0083] For the extraction and structuring of text data, through the development The adapter proactively retrieves structured historical maintenance work orders, equipment ledgers, inspection records, etc., in batches from the enterprise's existing operation and maintenance management system.

[0084] For a large number of existing paper documents, such as early design drawings, geological subsidence monitoring reports, and safety assessment reports, scanning equipment with an integrated high-precision optical character recognition (OCR) engine is used for digitization. This optimized OCR engine can recognize tables and specific layouts in the documents and has a higher accuracy rate in recognizing professional terminology in the gas industry.

[0085] For the acquired unstructured or semi-structured text, advanced Natural Language Processing (NLP) techniques are applied for deep analysis. The core is a Named Entity Recognition (NER) model based on the BERT architecture and fine-tuned using an internal enterprise corpus for domain adaptation. This NER model can accurately and automatically identify and extract predefined key entities from massive amounts of text. These entities constitute a comprehensive pipeline network event knowledge graph, including: core entities such as "equipment number," "equipment type" (e.g., valve, pressure regulator), and "pipe material" (e.g., PE pipe, steel pipe); event entities such as "fault phenomena" (e.g., "sudden pressure drop," "abnormal flow," "odor"), "maintenance measures" (e.g., "gasket replacement," "bolt tightening," "welding repair"), and "maintenance results" (e.g., "restored to normal"); and spatiotemporal and attribute entities such as "geographic coordinates," "administrative region," "occurrence time," "settlement value," and "corrosion level."

[0086] The processing of image data includes:

[0087] In image data recognition and feature extraction, image and video data collected by drones or pipeline robots during inspections provide the most intuitive visual evidence of the gas pipeline network's status. The system connects to the data interface of the drone ground station or pipeline robot control system to automatically acquire high-definition image and video data generated during inspections. This data typically contains rich EXIF ​​metadata, such as GPS geographic coordinates, shooting time, and camera parameters. This metadata is extracted and stored in a database, and then correlated with the image content.

[0088] Before model analysis, the original images are preprocessed, including image enhancement, noise removal, and geometric correction for UAV aerial images to eliminate lens distortion. Then, computer vision technology is applied, using a target detection model trained and optimized on a large number of gas pipeline defect samples for automated image analysis. This target detection model can not only identify but also accurately locate and label various visual features related to safety hazards on the images. These include: pipeline defects such as rust patches at weld seams, coating peeling, pipe structural cracks, and pipe deformation; cracks in abnormal support structures of auxiliary facilities, damaged or displaced valve manhole covers, and missing or damaged warning posts; signs of illegal third-party construction directly above the pipeline, as well as signs of excavators and soil accumulation, ground subsidence or collapse, abnormal withering of vegetation, and accumulation of flammable materials near the pipeline. For each identified feature, its type, location coordinates, and confidence score are structured and recorded, forming a vectorized preliminary description of the image content.

[0089] Through the refined processing of the above three dimensions, a unified, standardized, and high-quality multimodal data foundation has been constructed, eliminating noise and barriers in the original data, and laying the foundation for building a unified multimodal vector database in the next stage.

[0090] Specifically, the second stage of the gas pipeline network maintenance method based on a large language model provided in Embodiment 1 of this invention involves vectorizing and deeply fusing multi-source heterogeneous data. The ultimate goal is to construct a unified, semantically consistent multimodal vector database. The core task of this stage is to overcome the challenge of mapping different data types to a unified high-dimensional vector space, ensuring that semantically related data are geometrically close to each other in space. In this embodiment of the invention, this stage specifically employs a contrastive learning method to achieve the goal of constructing a unified, semantically consistent multimodal vector database.

[0091] See Figure 2 This is a flowchart illustrating the workflow for constructing a multimodal vector database in Embodiment 1 of the present invention. In this embodiment, a contrastive learning method is employed to achieve the technical path of constructing a unified and semantically consistent multimodal vector database. The specific steps are as follows:

[0092] S201. Based on multi-source heterogeneous data, construct corresponding deep learning encoders. To accurately capture and represent the deep semantic features of various data types, design and construct dedicated deep learning encoders for different modalities of data, such as a time-series encoder for time-series data, a text encoder for text data, and an image encoder for image data. These encoders are fine-tuned with domain-specific data to ensure their ability to understand the professional scenarios of gas pipeline networks.

[0093] For time-series data, such as multivariate time-series data like gas pipeline pressure and flow rate collected from sensors, a Time Series Transformer (TST) model based on a self-attention mechanism is used. Whether it's short-term sharp fluctuations or long-term slow trends, the TST model effectively captures the complex dependencies between any two points in the time series. The input to the time encoder is a slice of multivariate data within a fixed time window, such as pressure and flow rate data sampled every minute over the past 6 hours. The TST model encodes this data slice, ultimately generating a vector that characterizes the dynamic operating pattern of the pipeline network during that period.

[0094] For text data, such as maintenance and inspection records, technical reports, and operating procedures, a BERT-based architecture was used, fine-tuned using a professional corpus in the gas industry. BERT was chosen for its powerful bidirectional contextual understanding capabilities. The fine-tuning phase utilized a massive corpus of gas industry data, including but not limited to national gas safety standards, historical accident analysis reports, and equipment maintenance manuals. Through self-supervised learning tasks such as "masked language model" and "next sentence prediction," the model fully mastered industry terminology, fault description methods, and causal relationship expressions. This text encoder can ultimately transform input text of arbitrary length, such as a maintenance record "A leak occurred in the pipeline near valve well B-05 due to reckless construction by a third party," into a fixed-dimensional dense vector, which represents the semantic meaning of the input text.

[0095] For image data, such as images captured by drones or robots during inspections, a Vision Transformer (ViT) model is used. Compared to traditional convolutional neural networks, ViT can better capture the global dependencies of images, which is crucial for identifying features requiring a wide field of view, such as minor ground subsidence and abnormal vegetation growth along pipelines. This invention constructs a professional dataset containing hundreds of thousands of labeled images to fine-tune the ViT model. This dataset covers various scenarios including pipeline defects such as weld corrosion, coating peeling, structural cracks, abnormal valve and manhole cover displacement, support frame deformation, and external environmental risks. After fine-tuning, the image encoder can efficiently convert the input pipeline image into a high-dimensional feature vector, which condenses the key visual information in the image.

[0096] S202. Cross-modal semantic alignment training based on contrastive learning. After constructing a dedicated encoder, the three independent encoders—time series, text, and image—learn to describe the same event using the same language. Specifically, a contrastive learning training paradigm is used to bring positive samples closer together and push negative samples further away. First, training sample tuples are constructed for contrastive learning; these tuples include positive sample tuples and negative sample tuples. Positive sample tuples consist of data from different modalities (text data, time series data, and image data) describing the same objective event or state. For example, the event "pipeline rupture" tuple (i.e., the associated data pair) consists of: <a time-series data vector showing a sudden drop in pressure, a text vector of a maintenance record stating "Valve XX ruptured, emergency repair required," and an image vector showing a "significant crack in the valve body" taken on-site>; another example is the event "third-party construction risk" tuple, which consists of: <a time-series vector showing "abnormal vibration sensor data" installed near the pipeline, a text vector of an inspection record stating "A large excavator is operating within the pipeline protection zone at a construction site," and an image vector taken by a drone showing "The excavator is too close to the pipeline">. A negative sample tuple consists of all other samples in a given sample that do not belong to the same event tuple (i.e., the positive sample tuple). In actual training, this invention employs an "intra-batch negative sample" strategy, meaning that for a given anchor point, all other samples within the same training batch are considered negative samples. Furthermore, this invention introduces a "hard negative sample" mining strategy, which intentionally selects samples that are relatively close to the anchor points (i.e., positive sample tuples) in the vector space but are semantically completely different as hard negative samples. For example, time series data of "planned pressure reduction maintenance" is used as "sudden pressure leakage" as a hard negative sample. This forces the model to learn more subtle semantic differences and improves the model's discriminative ability. Then, loss function and model optimization are performed, specifically using the InfoNCE loss function as the optimization target. The mathematical expression of the InfoNCE loss function is as follows:

[0097] (1)

[0098] In formula (1): It is the vector of the anchor point sample; It is the corresponding positive sample vector; Then it is the first A vector of negative samples; The cosine similarity between vectors is calculated, and its range is... ; It is a temperature hyperparameter used to adjust the model's focus on both easy and difficult samples; a smaller one... This forces the model to work harder to distinguish similar negative samples. The goal of the entire training process is to minimize this loss function. By minimizing... This drives the model to maximize the numerator while minimizing the second term in the denominator, thereby achieving the goal of "bringing positive samples closer and pushing negative samples further away" in the vector space.

[0099] S203. Construct and deploy a unified multimodal vector database. After large-scale contrastive learning training, the parameters of the three dedicated encoders—time series, text, and image—are frozen, enabling them to map input data from different modalities to the same semantic space. At this point, the final construction phase begins: all historical and real-time accessed, standardized, multi-source heterogeneous data is forward-inferred through its corresponding trained encoders to generate corresponding semantic vectors. These generated semantic vectors (i.e., high-dimensional vectors), along with their metadata (e.g., original data ID, timestamp, geographic location, data source, etc.), are uniformly stored in a multimodal vector database specifically designed for efficient similarity retrieval. Through the indexing algorithms of this type of multimodal vector database, millisecond-level similarity retrieval can be achieved in vector sets of hundreds of millions. Similarity retrieval provides high-performance retrieval support for subsequent intelligent reasoning about the root causes of failures.

[0100] Specifically, the third stage of the gas pipeline maintenance method based on a large language model provided in Embodiment 1 of this invention initiates a query to the large language model, which has been fine-tuned with professional knowledge instructions in the gas field, based on retrieval enhancement generation, to perform deep and intelligent root cause reasoning on the detected pipeline data anomalies. The core task of this stage is to generate an analysis report containing root cause inferences and maintenance recommendations. In this embodiment of the invention, this stage specifically covers the complete process from the triggering of an abnormal event to the generation of a professional analysis report.

[0101] The following example assumes that the system detects that the outlet pressure of pressure regulating station No. 5 in area B of a gas pipeline network is below the normal threshold by 15% for one hour at a specific time, such as 3:15 pm (an abnormal event). This will be combined with... Figure 3 This paper details the complete technical process from triggering an anomaly event to generating a professional analysis report, aiming to demonstrate the significant advantages of this invention in terms of reasoning efficiency, accuracy, and interpretability. The specific steps in this stage, from triggering an anomaly event to generating a professional analysis report, are as follows:

[0102] S301. Based on the abnormal event, generate a query object containing metadata and abnormal data. In this embodiment, the abnormal event can be an event that occurs when monitored factors such as pressure, flow rate, temperature, gas concentration, and pipeline vibration frequency and amplitude in the gas pipeline network exceed a predetermined range. For example, when monitoring detects that the outlet pressure data of pressure regulating station No. 5 in area B of a gas pipeline network deviates from the normal range, the system first initiates a dynamic analysis program to compare the abnormal data corresponding to the abnormal event with historical data from the same period (e.g., data from the same time period on the same day over the past few weeks, or normal values ​​predicted based on time series models) to quantify its degree of abnormality and statistical significance. This effectively avoids false alarms caused by seasonal or normal diurnal fluctuations. Subsequently, the system automatically encapsulates this abnormal event in a structured manner, generating a query object containing metadata and abnormal data. The query object not only contains a core anomaly description but also automatically aggregates relevant contextual information, such as: asset information: equipment ID (e.g., B-DRS-05), equipment type (pressure regulating station), geographical coordinates (latitude and longitude), pipe diameter, material, and year of commissioning; real-time operating conditions: upstream pressure, downstream flow rate, valve opening, and gas temperature at the time of the anomaly; and anomaly characteristics: the start time, duration, deviation, and rate of change (gradual or sudden). Finally, this structured query object is fed into the inference module and encoded into a query vector. .

[0103] S302. Constructing a multimodal evidence chain based on a hybrid query, semantic retrieval, and cross-attention re-ranking model. To ensure the accuracy and comprehensiveness of the retrieval, this invention employs a hybrid retrieval strategy rather than a single vector similarity retrieval. First, a hard metadata filter is performed to obtain a filtered data subset: that is, using the structured metadata in the query object, a rapid round of keyword and metadata filtering is performed in the multimodal vector database. For example, it will filter out all historical data directly related to "Device ID: B-DRS-05" or geographically located within 500 meters of "B-DRS-05". This step greatly reduces the search space and improves the efficiency and relevance of subsequent vector retrieval. Then, vector semantic retrieval is performed: that is, on the filtered data subset, the query vector is used... A high-speed semantic retrieval based on cosine similarity is performed to obtain one or more candidate data. That is, this vector semantic retrieval aims to find historical events that are semantically similar to the current anomaly, even if their descriptions or data modalities are completely different. For example, the current event of "pressure reduction" might match a historical event of "flow anomaly" or a maintenance report describing "voltage regulator failure." To ensure retrieval efficiency, the underlying vector database can employ a mature approximate nearest neighbor search library such as FAISS. At this stage, the system will recall the events with the highest similarity. There are candidate data points, for example, K=100. Next, cross-attention re-ranking is performed to construct a multimodal evidence chain: that is, in order to obtain... From the candidates, the system selects the information most closely related to the current anomaly using a lightweight cross-attention re-ranking model. This model calculates the precise relevance score between the query object and each candidate data point, enabling a deeper understanding of the subtle relationships between them. Unlike retrieval methods that only calculate the overall similarity between two vectors, the cross-attention mechanism captures the correspondence between specific words or features, thus achieving more accurate ranking. After re-ranking (e.g., sorting by relevance score from high to low), the system selects the final... The most relevant multimodal information fragments serve as the "chain of evidence" for reasoning. For example, this search might ultimately yield the following highly relevant evidence:

[0104] Text information (Evidence 1): A patrol record from two weeks ago: "Large construction vehicles frequently pass by the No. 5 pressure regulating station in Area B, and there are signs of road subsidence."

[0105] Image information (Evidence 2): An image taken by a drone during an inspection three days ago. The description generated by the target detection model is: "It shows that the external protective fence of the voltage regulating station has obvious deformation caused by an impact, with coordinates [XX, YY]".

[0106] Time-series information (Evidence 3): A piece of data from a vibration sensor installed in the voltage regulating station, described by its feature extraction module as: "Two days ago in the afternoon, a severe impact vibration lasting 3 seconds was detected, with the peak value exceeding the warning threshold."

[0107] Historical maintenance (evidence 4): A maintenance work order from one year ago: "The outlet pressure of this pressure regulating station was unstable due to filter blockage, and it has been cleaned."

[0108] S303. Based on the description of the abnormal event and the multimodal evidence chain, construct prompt words and input the prompt words into a large language model fine-tuned with professional knowledge instructions in the gas field. That is, combine the original structured anomaly description with the retrieved... Multimodal evidence chains are integrated to construct a highly structured and information-rich contextual cue word. To guide the large language model in rigorous logical reasoning, rather than simply listing information, this invention employs Chain-of-Thought (CoT) cue engineering technology. The structure of this cue word is carefully designed as follows:

[0109] [System Command]

[0110] [Background]: You are a senior gas pipeline safety diagnostics expert with 20 years of experience. Your analysis must be based on the evidence provided, proceed step-by-step, and prioritize public safety. Unfounded speculation is prohibited.

[0111] [Task]: Based on the following information, please comprehensively analyze the root cause of the fault and provide maintenance recommendations including specific steps. Please clearly cite the sources of evidence in your report.

[0112] [Current anomaly]

[0113] - Equipment: Area B, No. 5 pressure regulating station (ID: B-DRS-05)

[0114] - Phenomenon: The outlet pressure has been below the normal threshold by 15% for 1 consecutive hour starting from [time].

[0115] - Characteristics: Pressure decreases slowly and steadily.

[0116] [Retrieved related evidence]

[0117] - [Evidence 1 - Text]: Inspection records from two weeks ago show that heavy vehicles were passing through the vicinity and that the road surface had subsided.

[0118] - [Evidence 2 - Image]: Images from three days ago show that the guardrail has signs of impact deformation.

[0119] - [Evidence 3 - Timeline]: Two days ago, the vibration sensor recorded a violent impact.

[0120] - [Evidence 4 - History]: A year ago, the pressure was unstable due to filter clogging.

[0121] [Output Requirements]

[0122] 1. **Reasoning Process (Thinking Chain)**: First, list all possible hypotheses of failure. Second, evaluate the fit of each hypothesis with the provided evidence. Finally, arrive at the most likely root cause.

[0123] 2. **Final Conclusion:** Clearly state the root cause inference and provide a confidence score.

[0124] 3. **Action Recommendations**: Provide detailed, actionable maintenance procedures and safety precautions.

[0125] S304. After logically associating the information using a large language model fine-tuned with gas industry expertise, an analysis report containing root cause inferences and maintenance recommendations is generated. Upon receiving the above prompt, the large language model, fine-tuned with gas industry expertise and instructions, will begin working. It will follow the instructions of the thought process chain to generate a logically rigorous analysis report. For example:

[0126] "Root Cause Analysis Report: Abnormal Pressure at Pressure Regulating Station No. 5 in Area B"

[0127] 1. Reasoning process:

[0128] "- Hypothesis A: Filter clogging. This hypothesis is consistent with [Evidence 4] and is a common malfunction of this device. However, it cannot explain the strong external influence signals in [Evidence 1], [Evidence 2] and [Evidence 3]. Therefore, it is less likely."

[0129] "- Hypothesis B: An external impact caused damage to internal components. This hypothesis perfectly connects all the evidence. The passage of heavy vehicles in [Evidence 1] provides the source of the impact; the violent vibrations in [Evidence 3] record the occurrence of the impact; the deformation of the guardrail in [Evidence 2] is direct physical evidence of the impact. This impact is highly likely to have caused displacement or damage to critical internal components (such as the pressure regulating valve diaphragm or controller), thereby triggering the current persistent pressure drop. This hypothesis is a high-probability event."

[0130] 2. Final Conclusion:

[0131] "- Root cause inference: Based on comprehensive analysis, the root cause is highly likely to be damage to the internal components of the voltage regulator caused by rough construction or vehicle collision; confidence level: 95%."

[0132] 3. Action Recommendations:

[0133] "- Urgency: High. Dispatch immediately. - **Steps:** 1. Immediately dispatch a repair team to Pressure Regulator Station No. 5 in Area B. 2. First, confirm on-site whether there is a gas leak. 3. Inspect the protective railings and equipment exterior, verifying impact marks. 4. Suspend service at this pressure regulator station and activate the backup line (if available). 5. Open the pressure regulator and thoroughly inspect the integrity of internal valves, diaphragms, springs, and other components. 6. Replace or repair as needed based on the extent of damage."

[0134] "- Required materials: spare pressure regulator assembly, portable gas detector."

[0135] This report not only provides conclusions, but more importantly, it demonstrates the complete logical deduction process and clearly links each judgment with specific evidence, effectively solving the "black box" problem of AI decision-making and significantly enhancing the credibility of the system's conclusions for operations and maintenance personnel.

[0136] Specifically, the fourth stage of the gas pipeline maintenance method based on a large language model in Embodiment 1 of this invention is a process of automatically generating structured maintenance instructions based on the analysis report and connecting them with the operation and maintenance system to form a feedback loop. This involves transforming intelligent analysis results into executable action instructions and deeply integrating them with the operation and maintenance system to form a data-driven, continuously optimized, automated operation and maintenance feedback loop. Although in the third stage, the large language model has already generated a professional, natural language-formatted root cause analysis report based on rich multimodal context, this report is unstructured for the backend operation and maintenance system, which needs to execute tasks precisely. Therefore, to break down the barrier between "analysis" and "execution," the core of this stage is to utilize the advanced capabilities of the large language model to accurately transform this report into structured instructions that the operation and maintenance system can execute.

[0137] The following analysis report, based on an abnormal event in the outlet pressure of pressure regulating station No. 5 in area B of a certain gas pipeline network at a specific time point, will be used as an example. Figure 4 This section details the entire process of this stage, from generating analysis reports to achieving automated workflows:

[0138] S401. Based on a predefined structure, generate standardized JSON work orders from the analysis report;

[0139] First, define a standardized JSON work order schema. This involves pre-defining a detailed, standardized JSON object template that includes predefined structures such as urgency, location, fault inference, and maintenance recommendations. It clarifies the format, type, and constraints of the required information. An example of a refined JSON schema is shown below:

[0140] JSON

[0141] {

[0142] "workOrderID": "string (UUID)",

[0143] "creationTimestamp": "string (ISO 8601)",

[0144] "urgencyLevel": "enum ('Critical', 'High', 'Medium', 'Low')",

[0145] "location": {

[0146] "area": "string",

[0147] "stationID": "string",

[0148] "coordinates": {

[0149] "latitude": "number",

[0150] "longitude": "number"

[0151] }

[0152] },

[0153] "faultSummary": {

[0154] "phenomenon": "string",

[0155] "inferredRootCause": "string",

[0156] "supportingEvidence": [

[0157] {

[0158] "type": "enum ('Text', 'Image', 'Time-Series')",

[0159] "description": "string",

[0160] "referenceID": "string"

[0161] } ]

[0163] },

[0164] "maintenancePlan": {

[0165] "suggestedActions": [

[0166] {

[0167] "step": "integer",

[0168] "description": "string",

[0169] "priority": "integer"

[0170] }

[0171] ],

[0172] "requiredMaterials": [

[0173] {

[0174] "itemName": "string",

[0175] "itemCode": "string",

[0176] "quantity": "integer",

[0177] "unit": "string"

[0178] }

[0179] ],

[0180] "requiredTools": ["string"],

[0181] "estimatedDurationHours": "number"

[0182] },

[0183] "safetyPrecautions": ["string"]

[0184] }

[0185] Then, a second call and formatting are performed, that is, the system initiates a targeted second call to the large language model. The inputs for this call include:

[0186] Complete analysis report: Full text of the natural language report generated in the third phase.

[0187] Function signature: The predefined JSON pattern itself serves as the signature of the "function" that the large language model needs to call.

[0188] Command prompt: A carefully designed prompt, such as: "You are a professional gas maintenance dispatcher. Please strictly follow the fault analysis report provided below, call the create_work_order function, and fill in all parameter fields completely and accurately to generate a standardized JSON format maintenance work order. Ensure that all information extraction is based on the original report."

[0189] Finally, output validation and correction are performed. After receiving the secondary call instruction, the large language model no longer performs open generation, but instead performs the extraction and transformation task from text to structured data, ultimately outputting a JSON object that strictly conforms to a predefined pattern. To ensure absolute reliability, the system performs an automatic validation upon receiving the JSON work order output by the large language model. The validation program checks whether the JSON format is correct, whether all required fields are filled, and whether the data types match. If the validation fails, the system can trigger an automatic correction loop, sending the error information along with the original request to the large language model again, instructing it to correct the errors and re-output.

[0190] S402. Push JSON work orders to the operation and maintenance system via API interface;

[0191] AP1 Push: After obtaining a standardized JSON work order, the system seamlessly pushes it into the enterprise's existing operations and maintenance system, enabling automatic task flow. The system uses a secure RESTful API interface to push the generated JSON work order to the enterprise's existing work order system or field service management platform via an HTTP POST request. This API call is authenticated and authorized using OAuth 2.0 or API keys to ensure the security of data exchange.

[0192] Intelligent Task Creation and Dispatch: After receiving an API request, the on-site service management platform's built-in parser automatically reads the JSON data. Since the JSON data contains structured maintenance instructions, the operations and maintenance system creates a new maintenance task. The operations and maintenance system also achieves intelligent task dispatch based on structured information; its internal scheduling engine considers the following factors:

[0193] Geographic location, based on the location.coordinates field, matches the nearest operations and maintenance team;

[0194] Skills and qualifications: Based on information in the fault summary and maintenance plan, match engineers with the qualifications required to repair specific models of voltage regulators or handle specific types of faults;

[0195] For materials and tools, check the requiredMaterials and requiredTools fields and link them with the inventory system to ensure that the assigned team can carry the correct materials and tools, and even automatically generate material requisition forms;

[0196] Real-time status, combined with engineers' real-time work schedules, current workload, and GPS location, allows for the selection of the optimal personnel to achieve the fastest response.

[0197] In this way, end-to-end full automation is achieved from intelligent fault analysis to the issuance of specific action instructions, greatly reducing response time. The core advantage of this invention lies in its ability to continuously learn and evolve through practice, forming a virtuous cycle of intelligent closed loop.

[0198] S403: Receive maintenance reports, form a closed-loop feedback, and update the large language model based on supervised fine-tuning data;

[0199] Field data feedback: After completing the repair task on-site, the engineer submits a detailed repair report via the FSM application on a mobile terminal. This report typically includes the confirmed final cause of the failure, the specific repair measures taken, information on replaced parts, and on-site photos.

[0200] Incremental optimization of the knowledge base and model: This new repair report, as new text data, is automatically collected and sent back. In this embodiment, after key information is extracted by the NER model and vectorized by the text encoder, it is stored in the multimodal vector database. The next time a similar fault occurs, the system can find this successful and verified repair case when performing enhanced retrieval, thereby making a more accurate judgment.

[0201] This complete event constitutes a high-quality supervised fine-tuning data pair. The structure of this data pair is: { "input": "[original anomaly description + retrieved multimodal information]", "output": "[final analysis report and maintenance work order verified by the field engineer]"}. Once a certain number of such high-quality data pairs are accumulated, these data can be used periodically for incremental fine-tuning of the large language model. The fine-tuning process can employ efficient parameter adjustment techniques, updating only a small portion of the model's parameters. This integrates new domain knowledge and reasoning logic into the model while avoiding the enormous overhead of training from scratch. Through this closed loop of "analysis-execution-feedback-learning," the system described in this invention can continuously learn from real-world operational practices. Its diagnostic accuracy and the professionalism of its generated recommendations will continuously improve over time, ultimately achieving a high degree of intelligence that grows alongside gas pipeline network operation and maintenance services.

[0202] Example 2: Please refer to Figure 5 This invention provides a gas pipeline maintenance system 600 based on a large language model, comprising:

[0203] The data fusion module 601 is used to acquire multi-source heterogeneous data corresponding to the gas pipeline network, and to perform standardization processing on the multi-source heterogeneous data, and to perform vectorization encoding and fusion on the standardized multi-source heterogeneous data to construct a unified multimodal vector database.

[0204] The reasoning module 602 is used to initiate a query to a large language model that has been fine-tuned with professional knowledge instructions in the gas field when an anomaly in the pipeline network data is detected, based on the enhanced retrieval generation, to perform intelligent reasoning on the root cause of the detected pipeline network data anomaly and generate an analysis report.

[0205] The workflow generation module 603 is used to automatically generate structured maintenance instructions based on the analysis report and interface with the operation and maintenance system to form a feedback loop.

[0206] Specifically, in Embodiment 2 of the present invention, the data fusion module 601 is used to perform the functions of S100 and S200 in the aforementioned examples, the inference module 602 is used to perform the function of S300 in the aforementioned examples, and the workflow generation module 603 is used to perform the function of S400 in the aforementioned examples. For the specific functions of the gas pipeline maintenance system 600 based on a large language model in this embodiment, please refer to the specific content of the aforementioned embodiments, and therefore will not be repeated here.

[0207] Example 3: Please refer to Figure 6 This invention provides an electronic device. Specifically, the electronic device 700 includes a processor 701, a memory 702, a communication interface 703, and a bus 704; wherein the processor 701, the memory 702, and the communication interface 703 can be connected to each other via the bus 704, or can be connected using other connection methods besides the bus 704.

[0208] Specifically, in embodiment 3 of the present invention, processor 701 may be a general-purpose processor, which may be a processor that performs specific steps and / or operations by reading and executing contents stored in memory (e.g., memory 702). For example, the general-purpose processor may be a central processing unit (CPU). Processor 701 may include at least one circuit to perform... Figures 1 to 4 All or part of the steps of the method shown.

[0209] Specifically, in embodiment 3 of the present invention, the memory 702 can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical memory, hard disk, etc.

[0210] Specifically, memory 702 can be used to store several program codes. When processor 701 executes this program code, the above-mentioned... Figures 1 to 4 The corresponding process steps.

[0211] Specifically, in embodiment 3 of the present invention, the communication interface 703 includes input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting devices within the electronic device 700, as well as interfaces for interconnecting the electronic device 700 with other devices (e.g., other computing devices or user equipment). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.

[0212] Specifically, in embodiment 3 of the present invention, bus 704 can be any type of communication bus used to interconnect processor 701, memory 702 and communication interface 703, such as system bus.

[0213] The aforementioned electronic devices 700 can be disposed on separate chips, or at least partially or entirely on the same chip. Whether the devices are disposed independently on different chips or integrated on one or more chips often depends on the needs of the product design. In this invention, the specific implementation of the aforementioned electronic devices is not limited.

[0214] It needs to be explained that, Figure 6 The electronic device 700 shown is merely an example. In the implementation process, the electronic device 700 may also include other components, which will not be listed one by one in this article.

[0215] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0216] It is understood that the various numerical designations used in the embodiments of the present invention are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present invention. It should be understood that in the embodiments of the present invention, the order of the process numbers 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 the present invention.

[0217] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A gas pipeline network maintenance method based on a large language model, characterized in that, Includes the following steps: S100. Acquire multi-source heterogeneous data corresponding to the gas pipeline network and standardize the multi-source heterogeneous data; wherein, the multi-source heterogeneous data includes time-series data, text data and image data, the time-series data includes pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude and sound signal data of the gas pipeline network, the text data includes maintenance records and geological reports of the gas pipeline network, and the image data includes pipeline network images of the gas pipeline network taken by drone inspections; Step S100 includes the following steps: S101. The time-series data is collected in real time through an IoT gateway, and the time-series data is cleaned and time-aligned; wherein, the data cleaning of the time-series data includes filling in missing values ​​in the time-series data and standardizing the time-series data; the time alignment of the time-series data includes resampling the time-series data based on a unified time grid. S102. Obtain the text data through an application programming interface or optical character recognition technology, and extract predefined key entities from the text data using a named entity recognition model, wherein the predefined key entities include core entities, event entities, and spatiotemporal and attribute entities. S103. Acquire the image data and use a target detection model to identify features in the pipeline network image, wherein the features include pipeline corrosion, structural cracks and external environmental risks; S200. Vectorize and fuse the standardized multi-source heterogeneous data to build a unified multimodal vector database. S300: When abnormal gas pipeline network data is detected, a query is initiated to the large language model that has been fine-tuned with professional knowledge instructions in the gas field based on enhanced retrieval, and the root cause of the detected abnormal gas pipeline network data is intelligently inferred to generate an analysis report. Step S300 includes the following steps: S301. Based on the abnormal event, generate a query object containing metadata and abnormal data, including: The abnormal data corresponding to the description of the abnormal event is compared with the historical data of the same period to quantify the degree of abnormality and statistical significance. The abnormal event is encapsulated in a structured manner to generate a query object containing metadata and abnormal data; S302. Constructing a multimodal evidence chain based on a hybrid query, semantic retrieval, and cross-attention re-ranking model, including: Based on the metadata contained in the query object, keyword and metadata filtering is performed in the multimodal vector database to obtain a filtered subset of data; Obtain the query vector corresponding to the query object, and perform semantic retrieval on the filtered data subset based on the cosine similarity method to obtain one or more candidate data; The relevance score between each candidate data and the query object is calculated based on the cross-attention reordering model, and a multimodal evidence chain is constructed by selecting a preset number of candidate data according to the relevance score order. S303. Construct prompt words based on the description of the abnormal event and the multimodal evidence chain, and input the prompt words into a large language model that has been fine-tuned by professional knowledge instructions in the gas field; S304. After logical association through the large language model fine-tuned by the professional knowledge instructions in the gas field, an analysis report containing root cause inferences and maintenance suggestions is generated. S400: Based on the analysis report, automatically generate structured maintenance instructions and interface with the operation and maintenance system to form a feedback loop.

2. The gas pipeline maintenance method based on a large language model as described in claim 1, characterized in that, Step S101 involves imputing missing values ​​in the time series data and standardizing the time series data, including the following steps: Linear interpolation is used to fill in time-series data containing gas pipeline temperature. Time series data containing gas pipeline flow are populated based on spline interpolation or ARIMA model predictions from preceding and following data points. The time series data is standardized using the minimum-maximum normalization method, and each dimension of the data is linearly mapped to the [0,1] interval.

3. The gas pipeline maintenance method based on a large language model according to claim 1, characterized in that, Step S200 includes the following steps: S201. Based on multi-source heterogeneous data, a corresponding deep learning encoder is constructed; wherein, the deep learning encoder includes a time-series encoder, a text encoder, and an image encoder; the time-series encoder is constructed based on a time-series converter model with a self-attention mechanism, used to convert multivariate data slices within a fixed time window into vectors representing the dynamic operation mode of the gas pipeline network; the text encoder is based on... The architecture, fine-tuned using a corpus from the gas industry, is used to convert input text into a dense vector of fixed dimensions; the image encoder, built based on a visual converter model, is used to convert input pipeline images into high-dimensional feature vectors. S202. Cross-modal semantic alignment training based on contrastive learning; that is, after constructing the deep learning encoder, the three independent encoders of time sequence, text and image learn to describe the same event in the same language; S203. Construct and deploy a unified multimodal vector database; that is, all historical and real-time accessed standardized multi-source heterogeneous data are subjected to forward reasoning through their corresponding trained deep learning encoders to generate corresponding semantic vectors, and the semantic vectors, together with their metadata, are uniformly stored in a multimodal vector database specifically designed for efficient similarity retrieval.

4. The gas pipeline maintenance method based on a large language model according to claim 3, characterized in that, In the contrastive learning, using The loss function optimizes the training objective, the The mathematical expression for the loss function is as follows: Mode middle: It is the vector of the anchor point sample; It is the corresponding positive sample vector; It is the first A vector of negative samples; This represents the calculation of cosine similarity between vectors, and its range is... It is a temperature hyperparameter.

5. The gas pipeline maintenance method based on a large language model according to claim 1, characterized in that, The S400 includes the following steps: S401. Based on a predefined structure, generate a standardized JSON work order from the analysis report, including: Construct a predefined structure that includes urgency, location, fault inference, and maintenance recommendations; Based on the predefined structure and the analysis report, a standardized JSON work order is generated using a large language model fine-tuned with professional knowledge instructions in the gas field. The JSON work order includes structured maintenance instructions. S402. Push the JSON work order to the operation and maintenance system through the API interface, so that the operation and maintenance system can automatically create and dispatch maintenance tasks according to the structured maintenance instructions contained in the JSON work order; S403. Receive the maintenance report, form a closed-loop feedback, and update the large language model based on supervised fine-tuning data; that is, re-collect the maintenance report completed on-site as new text data, and use iteratively update the multimodal vector database and the large language model fine-tuned by gas field professional knowledge instructions to form a data-driven closed-loop optimization; wherein, the large language model fine-tuned by gas field professional knowledge instructions is iteratively updated based on the abnormal description of the abnormal event, selecting a preset number of candidate data according to the correlation score order, the analysis report, and the JSON work order.

6. A gas pipeline maintenance system based on a large language model, comprising the gas pipeline maintenance method based on a large language model as described in any one of claims 1-5; characterized in that, include: The data fusion module is used to acquire multi-source heterogeneous data corresponding to the gas pipeline network, and to standardize the multi-source heterogeneous data, as well as to perform vectorized encoding and fusion on the standardized multi-source heterogeneous data to construct a unified multimodal vector database. The reasoning module is used to initiate queries to a large language model that has been fine-tuned with professional knowledge instructions in the gas field when abnormalities are detected in gas pipeline network data. It performs intelligent reasoning on the root causes of the detected abnormalities in gas pipeline network data and generates an analysis report. The workflow generation module is used to automatically generate structured maintenance instructions based on the analysis report and interface with the operation and maintenance system to form a feedback loop.

7. The gas pipeline maintenance system based on a large language model according to claim 6, characterized in that, The multi-source heterogeneous data includes time-series data, text data, and image data. The time-series data includes pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude, and sound signal data of the gas pipeline network. The text data includes maintenance records and geological reports of the gas pipeline network. The image data includes pipeline network images taken by drones during inspections. Specifically, when the data fusion module acquires multi-source heterogeneous data corresponding to the gas pipeline network and performs standardization processing on the multi-source heterogeneous data, it specifically collects time-series data including pressure, flow rate, temperature, gas concentration, vibration frequency and amplitude, and sound signals of the gas pipeline network in real time through an IoT gateway, and performs data cleaning and time alignment on the time-series data; and specifically acquires text data including maintenance records and geological reports of the gas pipeline network through an application programming interface or optical character recognition technology, and extracts predefined key entities from the text data using a named entity recognition model.

8. An electronic device, comprising at least one processor and a memory communicatively connected to said at least one processor; characterized in that, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the gas pipeline maintenance method based on a large language model as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Gas pipeline monitoring system and method based on artificial intelligence mixed large model

    CN117523177A

  • Method for generating and constructing database test knowledge base based on open source large language model and retrieval enhancement

    CN120338073A