A city gas pipe network failure and gas supply prediction analysis method, system, terminal and medium

By abstracting pipe segments and valves in the gas pipeline network into "pipe sections" and combining large language models and deep learning, rapid failure analysis and gas supply prediction for urban gas pipeline networks are realized. This solves the problems of low computational efficiency, insufficient accuracy and safety hazards in existing technologies, and improves operational efficiency and data security.

CN122365047APending Publication Date: 2026-07-10SHENZHEN GAS CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN GAS CORP
Filing Date
2026-03-30
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In the current operation and management of gas pipeline networks, the efficiency of pipeline network analysis and calculation is low, which cannot meet the requirements of real-time performance, the accuracy of gas consumption prediction is insufficient, the adaptability to different scenarios is lacking, and there are risks of data security and privacy leakage.

Method used

By adopting the concept of "pipe section", pipe segments and valves are abstracted into specific data structure nodes to construct a pipeline network relationship diagram. A large language model is used to update the local graph. Combined with GIS data and logical rules, incremental calculation and data security localized deployment are realized, and deep learning prediction models are dynamically called for accurate prediction.

Benefits of technology

It enables rapid pipeline failure analysis and gas supply prediction, meets the real-time requirements of emergency command, improves data accuracy and operational efficiency, eliminates the risk of data leakage, and reduces computational complexity and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365047A_ABST
    Figure CN122365047A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, terminal, and medium for predicting and analyzing urban gas pipeline network failures and gas supply. The invention proposes the concept of a pipe segment, abstracting and aggregating pipe sections, fittings, and valves in the gas pipeline network into specific data structure nodes to construct a pipeline network relationship graph. When pipeline network data changes or failure simulations are performed, a local graph update strategy based on a large language model is adopted. Utilizing the semantic understanding of the graph node attributes and connection relationships of the large model, incremental calculations or corrections are performed only on affected local nodes and edges, rather than reconstructing the entire graph. Simultaneously, combining GIS data and logical rules, algorithms are used to automatically clean and correct abnormal data regarding valve opening / closing logic and gas-carrying status of pipe sections. This effectively solves the problem of excessively long calculation times for full-scale calculations of pipeline networks with millions of nodes. It enables rapid completion of valve closure analysis, single-pipe gas supply determination, and failure impact range assessment even with frequent pipeline network updates, meeting the real-time requirements of emergency command.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline failure analysis technology, and in particular to a method, system, terminal and medium for predicting and analyzing urban gas pipeline failures and gas supply. Background Technology

[0002] With the acceleration of urbanization, the scale of urban gas pipeline network construction is expanding daily, and the network structure is becoming increasingly complex. As a crucial component of the urban lifeline, the safety and stability of gas pipeline operation directly impact public safety and residents' daily lives. The operation and management of gas pipeline networks primarily face two core challenges: (1) Pipeline failure analysis and emergency response: Gas pipelines consist of a large number of pipe sections, valves, fittings and other components, and are dynamically updated every day. When pipeline components fail or maintenance work is carried out, it is necessary to quickly and accurately identify the affected areas, determine the valves that need to be closed, and analyze the affected users in order to ensure the safe operation of the pipeline network.

[0003] (2) Gas supply forecasting: In order to achieve reasonable scheduling and allocation of gas resources, it is necessary to accurately forecast the gas demand of different areas (such as urban villages, industrial zones, residential areas, etc.) at different time spans. This requires comprehensive consideration of multi-dimensional characteristics such as historical gas consumption data, weather changes, holiday effects, and population flow.

[0004] The current operation and management of gas pipeline networks mainly suffers from problems such as low efficiency in pipeline network analysis and calculation, inability to meet real-time requirements, insufficient accuracy in gas consumption forecasting, lack of adaptability to different scenarios, and risks of data security and privacy leaks.

[0005] Therefore, existing technologies still have shortcomings. Summary of the Invention

[0006] To address the aforementioned deficiencies in existing technologies, this invention provides a method, system, terminal, and medium for predicting and analyzing urban gas pipeline network failures and gas supply security. The technical solution adopted by this invention is as follows: In a first aspect, the present invention provides a method for predicting and analyzing urban gas pipeline network failures and gas supply security, the method comprising: A method for predicting and analyzing urban gas pipeline network failures and gas supply security, characterized in that the method includes: Acquire basic geographic information system data of gas pipeline network, identify all valves, and define the sets of pipe segments and fittings connected between valves as pipe sections, and construct a pipeline network relationship diagram based on the pipe sections and valves; When a pipeline component change instruction is received, the change area is located and the change data is determined. The change data is processed using a trained large language model to intelligently generate the updated local pipe section structure. Based on the updated local pipe segment structure, only nodes are added or deleted or connection relationships are modified in the changed area in the pipeline relationship diagram to obtain the updated pipeline relationship diagram. Based on the updated relationship diagram, perform tasks to determine the single-pipe gas supply status or search for the impact range of valve closure, thereby realizing pipeline failure analysis.

[0007] In one implementation, based on the updated local pipe segment structure, only nodes in the changed areas are added, deleted, or their connections are modified in the pipe network diagram to obtain the updated pipe network diagram, including: For shortest path or connectivity analysis, an incremental calculation algorithm is used to recalculate only the subgraph portion of the pipeline relationship diagram affected by the change, determine the changed area, and add or delete nodes or modify the connection relationship in the changed area to obtain the updated pipeline relationship diagram.

[0008] In one implementation, based on the updated pipeline network diagram, a single-pipe gas supply status determination task or a valve closure impact range search task is performed to achieve pipeline network failure analysis, including: All pipe sections in the pipeline network diagram are checked by traversal. If a pipe section is connected to only one valve, then the pipe section is determined to be in a single-pipe gas supply state; If a pipe section is connected to multiple valves, the breadth-first search algorithm is used to locate the gas source valve that can be connected to the central pipeline network. If the number of gas source valves is 1, the pipe section is determined to be in a single-pipe gas supply state. Based on the number of users associated with each pipe section, the risk of identified single-pipe gas supply status pipe sections is classified and warned.

[0009] In one implementation, based on the updated pipeline network diagram, a single-pipe gas supply status determination task or a valve closure impact range search task is performed to achieve pipeline network failure analysis. This also includes: If a pipe section fails, all valves connected to the failed pipe section will be closed, and all users within that pipe section will be affected. If a valve fails, all valves in the two pipe sections connected to the failed valve will be closed, and the number of users affected will be the sum of the number of users in the two pipe sections.

[0010] In one implementation, based on the updated pipeline network diagram, a single-pipe gas supply status determination task or a valve closure impact range search task is performed to achieve pipeline network failure analysis. This also includes: Based on the pipeline network diagram, detection is carried out, and non-end-of-line closure detection is performed. The non-end-of-line closure detection includes: traversing all valves marked as closed, checking the pipe sections connected downstream, and if the pipe section is not a blind end and the current state of the pipe section is air-filled, it is determined that the closed state of the valve has a logical contradiction and is marked as abnormal. Perform a gas-carrying consistency test, which includes: checking whether the gas-carrying attributes of all pipe sections within each pipe section are consistent, and cross-validating the results by combining the readings of the smart gas meters of the users associated with the pipe section. If some pipe sections within a certain pipe section show gas and some do not, it is determined to be abnormal. If a pipe section is marked as having no gas, but its associated users have recent flow records, then the state of the pipe section is determined to be abnormal. After the test is completed, a detailed list of anomalies is output, and suggested correction values ​​are provided for each anomaly.

[0011] In one implementation, the method further includes: Upon receiving a prediction task request, the system analyzes the required time granularity and total prediction duration, and classifies the prediction task into short-term or long-term predictions based on a preset duration threshold. The area to be predicted is decomposed into grids to form multiple evaluation units. All grids are classified and labeled according to the regional attributes of each individual evaluation unit. Based on the grid classification and the type of prediction task, the deep learning prediction model is dynamically invoked. Data is input into the selected deep learning prediction model for training and prediction, and the prediction results of all grids are summarized to form a complete regional prediction report.

[0012] In one implementation, a deep learning prediction model is dynamically invoked based on the grid's classification identifier and the type of prediction task, including: For regions with short-term forecasting tasks and stable gas consumption patterns, a multi-period convolutional model is invoked. For short-term forecasting tasks but non-stationary regions with drastic fluctuations in gas consumption, the non-stationary Transformer model is invoked. For long-term prediction tasks, the frequency domain decomposition model is invoked.

[0013] Secondly, embodiments of the present invention also provide a predictive analysis system for urban gas pipeline network failure and gas supply security, the system comprising: The data acquisition module is used to acquire basic geographic information system data of gas pipeline network, identify all valves, define the sets of pipe segments and fittings connected between valves as pipe sections, and construct a pipeline network relationship diagram based on the pipe sections and valves; The change data analysis module is used to locate the change area and determine the change data when a pipeline component change instruction is received. It then uses a trained large language model to process the change data and intelligently generate the updated local pipe section structure. The pipeline network diagram update module is used to add or delete nodes or modify connection relationships in the changed areas of the pipeline network diagram based on the updated local pipe section structure, so as to obtain the updated pipeline network diagram. The pipeline failure analysis module is used to perform single-pipe gas supply status determination tasks or valve closure impact range search tasks based on the updated relationship diagram, thereby realizing pipeline failure analysis. The prediction task determination module is used to analyze the time granularity and total prediction duration required for prediction after receiving a prediction task request, and divide the prediction task into short-term prediction or long-term prediction based on a preset duration threshold. The grid classification module is used to decompose the area to be predicted into grids, forming multiple evaluation units, and classifying and labeling all grids according to the regional attributes of each individual evaluation unit. The predictive analysis module is used to dynamically call deep learning prediction models based on the grid classification and prediction type, input data into the selected deep learning prediction model for training and prediction, and summarize the prediction results of all grids to form a complete regional prediction report.

[0014] Thirdly, embodiments of the present invention also provide a terminal, wherein the terminal includes a memory, a processor, and a city gas pipeline failure and gas supply guarantee prediction and analysis program stored in the memory and executable on the processor. When the processor executes the city gas pipeline failure and gas supply guarantee prediction and analysis program, it implements the steps of the city gas pipeline failure and gas supply guarantee prediction and analysis method of any of the above-mentioned schemes.

[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a program for predicting and analyzing urban gas pipeline failures and gas supply, the program for predicting and analyzing urban gas pipeline failures and gas supply implementing the steps of the method for predicting and analyzing urban gas pipeline failures and gas supply as described in any of the above schemes on the computer-readable storage medium.

[0016] Beneficial Effects: Compared with existing technologies, this invention provides a method for predicting and analyzing urban gas pipeline network failures and gas supply security. First, it acquires basic geographic information system data of the gas pipeline network, identifies all valves, and defines the sets of pipe segments and fittings connected between valves as pipe sections. Based on these pipe sections and valves, a pipeline network relationship diagram is constructed. Next, when a pipeline component change instruction is received, the change area is located and the change data is determined. A trained large language model is used to process the change data, intelligently generating an updated local pipe section structure. Then, based on the updated local pipe section structure, only nodes in the change area are added, deleted, or their connections are modified in the pipeline network relationship diagram to obtain an updated pipeline network relationship diagram. Finally, based on the updated relationship diagram, a single-pipe gas supply status determination task or a valve closure impact range search task is performed to achieve pipeline network failure analysis.

[0017] This invention effectively solves the problem of excessively long calculation times for full-scale calculations of pipeline networks with millions of nodes by employing a "pipeline segment" aggregation and "partial update" strategy. This enables the system to quickly complete valve closure analysis, single-pipe gas supply determination, and failure impact range assessment even with frequent pipeline network updates, meeting the real-time requirements of emergency command. Through a localized large-scale model deployment scheme, this invention leverages artificial intelligence to enhance data processing and logical reasoning capabilities while completely eliminating the risk of leakage of gas pipeline network topology data, user privacy, and trade secrets to third-party cloud platforms. This invention possesses the ability to automatically identify conflicts between "pipeline segment gas-carrying status" and "valve switching logic," and can automatically detect and assist in cleaning erroneous data in the GIS system, improving the accuracy of basic data and the efficiency of pipeline network operation and maintenance. Attached Figure Description

[0018] Figure 1 This is a flowchart of a preferred embodiment of the urban gas pipeline network failure and gas supply prediction and analysis method according to an embodiment of the present invention.

[0019] Figure 2 This is a diagram of a single-valve, single-pipe gas supply section in the urban gas pipeline failure and gas supply guarantee prediction analysis method of this invention.

[0020] Figure 3 This is a diagram of a multi-valve single-pipe gas supply section in the urban gas pipeline failure and gas supply guarantee prediction analysis method of this invention.

[0021] Figure 4 This is a diagram illustrating the relationship between urban gas pipeline network failure and gas supply guarantee prediction analysis in an embodiment of the present invention.

[0022] Figure 5 This is a flowchart illustrating the overall process of gas supply guarantee in the urban gas pipeline failure and gas supply guarantee prediction and analysis method of this invention.

[0023] Figure 6This is a schematic diagram of the urban gas pipeline failure and gas supply prediction and analysis system according to an embodiment of the present invention.

[0024] Figure 7 A schematic diagram of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0026] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content, operations, or steps, nor does it require execution in the described order. For example, some operations or steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0027] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0028] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. For example, "first control information" and "second control information" are only used to distinguish different control information and do not limit their order.

[0029] Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or the order of execution, and that the words "first" and "second" do not necessarily imply that they are different.

[0030] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0031] Current gas pipeline management systems are typically built on GIS, abstracting pipe fittings, pipes, and valves in the network as nodes and edges in a network graph. When hydraulic calculations, connectivity analyses, or valve closure analyses are required, the system usually employs graph-based traversal algorithms. When pipeline data changes, the system often needs to rebuild or fully update the entire network topology. Furthermore, existing gas load forecasting methods mainly rely on statistical models or traditional machine learning models. The common practice is to forecast the gas consumption of the entire city as a whole, or to use a single model structure to handle all types of regional forecasting tasks. The forecasting process is often based on simple linear extrapolation from historical meter reading data. In addition, with the development of artificial intelligence technology, general-purpose large-scale models are beginning to be used to assist data processing and logical reasoning. Currently, most general-purpose large-scale models are deployed in the cloud, where users interact by uploading documents or data to obtain information extraction or content generation services.

[0032] Due to the massive scale of urban gas pipeline networks, and the fact that network topology is updated daily, current technologies typically employ full computation or complete graph reconstruction when dealing with pipeline network updates. This results in excessive computation time and high resource consumption. Excessive computation time: For a network of 6.22 million pipe components, calculating each component individually or reconstructing the entire graph for each update is currently impossible to complete within the allotted time, leading to slow system response and failing to meet the needs of emergency response and real-time dispatch. High resource consumption: Full updates are not only time-consuming but also consume significant server computing resources and memory, resulting in extremely low efficiency.

[0033] Existing single-model forecasting methods struggle to handle complex business scenarios and fail to differentiate modeling for different regional types. For example, traditional stationary time series models cannot accurately capture the non-stationary data characteristics of urban villages caused by large population flows and complex environments. The same model often cannot simultaneously meet the needs of short-term (hourly) high-frequency fluctuation forecasting and long-term (monthly / gradely) trend forecasting. Furthermore, it struggles to effectively integrate external dynamic features such as sudden temperature changes, extreme weather, and population flows during holidays, leading to larger forecasting errors during specific periods.

[0034] When attempting to introduce large-scale model optimization processes, existing cloud-based general-purpose large-scale model services present security vulnerabilities. Gas pipeline network data involves information on critical urban infrastructure, user privacy, and trade secrets. Uploading this sensitive data to third-party cloud servers for processing carries the risk of illegal data collection, cache leaks, or exposure to third parties due to its use in training general-purpose models, which does not meet the data security requirements for critical infrastructure.

[0035] Based on the technical problems existing in the current technology, this embodiment provides a method for predicting and analyzing urban gas pipeline network failures and gas supply security. This method can be applied to a terminal, which can be a computer or other intelligent product terminal. Specifically, as shown... Figure 1 As shown, the method includes: Step S100: Obtain basic geographic information system data of gas pipeline network, identify all valves, and define the set of pipe segments and fittings connected between valves as pipe sections, and construct a pipeline network relationship diagram based on the pipe sections and valves; Step S200: When a pipeline component change instruction is received, the change area is located and the change data is determined. The change data is processed using a trained large language model to intelligently generate the updated local pipe section structure. Step S300: Based on the updated local pipe section structure, only nodes in the changed areas are added or deleted or connection relationships are modified in the pipe network relationship diagram to obtain the updated pipe network relationship diagram; Step S400: Based on the updated relationship diagram, perform a single-pipe gas supply status determination task or a valve closure impact range search task to realize pipeline failure analysis. Step S500: After receiving the prediction task request, parse the time granularity and total prediction duration required for the prediction, and divide the prediction task into short-term prediction or long-term prediction according to the preset duration threshold. Step S600: Decompose the region to be predicted into a grid to form multiple evaluation units. Classify and label all grids according to the regional attributes of each evaluation unit. Step S700: Based on the grid classification and the type of prediction task, dynamically call the deep learning prediction model, input the data into the selected deep learning prediction model for training and prediction, and summarize the prediction results of all grids to form a complete regional prediction report.

[0036] This invention innovatively proposes the concept of "pipe segment," abstracting and aggregating pipe sections, fittings, and valves in a gas pipeline network into specific data structure nodes to construct a pipeline network relationship graph. When pipeline network data changes or failure simulations are performed, a local graph update strategy based on a large language model is adopted. Leveraging the large model's semantic understanding of graph node attributes and connectivity, incremental calculations or corrections are performed only on affected local nodes and edges, rather than reconstructing the entire graph. Simultaneously, by combining GIS (Geographic Information System) data and logical rules, algorithms are used to automatically clean and correct abnormal data regarding valve opening / closing logic and the gas-carrying status of pipe sections.

[0037] This invention defines a pipe section as an aggregate of all pipe segments and fittings between two valves. That is, a pipe section contains several connected pipes and fittings, but its boundaries are controlled by valves. Valves are considered nodes connecting pipe sections. In practical applications, when the pipe network data in the GIS system is updated, the system locates the geographical location where the change occurred. Then, the original changed data is input into a locally deployed, pre-trained large language model. Based on the pipe network construction rules learned during training, the model intelligently generates the updated local pipe section structure. This embodiment can insert only the newly generated pipe section nodes and connecting edges into the original pipe network diagram, without affecting other unrelated nodes, and only updating the attribute values ​​of specific pipe sections. In practical applications, for shortest path or connectivity analysis, an incremental calculation algorithm is used to recalculate only the subgraph portion of the pipe network diagram affected by the change, determine the changed area, and modify the nodes or connections in the changed area to obtain the updated pipe network diagram. This embodiment uses a DeepSeek distilled version of the open-source large model for private local deployment, cutting off the connection with the public network, ensuring that confidential data such as network topology and user information are not uploaded to the cloud, and resolving the risk of data leakage.

[0038] Combination Figure 2 and Figure 3 As shown in the diagram, in performing the task of determining the single-pipe gas supply status, this embodiment uses a traversal approach to check all pipe sections in the pipeline network diagram. If a pipe section is connected to only one valve, then that pipe section is determined to be in a single-pipe gas supply status, such as... Figure 2 The diagram shows a single-valve, single-pipe gas supply section. If a section connects to multiple valves, a breadth-first search algorithm is used to locate the gas source valve that connects to the central gas network. If the number of gas source valves is one, the section is classified as a single-pipe gas supply section. Figure 3 The diagram shows a multi-valve single-pipe gas supply pipeline section. Based on the number of users associated with each pipeline section, risk levels are categorized and warnings are issued for identified single-pipe gas supply sections.

[0039] Combination Figure 4As shown, when performing the task of searching the scope of valve closure impact, if a pipe section fails, all valves connected to the failed pipe section are closed, and the affected users are all users within that pipe section; if a valve fails, all valves involved in the two pipe sections connected to the failed valve are closed, and the affected users are the sum of the number of users in the two pipe sections. Furthermore, this embodiment can also perform detection based on the pipeline network diagram, executing non-end-of-pipe closure detection. This non-end-of-pipe closure detection includes: traversing all valves marked as closed, checking the pipe sections connected downstream; if the pipe section is not a blind end and its current state is air-filled, then the valve's closed state is determined to have a logical contradiction and is marked as abnormal. Next, this embodiment can also perform air-filled state consistency detection; all pipe segments (segments 1, 2, 3...) within a pipe section should have the same air-filled state. The gas-carrying consistency detection in this embodiment includes: checking whether the gas-carrying attributes of all pipe segments (segment 1, 2, 3...) within each pipe section are consistent, and performing cross-validation based on the smart gas meter readings of the users associated with that pipe section. If some pipe segments within a certain pipe section show gas and others do not, it is determined to be abnormal. If a pipe section is marked as having no gas, but its associated users have recent flow records, then the state of that pipe section is determined to be abnormal. If valve closure analysis shows that a valve closure caused downstream gas interruption, but the downstream pipe section still shows gas carrying, a detailed list of anomalies is output after all detections are completed, and suggested correction values ​​are provided for each anomaly.

[0040] This invention proposes the concept of "pipe section", which aggregates all connecting pipes and pipes between two control valves into a single logical node (pipe section), significantly reducing computational complexity and enabling second-level valve closure analysis and hydraulic calculations in large-scale pipe networks.

[0041] This invention employs a local update strategy, performing incremental calculations only on the subgraphs affected by the changes. It introduces a locally deployed large language model, leveraging its semantic understanding capabilities. Inputting the original change data, the large model infers and generates a logically consistent new "pipeline section" structure, which is then inserted into the original graph. This solves the real-time issue while avoiding the complexity of hard-coding rules and ensuring data security by remaining on-network. Based on the joint analysis of "pipeline section" connectivity and user meter reading data, this invention automatically identifies "non-terminal closure" anomalies and "inconsistent gas supply status within pipeline sections" anomalies, achieving automated logical verification and cleaning of maintenance data.

[0042] Furthermore, in other implementations, this embodiment determines pipe segment boundaries based on the aggregation of control elements: not limited to valves, but also including key equipment such as pressure regulators, flow meters, and filters as boundary nodes of the pipe segments. Alternatively, it uses aggregation based on geographic grids: not entirely relying on topological connections, but aggregating all small pipe components within the same geographic grid into a super node, with pipes at the grid edges serving as connecting edges. Or, it uses aggregation based on risk levels: high-risk areas are independently divided into pipe segments, while low-risk long straight pipe sections are merged over a larger area.

[0043] This embodiment can also use pipe sections as edges and valves or intersections as nodes when constructing the pipeline network diagram. This mathematical dual transformation can achieve the same computational effect, but with a completely reversed graph structure. Alternatively, a two-layer graph structure can be constructed, consisting of a "physical layer" and a "logical layer." The physical layer retains all pipe details, while the logical layer only retains the aggregated pipe sections. During calculation, a coarse selection is performed in the logical layer before mapping back to the physical layer.

[0044] This embodiment can also construct knowledge graph reasoning: instead of directly using LLM to generate the structure, it first builds a gas pipeline network ontology knowledge base, and then uses the knowledge graph reasoning engine to deduce the connection relationships in the changed pipeline network relationship diagram. Alternatively, it uses a rule engine + small model, employing a traditional expert system rule base combined with a lightweight BERT model for semantic extraction, and then generates the topology structure through hard-coded rules. This embodiment is not limited to text data input; CAD drawings or scanned images can be directly input, and a large visual model is used to identify pipeline network changes and update the pipeline network relationship diagram.

[0045] When determining valve / pipeline section anomalies, this embodiment can be based on physical simulation verification: it does not rely entirely on graph theory logic, but runs a real-time fluid simulation model. If the pressure value calculated by the simulation does not match the pressure value at the SCADA monitoring point, the valve anomaly is deduced in reverse. Alternatively, it can be based on direct verification using IoT signals: if the system includes smart valves, the differences between the "control command" and the "feedback signal" are directly compared, and multi-source voting verification is performed in conjunction with downstream flow meter readings.

[0046] Furthermore, combined Figure 5 As shown in the illustration, after receiving a prediction task request, this embodiment analyzes the required time granularity and total prediction duration. Based on a preset duration threshold, it divides the prediction task into short-term or long-term predictions. Then, it performs gridded decomposition on the region to be predicted (i.e., Figure 5 Large-area decomposition), forming multiple evaluation units (i.e. Figure 5The system classifies and identifies all grids based on the regional attributes of each individual evaluation element. For example, a large administrative region can be decomposed into smaller grid regions. Based on regional attributes, the grids are classified as: urban villages, residential areas, industrial areas, and commercial areas. Then, this embodiment can dynamically call a deep learning prediction model (such as...) based on the grid classification and the type of prediction task. Figure 5 Specifically, for short-term forecasting tasks and regions with stable gas consumption patterns, a multi-period convolutional model (TimesNet) is used. For short-term forecasting tasks but non-stationary regions / high-fluctuation data with drastic gas consumption fluctuations (such as urban villages or regions heavily affected by weather), a non-stationary Transformer model (introducing a non-stationary feature extraction module to dynamically adjust the sequence distribution) is used. For long-term forecasting tasks, a frequency domain decomposition model, such as PatchTST or FEDformer, is used to capture global trends and seasonality.

[0047] As can be seen, this invention constructs a "model selector" that automatically matches models based on two dimensions: Time dimension: automatically determining short-term or long-term; Regional characteristic dimension: distinguishing between stationary sequences (residential communities) and non-stationary sequences (urban villages). For non-stationary sequences, a Non-stationary Transformer is used for dynamic distribution adjustment, significantly improving the accuracy of gas load prediction in complex urban environments (especially in mixed scenarios of urban villages and regular residential communities).

[0048] This embodiment inputs data into a selected deep learning prediction model for training and prediction, and summarizes the prediction results of all grids to form a complete regional prediction report. In practical applications, this embodiment can integrate internal and external features and perform data feature filtering. Internal features are historical gas consumption sequences, while external features are weather, calendar, and population. Weather includes: temperature, humidity, wind speed (standardized continuous variables), and extreme weather (0 / 1 coding). Calendar includes: holidays, weekdays, and special periods (Spring Festival travel rush). Population includes: regional population density and dynamic population flow prediction values. This embodiment can utilize feature importance assessment during model training, observing error changes (such as MAE / MSE) by deleting features one by one, eliminating invalid features, and retaining key features.

[0049] In addition, in other implementations, this embodiment can also perform delayed / batch updates: a buffer pool is set up to package all changes within a certain period of time, and multiple local areas involved are updated in parallel at once, avoiding the characteristics of real-time line-by-line updates. Alternatively, predictive updates can be performed: based on the "planned time" of the maintenance work order, a shadow map is generated in advance before the physical change occurs, and the pointer is switched directly after confirmation, instead of on-site calculation.

[0050] When selecting a deep learning prediction model, this embodiment can choose based on dynamic routing of data features: instead of explicitly defining "urban villages" or "residential communities," it calculates the statistical features of the input data in real time. If the data fluctuates greatly, it automatically routes to a Non-stationary Transformer; if the data is stable, it routes to TimesNet. This approach is more fundamental and achieves the same result. Alternatively, an ensemble learning strategy can be used instead of a "either / or" model selection: instead of a simple model selection, it runs all models such as TimesNet and FEDformer simultaneously, assigning dynamic weights to each model based on historical performance, and finally outputting a weighted average. Another approach is to fine-tune a single general-purpose large model: instead of using multiple specialized small models, it trains a giant basic model for the gas industry, using different prompts to distinguish between short-term and long-term prediction tasks. During prediction, this embodiment can also use "mobile phone signaling data" or "traffic congestion index" to directly replace "population flow prediction"; and use "photovoltaic power generation" or "feeling temperature" to replace simple temperature data.

[0051] Traditional gas digital twin systems often prioritize high-fidelity 3D visuals, resulting in overly complex models that hinder real-time hydraulic simulations and topology analysis. The "pipe segment" model proposed in this invention is essentially a "logically lightweight digital twin." Instead of focusing on visual pipe textures, it prioritizes the extreme simplification of topological logic. This approach allows the system to run on ordinary local servers and even edge computing nodes, significantly reducing the hardware costs for gas companies deploying high-performance computing clusters. This reflects a modeling philosophy centered on computational efficiency.

[0052] Existing GIS systems are often static asset databases, whose data frequently becomes outdated and erroneous due to delays in manual entry. This invention, however, is not merely an analysis tool, but a "data quality governance tool." Through "non-end-of-pipe closure analysis" and "gas-on-line consistency verification," the system effectively uses algorithms to reverse-engineer the quality of GIS data. The inventors emphasize this function: the system can automatically generate a "list of suspected erroneous data" to guide inspection personnel to verify data on-site. This transforms gas pipeline network data maintenance from "repairing data only after faults are discovered" to "proactively scanning and cleaning data," significantly improving the accuracy of basic data.

[0053] Currently, the industry's acceptance of AI is low, mainly due to its lack of interpretability. While this invention introduces a large model, it doesn't allow the model to directly control the valves; instead, it acts as a "translator" and "logical reasoning assistant." The large model's role is to "translate" complex raw change data into a standard graph structure; its function is to assist in generating analysis reports. This "human-machine loop" design retains the final decision-making power in human hands, but significantly reduces repetitive labor by utilizing AI. The patent description should emphasize the AI's auxiliary role and the verifiability of the results.

[0054] Because urban development is dynamic and the factors influencing gas consumption are constantly changing, fixed prediction model parameters quickly become ineffective. The "feature importance assessment" mentioned in this invention is not merely a one-time step, but should be considered a continuous feedback loop. The system can periodically and automatically evaluate which external features are most effective for the current prediction, automatically eliminating ineffective features and introducing new ones. This "self-evolutionary" capability is a key advantage of this invention compared to traditional static prediction software.

[0055] GIS (Gas Network Location System) and CIS (Customer Accounting System) are typically two or more separate systems. This invention strongly links the geographic gas network with users in the commercial space through "pipe sections." This integration can solve core business pain points, such as "supply-demand discrepancy" analysis. For example, if a pipe section is a single-pipe supply and the system determines that "gas is available," but the CIS shows that all users in that area have been using "zero gas" for a long time, this may indicate gas theft or metering malfunction. This is the third major potential value of this invention, in addition to security and prediction.

[0056] Currently, the level of informatization varies significantly among gas companies of different sizes. The architecture of this invention combines a private large-scale model with a modular prediction model, inherently supporting a hardware and software integrated delivery model. It can be connected to the gas company's intranet as a standalone "black box device," requiring no major modifications to the existing GIS system; only data interfaces need to be opened. This "non-intrusive" deployment solution has significant advantages for commercial promotion.

[0057] Based on the above embodiments, the present invention also provides a predictive analysis system for urban gas pipeline network failure and gas supply security. This system is used to implement the steps of the above method embodiments, such as... Figure 6As shown, the system includes: a data acquisition module 10, a change data analysis module 20, a pipeline network relationship diagram update module 30, a pipeline network failure analysis module 40, a prediction task determination module 50, a grid classification module 60, and a prediction analysis module 70. Specifically, the data acquisition module 10 acquires basic geographic information system data of the gas pipeline network, identifies all valves, and defines the sets of pipe segments and fittings connected between valves as pipe sections, constructing a pipeline network relationship diagram based on the pipe sections and valves. The change data analysis module 20, upon receiving a pipeline component change instruction, locates the change area and determines the change data, processes the change data using a trained large language model, and intelligently generates an updated local pipe section structure. The pipeline network relationship diagram update module 30, based on the updated local pipe section structure, modifies the connection relationships or adds / deletes nodes in the change area within the pipeline network relationship diagram to obtain an updated pipeline network relationship diagram. The pipeline network failure analysis module 40, based on the updated relationship diagram, performs a single-pipe gas supply status determination task or a valve closure impact range search task to achieve pipeline network failure analysis. The prediction task determination module 50, upon receiving a prediction task request, analyzes the required time granularity and total prediction duration, and classifies the prediction task into short-term or long-term predictions based on a preset duration threshold. The grid classification module 60 decomposes the region to be predicted into grids, forming multiple evaluation units, and classifies and identifies all grids according to the regional attributes of each evaluation unit. The prediction analysis module 70 dynamically calls a deep learning prediction model based on the grid classification and prediction type, inputs data into the selected deep learning prediction model for training and prediction, and summarizes the prediction results of all grids to form a complete regional prediction report.

[0058] The principles of each module in this embodiment of the urban gas pipeline failure and gas supply prediction analysis system are the same as those of each step in the above method embodiment, and will not be elaborated further here.

[0059] This invention also provides a gas pipeline network intelligent management system integrating a private large-scale model. The data layer serves as the foundation, responsible for storing and managing three types of core data: pipeline geographic information data, customer information system data, and various external feature data. The large-scale model inference layer deploys a distillation-optimized private large-scale language model. Its core functions include: intelligently transforming raw pipeline data into structured pipe segment topology relationships, and assisting in the logical reasoning for graph updates when pipeline changes occur. The computing engine layer contains two core computing components: a graph computing engine and a deep learning prediction engine. The graph computing engine is dedicated to performing pipeline failure impact analysis; the deep learning prediction engine undertakes load prediction tasks in supply assurance scenarios. The business application layer serves as a user-facing interactive portal, providing an integrated visual operation interface for functions such as valve closure analysis, single-pipe gas supply identification, and load prediction.

[0060] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 7 As shown. The terminal may include one or more processors 100 ( Figure 7 (Only one is shown in the image), memory 101, and computer program 102 stored in memory 101 and executable on one or more processors 100. For example, a city gas pipeline network failure and gas supply guarantee prediction analysis program. When one or more processors 100 execute computer program 102, they can implement the various steps in the city gas pipeline network failure and gas supply guarantee prediction analysis method embodiment. Alternatively, when one or more processors 100 execute computer program 102, they can implement the functions of various modules / units in the city gas pipeline network failure and gas supply guarantee prediction analysis system embodiment, which is not limited here.

[0061] In one embodiment, the processor 100 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0062] In one embodiment, memory 101 can be an internal storage unit of the terminal, such as a hard disk or RAM. Memory 101 can also be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SM), secure digital card (SD), flash card, etc. Furthermore, memory 101 can include both internal and external storage units. Memory 101 is used to store computer programs and other programs and data required by the terminal. Memory 101 can also be used to temporarily store data that has been output or will be output.

[0063] Those skilled in the art will understand that Figure 7 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0064] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), direct memory bus RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting and analyzing urban gas pipeline network failures and gas supply security, characterized in that, The method includes: Acquire basic geographic information system data of gas pipeline network, identify all valves, and define the sets of pipe segments and fittings connected between valves as pipe sections, and construct a pipeline network relationship diagram based on the pipe sections and valves; When a pipeline component change instruction is received, the change area is located and the change data is determined. The change data is processed using a trained large language model to intelligently generate the updated local pipe section structure. Based on the updated local pipe segment structure, only nodes are added or deleted or connection relationships are modified in the changed area in the pipeline relationship diagram to obtain the updated pipeline relationship diagram. Based on the updated relationship diagram, perform tasks to determine the single-pipe gas supply status or search for the impact range of valve closure, thereby realizing pipeline failure analysis.

2. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 1, characterized in that, Based on the updated local pipe segment structure, only nodes in the changed areas are added, deleted, or their connection relationships are modified in the pipe network diagram to obtain the updated pipe network diagram, including: For shortest path or connectivity analysis, an incremental calculation algorithm is used to recalculate only the subgraph portion of the pipeline relationship diagram affected by the change, determine the changed area, and add or delete nodes or modify the connection relationship in the changed area to obtain the updated pipeline relationship diagram.

3. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 1, characterized in that, Based on the updated pipeline network diagram, perform tasks to determine the gas supply status of a single pipeline or to search for the impact range of valve closure, thereby achieving pipeline network failure analysis, including: All pipe sections in the pipeline network diagram are checked by traversal. If a pipe section is connected to only one valve, then the pipe section is determined to be in a single-pipe gas supply state; If a pipe section is connected to multiple valves, the breadth-first search algorithm is used to locate the gas source valve that can be connected to the central pipeline network. If the number of gas source valves is 1, the pipe section is determined to be in a single-pipe gas supply state. Based on the number of users associated with each pipe section, risk levels are classified and warnings are issued for pipe sections with single-pipe gas supply status.

4. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 1, characterized in that, Based on the updated pipeline network diagram, the system performs tasks to determine the gas supply status of a single pipeline or to search for the impact range of valve closures, thus enabling pipeline network failure analysis. This also includes: If a pipe section fails, all valves connected to the failed pipe section will be closed, and all users within that pipe section will be affected. If a valve fails, all valves in the two pipe sections connected to the failed valve will be closed, and the number of users affected will be the sum of the number of users in the two pipe sections.

5. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 4, characterized in that, Based on the updated pipeline network diagram, the system performs tasks to determine the gas supply status of a single pipeline or to search for the impact range of valve closures, thus enabling pipeline network failure analysis. This also includes: Based on the pipeline network diagram, detection is carried out, and non-end-of-line closure detection is performed. The non-end-of-line closure detection includes: traversing all valves marked as closed, checking the pipe sections connected downstream, and if the pipe section is not a blind end and the current state of the pipe section is air-filled, it is determined that the closed state of the valve has a logical contradiction and is marked as abnormal. Perform a gas-carrying consistency test, which includes: checking whether the gas-carrying attributes of all pipe sections within each pipe section are consistent, and cross-validating the results by combining the readings of the smart gas meters of the users associated with the pipe section. If some pipe sections within a certain pipe section show gas and some do not, it is determined to be abnormal. If a pipe section is marked as having no gas, but its associated users have recent flow records, then the state of the pipe section is determined to be abnormal. After the test is completed, a detailed list of anomalies is output, and suggested correction values ​​are provided for each anomaly.

6. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 1, characterized in that, The method further includes: Upon receiving a prediction task request, the system parses the required time granularity and total prediction duration, and classifies the prediction task into short-term or long-term predictions based on a preset duration threshold. The area to be predicted is decomposed into grids to form multiple evaluation units. All grids are classified and labeled according to the regional attributes of each individual evaluation unit. Based on the grid classification and the type of prediction task, the deep learning prediction model is dynamically invoked. Data is input into the selected deep learning prediction model for training and prediction, and the prediction results of all grids are summarized to form a complete regional prediction report.

7. The method for predicting and analyzing urban gas pipeline network failures and gas supply security according to claim 6, characterized in that, Based on the grid classification identifier and the type of prediction task, the deep learning prediction model is dynamically invoked, including: For regions with short-term forecasting tasks and stable gas consumption patterns, a multi-period convolutional model is invoked. For short-term forecasting tasks but non-stationary regions with drastic fluctuations in gas consumption, the non-stationary Transformer model is invoked. For long-term prediction tasks, the frequency domain decomposition model is invoked.

8. A predictive analysis system for urban gas pipeline network failure and gas supply guarantee, characterized in that, The system includes: The data acquisition module is used to acquire basic geographic information system data of gas pipeline network, identify all valves, define the sets of pipe segments and fittings connected between valves as pipe sections, and construct a pipeline network relationship diagram based on the pipe sections and valves; The change data analysis module is used to locate the change area and determine the change data when a pipeline component change instruction is received. It then uses a trained large language model to process the change data and intelligently generate the updated local pipe section structure. The pipeline network diagram update module is used to add or delete nodes or modify connection relationships in the changed areas of the pipeline network diagram based on the updated local pipe section structure, so as to obtain the updated pipeline network diagram. The pipeline failure analysis module is used to perform single-pipe gas supply status determination tasks or valve closure impact range search tasks based on the updated relationship diagram, thereby realizing pipeline failure analysis. The prediction task determination module is used to analyze the time granularity and total prediction duration required for prediction after receiving a prediction task request, and divide the prediction task into short-term prediction or long-term prediction based on a preset duration threshold. The grid classification module is used to decompose the area to be predicted into grids, forming multiple evaluation units, and classifying and labeling all grids according to the regional attributes of each individual evaluation unit. The predictive analysis module is used to dynamically call deep learning prediction models based on the grid classification and prediction type, input data into the selected deep learning prediction model for training and prediction, and summarize the prediction results of all grids to form a complete regional prediction report.

9. A terminal, characterized in that, The terminal includes a memory, a processor, and a city gas pipeline failure and gas supply guarantee prediction and analysis program stored in the memory and executable on the processor. When the processor executes the city gas pipeline failure and gas supply guarantee prediction and analysis program, it implements the steps of the city gas pipeline failure and gas supply guarantee prediction and analysis method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for predicting and analyzing urban gas pipeline failures and gas supply, and the program implements the steps of the method for predicting and analyzing urban gas pipeline failures and gas supply as described in any one of claims 1-7 on the computer-readable storage medium.