A database-based spatial conflict management method
By introducing a shadow table mechanism and a geometric shape index, combined with the topological rules of the spatial database, the accurate identification and reversible processing of spatial conflicts in national land spatial planning are realized, avoiding the accidental deletion of important map features and data loss, and solving the problems of low identification accuracy and high destructiveness in the existing technology.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU AERONAUTIC POLYTECHNIC
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-21
AI Technical Summary
In land spatial planning, due to different data sources, coordinate system transformation errors, and non-standard historical reporting, there are a large number of spatial overlaps and conflicts in the land database. Existing technologies are unable to accurately identify legitimate overlaps and abnormal conflicts, and the processing is highly destructive and lacks a recovery mechanism.
By introducing a shadow table mechanism, the reversibility of automated processing is ensured. Shadow table backup and atomic operations are adopted. Combined with geometric shape index, fragment noise and actual conflicts are distinguished. The topology rules of the spatial database are used to detect overlapping areas of multi-source vector data and generate conflict governance rules for automated governance and topology reconstruction. Finally, the map features are restored.
It achieves accurate identification and classification of spatial conflicts, avoids accidental deletion of important map features, ensures the reversibility of data processing, and solves the problem of loss of original information caused by inaccurate data processing.
Smart Images

Figure CN121560891B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a database-based method for managing spatial conflicts. Background Technology
[0002] In the existing process of compiling and monitoring territorial spatial planning, due to different data sources, coordinate system transformation errors, and non-standard historical reporting, there are a large number of spatial overlaps and conflicts in the aggregated territorial database.
[0003] The existing technology has the following main drawbacks:
[0004] First, the recognition accuracy is low: it is difficult to distinguish between legitimate overlap (such as composite land use) and abnormal conflicts (such as construction land encroaching on cultivated land), leading to misjudgment;
[0005] Second, the processing is highly destructive: Traditional geometric cutting methods often directly modify the original data. Once the algorithm misjudges and cuts out important patches due to narrow gaps, the data is difficult to recover.
[0006] Third, lack of recovery mechanism: lack of transaction-based patch-level version control, once batch processing fails, it is impossible to perform accurate one-click recovery for specific areas or patches;
[0007] To address the aforementioned technical deficiencies, a solution is proposed. Summary of the Invention
[0008] The purpose of this invention is to ensure that any automated processing is reversible by introducing a shadow table mechanism, thus solving the problem of loss of original information due to inaccurate data processing. At the same time, it distinguishes between fragmentary noise and substantial conflicts by using geometric shape indices, avoiding the accidental deletion of small but important patches.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: a database-based spatial conflict resolution method, comprising the following steps:
[0010] S1. Data preprocessing and fingerprint construction: acquire multi-source vector data based on land planning needs, import the multi-source vector data into a spatial database, establish a spatial index, and generate a unique spatiotemporal fingerprint code for each independent map patch;
[0011] S2. Accurate Conflict Identification and Clustering: Utilize the topological rules pre-stored in the spatial database to detect overlapping areas between multiple independent patches, calculate the overlap rate, shape index, and overlay level to determine the existence of spatial conflicts, and then classify the spatial conflicts. The conflict categories include inclusion conflicts, crossing conflicts, fragment conflicts, and edge conflicts, and construct conflict clusters.
[0012] S3. Conflict Governance Rule Engine Construction: A priority decision tree is preset as the conflict governance rule to generate a governance plan for each conflict cluster. The plan is then pre-rehearsed and the practical plan is output after the pre-rehearsal verification is successful.
[0013] S4. Shadow Table Backup and Atomic Operations: Before performing geometric changes according to the practical plan, store the original polygons involved in the conflict and their attributes in the shadow history table, and bind transaction tags for conflict governance.
[0014] S5. Automated governance and topology reconstruction: Execute conflict governance operations sequentially according to the practical plan. The conflict governance operations include deduction, fusion, and segmentation to eliminate spatial overlap between independent polygons and to repair topology errors in real time.
[0015] S6. Anomaly Monitoring and Patch Restoration: Perform post-quality checks on the treated data. If the change characteristic value of the patch before and after treatment exceeds the preset threshold, retrieve the original patch and its attributes from the shadow history table based on the transaction tag for accurate restoration.
[0016] Furthermore, the specific process of generating a unique spatiotemporal fingerprint for each individual patch is as follows:
[0017] S101. Through the coordinate transformation interface, the acquired multi-source vector data is uniformly projected to the national standard coordinate system to eliminate false displacements caused by projection differences. Then, the heterogeneous formats in the multi-source vector data are parsed into unified WKB geometric objects. Before entering the database, a basic geometric validity check is performed to automatically remove self-intersecting and non-closed polygons, and then the data is stored in the spatial database to ensure the topological validity of the data entering the database.
[0018] S102. For each vector layer, construct a rectangle tree index based on the minimum bounding rectangle of the patch. Use the rectangle tree index to quickly filter out spatially non-adjacent patches during subsequent conflict identification. Only perform precise geometric operations on patches that intersect with the MBR, reducing the retrieval time complexity.
[0019] S103. Extract the coordinates of the geometric center point and the area value of the patch. To avoid fingerprint mismatch caused by floating-point calculation errors, the coordinates are first kept to six decimal places. Then, the normalized WKT string is subjected to MD5 hash operation to generate a fixed-length geometric feature code.
[0020] S104. Select the key business attributes of the map patch. The key business attributes include the map patch unit number, land category code, ownership unit, and approval document number. Concatenate the key business attributes into a string in lexicographical order, perform SHA-256 hash operation, and generate attribute feature code to ensure that even a minor tampering with any key attribute can lead to a fingerprint change, thus ensuring the integrity of the data.
[0021] S105. Obtain the system timestamp when the data is entered into the database, and use it as a version control identifier. Then, concatenate the geometric feature code, the geometric feature code, and the version control identifier according to preset rules to obtain the spatiotemporal fingerprint code of the patch throughout its entire life cycle.
[0022] Furthermore, the specific process for determining the existence of spatial conflicts and classifying them is as follows:
[0023] S201. Traverse the spatial database, filter out all pairs of polygons that have geometric intersections using spatial intersection, and for each pair of intersecting polygons, mark them as polygon A and polygon B, generate an overlapping surface object Oab, and calculate the feature parameters of the following three core dimensions:
[0024] Overlap rate R: The overlap rate is used to determine the degree of overlap influence, S Oab Sa represents the area of the overlapping surface objects, Sa represents the area of patch A, and Sb represents the area of patch B.
[0025] Shape Index St: , where P is the perimeter of the overlapping surface object, and the shape index is used to identify fragments and narrow gaps;
[0026] Covering level L: The value is assigned based on the planning level field in the map patch attributes;
[0027] Calculate the hierarchical difference Where La is the overburden level corresponding to patch A, and Lb is the overburden level corresponding to patch B. The difference in levels is used to help determine the severity of the conflict and the priority of subsequent governance.
[0028] S202. Input the calculated feature parameters into the preset decision tree classifier to automatically classify all spatial conflicts into the following four standardized modes:
[0029] Containment conflict: This means that patch A is completely located inside patch B, but patch A and patch B have different attributes;
[0030] The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is greater than or equal to the overlap rate threshold, it is an inclusion conflict.
[0031] Fragmentary conflicts: The overlapping surfaces are very small and appear as narrow strips. This is usually not a real land ownership dispute, but a small displacement of data from different sources during vectorization. When dealing with fragmentary conflicts, geometric capture should be preferred over cutting.
[0032] The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is less than the overlap rate threshold and the shape index is greater than the preset standard value, then it is a fragment type conflict.
[0033] Edge-type conflicts: The overlapping surface objects have a small area but a relatively regular shape and are located at the boundary of the patch. This is usually caused by the improper handling of adjacent patches sharing the same edge, resulting in a small overlap.
[0034] The determination criteria are as follows: if the overlap rate is less than the overlap rate threshold and the shape index is less than or equal to the preset standard value, then it is an edge-type conflict.
[0035] Cross-type conflict: All other conflicts that do not meet the above three conditions, specifically manifested as significant overlap between map patch A and map patch B, a typical case of dual-use or multi-plan conflict.
[0036] S203. Treat the conflicting features A and B as nodes and the conflict relationships as edges. Use depth-first search to traverse the conflict network and assign all related features to the same conflict cluster.
[0037] Furthermore, the specific process of generating and validating governance solutions, followed by outputting practical implementation plans:
[0038] S301. A multi-dimensional map patch competitiveness scoring model is preset. For each map patch object in a conflict cluster, the conflict governance rules calculate its competitiveness score Ks according to the following dimensions:
[0039] Where e1, e2, and e3 are preset adjustment coefficients;
[0040] Wo represents the weight of legal effect, which is assigned a value based on the control requirements of the territorial spatial planning.
[0041] Wt is the timeliness weight, which is determined based on the timestamp of the data output. The later the data is entered into the database, the higher the weight.
[0042] Wg is the geometric integrity weight. For conflicts of the same type, priority is given to retaining patches with more regular geometric shapes and larger areas.
[0043] The competitiveness score is used to reflect the retainability of a patch. The higher the competitiveness score, the more advantageous the patch; the lower the competitiveness score, the more disadvantageous the patch.
[0044] S302. Based on the conflict type identified in S2 and the aforementioned competitiveness score, the conflict governance rules automatically match the corresponding geometric processing operators to generate a preliminary governance scheme:
[0045] For cross-type conflicts: perform differential deduction, keeping the geometry of the advantageous polygons unchanged, and perform geometric deduction on the disadvantageous polygons to remove overlapping parts.
[0046] For conflicts involving inclusion: if the dominant feature is inside the inferior feature, a hole-cutting operation is performed on the external inferior feature; if the dominant feature and the inferior feature are completely identical, the inferior feature is directly marked as to be deleted.
[0047] For fragmented conflicts: perform fusion elimination, capture and merge narrow fragmented areas, and merge them into adjacent dominant patches while maintaining the overall area balance, to avoid generating more fragmented geometric fragments;
[0048] S303. In the temporary tablespace of the spatial database, create a replica of the current conflict cluster, simulate the execution of the aforementioned primary governance scheme on the replica, and perform a topology compliance check on the simulation results. The topology compliance check includes:
[0049] Geometric validity: Check for self-intersecting or non-closed loops;
[0050] Area threshold check: Check the remaining area of the inferior patches after treatment. If the remaining area of the inferior patches is less than the preset threshold, the pre-test determines that the solution needs to be modified, and the system will automatically adjust the strategy to complete absorption or division.
[0051] Topological void check: Check whether new topological cracks have been created due to cutting;
[0052] S304. After all the above topology compliance checks are passed, the primary governance plan will be output as a practical plan.
[0053] Furthermore, the specific process for fixing topology errors is as follows:
[0054] S501. After performing conflict resolution operations, if geometric changes are detected in a patch, immediately perform a capture action on the changed area:
[0055] A preset tolerance threshold is set. If the distance between the vertex of patch A and the boundary of patch B is less than the tolerance threshold, the vertex of patch A will be moved to the boundary of patch B to force co-location.
[0056] S502. After patch A is subtracted, its newly generated boundary is the boundary of patch B. The contact line between patch A and patch B is detected, and all nodes of patch B on the contact line are extracted and marked as correction nodes. The correction nodes are then injected into the corresponding border of patch A to ensure that patch A and patch B logically share a completely consistent sequence of boundary nodes, thereby eliminating topological cracks and meeting the strict quality inspection requirements of seamless and non-overlapping land survey data.
[0057] S503. After the topology reconstruction is completed, the results are cleaned to automatically repair the bowtie effect caused by the calculation and ensure that every patch stored in the database meets the preset standards.
[0058] Furthermore, the specific process for accurate restoration of the image patches is as follows:
[0059] S601. Perform a post-quality inspection on the rectified data, traversing all map features involved in the current transaction, and calculating the key indicator changes before and after rectification, including:
[0060] Area loss rate is used to detect whether a patch has been over-cut.
[0061] Geometric fragmentation abrupt changes are used to monitor whether invalid fragments have been generated;
[0062] Key attribute loss validation checks whether core fields were accidentally set to null during the fusion process;
[0063] S602. Based on the preset indicator threshold, the change characteristic values of the above key indicators are judged. If the change characteristic values of the key indicators of the map patch do not meet the preset indicator threshold, the repair process is triggered, and the map patch is marked as a map patch to be repaired.
[0064] S6021. Initiate a query request to the shadow history table of the spatial database to obtain the complete WKT geometric string, attribute key-value pairs, and original topological relationship record of the patch to be repaired just before the governance operation is executed;
[0065] S6022. Add an exclusive lock to the record of the patch to be repaired to prevent other processes from modifying it during the restoration period. Execute differentiated SQL commands based on the current status of the patch to be repaired:
[0066] If the patch still exists but its shape is incorrect, proceed;
[0067] If a pixel is physically deleted during the merging operation, the data retrieved from the shadow history table will be re-inserted into the main table.
[0068] S603. Automatically trigger local topology checks to revert the boundary of adjacent patch B that newly overlaps with patch A to the state before this restoration operation, ensuring that the spatial relationship of the local area is completely restored to its original state before the restoration.
[0069] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0070] This database-based spatial conflict governance method establishes a spatial index based on multi-source vector data for land planning needs. It then utilizes pre-stored topological rules in the spatial database to detect overlapping areas between multiple independent polygons to determine the existence of spatial conflicts. These conflicts are then classified, and a governance plan is generated for each conflict cluster. The conflict governance operations are executed sequentially according to the practical plan. The quality of the governed data is then checked. If the change in characteristic values of a polygon before and after governance exceeds a preset threshold, the original polygon and its attributes are retrieved from the shadow history table based on transaction tags for accurate restoration. This invention introduces a shadow table mechanism to ensure that any automated processing is reversible, solving the problem of data inaccuracy leading to the loss of original information. Simultaneously, it uses a geometric shape index to distinguish between fragmentary noise and substantial conflicts, avoiding the accidental deletion of small but important polygons. Attached Figure Description
[0071] Figure 1 A schematic diagram of the overall method flow of the present invention is shown. Detailed Implementation
[0072] 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, and 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. Example
[0073] like Figure 1 As shown, a database-based spatial conflict management method includes the following steps:
[0074] S1. Data preprocessing and fingerprint construction: acquire multi-source vector data based on land planning needs, import the multi-source vector data into a spatial database, establish a spatial index, and generate a unique spatiotemporal fingerprint code for each independent map patch;
[0075] The specific process for generating a unique spatiotemporal fingerprint for each individual patch is as follows:
[0076] S101. Through the coordinate transformation interface, the acquired multi-source vector data is uniformly projected to the national standard coordinate system to eliminate false displacements caused by projection differences. Then, the heterogeneous formats in the multi-source vector data are parsed into unified WKB geometric objects. Before entering the database, a basic geometric validity check is performed to automatically remove self-intersecting and non-closed polygons, and then the data is stored in the spatial database to ensure the topological validity of the data entering the database.
[0077] S102. For each vector layer, construct a rectangle tree index based on the minimum bounding rectangle of the patch. Use the rectangle tree index to quickly filter out spatially non-adjacent patches during subsequent conflict identification. Only perform precise geometric operations on patches that intersect with the MBR, reducing the retrieval time complexity.
[0078] S103. Extract the coordinates of the geometric center point and the area value of the patch. To avoid fingerprint mismatch caused by floating-point calculation errors, the coordinates are first kept to six decimal places. Then, the normalized WKT string is subjected to MD5 hash operation to generate a fixed-length geometric feature code.
[0079] S104. Select the key business attributes of the map patch. The key business attributes include the map patch unit number, land category code, ownership unit, and approval document number. Concatenate the key business attributes into a string in lexicographical order, perform SHA-256 hash operation, and generate attribute feature code to ensure that even a minor tampering with any key attribute can lead to a fingerprint change, thus ensuring the integrity of the data.
[0080] S105. Obtain the system timestamp when the data is entered into the database, and use it as a version control identifier. Then, concatenate the geometric feature code, the geometric feature code, and the version control identifier according to preset rules to obtain the spatiotemporal fingerprint code of the patch throughout its entire life cycle.
[0081] S2. Accurate Conflict Identification and Clustering: Utilize the topological rules pre-stored in the spatial database to detect overlapping areas between multiple independent patches, calculate the overlap rate, shape index, and overlay level to determine the existence of spatial conflicts, and then classify the spatial conflicts. The conflict categories include inclusion conflicts, crossing conflicts, fragment conflicts, and edge conflicts, and construct conflict clusters.
[0082] The specific process for determining the existence of spatial conflicts and classifying spatial conflicts is as follows:
[0083] S201. Traverse the spatial database, filter out all pairs of polygons that have geometric intersections using spatial intersection, and for each pair of intersecting polygons, mark them as polygon A and polygon B, generate an overlapping surface object Oab, and calculate the feature parameters of the following three core dimensions:
[0084] Overlap rate R: The overlap rate is used to determine the degree of overlap influence, S Oab Sa represents the area of the overlapping surface objects, Sa represents the area of patch A, and Sb represents the area of patch B.
[0085] Shape Index St: , where P is the perimeter of the overlapping surface object, and the shape index is used to identify fragments and narrow gaps;
[0086] Covering level L: The value is assigned based on the planning level field in the map patch attributes;
[0087] Calculate the hierarchical difference Where La is the overburden level corresponding to patch A, and Lb is the overburden level corresponding to patch B. The difference in levels is used to help determine the severity of the conflict and the priority of subsequent governance.
[0088] S202. Input the calculated feature parameters into the preset decision tree classifier to automatically classify all spatial conflicts into the following four standardized modes:
[0089] Containment conflict: This means that patch A is completely located inside patch B, but patch A and patch B have different attributes;
[0090] The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is greater than or equal to the overlap rate threshold, it is an inclusion conflict.
[0091] Fragmentary conflicts: The overlapping surfaces are very small and appear as narrow strips. This is usually not a real land ownership dispute, but a small displacement of data from different sources during vectorization. When dealing with fragmentary conflicts, geometric capture should be preferred over cutting.
[0092] The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is less than the overlap rate threshold and the shape index is greater than the preset standard value, then it is a fragment type conflict.
[0093] Edge-type conflicts: The overlapping surface objects have a small area but a relatively regular shape and are located at the boundary of the patch. This is usually caused by the improper handling of adjacent patches sharing the same edge, resulting in a small overlap.
[0094] The determination criteria are as follows: if the overlap rate is less than the overlap rate threshold and the shape index is less than or equal to the preset standard value, then it is an edge-type conflict.
[0095] Cross-type conflict: All other conflicts that do not meet the above three conditions, specifically manifested as significant overlap between map patch A and map patch B, a typical case of dual-use or multi-plan conflict.
[0096] S203. Treat the conflicting features A and B as nodes and the conflict relationships as edges. Use depth-first search to traverse the conflict network and assign all related features to the same conflict cluster.
[0097] S3. Conflict Governance Rule Engine Construction: A priority decision tree is preset as the conflict governance rule to generate a governance plan for each conflict cluster. The plan is then pre-rehearsed and the practical plan is output after the pre-rehearsal verification is successful.
[0098] The specific process of generating a governance plan, verifying it, and then outputting a practical solution:
[0099] S301. A multi-dimensional map patch competitiveness scoring model is preset. For each map patch object in a conflict cluster, the conflict governance rules calculate its competitiveness score Ks according to the following dimensions:
[0100] Where e1, e2, and e3 are preset adjustment coefficients;
[0101] Wo represents the weight of legal effect, which is assigned a value based on the control requirements of the territorial spatial planning.
[0102] Wt is the timeliness weight, which is determined based on the timestamp of the data output. The later the data is entered into the database, the higher the weight.
[0103] Wg is the geometric integrity weight. For conflicts of the same type, priority is given to retaining patches with more regular geometric shapes and larger areas.
[0104] The competitiveness score is used to reflect the retainability of a patch. The higher the competitiveness score, the more advantageous the patch; the lower the competitiveness score, the more disadvantageous the patch.
[0105] S302. Based on the conflict type identified in S2 and the aforementioned competitiveness score, the conflict governance rules automatically match the corresponding geometric processing operators to generate a preliminary governance scheme:
[0106] For cross-type conflicts: perform differential deduction, keeping the geometry of the advantageous polygons unchanged, and perform geometric deduction on the disadvantageous polygons to remove overlapping parts.
[0107] For conflicts involving inclusion: if the dominant feature is inside the inferior feature, a hole-cutting operation is performed on the external inferior feature; if the dominant feature and the inferior feature are completely identical, the inferior feature is directly marked as to be deleted.
[0108] For fragmented conflicts: perform fusion elimination, capture and merge narrow fragmented areas, and merge them into adjacent dominant patches while maintaining the overall area balance, to avoid generating more fragmented geometric fragments;
[0109] S303. In the temporary tablespace of the spatial database, create a replica of the current conflict cluster, simulate the execution of the aforementioned primary governance scheme on the replica, and perform a topology compliance check on the simulation results. The topology compliance check includes:
[0110] Geometric validity: Check for self-intersecting or non-closed loops;
[0111] Area threshold check: Check the remaining area of the inferior patches after treatment. If the remaining area of the inferior patches is less than the preset threshold, the pre-test determines that the solution needs to be modified, and the system will automatically adjust the strategy to complete absorption or division.
[0112] Topological void check: Check whether new topological cracks have been created due to cutting;
[0113] S304. After all the above topology compliance checks are passed, the primary governance plan will be output as a practical plan.
[0114] S4. Shadow Table Backup and Atomic Operations: Before performing geometric changes according to the practical plan, store the original polygons involved in the conflict and their attributes in the shadow history table, and bind transaction tags for conflict governance.
[0115] S5. Automated governance and topology reconstruction: Execute conflict governance operations sequentially according to the practical plan. The conflict governance operations include deduction, fusion, and segmentation to eliminate spatial overlap between independent polygons and to repair topology errors in real time.
[0116] The specific process for fixing topology errors is as follows:
[0117] S501. After performing conflict resolution operations, if geometric changes are detected in a patch, immediately perform a capture action on the changed area:
[0118] A preset tolerance threshold is set. If the distance between the vertex of patch A and the boundary of patch B is less than the tolerance threshold, the vertex of patch A will be moved to the boundary of patch B to force co-location.
[0119] S502. After patch A is subtracted, its newly generated boundary is the boundary of patch B. The contact line between patch A and patch B is detected, and all nodes of patch B on the contact line are extracted and marked as correction nodes. The correction nodes are then injected into the corresponding border of patch A to ensure that patch A and patch B logically share a completely consistent sequence of boundary nodes, thereby eliminating topological cracks and meeting the strict quality inspection requirements of seamless and non-overlapping land survey data.
[0120] S503. After the topology reconstruction is completed, the results are cleaned to automatically repair the bowtie effect caused by the calculation and ensure that every patch stored in the database meets the preset standards.
[0121] S6. Anomaly Monitoring and Patch Restoration: Perform post-quality checks on the treated data. If the change characteristic value of the patch before and after treatment exceeds the preset threshold, retrieve the original patch and its attributes from the shadow history table based on the transaction tag for accurate restoration.
[0122] The specific process for accurately restoring map features is as follows:
[0123] S601. Perform a post-quality inspection on the rectified data, traversing all map features involved in the current transaction, and calculating the key indicator changes before and after rectification, including:
[0124] Area loss rate is used to detect whether a patch has been over-cut.
[0125] Geometric fragmentation abrupt changes are used to monitor whether invalid fragments have been generated;
[0126] Key attribute loss validation checks whether core fields were accidentally set to null during the fusion process;
[0127] S602. Based on the preset indicator threshold, the change characteristic values of the above key indicators are judged. If the change characteristic values of the key indicators of the map patch do not meet the preset indicator threshold, the repair process is triggered, and the map patch is marked as a map patch to be repaired.
[0128] S6021. Initiate a query request to the shadow history table of the spatial database to obtain the complete WKT geometric string, attribute key-value pairs, and original topological relationship record of the patch to be repaired just before the governance operation is executed;
[0129] S6022. Add an exclusive lock to the record of the patch to be repaired to prevent other processes from modifying it during the restoration period. Execute differentiated SQL commands based on the current status of the patch to be repaired:
[0130] If the patch still exists but its shape is incorrect, proceed;
[0131] If a pixel is physically deleted during the merging operation, the data retrieved from the shadow history table will be re-inserted into the main table.
[0132] S603. Automatically trigger local topology checks to revert the boundary of adjacent patch B that newly overlaps with patch A to the state before this restoration operation, ensuring that the spatial relationship of the local area is completely restored to its original state before the restoration.
[0133] This invention establishes a spatial index based on multi-source vector data for land planning needs, and uses pre-stored topological rules in a spatial database to detect overlapping areas between multiple independent polygons to determine the existence of spatial conflicts. It then classifies spatial conflicts and generates a governance plan for each conflict cluster. Conflict governance operations are executed sequentially according to the practical plan, and the quality of the governed data is checked. If the change in characteristic values of a polygon before and after governance exceeds a preset threshold, the original polygon and its attributes are retrieved from the shadow history table based on transaction tags for accurate restoration. This invention introduces a shadow table mechanism to ensure that any automated processing is reversible, solving the problem of data inaccuracy leading to the loss of original information. Simultaneously, it distinguishes between fragmentary noise and substantial conflicts through geometric shape indices, avoiding the accidental deletion of small but important polygons.
[0134] The size of the interval and threshold is set to facilitate comparison. The size of the threshold depends on the amount of sample data and the number of bases set by those skilled in the art for each set of sample data; as long as it does not affect the ratio between the parameter and the quantized value.
[0135] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0136] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A database-based spatial conflict resolution method, characterized in that, Includes the following steps: S1. Data preprocessing and fingerprint construction: acquire multi-source vector data based on land planning needs, import the multi-source vector data into a spatial database, establish a spatial index, and generate a unique spatiotemporal fingerprint code for each independent map patch; S2. Accurate Conflict Identification and Clustering: Utilize the topological rules pre-stored in the spatial database to detect overlapping areas between multiple independent patches, calculate the overlap rate, shape index, and overlay level to determine the existence of spatial conflicts, and then classify the spatial conflicts. Conflict categories include containment conflicts, cross-type conflicts, fragment conflicts, and edge conflicts, and construct conflict clusters. The specific process for determining the existence of spatial conflicts and classifying spatial conflicts is as follows: S201. Traverse the spatial database, filter out all pairs of polygons that have geometric intersections using spatial intersection, and for each pair of intersecting polygons, mark them as polygon A and polygon B, generate an overlapping surface object Oab, and calculate the feature parameters of the following three core dimensions: Overlap rate R: The overlap rate is used to determine the degree of overlap influence, S Oab Sa represents the area of the overlapping surface objects, Sa represents the area of patch A, and Sb represents the area of patch B. Shape Index St: , where P is the perimeter of the overlapping surface object, and the shape index is used to identify fragments and narrow gaps; Covering level L: The value is assigned based on the planning level field in the map patch attributes; Calculate the hierarchical difference Where La is the overburden level corresponding to patch A, and Lb is the overburden level corresponding to patch B. The difference in levels is used to help determine the severity of the conflict and the priority of subsequent governance. S202. Input the calculated feature parameters into the preset decision tree classifier to automatically classify all spatial conflicts into the following four standardized modes: Containment conflict: This means that patch A is completely located inside patch B, but patch A and patch B have different attributes; The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is greater than or equal to the overlap rate threshold, it is an inclusion conflict. Fragment-type conflict: The overlapping surface is extremely small and appears as a narrow strip; The determination criteria are: obtain a preset overlap rate threshold; if the overlap rate is less than the overlap rate threshold and the shape index is greater than the preset standard value, then it is a fragment type conflict. Edge-type conflicts: The overlapping surface objects have a small area but a relatively regular shape and are located at the boundary of the patch; The determination criteria are as follows: if the overlap rate is less than the overlap rate threshold and the shape index is less than or equal to the preset standard value, then it is an edge-type conflict. Cross-type conflict: All other conflicts that do not meet the above three conditions, specifically manifested as significant overlap between patch A and patch B; S203. Treat the conflicting features A and B as nodes and the conflict relationships as edges. Use depth-first search to traverse the conflict network and assign all related features to the same conflict cluster. S3. Conflict Governance Rule Engine Construction: A priority decision tree is preset as the conflict governance rule to generate a governance plan for each conflict cluster. The plan is then pre-tested, and the practical plan is output after the pre-test is verified. S4. Shadow Table Backup and Atomic Operations: Before performing geometric changes according to the practical plan, store the original polygons involved in the conflict and their attributes in the shadow history table, and bind transaction tags for conflict governance. S5. Automated governance and topology reconstruction: Execute conflict governance operations sequentially according to the practical plan. The conflict governance operations include deduction, fusion, and segmentation to eliminate spatial overlap between independent polygons and to repair topology errors in real time. S6. Anomaly Monitoring and Patch Restoration: Perform post-quality checks on the treated data. If the change characteristic value of the patch before and after treatment is found to exceed the preset threshold, retrieve the original patch and its attributes from the shadow history table based on the transaction tag for accurate restoration.
2. The database-based spatial conflict resolution method according to claim 1, characterized in that, The specific process for generating a unique spatiotemporal fingerprint for each individual patch is as follows: S101. Through the coordinate transformation interface, the acquired multi-source vector data is uniformly projected to the national standard coordinate system, and then the heterogeneous formats in the multi-source vector data are parsed into unified WKB geometric objects. Before entering the database, a basic geometric validity check is performed to automatically remove self-intersecting and non-closed polygons, and then the data is stored in the spatial database. S102. For each vector layer, construct a rectangle tree index based on the minimum bounding rectangle of the patch. Use the rectangle tree index to quickly filter out spatially non-adjacent patches in subsequent conflict identification, and perform precise geometric operations only on patches that intersect with the MBR. S103. Extract the coordinates of the geometric center point and the area value of the patch, perform MD5 hash operation on the normalized WKT string, and generate a fixed-length geometric feature code. S104. Select the key business attributes of the map parcels. The key business attributes include the map parcel unit number, land category code, ownership unit, and approval document number. Concatenate the key business attributes into a string in lexicographical order, perform SHA-256 hash operation, and generate attribute feature code. S105. Obtain the system timestamp when the data is entered into the database, and use it as a version control identifier. Then, concatenate the geometric feature code, attribute feature code, and version control identifier according to preset rules to obtain the spatiotemporal fingerprint code of the patch throughout its entire lifecycle.
3. The database-based spatial conflict resolution method according to claim 1, characterized in that, The specific process of generating a governance plan, verifying it, and then outputting a practical solution: S301. A multi-dimensional map patch competitiveness scoring model is preset. For each map patch object in a conflict cluster, the conflict governance rules calculate its competitiveness score Ks according to the following dimensions: Where e1, e2, and e3 are preset adjustment coefficients; Wo represents the weight of legal effect, which is assigned a value based on the control requirements of the territorial spatial planning. Wt is the timeliness weight, which is determined based on the timestamp of the data output. The later the data is entered into the database, the higher the weight. Wg is the geometric integrity weight. For conflicts of the same type, priority is given to retaining patches with more regular geometric shapes and larger areas. The competitiveness score is used to reflect the retainability of a patch. The higher the competitiveness score, the more advantageous the patch; the lower the competitiveness score, the more disadvantageous the patch. S302. Based on the conflict type identified in S2 and the aforementioned competitiveness score, the conflict governance rules automatically match the corresponding geometric processing operators to generate a preliminary governance scheme: For cross-type conflicts: perform differential deduction, keep the geometry of the advantageous polygons unchanged, and perform geometric deduction on the disadvantageous polygons to remove the overlapping parts; For conflicts involving inclusion: if the dominant feature is inside the inferior feature, a hole-cutting operation is performed on the external inferior feature; if the dominant feature and the inferior feature are completely identical, the inferior feature is directly marked as to be deleted. For fragmented conflicts: perform fusion elimination, capture and merge the narrow fragmented areas, and merge them into the adjacent dominant patches while maintaining the balance of the total area; S303. In the temporary tablespace of the spatial database, create a copy of the current conflict cluster, simulate the execution of the above primary governance scheme on the copy, and perform a topology compliance check on the simulation results. S304. After all the above topology compliance checks are passed, the primary governance plan will be output as a practical plan.
4. The database-based spatial conflict resolution method according to claim 1, characterized in that, The specific process for fixing topology errors is as follows: S501. After performing conflict resolution operations, if geometric changes are detected in a patch, immediately perform a capture action on the changed area: A preset tolerance threshold is set. If the distance between the vertex of patch A and the boundary of patch B is less than the tolerance threshold, the vertex of patch A will be moved to the boundary of patch B to force co-location. S502. After the subtraction of patch A, the newly generated boundary is the boundary of patch B. Detect the contact line between patch A and patch B, extract all nodes of patch B on the contact line and mark them as correction nodes, and inject the correction nodes into the corresponding border of patch A. S503. After the topology reconstruction is completed, the results are cleaned to automatically repair the bowtie effect caused by the calculation and ensure that every patch stored in the database meets the preset standards.
5. A database-based spatial conflict resolution method according to claim 1, characterized in that, The specific process for accurately restoring map features is as follows: S601. Perform a post-quality inspection on the rectified data, traversing all map features involved in the current transaction, and calculating the key indicator changes before and after rectification, including: Area loss rate is used to detect whether a patch has been over-cut. Geometric fragmentation abrupt changes are used to monitor whether invalid fragments have been generated; Key attribute loss validation checks whether core fields were accidentally set to null during the fusion process; S602. Based on the preset indicator threshold, the change characteristic values of the above key indicators are judged. If the change characteristic values of the key indicators of the map patch do not meet the preset indicator threshold, the repair process is triggered, and the map patch is marked as a map patch to be repaired. S6021. Initiate a query request to the shadow history table of the spatial database to obtain the complete WKT geometric string, attribute key-value pairs, and original topological relationship record of the patch to be repaired just before the governance operation is executed; S6022. Add an exclusive lock to the record of the patch to be repaired to prevent other processes from modifying it during the restoration period. Execute differentiated SQL commands based on the current status of the patch to be repaired: If a patch is physically deleted during the merging operation, the data retrieved from the shadow history table will be re-inserted into the main table; S603. Automatically trigger local topology check, and revert the boundary of the adjacent patch B that newly overlaps with patch A to the state before this repair operation.
Citation Information
Patent Citations
Forest and grass resource data fusion method and processor
CN118396815A
Spatial conflict treatment method and device based on database and medium
CN120598210A