A pipeline state sorting method, apparatus, equipment, and medium based on disjoint-set data structure

By using a disjoint-set data structure, pipeline status sorting is transformed into set relationship judgment, which solves the safety hazards caused by changes in the usage status of blind flanges, realizes rapid visualization and intelligent sorting of pipeline status, and improves safety and efficiency.

CN117312901BActive Publication Date: 2026-11-10CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310840543.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-10
Publication Date
2026-11-10
Estimated Expiration
2043-07-10

AI Technical Summary

Technical Problem

In existing technologies, changes in the usage status of blind flanges due to pipeline construction can easily lead to misjudgments of blind passage, creating safety hazards. Furthermore, pipeline status sorting methods that rely on manual experience result in reduced safety.

Method used

The disjoint-set data structure is adopted. By reading the pipeline network data, the physical connectivity relationship is transformed into a logical relationship. The disjoint-set data structure and weighted set algorithm are used to divide and merge the node sets, determine the real-time connectivity status of the pipeline nodes, and sort them into connected and blocked sets.

Benefits of technology

It enables rapid visualization and intelligent sorting of pipeline status, reduces human judgment errors and safety hazards, improves labor efficiency, ensures inherent safety of enterprises, and supports real-time monitoring and online programming of blind flange removal and plugging processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312901B_ABST
    Figure CN117312901B_ABST
Patent Text Reader

Abstract

This invention relates to the field of pipeline inspection technology, disclosing a pipeline status sorting method based on a disjoint-set data structure. The method includes: reading pipeline network data, obtaining the physical connectivity relationships of pipeline nodes in the network data, and converting the physical connectivity relationships into pipeline logical relationships; merging the pipeline nodes according to the pipeline logical relationships using a preset disjoint-set data structure algorithm to obtain a pipeline node set; determining the real-time patency / blockage status of the pipeline nodes based on the pipeline node set; and sorting the pipeline node set using the real-time patency / blockage status. This invention also proposes a pipeline status sorting device, equipment, and medium based on a disjoint-set data structure. This invention transforms worker experience into a visual and intelligent means, reducing judgment errors caused by purely manual offline methods, improving labor efficiency, and ensuring the inherent safety of enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline inspection technology, and in particular to a pipeline status sorting method, apparatus, electronic device, and computer-readable storage medium based on disjoint-set data structure. Background Technology

[0002] Currently, most domestic companies entrust the management of blind flanges to their respective operations departments. Pipeline construction and other operations still rely on offline workers and manual work permit issuance. If the blind flange usage status changes due to pipeline construction, misjudgment of pipeline blind passage can easily lead to safety hazards. Once a mistake occurs, it can cause serious safety accidents, or even explosions, resulting in significant personal injury and economic losses.

[0003] Existing pipeline status sorting technology relies on paper records and manual experience to determine the operational status of the pipeline network, and then sorts the pipelines based on this status. In practical applications, it is necessary to quickly display the real-time pipeline status, but offline, purely manual models are prone to human judgment errors and safety hazards, thereby reducing the inherent safety of the enterprise. Summary of the Invention

[0004] To address the aforementioned problems, embodiments of the present invention provide a pipeline state sorting method, apparatus, electronic device, and computer-readable storage medium based on disjoint-set data structure.

[0005] In a first aspect, embodiments of the present invention provide a pipeline state sorting method based on a disjoint-set data structure, comprising:

[0006] Read in the pipeline network data, obtain the physical connectivity relationship of the pipeline nodes in the pipeline network data, and convert the physical connectivity relationship into a pipeline logical relationship;

[0007] The pipeline network is divided into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a set of partitioned nodes. The partitioned node sets are then merged using a preset disjoint-set data structure algorithm to obtain a set of pipeline nodes.

[0008] The real-time flow status of the pipeline node set is determined based on the node type in the pipeline node set;

[0009] The pipeline node set is sorted using the real-time blockage status.

[0010] According to an embodiment of the present invention, converting the physical connectivity relationship into a pipeline logical relationship includes:

[0011] Extract the nodes from the physical connectivity relationships, divide the nodes into independent nodes, merge the independent nodes, and obtain a node set;

[0012] The nodes are classified into categories using preset constraints to obtain categorized nodes;

[0013] The node set is grouped according to the classification node to obtain a group set, and each node in the group set is initialized as an independent node set;

[0014] The set of independent nodes is converted into a node influence state according to the preset node state;

[0015] The number of pipelines in the node set is calculated based on the node influence state using the following pipeline formula:

[0016] J k ={U1,U2}+{U2,P3}+…k…+{P n N j}

[0017] Among them, J k This indicates the number of pipeline lines, {U1, U2} represents the nodes at both ends of each pipeline segment, {U2, P3} represents the nodes and equipment connected to both ends of the pipeline, and {P n N j} represents the equipment connected to both ends of the pipeline and the j-th node, and k represents the number of nodes in the node set;

[0018] Node connectivity relationships are generated based on the node influence status and the number of pipeline lines, and these node connectivity relationships are used as the pipeline logical relationships.

[0019] According to an embodiment of the present invention, the step of dividing the pipeline network into node sets based on the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a partitioned node set includes:

[0020] The following weighted set algorithm is used to partition the pipeline network into node sets based on the pipeline logical relationships, resulting in the partitioned node sets:

[0021]

[0022] Where, d min Let f(i1,j1) represent the set of nodes in the node set in the pipeline logical relationship, (i2,j2) represent the node in the node set in the pipeline logical relationship, f(i1) represent the marker node corresponding to i1, f(i2) represent the marker node corresponding to i2, f(j1) represent the marker node corresponding to j1, and f(j2) represent the marker node corresponding to j2.

[0023] According to an embodiment of the present invention, the step of merging the pipeline nodes according to the pipeline logical relationship using a preset disjoint-set data structure algorithm to obtain a pipeline node set includes:

[0024] Obtain the set of pipe nodes located at both ends of the preset pipeline;

[0025] Obtain the root node in the pipeline set, and set the power of the root node;

[0026] The disjoint-set data structure algorithm is used to merge the pipeline sets according to the power to obtain a merged pipeline set;

[0027] If there are pipelines that have not been traversed, return to the step of obtaining the pipeline set where the pipeline nodes at both ends of the pipeline are located, until all pipelines have been traversed.

[0028] The merged pipelines with the same root flag node are combined as the pipeline node set.

[0029] According to an embodiment of the present invention, determining the real-time blockage status of the pipeline node set based on the node type in the pipeline node set includes:

[0030] Determine whether there are inlet and outlet nodes in the node type of the pipeline node in the pipeline node set;

[0031] When the pipeline node has both the inlet node and the outlet node, it is determined that the pipeline node is in a connected state.

[0032] When the pipeline node does not have the inlet node and the outlet node, the pipeline node is determined to be in a blocked state.

[0033] The real-time connectivity and congestion status of the pipeline node set is determined based on the connectivity and congestion status.

[0034] According to an embodiment of the present invention, the sorting of the pipeline node set using the real-time congestion status includes:

[0035] The pipeline nodes are divided into connected and blocked states based on the real-time flow status.

[0036] The set of pipeline nodes is divided into a connected set and a blocked set based on the connected state and the blocked state.

[0037] According to an embodiment of the present invention, converting the physical connectivity relationship into a pipeline logical relationship includes:

[0038] Extract the pipe nodes from the physical connectivity relationships;

[0039] Determine the number of pipeline nodes with node influence states among the pipeline nodes;

[0040] The number of pipelines in the physical connectivity relationship is determined based on the number of pipeline nodes.

[0041] The disjoint-set data structure algorithm is used to generate the logical relationship of the pipelines based on the number of pipelines and the number of pipeline nodes.

[0042] Secondly, embodiments of the present invention provide a pipeline state sorting device based on a disjoint-set data structure, characterized in that it includes:

[0043] The physical connectivity conversion module is used to read in pipeline network data, obtain the physical connectivity of pipeline nodes in the pipeline network data, and convert the physical connectivity into pipeline logical relationships.

[0044] The pipeline node merging module is used to divide the pipeline network into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm, to obtain a divided node set, and to merge the divided node sets using a preset disjoint-set data structure algorithm to obtain a pipeline node set.

[0045] The real-time blockage status judgment module is used to judge the real-time blockage status of the pipeline node set based on the node type in the pipeline node set;

[0046] The pipeline node combination sorting module is used to sort the pipeline node set based on the real-time blockage status.

[0047] Thirdly, embodiments of the present invention provide an electronic device, which includes:

[0048] processor;

[0049] Memory used to store the processor's executable instructions;

[0050] The processor is configured to execute the instructions to implement a pipeline state sorting method based on disjoint-set data structure as described in the first aspect above.

[0051] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a pipeline state sorting method based on a disjoint-set data structure as described in the first aspect.

[0052] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial effects:

[0053] The embodiments of this invention transform the judgment of blockage issues in complex pipeline environments from individual pipeline checks to judgments between multiple logical sets. This transforms changes between pipelines into relationships between sets, significantly improving computational speed. After manually checking the blockage status of blind flanges, the pipeline status is quickly and instantly displayed, overturning the previous model of relying solely on paper records and manual experience to judge pipeline operation. This transforms manual experience into a visualized, intelligent, and automated method, greatly reducing judgment errors and safety hazards caused by purely manual offline methods, improving labor efficiency, and ensuring inherent enterprise safety. It provides a new solution for real-time monitoring of the entire plant's pipeline operation status and offers technical support for online development of blind flange removal / blocking process plans and pre-simulation of process switching schemes. Attached Figure Description

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

[0055] Figure 1 The flowchart of the pipeline state sorting method based on disjoint set data structure according to Embodiment 1 of the present invention is shown.

[0056] Figure 2 A flowchart illustrating the conversion of physical connectivity relationships according to Embodiment 1 of the present invention is shown;

[0057] Figure 3 A flowchart illustrating the merging of pipeline nodes according to Embodiment 1 of the present invention is shown;

[0058] Figure 4 This shows a functional block diagram of the pipeline state sorting device based on disjoint-set data structure according to Embodiment 3 of the present invention;

[0059] Figure 5 This diagram shows the structural composition of an electronic device that implements the disjoint-set data structure-based pipeline state sorting method according to Embodiment 5 of the present invention.

[0060] Figure 6 This diagram illustrates how the disjoint-set data structure for pipeline state sorting, based on an embodiment of the present invention, merges the sets containing the nodes at both ends of the pipeline.

[0061] Figure 7 The flowchart shows the workflow of the pipeline status sorting final node set verification node of the disjoint set in Embodiment 1 of the present invention to determine the blockage status. Detailed Implementation

[0062] The present disclosure will be further described below with reference to the embodiments shown in the accompanying drawings.

[0063] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0064] This invention proposes a pipeline state sorting method based on disjoint-set data structure (DFS) for pipeline inspection technology. Based on DFS algorithm theory and combined with constraint condition methods, a DFS structure is constructed for each node to achieve the sorting of pipeline node sets. Compared with traditional methods, the DFS-based pipeline state sorting technology is more efficient and reduces the workload of manual operation, showing great potential and application prospects in the field of production operation management in refining and chemical enterprises.

[0065] Example 1

[0066] like Figure 1 As shown, this invention proposes a pipeline state sorting method based on disjoint-set data structure, comprising the following steps:

[0067] S1. Read in the pipeline network data, obtain the physical connectivity relationship of the pipeline nodes in the pipeline network data, and convert the physical connectivity relationship into a pipeline logical relationship;

[0068] In this embodiment of the invention, the pipeline network data includes pipelines, devices, pipeline outlet nodes, and blind flange nodes. The physical connectivity relationship is a combination of pipeline connection relationships and device connection relationships; that is, the connection method of pipeline nodes in the pipeline network data.

[0069] In detail, the physical connectivity of pipeline nodes in the pipeline network data is obtained through pipeline diagrams collected on-site and pipeline network data.

[0070] In this embodiment of the invention, each pipeline network diagram is formed into a logical diagram with connectivity according to preset constraints, converting the physical connectivity of the pipelines into a connected diagram with logical relationships. The constraints stipulate that each pipeline must have nodes at both ends, and no more than two nodes are allowed. Specifically, there cannot be pipes of different shapes, such as Y-shaped pipes, and each node can only connect to two pipelines; each node can only connect to one pipeline on its left and one on its right, representing one inlet and one outlet. If a node has special attributes, such as a tee or four-way pipe, it can connect to three or four pipelines. If a node has no special attributes, it means that each pipeline can only have two nodes at both ends, and each node can only connect to two pipelines. Nodes can be devices, valves, blind flanges, tanks, etc. By forming a logical diagram with connectivity according to the constraints, the extent of blocked pipelines can be determined based on the constraints, thereby enabling a pipeline network blockage prediction.

[0071] In this embodiment of the invention, converting the physical connectivity relationship into a pipeline logical relationship includes:

[0072] Extract the nodes from the physical connectivity relationships, divide the nodes into independent nodes, merge the independent nodes, and obtain a node set;

[0073] The nodes are classified into categories using preset constraints to obtain categorized nodes;

[0074] The node set is grouped according to the classification node to obtain a group set, and each node in the group set is initialized as an independent node set;

[0075] The set of independent nodes is converted into a node influence state according to the preset node state;

[0076] The number of pipelines in the node set is calculated based on the node influence state using the following pipeline formula:

[0077] J k ={U1,U2}+{U2,P3}+…k…+{P n N j}

[0078] Among them, J k This indicates the number of pipeline lines, {U1, U2} represents the nodes at both ends of each pipeline segment, {U2, P3} represents the nodes and equipment connected to both ends of the pipeline, and {P n N j} represents the equipment connected to both ends of the pipeline and the j-th node, and k represents the number of nodes in the node set;

[0079] Node connectivity relationships are generated based on the node influence status and the number of pipeline lines, and these node connectivity relationships are used as the pipeline logical relationships.

[0080] In detail, all nodes in the physical connectivity are considered independent nodes. When the total number of nodes is N, N node sets are formed. Furthermore, considering the current characteristics of pipeline resources and preset constraints, the node types connected to the pipeline are divided into (U) equipment, (IO) inlets / outlets, and (P) blind flanges, where (P) blind flanges have two states: on and off. Nodes are also grouped according to node type, i.e., {N} = {U}U{P}, with nodes of type equipment grouped together and nodes of type blind flange grouped together.

[0081] Specifically, each node in the grouped set is initialized to itself. For the pipeline, this means dividing each node on the pipeline into an independent set. The disjoint-set data structure is a collection class that points to itself; the specific collection class is as follows:

[0082] UnionFindSet unionFindSet=new

[0083] UnionFindSet(allNodeSet.stream().toArray(String[]::new));

[0084] Furthermore, all independent nodes are transformed into nodes whose states affect related states only for a specific type. P (off) is considered an empty node, and P (on) is considered a device. Here, "affecting related states" refers to the type of node that can influence the pipeline's open / closed state. For example, when the pipeline is only used to transport oil, this pipeline node relatively does not affect the pipeline's open / closed state. If there are 10 nodes in the node set, and only 3 nodes are active, and each node has two states (open / closed), then the open / closed states for the 3 nodes are: Node 1 open, Node 2 closed, Node 3 closed; Node 1 open, Node 2 open, Node 3 closed, etc. That is, by permuting and combining the open / closed states of the 3 nodes, we can determine how many possible open / closed states there are. Therefore, there are 9 possible open / closed states for the 3 nodes.

[0085] For example, if the node connection relationships in the node set are {U1,U2}, {U2,U4}, {U1,U3}, and {U2,P2}, then according to the pipeline calculation formula, the number of pipelines in the node set can be calculated to be 4. Based on the number of pipelines and the open / closed status of the pipeline nodes, the node logic diagram of the pipeline, i.e., the pipeline connection relationships, can be determined.

[0086] S2. Using a preset disjoint-set data structure and a preset weighted set algorithm, the pipeline network is divided into node sets according to the pipeline logical relationship to obtain a set of partitioned nodes. The partitioned node sets are then merged using a preset disjoint-set data structure algorithm to obtain a set of pipeline nodes.

[0087] In this embodiment of the invention, the pipeline network is divided into regions based on the node-based disjoint-set data structure and weighted set algorithm, and the pipeline network is grouped according to logical concepts, so that each group set of the pipeline network is a set of nodes with pipeline logical relationships.

[0088] In this embodiment of the invention, the step of dividing the pipeline network into node sets based on the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a partitioned node set includes:

[0089] The following weighted set algorithm is used to partition the pipeline network into node sets based on the pipeline logical relationships, resulting in the partitioned node sets:

[0090]

[0091] Where, d minLet f(i1,j1) represent the set of nodes in the node set in the pipeline logical relationship, (i2,j2) represent the node in the node set in the pipeline logical relationship, f(i1) represent the marker node corresponding to i1, f(i2) represent the marker node corresponding to i2, f(j1) represent the marker node corresponding to j1, and f(j2) represent the marker node corresponding to j2.

[0092] In detail, when d min When f(x) = 0, it indicates that the nodes intersect in the same set, and f(x) -> the marker node corresponding to x. According to the weighted set algorithm, the network can be grouped based on logical concepts, and the resulting set of nodes is then merged using a disjoint-set data structure algorithm.

[0093] In this embodiment of the invention, the disjoint-set data structure algorithm is applied to some set problems with N elements. Typically, each element is initially set to form a single-element set, and then the sets containing elements belonging to the same group are merged in a certain order. During this process, it is necessary to repeatedly search which set an element belongs to.

[0094] In this embodiment of the invention, the reference Figure 2 As shown, the step of merging the pipeline nodes according to the pipeline logical relationship using a preset disjoint-set data structure algorithm to obtain a pipeline node set includes:

[0095] S21. Obtain the set of pipeline nodes located at both ends of the preset pipeline;

[0096] S22. Obtain the root node in the pipeline set and set the power of the root node;

[0097] S23. Using the disjoint-set data structure algorithm, merge the pipeline sets according to the power to obtain a merged pipeline set;

[0098] S24. If there is a pipeline that has not been traversed, return to the step of obtaining the pipeline set where the pipeline nodes at both ends of the pipeline are located, until all pipelines have been traversed.

[0099] S25. Combine the merged pipelines with the same root marker node as the pipeline node set.

[0100] In detail, the sets of nodes at both ends of the pipeline are merged, meaning that the nodes at both ends have the same set identifier node. The specific merging algorithm logic is as follows: a node array is set up, and the root node of each node set is stored in the root node array. Using an index lookup function, the first-ordered root node in the root node array is found and merged. The merged node set is then placed in the node array; that is, {U1,U2} and {U2,U3} are merged into {U1,U2,U3}.

[0101] Specifically, in a set of nodes, there is a root node, which is assigned a power equal to the number of nodes in the set. The algorithm for finding the root node is as follows: First, obtain the index of each node in the node set array. If the value of a node in the root node array is the same as its index, this node is taken as the root node. If the value of a node in the root node array is different from its index, continue traversing the root node array until the root node is found.

[0102] Furthermore, the sets containing nodes at both ends of the pipeline are repeatedly merged until all pipelines are processed. The set of all nodes with the same root identifier is the final set of nodes with connectivity. This involves repeatedly judging the state between pipeline sets, merging sets, and determining which root node is the latest root node based on the power of the root node in each set. When all elements have been traversed, several completely disjoint node sets will be generated. Specifically, the logic of the repeated merging algorithm is as follows: if the root node is found in node set 1 and node set 2, they cannot be merged or are already in the same disjoint-set, so no merging is needed. If the node sets are not in the same disjoint-set, the power of the root node in node set 1 is compared with that in node set 2, and the root node with the larger power is taken as the latest root node. Then, the node sets are merged based on the latest root node.

[0103] For example, such as Figure 6 As shown, the sets containing the nodes at both ends of the pipeline are merged. For example, {U1,U2,U3,U4,P1} is one set, and {U5,U6,P2} is another set. If U1 and U5 are both at level 0, and U1 is a higher power than U5, then U5 is merged into the level below U1.

[0104] S3. Determine the real-time blockage status of the pipeline node set based on the node type in the pipeline node set;

[0105] In this embodiment of the invention, the blockage status of the nodes can be determined based on the set of pipeline nodes. Determining the blockage status of the nodes facilitates real-time changes to the pipeline status, making the pipeline safer.

[0106] In this embodiment of the invention, the reference Figure 3 As shown, determining the real-time congestion status of the pipeline node set based on the node type includes:

[0107] S31. Determine whether there are inlet and outlet nodes in the pipe node type of the pipe node set;

[0108] S32. When the pipeline node has both the inlet node and the outlet node, it is determined that the pipeline node is in a connected state.

[0109] S33. When the pipeline node does not have the inlet node and the outlet node, it is determined that the pipeline node is blocked.

[0110] S34. Determine the real-time connectivity and blockage status of the pipeline node set based on the connectivity and blockage status.

[0111] In detail, in a set of nodes, if there are both incoming and outgoing nodes, then all nodes in the set are considered connected, meaning all nodes are connected to the pipeline. Otherwise, all nodes in the set are considered blocked. That is, there is a node type called inlet / outlet (IO). When a node set contains IO nodes, it is considered a flowing node set; when a node set does not contain inlet / outlet (IO) nodes, it is considered a blocked node set. In other words, IO ∈ {x}, and {x} is a flowing set.

[0112] Specifically, the real-time patency / blockage status of the pipeline nodes is determined based on the set of pipeline nodes. This process requires repeated checks of the status between the sets of pipeline nodes to determine the real-time patency / blockage status of the pipeline nodes. Then, the patency / blockage template set is separated based on the real-time patency / blockage status.

[0113] Furthermore, such as Figure 7 As shown, the process involves verifying the connectivity status of nodes based on the final node set. First, a disjoint-set data structure is generated for each node, and all pipelines are traversed. Once all pipelines have been traversed, the connectivity status of the pipeline node set is verified. If any pipeline has not been traversed, the nodes are merged according to the pipeline logic until all pipelines have been traversed, and the connectivity status of the pipeline node set is verified.

[0114] S4. The pipeline node set is sorted using the real-time blockage status.

[0115] In this embodiment of the invention, the pipeline nodes are sorted according to their connectivity and blockage status. That is, the sets of connected nodes are grouped together, and the sets of blocked nodes are grouped together. The connectivity and blockage problem is mutually exclusive into two sets, and the pipeline connection relationship is transformed into judging the connection opportunities between vertices. At the same time, the large-scale pipeline nodes are simplified into multiple solvable subsets through disjoint-set data structures, thereby improving quality and speed.

[0116] In this embodiment of the invention, the step of sorting the pipeline node set using the real-time congestion status includes:

[0117] The pipeline nodes are divided into connected and blocked states based on the real-time flow status.

[0118] The set of pipeline nodes is divided into a connected set and a blocked set based on the connected state and the blocked state.

[0119] In detail, by repeatedly judging the state between the pipe sets, the real-time unclog status of the pipe sets can be determined, and then the unclogged blind flange sets can be separated.

[0120] Specifically, the state between pipeline sets is repeatedly checked until nodes cannot be merged or the nodes are already in the same disjoint set, at which point merging is no longer necessary.

[0121] For example, when the pipe node set 1 contains pipe nodes {U1, U2, U3, U4, P1}, if the search algorithm determines that the nodes in the pipe node set have both an inlet node and an outlet node, then the pipe set is considered to be connected; when the pipe node set 2 contains pipe nodes {U4, U5, U6, P2}, if the search algorithm determines that the nodes in the pipe node set do not have both an inlet node and an outlet node, then the pipe set is considered to be blocked; that is, the pipe node set 1 and the pipe node set 2 are separated, thereby separating the connection / blockage blind plate sets and realizing the sorting of the pipe node sets.

[0122] Furthermore, in complex pipeline environments, by transforming the judgment of blockage or malfunction of each pipeline into a judgment between multiple logical sets, and turning the changes between pipelines into relationships between sets, this approach largely solves the problem of computational speed.

[0123] Example 2

[0124] To better understand the present invention, a second embodiment is provided below to further explain the situation in which the physical connectivity relationship is converted into a pipeline logical relationship when no constraints exist.

[0125] In this embodiment of the invention, the constraint is to limit the number of pipelines connected to a node; that is, a node can only connect to two pipelines, and a pipeline can have only two nodes at both ends. If there are no constraints, that is, if pipeline nodes are given characteristic attributes, meaning there is no restriction on the number of pipelines a node can connect to, a node may connect to three or four pipelines, and a pipeline can have tee or cross-junction pipes at both ends, then the physical connectivity relationship is converted into a pipeline logical relationship.

[0126] In this embodiment of the invention, converting the physical connectivity relationship into a pipeline logical relationship includes:

[0127] Extract the pipe nodes from the physical connectivity relationships;

[0128] Determine the number of pipeline nodes with node influence states among the pipeline nodes;

[0129] The number of pipelines in the physical connectivity relationship is determined based on the number of pipeline nodes.

[0130] The disjoint-set data structure algorithm is used to generate the logical relationship of the pipelines based on the number of pipelines and the number of pipeline nodes.

[0131] In detail, the pipe node refers to the number of nodes in the pipe. For example, a pipe can connect to a two-way pipe, a three-way pipe, or a four-way pipe. When connecting to a two-way pipe, the number of pipes can be two; when connecting to a three-way pipe, the number of pipes can be three; and when connecting to a four-way pipe, the number of pipes can be four.

[0132] Specifically, the pipeline nodes with node influence status are those that have an impact on the pipeline's open / closed state, while pipeline nodes without node influence status are filtered out, leaving only those that have an impact on the pipeline's open / closed state.

[0133] Furthermore, the disjoint-set data structure algorithm can be used to find the nodes associated with the root node of the pipeline based on the number of pipelines and the number of pipeline nodes, and then a set can be formed based on the root node.

[0134] The embodiments of this invention transform the judgment of blockage issues in complex pipeline environments from individual pipeline checks to judgments between multiple logical sets. This transforms changes between pipelines into relationships between sets, significantly improving computational speed. After manually checking the blockage status of blind flanges, the pipeline status is quickly and instantly displayed, overturning the previous model of relying solely on paper records and manual experience to judge pipeline operation. This transforms manual experience into a visualized, intelligent, and automated method, greatly reducing judgment errors and safety hazards caused by purely manual offline methods, improving labor efficiency, and ensuring inherent enterprise safety. It provides a new solution for real-time monitoring of the entire plant's pipeline operation status and offers technical support for online development of blind flange removal / blocking process plans and pre-simulation of process switching schemes.

[0135] Example 3

[0136] like Figure 4 As shown in the figure, this embodiment also provides a functional block diagram of a pipeline status sorting device based on disjoint-set data structure.

[0137] The pipe status sorting device 100 based on disjoint-set data structure described in this embodiment can be installed in an electronic device. Depending on the functions implemented, the pipe status sorting device 100 based on disjoint-set data structure may include a physical connectivity conversion module 101, a pipe node merging module 102, a real-time blockage / suspension status judgment module 103, and a pipe node combination and sorting module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0138] In this embodiment, the functions of each module / unit are as follows:

[0139] The physical connectivity conversion module 101 is used to read in pipeline network data, obtain the physical connectivity of pipeline nodes in the pipeline network data, and convert the physical connectivity into pipeline logical relationships.

[0140] The pipeline node merging module 102 is used to divide the pipeline network into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm, to obtain a divided node set, and to merge the divided node sets using a preset disjoint-set data structure algorithm to obtain a pipeline node set.

[0141] The real-time blockage status judgment module 103 is used to judge the real-time blockage status of the pipeline node set according to the node type in the pipeline node set.

[0142] The pipeline node combination sorting module 104 is used to sort the pipeline node set using the real-time blockage status.

[0143] In detail, each module in the pipeline state sorting device 100 based on disjoint-set data structure described in the embodiments of the present invention employs the same technical means as the pipeline state sorting method based on disjoint-set data structure described in Embodiments 1 and 2, and can produce the same technical effect, which will not be repeated here.

[0144] Example 4

[0145] like Figure 5 As shown, this embodiment also provides a computer electronic device, which may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a pipeline state sorting program based on a disjoint-set data structure.

[0146] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing a pipelined state sorting program based on a disjoint-set data structure), and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0147] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for a disjoint-set data structure-based pipeline state sorting program, but also to temporarily store data that has been output or will be output.

[0148] The communication bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0149] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0150] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0151] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0152] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0153] The disjoint-set data structure-based pipeline state sorting program stored in the memory 11 of the electronic device is a combination of multiple instructions. When run in the processor 10, it can achieve the following:

[0154] Read in the pipeline network data, obtain the physical connectivity relationship of the pipeline nodes in the pipeline network data, and convert the physical connectivity relationship into a pipeline logical relationship;

[0155] The pipeline network is divided into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a set of partitioned nodes. The partitioned node sets are then merged using a preset disjoint-set data structure algorithm to obtain a set of pipeline nodes.

[0156] The real-time flow status of the pipeline node set is determined based on the node type in the pipeline node set;

[0157] The pipeline node set is sorted using the real-time blockage status.

[0158] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.

[0159] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0160] Example 5

[0161] This embodiment provides a storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the pipeline state sorting method based on disjoint-set data structure as described above.

[0162] This program code can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 Steps of a specified function in one or more processes.

[0163] Storage media include permanent and non-permanent, removable and non-removable media, and can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by computing devices.

[0164] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations according to this application. When the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0165] It should be understood that the terms used in this way can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in a sequence other than those illustrated or described herein.

[0166] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0167] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0168] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0169] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0170] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0171] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0172] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A pipeline state sorting method based on disjoint-set data structure, characterized in that, The method includes: Read in the pipeline network data, obtain the physical connectivity relationship of the pipeline nodes in the pipeline network data, and convert the physical connectivity relationship into a pipeline logical relationship; The pipeline network is divided into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a set of partitioned nodes. The partitioned node sets are then merged using a preset disjoint-set data structure algorithm to obtain a set of pipeline nodes. The real-time flow status of the pipeline node set is determined based on the node type in the pipeline node set; The pipeline node set is sorted using the real-time blockage status; The method of dividing the pipeline network into node sets based on the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a partitioned node set includes: The following weighted set algorithm is used to partition the pipeline network into node sets based on the pipeline logical relationships, resulting in the partitioned node sets: in, This is represented as the set of partitioning nodes. This refers to a node in the set of nodes within the pipeline logical relationship. f( represents a node in the node set in the pipeline logical relationship, f( )express The corresponding marker node, f( )express The corresponding marker node, f( )express The corresponding marker node, f( )express The corresponding flag node; the conversion of the physical connectivity relationship into a pipeline logical relationship includes: Extract the nodes from the physical connectivity relationships, divide the nodes into independent nodes, merge the independent nodes, and obtain a node set; The nodes are classified into categories using preset constraints; the constraints are that there are nodes at both ends of the pipeline, and the number of nodes does not exceed two. The node set is grouped according to the classification node to obtain a group set, and each node in the group set is initialized as an independent node set; The set of independent nodes is converted into a node-affected state based on a preset node state; the node state is either a connected state or a blocked state. The number of pipelines in the node set is calculated based on the node influence state using the following pipeline formula: in, Indicates the number of pipeline lines. This indicates the nodes at both ends of each pipeline segment. This indicates the nodes and equipment connected at both ends of the pipeline. This indicates the equipment connected at both ends of the pipeline and the first 1 node This indicates the number of nodes in the node set; Node connectivity relationships are generated based on the node influence status and the number of pipeline lines, and these node connectivity relationships are used as the pipeline logical relationships.

2. The pipeline state sorting method based on disjoint-set data structure as described in claim 1, characterized in that, The process of merging pipeline nodes according to the pipeline logical relationship using a preset disjoint-set data structure algorithm to obtain a pipeline node set includes: Obtain the set of pipe nodes located at both ends of the preset pipeline; Obtain the root node in the pipeline set, and set the power of the root node; The disjoint-set data structure algorithm is used to merge the pipeline sets according to the power to obtain a merged pipeline set; If there are pipelines that have not been traversed, return to the step of obtaining the pipeline set where the pipeline nodes at both ends of the pipeline are located, until all pipelines have been traversed. The merged pipeline set with the same root flag node is taken as the pipeline node set.

3. The pipeline state sorting method based on disjoint-set data structure as described in claim 1, characterized in that, The step of determining the real-time congestion status of the pipeline node set based on the node type in the pipeline node set includes: Determine whether there are inlet and outlet nodes in the node type of the pipeline node in the pipeline node set; When the pipeline node has both the inlet node and the outlet node, it is determined that the pipeline node is in a connected state. When the pipeline node does not have the inlet node and the outlet node, the pipeline node is determined to be in a blocked state. The real-time connectivity and congestion status of the pipeline node set is determined based on the connectivity and congestion status.

4. The pipeline state sorting method based on disjoint-set data structure as described in claim 1, characterized in that, The process of sorting the pipeline node set using the real-time congestion status includes: The pipeline nodes are divided into connected and blocked states based on the real-time flow status. The set of pipeline nodes is divided into a connected set and a blocked set based on the connected state and the blocked state.

5. The pipeline state sorting method based on disjoint-set data structure as described in claim 1, characterized in that, The process of converting the physical connectivity relationship into a pipeline logical relationship includes: Extract the pipe nodes from the physical connectivity relationships; Determine the number of pipeline nodes with node influence states among the pipeline nodes; The number of pipelines in the physical connectivity relationship is determined based on the number of pipeline nodes. The disjoint-set data structure algorithm is used to generate the logical relationship of the pipelines based on the number of pipelines and the number of pipeline nodes.

6. A pipeline state sorting device based on disjoint-set data structure, characterized in that, The device includes: The physical connectivity conversion module is used to read in pipeline network data, obtain the physical connectivity of pipeline nodes in the pipeline network data, and convert the physical connectivity into pipeline logical relationships. The pipeline node merging module is used to divide the pipeline network into node sets according to the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm, to obtain a divided node set, and to merge the divided node sets using a preset disjoint-set data structure algorithm to obtain a pipeline node set. The real-time blockage status judgment module is used to judge the real-time blockage status of the pipeline node set based on the node type in the pipeline node set; The pipeline node set sorting module is used to sort the pipeline node set based on the real-time blockage status; The method of dividing the pipeline network into node sets based on the pipeline logical relationship using a preset disjoint-set data structure and a preset weighted set algorithm to obtain a partitioned node set includes: The following weighted set algorithm is used to partition the pipeline network into node sets based on the pipeline logical relationships, resulting in the partitioned node sets: in, This is represented as the set of partitioning nodes. This refers to a node in the set of nodes within the pipeline logical relationship. f( represents a node in the node set in the pipeline logical relationship, f( )express The corresponding marker node, f( )express The corresponding marker node, f( )express The corresponding marker node, f( )express The corresponding marker node; The process of converting the physical connectivity relationship into a pipeline logical relationship includes: Extract the nodes from the physical connectivity relationships, divide the nodes into independent nodes, merge the independent nodes, and obtain a node set; The nodes are classified into categories using preset constraints; the constraints are that there are nodes at both ends of the pipeline, and the number of nodes does not exceed two. The node set is grouped according to the classification node to obtain a group set, and each node in the group set is initialized as an independent node set; The set of independent nodes is converted into a node-affected state based on a preset node state; the node state is either a connected state or a blocked state. The number of pipelines in the node set is calculated based on the node influence state using the following pipeline formula: in, Indicates the number of pipeline lines. This indicates the nodes at both ends of each pipeline segment. This indicates the nodes and equipment connected at both ends of the pipeline. This indicates the equipment connected at both ends of the pipeline and the first 1 node This indicates the number of nodes in the node set; Node connectivity relationships are generated based on the node influence status and the number of pipeline lines, and these node connectivity relationships are used as the pipeline logical relationships.

7. An electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the pipeline state sorting method based on disjoint-set data structure as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the pipeline state sorting method based on disjoint-set data structure as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Abnormal / fault positioning detection method based on binomial tree model

    CN103491651A

  • Logic processing method and system for gas pipe network structure

    CN113360716A