Hash table-based full-factor regularization method and device, electronic equipment and medium
By constructing a hash table and determining the set of overlapping points, the problem of low efficiency in vector feature processing in existing technologies is solved, and efficient vector file regularization and topological relationship preservation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies are limited by the density of vector features when processing a large number of topologically related vector features, resulting in low processing efficiency, and traditional methods have difficulty maintaining the correctness of adjacency relationships.
A hash table-based approach is adopted to construct point-ring hash tables and toroidal hash tables. By traversing and simplifying the vector file, the target overlapping point set is determined, point position correction is performed, topological relationships are maintained, and the vector file is regularized.
It improves vector simplification efficiency, maintains the original topological relationships, and enables automatic and rapid regularization of remote sensing interpretation results.
Smart Images

Figure CN117194432B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of element regularization technology, and in particular to a method, apparatus, electronic device, and medium for full element regularization based on hash tables. Background Technology
[0002] Semantic segmentation is an important area of computer vision and a crucial step in achieving complete scene understanding. Specifically, semantic segmentation achieves fine-grained reasoning by intensively predicting and inferring labels for each pixel, thus assigning each pixel to a predefined category.
[0003] In practical deep learning interpretation result synthesis mapping, for the case of full-element interpretation, the vector elements converted from the interpretation results often exhibit jagged edges due to pixel-level interpretation methods. For the scientific accuracy and aesthetics of the mapping, further optimization of the interpreted elements is often necessary. If traditional element simplification methods are used to simplify each element individually, it will result in errors in the topological relationships between adjacent elements. Therefore, full-element simplification, in order to maintain the original topological relationships of adjacent graphs, requires processing common edges. Furthermore, vector simplification itself is an important research direction in data visualization. The visualization of vector data relates to the breadth and depth of vector data applications, the decision-making ability of decision-makers, and the quality of research results. Therefore, exploring topology-related element simplification methods is of great significance in vector processing and visualization.
[0004] Current vector simplification methods include both serial and parallel approaches. Parallel methods improve processing efficiency by adding load balancing to the computer hardware, building upon traditional algorithms. Common serial methods include the Douglas-Peuker simplification algorithm, ε-Voronoi graph-based simplification methods, the Li-OpenShaw simplification algorithm, progressive simplification algorithms, and wavelet analysis-related algorithms. Parallel vector data simplification methods mainly include shared memory, message-passing-based methods, and data parallelism. These methods often suffer from limitations in handling large numbers of topologically related features due to the density of features, or inefficiencies when processing large amounts of data. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, apparatus, electronic device and medium for full-feature regularization based on hash tables, which is effective for full-feature adjacency cases and can effectively improve the efficiency of vector simplification and visualization results in dense cases.
[0006] In a first aspect, embodiments of the present invention provide a method for full-element rule-based processing using hash tables, including:
[0007] Obtain the original interpretation vector file to be regularized, and traverse the features contained in the original interpretation vector file to obtain the original surface feature set and the original loop feature set; wherein, the features contained in the original interpretation vector file include point features, loop features and surface features;
[0008] Based on the original set of surface features and the original set of ring features, a point-ring hash table, a toroidal hash table, and a set of overlapping points of adjacent features are constructed respectively; wherein, the point-ring hash table is used to describe the mapping relationship between point features and ring features, and the toroidal hash table is used to describe the mapping relationship between ring features and surface features;
[0009] The original interpretation vector file is simplified to obtain a new interpretation vector file, and the elements contained in the new interpretation vector file are traversed to obtain a new set of loop elements;
[0010] The target overlapping point set is determined based on the original ring element set, the new ring element set, the point ring hash table, and the adjacent element overlapping point set; wherein, the target overlapping point set is used to correct the position of the overlapping parts between adjacent elements;
[0011] Based on the original feature set, the torus hash table, and the target overlap point set, the regularized target interpretation vector file is determined.
[0012] In one implementation, the step of constructing a point-ring hash table, a torus hash table, and a set of overlapping adjacent feature points based on the original surface feature set and the original ring feature set includes:
[0013] Traverse the ring elements contained in the original ring element set to construct a point ring hash table;
[0014] Traverse the face features contained in the original face feature set to construct a torus hash table;
[0015] Based on the point ring hash table, the set of overlapping points of adjacent elements corresponding to adjacent elements in the original interpreted vector file is determined; wherein, the adjacent elements are also ring elements that have an adjacency relationship.
[0016] In one implementation, the step of determining the target overlapping point set based on the original ring feature set, the new ring feature set, the point ring hash table, and the adjacent feature overlapping point set includes:
[0017] The original overlapping point set is determined based on the original ring feature set, the point ring hash table, and the adjacent feature overlapping point set;
[0018] And determine the new overlapping point set based on the new ring element set, the point ring hash table, and the adjacent element overlapping point set;
[0019] The target overlapping point set is determined based on the original overlapping point set and the new overlapping point set.
[0020] In one implementation, the step of determining the original overlapping point set based on the original ring feature set, the point ring hash table, and the adjacent feature overlapping point set includes:
[0021] Traverse the ring elements contained in the original ring element set to determine the overlapping parts between adjacent elements;
[0022] Based on the mapping relationship between point elements and ring elements described in the point-ring hash table, determine the ring element identifier corresponding to the point element located in the overlapping part;
[0023] From the set of overlapping points of adjacent features, find the original set of overlapping points corresponding to the ring feature identifier.
[0024] In one implementation, the step of determining the target overlapping point set based on the original overlapping point set and the new overlapping point set includes:
[0025] If the original first point in the original overlapping point set is consistent with the new first point in the new overlapping point set, and it is determined that the original last point in the original overlapping point set is consistent with the new last point in the new overlapping point set, then the original overlapping point set is taken as the target overlapping point set.
[0026] If the original first point in the original overlapping point set is not at the same position as the new first point in the new overlapping point set, and / or the original last point in the original overlapping point set is not at the same position as the new last point in the new overlapping point set, then the midpoint between the original last point and the new last point is taken as the reference point, and the target overlapping point set is determined based on the reference point, the original first point, the new first point, the original last point, and the new last point.
[0027] In one implementation, the step of determining the target overlapping point set based on the reference point, the original first point, the new first point, the original last point, and the new last point includes:
[0028] Determine the first distance between the original starting point and the reference point, and the second distance between the new starting point and the reference point;
[0029] If the first distance is less than the second distance, then the original starting point is taken as the target starting point; or, if the first distance is greater than the second distance, then the new starting point is taken as the target starting point.
[0030] Determine the third distance between the original tail point and the target head point, and the fourth distance between the new tail point and the target head point;
[0031] If the third distance is less than the fourth distance, then the original tail point is taken as the target tail point; or, if the third distance is greater than the fourth distance, then the new tail point is taken as the target tail point.
[0032] Construct a set of target overlap points based on the target's first point and the target's last point.
[0033] In one implementation, the step of determining the regularized target interpretation vector file based on the original feature set, the torus hash table, and the target overlap point set includes:
[0034] The overlapping parts between adjacent elements are corrected using the target overlapping point set to obtain the corrected loop elements;
[0035] Traverse the polygon features contained in the original polygon feature set to determine the mapping relationship between the corrected loop features and the polygon features according to the toroidal hash table, and configure the attribute information of the original features as the attribute information of the corrected loop features according to the mapping relationship to obtain the regularized target interpretation vector file.
[0036] Secondly, embodiments of the present invention also provide a hash table-based full-element rule-making device, comprising:
[0037] The feature set determination module is used to obtain the original interpretation vector file to be regularized, and traverse the features contained in the original interpretation vector file to obtain the original surface feature set and the original loop feature set; wherein, the features contained in the original interpretation vector file include point features, loop features and surface features;
[0038] The hash table construction module is used to construct a point-ring hash table, a toroidal hash table, and a set of overlapping points of adjacent features based on the original set of surface features and the original set of ring features, respectively; wherein, the point-ring hash table is used to describe the mapping relationship between point features and ring features, and the toroidal hash table is used to describe the mapping relationship between ring features and surface features;
[0039] The feature simplification module is used to simplify the original interpretation vector file to obtain a new interpretation vector file, and to traverse the features contained in the new interpretation vector file to obtain a new ring feature set;
[0040] The point set determination module is used to determine a target overlapping point set based on the original ring element set, the new ring element set, the point ring hash table, and the adjacent element overlapping point set; wherein, the target overlapping point set is used for point position correction of the overlapping parts between adjacent elements;
[0041] The target file determination module is used to determine the regularized target interpretation vector file based on the original surface feature set, the torus hash table, and the target overlap point set.
[0042] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method described in any of the first aspects.
[0043] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in any of the first aspects.
[0044] This invention provides a hash table-based method, apparatus, electronic device, and medium for full-element regularization. The method involves obtaining the original interpretable vector file to be regularized, and traversing the elements contained in the original interpretable vector file to obtain an original set of surface elements and an original set of ring elements. The elements contained in the original interpretable vector file include point elements, ring elements, and surface elements. Then, based on the original set of surface elements and the original set of ring elements, a point-ring hash table describing the mapping relationship between point elements and ring elements, a toroidal hash table describing the mapping relationship between ring elements and surface elements, and a set of overlapping points of adjacent elements are constructed. The original interpretable vector file is then simplified to obtain a new interpretable vector file, and the elements contained in the new interpretable vector file are traversed to obtain a new set of ring elements. Further, a target overlapping point set is determined based on the original set of ring elements, the new set of ring elements, the point-ring hash table, and the set of overlapping points of adjacent elements. This target overlapping point set is used for point correction of the overlapping parts between adjacent elements. Finally, based on the original set of surface elements, the toroidal hash table, and the target overlapping point set, the regularized target interpretable vector file is determined. The above method provides a regularization process of "full-element vector results - hash table construction - simplification - topology repair", which realizes automatic and rapid regularization of remote sensing interpretation results. In addition, the use of a hash table structure with high query efficiency greatly improves the efficiency of regularization. At the same time, maintaining the original topological relationship is an important indicator of regularization. The embodiments of this invention introduce automatic topological relationship repair based on hash table to maintain the original topological relationship.
[0045] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 A flowchart illustrating a hash table-based full-element rule-based method provided in an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of an original adjacent element provided in an embodiment of the present invention;
[0050] Figure 3 A simplified processing result diagram of adjacent elements provided in an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram of an original adjacent element IntersectPoints provided in an embodiment of the present invention;
[0052] Figure 5 This is a simplified schematic diagram of adjacent elements without topological processing, provided as an embodiment of the present invention.
[0053] Figure 6 This is a schematic diagram of simplified topology processing for adjacent elements provided in an embodiment of the present invention;
[0054] Figure 7 A method provided by an embodiment of the present invention Simplified diagram without topology modification;
[0055] Figure 8 A method provided by an embodiment of the present invention Simplified topology modification diagram, when ;
[0056] Figure 9 A flowchart illustrating another hash table-based full-element rule-based method provided in this embodiment of the invention;
[0057] Figure 10 This is a schematic diagram of a full-element rule-based result provided in an embodiment of the present invention;
[0058] Figure 11 This is a schematic diagram of single-element regularization provided in an embodiment of the present invention;
[0059] Figure 12 This is a schematic diagram of multi-element regularization provided in an embodiment of the present invention;
[0060] Figure 13 A schematic diagram of the structure of a hash table-based full-element regularization device provided in an embodiment of the present invention;
[0061] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0063] Currently, related technologies are often limited by the density of elements when processing a large number of topologically related elements, or suffer from low efficiency when processing large amounts of data. Based on this, the present invention provides a method, device, electronic device and medium for full element regularization based on hash tables, which is effective for full element adjacency and can effectively improve the efficiency of vector simplification and visualization results in dense situations.
[0064] To facilitate understanding of this embodiment, a detailed description of the hash table-based full-element rule-making method disclosed in this embodiment of the invention will be provided first. (See [link to relevant documentation]). Figure 1 The diagram shows a flowchart of a hash table-based full-feature rule-based method, which mainly includes the following steps S102 to S110:
[0065] Step S102: Obtain the original interpretation vector file to be regularized, and traverse the features contained in the original interpretation vector file to obtain the original surface feature set and the original loop feature set.
[0066] The original interpreted vector file can be a semantic segmentation-based interpreted vector file, containing point features, loop features, and polygon features. The original loop feature set is used to record loops and their corresponding polygon features.
[0067] Due to the semantic segmentation context, this embodiment of the invention only discusses facial makeup elements. In one implementation, by traversing the elements contained in the original interpreted vector file, the following key parameters can be obtained: the number of elements within the layer range, the original facial feature set, the number of accumulated loops, and the original loop feature set.
[0068] Step S104: Based on the original surface feature set and the original ring feature set, construct the point ring hash table, the ring hash table, and the set of overlapping points of adjacent features, respectively.
[0069] Among them, the point-ring hash table is used to describe the mapping relationship between point features and ring features, the ring-face hash table is used to describe the mapping relationship between ring features and face features, and the set of overlapping points of adjacent features is the set of point features in the overlapping part between ring features (short for adjacent features) that have an adjacency relationship.
[0070] In one implementation, a point-ring hash table can be constructed based on the original ring feature set, a toroidal hash table can be constructed based on the original surface feature set, and a set of overlapping points of adjacent features can be constructed based on the point-ring hash table.
[0071] Step S106: Simplify the original interpretation vector file to obtain a new interpretation vector file, and traverse the elements contained in the new interpretation vector file to obtain a new ring element set.
[0072] In one implementation, the Douglas-Peucker algorithm can be used to simplify each feature individually, resulting in a new set of features: a new set of face features and a new set of ring features.
[0073] Step S108: Determine the target overlapping point set based on the original ring feature set, the new ring feature set, the point ring hash table, and the adjacent feature overlapping point set.
[0074] Among them, the target overlapping point set is used to correct the position of the overlapping parts between adjacent features.
[0075] In one implementation, the original overlapping point set is determined based on the original ring feature set, the point ring hash table, and the adjacent feature overlapping point set, respectively; and the new overlapping point set is determined based on the new ring feature set, the point ring hash table, and the adjacent feature overlapping point set; and then the topology-modified target overlapping point set is obtained based on the original overlapping point set and the new overlapping point set.
[0076] Step S110: Determine the regularized target interpretation vector file based on the original surface feature set, the torus hash table, and the target overlap point set.
[0077] In one implementation, the overlapping parts between adjacent features are corrected by using a target overlapping point set; the correspondence between the corrected toroidal features and the polygonal features is obtained by using the original polygonal feature set and the toroidal hash table; while forming new features, the attribute information of the original features is copied; and finally, a new target interpretation vector file is output.
[0078] The hash table-based full-element regularization method provided in this invention offers a regularization process of "full-element vector results - hash table construction - simplification - topology repair," enabling automatic and rapid regularization of remote sensing interpretation results. Furthermore, the use of a highly efficient hash table structure significantly improves regularization efficiency. Simultaneously, maintaining the original topological relationships is a crucial indicator for regularization; this invention introduces automatic topological relationship repair based on hash tables to preserve these relationships.
[0079] To facilitate understanding, this embodiment of the invention provides a specific implementation of a hash table-based full-element rule-based method.
[0080] For the aforementioned step S102, after reading the original interpreted vector file, the following key parameters are obtained by traversing the features: the number of features within the layer range objCount and the original polygon feature set PolygonSet, the cumulative number of loops (including inner and outer loops) ArcCount, and the original loop feature set ArcSet (which records the loops and their corresponding polygon features).
[0081] Step S104, mentioned above, is mainly used to construct hash table structures for key parameters. These structures will be used to establish polygon features, arc features, and the std::vector set of overlapping points between adjacent features. <point>IntersectPoints, the correspondence between the three. This invention provides an implementation method for constructing a point-ring hash table, a toroidal hash table, and a set of overlapping adjacent feature points based on the original surface feature set and the original ring feature set, respectively. See steps a to b below:
[0082] Step a: Traverse the ring elements contained in the original ring element set, construct a point ring hash table, and based on the point ring hash table, determine the set of overlapping points of adjacent elements corresponding to adjacent elements in the original interpreted vector file; where adjacent elements are also ring elements that have an adjacency relationship.
[0083] In the specific implementation, the original ring feature set ArcSet is traversed to construct a hash mapping table Hash_Arcs_Points for points and rings. This allows for quick lookup of the corresponding ArcID from the Key:PointID, enabling fast querying of the ring to which a point belongs. Furthermore, based on the point-ring hash table Hash_Arcs_Points, the set of overlapping points of adjacent ring features IntersectPoints can be obtained: { }
[0084] Step b: Traverse the face features contained in the original face feature set and construct a torus hash table.
[0085] In the specific implementation, the original polygon feature set PolygonSet is traversed to construct a hash mapping table Hash_Polygon_Arcs between rings and polygons. It supports looking up the corresponding FeatureID from Key:ArcID, which allows for quick querying of the feature to which a ring belongs.
[0086] Step S106, as described above, is primarily used for graphical simplification. Specifically, it iterates through all features and simplifies them one by one based on the Douglas-Peucker algorithm, obtaining new feature sets: a new polygon feature set PolygonSet1 (corresponding to the original polygon feature set PolygonSet) and a new ring feature set ArcSet1 (corresponding to the original ring feature set ArcSet); see [link to relevant documentation]. Figure 2 A schematic diagram of a primary adjacency element is shown below. Figure 3 The diagram shown is a simplified representation of adjacent features. , These are the two elements before the graphic simplification. , These are the corresponding elements after the graphic has been simplified.
[0087] Step S108, as described above, is primarily used for common edge topology repair. This embodiment of the invention provides an implementation method for determining the target overlapping point set based on the original ring feature set, the new ring feature set, the point ring hash table, and the adjacent feature overlapping point set, as shown in steps 1 to 3 below:
[0088] Step 1: Determine the original overlapping point set based on the original ring feature set, the point ring hash table, and the adjacent feature overlapping point set.
[0089] In one implementation, the ring elements contained in the original ring element set are first traversed to determine the overlapping parts between adjacent elements; then, the ring element identifier corresponding to the point element located in the overlapping part is determined according to the mapping relationship between point elements and ring elements described by the point ring hash table; finally, the original overlapping point set corresponding to the ring element identifier is searched from the set of overlapping points of adjacent elements.
[0090] Specifically, iterate through the original ring feature set ArcSet, use the ring hash table Hash_Arcs_Points to obtain the relevant ArcID based on Key:PointID, and obtain the set of overlapping points between unregulated adjacent ring features based on the set of overlapping points IntersectPoints. }, such as Figure 4 The diagram shows a primitive adjacent element IntersectPoints.
[0091] Step 2: Determine the new set of overlapping points based on the new ring feature set, the point ring hash table, and the set of overlapping points of adjacent features.
[0092] Specifically, the same operation is performed on the new ring feature set ArcSet1 to calculate the new regularized overlapping point set IntersectPoints1{ That is, iterate through the new ring feature set ArcSet1, use the point ring hash table Hash_Arcs_Points to obtain the relevant ArcID based on Key:PointID, and obtain the regularized new overlapping point set IntersectPoints1 based on the adjacent overlapping point set IntersectPoints. }, such as Figure 5 The diagram shown is a simplified representation of adjacent elements without topological processing.
[0093] Step 3: Determine the target overlapping point set based on the original and new overlapping point sets. In practice, the topology-modified target overlapping point set BufferPointsOut can be obtained according to the following rules. Then, the overlapping parts of adjacent features are corrected in terms of point positions, and the graphics are regenerated, such as... Figure 6 The diagram shows a simplified topology processing of adjacent elements.
[0094] Specifically, the rules are as follows:
[0095] Rule 1: If the original first point in the original overlapping point set is in the same position as the new first point in the new overlapping point set, and the original last point in the original overlapping point set is in the same position as the new last point in the new overlapping point set, then the original overlapping point set is taken as the target overlapping point set.
[0096] In specific implementation, when = = This indicates that the first and last points of the overlapping points remain unchanged before and after simplification, so the original set of overlapping points is used. Replace the new overlapping point set { } and update .
[0097] Rule 2: If the original first point in the original overlapping point set is not in the same position as the new first point in the new overlapping point set, and / or the original last point in the original overlapping point set is not in the same position as the new last point in the new overlapping point set, then the midpoint between the original last point and the new last point is taken as the reference point, and the target overlapping point set is determined based on the reference point, the original first point, the new first point, the original last point, and the new last point.
[0098] For example, see Figure 7 One of the examples shown Simplified diagram without topological modification, and Figure 8 One of the examples shown Simplified topology modification diagram, when This indicates that the overlapping points have changed before and after simplification, so the following processing is performed:
[0099] (1) Take the midpoint between the original tail point and the new tail point as the reference point. Specifically, take... and The midpoint is used as the reference point ;
[0100] ) / 2.
[0101] (2) Determine the first distance between the original starting point and the reference point, and the second distance between the new starting point and the reference point.
[0102] (3) If the first distance is less than the second distance, the original starting point is taken as the target starting point; or, if the first distance is greater than the second distance, the new starting point is taken as the target starting point. Specifically, calculate separately... New First Point and Given the distance, choose the point with the smaller distance as... ;
[0103] ;
[0104] in, The first distance, This is the second distance.
[0105] (4) Determine the third distance between the original tail point and the target head point, and the fourth distance between the new tail point and the target head point.
[0106] (5) If the third distance is less than the fourth distance, the original tail point is taken as the target tail point; or, if the third distance is greater than the fourth distance, the new tail point is taken as the target tail point. Specifically, the original tail point is calculated separately. , With the target first point Given the distance, choose the point with the smaller distance as... ;
[0107] ;
[0108] in, The third distance, This is the fourth distance.
[0109] (6) Construct a set of overlapping points of the target based on the first point and the last point of the target.
[0110] Regarding the aforementioned step S118, this embodiment of the invention provides an implementation method for determining the regularized target interpretation vector file based on the original surface feature set, the toroidal hash table, and the target overlapping point set. First, the overlapping parts between adjacent features are corrected using the target overlapping point set to obtain the corrected ring features. Then, the surface features contained in the original surface feature set are traversed to determine the mapping relationship between the corrected ring features and the surface features based on the toroidal hash table. The attribute information of the original features is configured as the attribute information of the corrected ring features based on the mapping relationship to obtain the regularized target interpretation vector file.
[0111] In the specific implementation, the original polygon feature set PolygonSet is traversed, and the modified mapping between Arc and Polygon can be obtained according to the toroidal hash table Hash_Polygon_Arcs (the simplified version does not change the mapping between Arc and Polygon). While creating new features, the attribute information of the original features is copied, and finally, a new vector file is output. In the output file, each feature is regularized while maintaining the original topological structure.
[0112] In summary, this invention provides a rule-based processing method for full-feature vector interpretation results in semantic segmentation scenarios. It can also be used to process features with topological adjacency relationships, developing a rule-based processing flow from "full-feature vector results - hash table construction - simplification - topology repair," achieving automatic and rapid rule-based processing of remote sensing interpretation results. The use of a query-efficient hash table structure and a parallel strategy in the parameter construction step significantly improves rule-based processing efficiency. Furthermore, maintaining the original topological relationships is a crucial indicator for rule-based processing; this invention introduces automatic topology repair based on hash tables to preserve these relationships.
[0113] To facilitate understanding, this embodiment of the invention provides an application example of a hash table-based full-element rule-based method. First, see... Figure 9 The flowchart of another hash table-based full-feature rule-based method is shown, including the following steps S902 to S914:
[0114] Step S902: Construct the point and ring hash table Hash_Arcs_Points;
[0115] Step S904: Construct the ring and face hash table Hash_Polygon_Arcs;
[0116] Step S906: Construct the set of overlapping points IntersectPoints;
[0117] Step S908, Douglas-Peucker simplification;
[0118] Step S910: Obtain the target overlapping point set BufferPointsOut;
[0119] Step S912, topology repair based on the target overlapping point set BufferPointsOut;
[0120] Step S914: Output the modified target interpretation vector.
[0121] exist Figure 9 Based on this, this embodiment of the invention interprets buildings in a 10km*18km 2m-level remote sensing image of Henan Province, obtaining 27,629 image patches. For example... Figure 10 The diagram shown illustrates a comprehensive set of rule-based results. Figure 11 The diagram shown illustrates a single-element regularization method and... Figure 12 The diagram shown illustrates a multi-element regularization method. By comparing and contrasting the vector data before and after regularization, it can be seen that this method can achieve the goal of correct regularization while maintaining topological correctness.
[0122] Based on the foregoing embodiments, this invention provides a hash table-based full-element rule-based device, see [link to relevant documentation]. Figure 13 The diagram shows a structural schematic of a hash table-based full-element regularization device, which mainly includes the following parts:
[0123] The feature set determination module 1302 is used to obtain the original interpretation vector file to be regularized, and to traverse the features contained in the original interpretation vector file to obtain the original surface feature set and the original loop feature set; wherein, the features contained in the original interpretation vector file include point features, loop features and surface features;
[0124] The hash table construction module 1304 is used to construct a point-ring hash table, a toroidal hash table, and a set of overlapping points of adjacent features based on the original set of polygon features and the original set of ring features, respectively. The point-ring hash table is used to describe the mapping relationship between point features and ring features, and the toroidal hash table is used to describe the mapping relationship between ring features and polygon features.
[0125] The feature simplification module 1306 is used to simplify the original interpretation vector file to obtain a new interpretation vector file, and to traverse the features contained in the new interpretation vector file to obtain a new set of loop features;
[0126] The point set determination module 1308 is used to determine the target overlapping point set based on the original ring feature set, the new ring feature set, the point ring hash table, and the adjacent feature overlapping point set; wherein, the target overlapping point set is used to correct the position of the overlapping part between adjacent features;
[0127] The target file determination module 1310 is used to determine the regularized target interpretation vector file based on the original surface feature set, the torus hash table, and the target overlap point set.
[0128] The hash table-based full-element regularization device provided in this invention provides a regularization process of "full-element vector results - hash table construction - simplification - topology repair", realizing automatic and rapid regularization of remote sensing interpretation results. In addition, the use of a hash table structure with high query efficiency greatly improves the regularization efficiency. At the same time, maintaining the original topological relationship is an important indicator of regularization processing. This invention introduces automatic topological relationship repair based on hash table to maintain the original topological relationship.
[0129] In one implementation, the hash table construction module 1304 is further configured to:
[0130] The original set of overlapping points is determined based on the original set of ring features, the point ring hash table, and the set of overlapping points of adjacent features.
[0131] And determine the new set of overlapping points based on the new ring feature set, the point ring hash table, and the set of overlapping points of adjacent features;
[0132] The target overlapping point set is determined based on the original overlapping point set and the new overlapping point set.
[0133] In one implementation, the point set determination module 1308 is further configured to:
[0134] Traverse the ring elements contained in the original ring element set to determine the overlapping parts between adjacent elements;
[0135] Based on the mapping relationship between point features and ring features described in the point-ring hash table, determine the ring feature identifier corresponding to the point feature located in the overlapping part;
[0136] From the set of overlapping points of adjacent features, find the original set of overlapping points corresponding to the ring feature identifier.
[0137] In one implementation, the point set determination module 1308 is further configured to:
[0138] If the original first point in the original overlapping point set is in the same position as the new first point in the new overlapping point set, and it is determined that the original last point in the original overlapping point set is in the same position as the new last point in the new overlapping point set, then the original overlapping point set is taken as the target overlapping point set.
[0139] If the original first point in the original overlapping point set is not in the same position as the new first point in the new overlapping point set, and / or the original last point in the original overlapping point set is not in the same position as the new last point in the new overlapping point set, then the midpoint between the original last point and the new last point is taken as the reference point, and the target overlapping point set is determined based on the reference point, the original first point, the new first point, the original last point, and the new last point.
[0140] In one implementation, the point set determination module 1308 is further configured to:
[0141] Determine the first distance between the original starting point and the reference point, and the second distance between the new starting point and the reference point;
[0142] If the first distance is less than the second distance, the original starting point is taken as the target starting point; or, if the first distance is greater than the second distance, the new starting point is taken as the target starting point.
[0143] Determine the third distance between the original tail point and the target head point, and the fourth distance between the new tail point and the target head point;
[0144] If the third distance is less than the fourth distance, the original tail point is used as the target tail point; or, if the third distance is greater than the fourth distance, the new tail point is used as the target tail point.
[0145] Construct a set of overlapping points of the target based on the target's first point and target's last point.
[0146] In one implementation, the target file determination module 1310 is further configured to:
[0147] The overlapping parts between adjacent features are corrected by using the target overlapping point set to obtain the corrected loop features;
[0148] Traverse the polygon features contained in the original polygon feature set to determine the mapping relationship between the corrected toroidal features and polygon features based on the toroidal hash table, and configure the attribute information of the original features as the attribute information of the corrected toroidal features according to the mapping relationship to obtain the regularized target interpretation vector file.
[0149] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0150] This invention provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.
[0151] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 100 includes: a processor 140, a memory 141, a bus 142, and a communication interface 143. The processor 140, the communication interface 143, and the memory 141 are connected through the bus 142. The processor 140 is used to execute executable modules, such as computer programs, stored in the memory 141.
[0152] The memory 141 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 143 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0153] Bus 142 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 14 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0154] The memory 141 is used to store programs. After receiving an execution instruction, the processor 140 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 140 or implemented by the processor 140.
[0155] Processor 140 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 140 or by instructions in software form. Processor 140 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 141, and processor 140 reads the information in memory 141 and, in conjunction with its hardware, completes the steps of the above method.
[0156] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.
[0157] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0158] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.< / point>
Claims
1. A hash table based full factor regularization method, characterized in that, The method comprises the following steps: obtaining a to-be-regularized original interpreted vector file and traversing elements contained in the original interpreted vector file to obtain an original face element set and an original ring element set; wherein the elements contained in the original interpreted vector file include point elements, ring elements and face elements; based on the original face element set and the original ring element set, respectively constructing a point-ring hash table, a ring-face hash table and an adjacent element overlapping point set; wherein the point-ring hash table is used to describe the mapping relationship between point elements and ring elements, and the ring-face hash table is used to describe the mapping relationship between ring elements and face elements; simplifying the original interpreted vector file to obtain a new interpreted vector file, and traversing elements contained in the new interpreted vector file to obtain a new ring element set; determining a target overlapping point set according to the original ring element set, the new ring element set, the point-ring hash table and the adjacent element overlapping point set; wherein the target overlapping point set is used for point position correction of the overlapping part between adjacent elements; determining a target interpreted vector file after regularization according to the original face element set, the ring-face hash table and the target overlapping point set; the step of determining a target overlapping point set according to the original ring element set, the new ring element set, the point-ring hash table and the adjacent element overlapping point set comprises: determining an original overlapping point set according to the original ring element set, the point-ring hash table and the adjacent element overlapping point set; and determining a new overlapping point set according to the new ring element set, the point-ring hash table and the adjacent element overlapping point set; determining a target overlapping point set based on the original overlapping point set and the new overlapping point set; the step of determining a target overlapping point set based on the original overlapping point set and the new overlapping point set comprises: if an original starting point in the original overlapping point set is consistent with a new starting point in the new overlapping point set in position, and it is judged that an original ending point in the original overlapping point set is consistent with a new ending point in the new overlapping point set in position, then the original overlapping point set is taken as the target overlapping point set; if the original starting point in the original overlapping point set is inconsistent with the new starting point in the new overlapping point set in position, and / or the original ending point in the original overlapping point set is inconsistent with the new ending point in the new overlapping point set in position, then a midpoint between the original ending point and the new ending point is taken as a reference point, and the target overlapping point set is determined according to the reference point, the original starting point, the new starting point, the original ending point and the new ending point; The step of determining the target overlap point set according to the reference point, the original start point, the new start point, the original end point and the new end point comprises the following steps: determining a first distance between the original start point and the reference point and a second distance between the new start point and the reference point respectively; if the first distance is smaller than the second distance, taking the original start point as a target start point; or if the first distance is greater than the second distance, taking the new start point as the target start point; determining a third distance between the original end point and the target start point and a fourth distance between the new end point and the target start point respectively; if the third distance is smaller than the fourth distance, taking the original end point as a target end point; or if the third distance is greater than the fourth distance, taking the new end point as the target end point; and constructing a target overlap point set based on the target start point and the target end point.
2. The hash table based full factor regularization method of claim 1, wherein, The steps of constructing a point-ring hash table, a ring-surface hash table and an adjacent element overlap point set based on the original surface element set and the original ring element set comprise the following steps: traversing the ring elements in the original ring element set to construct a point-ring hash table; traversing the surface elements in the original surface element set to construct a ring-surface hash table; determining an adjacent element overlap point set corresponding to adjacent elements in the original interpreted vector file based on the point-ring hash table; wherein the adjacent elements are ring elements having an adjacent relationship.
3. The hash table based full factor regularization method of claim 1, wherein, The steps of determining an original overlap point set based on the original ring element set, the point-ring hash table and the adjacent element overlap point set comprise the following steps: traversing the ring elements in the original ring element set to determine an overlap part between adjacent elements; determining a ring element identifier corresponding to a point element located in the overlap part according to a mapping relationship between the point element and the ring element described by the point-ring hash table; finding an original overlap point set corresponding to the ring element identifier from the adjacent element overlap point set.
4. The hash table based full factor regularization method of claim 1, wherein, The steps of determining a regularized target interpreted vector file based on the original surface element set, the ring-surface hash table and the target overlap point set comprise the following steps: performing point position correction on the overlap part between adjacent elements by using the target overlap point set to obtain a corrected ring element; traversing the surface elements in the original surface element set to determine a mapping relationship between the corrected ring element and the surface element according to the ring-surface hash table, and configuring original element attribute information as attribute information of the corrected ring element according to the mapping relationship to obtain a regularized target interpreted vector file.
5. A hash table based full factor regularization apparatus, characterized by, The steps of determining a regularized target interpreted vector file based on the original surface element set, the ring-surface hash table and the target overlap point set comprise the following steps: an element set determination module configured to obtain an original interpreted vector file to be regularized, and traverse elements in the original interpreted vector file to obtain an original surface element set and an original ring element set; wherein the elements in the original interpreted vector file comprise point elements, ring elements and surface elements; a hash table construction module, configured to construct a point-ring hash table, a ring-face hash table and an adjacent element overlapping point set based on the original point element set and the original ring element set, wherein the point-ring hash table is used to describe a mapping relationship between a point element and a ring element, and the ring-face hash table is used to describe a mapping relationship between a ring element and a face element; an element simplification module, configured to simplify the original interpreted vector file to obtain a new interpreted vector file, and to traverse elements included in the new interpreted vector file to obtain a new ring element set; a point set determination module, configured to determine a target overlapping point set according to the original ring element set, the new ring element set, the point-ring hash table and the adjacent element overlapping point set, wherein the target overlapping point set is used to correct a point position of an overlapping part between adjacent elements; a target file determination module, configured to determine a regularized target interpreted vector file according to the original face element set, the ring-face hash table and the target overlapping point set; the point set determination module is specifically configured to determine an original overlapping point set according to the original ring element set, the point-ring hash table and the adjacent element overlapping point set, and to determine a new overlapping point set according to the new ring element set, the point-ring hash table and the adjacent element overlapping point set, and to determine the target overlapping point set based on the original overlapping point set and the new overlapping point set; the point set determination module is specifically configured to: if a first point in the original overlapping point set is consistent with a new first point in the new overlapping point set in position, and if a tail point in the original overlapping point set is consistent with a new tail point in the new overlapping point set in position, then the original overlapping point set is taken as the target overlapping point set; if the first point in the original overlapping point set is inconsistent with the new first point in the new overlapping point set in position, and / or the tail point in the original overlapping point set is inconsistent with the new tail point in the new overlapping point set in position, then a midpoint between the tail point and the new tail point is taken as a reference point, and the target overlapping point set is determined according to the reference point, the first point, the new first point, the tail point and the new tail point; the point set determination module is specifically configured to: determine a first distance between the first point and the reference point, and a second distance between the new first point and the reference point, respectively; if the first distance is smaller than the second distance, then the first point is taken as a target first point; or if the first distance is larger than the second distance, then the new first point is taken as the target first point; determine a third distance between the tail point and the target first point, and a fourth distance between the new tail point and the target first point, respectively; if the third distance is smaller than the fourth distance, then the tail point is taken as a target tail point; or if the third distance is larger than the fourth distance, then the new tail point is taken as the target tail point; and construct the target overlapping point set based on the target first point and the target tail point.
6. An electronic device, comprising: a processor and a memory, the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the method in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, which when invoked and executed by the processor, cause the processor to implement the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Graph contour optimization method, device, computer equipment and storage medium
CN113487523A