Image processing recognition method based on building group similarity
By converting building group data into graphical representations and using Graph2vec algorithm, the shortcomings of large-scale complex urban data analysis in the existing technology are solved, and accurate identification and classification of building group patterns are achieved, and data processing efficiency and accuracy are improved. , supports complex urban planning and architectural design decisions.
Patent Information
- Application Number
- CN202410532128.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-04-29
AI Technical Summary
The prior art is difficult to effectively process and explain patterns and relationships in large-scale complex urban data in building group analysis, and ignores the spatial and functional connections between buildings, resulting in an incomplete understanding of the structural characteristics of building group.
By converting building group data into graphical representations, using graph embedding algorithms such as Graph2vec, the similarity between the vector representations is extracted and the similarity between the vector representations is calculated to achieve automatic identification and classification of building group patterns.
It improves the processing efficiency and analysis accuracy of building community data, captures complex relationships and high-order neighborhood information, enhances the accuracy of classification and pattern recognition, and supports more complex urban planning and architectural design decisions.
Smart Images

Figure CN118351376B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building image processing and analysis, and in particular to an image processing and recognition method based on building group similarity. Background Art
[0002] In the field of urban planning and architectural design, the analysis and classification of building groups is a crucial task, which supports planning decisions, historical preservation, resource management and other needs. Traditionally, the analysis of building groups relies on manual methods or simple digital tools, which can usually only handle a limited amount of data and have difficulty in effectively processing and interpreting patterns and relationships in large-scale complex urban data.
[0003] In addition, existing technologies often ignore the spatial relationships and functional connections between buildings when processing building data, which limits the comprehensive understanding of the structural characteristics of building groups. These technologies usually rely on intuitive judgment or basic statistical analysis, lacking in-depth exploration of the complex interactions and spatial dynamics of building groups. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides an image processing and recognition method based on building group similarity, which realizes automatic recognition and classification of building group patterns by converting building group data into a graphical representation and using a graph embedding algorithm and similarity calculation.
[0005] To achieve the above objectives, the present invention is implemented by the following technical scheme: an image processing and recognition method based on building group similarity comprises the following steps:
[0006] Convert building group data into graphical representations;
[0007] Extract characteristics from building groups, including but not limited to size, orientation, shape, and density;
[0008] Use graph embedding algorithms to convert graph data into vector representations;
[0009] Similarities between the vector representations are calculated to identify and classify building group patterns.
[0010] Preferably, the graphical representation includes constructing a graph of nodes and edges, wherein each node represents a building, and the edges reflect the relationship between buildings based on spatial location and functional attributes, as well as the relative position and connectivity between a building and its neighboring buildings.
[0011] Preferably, the graph embedding algorithm is a Graph2vec algorithm, which processes nodes in a graph and their corresponding high-order neighborhood information to learn a low-dimensional vector representation of a graph representing a group of buildings.
[0012] Preferably, the steps of the Graph2vec algorithm include:
[0013] Define the concept of a rooted subgraph, which is formed around each node in the graph and includes the neighbor nodes directly connected to the node;
[0014] Generate a unique identifier for each rooted subgraph to represent the subgraph in the neural network model;
[0015] A neural network model is used to learn the vector representation of the graph through an embedding layer and multiple hidden layers. The optimization goal is to maximize the joint probability distribution of all rooted subgraphs of a given graph.
[0016] Preferably, the neural network model uses a softmax function as an output layer, by which the conditional probability of a specific rooted subgraph in a given graph to which it belongs is calculated, thereby training the model to accurately identify and represent the structural characteristics of a building complex.
[0017] Preferably, the similarity calculation step includes:
[0018] Compute the inner product between the vector representations of each building group graph;
[0019] Calculate the modulus of each vector and use these moduli to normalize the inner product results to get the cosine similarity value;
[0020] The building groups are classified according to the obtained cosine similarity values, and the building groups with high similarity are classified as the same or similar types.
[0021] Preferably, the feature extraction step further comprises:
[0022] Use machine vision technology to automatically extract geometric and structural features from building group images, including but not limited to the building's height, area, volume, and exterior design;
[0023] Analyze the extracted features using statistical learning methods to identify the main architectural trends and patterns in the building population;
[0024] Combining the above extracted features with the topological structure of the graph, a comprehensive feature vector representing the building group is generated.
[0025] The present invention also provides an image processing and recognition device based on building group similarity, comprising:
[0026] a data processing module for converting building group data into a graphical representation;
[0027] A feature extraction module, used to extract features from graphic data;
[0028] a graph embedding module configured to convert graph data into a vector representation using a graph embedding algorithm;
[0029] The similarity calculation module is used to calculate the similarity between the vector representations to identify and classify building group patterns.
[0030] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the above method is implemented.
[0031] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0032] The present invention provides an image processing and recognition method based on the similarity of building groups. It has the following beneficial effects:
[0033] 1. The present invention can process and analyze a large amount of building data more effectively by converting complex building group data into graphical representation. The graph embedding algorithm further converts the graph data into low-dimensional vectors, which simplifies the data processing flow and improves the processing speed.
[0034] 2. By using the Graph2vec algorithm, the present invention can capture the complex relationships and high-order neighborhood information in the building group, and the generated vector representation is rich in structural information. This makes the similarity calculation more accurate and improves the accuracy of building group classification and pattern recognition.
[0035] 3. Through accurate classification and pattern recognition of building groups, the present invention supports urban planners and architectural designers in making more complex decisions and planning. For example, it can identify specific commercial areas, residential areas or mixed-use areas, providing data support for urban development, transportation planning and resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0037] Figure 2 It is a schematic diagram of the structural data of the building complex diagram of the present invention;
[0038] Figure 3 It is a schematic diagram of the structure of the device of the present invention;
[0039] Figure 4 It is a schematic diagram of the computer device structure of the present invention.
[0040] Among them, 100, data processing module; 200, feature extraction module; 300, graph embedding module; 400, similarity calculation module; 40, computer equipment; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] See also Figure 1-Figure 4 The embodiment of the present invention provides an image processing and recognition method based on building group similarity, comprising the following steps:
[0043] S1, converting building group data into graphical representation;
[0044] In this step, we first need to collect data on the building group, including but not limited to the building's geographic location information, structural characteristics, usage type, historical data, etc. These data are converted into a graph through preprocessing, where each building is regarded as a node, and the edges between nodes represent the physical distance or functional connection between buildings. This graphical representation not only reflects the attributes of a single building, but also reflects the relationship between buildings, providing a basis for subsequent analysis.
[0045] In this embodiment, the process of converting the building group data into a graphical representation specifically includes the following steps:
[0046] Step 1: Data collection and preprocessing
[0047] In this phase, detailed information about buildings is first collected from multiple data sources. This includes the building's location, size (area, height), purpose (residential, commercial, educational, etc.), year of construction, and architectural style. The collected data is formatted and cleaned through preprocessing steps to ensure data consistency and integrity, laying the foundation for subsequent graphics processing.
[0048] The preprocessing process includes:
[0049] 1. Outlier handling: Use statistical methods to identify and handle outliers, for example, perform box plot analysis on building data to identify and remove data points that are outside the normal range.
[0050] 2. Missing data handling: adopt appropriate filling strategies for missing data, such as using the average value of the building type or area, or applying more complex interpolation methods such as k-nearest neighbor (k-NN) interpolation.
[0051] 3. Data normalization: Normalize the data to eliminate the effects of different magnitudes, using methods such as Z-score normalization (converting the data to a distribution with a mean of 0 and a standard deviation of 1) or min-max normalization (adjusting the data to between 0 and 1).
[0052] Step 2: Geometric modeling and spatial modeling
[0053] In geometric modeling, the geometric shape, volume, and appearance characteristics of each building are recorded and digitized in detail for use as node attributes in the graph. Spatial modeling focuses on the interaction of buildings with their surroundings, such as their location relative to parks, commercial areas, and other urban facilities. This information is used to construct edges between nodes in the graph, representing the physical distances and functional relationships between buildings.
[0054] Step 3: Dynamic construction of the graph
[0055] In this step, the graph constructed is not static, but dynamically adjusted based on newly acquired data or updates to existing data. This includes adding or removing nodes and edges based on the addition, modification, or removal of buildings. Dynamic construction allows the graph representation to evolve as the city grows and buildings change, thereby continuously and accurately reflecting the current state of the city.
[0056] Step 4: Data fusion and integration
[0057] In order to ensure the comprehensiveness and accuracy of the graphic representation, it is essential to fuse and integrate data from different sources. This involves combining satellite image data, municipal archives and field survey data, etc., and integrating these multi-dimensional data through advanced data processing technology. The integrated data improves the information integrity and analytical depth in the pattern recognition process.
[0058] As a data structure for representing objects and their relationships, a graph is usually represented as G = {V, E, W}, where V = {V1, V2, ... Vn} represents a set of nodes, E represents a set of edges connecting the nodes, and W represents the weight of the edge.
[0059] When establishing a group relationship representation model, various geometric models can be selected to achieve quantitative and formal expression of building groups, such as Delaunay triangle network, MST and K nearest neighbor graph. Since MST has a strong ability to express relative spatial positions and relationships. Therefore, in this embodiment, MST is used to construct the building group graph structure data, such as Figure 2 shown.
[0060] S2, extracting features from the building group, including but not limited to size, orientation, shape and density;
[0061] Using the graph data, this step further analyzes and extracts key features of each node (building), including size (e.g., area, height), orientation, shape (e.g., rectangular, circular), and density (e.g., the ratio of building footprint to total floor space). In addition, the building's usage type (e.g., residential, commercial, industrial, etc.) can also be considered, and these features are helpful for subsequent pattern recognition and classification.
[0062] In this embodiment, the core of this step is to analyze the data of the building and extract key features from it for subsequent graph embedding processing. Feature extraction not only focuses on the basic attributes of the building, but also includes deeper features related to its function and structure.
[0063] Specifically, feature extraction includes geometric feature extraction, structural feature extraction, functional feature extraction and environmental feature extraction.
[0064] Among them, geometric feature extraction includes:
[0065] Dimensional features: Automatically extract dimension-related data such as building height, number of floors, and total floor area, and perform quantitative analysis using high-resolution geospatial data.
[0066] Shape features: The exterior design of a building is analyzed through image recognition technology to extract its basic geometric shapes (such as rectangles, circles, etc.), as well as appearance features such as facade design and style elements.
[0067] Among them, structural feature extraction includes:
[0068] Structural Materials: Identify the primary construction materials used in a building, such as concrete, steel, or wood, using infrared scanning and spectral analysis techniques to determine the material type.
[0069] Building Technology: Collects information about building construction technology, such as whether the building is framed or has load-bearing walls, obtained by accessing public building records and construction documents.
[0070] Among them, functional feature extraction includes:
[0071] Use classification: Classification of buildings based on their actual use, such as residential, commercial, educational, etc., is done by analyzing urban planning records and geo-tagging data.
[0072] Accessibility and accessibility: Assessing the accessibility of a building to different user groups (e.g. people with disabilities), including entrance accessibility and internal mobility.
[0073] Among them, environmental feature extraction includes:
[0074] Surrounding Environment: Analyze the relationship between the building and its surrounding environment, such as its distance and connectivity to major roads, parks or commercial facilities, and use Geographic Information System (GIS) technology for detailed mapping.
[0075] Historical and cultural background: Gather historical and cultural information about buildings, especially those with historic preservation value, through research through historical documents and cultural heritage records.
[0076] As an embodiment of the present invention, the feature extraction step further includes:
[0077] 1. Automatic extraction of geometric and structural features:
[0078] Use advanced machine vision technology to automatically extract geometric and structural features of buildings from images of building groups. This includes the building's height, area, volume, and exterior design. Use image processing algorithms such as edge detection, shape recognition, and texture analysis to accurately identify and quantify these features from image data.
[0079] 2. Statistical learning analysis of features:
[0080] The extracted features are then further analyzed using statistical learning methods to identify the main architectural trends and patterns in the building population. Methods such as cluster analysis, principal component analysis (PCA), and factor analysis are applied to extract meaningful patterns and trends from the data, revealing universal characteristics of building design and function.
[0081] 3. Generation of comprehensive feature vector:
[0082] The geometric and structural features extracted from the image are combined with the topological structure of the graph to generate a comprehensive feature vector representing the entire building complex. This step uses multi-dimensional scaling (MDS) or other dimensionality reduction techniques to integrate multi-source features into a unified vector space, ensuring that the vector can fully reflect the physical properties and spatial relationships of the building complex.
[0083] S3, convert graph data into vector representation using graph embedding algorithm;
[0084] The Graph2vec algorithm is used to process graph data to learn and generate low-dimensional vector representations of each building group. Graph2vec effectively captures and encodes complex spatial relationships and pattern features between buildings by considering the high-order neighborhood structure in the graph. Through the neural network model, this step not only achieves dimensionality reduction of the data, but also retains key topological and attribute information, making similar building groups close to each other in the vector space.
[0085] In this embodiment, the Graph2vec algorithm is used to convert the graph data of the building group into a low-dimensional vector representation to support complex graph data analysis and pattern recognition.
[0086] Graph2vec was chosen because it can effectively learn the information of nodes and their high-order neighborhoods in the graph, and transform the complex graph structure into an information-rich low-dimensional vector. The algorithm is suitable for processing complex relationships and patterns in building group data.
[0087] The steps of the Graph2vec algorithm include:
[0088] 1. Define a rooted subgraph:
[0089] The core of the Graph2vec algorithm is to define and utilize rooted subgraphs. Rooted subgraphs are formed around each node in the graph and include neighboring nodes directly connected to the node. This approach enables the algorithm to capture unique information about each node and its local structure. Graph model based on Graph2vec. As a key task in the Graph2vec model, this embodiment strictly extracts the generation of rooted subgraphs around each node according to the definition, as shown in Figure *.
[0090] 2. Generate a unique identifier for the subgraph:
[0091] A unique identifier is generated for each rooted subgraph, and these identifiers represent the individual subgraphs in the neural network model. In this way, the neural network can distinguish and learn the characteristics of different parts of the graph.
[0092] 3. Training of neural network model:
[0093] A neural network model containing an embedding layer and multiple hidden layers is used to learn the vector representation of the graph. The goal of model training is to maximize the joint probability distribution of all rooted subgraphs of a given graph, thereby optimizing the vector to accurately express the structure and relationship in the graph. The training goal of the model is to maximize the joint probability distribution of all rooted subgraphs of a given graph, which is achieved through the softmax function of the output layer.
[0094] The output layer of the neural network model uses the softmax function to calculate the conditional probability of a specific rooted subgraph in the graph to which it belongs. This calculation helps the model accurately identify and express the structural characteristics of the building group, so that each vector representation can effectively reflect the characteristics of its corresponding building group.
[0095] The trained vector representation is used for a variety of graph analysis tasks, such as graph similarity comparison, node classification, or more complex graph analysis tasks. These applications show that vectorized graph data not only provides powerful structural information, but also enhances the depth and accuracy of data analysis. The Graph2vec algorithm provides efficient graph data processing capabilities and high-precision structural information capture, making graph analysis more accurate and effective. Vectorized graph data is easy to integrate with other machine learning algorithms, expanding its application range.
[0096] S4, calculating the similarity between vector representations to identify and classify building group patterns;
[0097] The final step is to calculate the similarity between different building group vectors using the cosine similarity metric. Building groups with high similarity can be classified into types with similar functions or structures. This method can effectively identify and classify building group patterns in urban environments, such as identifying specific commercial areas, residential areas, or mixed-use areas.
[0098] In this embodiment, the vector representation obtained from the graph embedding algorithm is used to calculate the similarity, and the building group patterns are identified and classified accordingly. This step is the key to understanding and utilizing building data, supporting more accurate urban planning and building analysis.
[0099] The specific method of similarity calculation includes the following steps:
[0100] 1. Inner product calculation:
[0101] First, the inner product between the vector representations of each building group graph is calculated. The inner product is a mathematical method to measure the directional consistency of two vectors in space, which can intuitively reflect the similarity between the structural characteristics of two building groups.
[0102] 2. Modulus length calculation and normalization:
[0103] Next, calculate the magnitude of each vector. The magnitude is the size or length of a vector and reflects the magnitude of the vector in its direction.
[0104] Use these moduli to normalize the inner product result, that is, divide the inner product result by the product of the two vector moduli to get the cosine similarity value. This step is an important part of the normalized similarity calculation, ensuring that the similarity value is between -1 and 1, where 1 represents the exact same direction, 0 represents orthogonal, and -1 represents the exact opposite direction.
[0105] 3. Similarity classification:
[0106] According to the calculated cosine similarity values, the building groups are classified. Building groups with high similarity are considered to be the same or similar types, which is important for discovering building patterns and groups in the city.
[0107] Through efficient vector similarity calculation, building groups with similar structural features can be quickly identified, supporting complex urban analysis and planning tasks. This method not only improves the efficiency of data processing, but also enhances the accuracy and reliability of building group classification.
[0108] The present invention can process and analyze a large amount of building data more effectively by converting complex building group data into a graphical representation. The graph embedding algorithm further converts the graph data into a low-dimensional vector, which simplifies the data processing flow and improves the processing speed.
[0109] At the same time, by using the Graph2vec algorithm, the present invention can capture the complex relationships and high-order neighborhood information in the building group, and the generated vector representation is rich in structural information. This makes the similarity calculation more accurate and improves the accuracy of building group classification and pattern recognition.
[0110] Through accurate classification and pattern recognition of building groups, the present invention supports urban planners and architectural designers in making more complex decisions and planning. For example, it can identify specific commercial areas, residential areas or mixed-use areas, providing data support for urban development, transportation planning and resource allocation.
[0111] In short, the present invention not only improves the efficiency and accuracy of data processing and analysis, but also provides strong support for multiple fields such as urban planning, architectural design, historical preservation, etc., making related decisions more scientific and accurate.
[0112] The image processing and recognition device based on building group similarity described below and the image processing and recognition method based on building group similarity described above can be referred to each other.
[0113] Please refer to the attached Figure 4 The present invention also provides an image processing and recognition device based on building group similarity, comprising:
[0114] a data processing module for converting building group data into a graphical representation;
[0115] A feature extraction module, used to extract features from graphic data;
[0116] a graph embedding module configured to convert graph data into a vector representation using a graph embedding algorithm;
[0117] The similarity calculation module is used to calculate the similarity between vector representations to identify and classify building group patterns.
[0118] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, which will not be repeated here.
[0119] Please refer to the attached Figure 4 The present invention further provides a computer device 40, comprising: a processor 41 and a memory 42, wherein the memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, the above method is executed.
[0120] The present invention further provides a storage medium 43 on which a computer program is stored. When the computer program is run by the processor 41, the above method is executed.
[0121] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0122] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An image processing and recognition method based on building group similarity, characterized in that: The following steps are involved: Convert building group data into graphical representations; Extract characteristics from building groups, including size, orientation, shape, and density; Use graph embedding algorithms to convert graph data into vector representations; calculating similarities between the vector representations to identify and classify building group patterns; The graphical representation includes constructing a graph of nodes and edges, each node representing a building, and the edges reflecting the relationship between buildings based on spatial locations and functional attributes, as well as the relative location and connectivity between the buildings and their neighboring buildings; The graph embedding algorithm is the Graph2vec algorithm, which processes the nodes in the graph and their corresponding high-order neighborhood information to learn a low-dimensional vector representation of the graph representing the building group; The steps of the Graph2vec algorithm include: Define the concept of a rooted subgraph, which is formed around each node in the graph and includes the neighbor nodes directly connected to the node; Generate a unique identifier for each rooted subgraph to represent the subgraph in the neural network model; Use a neural network model to learn the vector representation of the graph through an embedding layer and multiple hidden layers. The optimization goal is to maximize the joint probability distribution of all rooted subgraphs of a given graph. The neural network model uses a softmax function as an output layer, through which the conditional probability of a specific rooted subgraph in a given graph to which it belongs is calculated, thereby training the model to accurately identify and represent the structural characteristics of building groups.
2. The image processing and recognition method based on building group similarity according to claim 1 is characterized in that: The similarity calculation steps include: Compute the inner product between the vector representations of each building group graph; Calculate the modulus of each vector and use these moduli to normalize the inner product results to get the cosine similarity value; The building groups are classified according to the obtained cosine similarity values, and the building groups with high similarity are classified as the same or similar types.
3. The image processing and recognition method based on building group similarity according to claim 1, characterized in that: The feature extraction step further includes: Use machine vision technology to automatically extract geometric and structural features from building group images, including building height, area, volume and exterior design; Analyze the extracted features using statistical learning methods to identify the main architectural trends and patterns in the building population; Combining the above extracted features with the topological structure of the graph, a comprehensive feature vector representing the building group is generated.
4. An image processing and recognition device based on building group similarity, implementing the method according to any one of claims 1 to 3, characterized in that: include: a data processing module for converting building group data into a graphical representation; A feature extraction module, used to extract features from graphic data; a graph embedding module configured to convert graph data into a vector representation using a graph embedding algorithm; The similarity calculation module is used to calculate the similarity between the vector representations to identify and classify building group patterns.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Company similarity calculation method based on graph vector
CN114818980A
