Old cell identification method combining transfer learning and graph neural network
By combining transfer learning and graph neural networks, and constructing a spatial graph network using multi-source data, the problem of insufficient cross-regional generalization ability of old residential communities is solved, achieving efficient and accurate identification of old residential communities, reducing model deployment costs, and adapting to specific patterns in different cities.
Patent Information
- Application Number
- CN202511863066.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-02-27
AI Technical Summary
Existing technologies are difficult to effectively identify old residential areas, especially due to insufficient cross-regional generalization capabilities. Furthermore, relying on visual data results in high costs, data quality that is easily affected by weather and time, and difficulty in capturing deep-seated socio-economic attributes.
By combining transfer learning and graph neural networks, a spatial graph network is constructed using multi-source data (remote sensing, social perception, and building footprint). The weights between nodes are calculated through a graph attention network to capture local spatial connections and global topological information. A transfer learning model is then built to identify old residential communities.
It achieves efficient and accurate identification of old residential areas, reduces model deployment costs, improves cross-domain identification capabilities, adapts to specific patterns in different cities, and provides identification paths in areas with scarce data.
Smart Images

Figure CN121580187A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an old community identification method combining transfer learning and graph neural network. BACKGROUND
[0002] Old community refers to residential community built earlier and with lower construction standards. The state has clearly defined that the residential community built before 2000, with backward public facilities and affecting the basic life of residents, often has typical characteristics such as imperfect supporting and management, safety hazards, and poor environmental sanitation conditions. Old community comprehensive reconstruction is the key to realizing urban renewal and high-quality development, and is of great significance to realizing new urbanization, promoting economic internal circulation, and improving urban quality. In recent years, the state has introduced a number of policies to promote the reconstruction of old residential communities and pilot work to improve the sense of gain and happiness of the people. Systematically mastering the spatial distribution and scale characteristics of old communities has important theoretical value and practical significance for urban governance, spatial optimization, and urban renewal.
[0003] In addition to statistical surveys, the identification of old communities mainly relies on visual data, including remote sensing images and street view images. In remote sensing images, old communities exhibit unique spectral, texture, and structure characteristics, while in street view images, they have different facade and environment scene characteristics from newly built communities. Although visual data is direct, widely applicable, and has high recognition accuracy, it also has many limitations, such as high cost of high-resolution image acquisition, data quality easily affected by weather and time, and possible incomplete spatial coverage. Visual data mainly reflects the surface and morphological characteristics of buildings, making it difficult to capture the deep social and economic attributes of buildings, and the differences between old communities in different regions also result in poor cross-regional generalization ability of recognition models relying on visual data.
[0004] Currently, there is no effective solution to the problems in the related art. SUMMARY
[0005] To overcome the above technical problems existing in the prior art, the present application proposes an old community identification method combining transfer learning and graph neural network.
[0006] To this end, the specific technical solutions adopted by the present application are as follows:
[0007] An old community identification method combining transfer learning and graph neural network comprises:
[0008] Obtaining multi-source remote sensing data, social perception data and building footprint data of a sample area; the multi-source remote sensing data includes built-up area boundary data and high-resolution remote sensing image data, which are used to determine whether the sample area is an old community; the social perception data includes OSM road network data, POI interest point data and house attribute data, which are used to divide the sample area into independent plots; the building footprint data includes building contour data and building height data, which are used to construct two-dimensional and three-dimensional morphological features of buildings;
[0009] Based on the built-up area boundary data, the high-resolution remote sensing image data and the OSM road network data, the sample area is spatially divided into units to obtain the basic evaluation unit of the block; based on the POI interest point data, the house attribute data, the building contour data and the building height data, the feature index of the block is constructed;
[0010] Based on the basic evaluation unit of the block, taking the plots in the sample area as nodes, a spatial adjacency graph network is constructed by using the Delaunay triangulation algorithm, and the feature index is embedded into the corresponding nodes of the graph network to construct a spatial graph network;
[0011] Using a graph attention network, the weight between nodes of the spatial graph network is calculated through neighborhood sampling and feature aggregation mechanism, and the attention coefficient of each pair of connected nodes is calculated to capture local spatial contact and global topological information, and the identification result of the old community is output;
[0012] Based on the graph attention network, a source domain model is trained, a domain adaptation strategy is used to construct a transfer learning model, and the identification performance of the transfer learning model is evaluated by using the accuracy parameter.
[0013] Further, the construction of the feature index of the block based on the POI interest point data, the house attribute data, the building contour data and the building height data includes:
[0014] Based on the POI interest point data and the house attribute data, the urban function features and building attribute features of POI density, building age and house price are constructed;
[0015] Based on the building contour data and the building height data, the two-dimensional morphological features and three-dimensional morphological features of building coverage, building volume ratio, building form index and spatial congestion degree are constructed.
[0016] Further, based on the basic evaluation unit, taking the plots in the sample area as nodes, a spatial adjacency graph network is constructed by using the Delaunay triangulation algorithm, and the feature index is embedded into the corresponding nodes of the graph network to construct a spatial graph network, which includes:
[0017] Taking the plots in the sample area as nodes, a triangular network is generated among the nodes according to the maximum empty circle criterion based on the principle of spatial proximity through a Delaunay triangulation algorithm;
[0018] The edge connection relationship existing in the triangular network is converted into an edge in a graph structure, and the spatial distance between nodes is taken as an edge attribute, so as to construct a graph network reflecting the spatial adjacency relationship;
[0019] The POI density, building age, house price, building coverage rate, building volume rate, building form index and spatial congestion degree are pretreated by using a Z-score standardization algorithm to eliminate the dimensional influence;
[0020] The pretreated POI density, building age, house price, building coverage rate, building volume rate, building form index and spatial congestion degree are embedded into the nodes of the corresponding graph network, so as to form a spatial graph network.
[0021] Further, the graph attention network is used to calculate the weight between the nodes of the spatial graph network through neighborhood sampling and feature aggregation mechanism, and the attention coefficient of each pair of connected nodes is calculated, so as to capture the local spatial contact and global topological information, and output the identification result of the old community, including:
[0022] The graph attention network is constructed by using an inductive graph neural network as a framework and combining an attention mechanism for training;
[0023] In one cycle, a linear transformation is adopted in the input layer of the graph attention network, a fully connected layer is constructed, and an initial weight matrix is automatically generated;
[0024] Based on the initial weight matrix, the pretreated POI density, building age, house price, building coverage rate, building volume rate, building form index and spatial congestion degree are taken as new features of the nodes;
[0025] The attention coefficient weight of each pair of adjacent nodes in the new features of the nodes is calculated through a LeakyReLU nonlinear activation function, and the attention coefficient weight of each pair of adjacent nodes is normalized by using a softmax function, so as to obtain the normalized attention weight;
[0026] The features of the neighbor nodes are aggregated by using an aggregator through a weighted summation method, and the identification probability of the old community is obtained by combining a sigmoid activation function;
[0027] The multi-head attention mechanism is repeatedly cycled, different initial weight matrices are used for POI density, building age, house price, building coverage, building volume rate, building form index and space congestion degree, different recognition probabilities are obtained, the average results of different recognition probabilities are input into the output layer of the graph attention network, the recognition results of the old community are obtained, and the learning process of the graph attention network is stabilized and the expression ability is enhanced.
[0028] Further, the calculation formula of the attention coefficient weight is:
[0029] ;
[0030] In the formula, denotes the attention coefficient of node i and node j; denotes the learnable attention weight matrix; and denote the node feature vectors obtained by linear transformation; || denotes the splicing of the feature vectors; denotes the trainable coefficient; denotes the prior correlation strength represented by the prior weight; LeakyReLU denotes a nonlinear activation function.
[0031] Further, the calculation formula of the normalized attention weight is:
[0032] ;
[0033] In the formula, denotes the normalized attention weight; denotes the attention weight of the neighbor node i and the target node; n denotes the number of neighbor nodes; denotes the attention coefficient.
[0034] Further, the source domain model is trained based on the graph attention network, a domain adaptation strategy is used to construct a transfer learning model, and the recognition performance of the transfer learning model is evaluated by using the accuracy Accuracy parameter, which includes:
[0035] The graph neural network trained in the source domain city is divided into a spatial feature learner for extracting the multi-source spatial features of the general old community, and an old community recognizer for adjusting according to the specific circumstances of the target domain city and its features;
[0036] The domain discriminator is introduced, the labeled source domain city features and the unlabeled target domain city features are jointly input into the domain discriminator, and the city features are distinguished from the labeled source domain city features or the target domain city features through a binary cross-entropy loss function, so that the spatial feature learner can gradually eliminate the feature difference between the source domain city and the target domain city based on the city feature essential space feature mode in the training;
[0037] The regularization loss function is introduced to constrain the continuity of adjacent nodes in the feature space to maintain the spatial structure and prevent overfitting;
[0038] The phased training mechanism is used to balance the transfer efficiency and accuracy to realize the feature distribution alignment of the source domain city features and the target domain city features;
[0039] Based on the feature alignment result, the classification loss, the adversarial loss and the regularization loss are weighted and summed to form a total loss function to improve the old community recognition accuracy of the target city;
[0040] The source domain city samples are mainly used, and a small amount of target city samples are added to form a total of 300 sample sets, and the training samples, the verification samples and the test samples are divided according to the ratio of 7:1:2 to construct a transfer learning model to realize the old community recognition of the target domain city;
[0041] The transfer learning model recognition situation based on the test sample is compared with the annotation situation of the verification sample, the accuracy is the ratio of the number of test samples correctly recognized as old communities or non-old communities to the total number of test samples, and the higher the ratio represents the higher the recognition accuracy of the transfer learning model.
[0042] Further, the calculation formula of the binary cross-entropy loss function is:
[0043] ;
[0044] In the formula, represents the cross-entropy loss value of a certain space feature; represents the source of the space feature; represents the probability that the transfer learning model predicts that the feature sample belongs to the source domain.
[0045] Further, the calculation formula of the regularization loss function is:
[0046] ;
[0047] In the formula, represents the regularization term loss function; represents a pair of connected nodes in the graph structure; represents a set of edges in the graph structure; denote the weight of an edge; denote a spatial feature learner.
[0048] Further, the total loss function is calculated as follows:
[0049] ;
[0050] In the formula, denote the total loss function, , , denote the classification loss, the adversarial loss and the regularization term loss, respectively; and denote the hyperparameters for balancing different losses in the autonomous training of the transfer learning model.
[0051] The beneficial effects of the present application are:
[0052] 1) The present application proposes an old community intelligent identification method combining transfer learning TL and graph neural network GNN by fusing satellite remote sensing, social perception, building footprint and other multi-source data. The method not only can utilize graph structure to model the complex correlation between urban entities, but also can realize efficient inter-domain generalization of knowledge while preserving the structured knowledge of the source domain, so as to realize efficient, accurate and scalable old community identification, and provide technical support for urban renewal decision and spatial governance practice.
[0053] 2) The present application shows unique advantages in old community identification through social perception data and building footprint data. Social perception data mainly includes POI data, mobile signaling data, social media data, etc., which can represent human activity intensity, behavior patterns, living environment, etc., and has the advantages of multi-channel availability, high spatio-temporal resolution and low acquisition cost. Building footprint data includes geometric information such as building contour, height and shape, which can be easily obtained through open source map API, and can accurately quantify the typical characteristics of old communities in spatial form, such as building density, spatial layout, building height, etc. The combination of social perception and building footprint data not only provides more comprehensive information for the feature description of old communities from the aspects of urban function and physical form, but also shows significant advantages in data acquisition, computational efficiency and large-scale application.
[0054] 3) The application can directly learn features and reason relationships on graph structured data through a graph neural network (GNN). GNN takes urban space units such as blocks and grids as nodes, and spatial adjacency and spatial distance as edges. Through a message passing mechanism, it realizes the propagation and aggregation of neighborhood features, thereby establishing a graph topology of urban space. GNN has been successfully applied to the exploration of urban features with similar development patterns and functional attributes, avoiding the dependence on the existing independent and identically distributed assumption of data sets, so it can effectively capture the spatial dependence relationship and aggregation effect of old communities. At the same time, the GNN graph structure can adapt to irregular and complex spatial units. This modeling method considering spatial interaction can also take into account multi-scale spatial dependence relationships, and deeply understand the spatial organization rules of old communities from local neighborhoods to global networks.
[0055] 4) The application is based on the fact that there are significant differences in natural terrain, location conditions, spatial form, construction standards, development history and evolution rules in different cities, which leads to differences in architectural style, appearance and material of old communities in different cities, making the identification task of old communities in a large area face serious cross-domain challenges. That is, directly migrating the model trained in the source city to the target city will usually result in significant performance degradation such as domain shift, mainly due to the distribution difference of sample data in different regions. At the same time, building labeled samples and identification models of old communities in different cities also requires a lot of resources and computing cost. In addition, factors such as regional economic development level, urbanization process stage and local planning policy jointly affect the old communities, resulting in diverse social and economic characteristics and spatial distribution patterns. To address this challenge, the domain adaptation strategy based on transfer learning (TL) is a key technology. By designing a field-invariant feature extraction mechanism and a domain adaptation loss function, TL can learn common knowledge representation across cities while maintaining the ability to adapt to specific patterns in target cities. This cross-domain knowledge transfer mechanism not only reduces the deployment cost and data dependency of the model in new cities, but also provides a feasible path for the identification of old communities in areas where sample data is scarce or difficult to collect, thereby greatly improving the universality and practical value of the method. BRIEF DESCRIPTION OF DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, brief introductions will be given to the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0057] Figure 1is a flow chart of an old community identification method combining transfer learning and graph neural network according to an embodiment of the present application;
[0058] Figure 2 is a GAT graph neural network construction schematic diagram and a cross-domain old community identification schematic diagram of transfer learning according to an embodiment of the present application;
[0059] Figure 3 is a spatial distribution feature map of an old community identification result according to an embodiment of the present application;
[0060] Figure 4 is one of iteration-precision learning curve diagrams of a source domain city and a target domain city according to an embodiment of the present application;
[0061] Figure 5 is the second of iteration-precision learning curve diagrams of a source domain city and a target domain city according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] To further illustrate the embodiments, the present application provides drawings which are part of the disclosure of the present application, mainly used to illustrate the embodiments, and can be used to explain the operating principle of the embodiments in conjunction with the related description of the specification. Those of ordinary skill in the art should understand other possible implementations and advantages of the present application by referring to these contents. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0063] According to an embodiment of the present application, an old community identification method combining transfer learning and graph neural network is provided.
[0064] The present application will be further described in conjunction with the drawings and specific embodiments, as shown in Figure 1 An old community identification method combining transfer learning and graph neural network according to an embodiment of the present application includes:
[0065] Step S1, obtaining multi-source remote sensing data, social perception data and building footprint data of a sample area; the multi-source remote sensing data includes built-up area boundary data and high-resolution remote sensing image data, which are used to determine whether the sample area is an old community; the social perception data includes OSM road network data, POI interest point data and house attribute data, which are used to divide the sample area into independent plots; the building footprint data includes building contour data and building height data, which are used to construct two-dimensional and three-dimensional morphological features of buildings;
[0066] Specifically, the present application selects a certain area as the research area, which includes five cities, namely NJ city, ZJ city, CZ city, WX city and SZ city. The economic development and urban construction of this area started early, there are a large number of old communities, and it is also listed as a demonstration area of urban renewal. The research adopts three types of open source data such as remote sensing, social perception and building footprint.
[0067] The remote sensing data includes built-up area boundary data and high-resolution remote sensing image. The built-up area boundary data is used to divide the main range where the old community exists; the high-resolution remote sensing image is derived from Google high-resolution remote sensing image, with a resolution of about 2 meters, mainly used for auxiliary labeling of samples.
[0068] The social perception data includes OSM road network, POI interest point and house attribute data. OSM is derived from OpenStreetMap open street platform, which is used to divide the research area into independent blocks as the basic evaluation unit of the research. POI data is derived from the Gaode map open platform API, including its location, attribute, type and other information. The house attribute data is derived from the Anjuke real estate API, including building age and building price and other information.
[0069] The building footprint data is mainly derived from the CMAB data set (China Multi-Attribute Building Dataset), which contains building contour, building height and other basic information, which is used to construct the two-dimensional and three-dimensional morphological features of the building.
[0070] Step S2, based on the built-up area boundary data, high-resolution remote sensing image data and OSM road network data, the sample area is divided into spatial units to obtain the basic evaluation unit of the block; based on the POI interest point data, house attribute data, building contour data and building height data, the feature index of the block is constructed;
[0071] In this optional embodiment, the construction of the feature index of the block based on the POI interest point data, the house attribute data, the building contour data and the building height data includes:
[0072] Based on the POI interest point data and the house attribute data, the urban function features and the building attribute features of the POI density, the building age and the house price are constructed;
[0073] Based on the building contour data and the building height data, the two-dimensional morphological features and the three-dimensional morphological features of the building coverage, the building volume ratio, the building morphological index and the spatial congestion degree are constructed.
[0074] Specifically, in the feature extraction stage, spatial unit division is conducted based on OSM road network data and built-up area boundary data, and the obtained blocks are taken as the basic evaluation units. This study integrates multi-source data from four dimensions of urban function, building attribute, two-dimensional form, and three-dimensional form, and constructs seven feature indicators for identifying old communities, as follows:
[0075] 1) POI density (PD). Derived from the Gaode POI data, it is the number of POI points of each type per unit area, used to measure the spatial aggregation of facilities and urban vitality.
[0076] 2) Building age (BA). Derived from the Anjuke real estate API data, it is the difference between the average construction year of all buildings in the unit and the observation year (a certain year), representing the physical aging degree and historical development degree of the building.
[0077] 3) House price (BP). Derived from the Anjuke real estate API data, it is the composite influence of multiple external factors such as education and commerce on all buildings in the evaluation unit, representing the economic development status of the region.
[0078] 4) Building coverage rate (BSF). Derived from the CMAB dataset, it is the ratio of the total area of all buildings in the evaluation unit to the total area of the evaluation unit, used to quantify the building coverage, and high values usually indicate dense buildings and less vegetation coverage.
[0079] 5) Building FAR (FAR). Derived from the CMAB dataset, it is the ratio of the total building area to the plot area in the evaluation unit, which measures the intensity of space utilization. For regular buildings, the total building area is the product of the building base area and the number of floors, and old communities often have high volume characteristics.
[0080] 6) Building shape index (BSI). Derived from the CMAB dataset, it is the ratio of the perimeter to the area of all buildings in the evaluation unit, used to quantify the shape regularity of the building outline. Irregular shapes are often found in spontaneous building renovation behaviors in old communities.
[0081] 7) Spatial crowding degree (SCD). Derived from the CMAB dataset, it is the ratio of the building volume to the plot capacity upper limit in the evaluation unit, representing the development saturation and residential environment quality. The building volume is the product of the building base area and the floor height, and the plot capacity upper limit is the product of the building base area and the maximum building height.
[0082] Step S3, based on the basic evaluation unit of the block, taking the plot in the sample area as the node, using the Delaunay triangulation algorithm to construct a spatial adjacency graph network, and embedding the feature indicators into the corresponding nodes of the graph network to construct a spatial graph network;
[0083] In the optional embodiment, the basic evaluation unit is taken as a node of a plot in a sample area, a spatial adjacency graph network is constructed by using a Delaunay triangulation algorithm, and a feature index is embedded into a corresponding node of the graph network, and the construction of the spatial graph network comprises:
[0084] Taking a plot in a sample area as a node, a triangular network is generated between nodes according to a maximum empty circle criterion by a Delaunay triangulation algorithm based on a spatial proximity principle;
[0085] An edge connection relationship existing in the triangular network is converted into an edge in a graph structure, and a spatial distance between nodes is taken as an edge attribute, and a graph network reflecting a spatial adjacency relationship is constructed;
[0086] POI density, building age, house price, building coverage, building volume, building form index and spatial congestion are pretreated by using a Z-score standardization algorithm to eliminate dimensional influence, that is, a difference between a certain data and an average value of all data is calculated, and then divided by a standard deviation of all data to obtain a Z-score standardized value of the data;
[0087] The pretreated POI density, building age, house price, building coverage, building volume, building form index and spatial congestion are embedded into nodes of corresponding graph networks respectively to form a spatial graph network.
[0088] Specifically, the graph network is constructed to represent a city spatial structure, and each plot corresponds to a node V in the graph G i The edge connection between nodes is determined by using a Delaunay triangulation algorithm. The algorithm is based on the principle of spatial proximity, which ensures the connection between adjacent plots and avoids long-distance connection. Specifically, for any two plots, the centroid of the plot is selected as the node, and the maximum empty circle criterion is applied to generate a triangular network, so that the circumcircle of any triangle does not contain other points; if two nodes form an edge connection in the triangular network, an edge E is established between the corresponding nodes, and the spatial distance is taken as an attribute, thereby forming a graph network G(V, E). After the construction of the graph network is completed, the extracted 7-dimensional feature vector X={PD, BA, BP, BSF, BSI, FAR, SCD} is embedded into the corresponding graph node V to form a graph network G=(V, E, X) containing spatial topological structure and node attribute features. Due to the significant difference in dimension and distribution of different feature indexes, the data is pretreated by using a Z-score standardization method.
[0089] Step S4, using a graph attention network, calculating the weight between nodes of the spatial graph network through neighborhood sampling and feature aggregation mechanism, and calculating the attention coefficient for each pair of connected nodes, capturing local spatial contact and global topological information, and outputting the identification result of the old community;
[0090] In this optional embodiment, the use of a graph attention network to calculate the inter-node weights of the spatial graph network through neighborhood sampling and feature aggregation mechanisms, and to calculate the attention coefficient for each pair of connected nodes, captures local spatial connections and global topological information, and outputs the identification results of old residential areas, including:
[0091] Using an inductive graph neural network as a framework, and combining it with an attention mechanism for training, a graph attention network is constructed.
[0092] In one loop, a linear transformation is applied to the input layer of the graph attention network to construct a fully connected layer and automatically generate the initial weight matrix;
[0093] Based on the initial weight matrix, the preprocessed POI density, building age, house price, building coverage, building volume ratio, building form index, and spatial crowding are used as new features of the nodes.
[0094] The attention coefficient weights of each pair of adjacent nodes in the new features of a node are calculated using the LeakyReLU nonlinear activation function, and the attention coefficient weights of each pair of adjacent nodes are normalized using the softmax function to obtain the normalized attention weights.
[0095] Using an aggregator, the features of neighboring nodes are aggregated through a weighted summation method, and combined with the sigmoid activation function, the identification probability of old residential areas is obtained.
[0096] By repeatedly looping using a multi-head attention mechanism, different initial weight matrices are applied to POI density, building age, housing price, building coverage, building volume ratio, building form index, and spatial congestion to obtain different recognition probabilities. The average result of different recognition probabilities is then input into the output layer of the graph attention network to obtain the recognition result of old residential areas, thereby stabilizing the learning process of the graph attention network and enhancing its expressive ability.
[0097] In this optional embodiment, the formula for calculating the attention coefficient weight is:
[0098] (Equation 1)
[0099] In the formula, Represents the attention coefficients of nodes i and j; Represents the learnable attention weight matrix; and represents the node feature vectors obtained through linear transformation W; || represents the concatenation of feature vectors; Indicates trainable coefficients; where denotes the prior correlation strength representing the prior weight representation; LeakyReLU denotes a nonlinear activation function.
[0100] In this optional embodiment, the calculation formula of the normalized attention weight is:
[0101] (Formula 2)
[0102] wherein, denotes the normalized attention weight; denotes the attention weight of the neighbor node i and the target node; n denotes the number of neighbor nodes; denotes the attention coefficient.
[0103] Specifically, based on the constructed spatial graph network G = (V, E, X), the present study adopts a graph attention network (GAT) framework for old community identification. The GAT is an inductive graph neural network combined with an attention mechanism, and has the ability to process large-scale heterogeneous graph data with complex topological structures. The graph attention network GAT dynamically learns the importance weight of each neighbor node through neighborhood sampling and feature aggregation mechanism, and calculates the attention coefficient for each pair of connected nodes, which can simultaneously capture local spatial contact and global topological information. Figure 2 a).
[0104] Specifically, the graph attention network GAT adopts a fully connected layer of linear transformation W in the input layer, maps the features normalized by Z-score to a new dimension based on the initial weight matrix of the features, and takes the new features as the features of the nodes; a LeakyReLU nonlinear activation function is applied to calculate the attention coefficient weight of each node i and all its neighbor nodes j (Formula 1), The initial value of is randomly generated by the GAT model, and is continuously optimized by the SGD optimizer according to the loss function and the chain rule in the iterative training process; a softmax function is used to normalize the attention weight of the node and all neighbor nodes, i.e., to calculate the ratio of each attention weight to the sum of all weights (Formula 2), which represents the relative importance between the node and the neighbor nodes; then, the normalized attention weight is used with the aggregator to aggregate the features of the neighbor nodes in a weighted summation manner, and a LeakyReLU nonlinear activation function is used to process the aggregated features to obtain the feature representation of the target node, i.e., the identification probability of the old community.
[0105] The above steps are repeated using a multi-head attention mechanism, i.e., different initial weight matrices are used for 7-dimensional node features, and the initial weights are automatically generated by the model. The weight of the feature in different dimensions is given the maximum value. Based on the recognition probability obtained by different initial weight matrices, the average result is derived to the output layer to obtain the comprehensive recognition probability of the old community. This can stabilize the learning process of GAT and enhance its expression ability, and obtain the recognition result output by the GAT model.
[0106] The training samples used are mainly derived from urban planning documents, public reports, etc., combined with maps to determine the accurate spatial position of the old community. In view of the small proportion of old communities in the city, this study combines negative samples mainly composed of newly built communities and constructs a corresponding weighted loss function to improve the recognition ability of GAT. At the same time, for the typical physical characteristics of old communities in terms of building age, etc., we add a prior weight matrix to the attention coefficient obtained by LeakyReLU in the form of an additive term (Equation 1) to obtain more accurate attention coefficients between nodes. The prior weight matrix is derived from existing knowledge of old communities. In this study, the prior knowledge is that the building age is large, the building coverage rate is high, the housing price is lower than the surrounding area, and the spatial congestion degree is high.
[0107] Step S5, based on the graph attention network, the source domain model is trained, the domain adaptation strategy is used to construct a transfer learning model, and the accuracy parameter is used to evaluate the recognition performance of the transfer learning model.
[0108] In this optional embodiment, the source domain model is trained based on the graph attention network, the domain adaptation strategy is used to construct a transfer learning model, and the accuracy parameter is used to evaluate the recognition performance of the transfer learning model.
[0109] The graph neural network trained in the source domain city is divided into a spatial feature learner for extracting multi-source spatial features of general old communities, and an old community recognizer for adjusting according to the specific circumstances of the target domain city and its features;
[0110] A domain discriminator is introduced, and the labeled source domain city features and unlabeled target domain city features are jointly input into the domain discriminator. The city feature is distinguished from the labeled source domain city feature or the target domain city feature through the binary cross-entropy loss function, so that the spatial feature learner can gradually eliminate the feature difference between the source domain city and the target domain city based on the city feature essential spatial feature mode in the training process;
[0111] A regularization loss function is introduced to constrain the continuity of adjacent nodes in the feature space to maintain the spatial structure and prevent overfitting;
[0112] The staged training mechanism is used to balance the transfer efficiency and accuracy, so as to realize the feature distribution alignment of the source domain city features and the target domain city features.
[0113] Based on the feature alignment result, the classification loss, the adversarial loss and the regularization loss are weighted and summed to form a total loss function, so as to improve the old community recognition accuracy of the target city.
[0114] Taking the samples of the source domain city as the main part and adding a small amount of samples of the target city, a total of 300 sample sets are formed, and the training samples, the verification samples and the test samples are divided according to the ratio of 7:1:2, so as to construct the transfer learning model and realize the old community recognition of the target domain city.
[0115] The transfer learning model recognition situation based on the test samples is compared with the labeling situation of the verification samples, the accuracy is the ratio of the number of test samples correctly recognized as old communities or non-old communities to the total number of test samples, and the higher the ratio is, the higher the recognition accuracy of the transfer learning model is.
[0116] In this optional embodiment, the calculation formula of the binary classification cross-entropy loss function is:
[0117] (Formula 3)
[0118] In the formula, represents the cross-entropy loss value of a certain spatial feature; represents the source (source domain or target domain) of the spatial feature; represents the probability that the transfer learning model predicts that the feature sample belongs to the source domain.
[0119] In this optional embodiment, the calculation formula of the regularization loss function is:
[0120] (Formula 4)
[0121] In the formula, represents the regularization term loss function; represents the connected node pair in the graph structure; represents the set of edges in the graph structure; represents the weight of the edge; represents the spatial feature learner.
[0122] In this optional embodiment, the calculation formula of the total loss function is:
[0123] (Formula 5)
[0124] In the formula, represents the total loss function, , , These represent the classification loss, adversarial loss, and regularization term loss, respectively. and The hyperparameters used to balance different losses represent the autonomous training of the transfer learning model.
[0125] Specifically, based on the source domain model trained by GAT, a domain adaptation strategy is adopted to construct a transfer learning model to achieve effective knowledge transfer from the source domain city (NJ City) to the target domain cities (ZJ City, CZ City, WX City, SZ City), realizing the identification of old residential areas across the region. First, the GAT model trained in the source domain is divided into two core functional components: a spatial feature learner and an old residential area identifier. The spatial feature learner retains the multi-source spatial features of common old residential areas already mastered by the source domain city; the old residential area identifier is adjusted according to the specific circumstances of the target domain city and its features, adapting to the differences in development level, geographical conditions, etc. of different cities.
[0126] Labeled source domain city features and unlabeled target domain city features are input together into the domain discriminator. A binary classification cross-entropy loss function is used to distinguish whether they come from the source domain or the target domain (Equation 3). This allows the spatial feature learner to gradually eliminate feature differences between source and target domain cities during training, based on their essential spatial feature patterns. Simultaneously, to address the overfitting problem of the feature learner caused by sample noise, this invention introduces... Figure 1 Consistency regularization loss function This ensures that adjacent plots maintain spatial continuity in their feature representation and preserves the integrity of the urban spatial structure (Equation 4).
[0127] To align the feature distributions of the source and target domains and effectively reduce the differences in data and feature distributions between cities, this invention employs a domain adversarial training mechanism, a common domain adaptation strategy. Figure 2 (b) To further balance the transfer efficiency and recognition accuracy during the adaptation process of the transfer learning model, this invention proposes a phased domain adversarial training mechanism: In the first phase, the pre-trained spatial feature learner of the source city is fixed, and only the input features of the domain discriminator are updated to quickly adapt to the classification decision boundary of the target city and prevent overfitting of the limited labeled data; In the second phase, based on the accuracy parameter of the old community recognition of the target city's validation samples (see details below), the shallow parameters of the spatial feature learner are selectively unfrozen, that is, several convolutional layers near the input layer are unfrozen, so that the model can be jointly fine-tuned on new datasets and shallow features during training. In this way, while maintaining the spatial recognition experience of the source city, the specific spatial pattern features of the target city can be captured, and the parameters of the old community recognizer can be optimized at the same time.
[0128] Based on the feature alignment results, the classification loss is integrated. Combating losses And regularization term loss Equation 5, that is, the total loss is calculated by weighted summation. To minimize the impact of the target city's old residential area identification, the accuracy of identification in the target city can be further improved, enabling efficient transfer of identification knowledge from the source city to the target city. Meanwhile, to ensure the representativeness and class balance of the labeled samples, samples from the source city (NJ) are used as the main component, with a small number of samples from the target city added, forming a total of 300 samples. These samples are then divided into training samples, validation samples, and test samples in a 7:1:2 ratio, used for model parameter learning, hyperparameter tuning and optimal transfer efficiency exploration, and model generalization ability evaluation, respectively.
[0129] In addition, parameters such as accuracy are used to evaluate the model's recognition performance, which is to compare the model's recognition performance on test samples with the labeled performance on validation samples. Accuracy is the ratio of the number of test samples that correctly identify old or non-old communities to the total number of test samples. The higher the value, the higher the recognition accuracy.
[0130] Results of old residential area identification: such as Figure 3 As shown, ( Figure 3 a) NJ City, ( Figure 3 b) ZJ City, ( Figure 3 c) CZ City, ( Figure 3 d) WX City, ( Figure 3 e) SZ City, and old residential areas in various cities ( Figure 3 f) Statistical results of area and number. This invention identified 705 old residential areas in a certain region in a certain year, with a total area of 167.49 km². 2 Overall, it exhibits significant spatial differentiation and hierarchical scale characteristics. Among them, the old residential areas in NJ City exhibit typical axial-zone clustering, mainly distributed in the outer ring of the main urban area and the core suburban area, forming several discrete high-density clusters. Figure 3 a). SZ City exhibits a concentric ring-shaped distribution pattern, with the central urban area as the core, spreading outwards in a gradient, forming distinct ring-shaped agglomeration zones at the boundaries of each administrative district. Figure 3 e). The old residential areas in CZ, WX, and ZJ cities are mainly concentrated in the central areas of the main urban areas, as well as the urban-rural fringe areas on the outskirts of the old city, with a high overall spatial concentration. Figure 3 b、 Figure 3 c. Figure 3 d).
[0131] From the statistical results, the number of old community distribution presents obvious city development differences. NJ city identifies 225 old communities, accounting for 31.9%, with a total area of 61.4 km²; ZJ city has 62 old communities, with the lowest proportion (8.8%), with a total area of 31.6 km²; SZ city, WX city and CZ city contain 171, 150 and 97 old communities respectively, with a total area of 30.3 km², 23.2 km² and 21.0 km² respectively Figure 3 f). From the average area of a single community, the average single area of old communities in NJ city is 0.27 km², which is significantly higher than the regional average level (0.24 km²); although ZJ city has the least number of old communities, the average single area is as high as 0.51 km². The average single area of SZ city, WX city and CZ city is 0.18 km², 0.15 km² and 0.22 km² respectively, which is lower than the regional average, showing the characteristics of more quantity and smaller scale, which may be due to the high modernization level and new city interface of the three cities.
[0132] The identification accuracy of old communities is analyzed as shown in Figure 4 , the source domain city (i.e. a figure of Figure 4 ) and as shown in Figure 5 , the target domain city (i.e. b figure of Figure 5 ) iteration-accuracy learning curve, including training accuracy (train_acc), validation accuracy (val_acc) and test accuracy (test_acc). Based on the accuracy training curve analysis of the migration learning model based on GAT architecture, all target cities (SZ, CZ, WX, ZJ city) show high initial identification accuracy level, all of which are more than 30.0%, indicating that the pre-training (NJ city as the source domain) of old community spatial identification knowledge has been effectively migrated Figure 4 . In the subsequent iteration Epoch training, the iteration-accuracy learning curve shows a typical 0-50 round rapid improvement period, 50-150 round stable optimization, 150-250 round convergence stable fluctuation trend.
[0133] NJ city as the source domain has achieved excellent performance in old community identification task Figure 4 . After 200 rounds of training iteration, the accuracy of the migration learning model on the test set and the training set remains stable, with a validation accuracy of about 91.3%, indicating that the migration learning model has good generalization ability and data adaptability. From the overall identification accuracy, the identification accuracy of the target city reaches about 85% Figure 5), although the accuracy difference of transfer learning is only 6%, which reveals the high similarity and knowledge sharing basis between domains. At the same time, the gap between training accuracy and test accuracy is relatively consistent in the target city, about 4.9%, indicating the stable generalization ability of the transfer learning model in different target domains.
[0134] According to another embodiment of the application, an old community identification system combining transfer learning and graph neural network is also provided, which comprises:
[0135] A data acquisition module is configured to acquire multi-source remote sensing data, social perception data and building footprint data of a sample area; the multi-source remote sensing data comprises built-up area boundary data and high-resolution remote sensing image data, which are used to determine whether the sample area is an old community; the social perception data comprises OSM road network data, POI interest point data and house attribute data, which are used to divide the sample area into independent plots; and the building footprint data comprises building contour data and building height data, which are used to construct two-dimensional and three-dimensional morphological features of buildings.
[0136] A data division module is configured to divide the sample area into basic evaluation units of blocks based on the built-up area boundary data, the high-resolution remote sensing image data and the OSM road network data; and construct feature indexes of the blocks based on the POI interest point data, the house attribute data, the building contour data and the building height data.
[0137] A network construction module is configured to construct a spatial adjacency graph network by taking plots in the sample area as nodes and using a Delaunay triangulation algorithm based on the basic evaluation units of the blocks, and embed the feature indexes into corresponding nodes of the graph network to construct a spatial graph network.
[0138] A node connection module is configured to calculate the weights between nodes of the spatial graph network by using a graph attention network, neighborhood sampling and feature aggregation mechanism, and calculate attention coefficients for each pair of connected nodes to capture local spatial relationships and global topological information, and output an identification result of the old community.
[0139] A data migration and evaluation module is configured to train a source domain model based on the graph attention network, construct a transfer learning model by using a domain adaptation strategy, and evaluate the identification performance of the transfer learning model by using an accuracy parameter.
[0140] In summary, by means of the above technical solutions of the present application, 1) built-up area boundary data and high-resolution remote sensing images and other multi-source remote sensing data are obtained, wherein the high-resolution remote sensing images are used for auxiliary labeling of samples. 2) OSM road network, POI interest point and house attribute data and other social perception data are obtained. 3) Based on the built-up area boundary data, high-resolution remote sensing image data and OSM road network data, the street blocks are segmented to obtain the basic evaluation unit for research. 4) CMAB data set and other building footprint data are obtained. 5) Based on the POI data and the house attribute data, the feature indexes of the city function and the building attribute dimensions such as the POI density, the building age and the house price are constructed. 6) Based on the building footprint data, the feature indexes of the two-dimensional and three-dimensional shape dimensions such as the building coverage rate, the building volume rate, the building shape index and the spatial congestion degree are constructed. 7) Taking the land as the node V, the Delaunay triangulation algorithm is used to establish the edge E between the corresponding nodes, and the basic graph structure is constructed. 8) The above feature indexes X are embedded into the corresponding graph nodes to construct the graph network G=(V,E,X). 9) The linear transformation is used in the input layer to construct the full connection layer in the graph attention network (GAT) framework. 10) The LeakyReLU nonlinear activation function is applied to obtain the attention coefficient weight of each node pair calculation, and the softmax function is used for normalization. 11) The negative sample and the corresponding weighted loss function are constructed for the newly built community, and the prior weight matrix is added in the LeakyReLU function in the form of an additive term. 12) The aggregator is used to aggregate the features of the neighbor nodes, and the sigmoid activation function is used to obtain the feature representation of the target node. 13) The multi-head attention mechanism is used to repeat the above steps 9-11 to stabilize the learning process of GAT and enhance its expression ability. 14) Based on the recognition model of the source domain city obtained by GAT training, the transfer learning method of domain adaptation strategy is used to obtain the recognition model of the target city. 15) The spatial feature learner and the old community recognizer are constructed, which are respectively used for retaining the multi-source spatial features mastered by the source city and adjusting the model according to the specific circumstances of the target city. 16) The domain discriminator is constructed to distinguish whether the evaluation unit comes from the source domain or the target domain. 17) The consistency regularization loss function is introduced to ensure that the adjacent land blocks maintain spatial continuity in feature expression. 18) The domain adversarial training mechanism (domain adaptation strategy) in stages is used to realize the alignment of the feature distribution of the source domain and the target domain. 19) In the first stage, the spatial feature learner of the source city is fixed, and only the domain discriminator is updated; in the second stage, the feature learner is jointly fine-tuned, and the old community recognizer is optimized. 20) The model training sample is constructed with the source domain city as the main part and a small amount of samples of the target domain to ensure the representativeness and class balance of the labeled samples. 21) The old community recognition transfer learning model is constructed to realize the old community recognition of the target domain city, and the accuracy Accuracy and other parameters are used to evaluate the recognition performance of the model. Figure 1
[0141] The above descriptions are only the preferred embodiment of the application, not intended to limit the application and any modification, equivalent replacement and improvement made within the principle and technical scope of the application should be included in the protection scope of the application.
Claims
1. A method for old community identification combining transfer learning and graph neural network, characterized in that, The application relates to an old community recognition method based on a graph attention network. The method comprises the following steps: acquiring multi-source remote sensing data, social perception data and building footprint data of a sample area; the multi-source remote sensing data comprises built-up area boundary data and high-resolution remote sensing image data, and is used for judging whether the sample area is an old community; the social perception data comprises OSM road network data, POI interest point data and house attribute data, and is used for dividing the sample area into independent plots; the building footprint data comprises building contour data and building height data, and is used for constructing two-dimensional and three-dimensional morphological features of buildings; spatial unit division is carried out on the sample area based on the built-up area boundary data, the high-resolution remote sensing image data and the OSM road network data, so as to obtain basic evaluation units of a block; feature indexes of the block are constructed based on the POI interest point data, the house attribute data, the building contour data and the building height data; based on the basic evaluation units of the block, a spatial adjacency graph network is constructed by taking plots in the sample area as nodes and using a Delaunay triangulation algorithm, and the feature indexes are embedded into corresponding nodes of the graph network, so as to construct a spatial graph network; a graph attention network is used to calculate the weight between nodes of the spatial graph network through a neighborhood sampling and feature aggregation mechanism, and an attention coefficient is calculated for each pair of connected nodes, so as to capture local spatial contact and global topological information, and output the recognition result of the old community; 2. The method according to claim 1, wherein, a source domain model is trained based on the graph attention network, a domain adaptation strategy is used to construct a transfer learning model, and the recognition performance of the transfer learning model is evaluated by using an accuracy parameter. The construction of the feature indexes of the block based on the POI interest point data, the house attribute data, the building contour data and the building height data comprises the following steps: city function features and building attribute features of POI density, building age and house price are constructed based on the POI interest point data and the house attribute data; 3. The method of claim 1, wherein, two-dimensional morphological features and three-dimensional morphological features of building coverage, building volume ratio, building form index and spatial congestion degree are constructed based on the building contour data and the building height data. The construction of the spatial graph network based on the basic evaluation units and taking the plots in the sample area as nodes comprises the following steps: the plots in the sample area are taken as nodes, and a triangular network is generated between the nodes according to the maximum empty circle criterion based on the spatial proximity principle through the Delaunay triangulation algorithm; an edge connection relationship existing in the triangular network is converted into an edge in the graph structure, and the spatial distance between nodes is taken as an edge attribute, so as to construct a graph network reflecting the spatial adjacency relationship; POI density, building age, house price, building coverage, building volume ratio, building form index and spatial congestion degree are pretreated by using a Z-score standardization algorithm, so as to eliminate the dimension influence; the pretreated POI density, building age, house price, building coverage, building volume ratio, building form index and spatial congestion degree are embedded into the nodes of the corresponding graph network, so as to form a spatial graph network.
4. The method according to claim 3, wherein, The graph attention network is used to calculate the weight between nodes of the spatial graph network through neighborhood sampling and feature aggregation mechanism, and to calculate the attention coefficient for each pair of connected nodes, so as to capture local spatial contact and global topological information, and output the identification result of the old residential area, including: Taking the inductive graph neural network as a framework, the graph attention network is constructed by training combined with the attention mechanism; In one cycle, a linear transformation is adopted in the input layer of the graph attention network, a full connection layer is constructed, and an initial weight matrix is automatically generated; Based on the initial weight matrix, the preprocessed POI density, building age, house price, building coverage rate, building volume rate, building form index and spatial congestion degree are taken as new features of the nodes; The attention coefficient weight of each pair of adjacent nodes in the new features of the nodes is calculated through the LeakyReLU nonlinear activation function, and the attention coefficient weight of each pair of adjacent nodes is normalized through the softmax function to obtain the normalized attention weight; The features of the neighbor nodes are aggregated through weighted summation by using the aggregator, and the sigmoid activation function is combined to obtain the identification probability of the old residential area; The multi-head attention mechanism is repeatedly cycled, different initial weight matrices are used for the POI density, building age, house price, building coverage rate, building volume rate, building form index and spatial congestion degree, and different identification probabilities are obtained; the average result of the different identification probabilities is input into the output layer of the graph attention network to obtain the identification result of the old residential area, so as to stabilize the learning process of the graph attention network and enhance its expression ability.
5. The method according to claim 4, wherein, The calculation formula of the attention coefficient weight is: ; where, denotes the attention coefficient of node i and node j; denotes the learnable attention weight matrix; and denotes the node feature vector obtained by linear transformation; || denotes the concatenation of the feature vectors; denotes the trainable coefficient; denotes the prior correlation strength of the prior weight representation; LeakyReLU denotes a nonlinear activation function.
6. The method of claim 4, wherein, The calculation formula of the normalized attention weight is: ; In the formula, denotes the normalized attention weight; denotes the attention weight of the neighbor node i and the target node. n denotes the number of neighbor nodes; denotes an attention coefficient.
7. The method according to claim 1, wherein, The source domain model is trained based on the graph attention network, a domain adaptation strategy is used to construct a transfer learning model, and the identification performance of the transfer learning model is evaluated by using the accuracy parameter Accuracy, including: The graph neural network trained in the source domain city is divided into a spatial feature learner for extracting the multi-source spatial features of the old residential area, and an old residential area identifier for adjusting according to the specific circumstances of the target domain city and its features; The domain discriminator is introduced, the labeled source domain city features and the unlabeled target domain city features are jointly input into the domain discriminator, and the city feature is distinguished from the labeled source domain city feature or the target domain city feature through the binary cross-entropy loss function, so that the spatial feature learner can gradually eliminate the feature difference between the source domain city and the target domain city based on the city feature essential spatial feature mode in the training; The regularization loss function is introduced to constrain the continuity of adjacent nodes in the feature space, so as to maintain the spatial structure and prevent overfitting; The phased training mechanism is used to balance the transfer efficiency and accuracy, so as to realize the feature distribution alignment of the source domain city features and the target domain city features; Based on the result of the feature alignment, the classification loss, the adversarial loss and the regularization loss are weighted and summed to form a total loss function, so as to improve the old residential area identification accuracy of the target city; Based on the result of the feature alignment, the classification loss, the adversarial loss and the regularization loss are weighted and summed to form a total loss function, so as to improve the old residential area identification accuracy of the target city; Taking the samples of the source domain city as the main part, adding a small amount of samples of the target city, forming a total of 300 sample sets, and dividing them into training samples, validation samples and test samples according to the ratio of 7:1:2 to build a transfer learning model to realize the identification of old communities in the target domain city; The identification of the transfer learning model based on the test samples is compared with the labeling of the validation samples, and the accuracy is the ratio of the number of test samples correctly identified as old communities or non-old communities to the total number of test samples. The higher the ratio, the higher the identification accuracy of the transfer learning model.
8. The method according to claim 7, wherein, The calculation formula of the binary classification cross-entropy loss function is: ; In the formula, a cross-entropy loss value representing a certain spatial feature; a source of the spatial feature; a probability that the transfer learning model predicts that the feature sample belongs to the source domain.
9. The method according to claim 7, characterized in that, The calculation formula of the regularization loss function is: ; wherein, denotes a regularization term loss function; denotes a pair of connected nodes in a graph structure; denotes a set of edges in a graph structure; denotes a weight of an edge; denotes a spatial feature learner.
10. The method according to claim 7, characterized in that, The calculation formula of the total loss function is: ; wherein, represents the total loss function, , , respectively represent the classification loss, the adversarial loss and the regularization term loss; and represent the hyperparameters for balancing different losses for self-training of the transfer learning model.