A building contour similarity measurement method, device, terminal and storage medium

By extracting building outline maps and defining editing costs based on graph edit distance, the problem of difficulty in preserving building outline details in traditional methods is solved, and efficient building shape similarity measurement and spatial retrieval tasks are achieved.

CN116486266BActive Publication Date: 2026-02-06CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310493399.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-25
Publication Date
2026-02-06
Estimated Expiration
2043-04-25

AI Technical Summary

Technical Problem

Traditional two-dimensional vector building measurement methods struggle to accurately preserve the detailed features of building outlines. Graph neural network-based methods suffer from low interpretability in shape feature extraction, and automatic sample construction relies heavily on human resources, making it difficult to improve model robustness.

Method used

A graph edit distance-based approach is adopted. The vector contour map of the building is extracted and converted into a ring graph model, which is then split into a chain graph model. The editing cost of vertex editing operation is defined, and the maximum weight clique is obtained by using a heuristic retrieval algorithm. The graph edit distance is calculated to characterize the similarity between building contours.

Benefits of technology

It improves the accuracy of building outline similarity measurement, enables rapid acquisition of accurate solutions, enhances cognitive efficiency, and provides theoretical support and automatic sample construction methods for spatial retrieval tasks based on graph neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486266B_ABST
    Figure CN116486266B_ABST
Patent Text Reader

Abstract

The application provides a building contour similarity measurement method, comprising the following steps: constructing a graph model of a building contour by converting the inflection points of the building contour into graph model vertices with area geometry and local direction feature labels; defining an edit cost of the vertices by using a geometric variation type variable, constructing an edit operation between the vertices of the graph model as an edit path, defining a sum of the edit costs as an edit distance of the edit path; and reflecting shape differences between building contours by the edit cost of the optimal edit path. The application has the beneficial effect that the optimal edit distance path problem is converted into a maximum weight clique solving problem of a vertex correlation graph based on graph theory, and a heuristic search method is designed to quickly and accurately search for the optimal edit path. The cognition result is highly consistent with the class cognition, the shape search effect is higher than that of the current mainstream measurement method, and the application can effectively support building matching, search and other application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to, but is not limited to, the field of surveying and mapping geographic information, and particularly to a method, apparatus, terminal, and storage medium for measuring the similarity of building outlines. Background Technology

[0002] Cognitive research on architecture can reveal the culture, economy, ecology, and history of cities, and provide a theoretical foundation and guidance for urban development planning, statistical prediction of human activities, map navigation, energy use assessment, and other applications based on architectural cognition. Form, as an essential attribute of a cognitive object, is often used as a primary feature in cognitive tasks. For buildings with irregular shapes, retrieval results will vary due to the diversity of people's knowledge, background, and perceptual abilities. Therefore, quantitative measurement of architectural form in conjunction with people's perceptions is of significant value.

[0003] Traditional two-dimensional vector building measurement methods pay insufficient attention to building outline information, making it difficult to accurately preserve the detailed features of building outlines, and their cognitive results differ significantly from human cognition. While geospatial AI (Geo-AI) based measurement methods, especially Graph Neural Networks (GNNs), have made significant progress in recent years, they still lag behind in practical applications due to a lack of fundamental theoretical methods for graph-based measurement. Firstly, the construction of graph structures is often too arbitrary, and the fixed amount of outline points used still leads to the loss of crucial details. Secondly, the interpretability of shape feature extraction using GNNs is low, making it difficult to define potential network problems and further improve model robustness. Finally, training GNN-based measurement models relies on large amounts of sample data, and current theoretical methods are insufficient to support the automatic construction of quantitative evaluation samples, requiring significant human resources. Therefore, there is an urgent need to improve the accuracy of measuring building detail features and to provide theoretical support and pathways for automatic sample construction for novel GNN-based methods. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, terminal and storage medium for measuring building outline similarity based on graph edit distance (GED).

[0005] The technical solution of this invention is implemented as follows:

[0006] A method for measuring building outline similarity based on graph editing distance, the method comprising:

[0007] Extract the vector outline of the building and convert it into a ring graph model; wherein the ring graph model includes vertices;

[0008] The circular graph model is split into a chain graph model; wherein the chain graph model includes a set of directed chains;

[0009] Define the editing cost corresponding to the editing operation of the vertex using geometric transformations;

[0010] Define the set of edit operations for a pair of vertices of the chain graph model as an edit path, and the sum of the edit costs as the edit distance of the edit path;

[0011] Constructing a vertex association graph using a pair of chain graph models includes: the edit paths forming a clique, and the edit distances forming the weights of the clique; the clique includes multiple associated vertices, and the edit costs forming the weights of the associated vertices;

[0012] The maximum weight clique in the vertex association graph is obtained by using a heuristic retrieval algorithm.

[0013] The graph edit distance between a pair of vector contour maps is determined using the graph edit distance formula and the maximum weight clique.

[0014] Output the graph edit distance to characterize the similarity between building outlines.

[0015] This invention also provides a device for measuring building outline similarity based on graph editing distance, comprising:

[0016] The acquisition module is used to extract the vector outline of the building and convert the vector outline into a ring diagram model; wherein the ring diagram model includes vertices;

[0017] A processing module is used to split the ring graph model into a chain graph model; wherein the chain graph model includes a set of directed chains;

[0018] The processing module is also used to define the editing cost corresponding to the editing operation of the vertex using geometric transformation;

[0019] The processing module is further configured to combine the editing operations of a pair of vertices of the chain graph into an editing path, wherein the sum of the editing costs is the editing distance of the editing path;

[0020] The processing module is further configured to construct a vertex association graph using a pair of the chain graph models, including: the edit paths forming a clique, the edit distances forming the weights of the clique; the clique comprising multiple associated points, the edit costs forming the weights of the associated points;

[0021] The processing module is also used to retrieve the clique with the largest weight in the vertex association graph using a heuristic retrieval algorithm, and obtain the maximum weight clique;

[0022] The processing module is further configured to determine the graph edit distance between a pair of vector contour maps using the graph edit distance formula and the maximum weight clique;

[0023] The output module is used to output the graph editing distance, which is used to characterize the similarity between building outlines.

[0024] This invention also provides a building similarity measurement terminal, the terminal including a processor and a memory for storing a computer program that can run on the processor; wherein, when the processor runs the computer program, it implements the building outline similarity measurement method according to any embodiment of this invention.

[0025] This invention also provides a computer-readable storage medium containing computer-executable instructions, characterized in that the computer-executable instructions are executed by a processor to implement the building outline similarity measurement method according to any embodiment of this invention.

[0026] This invention provides a method for measuring building outline similarity based on graph edit distance. The method involves extracting a vector outline of a building and converting it into a ring graph model. The ring graph model is then split into chain graph models, each chain graph consisting of a set of directed chains. A geometric transformation is used to define the edit cost corresponding to an edit operation on a vertex. The set of edit operations on all vertices in a pair of chain graph models is defined as an edit path, and the sum of the edit costs is the edit distance of that edit path. A vertex association graph is constructed using the pair of chain graph models, including: the edit paths forming a clique, and the edit distance of the edit paths constituting the weight of the clique; the clique comprising multiple associated points, and the edit cost constituting the weight of each associated point; a heuristic retrieval algorithm is used to retrieve the clique with the largest weight in the vertex association graph, obtaining the maximum weight clique; the graph edit distance between the pair of vector outlines is determined using the graph edit distance formula and the maximum weight clique; and the graph edit distance is output to characterize the similarity between building outlines. Thus, the present invention can define the editing cost of vertex editing operations based on geometric transformations, thereby reflecting the detailed differences between building outlines, and thus obtaining cognitive results that are highly consistent with human cognition, which can effectively support shape-based spatial retrieval tasks.

[0027] Furthermore, based on the constructed vertex association graph, the present invention can transform the path optimization problem into a maximum weight clique solution process, quickly obtain accurate solutions, and improve the efficiency of recognition while ensuring the accuracy of building geometry recognition. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating a method for measuring the similarity of building outlines provided in an embodiment of the present invention;

[0029] Figure 2 This is a partial information structure diagram of corner points of a building vector outline provided in an embodiment of the present invention;

[0030] Figure 3 This is a schematic diagram illustrating the conversion of a building vector outline diagram into a ring diagram model according to an embodiment of the present invention;

[0031] Figure 4 This is a schematic diagram illustrating a vertex editing operation and editing cost calculation provided in an embodiment of the present invention;

[0032] Figure 5 This is a schematic diagram illustrating the definition of editing operations, editing costs, editing paths, and editing distances for a vector contour map, provided by an embodiment of the present invention.

[0033] Figure 6 This is a schematic diagram illustrating the conversion of a ring graph model into a transitive closure according to an embodiment of the present invention;

[0034] Figure 7 This is a schematic diagram illustrating the transformation of a directed chain and a cycle graph model corresponding to vertex deletion in a transitive closure, as provided in an embodiment of the present invention.

[0035] Figure 8 This is a schematic diagram of a vertex association graph and clique structure provided in an embodiment of the present invention;

[0036] Figure 9 This is a schematic diagram of the connection between associated points in a vertex association graph provided by an embodiment of the present invention;

[0037] Figure 10 This is a schematic diagram illustrating the process of retrieving the maximum weight clique in a vertex association graph according to an embodiment of the present invention;

[0038] Figure 11 This is a schematic diagram of a building outline similarity measurement device provided in an embodiment of the present invention;

[0039] Figure 12 This is a precision-recall curve of a building outline similarity measurement method provided in an embodiment of the present invention for classifying buildings after rotation.

[0040] Figure 13 This is an experimental area diagram of a building shape retrieval experiment provided in an embodiment of the present invention;

[0041] Figure 14 This is a retrieval result image of ten standard building shape templates based on a building outline similarity measurement method provided in an embodiment of the present invention.

[0042] Figure 15This is a comparison chart of the search results of a building outline similarity measurement method provided in this embodiment of the invention and the current state-of-the-art (SOTA) method;

[0043] Figure 16 This is a schematic diagram of the terminal hardware structure of a building outline similarity measurement method provided in an embodiment of the present invention. Detailed Implementation

[0044] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0045] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0046] Please refer to Figure 1 This invention provides a method for measuring building outline similarity based on graph edit distance, the method comprising the following steps:

[0047] S101: Extract the vector outline of the building and convert the vector outline into a ring graph model; wherein the ring graph model includes vertices;

[0048] S102: Decompose the ring graph model into a chain graph model; wherein the chain graph model includes a set of directed chains;

[0049] S103: Define the editing cost corresponding to the editing operation of the vertex using geometric transformation;

[0050] S104: Define the set of edit operations for the vertices of a pair of chain graph models as an edit path, and the sum of the edit costs is the edit distance of the edit path;

[0051] S105: Constructing a vertex association graph using a pair of chain graph models, including: the edit paths forming a clique, the edit distances forming the weights of the clique; the clique comprising multiple associated points, the edit costs forming the weights of the associated points;

[0052] S106: Use a heuristic retrieval algorithm to retrieve the clique with the largest weight in the vertex association graph, and obtain the maximum weight clique;

[0053] S107: Determine the image edit distance between a pair of building vector outlines using the image edit distance formula and the maximum weight clique;

[0054] S108: Output the graph editing distance, used to characterize the similarity between building outlines.

[0055] The method described in this embodiment of the invention is executed by a terminal. The terminal can be of various types; for example, the terminal can be, but is not limited to, at least one of the following: a server, a computer, a tablet computer, or other electronic devices.

[0056] In some embodiments, the vector contour map in S101 includes: corner points, edges, local features of the corner points, and region features; converting the vector contour map into a ring map model includes:

[0057] The corner points of the vector contour map are converted into vertices, and the edges are converted into edges, thus constructing the corresponding ring graph model. The ring graph model includes label information corresponding to each vertex. The label information is used to store the local features and regional features of the corner points. The label information L(v) can be represented as:

[0058] L(v)=[R(v),l prev (v),l next (v)]

[0059] Among them, l prev (v) is the boundary line between corner point v and the previous corner point in a clockwise direction, l next R(v) is the boundary line between corner point v and the next corner point in the clockwise direction, and R(v) is the rotation angle in the clockwise direction, where R(v)∈[0,2π).

[0060] It is understandable that the outline of a building is composed of points and lines, with the points serving as corner points and the lines serving as edge lines, to form a corresponding vector outline.

[0061] Here, in order to represent the outline information of a building, a building must have at least 3 points, and three points define a plane. Therefore, the vector diagram of the building must include at least 3 corner points.

[0062] Here, the rotation angle corresponds to the local feature and is used to characterize the local cognitive information of the corner point.

[0063] For example, the rotation angle refers to the angle formed by two vectors consisting of a corner point and its two adjacent corner points.

[0064] For example, such as Figure 2 As shown, a corner point is selected from the building vector outline diagram a. The rotation angle of this corner point is calculated by: the vector formed by the corner point and the adjacent previous corner point in the clockwise direction, and the vector formed by the corner point and the adjacent next corner point in the clockwise direction. The clockwise angle formed is the rotation angle R of this corner point. v .

[0065] Thus, embodiments of the present invention can use the rotation angle to represent the local cognitive information of the corner point, thereby avoiding the ambiguity caused by using the intersection angle.

[0066] Here, the edge line corresponds to the region feature, including the corner point, the corner point adjacent to the corner point, and the edge line length between the corner point and the adjacent corner point, which is used to characterize the region cognitive information of the corner point.

[0067] For example, the label information L(v) characterizes the structural features of the corner point corresponding to vertex v in the ring graph model; the structural features include local features and regional features, such as the edge line formed by the corner point and its adjacent corner points, the side length of the edge line, or the angle formed by the edge line.

[0068] For example, such as Figure 3 The diagram shows the conversion of a building vector outline into a ring diagram model. (1) The building vector outline includes: eight corner points and their corresponding rotation angles, v0 (rotation angle is 1.5π), v1 (rotation angle is 0.5π), v2 (rotation angle is 0.5π), v3 (rotation angle is 1.5π), v4 (rotation angle is 0.5π), v5 (rotation angle is 0.5π), v6 (rotation angle is 0.5π) and v7 (rotation angle is 0.5π); the corresponding side lines and their side lengths and rotation angles, v0v1 (side length is 1), v1v2 (side length is 1), v2v3 (side length is 1), v2v3 (side length is 1), v4v1v2v2v3v4v5v2v3v4v5v4v5v5v4v5v5v6v4v5v5v6v5v6v6v7v6v7v8v1v1v1v1v1v2 ... v3v4 (side length 1), v4v5 (side length 2), v5v6 (side length 3), v6v7 (side length 2), v7v0 (side length 1); take the eight corner points in (1) as eight vertices and the edges in (1) as edges to form the unweighted ring graph model in (2); each vertex is associated with a label, for example, the label information of vertex v0 is (1.5π,1,1), the three data correspond to the rotation angle, the edge length of the edge line v7v0 between v0 and the previous corner point v7, and the edge length of the edge line v0v1 between v0 and the next corner point v1.

[0069] Thus, in this embodiment of the invention, the edge between the current point and the adjacent corner point and the length of the edge can be selected to convey regional cognitive information and perform structural cognition; by converting the inflection points of the building outline into graph model vertices with regional geometric features and local directional feature labels, the ring graph model is constructed.

[0070] In one embodiment, S101 includes: extracting vector outlines of two buildings; converting the vector outlines of the two buildings into corresponding ring graph models to obtain two unweighted ring graph models.

[0071] Here, the ring graph model does not specify the direction of the vertex connection. The edges between vertices in the ring graph model only represent the relationship between adjacent vertices. An unweighted ring graph can be constructed using any starting vertex.

[0072] Thus, in this embodiment of the invention, the local cognitive information and regional cognitive information of the corner points can be stored in the label information through the vertices to complete the extraction of geometric features for shape identification and similarity measurement of the building outline, thereby correctly and uniquely representing the shape of the building.

[0073] In some embodiments, the step of splitting the ring graph model into a chain graph model in S102 includes: selecting a vertex from the ring graph model as the starting point for splitting; given the corresponding link direction of the starting point, sequentially connecting all vertices in the direction of the link to form a corresponding directed chain; and using a set of directed chains corresponding to all vertices in the ring graph model to form a chain graph model.

[0074] Here, the chain graph model is obtained by decomposing the loop graph model. The chain graph model includes all vertices, edges, and label information in the loop graph model, and the label information corresponds one-to-one with the vertex.

[0075] Here, the starting point can be any vertex in the ring graph model.

[0076] For example, the ring graph model is equivalent to a circle with multiple nodes and no connection direction, and the point where the circle breaks off is not fixed; by taking each vertex in the ring graph model as a starting point, it can be divided into multiple directed chains with directions.

[0077] Here, the link direction includes two directions: one where a vertex is pointed to and another pointing to other vertices. For example, clockwise and counterclockwise directions.

[0078] Here, the number of vertices corresponds to the number of corner points, which is greater than or equal to 3.

[0079] Understandably, the number of directed chains is twice the number of vertices.

[0080] For example, a building has n points, and the ring graph model it forms has n vertices. Each vertex can be given two directions, and each direction forms a directed chain. Thus, for this building, there can be 2n directed chains.

[0081] For example, consider a cycle graph model with three vertices: v0, v1, and v2. Starting from v0, the path can be clockwise to v0→v1→v2 and counterclockwise to v0→v2→v1. Starting from v1, the path can be clockwise to v1→v2→v0 and counterclockwise to v1→v0→v2. Starting from v2, the path can be clockwise to v2→v0→v1 and counterclockwise to v2→v1→v0. Thus, the cycle graph with three nodes can be split into six directed chains.

[0082] In one embodiment, the two ring graph models are each split into two corresponding chain graph models.

[0083] For example, the ring diagram model of one building is split into a chain diagram model, and the ring diagram model of another building is split into another chain diagram model.

[0084] In some embodiments, the editing operation includes replacement and deletion, and S103 further includes: determining a replacement editing cost based on the geometric changes of the replacement between a pair of vertices in the chain graph model; wherein the geometric changes of the replacement include: geometric shape differences and relative position differences; and determining a deletion editing cost based on the geometric changes of the deletion of vertices in the chain graph model.

[0085] Here, the replacement between vertices corresponds to the replacement between a vertex u in one chain graph model and a vertex v in another chain graph model.

[0086] It is understandable that the edit operation of replacing vertex v with vertex u has the same edit cost as the edit operation of replacing vertex u with vertex v.

[0087] In one embodiment, the geometric shape difference can be a geometric distortion between two triangles; for each vertex in a pair of vertices, select the other two adjacent vertices and corresponding edges to form two triangles; perform geometric transformations on the low, high, or angles of the two triangles to determine the geometric shape difference and the relative position difference.

[0088] For example, such as Figure 4 The scaling process from vector profile G1 to vector profile G2 is shown. p and v q These are two vertices of G1 and G2 (p and q are vertex indices used to distinguish different vertices in the same graph model), u p-1 and u p+1 Is with u p Two adjacent vertices, v q-1 and v q+1 Is with v q Two adjacent vertices. (By u)p-1 u p u p+1 The triangle formed is T1, which can be understood as the vertex region feature of the source image, formed by v. q-1 v q v q+1 The resulting triangle is T2, which can be understood as the feature of the target vertex region.

[0089] It is impossible to stretch u when T1 and T2 do not share a common base. p To make the structures of regions G1 and G2 identical, the triangles need to be scaled to unify their reference points. Specifically, move u... p-1 and v q-1 To reach the same position, rotate to make u p-1 v q-1 u p+1 v q+1 On the same baseline, and stretch u p+1 to v q+1 , that is u p u p+1 to u p 'v q+1 The scaling operation determines a base deformation parameter ScaleDis(u,v); u p-1 u p '、v q+1( u p+1 The triangle T1' formed by ') can be understood as the feature of the vertex region of the source image after scaling.

[0090] Considering that a triangle can be defined by one side, the height corresponding to that side, and the angle corresponding to that side, two additional parameters are added: the height deformation parameter StruDis(u,v) and the angle deformation parameter AngleDis(u,v) to describe the triangle formed by u. p to v q The geometrical differences in the geometrical transformation of the replacement; the base deformation parameter ScaleDis(u,v) is determined by the ratio of the base of triangle T1 to that of T1', and the calculation formula is as follows:

[0091]

[0092] Among them, b T1 It is the base of the triangle, b T1 ' is the base of triangle T1', and argmax() is used to find the maximum value of the ratio of the base of the triangle.

[0093] The high deformation parameter StruDis(u,v) is determined by the base and height of triangles T1' and T2, and is calculated using the following formula:

[0094]

[0095] Where b is the base of triangle T1' (T2 shares the base with T1'), h1' is the height of triangle T1', h2 is the height of triangle T2, δ is the ratio parameter, the ratio of the corner length to the sum of the corner lengths of all corners in the vector contour diagram, and τ depends on u. p and v q Whether the parameter value is on the same side of the baseline (1 for the same side, -1 otherwise).

[0096] Here, the ratio parameter δ is the ratio of the corner point length to the sum of the corner point lengths of all corner points in the vector contour map; the corner point length refers to the length of the edge line between the corner point and the adjacent previous corner point, and the sum of the lengths of the edge line between the corner point and the adjacent next corner point; the formula for calculating the ratio parameter δ is as follows:

[0097]

[0098] Among them, l prev (v) is the length of the edge line between corner point v and the adjacent previous corner point in a clockwise direction, l next (v) is the length of the edge line between corner point v and the next adjacent corner point in the clockwise direction, where V is the set of all corner points in the vector contour map, ∑ v∈V (l prev (v)+l next (v)) is the sum of the lengths of the corner points v∈V.

[0099] The angular distortion parameter AngleDis(u,v) is determined by the difference between the two angles opposite the base, and is calculated using the following formula:

[0100]

[0101] Where Δθ is the difference between the rotation angle corresponding to vertex u and the rotation angle corresponding to vertex v.

[0102] Therefore, the formula for calculating the geometric shape difference is as follows:

[0103] GeoDis(u,v)=ScaleDis(u,v)×[StruDis(u,v)+AngleDis(u,v)]

[0104] Here, ScaleDis(u,v) is the bottom deformation parameter, StruDis(u,v) is the height deformation parameter, and AngleDis(u,v) is the angular deformation parameter.

[0105] In one embodiment, the relative position difference is determined by the relative position of vertex u in its corresponding directed chain and vertex v in its corresponding directed chain of the pair of vertices (u,v).

[0106] For example, the formula for calculating the relative positional difference is as follows:

[0107]

[0108] in, Let u be the position of vertex u in the directed chain C1. Let v be the position of vertex v in directed chain C2. This indicates the relative positions of vertex u and vertex v.

[0109] In one embodiment, the cost of the replacement edit is determined by both the geometrical differences and the relative positional differences between the pair of vertices.

[0110] Here, the replacement and editing cost s of the pair of vertices (u,v) is... uv The calculation formula is as follows:

[0111] s uv =GeoDis(u,v)×PosDis(u,v)

[0112] Where GeoDis(u,v) is the geometric difference between the pair of vertices, and PosDis(u,v) is the relative position difference between the pair of vertices.

[0113] In one embodiment, the formula for calculating the deletion / edit cost of vertex v is as follows:

[0114]

[0115] Where, d v δ is the cost of deleting and editing vertex v, b is the ratio parameter, b is the base of the triangle formed by vertex v and its adjacent vertices, and h is the height of the triangle formed by vertex v and its adjacent vertices.

[0116] Here, the height h of the triangle formed by the vertex and its adjacent vertices is selected according to the vertex to be calculated.

[0117] It is understood that, for the pair of vertices to be deleted, the deletion / edit operation involves deleting two vertices, vertices u and v, from the candidate vertex pair (u, v), resulting in two corresponding deletion / edit costs d. u and d v .

[0118] Thus, embodiments of the present invention can define the editing cost of vertex editing operations based on geometric transformations, thereby reflecting the detailed differences between building outlines and obtaining cognitive results that are highly consistent with human cognition. This can provide theoretical support and a way to automatically construct samples for spatial measurement methods based on graph neural networks, effectively supporting shape-based spatial retrieval tasks.

[0119] In some embodiments, S104 further includes: determining the edit distance based on the sum of the edit costs corresponding to the edit operations of each vertex in the edit path; wherein the formula for calculating the edit distance is as follows:

[0120]

[0121] Where G1 and G2 represent two building diagram models, λ is the edit path, and e i This represents a specific editing operation, c(e) i (e) is the editing operation i The cost of editing.

[0122] Here, the building diagram model can also be the ring diagram model or the chain diagram model.

[0123] It is understandable that all vertices between two graph models can be selected for replacement or deletion editing operations. The operations performed on all vertices can form multiple bidirectional editing paths λ, and multiple editing paths can form an editing path set γ, where λ∈γ.

[0124] For example, such as Figure 5 As shown, an edit path λ0 obtained after converting two building vector outlines includes: edit operation e1 corresponding to u1 replacing v1, edit operation e2 corresponding to deleting u2, edit operation e3 corresponding to deleting v2, and edit operation e2 corresponding to u3 replacing v3. The edit cost of e1 is c1, the edit cost of e2 is c2, the edit cost of e3 is c3, and the edit cost of e4 is c4. Therefore, the edit distance corresponding to edit path λ0 is Distance0 = c1 + c2 + c3 + c4. Similarly, the edit distance corresponding to edit path λ1 is Distance1, the edit distance corresponding to edit path λ2 is Distance2, the edit distance corresponding to edit path λ3 is Distance3, and so on.

[0125] It is understandable that by defining the vertex editing cost and searching for the optimal editing path, the similarity calculation of the building outline can be equivalent to the similarity calculation of the corresponding graph; the shortest editing path (minimum total editing cost) is called the optimal editing path. The shorter the optimal editing path, the smaller the difference between the two graphs, that is, the more similar they are.

[0126] Here, the length of the edit distance does not represent the number of edit steps. The minimum edit distance corresponds to the minimum sum of edit costs, not the minimum number of edit steps.

[0127] In one embodiment, the graph edit distance between two building vector outlines is the edit distance of the edit path with the smallest edit distance among all edit paths (the optimal edit path). Therefore, combining this with the edit distance formula, the graph edit distance formula can be obtained as follows:

[0128]

[0129] Where, d u and d v d represents the cost of deleting vertices u and v in G1 and G2 respectively, D1 and D2 are the sets of vertices deleted from G1 and G2 in the edit path respectively, and S is the replacement set between vertices in G1 and G2 in the edit path; u It is the edit cost of deleting vertex u. It is the edit cost of deleting vertex u∈D1; d v It is the edit cost of deleting vertex v. It is the edit cost of deleting vertex v∈D2; s uv It is the edit cost of replacing vertex u with vertex v, ∑ (u,v)∈S s uv It is the edit cost of replacing all vertex replacements in set S.

[0130] In some embodiments, S105 further includes: making directed connections between vertices that are not connected to each other in the directed chain, converting the chain graph model into a set of transitive closures; and constructing the vertex association graph using a pair of transitive closures converted from the chain graph model.

[0131] Here, a directed chain can be converted into a transitive closure, and the number of transitive closures is the same as that of the directed chain; a chain graph model can be converted into multiple transitive closures, forming a set of transitive closures.

[0132] Here, the direction of the directed connection is consistent with the connection direction of the vertices in the current directed chain.

[0133] For example, such as Figure 6 As shown, the ring graph model includes four vertices: v0, v1, v2, and v3. After splitting the ring graph, a directed chain is obtained: v0→v1→v2→v3. Then, the vertices in the directed chain that are not connected to each other are directed to form a corresponding transitive closure: v0→v2, v0→v3, and v1→v3.

[0134] Understandably, a transitive closure needs to be constructed before building the vertex association graph. After constructing the transitive closure, vertex editing operations will not affect the connectivity of the structure, such as... Figure 7 As shown, when a vertex v1 in a transitive closure is deleted, the directed chain of the corresponding chain graph model and the cyclic graph model both remove the vertex and its edges with adjacent vertices.

[0135] Thus, the embodiments of the present invention can ensure that each vertex is directed by the constructed transitive closure, and that the editing operation of the vertices in the transitive closure will not affect the connectivity of the structure, thus facilitating graph editing operations.

[0136] In one embodiment, the vertex association graph is constructed using two sets of transitive closures converted from a pair of chain graph models, including: arranging one set of transitive closures as rows and the other set as columns in a matrix to construct the vertex association graph; wherein the vertex association graph includes associated points (u,v), and the associated points (u,v) represent the edit operation of replacing vertex u with vertex v.

[0137] For example, such as Figure 8 As shown, Ω(C1)=(U,E) C1 ') and Ω(C2)=(V,E C2 ') are the transitive closures corresponding to C1 and C2, respectively, where E C1 'and E C2 ' represents the set of edges with transitive closure, and C1 = (U, E C1 ) and C2=(V,E C2 Let U and V represent two directed chains; and let E represent the vertex sets of the directed chains. C1 and E C2 Let represent the set of edges in the directed chain graph. The vertex association graph G is formed by arranging a set of Ω(C1) as rows and a set of Ω(C2) as columns in matrix form. A Furthermore, each associated vertex (u,v) in the graph corresponds to a weight. It can be seen that each associated vertex is connected only by directed edges to all associated vertexes to its lower right. The sequence u0v0→u1v2→u2v3→u3v4 can form a clique Clq, corresponding to the vertex association graph G. A An edit path λ in the matrix includes: deleting vertex v1, replacing between u0 and v0, replacing between u1 and v2, replacing between u2 and v3, and replacing between u3 and v4. It can be understood that if the edit path does not pass through a column or row in the matrix, the corresponding vertex is deleted.

[0138] In one embodiment, in the vertex association graph, each associated point has a directed connection only with all associated points to its lower right.

[0139] For example, such as Figure 9 As shown, vertex association graph G A In the given information, the associated point (u0,v0) has a directed connection only with its lower right associated points (u1,v1), (u1,v2), and (u2,v1); the associated point (u0,v1) has a directed connection only with its lower right associated points (u1,v2) and (u2,v2); the associated point (u1,v0) has a directed connection only with its lower right associated point (u2,v1); and the associated point (u1,v1) has a directed connection only with its lower right associated point (u2,v2).

[0140] In one embodiment, the weight of a clique is calculated using the following formula:

[0141]

[0142] Furthermore, Clq represents a clique, S is the replacement set consisting of the vertices to be replaced in the edit path, (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph.

[0143] In one embodiment, the associated point (u,v) represents an edit operation in which vertex u is replaced by vertex v, and the weight of the associated point is determined by the edit cost of the vertex.

[0144] For example, the formula for calculating the weight w(u,v) of the associated point is: w(u,v)=d u +d v -s uv Therefore, the graph editing distance formula can be rewritten as:

[0145]

[0146] Where G1 and G2 represent the chain graph models of two buildings, D1 and D2 are the sets of vertices deleted from G1 and G2 respectively in the edit path λ, and S is the set of replacements between vertices of G1 and G2 in the edit path; d u It is the edit cost of deleting vertex u. The edit cost for deleting vertex set u∈D1; d v It is the edit cost of deleting vertex v. The edit cost for deleting vertex set v∈D2; (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph, ∑ (u,v)∈S (d u +d v -suv ) is the weight of the clique formed by the associated points (u,v)∈S.

[0147] Furthermore, since the set of all vertices, i.e., the vertex set, does not change with the editing path and is independent of the editing path, the sum of the deletion and editing costs of the vertex set does not change with the path. Therefore, the optimal editing distance between the two building vector contours is given by utility μ(S) = ∑ (u,v)∈S (d u +d v -s uv Since the weight of the clique determines the distance, the graph edit distance formula can be rewritten as:

[0148]

[0149] Where G1 and G2 represent the chain graph models of two buildings, U and V are the vertex sets of all vertices included in G1 and G2, respectively, and S is the set of replacements between vertices of G1 and G2 in the edit path; d u It is the edit cost of deleting vertex u, ∑ u∈U d u It is the edit cost of deleting vertex u∈U; d v It is the edit cost of deleting vertex v, ∑ v∈V d v It is the edit cost of deleting vertex v∈V; s uv It is the edit cost of replacing vertex u with vertex v; (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph, ∑ (u,v)∈S (d u +dv-suv) is the weight of the clique formed by the associated points (u,v)∈S.

[0150] Thus, embodiments of the present invention can transform the problem of finding the optimal editing path into the problem of finding the maximum weight clique in the graph model of graph theory based on the constructed vertex association graph, thereby quickly obtaining the graph editing distance between building vector contours.

[0151] In some embodiments, S106 further includes: initializing a clique based on the vertex association graph; and comparing and replacing the association points in the clique row by row according to the weights of the association points to determine a local optimal solution.

[0152] For example, from a vertex association graph with k+1 rows and k+1 columns, initialize a clique consisting of k+1 associated vertices, where the clique corresponds to an edit path: λ0 = [(u0, v0), (u1, v1), ..., (u... k ,vW The association points of the group are compared and replaced according to the following rules:

[0153] For a vertex association graph, the association points are compared and replaced row by row from bottom to top. The replacement candidate set of the association points in each row is the set of association points with a larger weight than the current association point in the same row. After all the association points in the replacement candidate sets from bottom to top to the kth row have been compared and replaced, the editing path and the weight of the corresponding clique are recorded, which is called the k-th order local optimum.

[0154] Specifically, the associated points in the replacement candidate set of the current row are checked in turn. If there is an associated point whose weight is greater than or equal to the weight of the current associated point, and the position of the associated point is to the left of the associated point in the next row of the current group (the last row is not considered), then the current associated point is directly replaced by the associated point and the replacement candidate set is updated to the replacement candidate set of the associated point.

[0155] If there exists a related point with a weight greater than or equal to the weight of the current related point, and the position of this related point is directly above or to the right of the related point in the next row of the current clique, then record the current related point and its corresponding weight W of the current clique. Then, using the current related point as a reference, extend the path downwards and to the right by 1 unit distance to create a new editing path (create as many editing paths as there are related points satisfying the current conditions). Reposition the row to be edited to the last row, and repeat the comparison and replacement until all comparisons and replacements for row k+1 are completed. Record the weight W' of the clique corresponding to the newly created editing path. If W' ≥ W, then record the clique formed by the new editing path as the temporary optimal solution λ. temp Continue comparing and replacing from the current associated point. After comparing and replacing all associated points in the replacement candidate set of the current associated point, record the clique formed by all the new edit paths as each temporary optimal solution λ. temp Compare all temporary optimal solutions λ temp The weights are used to select the temporary optimal solution λ with the largest weight. temp As a local optimal solution λ k .

[0156] For example, such as Figure 10The diagram shows a flowchart of a heuristic retrieval algorithm for finding the maximum weight clique. The graph is a 4x6 vertex association graph. A clique with 4 associated vertices is initialized, and its corresponding edit path is: λ0 = [(u0,v0),(u1,v1),(u2,v2),(u3,v3)], and its total weight W(λ0) = 10. Compare and replace the associated point (u3,v3) (weight 2) in the last row, i.e., the 4th row. The replacement candidate set with a weight greater than the current associated point is found to be [(u3,v3)], and the weight of (u3,v3) is 4, i.e., w(u3,v4)>w(u3,v3). A new clique is formed by the retrieved associated point (u3,v3) and other associated points (u0,v0), (u1,v1), and (u2,v2) in λ0: λ1=[(u0,v0),(u1,v1),(u2,v2),(u3,v4)], with a weight of W(λ1)=12, so W(λ1)>W(λ0); λ1 is the current temporary optimal solution for the 3rd row.

[0157] Continuing the comparison and replacement process up to the third row, the candidate set for replacing the associated point (u2,v2) is found to be [(u2,v3),(u2,v4)], with weights of 4 for both (u2,v3) and (u2,v4). Based on this, the new cliques are: λ2 = [(u0,v0),(u1,v1),(u2,v3),(u3,v4)] and λ3 = [(u0,v0),(u1,v1),(u2,v4),(u3,v5)], with weights of W(λ2) = 13 for λ2 and W(λ3) = 9 for λ3. Therefore, W(λ2) > W(λ3), and λ2 is the current temporary optimal solution for the third row.

[0158] Continuing the comparison and replacement process up to the second row, the candidate set for replacing the associated point (u1,v1) is found to be [(u1,v2)], and the weight of (u1,v2) is 3. Based on the retrieval, the new cliques are: λ4 = [(u0,v0),(u1,v2),(u2,v3),(u3,v4)] and λ5 = [(u0,v0),(u1,v2),(u2,v4),(u3,v5)], with the weight of λ4 being W(λ4) = 14 and the weight of λ5 being W(λ5) = 10. Therefore, W(λ4) > W(λ5), and λ4 is the current local optimum in the second row.

[0159] Continuing the comparison and replacement process up to the first row, the candidate set for replacing the associated point (u0,v0) is found to be [(u0,v2)], with a weight of 4 for (u0,v2). The starting associated point of the clique has changed, and more columns representing the transition closures of the new chain are added, creating more edit paths and resulting in more cliques, including: λ6 = [(u0,v2),(u1,v3),(u2,v4),(u3,v5)], λ7 = [(u0,v2),(u1,v3),(u2,v4),(u3,v5)], λ7 = [(u0,v2),(u1,v3),(u2,v5)], (u0,v2),(u1,v3),(u2,v2),(u1,v2 ... v4),(u3,v0)], λ8=[(u0,v2),(u1,v3),(u2,v4),(u3,v1)] and λ9=[(u0,v2),(u1,v1)]; and the weight of λ6 is W(λ6)=10, the weight of λ7 is W(λ7)=9, the weight of λ8 is W(λ8)=11, and the weight of λ9 is W(λ9)=6. Then W(λ4)>W(λ8)>W(λ6)>W(λ7)>W(λ9), and λ4 is the current temporary optimal solution for the first row.

[0160] After traversing the entire vertex association graph, the temporary optimal solution of each row is compared. The optimal edit path with the smallest distance is found to be λ4 = [(u0,v0),(u1,v2),(u2,v3),(u3,v4)]. The clique formed by this path is the maximum weight clique, and the weight of the maximum weight clique is 14.

[0161] Thus, the present invention can use an improved heuristic retrieval method to quickly obtain accurate solutions, ensuring the accuracy of building geometry recognition while improving recognition efficiency.

[0162] In some embodiments, S107 includes: determining the graph edit distance between a pair of building vector outline maps using a graph edit distance formula based on the weight of the maximum weight group.

[0163] In some embodiments, the graph edit distance output in S108 may include the optimal edit path and the weight of its corresponding clique, used to measure the similarity between the building outlines.

[0164] For example, the greater the weight of the edit path retrieved for two building outlines, the fewer geometric transformation steps or operational costs are required when measuring the similarity between the two building outlines, and the higher the similarity between the outlines of the two buildings.

[0165] In this embodiment of the invention, a vector outline of a building is extracted and converted into a ring graph model. The ring graph model is then split into a chain graph model, which includes a set of directed chains. Geometric transformations are used to define the editing cost corresponding to the editing operation of each vertex. A set of editing operations for all vertices in a pair of chain graph models is defined as an editing path, and the sum of the editing costs is the editing distance of the editing path. Thus, by defining the editing cost of vertex editing operations based on geometric transformations, the subtle differences between building outlines can be reflected, resulting in cognitive results highly consistent with human cognition. This effectively supports application needs such as building matching and retrieval.

[0166] In this embodiment of the invention, a vertex association graph is constructed using a pair of chain graph models, including: the edit paths forming a clique, and the edit distance of the edit paths forming the weight of the clique; the clique includes multiple associated points, and the edit cost forming the weight of the associated points; a heuristic retrieval algorithm is used to retrieve the clique with the largest weight in the vertex association graph, obtaining the maximum weight clique; the graph edit distance between a pair of vector contour graphs is determined using the graph edit distance formula and the maximum weight clique; the graph edit distance is output to characterize the similarity between building contours. Thus, this invention can transform the edit path optimization problem into a maximum weight clique solution process based on the constructed vertex association graph, and quickly and accurately retrieve the optimal edit path through an improved heuristic retrieval method, ensuring the accuracy of building geometry recognition while improving recognition efficiency.

[0167] Please refer to Figure 11 This invention also provides a building outline similarity measurement device, the device comprising: an acquisition module 201, a processing module 202, and an output module 203; wherein,

[0168] The acquisition module 201 is used to extract the vector outline of the building and convert the vector outline into a ring diagram model; wherein, the ring diagram model includes vertices;

[0169] The processing module 202 is used to split the ring graph model into a chain graph model; wherein the chain graph model includes a set of directed chains;

[0170] The processing module 202 is also used to define the editing cost corresponding to the editing operation of the vertex using geometric transformation;

[0171] The processing module 202 is further configured to define a set of editing operations for a pair of vertices of the chain graph as an editing path, and the sum of the editing costs is the editing distance of the editing path;

[0172] The processing module 202 is further configured to construct a vertex association graph using a pair of chain graph models, including: the edit paths forming a clique, the edit distances forming the weights of the clique; the clique includes multiple associated points, and the edit costs forming the weights of the associated points;

[0173] The processing module 202 is further configured to use a heuristic retrieval algorithm to retrieve the clique with the largest weight in the vertex association graph, thereby obtaining the maximum weight clique;

[0174] The processing module 202 is further configured to determine the graph edit distance between a pair of building vector outlines using the graph edit distance formula and the maximum weight clique;

[0175] The output module 203 is used to output the graph editing distance, which is used to characterize the similarity between building outlines.

[0176] In some embodiments, the vector contour map includes: corner points, edges, local features of the corner points, and region features; the method further includes:

[0177] The processing module is used to convert the corner points of the vector contour map into vertices and the edges into edges, constructing an unweighted ring graph model; the ring graph model includes label information corresponding one-to-one with each vertex, the label information is used to store the local features and regional features of the corner points, and the label information L(v) is represented as:

[0178] L(v)=[R(v),l prev (v),l next (v)]

[0179] Among them, l prev (v) is the length of the edge line between corner point v and the adjacent previous corner point in a clockwise direction, l next R(v) is the length of the edge line between corner point v and the next adjacent corner point in the clockwise direction, and R(v) is the clockwise rotation angle formed by the corresponding vectors of the two edge lines, and R(v)∈[0,2π).

[0180] In some embodiments, the method further includes:

[0181] The processing module is used to select one of the vertices from the ring graph model as the starting point for splitting;

[0182] The processing module is used to provide the corresponding link direction of the starting point, and sequentially connect all vertices in the direction of the link to form the corresponding directed chain;

[0183] The processing module is used to construct a chain graph model by utilizing a set of directed chains corresponding to all vertices in the ring graph model.

[0184] In some embodiments, the method further includes:

[0185] The processing module is used to determine the replacement editing cost based on the geometric changes of the replacement between vertices in a pair of chain graph models; wherein the geometric changes of the replacement include: geometric shape differences and relative position differences;

[0186] The processing module is used to determine the deletion / editing cost based on the geometric changes of vertex deletion in the chain graph model.

[0187] In some embodiments, the method further includes:

[0188] The processing module is used to make directed connections between vertices that are not connected to each other in the directed chain, and to convert the chain graph model into a set of transitive closures.

[0189] The processing module is used to construct the vertex association graph by converting a pair of chain graph models into two sets of transitive closures.

[0190] In some embodiments, the method further includes:

[0191] The processing module is configured to determine the graph edit distance between a pair of vector contour maps based on the weight of the maximum weight clique and using a graph edit distance formula; wherein the graph edit distance formula is as follows:

[0192]

[0193] Furthermore, G1 and G2 represent the chain graph models of two buildings, U and V are the vertex sets of all vertices included in G1 and G2, respectively, and S is the set of replacements between vertices of G1 and G2 in the edit path; d u It is the edit cost of deleting vertex u, ∑ u∈U d u It is the edit cost of deleting vertex u∈U; d v It is the edit cost of deleting vertex v, ∑ v∈V d v It is the edit cost of deleting vertex v∈V; s uv It is the edit cost of replacing vertex u with vertex v, (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph, ∑ (u,v)∈S (d u +dv-suv) is the weight of the clique formed by the associated points (u,v)∈S.

[0194] In some embodiments, the method further includes:

[0195] The processing module is used to initialize a clique based on the vertex association graph;

[0196] The processing module is used to compare and replace the associated points in the initialized clique row by row according to the weight of the associated points to determine the local optimal solution.

[0197] As one embodiment, the present invention compares the proposed method with other methods. Specifically:

[0198] This invention uses 5,000 building outline data with category labels and 10 building shape templates (E, F, H, I, L, O, T, U, Y, Z). It uses three indicators, FT, ST and DCG, to quantitatively evaluate the application capability of the method of this invention in building classification, and compares it with three traditional methods, including two outline-based methods, namely Fourier descriptors and rotation functions, and one region-based method, multi-scale features and grid context descriptors (MF&GCD).

[0199] The method of this invention was compared with GCA. Considering that rotation operations significantly affect the results when applying certain methods, this invention compared the similarity measurement performance of the shapes of rotated (marked with the letter R) and unrotated buildings when applying the above methods. The comparison results are shown in Table 1:

[0200] Table 1. Performance comparison of shape similarity measurement under different methods.

[0201]

[0202] As can be seen from Table 1, the proposed GED method has rotation invariance, which is superior to other conventional methods, especially when dealing with unrotated buildings. Figure 12 The precision-recall curves for the above classification method after rotating the building are consistent with the previous analysis.

[0203] Please refer to Figure 13 A dataset of 9410 building outlines in Shanghai was created using OpenStreetMap. Ten building shape templates (E, F, H, I, L, O, T, U, Y, Z) were retrieved from this dataset for experimental building shape retrieval. The top nine similar building shapes for each template and their edit distances are listed below. Figure 14 As shown, the retrieved shapes are visually similar to the template, indicating that GED can represent region features and demonstrating the effectiveness of applying the GED method to the retrieval task. Furthermore, the retrieved shapes have different orientations, indicating that the GED method has high rotation invariance.

[0204] Please refer to Figure 15This paper compares the performance of the GED method of this invention with that of state-of-the-art artificial intelligence methods (GCAE and LineStringNet) in building shape retrieval experiments, listing the top 5 retrieved buildings and their quantitative metrics. The results show that, compared with GCAE and LineStringNet, the shapes retrieved by the GED method are more consistent with human cognition, especially in the F, T, and Z shape classes. Furthermore, the GED method exhibits high stability and can be considered a reliable choice for retrieval tasks.

[0205] Based on the retrieval experiment, this invention designed a cognitive experiment to compare the differences between the method of this invention and human cognition, and used a ratio model to measure the matching of cognitive results:

[0206]

[0207] Where S(a,b) represents the similarity between the GED method and human cognitive results, and A and B represent the sets of buildings retrieved through GED-based and human methods, respectively.

[0208] The experiment selected a block in the dataset and used the GED algorithm to select E-type, H-type, and Z-type buildings with a map editing distance of less than a certain threshold. Then, 10 GIS researchers were invited to select buildings similar to the template in the same experimental area.

[0209] Please refer to Figure 16 The present invention also provides a terminal, which includes a processor 301 and a memory 302; wherein, when the processor 301 runs a computer program, it implements the building outline similarity measurement method of any embodiment of the present invention, and the memory 302 stores instructions and data.

[0210] In some embodiments of the present invention, the memory 302 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 302 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0211] The processor 301 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 the processor 301 or by instructions in software form. The processor 301 can be a general-purpose processor, 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 can 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 modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 302, and the processor 301 reads the information in memory 302 and, in conjunction with its hardware, completes the steps of the above method.

[0212] In some embodiments, the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0213] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.

[0214] Another embodiment of the present invention provides a computer storage medium storing an executable program. When the executable program is executed by a processor 301, it can implement the steps of an information processing method applied to the terminal. For example, such as... Figures 1-10 One or more of the methods shown.

[0215] In some embodiments, the computer storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0216] It should be noted that the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.

[0217] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included 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.

Claims

1. A method for measuring the similarity of building outlines, characterized in that, The method includes: Extract the vector outline of the building and convert it into a ring graph model; wherein the ring graph model includes vertices; The circular graph model is split into a chain graph model; wherein the chain graph model includes a set of directed chains; Define the editing cost corresponding to the editing operation of the vertex using geometric transformations; Define the set of edit operations for a pair of vertices of the chain graph model as an edit path, and the sum of the edit costs as the edit distance of the edit path; Constructing a vertex association graph using a pair of chain graph models includes: the edit paths forming a clique, and the edit distances forming the weights of the clique; the clique includes multiple associated vertices, and the edit costs forming the weights of the associated vertices; The maximum weight clique in the vertex association graph is obtained by using a heuristic retrieval algorithm. Determining the graph edit distance between a pair of vector contour maps using the graph edit distance formula and the maximum weight clique includes: Based on the weight of the maximum weight clique, the graph edit distance between a pair of vector contour maps is determined using the graph edit distance formula; wherein the graph edit distance formula is as follows: Furthermore, G1 and G2 represent the chain graph models of two buildings, U and V are the vertex sets of all vertices included in G1 and G2, respectively, and S is the set of replacements between vertices of G1 and G2 in the edit path; d u It is the edit cost of deleting vertex u. It is to delete vertices. The cost of editing; d v It is the edit cost of deleting vertex v. It is to delete vertices. The cost of editing; uv It is the edit cost of replacing vertex u with vertex v, (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph. It is the weight of the clique formed by the associated points (u,v)∈S; Output the graph edit distance to characterize the similarity between building outlines.

2. The method according to claim 1, characterized in that, The vector contour map includes: corner points, edges, local features of the corner points, and region features; converting the vector contour map into a ring map model includes: The corner points of the vector contour map are converted into vertices, and the edges are converted into edges, constructing an unweighted ring graph model. The ring graph model includes label information corresponding to each vertex, and the label information is used to store the local features and region features of the corner points. The label information L(v) is represented as follows: Among them, l prev (v) is the length of the edge line between corner point v and the adjacent previous corner point in a clockwise direction, l next R(v) is the length of the edge line between corner point v and the next adjacent corner point in the clockwise direction, and R(v) is the clockwise rotation angle formed by the corresponding vectors of the two edge lines, and R(v)∈[0,2π).

3. The method according to claim 1, characterized in that, The step of splitting the ring graph model into a chain graph model includes: Select one vertex from the ring graph model as the starting point for splitting; Given the corresponding link direction of the starting point, all vertices are sequentially and directed according to the link direction to form the corresponding directed chain; A chain graph model is constructed using a set of directed chains corresponding to all vertices in the ring graph model.

4. The method according to claim 1, characterized in that, The editing operations include replacement and deletion, and the editing cost corresponding to the editing operation of the vertex defined by geometric transformation includes: The replacement editing cost is determined based on the geometric transformations of the replacement between vertices in a pair of the chain graph models; wherein the geometric transformations of the replacement include: geometric shape differences and relative position differences; The deletion / editing cost is determined based on the geometric transformation of vertex deletion in the chain graph model.

5. The method according to claim 1, characterized in that, The method of constructing a vertex association graph using a pair of the chain graph models further includes: Directed connections are made between unconnected vertices in the directed chain, transforming the chain graph model into a set of transitive closures; The vertex association graph is constructed using two sets of transitive closures converted from the chain graph model.

6. The method according to claim 1, characterized in that, The step of using a heuristic retrieval algorithm to find the clique with the largest weight in the vertex association graph, and obtaining the maximum weight clique, includes: Based on the aforementioned vertex association graph, initialize a clique; Based on the weights of the associated points, the associated points in the initialized clique are compared and replaced row by row to determine the local optimum.

7. A device for measuring the similarity of building outlines, characterized in that, The device includes: The acquisition module is used to extract the vector outline of the building and convert the vector outline into a ring diagram model; wherein the ring diagram model includes vertices; A processing module is used to split the ring graph model into a chain graph model; wherein the chain graph model includes a set of directed chains; The processing module is also used to define the editing cost corresponding to the editing operation of the vertex using geometric transformation; The processing module is further configured to define a set of editing operations for a pair of vertices of the chain graph model as an editing path, and the sum of the editing costs is the editing distance of the editing path; The processing module is further configured to construct a vertex association graph using a pair of the chain graph models, including: the edit paths forming a clique, the edit distances forming the weights of the clique; the clique comprising multiple associated points, the edit costs forming the weights of the associated points; The processing module is also used to retrieve the clique with the largest weight in the vertex association graph using a heuristic retrieval algorithm, and obtain the maximum weight clique; The processing module is further configured to determine the graph edit distance between a pair of vector contour maps using the graph edit distance formula and the maximum weight clique, including: Based on the weight of the maximum weight clique, the graph edit distance between a pair of vector contour maps is determined using the graph edit distance formula; wherein the graph edit distance formula is as follows: Furthermore, G1 and G2 represent the chain graph models of two buildings, U and V are the vertex sets of all vertices included in G1 and G2, respectively, and S is the set of replacements between vertices of G1 and G2 in the edit path; d u It is the edit cost of deleting vertex u. It is to delete vertices. The cost of editing; d v It is the edit cost of deleting vertex v. It is to delete vertices. The cost of editing; uv It is the edit cost of replacing vertex u with vertex v, (d u +d v -s uv ) represents the weight of the associated point (u,v) in the vertex association graph. It is the weight of the clique formed by the associated points (u,v)∈S; The output module is used to output the graph editing distance, which is used to characterize the similarity between building outlines.

8. A terminal, characterized in that, The terminal includes a processor and a memory for storing a computer program capable of running on the processor; wherein, when the processor runs the computer program, it implements the building outline similarity measurement method of any one of claims 1-6.

9. A computer-readable storage medium having computer-executable instructions thereon, characterized in that, The computer-executable instructions are executed by a processor to implement the building outline similarity measurement method of any one of claims 1-6.