Data processing method, computer device and storage medium
Patent Information
- Application Number
- CN202610730783.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-05-26
AI Technical Summary
[0003]但是,上述人工识读方式在实际应用中存在明显不足:一方面,人工算量效率低下,难以适应大型项目图纸规模大、构件复杂的需求;另一方面,人工识别和判断过程主观性强,易产生漏算、重复统计及连接方式误判等问题,导致算量结果准确性和一致性难以保障
[0015]本实施例提供的数据处理方法,首先基于电子图纸中管道系统的各类构件数据构建拓扑图,将离散的各构件转化为具有明确连接关系的图结构,然后遍历拓扑图中的各节点,根据节点处管段的连接数量及空间向量关系自动识别节点处管件的类型,由此可避免对图纸中特定管件符号的依赖,减少了因符号缺失或绘制不规范导致的漏识别问题,此外,可以根据接收到的工程规则信息为各类型的管件匹配相应的连接形式,并将连接形式的信息同步匹配至与管件相连的各构件,从而保证连接方式标注的一致性,最后整合项目信息与上述的各类构件信息,输出结构化结果数据。通过上述数据处理方法,能够在无需人工判断的情况下,自动完成管道系统中管件类型识别、连接形式匹配及工程信息的结构化输出,有效降低人工识读图纸的工作量,减少因主观判断引起的漏算、误判问题,提升工程量统计与造价计算的数据一致性和可复用性。
Smart Images

Figure CN122262232B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of construction engineering cost technology, and in particular to a data processing method, computer equipment and storage medium. Background Technology
[0002] In the field of construction cost estimation, calculating the quantities of each component in a piping system is a core aspect of budgeting and settlement. Currently, the industry generally relies on cost engineers to manually interpret CAD design drawings and determine the pipe routing, fitting types, connection methods, and quantities based on experience.
[0003] However, the above-mentioned manual reading method has obvious shortcomings in practical applications: on the one hand, manual quantity calculation is inefficient and cannot meet the needs of large-scale project drawings with complex components; on the other hand, the manual identification and judgment process is highly subjective and prone to problems such as omissions, duplicate statistics and misjudgments of connection methods, making it difficult to guarantee the accuracy and consistency of the quantity calculation results. Summary of the Invention
[0004] Therefore, it is necessary to provide a data processing method, a computer device, and a computer-readable storage medium to address the above problems.
[0005] According to a first aspect of the embodiments of this application, a data processing method is provided, comprising: Based on the component data of the pipeline system in the electronic drawings, a topology diagram representing the connection relationship between the components in the pipeline system is constructed. Traverse each node in the topology graph and determine the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node. Receive engineering rule information, match the corresponding connection form for each type of pipe fitting in the topology diagram according to the engineering rule information, and synchronously match the connection form information to each component connected to the pipe fitting; Integrate project information and acquired component information to generate and output structured result data. The component information includes a list of various pipe fittings and connection type information.
[0006] In one embodiment, the step of constructing a topology map representing the connection relationships between various components in the piping system based on the component data of the piping system in the electronic drawings includes: Construct a topology graph of the pipeline system using the endpoints of each pipe segment as nodes and the body of each pipe segment as edges.
[0007] In one embodiment, the step of constructing a topology graph of the pipeline system using the endpoints of each pipe segment as nodes and the body of each pipe segment as edges includes: Using the endpoints of pipe segments as nodes and the bodies of each pipe segment as edges, construct a directed connection graph between the components in the pipeline system. Convert a directed connected graph into an undirected graph; Nodes that overlap in the undirected graph are merged to form an undirected topology graph of the pipeline system.
[0008] In one embodiment, the step of traversing each node in the topology graph and determining the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node includes: When only two pipe branches are connected at a node, the spatial angle between the direction vectors of the two pipe branches is obtained, and the fitting at the node is determined to be an elbow fitting with the corresponding angle based on the matching relationship between the preset engineering standard angle and the spatial angle. If the number of pipe branches connected at a node is greater than 2, the pipe fitting at that node is determined to be a branch type pipe fitting, and the corresponding multi-way pipe fitting type is further determined based on the number of branches in each pipe segment.
[0009] In one embodiment, after the step of traversing each node in the topology graph and determining the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node, the data processing method further includes: Traverse each node in the topology graph where the pipe fitting type has been determined, and compare the pipe diameter specifications of adjacent pipe segments connected to the same node. If the pipe diameters of adjacent pipe segments connected to the same node are inconsistent, the node is designated as the insertion point for the reducer, and a unique reducer identification information is generated based on the pipe diameters of the adjacent pipe segments connected to the node. In the topology graph, disconnect the original connection at the insertion point of the reducer, insert the node corresponding to the reducer, and establish a new connection between the node corresponding to the reducer and the original adjacent pipe segment to update the topology graph.
[0010] In one embodiment, after the step of matching corresponding connection forms for each type of pipe fitting in the topology diagram according to engineering rule information, and synchronously matching the connection form information to each component connected to the pipe fitting, the data processing method further includes: Select the connection types that require independent measurement from various connection types; Generate component data for the connection attachments corresponding to the selected connection types, and include this component data in the engineering quantity calculation.
[0011] In one embodiment, prior to the step of integrating project information and the acquired component information, the data processing method further includes: Based on the spatial relationship between the piping system and the building structure, determine the location of other non-explicitly drawn components; Include the component data corresponding to other non-explicitly drawn components in the scope of the engineering quantity calculation.
[0012] In one embodiment, the step of determining the location of other non-explicitly drawn components based on the spatial relationship between the piping system and the building structure includes: The number and placement of supports are determined based on the geometric parameters, spatial orientation, and pre-set engineering rules of each pipe section. By using three-dimensional geometric intersection detection, the locations where the pipe segments pass through walls and floors are confirmed, and corresponding sleeve component information is generated at these locations.
[0013] According to a second aspect of the present application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the data processing method described above.
[0014] According to a third aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-described data processing method.
[0015] The data processing method provided in this embodiment first constructs a topology diagram based on the various component data of the pipeline system in the electronic drawings, transforming the discrete components into a graph structure with clear connection relationships. Then, it traverses each node in the topology diagram and automatically identifies the type of pipe fitting at each node based on the number of connections and spatial vector relationships of the pipe segments at the node. This avoids dependence on specific pipe fitting symbols in the drawings and reduces the problem of missed identification due to missing symbols or non-standard drawing. In addition, it can match the corresponding connection form for each type of pipe fitting according to the received engineering rule information and synchronously match the connection form information to each component connected to the pipe fitting, thereby ensuring the consistency of connection method labeling. Finally, it integrates project information with the above-mentioned various component information to output structured result data. Through the above data processing method, pipe fitting type identification, connection form matching, and structured output of engineering information in the pipeline system can be automatically completed without manual judgment, effectively reducing the workload of manual drawing interpretation, reducing the problem of omissions and misjudgments caused by subjective judgment, and improving the data consistency and reusability of engineering quantity statistics and cost calculation. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 2 This is a partial flowchart of a data processing method provided in another embodiment of this application; Figure 3 This is a partial flowchart of a data processing method provided in another embodiment of this application; Figure 4 This is a partial flowchart of a data processing method provided in another embodiment of this application; Figure 5 This is a partial flowchart of a data processing method provided in another embodiment of this application. Detailed Implementation
[0017] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0018] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0019] 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. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0021] As described in the background section, in the field of construction engineering cost estimation, the calculation of the quantities of pipe fittings in a piping system is a core component of budgeting and settlement work. Currently, the industry generally relies on cost engineers to manually interpret CAD design drawings, judging pipe routes, fitting types, connection methods, and quantities based on experience. This method has significant shortcomings in practical applications: on the one hand, manual quantity calculation is inefficient and difficult to adapt to the needs of large-scale projects with large-scale drawings and complex components; on the other hand, the manual identification and judgment process is highly subjective, easily leading to omissions, duplicate statistics, and misjudgments of connection methods, making it difficult to guarantee the accuracy and consistency of the quantity calculation results. This risk is even more pronounced when dealing with complex engineering logic.
[0022] In recent years, with the development of artificial intelligence technology, some automated graphic recognition solutions based on CAD drawings have emerged. However, most existing technologies remain at the geometric or primitive level of recognition, only able to identify basic graphic elements such as line segments, blocks, and polylines, enabling automatic statistics of basic engineering quantities such as pipe length and equipment quantity. This alleviates the burden of manual segment-by-segment measurement to some extent and has auxiliary value. However, the core technology of the aforementioned CAD recognition solutions still remains at the graphic level of pattern matching and geometric quantity conversion. Essentially, it directly maps geometric objects in drawings into engineering quantity data, lacking the ability to understand the engineering semantics of the overall structure of the pipeline system. It usually cannot construct complete pipeline system connection relationships, making it difficult to perform engineering reasoning based on spatial relationships and pipe diameter changes, and thus unable to automatically identify actual engineering components such as elbows, tees, crosses, and reducers. It also cannot dynamically associate the connection rules in the design specifications with specific component attributes, making it difficult to generate structured results that can be directly used for engineering quantity statistics and cost analysis.
[0023] Furthermore, many key engineering attributes in piping systems are not directly reflected in the drawings. For example, the connection methods of pipes and fittings are usually given in text form by design specifications or engineering standards, and are closely related to conditions such as pipe diameter range and system type. Existing CAD recognition solutions generally lack the ability to parse non-graphical information such as design specifications and standard clauses, and cannot dynamically associate textual rules with specific component attributes, thus failing to automatically determine connection methods such as threaded, grooved, welded, or flanged connections. This makes the connection method, a crucial piece of information that directly affects material selection and cost estimates, still highly dependent on manual reference to standards and manual annotation. At the same time, the quantity and location of components commonly found in engineering projects, such as supports, wall sleeves, and floor sleeves, need to be derived and calculated based on the pipe layout path, the spatial relationship of the building structure, and relevant standards, and are usually not drawn in explicit graphical form in CAD drawings. Existing graphic recognition-based technical solutions struggle to effectively model and automatically calculate these non-explicit components, resulting in significant deficiencies in the completeness and accuracy of engineering quantity results.
[0024] In summary, while existing CAD drawing recognition technologies can convert graphic information into engineering quantity data to some extent, they lack the ability to perform topological modeling, spatial reasoning, and engineering rule integration for piping systems. The resulting data remains at the level of "raw recognition data," making it difficult to use directly as a bill of quantities. Cost engineers still need to perform extensive manual corrections, reasoning, and completions, compromising both efficiency and accuracy. A significant technological gap exists between graphic recognition results and engineering semantic information that can directly drive quantity statistics and cost analysis.
[0025] To address the aforementioned problems, embodiments of this application provide a data processing method, a computer device, and a computer-readable storage medium.
[0026] Reference Figure 1 In one embodiment, a data processing method is provided, comprising the following steps: Step S300: Based on the various component data of the pipeline system in the electronic drawings, construct a topology diagram representing the connection relationship between the components in the pipeline system.
[0027] First, we can obtain the component data of the piping system in the electronic drawings after they have been identified using drawing analysis technology. Each component data item includes at least the component number, three-dimensional spatial coordinates, component type, and specifications. Component types can include pipe sections, equipment, etc. Once the component data is obtained, it can be standardized and converted from different input formats to generate a structured dataset, providing a unified data foundation for subsequent topology analysis.
[0028] In this embodiment, the aforementioned component data can be obtained using relatively mature CAD drawing parsing techniques. For example, the open-source library ezdxf (Python) or LibreDWG can be used to directly read the geometric entities and text annotations in the DWG / DXF file. Specifically, the CAD file is loaded, and layers (such as "pipeline", "equipment", "wall", "floor") are traversed. All LINE, LWPOLYLINE, and ARC entities are extracted, and the start and end coordinates are obtained. For polylines, they are split into line segments according to the vertex sequence. All INSERT (block reference) entities are extracted, and the equipment type (such as sprinkler head, valve) is identified according to the block definition. Pipe diameter annotations (such as "DN100") are extracted using TEXT and MTEXT entities, and the pipe diameter value is bound to the corresponding pipeline through spatial nearest neighbor matching. Structured JSON data is output, which may include a list of pipelines (start point, end point, pipe diameter), a list of equipment (center point, type), a list of walls (line segments), a list of floors (polygons), etc.
[0029] The following example illustrates the input and output in the CAD drawing parsing process: Input (key entity descriptions in DXF file): Pipe entity: LINE (0,10)-(50,10), layer "Pipe"; text "DN100" is located at (25,9). Device entity: INSERT block name "SPRINKLER", insertion point (50,10) Wall solid: LINE (30,0)-(30,50) Floor slab polygon: LWPOLYLINE (0,0)-(100,0)-(100,50)-(0,50) Output (standardized JSON): { "Horizontal pipelines": [ {"id": "pipe_1", "starting point": [0,10,0], "ending point": [50,10,0], "pipe diameter_mm":100}, {"id": "pipe_2", "starting point": [50,10,0], "ending point": [100,10,0], "pipe diameter_mm":80} ], "equipment": [ {"id": "eqp_1", "Type": "Nozzle", "Center Point": [50,10,0], "Installation Height": 3.2} ], "Wall": [ {"id": "wall_1", "Start point": [30,0,0], "End point": [30,50,0], "Thickness": 0.2} ], "Floor slab": [ {"id": "floor_1", "Polygon": [[0,0],[100,0],[100,50],[0,50]], "Thickness":0.1} ] } The above-mentioned drawing parsing technology for obtaining structured datasets from electronic drawings is existing technology. Any technology that can output structured datasets is applicable to this application, and this application does not make any specific limitations on it.
[0030] Once the data of various components of a pipeline system is obtained, the topological connections of the pipeline system can be constructed, thereby transforming discrete graphical elements into a network model with complete connections. This graph-based topology construction is the foundation for subsequent intelligent reasoning and is also the primary feature that distinguishes it from existing technologies that can only recognize isolated graphs.
[0031] Step S500: Traverse each node in the topology diagram and determine the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node.
[0032] Once the topology of the piping system is constructed, the type of pipe fitting at each node can be identified based on the number of pipe segments connected to the node and the spatial vector relationship between the pipe segments. For example, if a node is connected to only two pipe branch segments, and the spatial direction of the two pipe branch segments changes, then the pipe fitting at that node can be considered a turning pipe fitting, also known as an elbow fitting.
[0033] Step S700: Receive engineering rule information, match the corresponding connection form for each type of pipe in the topology diagram according to the engineering rule information, and synchronously match the connection form information to each component connected to the pipe.
[0034] Engineering rule information can be obtained by parsing project design specifications, engineering standard texts, and related technical documents using Retrieval Enhancement Generation (RAG) technology. This includes connection type rules, which describe the connection methods corresponding to different pipe diameter ranges, component types, or system categories. Connection types include, but are not limited to, threaded connections, grooved connections, welded connections, and flange connections.
[0035] Retrieval enhancement generation techniques can be implemented using mature natural language processing techniques that do not rely on large models. Specifically, it can be based on rule extraction using keywords and regular expressions: First, text acquisition is performed, i.e., reading the project design specification text (TXT, DOCX, or PDF); then, paragraph segmentation is performed, i.e., dividing paragraphs by chapter titles (such as "pipeline connection methods") or blank lines; finally, rule capture is performed, i.e., using regular expressions to match common connection form descriptions. r'(DN\d+)[^\d]*?[≤、<]*?(\d+)?[^\d]*?(threaded|threaded connection|threaded thread)' → Threaded connection r'(DN\d+)[^\d]*?[>、≥]*?(\d+)?[^\d]*?(Groove|Clamp)' → Groove connection r'(flange)' → Flange connection r'(welding)' → welded connection Finally, the captured connection methods are stored in a structured manner, that is, the rules are stored as a JSON rule table, for example: { "Connection rules": [ {"Minimum pipe diameter": 0, "Maximum pipe diameter": 50, "Connection method": "Threaded connection"}, {"Minimum pipe diameter": 65, "Maximum pipe diameter": 150, "Connection method": "Groove connection"}, {"Special Conditions": "Connection to Flange Valves", "Connection Method": "Flange Connection"} ] } When processing pipe fitting nodes, the rule table can be queried based on the pipe diameter and fitting type to obtain the corresponding connection method.
[0036] Additionally, if the design specifications include tables, the tables can be directly parsed (specifically, python-docx can be used to read Word tables) and converted into rules.
[0037] Based on the engineering rule information obtained from the analysis, the corresponding connection forms can be matched and labeled for each pipe connection point (node) in the topology diagram. At the same time, the connection forms corresponding to the pipe connection points can be synchronously matched to other components connected to them (such as pipeline components, equipment components, etc.), thereby ensuring the consistency of the labeling of connection forms among pipelines, pipe fittings, and equipment.
[0038] Step S900: Integrate project information and acquired component information, generate structured result data and output it. Component information includes a list of various pipe fittings and connection type information.
[0039] Specifically, project information can be pre-extracted from project design specifications, engineering standards, and related technical documents using retrieval-enhanced generation technology. This project information may include the project name, number of building floors, and engineering identification information. After completing the aforementioned topology map construction, pipe fitting type identification, and connection form matching, various component information is obtained, including lists of various pipe fittings and connection form information. The obtained lists of various pipe fittings, connection form information, and other component information can then be correlated and integrated with the project information to ultimately output structured result data containing project-level metadata and complete pipeline quantity information, which can be used for quantity statistics, cost analysis, or subsequent system calls.
[0040] The data processing method provided in this embodiment first constructs a topology diagram based on the various component data of the pipeline system in the electronic drawings, transforming the discrete components into a graph structure with clear connection relationships. Then, it traverses each node in the topology diagram and automatically identifies the type of pipe fitting at each node based on the number of connections and spatial vector relationships of the pipe segments at the node. This avoids dependence on specific pipe fitting symbols in the drawings and reduces the problem of missed identification due to missing symbols or non-standard drawing. In addition, it can match the corresponding connection form for each type of pipe fitting according to the received engineering rule information and synchronously match the connection form information to each component connected to the pipe fitting, thereby ensuring the consistency of connection method labeling. Finally, it integrates project information with the above-mentioned various component information to output structured result data. Through the above data processing method, pipe fitting type identification, connection form matching, and structured output of engineering information in the pipeline system can be automatically completed without manual judgment, effectively reducing the workload of manual drawing interpretation, reducing the problem of omissions and misjudgments caused by subjective judgment, and improving the data consistency and reusability of engineering quantity statistics and cost calculation.
[0041] In one embodiment, step S300, which is the step of constructing a topology map representing the connection relationships between the components of the pipeline system based on the various component data of the pipeline system in the electronic drawing, may further include: A topology graph of the pipeline system is constructed using the endpoints of each pipe segment as nodes and the pipe body as edges. That is, the endpoints of the pipe segments in the pipeline system can be used as graph nodes, and the pipe body (i.e., the pipeline entity) can be used as graph edges. At the same time, by combining spatial coordinates and preset geometric tolerance thresholds, a connection relationship graph of the pipeline system can be established, which is a topology graph that reflects the connection relationship between the components in the pipeline system.
[0042] In this embodiment, the geometric tolerance threshold is used to determine whether the endpoints of two pipelines (or pipe segments) belong to the same node (i.e., whether they should be connected). The size of the geometric tolerance threshold is related to the coordinate accuracy and overall scale of the CAD drawing. In this application, a method combining theoretical derivation and actual measurement calibration can be used to determine each geometric tolerance threshold, as follows: First, an adaptive tolerance calculation framework is theoretically established: traverse the coordinates of all pipeline endpoints, count the minimum number of significant digits of the coordinates (for example, coordinate value 123.456 represents 0.001m accuracy), and take the absolute tolerance ε_abs as 5 times the coordinate resolution (i.e., if the resolution is 0.001m, then ε_abs = 0.005m); at the same time, calculate the minimum length L_min of all pipelines, and take the relative tolerance ε_rel = 0.005 (0.5%); the final theoretical tolerance value δ = max(ε_abs, ε_rel × L_min).
[0043] Within the aforementioned theoretical framework, for example, a systematic test is conducted on the fire sprinkler system drawings of a large commercial building containing 313 horizontal pipelines (the building dimensions of the drawings are 100m × 100m, L_min is approximately 0.3m, ε_rel × L_min is approximately 0.0015m, ε_abs = 0.005m, and the theoretical δ is approximately 0.005m). Through numerous test iterations, the tolerance parameters (i.e., geometric tolerance thresholds) can ultimately be calibrated to the following fixed values: The above calibration values were verified using five real CAD drawings at different scales (1:50, 1:100, 1:150) and with different levels of precision (±1mm high precision to ±10mm low precision). Under all drawing conditions, the pipe connection relationships were correctly established, with an F1-score exceeding 96%. For drawings with abnormal coordinate scaling, over-connection can be avoided by manually setting an upper limit for the absolute tolerance (e.g., no more than 200mm).
[0044] Explanation of the source of tolerance parameter calibration values: (1) Endpoint tolerance 80.0mm: Referring to the accuracy requirements of CAD drawing in the "Unified Standard for Building Drawing" (GB / T 50001-2017), the annotation error of pipeline endpoint coordinates in building drawings is generally in the range of 10~50mm. Taking into account the annotation habits of different design units and the cumulative error when multiple systems are superimposed, the endpoint tolerance is taken as 80mm, which effectively suppresses false detection on the premise of ensuring that no real connection is missed.
[0045] (2) Mid-section tolerance 10.0mm: Used to determine whether the end of the pipeline falls on the mid-section of another pipeline (the case where pipelines intersect but the ends are not aligned). This value refers to the provisions on pipeline positioning accuracy in the depth requirements of the construction drawing design documents for building water supply, drainage and fire protection facilities, and is taken as twice the allowable deviation of pipeline positioning (the design allowable deviation is about ±5mm).
[0046] (3) Collinearity tolerance of 15.0 mm: used to determine whether two pipelines should be considered collinear (parallel pipelines are tested together). Referring to the positioning tolerance of beams, slabs and walls in building structural design, 15 mm is taken as the collinearity judgment threshold, which can effectively identify parallel pipelines that are designed to be continuous, while avoiding misjudging independent pipelines with small spacing as the same pipeline.
[0047] (4) Collinearity threshold 0.98: The absolute value of the dot product of the direction vectors, reflecting the degree of parallelism between the two pipeline directions. 0.98 corresponds to an angle of about 11 degrees between the two direction vectors. The value is taken with reference to the definition angle of approximate parallelism in the architectural drawing specifications (usually 10~15 degrees), taking into account both detection accuracy and fault tolerance.
[0048] All of the above tolerances can be encapsulated as configurable items and stored in the tolerance section of the calc_rules.json configuration file, allowing users to fine-tune the parameters according to the specific characteristics of the project drawings.
[0049] Furthermore, referring to Figure 2 The steps for constructing a topology graph of a pipeline system, using the endpoints of each pipe segment as nodes and the body of each pipe segment as edges, can further include: Step S310: Using the endpoints of the pipe segments as nodes and the bodies of each pipe segment as edges, construct a directed connection graph between the components in the pipeline system. Step S320: Convert the directed graph into an undirected graph; Step S330: Merge nodes with overlapping positions in the undirected graph to form an undirected topology graph of the pipeline system.
[0050] That is, from the various standardized data obtained in step S100, directed connection relationships between components can be extracted based on the principle of using the endpoints of pipe segments as nodes and the body of pipe segments as edges, forming a directed connection graph of the pipeline system. This directed connection graph is then converted into an undirected graph. Specifically, this may include: establishing bidirectional adjacency relationships to convert directed edges into undirected edges; using normalization methods to convert ordered index pairs into standardized edge representations; and maintaining a set of undirected edges of geometric relationship types such as connection relationships, perpendicular relationships, and parallel relationships. Finally, based on the undirected graph, nodes with overlapping positions are merged and optimized, and the comprehensive connection relationships of the merged nodes are calculated to form the final undirected topology graph.
[0051] In one embodiment, in step S500, which involves traversing each node in the topology graph and determining the type of pipe at the node based on the number of pipe segments connected and the spatial vector relationship at the node, connection relationship information for each node can be obtained, including the number of pipe segments connected to that node and the spatial orientation characteristics of each connected pipe segment. Based on this, the node type can be classified according to the connection pattern of the pipe segments at the node.
[0052] Specifically, when a node connects only two pipe branches (node degree is 2), the spatial angle between the direction vectors of the two pipe branches is obtained. Based on the matching relationship between the preset engineering standard angle and this spatial angle, the fitting at the node is determined to be an elbow fitting of the corresponding angle, i.e., a turning fitting. When the number of pipe branches connected at a node is greater than 2, the fitting at the node is determined to be a branch fitting. The corresponding multi-way fitting type is further determined based on the number of branches in each pipe branch. For example, if the node connects 3 pipe branches (node degree is 3), it can be identified as a tee fitting; if the node connects 4 pipe branches (node degree is 4), it can be identified as a four-way fitting, and so on.
[0053] For nodes connected to equipment components, the connection relationship of the node, the type of the connected object and its geometric characteristics can be comprehensively considered to determine that it is a special pipe fitting node connected to the equipment, and its type can be labeled accordingly.
[0054] The above method enables intelligent identification of elbows, branch fittings, and equipment connection fittings based solely on the topological features and geometric relationships of the piping system, without relying on explicit fitting symbols in the drawings. This provides reliable basic data for subsequent generation of reducers, identification of connection methods, and calculation of quantities.
[0055] Reference Figure 3 In one embodiment, after step S500, which involves traversing each node in the topology graph and determining the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node, the data processing method provided in this embodiment may further include: Step S610: Traverse each node in the topology diagram where the pipe fitting type has been determined, and compare the pipe diameter specifications of adjacent pipe segments connected to the same node. Step S620: If the pipe diameter specifications of adjacent pipe segments connected to the same node are inconsistent, then the node is determined as the insertion position of the reducer, and a unique reducer identification information is generated according to the pipe diameter specifications of the adjacent pipe segments connected to the node. Step S630: Disconnect the original connection at the insertion position of the reducer in the topology diagram, insert the node corresponding to the reducer, and establish a new connection between the node corresponding to the reducer and the original adjacent pipe segment to update the topology diagram.
[0056] In other words, after identifying the pipe fitting type, the system can further analyze the pipe diameter variations within the piping system to automatically generate reducers. Specifically, it can traverse nodes whose fitting types have been identified and compare the pipe diameters of adjacent pipe segments connected to those nodes. When a discrepancy in pipe diameter between adjacent segments is detected, the system designates the node's location as the insertion point for the reducer. Then, based on the pipe diameters of each adjacent segment, corresponding reducer identification information can be generated. The existing direct connections in the undirected topology graph are then disconnected, and a node representing the reducer is dynamically inserted. This node is then linked to each of the original adjacent pipe segments, thus updating the piping system topology.
[0057] It should be noted that the nodes corresponding to the aforementioned reducing pipes refer to the pipe fittings configured at those nodes, including but not limited to reducing pipes. Reducing pipes are further categorized into reducing straight pipes, reducing elbows, reducing tees, reducing crosses, etc. For example, in practical applications, a reducing straight pipe, a reducing elbow, or a reducing tee can be configured alone at this node, or a combination of matching reducing straight pipes and standard tees can be configured simultaneously. The specific configuration method can be determined by comprehensively considering the number of pipe segments connected at the same node, the diameter specifications of adjacent pipe segments, and the spatial vector relationship when configuring the pipe fittings.
[0058] In the above embodiment, steps S500 and S610 to S630 are executed sequentially. That is, firstly, the type of pipe fitting at the node is determined according to the number of pipe segments connected at the node and the spatial vector relationship (at this time, reducers are not considered). Then, the type of pipe fitting at the corresponding node is changed in combination with the pipe segment diameter to take reducers into account.
[0059] In another embodiment, the pipe diameter can also be taken into consideration in step S500, that is, the final required pipe configuration at the node can be determined directly based on the number of pipe connections at the node, the spatial vector relationship, and the pipe diameter.
[0060] For example, when the node degree is 4, the two pairs of opposite directions formed by the four pipe segments are judged separately. If the pipe diameters of the two pipe segments on the same direction are inconsistent, a reducer is inserted on the side of the pipe segment with the smaller diameter. The two diameters of the reducer are the diameter of the horizontal pipe on that side and the diameter of the horizontal pipe on the other side, respectively. If the pipe diameters of the four pipe segments are all equal, it is judged as a standard tee. When the node degree is 3, if the pipe diameters of the three pipe segments are not all equal, it is judged as a reducing tee. A reducer is inserted between the pipe segment with the smaller diameter and the other pipe segments. The two diameters of the reducer are the diameter of the pipe segment and the diameter of the other pipe segment connected to it, respectively. If the pipe diameters of the three pipe segments are all equal, it is judged as a standard tee. When the node degree is 2, further distinctions are made: if the two pipe segments have different diameters, they are identified as reducers; if the two pipe segments have the same diameter and their direction vectors are parallel, they are identified as invalid connections; if the two pipe segments have the same diameter but their direction vectors are not parallel, they are identified as elbows. The angle of the elbow is calculated by taking the two-dimensional cross product of the direction vectors of the two branches to obtain the actual turning angle, and then mapping it to the nearest standard angle (30°, 45°, 60°, or 90°). For nodes connecting pipes and equipment components, if the node degree is 2 and one of the branches is an equipment interface, it is identified as the corresponding connecting fitting based on the equipment type and pipeline routing.
[0061] The following summarizes the pipe fitting configuration methods at nodes under various conditions: When the node degree is 2, meaning only two pipe segments connect to the node, let the diameters of the two pipe segments be d1 and d2, and the angle between their direction vectors be θ (0° represents collinearity in the same direction, 180° represents collinearity in opposite directions, and other angles represent bends). The table below shows the pipe fitting configurations for different situations at this node: When the node degree is 3, meaning there are three pipe segments connecting to the node, the two pipe segments in opposite directions (with an included angle of approximately 180°) are the main pipes, and the remaining segments are the branch pipes. Let the pipe diameters on both sides of the main pipe be d_main1 and d_main2, and the branch pipe diameter be d_branch. The table below shows the pipe configuration for different situations at this node: Example: The main pipe is DN100 on one side and DN80 on the other side, and the branch pipe is DN80 → Insert a DN100×80 reducer on the DN80 side, and then create a standard tee (the tee is DN100 in all three directions).
[0062] When the node degree is 4, meaning there are four pipe segments connecting the node, there are two pairs of opposite directions (e.g., the X-axis direction and the Y-axis direction). Each pair of opposite directions is handled separately: If the pipe diameters on both sides are the same in a certain direction, no operation is required; If the pipe diameters on both sides are different, insert a reducer on the side with the smaller diameter to make the pipe diameters uniform in that direction; After all reducers are inserted, a standard four-way fitting is generated at the center node.
[0063] At the same time, the criteria for determining reducing tees (integral components) are added: If the pipe diameters on both sides of the X direction are equal, the pipe diameters on both sides of the Y direction are equal, and the pipe diameters in the two directions are not equal, then a reducing tee is directly generated and labeled as DN{X}×DN{Y} without the need to insert a reducing pipe.
[0064] Example: Both sides in the X direction are DN100, and both sides in the Y direction are DN80 → reducing cross DN100×80.
[0065] Example: DN100 on one side and DN80 on the other side → Insert a DN100×80 reducer on the DN80 side, and then create a standard tee (the tee is DN100 in all four directions).
[0066] In addition, the above logic was verified using 54 typical nodes (12 at 2 degrees, 26 at 3 degrees, and 16 at 4 degrees). The results are as follows: Overall accuracy: 52 / 54 = 96.3%.
[0067] This method can automatically complete the calculation of necessary reducing pipe components that are not explicitly drawn in the drawings, effectively ensuring the completeness of the engineering quantity calculation results.
[0068] Reference Figure 4 In one embodiment, after step S700, which involves matching the corresponding connection forms for each type of pipe in the topology diagram based on engineering rule information and synchronously matching the connection form information to each component connected to the pipe, the data processing method provided in this embodiment may further include: Step S810: Select the connection types that need to be measured independently from various connection types; Step S820: Generate component data for the connection attachments corresponding to the selected connection types, and include the component data in the scope of the engineering quantity calculation.
[0069] After identifying the pipe fitting type and inserting the reducer, the system can further intelligently determine and consistently backfill the connection methods at each node based on the acquired engineering rule information. Simultaneously, for each connection type, it can determine whether independent measurement is required, thereby filtering out the connection types that need independent measurement. Based on the aforementioned connection type labeling results, the system automatically generates the corresponding component data for the connection members and includes it in the quantity calculation scope. This component data can be used for subsequent quantity calculations.
[0070] Specifically, the screening rules can be based on the "General Installation Engineering Quantity Calculation Standard" (GB 50856-2013) and industry-standard pricing practices. The specific screening rules are as follows: Users can also dynamically add connection types that require independent metering through external configuration files (JSON format).
[0071] Reference Figure 5 In one embodiment, prior to step S900, i.e., the step of integrating project information and the acquired component information, the data processing method provided in this embodiment may further include: Step S830: Based on the spatial relationship between the piping system and the building structure, determine the positions of other non-explicitly drawn components; Step S840: Include the component data corresponding to other non-explicitly drawn components into the scope of the engineering quantity calculation.
[0072] In this embodiment, in addition to identifying the aforementioned non-explicitly drawn components such as elbows, multi-way fittings, and reducers, the spatial relationship between the pipeline system and the building structure can also be analyzed to identify and generate other non-explicitly drawn components. Furthermore, the component data corresponding to the identified and generated other non-explicitly drawn components can also be included in the scope of engineering quantity calculation, thereby improving the completeness and accuracy of pipeline system engineering quantity calculation.
[0073] Furthermore, step S830 may further include: Step S831: Determine the number and placement of supports based on the geometric parameters, spatial orientation, and preset engineering rules of each pipe section.
[0074] Specifically, based on the pipe diameter, length, and spatial orientation of each pipe segment, and in conjunction with pre-defined support spacing specifications and other engineering rules, the required number of supports can be calculated, and the installation coordinates of each support can be determined using a geometric distribution algorithm. More specifically, the corresponding pipe axis can be determined in three-dimensional space based on the starting and ending coordinates of the pipeline; then, according to the calculated number of supports, they can be regularly distributed along the pipe axis; and finally, the spatial coordinates corresponding to each distribution point can be determined as the theoretical installation position coordinates of the supports.
[0075] Step S832: Confirm the wall penetration location and floor penetration location of the pipe segment through three-dimensional geometric intersection detection, and generate corresponding sleeve component information at the wall penetration location and floor penetration location.
[0076] In this embodiment, the spatial geometric information of each pipe component can be obtained, and combined with building structure data, the relative positional relationship between the pipe and building components such as walls and floors in three-dimensional space can be comprehensively judged. By analyzing the spatial interaction relationship between the pipe axis and building structure components, when it is determined that the pipe passes through a wall or floor in the radial path, the wall penetration location and floor penetration location can be determined as the installation location where the sleeve needs to be installed.
[0077] Specifically, when a pipe intersects or penetrates a wall component, that location can be identified as a wall sleeve location; when a pipe is continuously arranged along the same spatial location between adjacent floors and penetrates a floor slab component, that location can be identified as a floor sleeve location. By analyzing the above spatial relationships, it is possible to distinguish between different types of sleeve installation scenarios.
[0078] After determining the sleeve installation location, the corresponding sleeve component information can be automatically generated based on the information extracted from the design specifications by RAG. The sleeve component information includes at least the sleeve type, spatial coordinates, and information on its associated piping components. The generated sleeve component information is recorded as an independent component unit and uniformly incorporated into the quantity survey and subsequent result output process.
[0079] Through the above implementation methods, the identification and generation of sleeve components can be automatically completed based on the spatial relationship between pipelines and building structures without the need for manual annotation, thereby improving the completeness and accuracy of pipeline engineering quantity calculation.
[0080] In summary, this embodiment can automatically construct the topological connection relationship of the pipeline system based on the CAD drawing recognition results. Based on the topological structure and engineering rules, it can realize intelligent reasoning and automatic generation of engineering semantic information such as pipe fitting type, connection method, support and sleeve, so that the recognition results can directly serve the engineering quantity statistics and cost analysis, without relying on manual experience.
[0081] In this embodiment, the pipeline system can be used for fire protection, and it can also be extended according to the component types and engineering rules of different professional systems, such as being widely applied to various engineering fields such as water supply and drainage, HVAC, industrial pipelines, and municipal pipe networks.
[0082] Based on the same inventive concept, in one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described data processing method.
[0083] The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores various types of data involved in the data processing method. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.
[0084] Based on the same inventive concept, in one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described data processing method.
[0085] Based on the same inventive concept, in one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the above-described data processing method.
[0086] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0087] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0088] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data processing method, characterized in that, include: Based on the component data of the pipeline system in the electronic drawings, a topology diagram representing the connection relationship between the components in the pipeline system is constructed. Traverse each node in the topology diagram and determine the type of pipe fitting at the node based on the number of pipe segments connected and the spatial vector relationship at the node. This includes: when there are only two pipe segment branches connected at the node, obtain the spatial angle between the direction vectors of the two pipe segment branches, and determine the pipe fitting at the node to be an elbow fitting of the corresponding angle based on the matching relationship between the preset engineering standard angle and the spatial angle; when the number of pipe segment branches connected at the node is greater than 2, determine the pipe fitting at the node to be a branch type fitting, and further determine the corresponding multi-port fitting type based on the number of branches in each pipe segment. Traverse each node in the topology graph where the pipe type has been determined, and compare the pipe diameter specifications of adjacent pipe segments connected to the same node. If the pipe diameter specifications of adjacent pipe segments connected to the same node are inconsistent, then determine the node as the insertion position of the reducer, and generate unique reducer identification information based on the pipe diameter specifications of the adjacent pipe segments connected to the node. Disconnect the original connection relationship at the reducer insertion position in the topology graph, insert the node corresponding to the reducer, and establish a new connection relationship between the node corresponding to the reducer and the original adjacent pipe segments to update the topology graph. Receive engineering rule information, match the corresponding connection form for each type of pipe fitting in the topology diagram according to the engineering rule information, and synchronously match the connection form information to each component connected to the pipe fitting; Integrate project information and acquired component information to generate and output structured result data. The component information includes a list of various pipe fittings and connection type information. Before integrating project information and the acquired component information, the location of other non-explicitly drawn components is determined based on the spatial relationship between the piping system and the building structure, and the component data corresponding to these other non-explicitly drawn components are included in the engineering quantity calculation.
2. The data processing method according to claim 1, characterized in that, The steps of constructing a topology map representing the connection relationships between various components in the pipeline system based on the component data of the pipeline system in the electronic drawings include: Construct a topology graph of the pipeline system using the endpoints of each pipe segment as nodes and the body of each pipe segment as edges.
3. The data processing method according to claim 2, characterized in that, The steps for constructing a topology graph of the pipeline system using the endpoints of each pipe segment as nodes and the body of each pipe segment as edges include: Using the endpoints of pipe segments as nodes and the bodies of each pipe segment as edges, construct a directed connection graph between the components in the pipeline system. Convert a directed connected graph into an undirected graph; Nodes that overlap in the undirected graph are merged to form an undirected topology graph of the pipeline system.
4. The data processing method according to claim 1, characterized in that, After the steps of matching the corresponding connection forms for each type of pipe fitting in the topology diagram according to the engineering rule information, and synchronously matching the connection form information to each component connected to the pipe fitting, the data processing method further includes: Select the connection types that require independent measurement from various connection types; Generate component data for the connection attachments corresponding to the selected connection types, and include this component data in the engineering quantity calculation.
5. The data processing method according to claim 1, characterized in that, The steps for determining the positions of other non-explicitly drawn components based on the spatial relationship between the piping system and the building structure include: The number and placement of supports are determined based on the geometric parameters, spatial orientation, and pre-set engineering rules of each pipe section. By using three-dimensional geometric intersection detection, the locations where the pipe segments pass through walls and floors are confirmed, and corresponding sleeve component information is generated at these locations.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the data processing method according to any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data processing method according to any one of claims 1-5.
Citation Information
Patent Citations
Engineering amount calculation method and terminal based on CAD vector data
CN121959707A