Iterative backtracking decomposition method for single line diagram of pressure pipeline for special inspection industry

By using an iterative backtracking decomposition method, the topological data of pressure pipelines is converted into a linear data sequence that can be rendered by the Cocos engine. This solves the problems of disordered branch structure processing and loop processing failure in existing technologies, and achieves efficient and lossless topology graph conversion and rendering.

CN121685751AActive Publication Date: 2026-03-17吉林省特种设备检验研究院(吉林省特种设备事故调查处理服务中心) +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively convert undirected topological graphs of pressure pipelines into linear instruction chains that can be rendered by graphics engines such as Cocos. This results in disordered branch structure processing, failure in simple loop processing, waste of computing resources, and low performance, failing to meet the requirements of the special inspection industry for real-time generation and rapid response.

Method used

A single-line graph iterative backtracking decomposition method for pressure pipelines in the special inspection industry is adopted. By initializing the set of starting points, extending the chain along the path, processing branch nodes and recording backtracking anchor points, and backtracking when encountering loops, the topology graph is decomposed into linear chains and converted into a JSON format instruction set required for rendering by the Cocos engine.

Benefits of technology

It achieves efficient and lossless transformation of pressure pipeline topology, generating a set of linear paths with clear logic and low computational overhead. It is suitable for real-time digital applications in the special inspection industry, avoiding infinite loops and path errors, and meeting the high-efficiency rendering needs of the special inspection industry.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention relates to the crossing field of special equipment safety and computer graphics technology, and discloses a special inspection industry-oriented pressure pipeline single line diagram iteration backtracking decomposition method, which is a method capable of efficiently converting topological structure data of a pressure pipeline into a linear data sequence meeting a specific graphics engine rendering requirement. Comprising the steps that after undirected topological graph data is input, all nodes in the undirected topological graph data are traversed, and all the nodes with the degree equal to 1 are added into a queue named as a starting point set; a node is taken out from the starting point set queue to serve as a starting point of a chain, the starting point serves as a starting end, and a new chain is initialized and output; starting from the starting point of the current new chain obtained through initialization, selecting a neighbor node which is not accessed, adding the neighbor node to the tail of the new chain, and setting the neighbor node as a new current node; and if the new current node degree is 2, directly returning to the previous step, and continuously expanding the chain along the unique path direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of special equipment safety and computer graphics technology, specifically, a method for iterative backtracking decomposition of single-line diagrams of pressure pipelines for the special inspection industry. Background Technology

[0002] In the special equipment inspection (SIE) industry, digital management and safety assessment of pressure pipelines are among the core tasks. Inspection personnel and management systems rely heavily on "pressure pipeline single-line diagrams" (also known as isometric diagrams) for visual analysis of pipeline routes, identification of risk points, and management of inspection records.

[0003] Currently, the common practice in the industry is to extract the topological connections of pipelines from complex on-site photos or old drawings using AI image recognition or manual surveying. However, this raw topological data is mesh-like and undirected, making it impossible to render directly by modern graphics engines such as Cocos Creator. The drawing components (such as Graphics) of these engines require the use of strict unidirectional linear sequences composed of commands like moveTo and lineTo to describe graphical paths. This contradiction between data structure and rendering requirements manifests as the following technical challenges in the scenario of single-line diagrams of pressure pipelines: 1. Disorder in branch structure processing: Pressure pipeline networks commonly contain numerous branch nodes such as tees and crosses. Traditional graph traversal algorithms (such as DFS / BFS) randomly select paths when encountering these branch points, resulting in a chaotic chain of instructions that cannot form a continuous path from the main branch to the branch that conforms to human visual understanding.

[0004] 2. Failure in handling simple loops: Although complex ring networks are uncommon, the occasional simple closed loops formed by bypasses or loop segments within the inspection area are a fatal flaw of traditional traversal algorithms. The algorithm cannot determine when a loop is closed during traversal, easily getting stuck in an infinite loop or generating self-intersecting incorrect paths, resulting in the inability to correctly draw the single-line graph of that area.

[0005] 3. The contradiction between decomposition efficiency and resource consumption: To solve the above problems, some general methods may employ complex backtracking or exhaustive strategies. However, for pressure pipeline topologies that contain only a few simple loops and are mostly tree-structured, this is undoubtedly "using a sledgehammer to crack a nut." This not only leads to a significant waste of computational resources, but also fails to meet the requirements of real-time drawing generation and rapid response at the inspection site.

[0006] 4. Limitations of existing methods: Currently, there is a lack of a lightweight and efficient decomposition method specifically designed for the characteristics of single-line diagrams in pressure piping. Existing techniques are either too simplistic to handle branches and loops, or too complex to perform well, failing to achieve fast, low-overhead decomposition of common topologies while ensuring accuracy.

[0007] Currently, existing technical solutions have fundamental limitations and defects in addressing the specific problem of converting AI-identified pipeline topology diagrams in industrial scenarios into linear instruction chains that can be rendered by graphics engines such as Cocos. These limitations mainly include the following aspects: 1. Structural mismatch in general graph traversal algorithms: The industry typically uses general graph theory algorithms, such as depth-first search (DFS) or breadth-first search (BFS), to traverse graphs and generate paths. However, these general algorithms were not originally designed to solve the specific constraint of "generating a linear, branchless chain of instructions".

[0008] Defect 1: Randomness of Direction and Instruction Conflicts: When DFS / BFS traverses a cycle structure in an undirected graph, the choice of the starting point and direction is random. This leads to inconsistent path directions. When multiple cycles are nested or connected, it is very easy to generate direction conflicts that cannot be closed. The resulting instruction chain cannot be correctly drawn into a closed cycle structure in the graphics engine.

[0009] Defect 2: Inability to handle the coexistence of branches and loops: General algorithms struggle to properly handle both branch points and loop structures within a linear instruction chain. The algorithms typically generate numerous broken, isolated line segments or redundant instructions containing repetitive points, failing to meet the efficient rendering requirements of a "single continuous path."

[0010] 2. Limitations of traditional CAD or graphics software conversion methods: Some traditional computer-aided design (CAD) software or graphics tools have the ability to export graphics as vector data (such as SVG), but their conversion logic is different from the requirements of the Cocos engine.

[0011] Defect 3: Information Loss and Semantic Gap: The conversion purpose of such tools is mostly for visual presentation. Their export path is usually a canvas path based on Bézier curves, rather than a semantic instruction chain built from the original topological points and line relationships. The conversion process loses key topological information such as nodes and connection relationships, making it impossible to associate and interact with the backend business logic (such as pipe segment attributes and node types).

[0012] Defect 4: Format incompatibility: Its output format (such as Path in SVG) is not directly compatible with the explicit moveTo and lineTo instruction sequences required by the Cocos Graphics module, requiring secondary parsing and conversion, which increases the complexity of the process and the probability of errors.

[0013] 3. Lack of dedicated solutions for industrial-grade complexity: Existing sporadic research or methods mostly focus on simple graph structures, lacking consideration for the high-complexity, large-scale topology graphs commonly found in industrial pipeline systems.

[0014] Defect 5: High computational complexity and prominent performance bottleneck: When faced with complex industrial pipeline topologies containing a large number of nodes and nested rings, unoptimized algorithms (such as pure backtracking algorithms) will suffer from combinatorial explosion, degrading the computational time complexity to O(n^2). 2 Even higher, which cannot meet the needs of real-time or near-real-time applications.

[0015] Defect 6: Poor robustness: Existing methods cannot guarantee 100% lossless conversion for arbitrary topologies. When encountering complex cross loops, high-density branch nodes, or other structures, they are prone to entering infinite loops or throwing exceptions, leading to conversion failure and insufficient system robustness. Summary of the Invention

[0016] The purpose of this invention is to provide an iterative backtracking decomposition method for single-line diagrams of pressure pipelines for the special inspection industry. This method can efficiently convert the topological data of pressure pipelines into a linearized data sequence that meets the rendering requirements of specific graphics engines (such as Cocos Creator).

[0017] This invention is achieved through the following technical solution: an iterative backtracking decomposition method for single-line diagrams of pressure pipelines for the special inspection industry, comprising the following specific steps: 1) Initialize the starting point set: After inputting the undirected topology graph data of the pressure pipeline, traverse all nodes in the undirected topology graph data and add all nodes with a degree of 1 (i.e., the end or beginning of the pipeline, called "endpoint") to a queue called "starting point set"; this set serves as the starting point pool for all linear chains. 2) Select a starting point and start building a new chain: Take a node from the "starting point set" queue as the starting point of a chain, and initialize and output a new chain with this starting point as the beginning; 3) Extend the chain along the path: Starting from the beginning of the newly generated chain, select an unvisited neighbor node, add it to the end of the new chain, and set the neighbor node as the new current node; 4) Handling intermediate nodes (nodes with a degree of 2): If the new current node has a degree of 2 (i.e., the middle point of the pipeline), then return directly to step 3) and continue to extend the chain along the unique path direction; 5) Process and record branch nodes (nodes with degree ≥ 3): If the new current node has a degree ≥ 3 (i.e., a three-way or four-way branch point), store the new current node and its current state (e.g., which neighbors have not been visited) as a "backtracking anchor" in a stack. Then select one of the unvisited neighbor nodes of the new current node and return to step 3) to continue expanding the chain along the unique path direction. 6) Process the end point of the path (node ​​with a degree of 1): If the degree of the new current node is 1, it means that the current new chain has extended to the end of a pipe, and a complete linear chain has been built. Output this complete linear chain and delete all nodes in the long chain in the undirected topology graph to generate a new undirected topology graph, triggering step 1); If a closed path is found at this time, step 7 is triggered). 7) Execute backtracking mechanism: When a complete linear chain is constructed and a path closure is found during expansion (i.e., the node to be visited next already exists in the current chain), backtracking is triggered. The iterative backtracking decomposition method (algorithm) pops the most recently recorded branch node from the "backtracking anchor" stack, checks whether the "backtracking anchor" still has any unvisited branches, and processes them: If so, take the "backtracking anchor point" as the starting point, select a new branch, and return to step 3) to start building a new chain; If not, continue backtracking upwards by popping the stack until a "backtracking anchor" with a usable branch is found, or all "backtracking anchors" have been processed. 8) When the undirected topological graph data is empty, it indicates that all connected parts in the undirected topological graph data have been decomposed into linear chains, and the set of linear chains is output. 9) Output: Convert all the decomposed linear chain sets into a JSON format instruction set that meets the rendering requirements of the Cocos engine and output it.

[0018] This iterative backtracking method efficiently decomposes tree-like or simple loop-containing topological graphs into a series of branchless linear chains using a strategy of "starting from the endpoint, prioritizing the expansion of long chains, anchoring the record point, and backtracking when encountering a loop." Its advantages lie in its clear logic, low computational overhead, and "simple" topological structure.

[0019] To further improve the implementation of the single-line diagram iterative backtracking decomposition method for pressure pipelines in the special inspection industry described in this invention, the following setting is adopted: the undirected topology graph data is a topology graph describing the nodes and connection relationships of the pressure pipeline.

[0020] To further improve the implementation of the single-line diagram iterative backtracking decomposition method for pressure pipelines in the special inspection industry described in this invention, the following setting is adopted: all nodes with a degree of 1 include the end or start of the pressure pipeline.

[0021] To further improve the implementation of the iterative backtracking decomposition method for single-line diagrams of pressure pipelines for special inspection industries as described in this invention, the following setting is adopted: the current state of the new current node includes which neighboring nodes have not yet been visited.

[0022] To further improve the implementation of the iterative backtracking decomposition method for single-line diagrams of pressure pipelines for special inspection industries as described in this invention, the following setting is adopted: the path closure means that the neighbor node to be visited next already exists in the current chain.

[0023] To further improve the implementation of the iterative backtracking decomposition method for single-line diagrams of pressure pipelines for special inspection industries described in this invention, the following settings are specifically adopted: The process of checking whether the "backtracking anchor point" still has unvisited branches and processing them specifically involves: If so, take the "backtracking anchor point" as the starting point, select a new branch, and return to step 3) to start building a new chain; If not, continue backtracking upwards by popping the stack until a "backtracking anchor" with a usable branch is found, or all "backtracking anchors" have been processed.

[0024] Compared with the prior art, the present invention has the following advantages and beneficial effects: This invention is a specialized decomposition method that can deeply understand the rendering characteristics of the Cocos engine, cope with the complexity of industrial pipeline network topology, and achieve efficient and adaptive transformation while ensuring information integrity.

[0025] This invention provides an efficient linearization decomposition scheme: targeting the common characteristics of pressure pipeline topologies, which are "mainly tree-like branches with a small number of simple loops", a lightweight and efficient algorithm (iterative backtracking decomposition method) is provided, which can quickly and accurately decompose such topology graphs into linear instruction sequences that can be rendered by the Cocos engine.

[0026] This invention achieves ordered decomposition of branch structures: through the "backtracking anchor point" mechanism, when processing branch nodes, the main path can be extended first, and after the path is interrupted, the path can be backtracked to the branch point in an orderly manner to continue processing other branches, generating a logical set of paths with clear primary and secondary distinctions.

[0027] This invention resolves the decomposition conflict of simple loops: by detecting loops in real time during chain expansion and combining a backtracking mechanism, it ensures that when encountering a simple closed loop, it can backtrack to the previous branch point and select the correct path, thereby avoiding infinite loops and path errors, and ensuring that single-line diagrams containing simple loop structures can also be drawn correctly.

[0028] This invention reduces computational overhead and meets industry application needs: The logic of this invention is clear and the computational overhead is small. It aims to solve the most common problems with minimal performance cost and is particularly suitable for digital application scenarios in the special inspection industry with high real-time requirements.

[0029] This invention boasts high efficiency and strong domain adaptability: it employs a lightweight iterative backtracking strategy, whose logic of "starting from the endpoint and recording at each branch" perfectly matches the "tree-like" topological characteristics of pressure pipelines. Compared to heavyweight general-purpose graph algorithms, this method has lower computational overhead and faster processing speed, better meeting the needs of the special inspection industry for real-time generation and interaction of single-line graphs.

[0030] This invention features orderly branching and clear path logic: through a "backtracking anchor point" mechanism, it can orderly decompose complex pipeline networks with multi-level branches into a series of linear paths from the main branch to the branches. The decomposition results are logically clear, conforming to the reading habits of inspectors, and avoiding the problem of traditional algorithms generating chaotic paths.

[0031] This invention effectively avoids simple loop errors: by performing loop detection in chain extension and combining it with a backtracking mechanism, it can intelligently handle simple closed loops such as bypasses and circulation pipe sections that may appear in pressure pipelines, avoiding getting stuck in a dead loop or generating erroneous patterns, and ensuring the correctness of the decomposition of such special structures.

[0032] This invention is simple to implement and robust: its core logic is based on node degree judgment and stack backtracking operations, making it easy to implement and maintain in engineering. Furthermore, it can reliably handle arbitrarily complex tree structures and structures containing simple cycles, ensuring 100% successful decomposition of the vast majority of pressure pipeline topologies, demonstrating excellent system robustness. Detailed Implementation

[0033] The present invention will be further described in detail below with reference to embodiments, but the implementation of the present invention is not limited thereto.

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.

[0035] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0036] Example 1: This invention designs an iterative backtracking decomposition method for single-line diagrams of pressure pipelines for the special inspection industry. This method efficiently converts the topological data of pressure pipelines into a linearized data sequence that meets the rendering requirements of specific graphics engines (such as Cocos Creator), and includes the following specific steps: 1) Initialize the starting point set: After inputting the undirected topology graph data, traverse all nodes in the undirected topology graph data and add all nodes with a degree of 1 to a queue called "starting point set"; this set serves as the starting point pool for all linear chains; this step completes the initialization of the algorithm (iterative backtracking decomposition method), and by identifying all pressure pipe endpoints, determines the starting position of all possible paths, preparing for subsequent chain expansion.

[0037] 2) Select a starting point and start building a new chain: Take a node from the "starting point set" queue as the starting point of a chain, and initialize and output a new chain with this starting point as the beginning; this step begins the construction process of a single chain, and each process starts from a clear pipeline endpoint.

[0038] 3) Extend the chain along the path: Starting from the beginning of the newly generated chain, select an unvisited neighbor node, add it to the end of the new chain, and set the neighbor node as the new current node; this step is the core operation of extending the chain pipeline path forward.

[0039] 4) Processing intermediate nodes (nodes with a degree of 2): If the new current node has a degree of 2 (i.e., the middle point of the pipeline), then return directly to step 3) and continue to extend the chain along the unique path direction; this step smoothly processes continuous, branchless pipeline segments, realizing rapid path extension.

[0040] 5) Process and record branch nodes (nodes with a degree ≥ 3): If the new current node has a degree ≥ 3 (i.e., a branch point such as a T-junction or four-way junction), store the new current node and its current state as a "backtracking anchor" in a stack. Then, select one of the unvisited neighbor nodes of the new current node and return to step 3), continuing to expand the chain along the unique path. This step is crucial for identifying branch points in the pressure pipeline and recording them as "landmarks." When a branch reaches its end, the algorithm (iterative backtracking decomposition method) can use these records to backtrack to the branch point and continue exploring other branches.

[0041] 6) Process the end point of the path (node ​​with a degree of 1): If the degree of the new current node is 1, it means that the current new chain has extended to the end of a pipe and a complete linear chain has been built. Output this complete linear chain and delete all nodes in the long chain in the undirected topology graph to generate a new undirected topology graph (triggering step 1); If a path closure is found at this time, step 7 is triggered; This step marks the successful decomposition of a complete pipe segment from endpoint to endpoint or from endpoint to branch point.

[0042] 7) Execute backtracking mechanism: When a complete linear chain is constructed and a path closure is found during expansion, backtracking is triggered. The iterative backtracking decomposition method (algorithm) pops the most recently recorded branch node from the "backtracking anchor" stack, checks whether there are any unvisited branches at that "backtracking anchor" and processes them; this step is the core intelligence of the algorithm (iterative backtracking decomposition method). It enables the algorithm (iterative backtracking decomposition method) to automatically "return" to the previous T-junction after completing the decomposition of a branch to process another branch, and can avoid simple loop errors by detecting path closures.

[0043] 8) When the undirected topology graph data is empty, it indicates that all connected parts in the undirected topology graph data have been decomposed into linear chains, and the set of linear chains is output. This step ensures the complete processing of all pipe segments (including possible independent loops that are not connected to any endpoints), and guarantees the integrity of the decomposition.

[0044] 9) Output: Convert all the decomposed linear chain sets into a JSON format instruction set that meets the rendering requirements of the Cocos engine and output it.

[0045] This iterative backtracking method efficiently decomposes tree-like or simple loop-containing topological graphs into a series of branchless linear chains by employing a strategy of "starting from the endpoint, prioritizing the expansion of long chains, anchoring the record point, and backtracking when encountering a loop." Its advantages lie in its clear logic, low computational overhead, and suitability for handling "simple" topological structures.

[0046] Example 2: This embodiment is a further optimization based on the above embodiment. The parts that are the same as those in the foregoing technical solutions will not be repeated here. In order to better realize the pressure pipeline single-line diagram iterative backtracking decomposition method for the special inspection industry described in this invention, the following setting is adopted: the undirected topology graph data is a topology graph describing the nodes and connection relationships of the pressure pipeline.

[0047] Example 3: This embodiment is a further optimization based on any of the above embodiments. The parts that are the same as those in the foregoing technical solutions will not be repeated here. In order to better realize the pressure pipeline single-line diagram iterative backtracking decomposition method for the special inspection industry described in this invention, the following setting is adopted: all nodes with a degree of 1 include the end or start of the pressure pipeline.

[0048] Example 4: This embodiment is a further optimization based on any of the above embodiments. The parts that are the same as those in the foregoing technical solutions will not be repeated here. In order to better realize the pressure pipeline single-line diagram iterative backtracking decomposition method for the special inspection industry described in this invention, the following setting is adopted: the current state of the new current node includes which neighboring nodes have not been visited.

[0049] Example 5: This embodiment is a further optimization based on any of the above embodiments. The parts that are the same as those in the foregoing technical solutions will not be repeated here. In order to better realize the pressure pipeline single-line diagram iterative backtracking decomposition method for the special inspection industry described in this invention, the following setting is adopted: the path closure means that the neighbor node to be visited next already exists in the current chain.

[0050] Example 6: This embodiment is a further optimization based on any of the above embodiments. The parts identical to the aforementioned technical solutions will not be repeated here. Furthermore, to better realize the iterative backtracking decomposition method for single-line diagrams of pressure pipelines for special inspection industries described in this invention, the following setting is specifically adopted: The specific steps of checking whether the "backtracking anchor point" still has unvisited branches and processing them are as follows: If so, take the "backtracking anchor point" as the starting point, select a new branch, and return to step 3) to start building a new chain; If not, continue backtracking upwards by popping the stack until a "backtracking anchor" with a usable branch is found, or all "backtracking anchors" have been processed.

[0051] Example 7: A method for iterative backtracking decomposition of single-line diagrams of pressure pipelines for the special inspection industry is a method that can efficiently convert the topological data of pressure pipelines into a linearized data sequence that meets the rendering requirements of specific graphics engines (such as Cocos Creator). The method includes the following specific steps: 1) Initialize the starting point set: After inputting the undirected topology graph data of the pressure pipeline (a topology graph of nodes and connections), traverse all nodes in the undirected topology graph data and add all nodes with a degree of 1 (i.e., the end or beginning of the pipeline, called "endpoints") to a queue called "starting point set"; this set serves as the starting point pool for all linear chains. This step completes the initialization of the algorithm (iterative backtracking decomposition method). By identifying all pressure pipeline endpoints, it determines the starting positions of all possible paths, preparing for subsequent chain expansion.

[0052] 2) Select a starting point and start building a new chain: Take a node from the "starting point set" queue as the starting point of a chain, and initialize and output a new chain with this starting point as the beginning; this step begins the construction process of a single chain, and each process starts from a clear pipeline endpoint.

[0053] 3) Extend the chain along the path: Starting from the beginning of the newly generated chain, select an unvisited neighbor node, add it to the end of the new chain, and set the neighbor node as the new current node; this step is the core operation of extending the chain pipeline path forward.

[0054] 4) Processing intermediate nodes (nodes with a degree of 2): If the new current node has a degree of 2 (i.e., the middle point of the pipeline), then return directly to step 3) and continue to extend the chain along the unique path direction; this step smoothly processes continuous, branchless pipeline segments, realizing rapid path extension.

[0055] 5) Process and record branch nodes (nodes with a degree ≥ 3): If the new current node has a degree ≥ 3 (i.e., a branch point such as a T-junction or four-way junction), store the new current node and its current state (e.g., which neighbors have not yet been visited) as a "backtracking anchor" in a stack. Then, select one of the unvisited neighbor nodes of the new current node and return to step 3), continuing to expand the chain along the unique path direction. This step is crucial for identifying branch points in the pressure pipeline and recording them as "landmarks." When a branch reaches its end, the algorithm (iterative backtracking decomposition method) can use these records to backtrack to the branch point and continue exploring other branches.

[0056] 6) Process the end point of the path (node ​​with a degree of 1): If the degree of the new current node is 1, it means that the current new chain has extended to the end of a pipe and a complete linear chain has been built. Output this complete linear chain and delete all nodes in the long chain in the undirected topology graph to generate a new undirected topology graph (triggering step 1); If a path closure is found at this time, step 7 is triggered; This step marks the successful decomposition of a complete pipe segment from endpoint to endpoint or from endpoint to branch point.

[0057] 7) Execute backtracking mechanism: When a complete linear chain is constructed and a path closure is found during expansion (i.e., the node to be visited next already exists in the current chain), backtracking is triggered. The iterative backtracking decomposition method (algorithm) pops the most recently recorded branch node from the "backtracking anchor" stack, checks whether the "backtracking anchor" still has any unvisited branches, and processes them: If so, take the "backtracking anchor point" as the starting point, select a new branch, and return to step 3) to start building a new chain; If not, continue backtracking upwards by popping from the stack until a "backtracking anchor" with a usable branch is found, or all "backtracking anchors" have been processed; this step is the core intelligence of the algorithm (iterative backtracking decomposition method). It enables the algorithm (iterative backtracking decomposition method) to automatically "return" to the previous T-junction after completing the decomposition of one branch to process another branch, and can avoid simple loop errors by detecting path closure.

[0058] 8) When the undirected topology graph data is empty, it indicates that all connected parts in the undirected topology graph data have been decomposed into linear chains, and the set of linear chains is output. This step ensures the complete processing of all pipe segments (including possible independent loops that are not connected to any endpoints), and guarantees the integrity of the decomposition.

[0059] 9) Output: Convert all the decomposed linear chain sets into a JSON format instruction set that meets the rendering requirements of the Cocos engine and output it.

[0060] Iterative starting point selection based on endpoint initialization: Unlike random selection of the starting point, this invention first identifies all "endpoints" with a degree of 1 as a unique starting point pool, ensuring that the decomposition always starts from the end of a clear pipeline, which conforms to the natural extension logic of the path.

[0061] Regarding the recording and backtracking mechanism of "backtracking anchors" for branch nodes: The core of this invention lies in pushing all branch nodes with a degree ≥ 3 encountered as "backtracking anchors" onto a stack during path expansion. When a path reaches its end or encounters a loop, anchors can be popped from the stack to orderly return to the previous "three-way intersection" and continue exploring other untraveled paths. This is the key to achieving a complete and orderly decomposition of complex branch structures.

[0062] The method incorporates implicit loop handling via backtracking: During chain expansion, the method implicitly detects loops by checking if the next node already exists in the current chain. Once detected, a backtracking mechanism is triggered, abandoning the current path and reverting to the previous anchor point to select a new path. This "retreat when faced with difficulty" strategy cleverly utilizes the backtracking mechanism to solve the problem of simple loop decomposition.

[0063] In special equipment inspection (primary application area): Digital inspection systems for pressure pipelines, pressure vessels, and other pressure-bearing special equipment are used to convert AI-recognized or manually mapped pipeline topology relationships into interactive electronic single-line diagrams that can be displayed on inspection terminals (such as tablets and AR glasses) in real time and accurately. Inspectors can directly perform operations such as wall thickness annotation, corrosion point recording, and risk level assessment on the generated single-line diagrams, greatly improving the efficiency and data-driven level of on-site inspection work.

[0064] In the field of smart factories and Industrial Internet of Things (IIoT): This invention relates to digital twin systems for process pipelines in industries such as chemical, pharmaceutical, and food and beverage. The method can rapidly decompose complex process pipeline topology diagrams into graphical data that can be smoothly rendered on a web platform or large screen using engines such as Cocos. Combined with sensor data, this enables real-time visual monitoring and fault warning of the flow rate, pressure, and temperature of the medium within the pipeline.

[0065] In the fields of Building Information Modeling (BIM) and fire protection engineering: BIM applications specifically address the piping networks within buildings, such as fire sprinkler systems and water supply and drainage systems. These piping network topologies are also primarily tree-like and simple loops. The method of this invention can efficiently convert them into standard linear graphical elements, facilitating integrated display, clash detection, and fire drill simulations within BIM software.

[0066] In the field of energy and power grid management: This invention is applied to the visualization of pipeline or power grid topology diagrams in industries such as oil, natural gas, and electricity. It can handle complex networks containing numerous ring and branch structures, converting them into graphical data that can be efficiently rendered using the Cocos engine on web or mobile devices, supporting real-time monitoring and scheduling.

[0067] In the area of ​​simulation training for inspection and maintenance personnel: This method is used in training systems for new employees or maintenance personnel in the special inspection industry to quickly and cost-effectively construct various typical virtual pressure pipeline scenarios. Trainees can conduct simulation training such as disassembly, troubleshooting, and emergency response in a fully accurate virtual pipeline environment generated by this method.

[0068] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A pressure pipeline single-line diagram iterative backtracking decomposition method for the special inspection industry, characterized in that: The method comprises the following specific steps: 1) After inputting the undirected topological graph data, all nodes with a degree of 1 are added to a queue named "starting point set", which is a starting point pool of all linear chains; 2) A node is taken from the "starting point set" queue as a starting point of a chain, and a new chain is initialized and outputted starting from the starting point; 3) An unvisited neighbor node of the starting point of the new chain is selected, added to the end of the new chain, and set as a new current node; 4) If the degree of the new current node is 2, step 3) is directly returned to continue extending the chain along the only path direction; 5) If the degree of the new current node is greater than or equal to 3, the new current node and its current state are stored as a "backtracking anchor point" in a stack, and then a neighbor node of the new current node is selected, and step 3) is returned to continue extending the chain along the only path direction; 6) If the degree of the new current node is 1, it indicates that the new chain has been extended to the end of a pipe, and a complete linear chain is constructed, the complete linear chain is outputted, and all nodes in the long chain are deleted in the undirected topological graph to generate a new undirected topological graph to trigger step 1); if the path is closed at this time, step 7) is triggered; 7) When a complete linear chain is constructed and the path is closed in the extension, backtracking is triggered, and the iterative backtracking decomposition method pops out a branch node recorded recently from the "backtracking anchor point" stack, and checks whether the "backtracking anchor point" has an unvisited branch and processes it; 8) When the undirected topological graph data is empty, it indicates that all connected parts in the undirected topological graph data have been decomposed into linear chains, and a linear chain set is outputted; 9) The linear chain set obtained by decomposition is converted into a JSON format instruction set meeting the rendering requirements of the Cocos engine and outputted.

2. The pressure piping single-line diagram iterative backtracking decomposition method for the industry of special inspection according to claim 1, characterized in that: The undirected topological graph data is a topological graph describing nodes and connection relationships of a pressure pipeline.

3. The method of claim 1, wherein: All nodes with a degree of 1 include the end or starting point of the pressure pipeline.

4. The pressure piping one-line diagram iterative backtracking decomposition method for the industry of special inspection according to claim 1, characterized in that: The current state of the new current node includes which neighbor nodes have not been visited.

5. The pressure piping one-line diagram iterative backtracking decomposition method for the industry of special inspection according to claim 1, characterized in that: The path closure refers to that the neighbor node to be visited next already exists in the current chain.

6. The method according to any one of claims 1-5, characterized in that: The checking whether the "backtracking anchor point" has an unvisited branch and processing it specifically comprises: If yes, a new branch is selected starting from the "backtracking anchor point", and step 3) is returned to construct a new chain; If no, the stack is backtracked upwards until a "backtracking anchor point" with a useful branch is found, or all "backtracking anchor points" are processed.

Citation Information

Patent Citations

  • Urban drainage pipe network topological relation carding method

    CN115795122A

  • Pipe network topology data compression method, device and equipment and readable storage medium

    CN117240305A

  • Cocos engine-oriented pipeline loop perceptual linear decomposition method

    CN121330149A