A data format conversion method, system, storage medium and program product

The method addresses data loss and inaccuracy in DWG to SHP conversions by employing feature extraction and loss data storage, ensuring accurate and complete data conversion for GIS applications.

CN119088759BActive Publication Date: 2025-07-15BEIJING XINXING HUANYU INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411578659.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-07-15
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The prior art has problems of information loss and insufficient accuracy in the conversion of CAD drawings and GIS data formats, especially the difficulty in effectively converting complex graphic elements and professional symbol information, which affects the availability and reliability of data.

Method used

Technical solutions for feature data extraction and mapping data conversion are adopted, supplementary data is generated in combination with the data conversion model, and a loss data storage mechanism is established to ensure data integrity and reversibility, and to ensure version compatibility through version information checking and upgrading prompt mechanisms.

Benefits of technology

Lossless conversion between DWG and SHP formats is realized, ensuring data integrity and availability, supporting data traceability and recovery, and improving the accuracy and consistency of conversions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088759B_ABST
    Figure CN119088759B_ABST
Patent Text Reader

Abstract

A data format conversion method, system, storage medium and program product, which relate to the field of electrical digital data processing. The method includes: receiving first format data, and determining the data format of the first format data and the target format of the second format data that is the conversion target; the data format is DWG format or SHP format; extracting the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data; inputting the mapping data and the target format into a data conversion model to obtain supplementary data; generating the second format data based on the mapping data and the supplementary data; extracting the data different from the mapping data in the feature data as loss data, and storing the loss data in the conversion database corresponding to the second format data. Implementing this method can achieve lossless conversion between DWG format and SHP format and improve the utilization rate of heterogeneous data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic digital data processing, and in particular, to a data format conversion method, system, storage medium, and program product. Background Art

[0002] In the field of surveying and mapping geographic information, the diversification of data formats is a common phenomenon. Engineering designers usually use CAD software to draw engineering drawings, generating DWG format data; while in geographic information system applications, the SHP format is widely used for the storage and analysis of spatial data. With the improvement of the informatization level, data exchange between CAD drawing and GIS analysis is often required in engineering projects, which poses higher requirements for data format conversion.

[0003] In the related art, data format conversion usually adopts a direct mapping method to convert graphic elements in DWG into geometric types supported by SHP. For example, line segments and polylines in DWG are converted into line features in SHP, and closed polylines are converted into polygon features, while basic attribute information such as layer names and colors is extracted. When processing annotation information, the text position and content are extracted and converted into the annotation layer of SHP.

[0004] However, in actual engineering applications, the DWG format contains a large number of complex graphic elements, such as spline curves, parametric objects, etc., and these elements are often simplified during the conversion process. In addition, CAD-specific information such as professional symbols and annotation systems in engineering drawings is also difficult to find corresponding expressions in the SHP format. In projects such as municipal planning and pipeline engineering, this information loss will affect subsequent data analysis and applications, reducing the usability of data. Summary of the Invention

[0005] This application provides a data format conversion method, system, storage medium, and program product for realizing lossless conversion between DWG format and SHP format and improving the utilization rate of heterogeneous data.

[0006] In a first aspect, the present application provides a data format conversion method, which is applied to a format conversion system. The method includes: receiving first format data, and determining the data format of the first format data and the target format of the second format data that is the conversion target; the data format is the DWG format or the SHP format; when the data format is the DWG format, the target format is the SHP format; when the data format is the SHP format, the target format is the DWG format; extracting the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data; inputting the mapping data and the target format into a data conversion model to obtain supplementary data; generating second format data based on the mapping data and the supplementary data; extracting the data different from the mapping data in the feature data as loss data, and storing the loss data in the conversion database corresponding to the second format data.

[0007] In the above embodiment, the format conversion system realizes the conversion between the DWG and SHP formats by identifying and extracting data features during the data conversion process, establishing a mapping relationship, and using the data conversion model to generate supplementary data. At the same time, by extracting and storing the loss data during the conversion process, a data recovery mechanism is established, effectively ensuring the integrity and reversibility of the data conversion and solving the problem of information loss in traditional format conversion.

[0008] Combined with some embodiments of the first aspect, in some embodiments, the step of extracting the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data specifically includes: obtaining the layer template information corresponding to the data format of the first format data from a preset layer configuration library; classifying the layers in the first format data based on the layer template information to obtain building element types; dividing the first format data into geometric data and attribute data according to the building element types; classifying the geometric data according to the mathematical function type to determine geometric feature parameters; parsing the attribute data according to the standardization specification to determine attribute feature parameters; determining the feature data corresponding to the data format in the first format data based on the geometric feature parameters and the attribute feature parameters; extracting the data matching the target format from the first format data as mapping data according to the preset data format mapping rules.

[0009] In the above embodiment, the format conversion system realizes the identification and extraction of geometric data and attribute data by introducing a layer configuration library and a standardization specification, and classifying and parameterizing the data; extracting matching data based on the preset data format mapping rules ensures the standardization and accuracy of the conversion process, improving the quality and efficiency of data conversion.

[0010] In combination with some embodiments of the first aspect, in some embodiments, the steps of classifying geometric data according to mathematical function types and determining geometric feature parameters specifically include: obtaining a sequence of coordinate points in the geometric data, and classifying the geometric data into one or more of a straight line type, an arc type, and a spline curve type according to the distribution characteristics of the sequence of coordinate points; determining the corresponding mathematical function type according to the fitting type of the geometric data; and generating geometric feature parameters based on the mathematical function type.

[0011] In the above embodiments, the format conversion system classifies geometric data into different mathematical function types by analyzing the distribution characteristics of the sequence of coordinate points, and generates geometric feature parameters accordingly, realizing the expression of complex graphic elements and the accurate representation of features.

[0012] In combination with some embodiments of the first aspect, in some embodiments, the steps of extracting the data in the feature data that is different from the mapping data as loss data and storing the loss data in the conversion database corresponding to the second format data specifically include: extracting the data in the feature data that is different from the mapping data as loss data; generating a unique identification code corresponding to the loss data, and classifying the loss data according to the building element type to obtain an association mapping table between the loss data and the second format data; and storing the loss data, the unique identification code, and the association mapping table in the conversion database corresponding to the second format data.

[0013] In the above embodiments, the format conversion system ensures the queryability and recoverability of the data and guarantees the possibility of data recovery by generating a unique identification code for the loss data and establishing an association mapping table with the target format data, through this way of classified storage and association mapping.

[0014] In combination with some embodiments of the first aspect, in some embodiments, after the steps of storing the loss data, the unique identification code, and the association mapping table in the conversion database corresponding to the second format data, the method further includes: when receiving a data recovery request for converting the second format data into the first format data, determining the corresponding loss data according to the association mapping table; extracting the inverse mapping data corresponding to the data format of the first format data in the second format data; and generating the first format data according to the loss data and the inverse mapping data.

[0015] In the above embodiments, the format conversion system realizes the bidirectional conversion of the data format by establishing a recovery mechanism for the loss data and the inverse mapping data, ensures the integrity of the data when converting between different formats, and avoids the information loss problem in traditional conversion methods.

[0016] In some embodiments in combination with some embodiments of the first aspect, after the steps of receiving data in the first format, determining the data format of the first-format data, and the target format of the second-format data as the conversion target, the method further includes: determining the version information of the first-format data; matching the version information with a preset version library, and after the matching fails, sending a version upgrade prompt to the user terminal; receiving the updated first-format data returned by the user terminal.

[0017] In the above embodiments, the format conversion system ensures the version compatibility of the input data through the version check and upgrade prompt mechanism, avoids conversion failures caused by version incompatibility, and improves the usability and stability of the system.

[0018] In some embodiments in combination with some embodiments of the first aspect, before the step of inputting the mapping data and the target format into the data conversion model to obtain supplementary data, the method further includes: obtaining the coordinate system information of the mapping data; when the coordinate system information is inconsistent with the default coordinate system corresponding to the target format of the second-format data, determining the corresponding coordinate conversion algorithm according to the preset accuracy requirement; based on the coordinate conversion algorithm, converting the mapping data into the default coordinate system.

[0019] In the above embodiments, the format conversion system ensures the conversion of spatial data between different coordinate systems through the automatic check and conversion of the coordinate system, and guarantees the accuracy and consistency of the spatial data.

[0020] In a second aspect, an embodiment of the present application provides a format conversion system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the format conversion system to execute the methods described in the first aspect and any possible implementation manner in the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product containing instructions, when the above computer program product runs on the format conversion system, enabling the above format conversion system to execute the methods described in the first aspect and any possible implementation manner in the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, when the above instructions run on the format conversion system, enabling the above format conversion system to execute the methods described in the first aspect and any possible implementation manner in the first aspect.

[0023] Understandably, the format conversion system provided in the second aspect above, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiments of the present application. Therefore, the beneficial effects they can achieve can refer to the beneficial effects in the corresponding method, which will not be elaborated here.

[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0025] 1. Since the technical solutions of feature data extraction and mapping data conversion are adopted, combined with a data conversion model to generate supplementary data, and a loss data storage mechanism is established, it is possible to achieve conversion between different formats while ensuring data integrity, effectively solving the problems of information loss and low conversion accuracy in the data conversion process in the prior art. Furthermore, the traceability and recoverability of data format conversion are realized, ensuring the integrity and availability of the converted data.

[0026] 2. Since the storage scheme of loss data unique identification and association mapping table is adopted, combined with the building element type classification mechanism, and these information are uniformly stored in the conversion database, it is possible to accurately record and track the data changes in the conversion process, effectively solving the problems of untraceable data conversion and inability to recover after information loss in the prior art. Furthermore, the traceability and recoverability of the data conversion process are realized.

[0027] 3. Since the version information check and automatic upgrade prompt mechanism are adopted, combined with the matching verification of the preset version library, and version update is realized through user terminal interaction, it is possible to ensure the version compatibility of the input data before data conversion, effectively solving the problems of conversion failure or data error caused by version incompatibility in the prior art. Furthermore, the version self-adaptability of the data conversion process is realized, ensuring the accuracy and consistency of the data conversion result. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flowchart of a data format conversion method in an embodiment of the present application;

[0029] Figure 2 is another flowchart of a data format conversion method in an embodiment of the present application;

[0030] Figure 3 is a schematic structural diagram of an entity device of a format conversion system in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of the present application, the singular forms "a", "an", "the above", "the", and "this" are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations including one or more of the listed items.

[0032] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0033] For ease of understanding, the application scenarios of the embodiments of the present application are introduced below.

[0034] A certain municipal planning department is carrying out a digital transformation project for urban underground pipe networks. The DWG format pipe network drawings drawn by the design institute using AutoCAD contain complex pipeline layouts, connection nodes, elevation information, etc., while the urban management department uses the GIS system and requires SHP format data for spatial analysis and management. Traditional data conversion methods often lose key data such as pipeline connection relationships, elevation information, and pipe diameter parameters when processing complex pipe network data, resulting in the inability to carry out subsequent pipe network analysis and maintenance work. Especially when processing drawings with CAD-specific functions such as dynamic blocks and parametric objects, the converted data is severely distorted and cannot meet the actual work requirements.

[0035] In the related art, the basic graphic elements in the DWG format can be converted into points, lines, and surface elements supported by the SHP format by adopting a direct mapping conversion method to achieve the basic conversion of the data format.

[0036] The scenario of using the data format conversion method in the related art is introduced below.

[0037] A certain architectural design institute uses a traditional conversion tool to convert CAD drawings of a residential community into GIS data. The conversion tool can only process basic geometric elements, converting line segments in CAD into line elements in SHP and closed polylines into surface elements. However, professional information such as door and window symbols, dimension markings, and legend descriptions in the architectural drawings are all lost during the conversion process. More seriously, the building stratification information in the original drawing is simplified, resulting in the confusion of attribute data for different functional areas. When spatial analysis of the community is required, managers have to manually enter the lost attribute information, which not only increases the workload but also easily introduces errors.

[0038] However, by adopting the data format conversion method in the embodiments of the present application, through establishing a complete data mapping system and a supplementary data generation mechanism, high-precision format conversion is achieved, ensuring the integrity of the data.

[0039] The following introduces the scenarios where the data format conversion method in the present application is used.

[0040] The drainage management department of a certain city uses the format conversion system of the present application to process the underground pipe network data. The system first identifies the attribute information such as the pipeline type, material, and pipe diameter in the DWG drawing, and saves the complex pipe network node relationships through feature extraction. When converting to the SHP format, the system not only retains the basic spatial position information, but also automatically supplements parameters such as the flow direction and slope of the pipe network through a supplementary data model. When pipe network renovation is required, engineering personnel can conduct analysis in the GIS system, and can restore the complete CAD engineering drawing at any time through the loss data recovery mechanism.

[0041] It can be seen that by adopting the data format conversion method in the embodiments of the present application, while realizing the conversion of basic data, it can also effectively solve the conversion problem of complex professional data, achieving the efficient utilization of data assets.

[0042] For the sake of easy understanding, the following describes the process of the method provided in this embodiment in combination with the above scenarios. Please refer to Figure 1 , which is a flow schematic diagram of the data format conversion method in the embodiments of the present application.

[0043] S101. Receive the first format data, and determine the data format of the first format data and the target format of the second format data as the conversion target.

[0044] Among them, the first format data represents the source data that needs to be format-converted, and can be a data file in the DWG format or the SHP format; the data format refers to the specific file format type of the first format data, including two types: the DWG format and the SHP format; the target format represents the target data format after conversion. When the source data is in the DWG format, the target format is the SHP format, and vice versa; the second format data refers to the conversion result data generated according to the target format.

[0045] When the format conversion system receives a data conversion request submitted by the user, it needs to execute this step to determine the input and output requirements for the conversion. Specifically, the system first receives the data file to be converted uploaded or specified by the user, and identifies its format type by parsing the file header information or the file extension; then, according to the preset conversion rules, determines the target format corresponding to the current format; finally, stores the identified format information in the system memory for subsequent conversion processes.

[0046] In some embodiments, the recognition and determination process of format information can be implemented in various ways: Optionally, the system reads the file header feature information, extracts the format identification code, matches it against the built-in format feature library, outputs the format recognition result and confirms it; Optionally, analyze the file extension and MIME type, scan the file content structure features, and compare and verify with the historical conversion records. It can be understood that other file format recognition technologies can also be used to determine the format type, which is not limited here.

[0047] S102. Extract the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data.

[0048] Among them, the feature data represents the key information that can reflect the characteristics of the first format data, including geometric features, attribute features, etc.; the mapping data refers to the data content that has a corresponding expression in the target format.

[0049] After the format conversion system determines the data format of the source format and the target format of the conversion target, this step needs to be executed to prepare the data required for the conversion. Specifically, the system first parses and extracts the key information reflecting the data characteristics according to the data structure specification of the source format, then identifies the data content that can be directly mapped in the target format according to the preset format mapping rules, and finally stores the extracted feature data and mapping data respectively to prepare for subsequent conversion processing.

[0050] In some embodiments, the data extraction and mapping process can be implemented in various ways: Optionally, load the preset data structure template, parse the source data according to the template rules, extract the feature information and mapping content that meet the requirements; Optionally, construct a data parsing tree, traverse the data nodes to extract features, and establish a mapping relationship table. It can be understood that other data extraction and mapping methods can also be used to separate and correspond the information, which is not limited here.

[0051] S103. Input the mapping data and the target format into the data conversion model to obtain supplementary data.

[0052] Among them, the data conversion model represents an algorithm model for implementing format conversion; the supplementary data refers to the data content that needs to be additionally generated to meet the requirements of the target format.

[0053] After the format conversion system obtains the mapping data, this step needs to be executed to generate complete conversion data. Specifically, the system first packages the extracted mapping data and the target format information as the model input, then calls the pre-trained data conversion model for processing, and finally obtains the supplementary data output by the model to make up for the data missing in the direct mapping process.

[0054] It should be noted that in the model training stage, the data conversion model uses a large number of converted sample pairs in DWG and SHP formats that have been manually verified as training data. The input includes the mapping data of the source format data (such as geometric feature parameters and attribute feature parameters) and the target format requirements, and the output is the corresponding supplementary data. During the training process, the model continuously optimizes the parameter weights by comparing the differences between the conversion results and the manually verified results. The training criteria include: geometric accuracy (controlled at the centimeter level), attribute integrity (the keyword field matching rate needs to reach 99%), spatial topology relationship retention (the node connection relationship accuracy rate needs to reach 100%), and professional information expression accuracy (the semantic understanding accuracy rate of professional symbols and notes needs to be above 95%). The data conversion model adopts a multi-layer neural network structure, including a feature extraction layer, a rule mapping layer, and a data supplementation layer. The feature extraction layer is responsible for identifying the key feature patterns in the input data; the rule mapping layer establishes the corresponding relationship between the source format and the target format based on the preset conversion rule library; the data supplementation layer generates the necessary supplementary data according to the requirements of the target format. The model has built-in parameter configuration modules for different professional fields (such as architecture, municipal engineering, pipe networks, etc.), and can dynamically adjust the processing strategy according to the specific application scenario. In actual application, the data conversion model first receives the preprocessed mapping data (including the mathematical expression of geometric data and the standardized representation of attribute data) and the target format specification. Then, the model analyzes the data characteristics through the feature recognition algorithm, selects the most suitable processing strategy, and generates the supplementary data that meets the requirements of the target format. The output supplementary data includes: coordinate system conversion parameters, spatial index information, professional attribute fields, topological relationship descriptions, etc. These supplementary data and the original mapping data together constitute the complete target format data. The model will also automatically verify the output result to ensure that the conversion quality meets the preset standards. In case of special situations, the model will give a warning message for the operator to perform manual intervention and adjustment.

[0055] S104. Generate second-format data based on the mapping data and the supplementary data.

[0056] Among them, the second-format data refers to the final output data that meets the requirements of the target format.

[0057] After obtaining the mapping data and the supplementary data, the format conversion system needs to execute this step to output the final conversion result. Specifically, the system first takes the mapping data as the basic framework; then integrates the supplementary data according to the requirements of the target format; and finally generates a complete second-format data file.

[0058] In some embodiments, the data generation process can be implemented in various ways: Optionally, construct a data structure in the target format; populate the mapped data and supplementary data; verify data integrity; Optionally, create a temporary data container; write the converted data in sequence; export a file in the target format. It can be understood that other data generation methods can also be used to achieve the output of the final result, which is not limited here.

[0059] S105. Extract the data in the feature data that is different from the mapped data as loss data, and store the loss data in the conversion database corresponding to the second format data.

[0060] Among them, the loss data represents the data content that cannot be directly mapped during the format conversion process; the conversion database refers to a data storage system for storing conversion-related information; the data difference refers to the information that cannot be directly corresponding between two formats.

[0061] After the format conversion system completes the main conversion, this step needs to be executed to save the data information that may be lost. Specifically, the system first compares the feature data and the mapped data to identify the content that cannot be directly mapped; then classifies and organizes these loss data; finally, stores them in a dedicated conversion database for possible subsequent data recovery.

[0062] In some embodiments, the processing and storage of loss data can be implemented in various ways: Optionally, perform data comparison and analysis; extract the unmapped content; establish an index for the loss data; Optionally, create a storage structure for the loss data; classify and organize the loss information; write it into the conversion database. It can be understood that other data processing and storage methods can also be used to save the loss information, which is not limited here.

[0063] In practical applications, the system can flexibly configure conversion rules and parameters according to the needs of different industries to adapt to various complex data conversion scenarios.

[0064] The scenario of this embodiment is supplemented below.

[0065] A smart city project team integrated this system with a BIM platform to achieve seamless docking between the building information model and the GIS system. When an architect modifies the building design in BIM, the system can automatically detect the changes and update the corresponding CAD drawings, and then synchronize the latest building data to the GIS platform through the format conversion system. The version control mechanism of the system ensures data consistency at different stages, and the feature extraction and supplementary data generation functions enable the three-dimensional information of the building to be accurately converted into a format usable by GIS. It not only improves the efficiency of collaborative design but also provides a reliable data foundation for the operation and management of smart cities.

[0066] After combining the above scenarios, the method provided in this embodiment will be further described in a more specific process. Please refer to Figure 2 , which is another process schematic diagram of the data format conversion method in the embodiment of the present application.

[0067] S201. Receive the first format data, and determine the data format of the first format data and the target format of the second format data as the conversion target.

[0068] Referring to step S101, the format conversion system will determine the data format and the target format.

[0069] In some embodiments, the format conversion system will obtain the layer template information corresponding to the first format data from the preset layer configuration library; based on the layer template information, classify the layers in the first format data to obtain the building element types; according to the building element types, divide the first format data into geometric data and attribute data; classify the geometric data according to the mathematical function type to determine the geometric feature parameters; analyze the attribute data according to the standardization specification to determine the attribute feature parameters; based on the geometric feature parameters and the attribute feature parameters, determine the feature data corresponding to the data format in the first format data; according to the preset data format mapping rule, extract the data matching the target format from the first format data as the mapping data.

[0070] Among them, the layer configuration library represents a standard library storing layer definitions of different data formats; the layer template information refers to the specification data describing the layer structure and attributes; the building element type is used to represent the classification system of building data; the geometric data represents the data describing the spatial shape; the attribute data refers to the non-spatial data describing the object characteristics; the feature parameter is used to represent the quantitative index of the data feature; the data format mapping rule refers to the corresponding relationship between data conversions of different formats.

[0071] Before the format conversion system processes the data, it needs to execute this process to achieve the structured analysis and feature extraction of the data. Specifically, the system first obtains the standard layer template from the configuration library to guide data classification; then divides the data into two categories, geometric and attribute, and performs feature extraction respectively; then performs mathematical modeling on the geometric data to generate geometric feature parameters; at the same time, performs standardization processing on the attribute data to obtain attribute feature parameters; finally, extracts the mapable data content based on these parameters.

[0072] In some embodiments, data feature extraction and classification processing can be implemented in various ways: optionally, load the preset classification criteria; construct a hierarchical classification tree; perform automatic classification processing; optionally, establish a feature recognition model; apply a feature extraction algorithm; verify the integrity of the feature data. It can be understood that other feature extraction and classification methods can also be used to implement the structured processing of the data, which is not limited here.

[0073] In some embodiments, the format conversion system obtains a sequence of coordinate points in the geometric data, and classifies the geometric data into one or more of a straight line type, an arc type, and a spline curve type according to the distribution characteristics of the coordinate point sequence; determines the corresponding mathematical function type according to the fitting type of the geometric data; and generates geometric feature parameters based on the mathematical function type.

[0074] Wherein, the coordinate point sequence represents an ordered set of points describing a geometric shape; the distribution characteristic is the spatial distribution law of the point set; the geometric type is used to represent different spatial forms; the fitting type is the way of mathematical curve fitting; and the mathematical function type represents the mathematical expression describing the geometric shape.

[0075] When processing geometric data, the format conversion system needs to execute this process to realize the recognition of geometric features. Specifically, the system first extracts the coordinate sequence of the geometric object; then analyzes the distribution characteristics of these points to determine which basic geometric type it belongs to; and finally selects a suitable mathematical function for fitting according to the geometric type to generate geometric feature parameters.

[0076] In some embodiments, the recognition of geometric features and the generation of parameters can be achieved in various ways: Optionally, construct a point set analysis model; execute a shape recognition algorithm; calculate the feature parameter values; Optionally, establish a mathematical model library; apply a curve fitting method; optimize the fitting parameters. It can be understood that other geometric analysis methods can also be used to realize the recognition of features and the generation of parameters, which are not limited herein.

[0077] In some embodiments, the format conversion system determines the version information of the first format data; matches the version information with a preset version library, and after the matching fails, sends a version upgrade prompt to the user terminal; and receives the updated first format data transmitted back by the user terminal.

[0078] Wherein, the version information represents the version identifier of the data format; the version library is a database storing the definition of various format versions.

[0079] Before processing the data, the format conversion system needs to execute this process to ensure the compatibility of the data version. Specifically, the system first checks the version information of the input data; then compares it with the versions supported by the system; if it is found that the versions are incompatible, the user is notified to update; and finally, the updated data is received and verified.

[0080] In some embodiments, version checking and update processing can be implemented in various ways: Optionally, parse the version identifier; perform version compatibility checking; generate update suggestions; Optionally, establish a version mapping relationship; apply an automatic upgrade tool; verify the upgrade result. It can be understood that other version management methods can also be used to implement version control of data, which is not limited here.

[0081] S202. Extract the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data.

[0082] Referring to step S102, the format conversion system will determine the feature data and the mapping data.

[0083] S203. Obtain the coordinate system information of the mapping data.

[0084] Among them, the coordinate system information represents the basic information describing the spatial data position reference, including projection method, datum plane, measurement unit, etc.; the mapping data refers to the spatial data directly mapped to the target format extracted from the source data.

[0085] After obtaining the mapping data, the format conversion system needs to execute this step to ensure the correct conversion of spatial data. Specifically, the system first parses the spatial reference information in the mapping data; then identifies the type and parameters of the coordinate system; finally, saves the obtained coordinate system information in a standard format to prepare for subsequent coordinate conversion.

[0086] In some embodiments, the acquisition of coordinate system information can be achieved in various ways: Optionally, parse the coordinate system identifier in the data header file; extract the spatial reference system parameters; verify the validity of the coordinate system; Optionally, read the coordinate system configuration file; analyze the coordinate range of the spatial data; determine the detailed parameters of the coordinate system. It can be understood that other coordinate system identification methods can also be used to obtain the spatial reference information, which is not limited here.

[0087] S204. When the coordinate system information is inconsistent with the default coordinate system corresponding to the target format of the second format data, determine the corresponding coordinate conversion algorithm according to the preset precision requirement.

[0088] Among them, the default coordinate system represents the standard coordinate system commonly used for the target format; the preset precision requirement refers to the allowable error range during the coordinate conversion process; the coordinate conversion algorithm is used to represent the mathematical model for converting between different coordinate systems.

[0089] After the format conversion system obtains the coordinate system information, this step needs to be executed to ensure the accuracy of coordinate conversion. Specifically, the system first compares the coordinate system of the source data with the default coordinate system of the target format; then, according to the preset accuracy requirements, selects a suitable coordinate conversion algorithm from the algorithm library; finally, configures the parameters of the selected algorithm and verifies the accuracy. In some embodiments, the determination of the coordinate conversion algorithm can be achieved in various ways: Optionally, perform a coordinate system consistency check; calculate the conversion parameters and accuracy metrics; select the optimal conversion algorithm; Optionally, construct a conversion parameter matrix; evaluate the accuracy of different algorithms; optimize the algorithm parameter configuration. It can be understood that other algorithm selection methods can also be used to ensure the accuracy of coordinate conversion, which is not limited here.

[0090] S205. Based on the coordinate conversion algorithm, convert the mapped data into the default coordinate system.

[0091] Among them, the coordinate conversion process represents the operation of converting spatial data from one coordinate system to another.

[0092] After the format conversion system determines the coordinate conversion algorithm, this step needs to be executed to complete the coordinate system conversion of the spatial data. Specifically, the system first loads the configured coordinate conversion algorithm; then performs a coordinate transformation on the mapped data according to the conversion parameters; finally, verifies the accuracy of the conversion result to ensure that it meets the preset requirements.

[0093] In some embodiments, the conversion of the coordinate system can be achieved in various ways: Optionally, initialize the conversion algorithm parameters; perform a coordinate conversion calculation; verify the accuracy of the conversion result; Optionally, establish a coordinate correspondence; batch process the coordinate data; output the converted result. It can be understood that other coordinate transformation methods can also be used to achieve the system conversion of spatial data, which is not limited here.

[0094] S206. Input the mapped data and the target format into the data conversion model to obtain supplementary data.

[0095] Referring to step S103, the format conversion system will generate supplementary data.

[0096] S207. Based on the mapped data and the supplementary data, generate second-format data.

[0097] Referring to step S104, the format conversion system will generate second-format data.

[0098] S208. Extract the data in the feature data that is different from the mapped data as loss data.

[0099] After the format conversion system completes the data conversion, it needs to execute this step to identify and save the potentially lost data information. Specifically, the system first compares the feature data and the mapping data item by item; then identifies the different contents between the two through a difference analysis algorithm; then classifies and organizes the identified difference data to ensure that all data that cannot be directly mapped is completely extracted; finally, marks these data as lost data and stores them temporarily for subsequent processing.

[0100] In some embodiments, the identification and extraction of lost data can be achieved in various ways: Optionally, construct a comparison table of feature data and mapping data; perform item-by-item comparison of data items; mark unmatched data; verify the integrity of lost data; Optionally, establish a data feature index; apply an intelligent matching algorithm; extract unmatched content; analyze the features of lost data. It can be understood that other data comparison and extraction methods can also be used to identify lost data, which is not limited here.

[0101] S209. Generate a unique identification code for the corresponding lost data, and classify the lost data according to the building element type to obtain an association mapping table between the lost data and the second format data.

[0102] Among them, the unique identification code refers to a unique code used to identify lost data; the building element type refers to the classification system of building data; the association mapping table is used to represent the corresponding relationship between lost data and target format data.

[0103] After the format conversion system identifies the lost data, it needs to execute this step to establish a data tracking mechanism. Specifically, the system first generates a unique identification code for each piece of lost data; then classifies the lost data according to the preset building element classification standard; finally, establishes a corresponding relationship table between the lost data and the target format data.

[0104] In some embodiments, the identification and classification of lost data can be achieved in various ways: Optionally, generate an identification combining a timestamp and a random code; classify data according to building element specifications; establish a multi-level index relationship; Optionally, create a hash code identification; construct a classification tree structure; generate an association mapping matrix. It can be understood that other identification and classification methods can also be used to manage lost data, which is not limited here.

[0105] S210. Store the lost data, the unique identification code, and the association mapping table into the conversion database corresponding to the second format data.

[0106] Among them, the conversion database refers to a data warehouse used to store information related to format conversion.

[0107] After the format conversion system completes data classification and identification, it needs to execute this step to save important information during the conversion process. Specifically, the system first prepares the database storage space; then writes the loss data, identification codes, and mapping tables into the database according to a predetermined structure; finally, establishes corresponding indexes and verifies the storage results.

[0108] In some embodiments, data storage can be achieved in various ways: Optionally, create a database table structure; perform batch data insertion; establish a data retrieval index; Optionally, build a data cache layer; write to persistent storage in batches; verify data integrity. It can be understood that other storage methods can also be used to achieve persistent data storage, which is not limited here.

[0109] S211. When receiving a data recovery request for converting second-format data into first-format data, determine the corresponding loss data according to the associated mapping table.

[0110] Among them, the data recovery request represents an instruction for the user to convert the data back to the original format; the loss data refers to the data that could not be directly mapped recorded during the previous conversion process; the data matching process is used to represent the operation of finding the corresponding loss data; the request verification refers to confirming the validity of the data recovery request.

[0111] After receiving the recovery request, the format conversion system needs to execute this step to prepare the information required for data recovery. Specifically, the system first verifies the validity of the recovery request; then retrieves the corresponding loss data according to the associated mapping table; finally, prepares the found loss data for subsequent recovery operations.

[0112] In some embodiments, the determination of loss data can be achieved in various ways: Optionally, verify the recovery request parameters; query the associated mapping table; extract the corresponding loss data; Optionally, establish a data recovery session; perform a multi-condition matching query; prepare the data recovery environment. It can be understood that other query methods can also be used to determine the loss data, which is not limited here.

[0113] S212. Extract the inverse mapping data corresponding to the data format of the first-format data from the second-format data.

[0114] Among them, the inverse mapping data represents the data that can be mapped back to the source format extracted from the target format data; the data format correspondence refers to the mapping rules of the data structures between different formats.

[0115] After the format conversion system determines the loss data, it needs to execute this step to prepare the basic data required for data conversion. Specifically, the system first analyzes the structure of the target format data; then extracts the reversibly mappable data according to the preset format correspondence; finally, verifies the integrity and correctness of the extracted data.

[0116] In some embodiments, the extraction of inverse mapping data can be achieved in various ways: Optionally, parse the data structure of the target format; identify invertible mapping elements; extract corresponding data content; Optionally, establish reverse mapping rules; perform data structure conversion; verify the mapping result. It can be understood that other extraction methods can also be used to obtain inverse mapping data, which is not limited herein.

[0117] S213. Generate first-format data according to the loss data and the inverse mapping data.

[0118] After obtaining the required data, the format conversion system needs to execute this step to complete data recovery. Specifically, the system first uses the inverse mapping data as the basic framework; then integrates the loss data according to the requirements of the source format; finally, generates a complete first-format data file and verifies it.

[0119] In some embodiments, the generation of first-format data can be achieved in various ways: Optionally, construct the data structure of the source format; integrate the inverse mapping and loss data; verify the generation result; Optionally, create a data generation environment; perform step-by-step data integration; output the final data file. It can be understood that other generation methods can also be used to recover the source format data, which is not limited herein.

[0120] In the embodiments of the present application, due to the adoption of innovative technical means such as feature extraction, mapping data conversion, supplementary data generation, and loss data storage, and in combination with a data processing model, the bidirectional conversion between DWG and SHP formats can be realized, effectively solving the problems of data loss, insufficient accuracy, and non-traceability in traditional conversion methods, and thus realizing the complete fidelity, intelligent conversion, and reliable storage of heterogeneous data. The system ensures the accuracy and traceability of the conversion process by establishing a complete data mapping system and version control mechanism, and at the same time supports the reverse recovery of data, improving the data interoperability between engineering design and geographic information systems, and providing a reliable data basis for the collaborative design of various engineering projects.

[0121] The format conversion system in the embodiments of the present invention application will be described from the perspective of hardware processing. Please refer to Figure 3 , which is a schematic structural diagram of an entity device of the format conversion system in the embodiments of the present application.

[0122] It should be noted that Figure 3 The structure of the format conversion system shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0123] As Figure 3As shown, the format conversion system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303, such as executing the method described in the above embodiments. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.

[0124] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a Liquid Crystal Display (LCD), an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read from it can be installed into the storage section 308 as needed.

[0125] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication section 309, and / or installed from the removable medium 311. When the computer program is executed by a Central Processing Unit (CPU) 301, various functions defined in the present invention are executed.

[0126] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings.

[0128] Specifically, the format conversion system of this embodiment includes a processor and a memory. A computer program is stored on the memory. When the computer program is executed by the processor, the data format conversion method provided in the above embodiment is implemented.

[0129] On the other hand, the present invention also provides a computer-readable storage medium. This storage medium can be included in the format conversion system described in the above embodiment; or it can exist separately without being assembled into the format conversion system. The above storage medium carries one or more computer programs. When the above one or more computer programs are executed by a processor of the format conversion system, the format conversion system is enabled to implement the data format conversion method provided in the above embodiment.

[0130] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application.

[0131] As used in the foregoing embodiments, depending on the context, the term "when" may be construed to mean "if", or "after", or "in response to determining", or "in response to detecting". Similarly, depending on the context, the phrase "upon determining" or "if (the stated condition or event) is detected" may be construed to mean "if determined", or "in response to determining", or "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0132] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by a computer program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the foregoing method embodiments. The foregoing storage media include: various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.

Claims

1. A data format conversion method, characterized in that, Applied to a format conversion system, the method includes: Receiving first format data, and determining the data format of the first format data and the target format of second format data as the conversion target; the data format is DWG format or SHP format; when the data format is DWG format, the target format is SHP format; when the data format is SHP format, the target format is DWG format; Extracting the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data; Inputting the mapping data and the target format into a data conversion model to obtain supplementary data; the data conversion model includes a feature extraction layer, a rule mapping layer, and a data supplementation layer; the feature extraction layer is used to identify key feature patterns in the input data; the rule mapping layer is used to establish a correspondence between the source format and the target format based on a preset conversion rule library; the data supplementation layer is used to generate supplementary data according to the requirements of the target format; Generating the second format data based on the mapping data and the supplementary data; Extracting the data different from the mapping data in the feature data as loss data; Generating a unique identification code corresponding to the loss data, and classifying the loss data according to building element types to obtain an association mapping table between the loss data and the second format data; Storing the loss data, the unique identification code, and the association mapping table into a conversion database corresponding to the second format data; When receiving a data recovery request for converting the second format data into the first format data, determining the corresponding loss data according to the association mapping table; Extracting inverse mapping data corresponding to the data format of the first format data from the second format data; Generating the first format data according to the loss data and the inverse mapping data.

2. The method according to claim 1, characterized in that, The step of extracting the feature data corresponding to the data format and the mapping data corresponding to the target format from the first format data specifically includes: Obtaining layer template information corresponding to the data format of the first format data from a preset layer configuration library; Classifying the layers in the first format data based on the layer template information to obtain building element types; Dividing the first format data into geometric data and attribute data according to the building element types; Classifying the geometric data according to mathematical function types to determine geometric feature parameters; Parsing the attribute data according to a standardization specification to determine attribute feature parameters; Determining the feature data corresponding to the data format in the first format data based on the geometric feature parameters and the attribute feature parameters; Extracting data matching the target format from the first format data as the mapping data according to a preset data format mapping rule.

3. The method according to claim 2, wherein The step of classifying the geometric data according to mathematical function types to determine geometric feature parameters specifically includes: Obtain the sequence of coordinate points in the geometric data, and classify the geometric data into one or more of a straight line type, an arc type, and a spline curve type according to the distribution characteristics of the sequence of coordinate points; Determine the corresponding mathematical function type according to the fitting type of the geometric data; Generate geometric feature parameters based on the mathematical function type.

4. The method according to claim 1, wherein After the step of receiving the first format data, determining the data format of the first format data, and the target format of the second format data as the conversion target, the method further includes: Determine the version information of the first format data; Match the version information with a preset version library, and after the matching fails, send a version upgrade prompt to the user terminal; Receive the updated first format data transmitted back by the user terminal.

5. The method according to claim 1, wherein Before the step of inputting the mapping data and the target format into the data conversion model to obtain supplementary data, the method further includes: Obtain the coordinate system information of the mapping data; When the coordinate system information is inconsistent with the default coordinate system corresponding to the target format of the second format data, determine the corresponding coordinate conversion algorithm according to the preset precision requirement; Based on the coordinate conversion algorithm, convert the mapping data into the default coordinate system.

6. A format conversion system, characterized in that, The format conversion system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the format conversion system to execute the method according to any one of claims 1-5.

7. A computer-readable storage medium, comprising instructions, characterized in that, When the instruction runs on the format conversion system, enable the format conversion system to execute the method according to any one of claims 1-5.

8. A computer program product, comprising computer program instructions, characterized in that, When the computer program instruction is executed by the processor, implement the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • GIS data and CAD data conversion method and device, electronic equipment and storage medium

    CN117725255A