Construction CAD webpage loading lightweight method and device and storage medium

By combining open-source software and front-end open-source libraries, we have achieved low-cost, high-security, and high-efficiency loading of construction CAD web pages. This solves the problems of high development costs, poor security, and slow loading speed in existing technologies, and is suitable for PC and mobile operation in the construction industry.

CN121542452APending Publication Date: 2026-02-17CHINA CONSTR THIRD ENG BUREAU GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511711414.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing webpage loading CAD technology solutions are costly to develop, pose data security risks, are slow to load, have incompatible formats, and are expensive to commercially available, making them difficult to widely apply in small and medium-sized building information modeling (BIM) projects.

Method used

Vector data from CAD files is extracted using APIs developed based on open-source software, exported as a common vector format file, and then automated and lightweight processing and format conversion are performed. Web page loading and interaction are implemented using a front-end open-source library. Data processing is completed on the owner's own server, and the open-source format is used to reduce costs and improve security.

Benefits of technology

It achieves low-cost, high-security, highly versatile, and low-hardware-requirement construction CAD web page loading, meeting the needs of construction industry users for convenient operation on PCs and mobile devices, and promoting the widespread application of construction CAD technology in projects of different scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542452A_ABST
    Figure CN121542452A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a construction CAD webpage loading lightweight method and device and a storage medium, and the method comprises the steps: extracting vector data of a CAD file based on an open source software secondary development API, and exporting the vector data as a general vector format file; performing automatic lightweight processing and format conversion on the general vector format file according to service requirements; and loading the converted lightweight data format file through a front-end open source library to realize webpage loading and interaction. A full-open-source technical scheme is adopted, commercial software authorization is not needed, and the development and use cost is reduced. And all data processing is completed in the local server, so that the data security and autonomy are ensured. Through topological optimization and lightweight conversion of the CAD data, the webpage loading speed and rendering efficiency are improved, common hardware equipment can also run smoothly, and the problems of high cost, low speed and poor safety in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lightweight CAD webpage loading technology, and in particular to a method, apparatus and storage medium for lightweight loading of construction CAD webpages. Background Technology

[0002] CAD plays a vital role in building construction, indispensable for precise drafting, modeling, collaborative optimization, and construction guidance. Typically, CAD formats are relatively heavy, a product of the traditional client-server (CS) model, where clients complete operations by installing a CAD client. With the rapid development of mobile internet, enabling the loading, viewing, and interaction of CAD files in a web-based environment has become a pressing need in the construction industry. Whether on PCs or mobile devices, users expect to be able to conveniently perform these operations via a web browser.

[0003] Currently, there are some web-based CAD loading products on the market, such as CCBIM and BIMFace. These commercial solutions can solve the technical challenges of loading CAD files on web pages, enabling CAD files to be loaded on web pages and providing a feasible path for users in the construction industry to view CAD files through web pages (PC or mobile devices).

[0004] Existing web-based CAD loading solutions have the following shortcomings: First, these solutions are often expensive to develop and integrate, requiring users to consult extensive documentation and engage in complex technical communication. Second, because data files need to be uploaded to cloud servers for secondary parsing, there are data security risks. Third, CAD files load slowly on web pages, placing high demands on hardware performance, especially on mobile devices. Furthermore, the format of the secondary-processed CAD files is usually a proprietary format of commercial solutions, making interoperability with other software difficult. Finally, these commercial solutions are expensive, placing an unbearable burden on small and medium-sized building information modeling (BIM) projects. Summary of the Invention

[0005] This invention provides a method, apparatus, and storage medium for lightweight loading of construction CAD web pages to solve the aforementioned problems in the prior art.

[0006] In a first aspect, embodiments of the present invention provide a method for lightweight loading of construction CAD web pages, comprising: Extract vector data from CAD files using open-source software secondary development API and export it as a common vector format file; The general vector format files are processed automatically and lightweightly according to business requirements, and their format is converted. By loading the converted lightweight data format file through a front-end open-source library, webpage loading and interaction can be achieved.

[0007] Preferably, the step of extracting vector data from CAD files based on open-source software secondary development APIs and exporting it as a universal vector format file includes: Establish an access connection with the CAD file through the secondary development API of open source software, and open the CAD file; Based on the access connection, all layers in the CAD file are traversed, vector data in each layer is extracted, and geometric feature information of the vector data is obtained synchronously. The extracted vector data is classified according to its geometric features, and the classified vector data is exported as a general vector format file.

[0008] Preferably, the step of classifying the extracted vector data according to the geometric feature information of the vector data and exporting the classified vector data into a general vector format file includes: Based on the geometric features of the vector data, the vector data is divided into point data, line data, and surface data. Add geometric type identifiers to each data category to distinguish different categories and dimensions; Export point data, line data, and polygon data with geometric type identifiers as separate, universal vector format files; Convert the exported general vector format files to the target coordinate system.

[0009] Preferably, the general vector format file is subjected to automated, lightweight processing and format conversion according to business requirements, including: Read the general vector format file, classify and integrate the data in the file according to the geometric type identifier, and form a point data set, a line data set, and a surface data set; Set attribute filtering conditions according to business needs, and filter key data based on the conditions. The selected key data are processed to conform to the preset coordinate system requirements. The key data after coordinate unification is processed to be lightweight and converted into a lightweight data format file.

[0010] Preferably, the step of setting attribute filtering conditions according to business needs and filtering key data based on the conditions specifically includes: Attribute filtering conditions are defined according to business scenarios; wherein, the business scenarios include water conservancy construction and electromechanical construction, and the filtering conditions correspond to the layer attributes that need to be focused on in the scenarios. Traverse the three categories of data sets after classification and integration, and select data that meets the attribute filtering conditions as key data to focus on; Unfiltered, non-priority data will be merged into the corresponding dataset according to geometric type. The merged non-priority data will only be used for web page display and will not support business interaction.

[0011] Preferably, the step of performing lightweight processing on the key data after coordinate unification and converting it into a lightweight data format file specifically includes: Topology optimization is performed on the key data after coordinate unification to eliminate redundant nodes and duplicate line segments in the data; The topology-optimized key data is converted into a lightweight data format file, preserving the geometric type identifier and attribute information of the data during the conversion process.

[0012] Preferably, the step of loading the converted lightweight data format file through a front-end open-source library to achieve webpage loading and interaction includes: A web-based map container is created using a front-end open-source library, the basic map parameters are initialized, and the initial map display position is determined. The converted lightweight data format file is loaded into the map container, the corresponding layer is rendered according to the geometric type of the data, and the map display range is adapted accordingly. Bind interactive events to the rendered layer. These interactive events include clicking the layer to display data details, clicking to highlight the target layer, increasing the layer boundary weight when the mouse hovers over it, and restoring the default boundary weight when the mouse leaves the layer.

[0013] Secondly, an embodiment of the present invention provides a lightweight device for loading construction CAD web pages, comprising: The CAD data extraction module is used to extract vector data from CAD files based on the secondary development API of open source software and export it as a common vector format file. The lightweight processing module is used to perform automated lightweight processing and format conversion on the general vector format file according to business requirements; The webpage loading and interaction module is used to load converted lightweight data format files through a front-end open-source library to enable webpage loading and interaction.

[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the method for lightweight loading of construction CAD web pages as described in the first aspect embodiment of the present invention.

[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can perform the steps in the lightweight method for loading construction CAD web pages as described in the first aspect embodiment of the present invention.

[0016] The present invention provides a lightweight method, apparatus, and storage medium for loading construction CAD web pages, which, compared with the prior art, has the following advantages: (1) The present invention adopts open source technology solutions, such as using open source software secondary development APIs and open source libraries for data processing, without paying commercial software license fees, which reduces development and usage costs compared to existing commercial solutions.

[0017] (2) All data in this invention is encapsulated on the owner's own server without any cloud processing steps, ensuring data security and enhancing autonomy. At the same time, all data processing products are in industry open-source data formats, which are highly versatile and can be combined with most commercial and open-source industry software in the future, facilitating secondary development and functional expansion, and improving the scalability of the solution.

[0018] (3) The present invention performs topology optimization on CAD data to eliminate redundant nodes and repeated line segments, and converts the data into a lightweight format, and then renders it efficiently through a front-end open source library. This technical means makes the solution have very low hardware requirements, and can run smoothly on ordinary integrated display devices. It performs particularly well on mobile devices, solving the problems of slow loading speed and high hardware performance requirements of existing solutions. Attached Figure Description

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

[0020] Figure 1 A flowchart illustrating the method for lightweight loading of construction CAD web pages provided by this invention; Figure 2 The flowchart of the core processing stages of the lightweight method for loading construction CAD web pages provided by the present invention; Figure 3 This is a structural block diagram of a lightweight device for loading construction CAD web pages provided in an embodiment of the present invention.

[0021] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Existing web-based CAD loading technologies primarily rely on commercial solutions such as CCBIM and BIMFace. These technologies are costly to develop and integrate, requiring users to consult extensive documentation and engage in complex technical communication. Data files need to be uploaded to cloud servers for secondary parsing, posing data security risks. CAD files load slowly on web pages, placing high demands on hardware performance, especially on mobile devices. The format of the processed CAD files is typically proprietary to these commercial solutions, making interoperability with other software difficult. Furthermore, these commercial solutions are expensive, placing a heavy cost burden on small and medium-sized BIM projects. On the one hand, high development costs and complex technical communication increase the difficulty of project implementation; on the other hand, data security risks, slow loading speeds, format incompatibility, and cost issues limit the widespread application of these technologies in construction projects of varying sizes.

[0024] This invention aims to provide a lightweight method, apparatus, and storage medium for loading construction CAD web pages. It extracts vector data from CAD files using a secondary development API based on open-source software and exports it to a common vector format file. The common vector format file is then automatically and lightweightly processed and converted according to business needs. The converted lightweight data format file is loaded through a front-end open-source library, enabling web page loading and interaction. This achieves low-cost, high-security, highly versatile, low-hardware-requirement, and smooth loading and interaction for construction CAD web pages, meeting the needs of construction industry users for convenient operation on PCs and mobile devices, and promoting the wider application of construction CAD technology in the construction industry. The following will elaborate and describe this invention with reference to the accompanying drawings and several embodiments.

[0025] Figure 1 This is a flowchart of a method for lightweight loading of construction CAD web pages according to an embodiment of the present invention, with reference to... Figure 1 The method includes: Step S1: Extract vector data from CAD files based on the open-source software secondary development API and export it as a general vector format file.

[0026] Open-source software refers to software whose source code is publicly available and can be freely used, modified, and distributed. This embodiment uses open-source software for secondary development, eliminating the need to pay commercial software licensing fees and effectively reducing development costs.

[0027] A secondary development API (Application Programming Interface) refers to a set of functions, protocols, and tools exposed by a software vendor, allowing developers to use programming languages ​​to call the core functions of the software to achieve automated or customized tasks. In this embodiment, by utilizing the open-source software secondary development API, an access connection with the CAD file can be established, enabling the reading and manipulation of data within the CAD file.

[0028] Vector data in CAD (Computer-Aided Design) files refers to data composed of geometric elements such as points, lines, and surfaces in a mathematical sense, along with their attributes (such as layers, colors, and line types). Unlike raster data, vector data can be infinitely enlarged without distortion and is the core information of CAD drawings.

[0029] In this embodiment, a universal vector format file refers to a vector data format file that is widely applicable and can be recognized and processed by various software, such as DXF (Drawing Exchange Format) and SVG (Scalable Vector Graphics). Exporting the vector data of the CAD file into a universal vector format file facilitates subsequent processing and use on different platforms.

[0030] By extracting vector data from CAD files through open-source software APIs, we can reduce reliance on commercial software and lower development costs. Furthermore, exporting the data to a universal vector format provides a unified data foundation for subsequent lightweight processing and web page loading, improving the data's versatility and processability.

[0031] Step S2: Perform automated, lightweight processing and format conversion on the general vector format file according to business requirements.

[0032] In this embodiment, business requirements refer to the specific requirements for CAD data in actual construction projects, based on different construction scenarios and tasks. For example, in water conservancy construction, more attention is paid to data on layers such as water systems and dams; in electromechanical construction, more attention may be paid to data on layers such as equipment and pipelines.

[0033] Automated lightweight processing refers to using computer programs to automatically optimize and simplify data in common vector format files, reducing data volume and improving loading and display efficiency on web pages. This includes operations such as topology optimization and removal of redundant information. Format conversion refers to converting the lightweight processed data into a lightweight data format file more suitable for web page loading and interaction. This lightweight data format file typically has a smaller file size and a simpler data structure, enabling faster loading and rendering on web pages.

[0034] This embodiment automates and performs lightweight processing and format conversion on common vector format files according to business needs. This removes redundant information, reduces data volume, and improves loading speed and display quality on web pages. Furthermore, by filtering and processing data based on business requirements, it highlights key data and meets the needs of different construction scenarios.

[0035] Step S3: Load the converted lightweight data format file through the front-end open-source library to enable webpage loading and interaction.

[0036] Front-end open-source libraries are library files with publicly available source code used for web front-end development. They offer rich functionality and components, helping developers quickly implement webpage layout, rendering, and interactive effects. Webpage loading refers to the process of displaying converted, lightweight data format files on the webpage. Through front-end open-source libraries, data can be displayed on webpages in the form of maps, charts, etc., allowing users to intuitively view and analyze the data.

[0037] In step S3, the converted lightweight data format file is loaded using a front-end open-source library to enable webpage loading and interaction. This allows users to conveniently view and manipulate CAD data on a webpage, meeting the needs of construction industry users for convenient operation on both PCs and mobile devices. Simultaneously, the rich interactive functions enhance users' understanding and analysis of the data, providing support for construction decision-making.

[0038] This invention employs open-source technologies, such as using open-source software APIs and libraries for data processing, eliminating the need for commercial software licensing fees and reducing development and usage costs compared to existing commercial solutions. All data in this invention is encapsulated on the owner's own server, without any cloud processing steps, ensuring data security and enhancing autonomy. Furthermore, all data processing outputs are in industry-standard open-source data formats, offering strong universality and allowing for integration with most commercial and open-source industry software, facilitating secondary development and functional expansion, thus improving the solution's scalability.

[0039] In a preferred embodiment of the present invention, in step S1, the code for extracting vector data from CAD files based on open-source software secondary development API and exporting it as a general vector format file is as follows: from osgeo import ogr, osr import os # Input / output path settings input_dwg = "cjhdj.dwg" output_dir = ". / output / " os.makedirs(output_dir, exist_ok=True) # Create categorized output files point_shp = ogr.GetDriverByName("ESRI Shapefile").CreateDataSource(output_dir + "points.shp") line_shp = ogr.GetDriverByName("ESRI Shapefile").CreateDataSource(output_dir + "lines.shp") polygon_shp = ogr.GetDriverByName("ESRI Shapefile").CreateDataSource(output_dir + "polygons.shp") # Open the DWG file (requires GDAL compilation support for DWG) dwg_data = ogr.Open(input_dwg) if dwg_data is None: Raise an exception ("Unable to open DWG file. Please check the DWG driver configuration of GDAL"). # Coordinate system transformation (optional) source_srs = osr.SpatialReference() source_srs.ImportFromEPSG(26915) # Modify according to the actual coordinate system target_srs = osr.SpatialReference() target_srs.ImportFromEPSG(4326)# WGS84 transform = osr.CoordinateTransformation(source_srs, target_srs) # Traverse all layers for layer_idx in range(dwg_data.GetLayerCount()): layer = dwg_data.GetLayerByIndex(layer_idx) layer.ResetReading() # Traverse the features in the layer while True: feature = layer.GetNextFeature() if not feature: break geom = feature.GetGeometryRef() if geom: # Coordinate system transformation (optional) geom.Transform(transform) # Categorize by Geometric Type geom_type = geom.GetGeometryType() # Point Element Processing if geom_type in [ogr.wkbPoint, ogr.wkbPoint25D]: output_layer = point_shp.CreateLayer("points", target_srs,ogr.wkbPoint) _ = output_layer.CreateFeature(feature.Clone()) # Line Element Processing elif geom_type in [ogr.wkbLineString, ogr.wkbMultiLineString,ogr.wkbLineString25D]: output_layer = line_shp.CreateLayer("lines", target_srs,ogr.wkbLineString) _ = output_layer.CreateFeature(feature.Clone()) # Surface Feature Processing elif geom_type in [ogr.wkbPolygon, ogr.wkbMultiPolygon,ogr.wkbPolygon25D]: output_layer = polygon_shp.CreateLayer("polygons", target_srs,ogr.wkbPolygon) _ = output_layer.CreateFeature(feature.Clone() # Release resources point_shp.Destroy() line_shp.Destroy() polygon_shp.Destroy() dwg_data.Destroy() Based on the above code, step S1, which involves extracting vector data from CAD files using the open-source software secondary development API and exporting it as a universal vector format file, specifically includes: S11. Establish an access connection with the CAD file through the secondary development API of the open source software, and open the CAD file.

[0040] This invention utilizes the SDK of the open-source software QGIS (Quantum Geographic Information System) for secondary development. QGIS provides a rich set of secondary development APIs (Application Programming Interfaces), which are a series of predefined functions and methods that developers can call to interact with QGIS and access and manipulate its internal functions and data.

[0041] First, set the input path for the CAD file, for example, specifying the path to the DWG format file to be processed; simultaneously, create an output directory to store subsequently exported files, ensuring the directory exists to avoid errors. Then, call the QGIS secondary development API, relying on the DWG driver capability compiled by GDAL, to establish an access connection with the CAD file through the ogr.Open function of the OGR module, reading the CAD file data as a dwg_data object. If dwg_data is None, meaning the CAD file cannot be opened, an exception message is triggered: "Unable to open DWG file; please check GDAL's DWG driver configuration," thus ensuring the access connection is established successfully and the CAD file can be opened smoothly.

[0042] Establishing a connection and opening CAD files in this way avoids the licensing restrictions and high costs that may result from using commercial software, while the flexibility and scalability of open-source software facilitates subsequent development.

[0043] S12, based on the access connection, traverse all layers in the CAD file, extract vector data in each layer, and synchronously obtain the geometric feature information of the vector data.

[0044] Vector data can accurately reproduce the graphic details in CAD files without distortion during scaling. Geometric feature information includes geometric type and dimensional features. The geometric type is identified by the wkb (Well-Known Binary) type in the OGR module. wkb is a standard format for representing spatial geometric objects, such as wkbPoint for point type, wkbLineString for line type, and wkbPolygon for polygon type. Dimensional features include 25D, corresponding to types such as wkbPoint25D, wkbLineString25D, and wkbPolygon25D.

[0045] First, the total number of layers in the CAD file is obtained using the `dwg_data.GetLayerCount` function. Then, each layer's index is iterated through, and the `dwg_data.GetLayerByIndex` function is called with the index as a parameter to obtain a single layer object. The `layer.ResetReading` function is then called to reset the layer's feature read pointer, ensuring that reading starts from the first feature. Next, the `layer.GetNextFeature` function is called repeatedly to iterate through all features of the current layer. If the obtained feature is None, the iteration of the current layer ends. If a valid feature is obtained, the `feature.GetGeometryRef` function is called to extract the corresponding geometric object `geom`. If `geom` is not empty, the `geom.GetGeometryType` function is called to obtain the geometric type of the geometric object. This process simultaneously completes the extraction of vector data and the acquisition of geometric feature information.

[0046] In this way, all layers in the CAD file are traversed, vector data within each layer is extracted, and geometric feature information of the vector data is obtained simultaneously.

[0047] S13. Classify the extracted vector data according to the geometric feature information of the vector data, and export the classified vector data into a general vector format file.

[0048] First, based on the geometric characteristics of the vector data, it is divided into point data, line data, and polygon data. If the geometric type is ogr.wkbPoint or ogr.wkbPoint25D, the corresponding vector data is classified as point data. If the geometric type is ogr.wkbLineString, ogr.wkbMultiLineString, or ogr.wkbLineString25D, it is classified as line data; and if the geometric type is ogr.wkbPolygon, ogr.wkbMultiPolygon, or ogr.wkbPolygon25D, it is classified as polygon data, ensuring that the geometric characteristics of each data type are consistent.

[0049] Next, geometric type identifiers are added to each data category to distinguish between different categories and dimensions. Specifically, for point data, an identifier is added to indicate that it belongs to the point category and contains 25D dimensional data; for line data, an identifier is added to indicate that it belongs to the line category and contains multiple lines and 25D dimensional data; for polygon data, an identifier is added to indicate that it belongs to the polygon category and contains multiple polygons and 25D dimensional data. These identifiers clearly distinguish the category and dimensional attributes of each type of data, ensuring accurate data type identification during subsequent data processing and avoiding confusion between different categories of data.

[0050] Next, the point, line, and polygon data with geometric type identifiers are exported as independent universal vector format files. These universal vector format files use the SHP (ESRIShapefile) format, a widely compatible vector data format in the architecture and geographic information industry. Specifically, the `ogr.GetDriverByName` function calls the ESRIShapefile driver to create data sources for storing point, line, and polygon data, respectively, located in the output directory as `points.shp`, `lines.shp`, and `polygons.shp`. Then, for each data type, the `CreateLayer` function of the corresponding data source is called to create a layer. The layer name corresponds to the data type and is associated with the target coordinate system. Finally, the `CreateFeature` function of the layer is called to write the vector data with geometric type identifiers to the layer, completing the export of the independent universal vector format files.

[0051] Finally, all exported general vector format files are uniformly converted to the target coordinate system. Using the OSR (Open Spatial Reference) module, a source coordinate system (source_srs) and a target coordinate system (target_srs) are first created. The source coordinate system's corresponding EPSG (European Petroleum Survey Group) code is imported using the `source_srs.ImportFromEPSG` function; the target coordinate system's EPSG code is imported using the `target_srs.ImportFromEPSG` function, for example, importing EPSG4326 (WGS84) as the target coordinate system. Then, a coordinate system transformation object (`transform`) is created, and the source and target coordinate systems are linked using the `osr.CoordinateTransformation` function. During the data export process, the `geom.Transform` function of the geometry object is called, passing in the `transform` object to complete the coordinate system transformation of a single feature. This ensures that all exported general vector format files are uniformly converted to the target coordinate system, guaranteeing data coordinate system consistency. After completing the above operations, call the Destroy function of each data source to release the resources occupied by point_shp, line_shp, polygon_shp, and dwg_data to avoid resource leaks affecting subsequent processes.

[0052] Through the above steps, the extracted vector data is classified according to its geometric features, and the classified vector data is exported as a universal vector format file. At the same time, the coordinate system is uniformly transformed, which improves the universality and usability of the data.

[0053] In a preferred embodiment of the present invention, the code for automating and lightweight processing and format conversion of the general vector format file according to business requirements in step S2 is as follows: import geopandas as gpd import Topology from topojson import os def process_geodata(input_files, output_path, attribute_filters=None): # Initialize the data container gdf_dict = { 'points': None, 'lines': None, 'polygons': None, 'annotations': None } # Read and categorize data for file in input_files: gdf = gpd.read_file(file) # Categorize by Geometric Type geom_type = gdf.geometry.type.iloc[0] if not gdf.empty else None if geom_type in ['Point', 'MultiPoint']: target = 'points' elif geom_type in ['LineString', 'MultiLineString']: target = 'lines' elif geom_type in ['Polygon', 'MultiPolygon']: target = 'polygons' else: target = 'annotations' # Merge data of the same type if gdf_dict[target] is None: gdf_dict[target] = gdf else: gdf_dict[target] = gpd.pd.concat([gdf_dict[target], gdf]) # Application Attribute Filtering if attribute_filters: for geom_type in gdf_dict: if gdf_dict[geom_type] is not None: query = '&'.join([f"{k} == '{v}'" for k, v in attribute_filters.items()]) gdf_dict[geom_type] = gdf_dict[geom_type].query(query) # Merge all geometry types and transform coordinate systems merged_gdf = gpd.GeoDataFrame() for geom_type, data in gdf_dict.items(): if data is not None: merged_gdf = gpd.pd.concat([ merged_gdf, data.to_crs(epsg=4490) # Unify to CGCS2000 coordinate system ]) # Generate TopoJSON if not merged_gdf.empty: topology = Topology( merged_gdf, prequantize=False, topology=True ) topology.to_json(output_path) print(f"Successfully exported TopoJSON to: {os.path.abspath(output_path)}") else: print("Warning: No matching geographic feature found") # Usage Example if __name__ == "__main__": # Input file list input_files = [ "path / to / points.shp", "path / to / lines.geojson", "path / to / polygons.gpkg" ] # Attribute filtering criteria (Example: Extract elements of type "highway") filters = {"type": "highway"} # Execution Processing process_geodata( input_files=input_files, output_path="output / topology.json", attribute_filters=filters ) In step S2, the general vector format file undergoes automated lightweight processing and format conversion according to business requirements, specifically including: S21, Read the general vector format file, classify and integrate the data in the file according to the geometric type identifier, and form a point data set, a line data set, and a surface data set.

[0054] Common vector file formats include SHP, GeoJSON, and GPKG, all of which are widely used vector data storage formats in the fields of architecture and geographic information. In this embodiment, the operation is implemented using Python in conjunction with the GeoPandas tool. Python is a cross-platform programming language, and GeoPandas is a geospatial data processing library based on Python.

[0055] First, define the input file list input_files, which contains the paths to the general vector format files to be processed, such as points.shp, lines.geojson, and polygons.gpkg. Then, initialize the data container gdf_dict, which is a dictionary type containing four keys: points, lines, polygons, and annotations, which are used to store point, line, polygon, and annotation data in GeoDataFrame. By looping through the input file list, the gpd.read_file function is called to read the data for each file and generate the corresponding GeoDataFrame object gdf. If gdf is not empty, gdf.geometry.type.iloc[0] is called to get the geometry type geom_type of the data in the file: if geom_type is Point or MultiPoint, gdf is stored under the points key of gdf_dict; if it is LineString or MultiLineString, it is stored under the lines key; if it is Polygon or MultiPolygon, it is stored under the polygons key; other types are stored under the annotations key. If the same geometry type corresponds to multiple file data, the gpd.pd.concat function is called to merge the newly read gdf with the existing gdf in the container, and finally form a point data set, a line data set, and a polygon data set, which correspond to the GeoDataFrame stored in gdf_dict with the keys points, lines, and polygons, respectively.

[0056] S22, Set attribute filtering conditions according to business needs, and filter key data based on the conditions.

[0057] Specifically, the first step is to define attribute filtering conditions based on the business scenario. These scenarios include water conservancy construction and electromechanical construction, and the filtering conditions correspond to the layer attributes that require priority in each scenario. In the water conservancy construction scenario, the key layer attributes are those related to the remediation of buildings, such as layers whose names contain "remediation building" or whose feature type is "remediation building." In the electromechanical construction scenario, the key layer attributes are those related to the pipeline network structure, such as layers whose names contain "pipeline network" or whose feature type is "pipeline." Attribute filtering conditions are defined in key-value pair format. For example, setting `filters` to `type` corresponding to "highway" filters features of type "highway." The key in this key-value pair is the data attribute field name, and the value is the attribute content to be filtered under that field. The resulting filtering conditions will be used for subsequent data filtering.

[0058] Next, the three categorized datasets are traversed, and data meeting the attribute filtering criteria are selected as key data. It checks if the attribute filtering criteria `attribute_filters` exist; if so, it iterates through the three keys `points`, `lines`, and `polygons` (corresponding to the three dataset categories) in `gdf_dict`. For each key's corresponding GeoDataFrame, a query statement (`query`) is constructed based on the key-value pairs in `attribute_filters`. Then, the `query` method of the GeoDataFrame is called, passing in the constructed query statement. Rows meeting the criteria are selected, and the GeoDataFrame corresponding to that key is updated. The updated GeoDataFrame is the dataset corresponding to the key data.

[0059] Furthermore, unfiltered non-critical data is merged into corresponding datasets based on geometric type. The merged non-critical data is only used for webpage display and does not support interactive business operations. Specifically, unfiltered non-critical data refers to data in the initial dataset that does not meet the attribute filtering conditions. After filtering, data that does not meet the conditions in the initial dataset has been removed. This removed data needs to be aggregated by geometric type: non-critical data of point type is merged into the non-critical data container corresponding to the point dataset; non-critical data of line type is merged into the non-critical data container corresponding to the line dataset; and non-critical data of polygon type is merged into the non-critical container corresponding to the polygon dataset. The merging operation is implemented using the `gpd.pd.concat` function, which integrates non-critical data of the same geometric type into a single `GeoDataFrame`. The merged `GeoDataFrame` retains only basic geometric information and simple attributes, and will only be used for static display on the webpage; interactive business functions such as click-to-query and highlighting will not be developed.

[0060] S23. Perform coordinate system unification processing on the selected key data to make the data conform to the preset coordinate system requirements.

[0061] This embodiment performs coordinate system unification processing on the selected key data to ensure that the data conforms to the preset coordinate system requirements. The preset coordinate system is the CGCS2000 (China Geodesic Coordinate System 2000) coordinate system, and the EPSG code corresponding to the CGCS2000 coordinate system is 4490.

[0062] For the GeoDataFrames corresponding to the filtered point, line, and polygon datasets, call their `to_crs` method, passing in the parameter `epsg=4490`. This method will automatically convert the data from the current coordinate system to the CGCS2000 coordinate system. If the initial coordinate system of the data is unknown, it is necessary to first obtain and confirm the initial coordinate system through the `crs` property of the GeoDataFrame to ensure the accuracy of the conversion process. Ultimately, this ensures that the coordinate systems of the three key data types are completely consistent, laying the foundation for data consistency in subsequent lightweight processing and webpage loading.

[0063] By traversing the dataset for each geometric type and performing coordinate transformations on non-empty datasets, we ensure that all key data conforms to the preset coordinate system requirements. Coordinate system unification avoids data display and analysis errors caused by inconsistencies in coordinate systems, improving data accuracy and usability.

[0064] S24 performs lightweight processing on the key data after coordinate unification and converts it into a lightweight data format file.

[0065] Specifically, firstly, topology optimization is performed on the key data after coordinate unification to eliminate redundant nodes and duplicate line segments. Topology optimization can be achieved using the `Topology` class, a utility class for building and processing topological relationships. In practice, the point, line, and polygon data sets after coordinate unification are first merged into a single `GeoDataFrame`, denoted as `merged_gdf`, using the `gpd.pd.concat` function. Then, a `Topology` object is created, passing `merged_gdf` as the data source, and setting the parameters `prequantize=False` and `topology=True`. `prequantize=False` indicates that coordinate prequantization is not performed, preserving the original data precision; `topology=True` enables the topology building function. During the topology relationship construction process, the `Topology` class automatically identifies and eliminates redundant nodes and duplicate line segments in the line data, simplifying the data structure while ensuring the integrity of the spatial topological relationships, avoiding graphic errors or redundant loading issues during subsequent webpage rendering.

[0066] Then, convert the key - focus data after topology optimization into a lightweight data - format file. During the conversion process, preserve the geometric type identifier and attribute information of the data. The lightweight data - format file adopts the TopoJSON format. The TopoJSON format reduces data redundancy by sharing boundary line segments, has a smaller volume compared to traditional vector formats, and is more suitable for network transmission and web page loading. Specifically in implementation, call the to_json method of the Topology object, passing in the output path output_path. This method converts the merged_gdf after topology optimization into a TopoJSON - format file and saves it to the specified path. During the conversion process, the system will automatically preserve the geometric type identifier and core attribute information of the data, ensuring that when the subsequent front - end open - source library loads the file, it can accurately identify the data type and display the necessary attribute content, meeting the requirements of web - end viewing and basic interaction.

[0067] After completing the above operations, if merged_gdf is not empty, output a prompt message indicating successful export of the TopoJSON file, including the absolute path of the file; if merged_gdf is empty, output a warning message indicating that no qualified geographic features are found, so that developers can troubleshoot problems in the data screening or processing process.

[0068] Through the above steps, the automated lightweight processing and format conversion of general vector - format files according to business requirements are completed, improving the efficiency and accuracy of data processing and providing high - quality lightweight data for subsequent network applications.

[0069] This invention performs topology optimization on CAD data to eliminate redundant nodes and duplicate line segments, converts the data into a lightweight format, and then efficiently renders it through a front - end open - source library; this technical means makes the solution have extremely low hardware requirements, and can run smoothly on ordinary integrated display devices, especially performing well on mobile devices, solving the problems of slow loading speed and high hardware performance requirements of existing solutions.

[0070] In a preferred embodiment of this invention, in step S3, the code for loading the converted lightweight data - format file through a front - end open - source library to achieve web page loading and interaction is as follows: <!DOCTYPE html> <title> Leaflet TopoJSON Interaction Example< / title> <link rel="stylesheet" href="https: / / unpkg.com / leaflet@1.7.1 / dist / leaflet.css"> <!-- Introduce the Leaflet and TopoJSON parsing libraries --> <script src="https: / / unpkg.com / leaflet@1.7.1 / dist / leaflet.js">< / script> <script src="https: / / unpkg.com / topojson-client@3.1.0 / dist / topojson-client.min.js">< / script> <script> / / 初始化地图const map = L.map('map').setView([39.9042, 116.4074], 5); / / 以某地为中心 / / 异步加载TopoJSON数据fetch('data / china_provinces.topojson').then(response =>response.json()).then(topologyData =>{ / / 转换TopoJSON为GeoJSONconst provinces = topojson.feature(topologyData,topologyData.objects.provinces / / 根据实际TopoJSON对象名称修改); / / 创建GeoJSON图层并设置样式const geoJsonLayer = L.geoJSON(provinces, {style: defaultStyle,onEachFeature: onEachProvince}).addTo(map); / / 自动适应地图范围map.fitBounds(geoJsonLayer.getBounds());}); / / 默认样式配置function defaultStyle(feature) {return {fillColor: "#3388ff",weight: 1,opacity: 1,color: "white",fillOpacity: 0.7};} / / 每个要素的交互处理function onEachProvince(feature, layer) { / / 弹窗内容生成const popupContent = `<h3>${feature.properties.name}< / h3>面积: ${feature.properties.area} km²人口: ${feature.properties.population} 万`; / / 绑定弹窗layer.bindPopup(popupContent); / / 点击交互事件layer.on({click: function(e) { / / 移除所有高亮map.eachLayer(layer =>{if (layer.setStyle) {layer.setStyle(defaultStyle());}}); / / 高亮当前选中区块e.target.setStyle({fillColor: '#ff0000',color: '#660000'}); / / 显示统计信息showStatistics(feature.properties);},mouseover: function(e) {e.target.setStyle({weight: 3});},mouseout: function(e) {e.target.setStyle({weight: 1});}});}< / script> In step S3, the converted lightweight data format file is loaded using a front-end open-source library to enable webpage loading and interaction, specifically including: S31 uses a front-end open-source library to create a web-based map container, initializes basic map parameters, and determines the initial map display location.

[0071] The front-end open-source libraries include Cesium, a 3D geographic information visualization open-source library, and Leaflet, a lightweight map visualization open-source library. Both support the construction of map containers and the loading of vector data on web pages. In practice, a map container is first created in an HTML document, and then... Define a container using the `<map>` tag and set a unique identifier, such as `id="map"`; then set the container height using CSS styles, such as `height:600px`, to ensure that the map has a fixed display area on the webpage.

[0072] Next, the selected front-end open-source library code files are imported, such as the Leaflet CSS and JavaScript files; the CSS file is used for map style rendering, and the JavaScript file is used for map functionality implementation. A map instance is created using the initialization functions provided by the front-end open-source library. Taking Leaflet as an example, the `L.map` function is called, passing in the unique identifier of the map container (such as 'map'), to generate a map object. Basic map parameters are initialized, including the map zoom level, which is set using the `setView` method, for example, setting the zoom level to 5. Simultaneously, the initial map display position is determined, specified by geographic coordinates, for example, using the geographic coordinates of a certain location (latitude 39.9042, longitude 116.4074) as the initial center point, so that the map displays the area centered on this point by default after loading. This completes the construction of the map container and the initialization of basic parameters.

[0073] S32 loads the converted lightweight data format file into the map container, renders the corresponding layer according to the geometric type identifier of the data, and adapts it to the map display range.

[0074] In this embodiment, the lightweight data format file is a TopoJSON (Topological JavaScriptObject Notation) format file. TopoJSON reduces data redundancy by sharing boundaries, resulting in a small file size and high network transmission efficiency. Specifically, a TopoJSON parsing library is first introduced to convert the TopoJSON format data into GeoJSON format data that can be recognized by the front-end open-source library.

[0075] A TopoJSON file is loaded via an asynchronous request function, passing in the file path 'data / china_provinces.topojson'. Upon successful request, the `response.json()` method is called to parse the file data, obtaining topology data in TopoJSON format. The `topojson.feature` function of the TopoJSON parsing library is then called, passing in the topology data and the data object name, to convert the TopoJSON data into GeoJSON data, preserving the geometric type identifiers of the data during the conversion.

[0076] The vector layer creation function, based on the front-end open-source library, takes in the converted GeoJSON data and generates geographic feature layers. At the same time, it sets the layer rendering style according to the geometric type identifier of the data. For example, point features use the default marker style, line features set the line color and weight, and polygon features set the fill color and transparency. The function then renders the corresponding layers and adds them to the map container.

[0077] Finally, to adapt the map display range, the `fitBounds` method of the map object is called, passing in the boundary range of the geographic feature layer. The map will automatically adjust the zoom level and center point position to ensure that the rendered layer is fully displayed within the visible range of the map container, avoiding situations where the layer part is outside the field of view.

[0078] S33, bind interactive events to the rendered layer. The interactive events include clicking the layer to display data details, clicking to highlight the target layer, increasing the layer boundary weight when the mouse hovers over it, and restoring the default boundary weight when the mouse leaves it.

[0079] By utilizing feature interaction processing functions provided by front-end open-source libraries, such as Leaflet's `onEachFeature` parameter, interactive logic is bound to each geographic feature in the layer. For each geographic feature, pop-up content is first generated based on the feature's attribute information, organized in HTML format. The `bindPopup` method of the layer object is called, passing in the generated pop-up content to complete the binding between the pop-up and the layer feature. When the user clicks on the target feature in the layer, the pop-up automatically appears at the feature's location, displaying detailed data information for that feature, achieving the interactive effect of displaying data details upon click.

[0080] In the click event handler, all layers in the map are first iterated through using the map object's `eachLayer` method. For layers with style setting capabilities, the `setStyle` method is called with the default style passed in, removing the existing highlight effect to prevent confusion caused by multiple features being highlighted simultaneously. Then, the currently clicked target feature is retrieved, and its `setStyle` method is called to set a highlight style different from the default style, making the target feature visually prominent and achieving the interactive effect of highlighting the target layer when clicked.

[0081] In the mouseover event handler, get the currently hovered feature, call its setStyle method, and adjust the feature's boundary weight from the default 1 to 3, making the feature boundary visually thicker and reminding the user that the mouse is currently over the feature, thus achieving the interactive effect of increasing boundary weight when hovering.

[0082] In the mouseout event handler, retrieve the currently left-away feature, call its setStyle method, restore the feature's boundary weight from 3 when hovering to the default 1, return the feature boundary to its initial state, ensure the consistency of map display, and achieve the interactive effect of restoring the default weight when leaving.

[0083] By binding the aforementioned interactive events, the lightweight data layer loaded on the webpage is equipped with rich user interaction capabilities, enhancing the user's experience in viewing and operating CAD data, and meeting the need for convenient interaction with CAD data through the webpage in architectural construction scenarios.

[0084] Figure 2 This is a flowchart of the core processing stages of the lightweight construction CAD webpage loading method provided by the present invention, with reference to... Figure 2 In a preferred embodiment of the present invention, the method for lightweight loading of construction CAD web pages includes the following steps: First, CAD data extraction is performed. Based on Python and QGIS SDK, the original DWG and DXF files are processed automatically. Vector data is extracted and converted into SHP files using GDAL's DWG driver.

[0085] Next, lightweight data transformation is performed using Python in conjunction with GeoPandas (Geographic Pandas, a geospatial data processing library) for automated processing. This stage includes three key operations: classifying data according to geometric types, extracting attributes based on business needs, and eliminating redundant data through topological compression, ultimately generating a lightweight TopoJSON file.

[0086] Finally, lightweight webpage loading was implemented by loading TopoJSON files using open-source frameworks such as Leaflet and Cesium, enabling the visualization and interactive operation of construction CAD data on the webpage.

[0087] This invention employs fully open-source technology, eliminating commercial software licensing fees and significantly reducing development and usage costs. Data is processed entirely on the owner's own server, without cloud-based steps, ensuring data security and autonomy. Through topology optimization and lightweight formatting, data volume is greatly reduced, resulting in fast webpage loading speeds, smooth mobile performance, and extremely low hardware requirements. The output topoJSON is an industry-standard format, compatible with most commercial and open-source software, highly scalable, and adaptable to the diverse needs of small and medium-sized building information technology (BIM) projects.

[0088] Figure 3 The structural block diagram of the lightweight construction CAD webpage loading device provided by the present invention is shown below. Figure 3 The lightweight device for loading construction CAD web pages includes: The CAD data extraction module 301 is used to extract vector data from CAD files based on the secondary development API of open source software and export it as a general vector format file. The lightweight processing module 302 is used to perform automated lightweight processing and format conversion on the general vector format file according to business requirements; The webpage loading and interaction module 303 is used to load the converted lightweight data format file through the front-end open-source library to realize webpage loading and interaction.

[0089] The apparatus for lightweight loading of construction CAD web pages provided by the present invention is used to execute the methods for lightweight loading of construction CAD web pages provided in the foregoing embodiments. The methods for lightweight loading of construction CAD web pages have been described in detail in the foregoing embodiments, and will not be repeated here.

[0090] Figure 4 A structural block diagram of the electronic device provided by the present invention, such as Figure 4 As shown, the present invention also provides an electronic device, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 400 includes a processor 401 and a memory 402, wherein the memory 402 stores a lightweight program 403 for loading construction CAD web pages.

[0091] In some embodiments, memory 402 may be an internal storage unit of a computer device, such as a hard disk or memory. In other embodiments, memory 402 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 402 may include both internal and external storage units of the computer device. Memory 402 is used to store application software and various types of data installed on the computer device, such as program code installed on the computer device. Memory 402 can also be used to temporarily store data that has been output or will be output. In one embodiment, when the lightweight program 403 for loading the construction CAD webpage is executed by processor 401, the following steps are implemented: Extract vector data from CAD files using open-source software secondary development API and export it as a common vector format file; The general vector format files are processed automatically and lightweightly according to business requirements, and their format is converted. By loading the converted lightweight data format file through a front-end open-source library, webpage loading and interaction can be achieved.

[0092] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as executing a lightweight program for loading construction CAD web pages.

[0093] This embodiment also provides a computer-readable storage medium storing a lightweight program for loading construction CAD web pages. When executed by a processor, the lightweight program for loading construction CAD web pages performs the following steps: Extract vector data from CAD files using open-source software secondary development API and export it as a common vector format file; The general vector format files are processed automatically and lightweightly according to business requirements, and their format is converted. By loading the converted lightweight data format file through a front-end open-source library, webpage loading and interaction can be achieved.

[0094] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for loading lightweight of construction CAD webpage, characterized in that, include: Extract vector data from CAD files using open-source software secondary development API and export it as a common vector format file; The general vector format files are processed automatically and lightweightly according to business requirements, and their format is converted. By loading the converted lightweight data format file through a front-end open-source library, webpage loading and interaction can be achieved.

2. The method for construction CAD webpage loading lightweight according to claim 1, characterized in that, The process of extracting vector data from CAD files based on open-source software secondary development APIs and exporting it as a common vector format file includes: Establish an access connection with the CAD file through the secondary development API of open source software, and open the CAD file; Based on the access connection, all layers in the CAD file are traversed, vector data in each layer is extracted, and geometric feature information of the vector data is obtained synchronously. The extracted vector data is classified according to its geometric features, and the classified vector data is exported as a general vector format file.

3. The method for construction CAD webpage loading lightweight according to claim 2, characterized in that, The step of classifying the extracted vector data according to the geometric feature information of the vector data and exporting the classified vector data into a general vector format file includes: Based on the geometric features of the vector data, the vector data is divided into point data, line data, and surface data. Add geometric type identifiers to each data category to distinguish different categories and dimensions; Export point data, line data, and polygon data with geometric type identifiers as separate, universal vector format files; Convert the exported general vector format files to the target coordinate system.

4. The method of claim 1, wherein, Automated, lightweight processing and format conversion of the aforementioned general vector format files according to business requirements, including: Read the general vector format file, classify and integrate the data in the file according to the geometric type identifier, and form a point data set, a line data set, and a surface data set; Set attribute filtering conditions according to business needs, and filter key data based on the conditions. The selected key data are processed to conform to the preset coordinate system requirements. The key data after coordinate unification is processed to be lightweight and converted into a lightweight data format file.

5. The method for construction CAD webpage loading lightweight according to claim 4, characterized in that, The step of setting attribute filtering conditions according to business needs and filtering key data based on these conditions specifically includes: Attribute filtering conditions are defined according to business scenarios; wherein, the business scenarios include water conservancy construction and electromechanical construction, and the filtering conditions correspond to the layer attributes that need to be focused on in the scenarios. Traverse the three categories of data sets after classification and integration, and select data that meets the attribute filtering conditions as key data to focus on; Unfiltered, non-priority data will be merged into the corresponding dataset according to geometric type. The merged non-priority data will only be used for web page display and will not support business interaction.

6. The method for construction CAD webpage loading lightweight according to claim 4, characterized in that, The process of lightweighting the key data after coordinate unification and converting it into a lightweight data format file specifically includes: Topology optimization is performed on the key data after coordinate unification to eliminate redundant nodes and duplicate line segments in the data; The topology-optimized key data is converted into a lightweight data format file, preserving the geometric type identifier and attribute information of the data during the conversion process.

7. The method of claim 1, wherein the construction CAD webpage loading lightening is characterized by, The converted lightweight data format file is loaded through a front-end open source library to realize webpage loading and interaction, including: A webpage end map container is established through a front-end open source library, map basic parameters are initialized, and an initial display position of the map is determined; The converted lightweight data format file is loaded into the map container, corresponding layers are rendered according to the geometric type identification of the data, and the map display range is adapted; An interaction event is bound to the rendered layer, and the interaction event includes clicking the layer to display data details, highlighting the target layer when clicked, increasing the layer boundary weight when the mouse hovers, and restoring the default weight of the boundary when the mouse leaves.

8. A device for loading lightweight of construction CAD web page, characterized in that, including: A CAD data extraction module is configured to extract vector data of a CAD file based on a secondary development API of an open source software and export the vector data into a general vector format file; A lightweight processing module is configured to automatically process and convert the general vector format file according to business requirements; A webpage loading and interaction module is configured to load the converted lightweight data format file through a front-end open source library to realize webpage loading and interaction.

9. An electronic device, characterized in that including a memory and a processor, wherein the memory is configured to store a program; the processor is coupled with the memory and is configured to execute the program stored in the memory to implement the steps of the method for loading lightweight construction CAD webpages according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, a computer readable program or instruction is stored, and the program or instruction is executed by a processor to implement the steps of the method for loading lightweight construction CAD webpages according to any one of claims 1 to 7.