Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to improve the accuracy of spray pipeline engineering quantity calculation, the existing pipeline setting on a drawing can be correspondingly adjusted according to adjustment of a user in the calculation process, and the spray pipeline engineering quantity is calculated according to the adjusted pipeline. It can be seen that when calculating the pipe diameter of the pipeline, firstly, a tree structure corresponding to the spray pipeline loop in the drawing identification range is constructed by utilizing the geometric position relation and the connection relation of the identified spray nozzle and the pipeline, and then calculation is carried out based on the tree structure, the attribute information of the pipeline and the professional specification information; on the other hand, when calculating the pipe diameter, the calculation is performed based on a tree structure by combining the attribute information and the professional specification information of the pipeline, so that the pipeline is ensured to be in a spray pipeline loop, and the attribute requirements and the professional specification requirements are met.
Specific embodiments of the method, apparatus, storage medium and computer device for calculating the engineering quantity of a spray pipeline provided by the present invention will be described in detail below.
Example 1
The embodiment of the invention provides a method for calculating the engineering quantity of a spray pipeline, by which the accuracy of the calculation of the engineering quantity of the spray pipeline is improved, meanwhile, the existing pipeline setting on a drawing can be correspondingly adjusted according to the adjustment of a user in the calculation process, and the engineering quantity of the spray pipeline is calculated according to the adjusted pipeline.
Step S101: and obtaining the construction drawing information.
In the invention, the building drawing refers to a drawing comprising spray pipeline configuration information, the building drawing information comprises building image data and/or building parameter data, optionally, in one embodiment, a user can import a building drawing to be calculated into a software system executing the method of the embodiment, after the system displays the drawing, the user can select a region to be calculated through frame selection operation or broken line selection operation according to service requirements, and the system acquires building drawing information corresponding to the region selected by the user.
Or in one embodiment, the user can import the building drawing to be calculated into a software system executing the method of the embodiment, and input parameters which can limit the drawing recognition range, such as the length, the width and the like of the area, in a parameter receiving window, and the system acquires the building drawing information corresponding to the parameter limiting area input by the user.
Or may obtain construction drawing information based on other operations or instructions, which the present application is not limited to.
Step S102: and determining the spray heads and pipelines in the construction drawing information.
After the construction drawing information is acquired, in step S102, the nozzles and the pipelines in the construction drawing information are determined. Optionally, data corresponding to the spray heads and the pipelines can be screened out from the construction drawing information in a data screening mode; optionally, an image corresponding to the spray head and the pipeline can be identified in an image corresponding to the building drawing information in an image identification manner, for example, in a CAD drawing, a model is composed of CAD elements, specifically including point elements, line elements, block elements and the like, wherein for a spray pipeline model, the pipeline is expressed by the line elements, the spray head is expressed by the block elements, and when the spray head and the pipeline in the building drawing information are determined, the line elements and the block elements in the building drawing information are extracted, specifically, the CAD elements in the CAD drawing information are filtered according to a drawing area determined by a user, and the line elements and the block elements are reserved; then, for the extracted block elements, screening is further performed according to the shape and the size of the spray head, the block elements conforming to the preset shape and the size are determined to be the spray head, the preset shape and the size can be set based on a legend corresponding to the spray head, and for the extracted line elements, after the spray head is determined, the line elements with connection relation with the spray head are further determined to be the pipeline. Optionally, after the step of extracting the line elements and the block elements in the construction drawing information, when determining the spray nozzles and the pipelines, the information such as the layers and colors of the block elements and the line elements can be combined at the same time to determine, for example, that a plurality of block elements which conform to the preset shape and size and belong to the same layer and/or have the same color are determined to be the spray nozzles, and for example, that a plurality of line elements which have a connection relationship with the spray nozzles and belong to the same layer and/or have the same color are determined to be the pipelines, so that the accuracy of identifying the spray nozzles and the pipelines is improved, and the accuracy of calculating the engineering quantity of the spray pipelines is further improved.
Step S103: and constructing a tree structure according to the geometric position relationship and the connection relationship of the pipeline and the spray head.
Specifically, the spraying system comprises a main pipeline, a branch pipeline and equipment arranged at the tail end of the branch pipeline, wherein a water inlet is used as the starting end of the spraying system, a spray head is used as the tail end of the spraying system, and the pipeline and the spray head are integrally communicated loops, so that the spraying system can be abstracted into a tree structure. Optionally, when constructing the tree structure, taking the intersection position of the pipeline as a branch node of the tree structure, taking the spray head as a leaf node of the tree structure, taking the tail end of the pipeline which is not connected with the spray head as a root node of the tree structure, specifically, after determining the branch node and the leaf node, backtracking branches according to the leaf node, backtracking the trunk, and finally, a loop which is clearly communicated through the geometric position relation and the connection relation, wherein the tail end of the pipeline which is not connected with the spray head belongs to a water inlet of the spray system, taking the water inlet as the root of the tree structure, and finally, traversing the nodes step by step to construct the tree structure of the spray system.
Step S104: and acquiring attribute information and professional specification information of the pipeline.
Specifically, the attribute information of the pipeline comprises a pipeline model, a pipeline arrangement style, material information of the pipeline, a connection mode of the pipeline and a spray head and the like, and all pipeline limiting information affecting the pipeline diameter is the attribute information of the pipeline in the invention; the professional specification information of the pipeline comprises pipeline diameter ranges and the like specified by the pipeline under different dangerous grade requirements and different use places, and the industrial specification aiming at the pipeline diameter in the spraying system belongs to the professional specification information of the pipeline.
The user can set the attribute information of the pipeline and the professional specification information to be observed by the pipeline according to actual requirements, for example, a configuration interface for setting the attribute information of the pipeline and the professional specification information is provided, the attribute information and the professional specification information of the pipeline are displayed through the interface, meanwhile, in the interface, the user can configure and adjust the attribute information and the professional specification information of the pipeline in the building drawing information through selection operation and/or information input operation, and the system obtains the attribute information and the professional specification information of the pipeline based on the operation of the user.
Optionally, a configuration interface can be set through double-window design, a common modification interaction control is placed in the main window, a regular setting is placed in the child window, the parent window controls the child window to be hidden, and the life cycle of the two windows is consistent. The master window may control type switching of the "modify" command state. All tables and controls in the configuration interface follow the Model/View principle, and the display operations such as window and preview can only directly display data, and cannot be modified and displayed differently from the authenticity of the data, so that the obtained result is ensured, the common attributes of the pipeline are provided for the user to be set in the configuration window, and the condition that the attributes of the pipeline are displayed one by one after the identification, namely the configuration window, is avoided, so that the attributes of the pipeline are set.
Step S105: and calculating the pipe diameter of the pipeline according to the tree structure, the attribute information and the professional specification information.
Specifically, in one case, according to the tree structure, the number of the nozzles connected to each pipeline can be determined, for example, a pipeline branches into three branches, two nozzles are connected to each branch, the number of the nozzles connected to the pipeline is six, the number of the nozzles connected to the pipeline where each branch is located is two, and then the pipe diameter of the pipeline is determined on the premise of connecting the nozzles with the corresponding number according to the attribute information and the professional specification information of the pipeline. Optionally, firstly determining the number of the spray heads connected with the pipeline according to the tree structure, then determining the corresponding pipe diameter range when the pipeline has the capacity of connecting the number of the spray heads according to the professional specification information, obtaining a first pipe diameter range, and finally determining the pipe diameter of the pipeline in the first pipe diameter range according to the attribute information. Therefore, when the user adjusts the attribute information and the professional specification information, the calculated pipe diameter may be changed accordingly.
Or in another case, determining the corresponding relation between the number of the spray heads required to be connected with the pipeline and the pipe diameter according to the attribute information and the professional specification information, then determining the number of the spray heads actually connected with the pipeline based on the tree structure, and finally determining the pipe diameter of the pipeline according to the corresponding relation between the number of the spray heads and the pipe diameter and the number of the spray heads actually connected with the pipeline, so that when a user adjusts the attribute information and the professional specification information, the calculated pipe diameter can be changed correspondingly.
In the method for calculating the engineering quantity of the spray pipeline provided by the embodiment, firstly, construction drawing information is obtained, then, a spray head and a pipeline are determined in the construction drawing information, a tree structure is constructed according to the geometric position relation and the connection relation of the pipeline and the spray head, then, attribute information and professional specification information of the pipeline are obtained, finally, the pipe diameter of the pipeline is calculated according to the tree structure, the attribute information and the professional specification information, the pipe diameter is determined relatively completely depending on labels in the drawing, the quality requirement of the engineering quantity of the spray pipeline on the drawing can be reduced by the method provided by the embodiment, the calculation accuracy of the engineering quantity of the spray pipeline can be improved, in addition, the pipe diameter is calculated based on the tree structure corresponding to the spray system and combined with the attribute information and the professional specification information of the pipeline, the pipeline is ensured to be in a spray pipeline loop, and the requirements of the attribute requirement and the professional specification are met, and when a user modifies the attribute information and the professional specification met by the pipeline according to the needs, the pipe diameter calculation result of the pipeline is correspondingly the modified calculation result, so that the calculation of the engineering quantity of the spray pipeline is more flexible, and the user can conveniently adjust and design the spray pipeline.
Optionally, in one embodiment, before the step of calculating the pipe diameter of the pipeline according to the tree structure, the attribute information and the professional specification information, the method for calculating the spray pipeline engineering quantity further includes: carrying out outward expansion on the pipeline according to the shape of the pipeline to obtain an outward expansion area; extracting a digital identifier in the expansion area; and when the digital identification is extracted, identifying the digital identification to obtain the pipe diameter of the pipeline, wherein in the calculation method of the spray pipeline engineering quantity, when the digital identification is not extracted, the pipe diameter of the pipeline is calculated according to the tree structure, the attribute information and the professional specification information.
Specifically, the embodiment provides two manners of determining the pipe diameter of the pipeline, namely, firstly, the pipe diameter is determined through the digital identification of the pipeline in the drawing, namely, the pipeline is firstly subjected to expansion according to the shape of the pipeline, a parameter threshold value for limiting the size of an expansion area can be preset, the expansion is carried out in the threshold value, an expansion area is obtained, then the digital identification is extracted in the expansion area for identification, the pipe diameter identified by the digital identification extracted in the expansion area is taken as the pipe diameter of the pipeline, and when the digital identification is not extracted, the pipe diameter of the pipeline is calculated according to the tree structure, the attribute information and the professional specification information.
By adopting the calculation method of the engineering quantity of the spray pipeline, which is provided by the embodiment, the pipe diameter can be determined based on the pipe diameter of the pipeline marked in the original paper, and for the pipeline with the pipe diameter which cannot be determined based on the marking of the original paper, the calculation method can be further determined based on the tree structure of the characteristic spray system loop, the attribute information and the professional specification information of the pipeline set by a user, so that the user configuration operation can be reduced, and the calculation accuracy can be improved.
Further optionally, when the digital identifier is not extracted, determining the pipe diameter of the pipeline within the first pipe diameter range according to the attribute information includes: determining an upstream pipeline and a downstream pipeline of the pipeline to obtain a second pipe diameter range, wherein the end point value of the second pipe diameter range is the pipe diameter of the upstream pipeline and the pipe diameter of the downstream pipeline; and determining the pipe diameter of the pipeline in the intersection area of the first pipe diameter range and the second pipe diameter range according to the attribute information.
Specifically, based on the characteristic of loop circulation, the pipe diameter of the pipeline is smaller than that of the upstream pipeline and larger than that of the downstream pipeline, so that when the numerical identification cannot be extracted for a certain pipeline, the upstream pipeline and the downstream pipeline of the pipeline are determined through a tree structure, namely, one pipe diameter range of the pipeline is determined, the pipe diameter range is named as a second pipe diameter range in the invention, then an intersection area of the first pipe diameter range and the second pipe diameter range is determined, and the pipe diameter of the pipeline is determined in the intersection area.
By adopting the calculation method of the engineering quantity of the spray pipeline, which is provided by the embodiment, the pipe diameter of the pipeline is limited by the pipe diameter of the upstream pipeline and the pipe diameter of the downstream pipeline, so that the accuracy of pipe diameter calculation of the pipeline can be further improved.
Optionally, in one embodiment, before constructing the tree structure according to the geometric position relationship and the connection relationship of the pipeline and the nozzle, the method for calculating the engineering quantity of the spray pipeline further includes: modifying the spray head and/or the pipeline in response to the modifying operation;
Specifically, in calculating the engineering amount of the spray pipeline, the user may modify the spray nozzle and/or the pipeline, which may specifically include adding a pipeline, deleting a pipeline, modifying a pipeline position, adding a spray nozzle, deleting a spray nozzle, modifying a spray nozzle position, modifying a pipeline diameter, etc., e.g., by adding and/or deleting a selected pipeline, two fire-protection zones may be communicated; aiming at the non-standardization of the drawing, the two fireproof subareas are communicated by the repair drawing pipeline; the identification content may be manually adjusted for erroneous pipeline digital identifications.
By adopting the method for calculating the engineering quantity of the spray pipeline, which is provided by the embodiment, a user can modify the spray heads and/or pipelines in the spray system before constructing the tree structure, so that the user can revise or flexibly design the spray system on the basis of original paper, and a calculation result of the engineering quantity of the spray pipeline is obtained.
Optionally, in an embodiment, after the step of constructing the tree structure according to the geometric positional relationship and the connection relationship of the pipeline and the nozzle, the method for calculating the engineering quantity of the spray pipeline further includes: the sum of the lengths of all the pipelines in the tree structure is calculated.
Specifically, after the tree structure is obtained, the length sum of all pipelines in the tree structure is calculated, namely the length of the pipeline in the spraying system is obtained, so that redundant line elements in the drawing or the influence of incorrect pipeline setting on pipeline length calculation is avoided.
Example two
Corresponding to the first embodiment, the second embodiment of the present invention provides a device for calculating a spray pipeline engineering amount, and fig. 2 is a block diagram of the device for calculating a spray pipeline engineering amount according to the second embodiment of the present invention, as shown in fig. 2, the device includes: an acquisition module 201, a processing module 202 and a calculation module 203.
The acquisition module 201 is used for acquiring building drawing information, attribute information of pipelines and professional specification information; the processing module 202 is used for determining spray heads and pipelines in the building drawing information and constructing a tree structure according to the geometric position relationship and the connection relationship of the pipelines and the spray heads; and the calculating module 203 is used for calculating the pipe diameter of the pipeline according to the tree structure, the attribute information and the professional specification information.
Optionally, in one embodiment, the processing module 202 includes an extracting unit, a first determining unit and a second determining unit, where the extracting unit is configured to extract line elements and block elements in the building drawing information; the first determining unit is used for determining that the block elements conforming to the preset shape and size are the spray heads; and a second determining unit for determining the line element having a connection relationship with the head as a pipeline.
Optionally, in an embodiment, the processing module 202 further includes a first processing unit, a second processing unit, and a third processing unit, where the first processing unit is configured to take an intersection position of the pipeline as a branch node of the tree structure; the second processing unit is used for taking the spray head as a leaf node of the tree structure; the third processing unit is used for taking the tail end of the pipeline which is not connected with the spray head as a root node of the tree structure.
Optionally, in one embodiment, the calculation module 203 includes a third determining unit, a fourth determining unit, and a fifth determining unit, where the third determining unit is configured to determine the number of nozzles connected by the pipeline according to a tree structure; the fourth determining unit is used for determining the corresponding pipe diameter range when the pipeline has the capacity of connecting the number of spray heads according to professional specification information, so as to obtain a first pipe diameter range; and the fifth determining unit is used for determining the pipe diameter of the pipeline within the first pipe diameter range according to the attribute information.
Optionally, in an embodiment, the computing device for the engineering quantity of the spraying pipeline further includes an identification module, configured to, before the computing module 203 computes the pipe diameter of the pipeline according to the tree structure, the attribute information and the professional specification information, expand the pipeline according to its own shape to obtain an expanded area, extract a digital identifier in the expanded area, and identify the digital identifier to obtain the pipe diameter of the pipeline when the digital identifier is extracted, where the computing module 203 is further configured to, when the identification module cannot extract the digital identifier, compute the pipe diameter of the pipeline according to the tree structure, the attribute information and the professional specification information.
Optionally, in an embodiment, when the digital identifier is not extracted, the fifth determining unit is further configured to determine an upstream pipeline and a downstream pipeline of the pipeline, to obtain a second pipe diameter range, where an endpoint value of the second pipe diameter range is a pipe diameter of the upstream pipeline and a pipe diameter of the downstream pipeline, and determine, according to the attribute information, the pipe diameter of the pipeline in an intersection area of the first pipe diameter range and the second pipe diameter range.
Optionally, in an embodiment, the processing module 203 is further configured to modify the nozzle and/or the pipeline in response to the modification operation, and construct a tree structure according to the modified geometric position relationship and the connection relationship of the pipeline and the nozzle, and the computing device for the engineering quantity of the spray pipeline further includes a determining module configured to determine the length sum of the pipeline according to the tree structure.
Example III
The third embodiment provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster formed by a plurality of servers) that can execute a program. As shown in fig. 3, the computer device 01 of the present embodiment includes at least, but is not limited to: a memory 011, a processor 012, which may be communicatively connected to each other through a system bus, as shown in fig. 3. It is noted that fig. 3 only shows a computer device 01 having a component memory 011 and a processor 012, but it is understood that not all of the illustrated components are required to be implemented, and more or fewer components may alternatively be implemented.
In this embodiment, the memory 011 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, memory 011 may be an internal storage unit of computer device 01, such as a hard disk or memory of computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 01. Of course, the memory 011 may also include both the internal memory unit of the computer device 01 and its external memory device. In this embodiment, the memory 011 is generally used to store an operating system installed in the computer apparatus 01 and various application software, such as program codes of a shower pipeline engineering amount calculation apparatus of the second embodiment. Further, the memory 011 can also be used for temporarily storing various types of data that have been output or are to be output.
The processor 012 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 012 is typically used to control the overall operation of the computer device 01. In this embodiment, the processor 012 is configured to execute a program code stored in the memory 011 or process data such as a calculation method of a shower pipeline engineering amount, or the like.
Example IV
The fourth embodiment provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, performs a corresponding function. The computer readable storage medium of the present embodiment is used for storing a calculation device of the shower pipeline engineering quantity, and when executed by a processor, implements the calculation method of the shower pipeline engineering quantity of the first embodiment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.