City CAD (Computer Aided Design) data annotation matching method and related equipment

Through the annotation method of automatically matching the CAD data of urban underground pipelines, the problem of difficulty in annotation and pipeline association is solved, efficient conversion and reliable data association are achieved, and important reference is provided for urban lifeline risk assessment and project construction.

CN120523862APending Publication Date: 2025-08-22HEFEI INST FOR PUBLIC SAFETY RES TSINGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510644359.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

In the prior art, when converting CAD data in urban underground pipelines into shp data, the degree of automation of annotation information is low, the operation steps are complicated, and the annotation is difficult to associate with the pipeline, resulting in empty attribute values ​​and requires a lot of manual processing, which affects the accuracy and efficiency of data processing.

Method used

By obtaining the CAD data of the underground pipeline network in the city lifeline, extracting pipeline layers and annotation layers, filtering the target layer according to preset conditions, converting the annotation into attribute annotation features, and linking them through the proximity finder and attribute manager, integrating pipeline attributes and annotation features to achieve automated matching.

Benefits of technology

It improves data conversion efficiency, automatically completes the correlation between annotation content and line segments, improves the reliability and efficiency of annotation association, and provides a basic reference for urban lifeline risk assessment and project construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523862A_ABST
    Figure CN120523862A_ABST
Patent Text Reader

Abstract

The invention discloses an annotation matching method for urban CAD (computer-aided design) data and related equipment. The method comprises the following steps: acquiring to-be-processed CAD data of the urban lifeline underground pipe network, and extracting a pipeline layer and an annotation layer from the CAD data of the urban lifeline underground pipe network; screening out a target pipeline layer from the pipeline layers according to a first preset condition, and screening out a target annotation layer from the annotation layers according to a second preset condition; converting all character attribute annotations in the target annotation layer into corresponding attribute annotation point elements; determining attribute annotation point elements in a preset range of each pipeline in the target pipeline layer, and associating the attribute annotation point elements with the pipelines; associating the successfully associated attribute annotation point elements with unassociated pipelines in the target pipeline layer again; and integrating the pipeline attributes of all the pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list of all the pipelines in the target pipeline layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of urban data management technology, and specifically relates to a method for matching annotations of urban CAD data, a device for matching annotations of urban CAD data, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Urban underground pipelines, encompassing infrastructure such as water supply, drainage, gas, and heating, are the lifelines that sustain urban operations. Conventional technologies typically convert CAD data for urban underground pipelines into SHP data by directly importing the CAD data into a GIS software platform and utilizing the platform's built-in data conversion functionality. Annotation information within CAD layers is typically processed using the "spatial join" method within ArcGIS software, linking the annotations to vector CAD line segments and adding the annotation attributes to the vector data attribute table. However, this method has significant technical limitations. First, to ensure data accessibility and high error tolerance, the CAD annotations must first be imported into a geodatabase. After successful import, the annotations are converted to point data using the Feature to Point tool. Spatial joins are then performed using GIS tools after linking and matching, resulting in a complex process. Second, during the annotation conversion process, many pipelines are difficult to associate with annotations due to factors such as connection distance, missing annotations, and annotation location. This results in empty attribute values, requiring extensive manual processing to fill in the blank attributes. This results in a low degree of automation and a long mapping cycle. Summary of the Invention

[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes an annotation matching method and related equipment for urban CAD data, which can fully and automatically realize the association between pipeline data and annotation data.

[0004] In a first aspect, an embodiment of the present application provides an annotation matching method for urban CAD data, including: obtaining the to-be-processed urban lifeline underground pipeline network CAD data of the target urban area, extracting pipeline layers and annotation layers from the urban lifeline underground pipeline network CAD data; screening out the target pipeline layer from the pipeline layer according to a first preset condition, and screening out the target annotation layer from the annotation layer according to a second preset condition; converting all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements; for each pipeline in the target pipeline layer, determining the attribute annotation point elements within a preset range of the pipeline, and associating the attribute annotation point elements with the pipeline; determining the attribute annotation point elements that are successfully associated with the pipeline, and associating the successfully associated attribute annotation point elements with the unassociated pipelines in the target pipeline layer again; integrating the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list for all pipelines in the target pipeline layer.

[0005] In some embodiments, the method further includes: reading the CAD data of the city lifeline underground pipeline network according to the layers to obtain multiple CAD layers; and extracting pipeline layers and annotation layers from the multiple CAD layers.

[0006] In some embodiments, the first preset condition includes a display field indicating a pipeline layer; the second preset condition includes a display field indicating an annotation layer; the target pipeline layer is filtered out from the pipeline layer according to the first preset condition, and the target annotation layer is filtered out from the annotation layer according to the second preset condition, including: selecting the display field of the pipeline layer according to the first preset condition to obtain an initial pipeline layer, selecting the display field of the annotation layer according to the second preset condition to obtain an initial annotation layer; filtering the initial pipeline layer according to the first preset geometric parameter to obtain the target pipeline layer, and filtering the initial annotation layer according to the second preset geometric parameter to obtain the target annotation layer.

[0007] In some embodiments, the method further includes: determining pipeline attributes of each pipeline in the target pipeline layer; establishing an attribute storage table, and storing the pipeline attributes of each pipeline in the target pipeline layer in the attribute storage table.

[0008] In some embodiments, the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines are integrated to obtain a target attribute list of all pipelines in the target pipeline layer, including: adding a new header in the attribute storage table, adding the attribute annotation point elements successfully associated with the pipeline under the new header, and obtaining a target attribute list.

[0009] In some embodiments, the method also includes: obtaining the protection targets and hazard sources of the target urban area; unifying the pipelines, protection targets and hazard sources in the target pipeline layer into the same coordinate system; for each pipeline in the target pipeline layer, determining the relevant protection targets and relevant hazard sources within the preset range of the pipeline, associating the protection targets and their protection attribute information, the relevant hazard sources and their hazard attribute information within the preset range of the pipeline with the attribute information of the target underground pipeline to obtain merged attribute information, and converting the merged attribute information from CAD format to a preset format.

[0010] In a second aspect, an embodiment of the present application provides an annotation matching device for city CAD data, comprising:

[0011] An acquisition module is configured to acquire the CAD data of the urban lifeline underground pipe network to be processed in the target urban area, and extract the pipeline layer and the annotation layer from the CAD data of the urban lifeline underground pipe network;

[0012] A selection module is configured to filter out a target pipeline layer from the pipeline layer according to a first preset condition, and filter out a target annotation layer from the annotation layer according to a second preset condition;

[0013] A conversion module configured to convert all text attribute annotations in the target annotation layer into corresponding attribute annotation point features;

[0014] The primary association module is configured to determine, for each pipeline in the target pipeline layer, attribute annotation point features within a preset range of the pipeline, and associate the attribute annotation point features with the pipeline;

[0015] The secondary association module is configured to determine the attribute annotation point features that are successfully associated with the pipeline, and associate the successfully associated attribute annotation point features with the unassociated pipeline in the target pipeline layer again;

[0016] The integration module is configured to integrate pipeline attributes of all pipelines in the target pipeline layer and attribute annotation point elements associated with the pipelines to obtain a target attribute list of all pipelines in the target pipeline layer.

[0017] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the annotation matching method for urban CAD data as described in the first aspect are implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the annotation matching method for urban CAD data as described in the first aspect are implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed by a processor of a vehicle, implements the steps of the annotation matching method for urban CAD data as described in the first aspect.

[0020] The technical solution provided by the present application obtains the urban lifeline underground pipeline network CAD data to be processed, extracts the pipeline layer and the annotation layer from the urban lifeline underground pipeline network CAD data; screens out the target pipeline layer from the pipeline layer according to a first preset condition, and screens out the target annotation layer from the annotation layer according to a second preset condition; converts all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements; for each pipeline in the target pipeline layer, determines the attribute annotation point elements within a preset range of the pipeline, and associates the attribute annotation point elements with the pipeline; determines the attribute annotation point elements that are successfully associated with the pipeline, and associates the successfully associated attribute annotation point elements again with the unassociated pipelines in the target pipeline layer; integrates the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list of all pipelines in the target pipeline layer. This application associates the originally separate pipelines with text annotations, achieving efficient conversion of CAD data to shp data, greatly improving data conversion efficiency. This application can also automatically complete the association of annotation content and line segments without the need for manual input of markup content, and directly extract attribute information, thereby improving the reliability and efficiency of annotation association. In addition, this application can associate key spatial elements such as protection targets and hazard sources with converted vector data through spatial connections, providing an important basic reference for urban lifeline risk assessment, scheme design, project construction, etc.

[0021] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0023] Figure 1 A flowchart of a method for annotation matching of urban CAD data provided in an embodiment of the present application.

[0024] Figure 2 A schematic diagram of a reading module provided in an embodiment of the present application.

[0025] Figure 3 Schematic diagram of the feature selection device provided in an embodiment of the present application.

[0026] Figure 4 A schematic diagram of an element type window provided in an embodiment of the present application.

[0027] Figure 5 A schematic diagram of a conditional filter provided in an embodiment of the present application.

[0028] Figure 6A schematic diagram of a coordinate generator provided in an embodiment of the present application.

[0029] Figure 7 A schematic diagram of a proximity finder provided in an embodiment of the present application.

[0030] Figure 8 A schematic diagram of a property manager provided in an embodiment of the present application.

[0031] Figure 9 A schematic diagram of a list connector provided in an embodiment of the present application.

[0032] Figure 10 A schematic diagram of an annotation matching device for city CAD data provided in an embodiment of the present application.

[0033] Figure 11 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0034] Figure numerals: 1001 - acquisition module; 1002 - selection module; 1003 - conversion module; 1004 - primary association module; 1005 - secondary association module; 1006 - integration module; 1110 - processor; 1120 - memory; 1130 - input / output interface; 1140 - communication interface; 1150 - bus. DETAILED DESCRIPTION

[0035] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0036] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0037] As described in the background technology section, at present, the conversion of CAD data into shp data is usually achieved by directly importing the CAD data into a GIS software platform and utilizing the data conversion function of the relevant GIS software platform. In the CAD layer, the annotation information is usually connected with the "spatial connection" function of the ArcGIS software to connect the annotation and the vector CAD line segment, thereby adding the attribute of the annotation to the attribute table of the vector data. However, in actual applications, this method has many problems. Due to the difficulty in accurately adapting the connection distance to various situations, the phenomenon of missing annotations occurs from time to time, and factors such as the complexity of the actual corresponding relationship between the annotation position and the line segment cause a large number of pipelines to be unable to be successfully associated with the annotation, resulting in a large number of blank values ​​in the attribute table. To solve this problem, a large amount of manpower has to be invested in the subsequent manual processing, which not only increases the workload and time cost, but also easily introduces human error, affecting the accuracy and efficiency of data processing.

[0038] To address the aforementioned shortcomings of the prior art, the present invention provides an annotation matching method and related equipment for urban CAD data. By associating previously separate pipelines with text annotations, efficient conversion from CAD data to SHP data is achieved, greatly improving data conversion efficiency. This application can also automatically associate annotation content with line segments, eliminating the need for manual entry of markup content and directly extracting attribute information, thereby improving the reliability and efficiency of annotation association. Furthermore, this application can spatially link key spatial elements such as protective targets and hazard sources with converted vector data, providing an important foundational reference for urban lifeline risk assessment, scheme design, and project construction.

[0039] refer to Figure 1 , which is a flow chart of an annotation matching method for urban CAD data provided in an embodiment of the present application.

[0040] Step S101: obtaining the CAD data of the urban lifeline underground pipe network to be processed in the target urban area, and extracting the pipeline layer and the annotation layer from the CAD data of the urban lifeline underground pipe network.

[0041] Specifically, for the existing urban lifeline data, pipeline design drawings in CAD format dominate. The pipelines in the urban lifeline underground pipeline network CAD data can be urban infrastructure pipelines such as water supply pipelines, drainage pipelines, gas pipelines, and heat pipelines. They are the "lifelines" that maintain the normal operation of the city. The urban lifeline underground pipeline network CAD data stores less attribute information attached to the pipeline data layer. Other data about the pipeline, such as pipe material, pipe diameter, pressure, etc., are stored in the annotations. Therefore, it is necessary to first extract the pipelines and annotations in the urban lifeline underground pipeline network CAD data of the target urban area to obtain the pipeline layer and the annotation layer.

[0042] As an optional embodiment, for the original urban lifeline underground pipeline network CAD data obtained, it is necessary to confirm whether the data file is encrypted or protected by permissions to avoid reading and parsing failure due to missing file password. You can directly try to open the data file to see whether a password input window pops up to confirm whether the data file is encrypted. You can also check the security tab in the email file properties to see whether it is encrypted by the operating system. For the urban lifeline underground pipeline network CAD data in an encrypted state, it needs to be decrypted to obtain the urban lifeline underground pipeline network CAD data to be processed that can be parsed and read.

[0043] As an optional embodiment, the method further includes: reading the CAD data of the city lifeline underground pipeline network according to the layers to obtain multiple CAD layers; and extracting the pipeline layer and the annotation layer from the multiple CAD layers.

[0044] Specifically, the CAD data of the city's lifeline underground pipeline network may contain multiple layers of information. In addition to the city's pipeline layer and annotation layer, it may also include basic geographic information layers, building layers, and transportation facilities layers. In this application, the CAD data of the city's lifeline underground pipeline network is read using FME Workbench. After starting FME Workbench, a new mapping file template is created. Further, in the tool panel, find Readers and open the reading module (Add reader). Figure 2 As shown, select Autodesk AutoCAD DWG / DXF in the format selection list of the reading module window, that is, read the CAD format file, then locate the dataset (Dataset) to the path where the urban lifeline underground pipe network CAD data file to be processed is located. Further, set the parameters (Parameters...), among which the entity classification basis (GroupEntities By) needs to select Geometry (Geometry) to facilitate data reading according to each layer of CAD; after completing the data reading method, Figure 3 The layer list (LayerList) of the Select Feature Type shown is used to select the layers to be extracted. At this time, only the lines (pipeline layer) and text (annotation layer) layers need to be extracted.

[0045] Step S102: Filtering a target pipeline layer from the pipeline layers according to a first preset condition, and filtering a target annotation layer from the annotation layers according to a second preset condition;

[0046] Specifically, the pipeline layer includes all pipelines in the target city as a whole. However, in actual applications, only a certain type of pipeline may need to be analyzed. Therefore, it is necessary to filter the pipeline layer to obtain the target pipeline layer, and further, filter the annotation layer accordingly to obtain the target annotation layer.

[0047] As an optional embodiment, the first preset condition includes a display field indicating a pipeline layer; the second preset condition includes a display field indicating an annotation layer; filtering out a target pipeline layer from the pipeline layer according to the first preset condition, and filtering out a target annotation layer from the annotation layer according to the second preset condition, including: selecting the display field of the pipeline layer according to the first preset condition to obtain an initial pipeline layer, selecting the display field of the annotation layer according to the second preset condition to obtain an initial annotation layer; filtering the initial pipeline layer according to the first preset geometric parameter to obtain a target pipeline layer, and filtering the initial annotation layer according to the second preset geometric parameter to obtain a target annotation layer.

[0048] Specifically, select Format Attributes in Feature Type to select the filter options for the layer, such as Figure 4 In the embodiment of the present application, for the pipeline layer, the first preset condition includes a display field indicating the pipeline layer. Generally, the pipeline layer needs to include at least attributes such as autocad_layer, autocad_linetype, autocad_width, and autocad_color. In Format Attributes, the filtering attributes included in the first preset condition are checked to obtain the initial pipeline layer. For the annotation layer, the second preset condition includes a display field indicating the annotation layer. Generally, the annotation layer needs to include at least autocad_alignment_x, autocad_alignment_y, autocad_layer, autocad_color, and autocad_text_string. In Format Attributes, the filtering attributes included in the second preset condition are checked to obtain the initial annotation layer.

[0049] Furthermore, by Figure 5 The conditional filter (Tester) shown reads the name or line of the layer, etc., and can filter the initial pipeline layer obtained above according to the first preset geometric parameters, and filter the initial annotation layer according to the second preset geometric parameters. The Tester divides the pipelines or annotations into Passed and Failed, and further determines the filtered Passed pipelines or annotations as the target pipeline layer and target annotation layer that meet the corresponding preset conditions.

[0050] Step S103: convert all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements.

[0051] Specifically, using the Vertex Creator in FME, annotations can be converted into point features with attributes, which can textualize spatial information. For example, place names, road names, and facility names can be converted into point features with real coordinates, which facilitates subsequent data association and attribute statistics. Figure 6 , you can input the autocad_alignment_x and autocad_alignment_y attributes of the annotation layer into X Value and Y Value respectively, and then all annotations in the annotation layer that contain autocad_alignment_x and autocad_alignment_y attributes can be generated into corresponding point features.

[0052] Step S104: for each pipeline in the target pipeline layer, determine the attribute annotation point elements within a preset range of the pipeline, and associate the attribute annotation point elements with the pipeline.

[0053] Specifically, each pipeline in the target pipeline layer is associated with an attribute annotation point element within a preset range, so that each pipeline obtains corresponding annotation information. Figure 7 The NeighborFinder shown associates the coordinate annotations within the preset range of the pipeline. For the General column of the NeighborFinder converter, enter 1 in the Number of Neighbors to Find, which means that only the closest annotation within the preset range is associated; the Maximum Distance is the preset range, preferably not more than 100, which can be set according to the actual data to avoid large errors in the association between pipelines and annotations.

[0054] As an optional embodiment, the method further includes: determining pipeline attributes of each pipeline in the target pipeline layer; establishing an attribute storage table, and storing the pipeline attributes of each pipeline in the target pipeline layer in the attribute storage table.

[0055] Specifically, each pipeline in the target pipeline layer also includes its corresponding attribute information, such as the layer name (autocad_layer), line type definition (autocad_linetype) and unique entity ID (autocad_handle). For the attribute information of the pipeline, it is necessary to establish an attribute storage table and store the pipeline attributes of each pipeline in the target pipeline layer in the attribute storage table.

[0056] It should be noted that the attributes of each pipeline in the target pipeline layer can be public or private. For private attribute information, it is necessary to further extract it to ensure the integrity of the attribute information of the acquired spatial elements. For private attribute information, the attribute exposure converter (AttributeExposer converter) can be used. AttributeExposer obtains the attribute information location corresponding to the private attribute information and inputs the storage location of the above attribute information, autocad_extended_data_list{}, into the AttributeExposer converter. After running, a new field, namely the above-mentioned private attribute information, will appear in the attribute storage table.

[0057] As an optional embodiment, the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines are integrated to obtain a target attribute list of all pipelines in the target pipeline layer, including: adding a new header in the attribute storage table, adding the attribute annotation point elements successfully associated with the pipeline under the new header, and obtaining a target attribute list.

[0058] Specifically, in the Neighbor Finder converter, you can check the Generate List in the Attribute Accumulating column to create a first header that can match the attributes of the target pipeline layer in the attribute storage table with the obtained annotation attributes, where the Closest Candidates List Name is the name of the first header. The first header can place the attribute information after the pipeline attributes of the target pipeline are associated with the attribute annotation point elements associated with the pipeline; Selected attributes can select which attribute annotation coordinates are associated with the pipeline. Furthermore, the attribute annotation point elements successfully associated with the pipeline will be added to the first header.

[0059] Step S105: determining the attribute annotation point elements successfully associated with the pipelines, and associating the successfully associated attribute annotation point elements with the unassociated pipelines in the target pipeline layer again.

[0060] Specifically, in the above-mentioned association process, there may be cases where some pipelines are not successfully associated with the attribute annotation point elements. Therefore, it is necessary to re-associate the pipelines that have not been successfully associated with the attribute annotation point elements with the pipelines that have been successfully associated with the attribute annotation point elements, so that each pipeline in the target pipeline layer has associated annotation coordinates. This can effectively solve the problem that pipelines are difficult to associate with annotations due to connection distance or annotation position, and further reduce the situation of missing pipeline annotations, so as to provide users with complete data references.

[0061] Enter 1 in the Number of Neighbors to Find in the General of the Neighbor Finder converter, set the Maximum Distance to empty, that is, infinity, and further check Generate List in Attribute Accumulating to generate the second header. The Closest Candidates List Name is the name of the second header. Similarly, use Selected attributes to set which attribute annotation coordinates are associated with the pipeline, thereby associating the unassociated pipelines in the target pipeline layer with the attribute annotation point features.

[0062] Step S106 : Integrate the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list of all pipelines in the target pipeline layer.

[0063] Specifically, the attribute list in the first header and the second header can be integrated through the attribute manager to obtain the target attribute list of all pipeline-associated annotation coordinates in the target pipeline layer. Furthermore, the attribute information TEXTSTRING{0}.autocad_text_string needs to be displayed through the Attribute Manager converter, such as Figure 8 shown.

[0064] It should be noted that the Attribute Manager can also perform operations such as deleting redundant fields of attributes, which can be to extract required fields from the attribute information string and delete redundant fields in the attribute information, and only retain the basic fields of the attribute information.

[0065] As an optional embodiment, the method also includes: obtaining the protection targets and hazard sources of the target urban area; unifying the pipelines, protection targets and hazard sources in the target pipeline layer into the same coordinate system; for each pipeline in the target pipeline layer, determining the relevant protection targets and relevant hazard sources within the preset range of the pipeline, associating the protection targets and their protection attribute information, the relevant hazard sources and their hazard attribute information within the preset range of the pipeline with the attribute information of the pipeline to obtain merged attribute information, and converting the merged attribute information from CAD format to the preset format.

[0066] Specifically, the target urban area also includes protection targets and hazard sources that may affect the operation of the city's lifeline. Protection targets are objects that need to be protected in the target urban area, and hazard sources are objects in the target urban area that pose potential risks to the city's lifeline (facilities or factors that may cause accidents or disasters). Protection targets can be hospitals, schools, government agencies, etc., and hazard sources can be gas stations, hazardous chemical enterprises, geological hazard points, etc. Therefore, it is also necessary to extract the protection targets and hazard sources within the preset range of the target urban area for pipelines with associated coordinate annotations, and unify the pipelines, protection targets and hazard sources in the target pipeline layer with associated annotations into the target coordinate system, so that users can accurately analyze the city's lifeline based on the pipelines, protection targets and hazard sources in the target coordinate system.

[0067] It should be noted that the data on protection targets and hazard sources can be provided by users, from various map software or obtained through Internet searches.

[0068] To establish the target coordinate system, you first need to create a second reader module and a third reader module to read the protection target and hazard source data, respectively. Before reading the protection target, you need to filter the protection target type based on the type and name fields. Before reading the hazard source, you also need to filter the hazard source based on the type field. Furthermore, you can use a coordinate converter (Reprojector) to reproject the x and y coordinates of the target spatial elements, protection targets, and hazard sources from one coordinate system to the other, unifying the coordinate systems and obtaining the target coordinate system.

[0069] Furthermore, NeighborFinder is used to find protection targets and hazard sources within a preset range of each pipeline, and the attribute information of the protection targets and hazard sources is merged to obtain merged attribute information.

[0070] like Figure 9The List Concatenator shown can list pipelines, protection targets, and hazards that have been associated with coordinate annotations. Since any pipeline may be connected to multiple protection targets and / or hazards, the names of the protection targets and / or hazards associated with the current pipeline can be connected using "," to form a single piece of data. For example, if there are only protection targets within the preset range of the pipeline, for pipeline ID = 102, its protection target data can be recorded as [Protection Target = "a certain hospital, a certain school"]. Furthermore, the AttributeManager transformer is used to add the merged attribute information of the protection targets and / or hazards within the preset range of the pipeline to the target attribute list, resulting in an updated attribute list. The updated attribute list includes the protection attribute information of the relevant protection targets, the hazard attribute information of the relevant hazards, the pipeline attributes, and the attribute annotation point elements.

[0071] It should be noted that when associating protection targets and / or hazardous sources within the preset range of pipelines, there may be some pipelines that do not have protection targets and hazardous sources within the preset range. The attribute information list of such pipelines can be defined as a safety attribute list. Furthermore, the above-mentioned updated attribute list needs to be merged with the safety attribute list to obtain a complete attribute list.

[0072] Furthermore, a writer module (Writer) is created in FME Workbench, and Writer is used to output SHP data or Excel data for use in risk assessment or project construction, etc.

[0073] In summary, the present application provides an annotation matching method for urban CAD data, which obtains the urban lifeline underground pipeline network CAD data to be processed, extracts the pipeline layer and the annotation layer from the urban lifeline underground pipeline network CAD data; filters out the target pipeline layer from the pipeline layer according to the first preset condition, and filters out the target annotation layer from the annotation layer according to the second preset condition; converts all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements; for each pipeline in the target pipeline layer, determines the attribute annotation point elements within the preset range of the pipeline, and associates the attribute annotation point elements with the pipeline; determines the attribute annotation point elements that are successfully associated with the pipeline, and associates the successfully associated attribute annotation point elements with the unassociated pipelines in the target pipeline layer again; integrates the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipeline to obtain a target attribute list for all pipelines in the target pipeline layer. This application associates the originally separate pipelines with text annotations, achieving efficient conversion of CAD data to shp data, greatly improving data conversion efficiency. This application can also automatically complete the association of annotation content and line segments without the need for manual input of markup content, and directly extract attribute information, thereby improving the reliability and efficiency of annotation association. In addition, this application can associate key spatial elements such as protection targets and hazard sources with converted vector data through spatial connections, providing an important basic reference for urban lifeline risk assessment, scheme design, project construction, etc.

[0074] It should be noted that the method of the embodiment of the present invention can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present invention, and the multiple devices will interact with each other to complete the above method.

[0075] It should be noted that the above description is limited to some embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0076] Corresponding to the above embodiment, the present invention also proposes an annotation matching device for city CAD data.

[0077] like Figure 101004 , a second association module 1005 , and an integration module 1006 .

[0078] The acquisition module 1001 is configured to acquire the CAD data of the urban lifeline underground pipe network to be processed in the target urban area, and extract the pipeline layer and the annotation layer from the CAD data of the urban lifeline underground pipe network;

[0079] The selection module 1002 is configured to filter out a target pipeline layer from the pipeline layers according to a first preset condition, and filter out a target annotation layer from the annotation layers according to a second preset condition;

[0080] The conversion module 1003 is configured to convert all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements;

[0081] The primary association module 1004 is configured to determine, for each pipeline in the target pipeline layer, attribute annotation point elements within a preset range of the pipeline, and associate the attribute annotation point elements with the pipeline;

[0082] The secondary association module 1005 is configured to determine the attribute annotation point elements that are successfully associated with the pipeline, and associate the successfully associated attribute annotation point elements with the unassociated pipelines in the target pipeline layer again;

[0083] The integration module 1006 is configured to integrate the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list of all pipelines in the target pipeline layer.

[0084] Optionally, the acquisition module 1001 is further configured to:

[0085] Read the CAD data of the city's lifeline underground pipe network by layer to obtain multiple CAD layers;

[0086] Extract pipeline layers and annotation layers from multiple CAD layers.

[0087] Optionally, the first preset condition includes a display field indicating a pipeline layer; the second preset condition includes a display field indicating an annotation layer;

[0088] The selection module 1002 is further configured to:

[0089] Selecting a display field of the pipeline layer according to the first preset condition to obtain an initial pipeline layer, and selecting a display field of the annotation layer according to the second preset condition to obtain an initial annotation layer;

[0090] The initial pipeline layer is screened according to the first preset geometric parameter to obtain the target pipeline layer, and the initial annotation layer is screened according to the second preset geometric parameter to obtain the target annotation layer.

[0091] Optionally, the conversion module 1003 is further configured to:

[0092] For each pipeline in the target pipeline layer, determine the pipeline attributes of the pipeline;

[0093] An attribute storage table is established to store the pipeline attributes of each pipeline in the target pipeline layer in the attribute storage table.

[0094] Optionally, the integration module 1006 is further configured to:

[0095] A new header is added to the attribute storage table, and the attribute annotation point features successfully associated with the pipeline are added under the new header to obtain the target attribute list.

[0096] Optionally, the integration module 1006 is further configured to:

[0097] Obtain the protection targets and danger sources of the target urban area;

[0098] Unify the pipelines, protection targets and hazard sources in the target pipeline layer into the same coordinate system;

[0099] For each pipeline in the target pipeline layer, determine the relevant protection targets and relevant hazardous sources within the preset range of the pipeline, associate the relevant protection targets and their protection attribute information, the relevant hazardous sources and their hazardous attribute information within the preset range of the pipeline with the attribute information of the pipeline to obtain merged attribute information, and convert the merged attribute information from CAD format to the preset format.

[0100] For the convenience of description, the above system is described as being divided into various modules according to their functions. Of course, when implementing the present invention, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0101] The system of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0102] Corresponding to the above embodiment, the present invention further provides an electronic device.

[0103] refer to Figure 11, is a block diagram of an electronic device according to some embodiments of the present invention, illustrating a more specific hardware structure of an electronic device provided by this embodiment. The device may include: a processor 1110, a memory 1120, an input / output interface 1130, a communication interface 1140, and a bus 1150. The processor 1110, the memory 1120, the input / output interface 1130, and the communication interface 1140 are connected to each other within the device via the bus 1150.

[0104] The processor 1110 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0105] The memory 1120 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1120 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1120 and is called and executed by the processor 1110.

[0106] The input / output interface 1130 is used to connect an input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0107] The communication interface 1140 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0108] The bus 1150 comprises a pathway for transmitting information between the various components of the device (eg, the processor 1110 , the memory 1120 , the input / output interface 1130 , and the communication interface 1140 ).

[0109] It should be noted that although the above device only shows the processor 1110, the memory 1120, the input / output interface 1130, the communication interface 1140, and the bus 1150, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figures.

[0110] The electronic device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0111] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present invention further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method of any of the above embodiments.

[0112] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.

[0113] The computer instructions stored in the storage medium of the above embodiment are used to enable a computer to execute the method of any embodiment in the above exemplary method section, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0114] Furthermore, although the operations of the present method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the operations shown must be performed to achieve the desired results. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.

[0115] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0116] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0117] Although the spirit and principles of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features of these aspects cannot be combined to benefit. Such division is merely for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. A method for annotation matching of urban CAD data, characterized in that: include: Obtaining the CAD data of the urban lifeline underground pipe network to be processed in the target urban area, and extracting the pipeline layer and the annotation layer from the CAD data of the urban lifeline underground pipe network; Filtering a target pipeline layer from the pipeline layer according to a first preset condition, and filtering a target annotation layer from the annotation layer according to a second preset condition; Convert all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements; For each pipeline in the target pipeline layer, determining an attribute annotation point element within a preset range of the pipeline, and associating the attribute annotation point element with the pipeline; Determine the attribute annotation point element that is successfully associated with the pipeline, and associate the successfully associated attribute annotation point element with the unassociated pipeline in the target pipeline layer again; The pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines are integrated to obtain a target attribute list of all pipelines in the target pipeline layer.

2. The annotation matching method for urban CAD data according to claim 1, characterized in that: The method further comprises: Read the CAD data of the urban lifeline underground pipe network according to the layer to obtain multiple CAD layers; A pipeline layer and an annotation layer are extracted from the multiple CAD layers.

3. The annotation matching method for urban CAD data according to claim 2, characterized in that: The first preset condition includes a display field indicating the pipeline layer; the second preset condition includes a display field indicating the annotation layer; The step of selecting a target pipeline layer from the pipeline layer according to a first preset condition and selecting a target annotation layer from the annotation layer according to a second preset condition includes: Selecting a display field of the pipeline layer according to the first preset condition to obtain an initial pipeline layer, and selecting a display field of the annotation layer according to the second preset condition to obtain an initial annotation layer; The initial pipeline layer is screened according to a first preset geometric parameter to obtain the target pipeline layer, and the initial annotation layer is screened according to a second preset geometric parameter to obtain the target annotation layer.

4. The annotation matching method for urban CAD data according to claim 3, characterized in that: The method further comprises: For each pipeline in the target pipeline layer, determining the pipeline attribute of the pipeline; An attribute storage table is established, and the pipeline attributes of each pipeline in the target pipeline layer are stored in the attribute storage table.

5. The annotation matching method for urban CAD data according to claim 4, characterized in that: The pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines are integrated to obtain a target attribute list of all pipelines in the target pipeline layer, including: A new header is added to the attribute storage table, and the attribute annotation point element successfully associated with the pipeline is added under the new header to obtain the target attribute list.

6. The annotation matching method for urban CAD data according to claim 5, characterized in that: The method further comprises: Obtaining protection targets and danger sources of the target urban area; Unifying the pipelines, the protection targets, and the hazard sources in the target pipeline layer into the same coordinate system; For each pipeline in the target pipeline layer, determine the relevant protection targets and relevant hazard sources within the preset range of the pipeline, associate the relevant protection targets and their protection attribute information, the relevant hazard sources and their hazard attribute information within the preset range of the pipeline with the attribute information of the pipeline to obtain merged attribute information, and convert the merged attribute information from CAD format to the preset format.

7. A device for matching annotations of urban CAD data, characterized in that: include: an acquisition module configured to acquire the to-be-processed CAD data of the urban lifeline underground pipe network of the target urban area, and extract a pipeline layer and an annotation layer from the CAD data of the urban lifeline underground pipe network; A selection module is configured to filter out a target pipeline layer from the pipeline layers according to a first preset condition, and filter out a target annotation layer from the annotation layers according to a second preset condition; A conversion module is configured to convert all text attribute annotations in the target annotation layer into corresponding attribute annotation point elements; A primary association module is configured to determine, for each pipeline in the target pipeline layer, an attribute annotation point element within a preset range of the pipeline, and associate the attribute annotation point element with the pipeline; A secondary association module is configured to determine the attribute annotation point element successfully associated with the pipeline, and associate the successfully associated attribute annotation point element again with the unassociated pipeline in the target pipeline layer; The integration module is configured to integrate the pipeline attributes of all pipelines in the target pipeline layer and the attribute annotation point elements associated with the pipelines to obtain a target attribute list of all pipelines in the target pipeline layer.

8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the annotation matching method for urban CAD data as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the annotation matching method for urban CAD data according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising computer program instructions, which, when executed on a computer, enable the computer to execute the steps of the annotation matching method for urban CAD data according to any one of claims 1 to 6.