Task processing method, neural network and training method thereof, device and medium
By constructing a hierarchical relationship between urban areas and preset semantic clusters, and performing pseudo-label prediction and parameter adjustment, the problem of inaccurate urban area identification in existing technologies is solved, and more accurate target category area identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
- Filing Date
- 2022-05-16
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies, when using urban data from urban areas for downstream task processing, typically rely solely on machine learning methods to learn and infer based on image features or auxiliary data for each area, resulting in inaccurate task processing results.
By determining the hierarchical relationships between multiple city regions and multiple pre-constructed preset semantic clusters, pseudo-label prediction is performed based on the city region feature vector of each preset semantic cluster. The parameter filtering matrix is calculated, and the parameters of the prediction network are adjusted to construct a prediction network suitable for the target city region.
It achieves semantic-specific mining of regions and modeling of relationships between global, long-distance similar regions, improving the recognition accuracy of target category regions while balancing the model's generalization and adaptability to specific regions.
Smart Images

Figure CN117131963B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, specifically to image processing technology, electronic mapping technology, and deep learning technology, and particularly to a task processing method, a neural network training method, a neural network for task processing, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] Regions are the basic spatial units that constitute a city. Different regions contain different built environments and human socio-economic activities, forming the complexity and diversity of a city. Quantitatively representing urban regions is a key aspect of urban intelligent computing, which can serve various downstream applications (e.g., traffic flow prediction, population forecasting), help understand urban development, improve urban planning, and provide comprehensive social services.
[0004] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention
[0005] This disclosure provides a task processing method, a neural network training method, a neural network for task processing, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of this disclosure, a task processing method is provided, comprising: identifying multiple urban areas in a target city; determining a first feature vector for each of the multiple urban areas based on urban data of each urban area, wherein the urban data includes at least one of image data, point of interest data, and road network data of the corresponding urban area; for each urban area, determining a subordinate relationship between the urban area and multiple preset semantic clusters based on the first feature vector of the urban area; for each preset semantic cluster, determining a semantic cluster feature vector of the preset semantic cluster based on the first feature vector of at least one urban area included in the preset semantic cluster; and determining a semantic cluster feature vector based on the semantic cluster feature vector of the preset semantic cluster. The cluster feature vector is used to predict pseudo-labels for multiple preset semantic clusters. The pseudo-labels indicate whether the corresponding preset semantic cluster includes the target category's urban area. Based on the prediction results of the pseudo-labels of the multiple preset semantic clusters and the subordinate relationship between the target urban area and the multiple preset semantic clusters, a parameter filtering matrix corresponding to the target urban area is determined. The trained prediction network is then modified using the parameter filtering matrix corresponding to the target urban area to obtain a prediction network for the target urban area. The prediction network for the target urban area is configured to predict whether the target urban area is a target category's urban area based on the first feature vector of the target urban area. The first feature vector of the target urban area is then input into the prediction network for the target urban area to obtain the prediction result.
[0007] According to another aspect of this disclosure, a method for training a neural network is provided, wherein the neural network includes a local feature extraction subnetwork, a membership determination subnetwork, a semantic cluster feature extraction subnetwork, a pseudo-label prediction subnetwork, a parameter filtering matrix generation subnetwork, and a prediction subnetwork. The method includes: identifying multiple urban areas within a target city, wherein the multiple urban areas include multiple sample urban areas; obtaining ground truth labels for each of the multiple sample urban areas, the ground truth labels indicating whether the corresponding urban area is a target category urban area; inputting the urban data of each of the multiple urban areas into a local feature extraction subnetwork to obtain a first feature vector for each of the multiple urban areas, wherein the urban data includes at least one of image data, point of interest data, and road network data of the corresponding urban area; for each of the multiple urban areas, inputting the first feature vector of the urban area into a membership determination subnetwork to obtain the membership relationship between the urban area and multiple preset semantic clusters; for each of the multiple preset semantic clusters, inputting the first feature vector of at least one urban area included in the preset semantic cluster into a semantic cluster feature extraction subnetwork to obtain a semantic cluster feature vector of the preset semantic cluster; obtaining ground truth pseudo-labels for each of the multiple preset semantic clusters, the ground truth pseudo-labels indicating whether the corresponding preset semantic cluster includes a target category urban area among the multiple sample urban areas; inputting the semantic cluster feature vector of each of the multiple preset semantic clusters into a pseudo-label pre-determined subnetwork. A sub-network is used to obtain predicted pseudo-labels for multiple preset semantic clusters. For each sample city region among multiple sample city regions, the predicted pseudo-labels for each of the multiple preset semantic clusters and the subordinate relationship between the sample city region and the multiple preset semantic clusters are input into a parameter filtering matrix to generate a sub-network, thereby obtaining a parameter filtering matrix corresponding to the sample city region. For each sample city region among multiple sample city regions, the prediction sub-network is modified using the parameter filtering matrix corresponding to the sample city region to obtain a prediction sub-network for the sample city region. The prediction sub-network for the sample city region is configured to predict whether the sample city region is a city region of the target category based on the first feature vector of the sample city region. For each sample city region among multiple sample city regions, the first feature vector of the sample city region is input into the prediction sub-network for the sample city region to obtain the predicted label of the sample city region. A loss value is determined based on the true labels of each of the multiple sample city regions, the predicted labels of each of the multiple sample city regions, the true pseudo-labels of each of the multiple preset semantic clusters, and the predicted pseudo-labels of each of the multiple preset semantic clusters. And based on the loss value, a neural network is trained.
[0008] According to another aspect of this disclosure, a neural network for task processing includes: a local feature extraction subnetwork configured to determine a first feature vector for each of the multiple urban regions based on urban data of each urban region, wherein the urban data includes at least one of image data, point of interest data, and road network data of the corresponding urban region; a subnetwork configured to determine a subnetwork between each urban region and multiple preset semantic clusters based on the first feature vector of that urban region; a semantic cluster feature extraction subnetwork configured to determine a semantic cluster feature vector for each preset semantic cluster based on the first feature vector of at least one urban region included in that preset semantic cluster; and a pseudo-label pre-... A predictive subnetwork is configured to predict pseudo-labels for each of the multiple preset semantic clusters based on the feature vector of each preset semantic cluster. The pseudo-labels indicate whether the corresponding preset semantic cluster includes the target category's urban area. A parameter filtering matrix generation subnetwork is configured to determine the parameter filtering matrix corresponding to the target urban area based on the prediction results of the pseudo-labels of the multiple preset semantic clusters and the subordinate relationship between the target urban area and the multiple preset semantic clusters. A prediction subnetwork is configured to be modified using the parameter filtering matrix corresponding to the target urban area to obtain a prediction subnetwork for the target urban area. The prediction subnetwork for the target urban area is configured to predict whether the target urban area is a target category's urban area based on the first feature vector of the target urban area.
[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described above.
[0010] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the above-described method.
[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the above-described method when executed by a processor.
[0012] According to one or more embodiments of this disclosure, by determining the subordinate relationship between multiple city regions and multiple pre-constructed preset semantic clusters, and determining the feature vector of the preset semantic cluster based on the first feature vector of the city regions included in each preset semantic cluster, the specific mining of regional semantics and the modeling of the relationship between global, long-distance similar regions are realized. By predicting pseudo-labels indicating whether each preset semantic cluster includes regions of the target category, and using the prediction results and the subordinate relationship between the target city region and multiple preset semantic clusters, the parameter filtering matrix corresponding to the target city region is calculated. The parameter filtering matrix is used to adjust the parameters of the prediction network used to output the task results, so that a prediction network suitable for the target city region can be obtained.
[0013] In this way, it is possible to use neural networks that take into account both the generalization of the model (main model) and its adaptability to specific regions (secondary model) to process urban data of urban areas in order to obtain accurate identification results of target category regions.
[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0015] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0016] Figure 1 A flowchart of a task processing method according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 2 A flowchart of a task processing method according to an exemplary embodiment of the present disclosure is shown;
[0018] Figures 3A-3B A schematic diagram of multiple urban areas according to exemplary embodiments of the present disclosure is shown;
[0019] Figure 4 A flowchart illustrating a method for training a neural network according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 5 A flowchart illustrating a method for training a neural network according to an exemplary embodiment of the present disclosure is shown;
[0021] Figure 6A structural block diagram of a neural network for task processing according to an exemplary embodiment of the present disclosure is shown;
[0022] Figure 7 A structural block diagram of a neural network for task processing according to exemplary embodiments of the present disclosure is shown; and
[0023] Figure 8 Structural block diagrams of exemplary electronic devices that can be used to implement embodiments of the present disclosure are provided. Detailed Implementation
[0024] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0025] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0026] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0027] In related technologies, when using urban data (e.g., image data, point of interest data) of urban areas for downstream task processing (e.g., urban area identification of target categories such as urban village identification), the learning and reasoning are usually carried out simply by machine learning methods based on the image features of each area or features constructed based on other auxiliary data. However, the task processing results obtained by this approach are poor.
[0028] To address the aforementioned issues, this disclosure establishes a hierarchical relationship between multiple city regions and pre-constructed preset semantic clusters. It then determines the feature vector of each preset semantic cluster based on the first feature vector of the city regions it includes. This enables the mining of region-specific semantics and the modeling of relationships between globally similar regions over long distances. Furthermore, it predicts pseudo-labels indicating whether each preset semantic cluster includes regions of the target category. Using these prediction results and the hierarchical relationship between the target city region and the multiple preset semantic clusters, it calculates the parameter filtering matrix corresponding to the target city region. Finally, it uses the parameter filtering matrix to adjust the parameters of the prediction network used to output the task results, thereby obtaining a prediction network suitable for the target city region.
[0029] In this way, it is possible to use neural networks that take into account both the generalization of the model (main model) and its adaptability to specific regions (secondary model) to process urban data of urban areas in order to obtain accurate identification results of target category regions.
[0030] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0031] According to one aspect of this disclosure, a task processing method is provided. For example... Figure 1As shown, the task processing method includes: Step S101, determining multiple urban areas in the target city; Step S102, determining the first feature vector of each of the multiple urban areas based on the urban data of each urban area, wherein the urban data includes at least one of the image data, point of interest data, and road network data of the corresponding urban area; Step S103, for each urban area in the multiple urban areas, determining the subordinate relationship between the urban area and multiple preset semantic clusters based on the first feature vector of the urban area; Step S104, for each preset semantic cluster in the multiple preset semantic clusters, determining the semantic cluster feature vector of the preset semantic cluster based on the first feature vector of each of the at least one urban area included in the preset semantic cluster; Step S105, determining the semantic cluster feature vector of the preset semantic cluster based on the semantic cluster feature vector of each preset semantic cluster in the multiple preset semantic clusters. The cluster feature vector is used to predict the pseudo-labels of multiple preset semantic clusters. The pseudo-labels indicate whether the corresponding preset semantic cluster includes the target category city area. Step S106: Based on the prediction results of the pseudo-labels of multiple preset semantic clusters and the subordinate relationship between the target city area and multiple preset semantic clusters in the multiple city areas, the parameter filtering matrix corresponding to the target city area is determined. Step S107: The trained prediction network is modified using the parameter filtering matrix corresponding to the target city area to obtain the prediction network for the target city area. The prediction network for the target city area is configured to predict whether the target city area is a city area of the target category based on the first feature vector of the target city area. Step S108: The first feature vector of the target city area is input into the prediction network for the target city area to obtain the prediction result.
[0032] Therefore, by determining the hierarchical relationship between multiple city regions and multiple pre-constructed preset semantic clusters, and determining the feature vector of each preset semantic cluster based on the first feature vector of the city regions included in each preset semantic cluster, the specific mining of regional semantics and the modeling of the relationship between global, long-distance similar regions are realized. Furthermore, by predicting pseudo-labels indicating whether each preset semantic cluster includes regions of the target category, and using the prediction results and the hierarchical relationship between the target city region and multiple preset semantic clusters, the parameter filtering matrix corresponding to the target city region is calculated. The parameter filtering matrix is then used to adjust the parameters of the prediction network used to output the task results, so that a prediction network suitable for the target city region can be obtained.
[0033] In this way, it is possible to use neural networks that take into account both the generalization of the model (main model) and its adaptability to specific regions (secondary model) to process urban data of urban areas in order to obtain accurate identification results of target category regions.
[0034] According to some embodiments, the methods disclosed herein can be used for various downstream tasks related to urban data processing and analysis, such as urban area identification of target categories. Target categories may include urban villages, demolition areas, high-density population areas, and may also include commercial areas, residential areas, industrial areas, etc., without limitation. For ease of description, this disclosure will use urban village area identification as an example to illustrate the task processing method, the neural network training method, and the operation and technical effects of the neural network used for task processing, but it is not intended to limit the scope of this disclosure. It is understood that the task processing method, the neural network training method, and the neural network used for task processing disclosed herein can also be used for other urban data processing tasks and can achieve similar technical effects.
[0035] According to some embodiments, in execution Figure 1 Before each step in the process, the target city and its boundaries can be determined. After determining the boundaries of the target city, step S101 can be executed to determine multiple urban areas of the target city. In some embodiments, a rasterization method can be used to divide the target city into N = H × W non-intersecting fixed-size grids, with each grid representing a urban area. V = {v1, v2, ..., v...} can be used. N} represents a set of urban regions. It is understood that other methods can also be used to divide the target city. In some embodiments, the target city can be divided into multiple urban regions based on its road network structure, or other methods can be used to divide the target city; this is not limited here.
[0036] According to some embodiments, urban village identification can be defined as a binary classification task that takes grid area features as input: f(x) i )→y i , where y i The label is a binary label, indicating that region i belongs to (y). i =1) or not belonging to (y) i =0) Urban village areas. It's worth noting that only a small portion of urban villages are known, therefore, limited labeled data is needed to learn how to identify unknown areas. Formally, the set of regions V = {v1, v2, ..., v...} N It consists of two parts: the labeled region subset V L ={v1,…,v l} and its corresponding characteristic matrix With the label matrix and unlabeled region subset V U ={v l+1 ,…,v N Its corresponding feature matrix Using the prediction function f:(X) obtained through learning U |XL ,Y L →Y U This system can predict whether each unlabeled urban area (i.e., the target urban area) belongs to the target category (e.g., an urban village area). Thus, it enables learning from labeled data of a portion of the target city and using the learned model to predict other areas within the target city.
[0037] According to some implementations, each urban area can have a feature vector x. i The region is described by a first feature vector, which can be based on various city data (e.g., point of interest (POI) data, satellite imagery data) and can be constructed according to specific downstream tasks.
[0038] After identifying multiple city regions, each city region can be treated as a node to construct an Urban Region Graph (URG) to describe the characteristics of the regions and the relationships between them. First, the Urban Region Graph is formally defined as G = (V, E, A, X), where V represents the set of nodes consisting of city regions, X represents the node feature matrix, E represents the edges on the graph, and A represents the corresponding adjacency matrix. If A... ij =1 indicates that the urban area v i and v j There exists an edge between these two city regions, meaning they are adjacent. The construction of the first feature vector of each city region and the construction of the adjacency relationship between city regions will be described in detail below.
[0039] According to some embodiments, such as Figure 2 As shown, the task processing method may further include: step S202, determining the adjacency relationships between multiple city areas. It is understood that... Figure 2 The operations in steps S201, S203, S205-S206, and S210-S213 are respectively... Figure 1 Steps S101-S108 are similar and will not be limited here.
[0040] This disclosure constructs connections between regions from two perspectives: (1) spatial proximity; (2) road network connectivity. According to some embodiments, two urban regions in a plurality of urban regions are adjacent to each other if they meet at least one of the following conditions: two adjacent urban regions; and two urban regions with a distance less than a preset distance in road network data.
[0041] (1) Spatial proximity
[0042] Generally, adjacent areas in a city tend to be closely connected and exhibit similar characteristics (possibly having similar representations in the latent space). Therefore, each area can be connected to its surrounding adjacent areas, and the corresponding position in the adjacency matrix of the city area map can be set as A. ij =1, meaning that these two regions are adjacent. This is understandable, as... Figure 3A As shown, when multiple city areas form a rectangular grid, each city area is adjacent to 8 city areas (the central area of a 3×3 grid has 8 neighbors). When multiple city areas form other shapes, their adjacency can also be determined based on the geometric relationship between these areas, which is not limited here.
[0043] (2) Road network connectivity
[0044] To model more complex relationships between urban areas, road network data can be introduced to establish boundaries between areas. As the core component of the urban transportation system, the road network plays a crucial role in capturing cross-regional functional connections. Some functional areas may consist of spatially non-adjacent areas connected by the road network (e.g., commercial streets). Therefore, road network data can be introduced to more comprehensively capture the correlations between areas. Specifically, if two areas v i and v j If the regions are interconnected in the road network, then an edge can be added between them, and let A be the boundary value. ij =1. In some embodiments, connectivity in a road network is defined as follows: if two regions are neighbors within n-hops of each other on the road graph formed by the road network data, then the two regions are considered connected in the road network. In an exemplary embodiment, n is 5, then as follows Figure 3B As shown, the distance between intersections I1 and I5 does not exceed 5 hops, therefore the urban area v 10 v 11 v 12 Any two of the three are adjacent. It is understood that n-hop (or 5-hop) is only an example of a preset distance. Other preset distances can be used as constraints when determining two connected areas in road network data, which is not limited here.
[0045] According to some embodiments, in order to describe the characteristics of urban areas, this disclosure constructs POI features based on POI basic attribute data and satellite imagery data. and image features That is, the first feature vector includes the image feature vector and interest point feature vector of the corresponding urban area. Step S203, determining the first feature vector of each of the multiple urban areas based on the urban data of each of the multiple urban areas may include: determining the image feature vector of each of the multiple urban areas based on the image data of each of the multiple urban areas; and determining the interest point feature vector of each of the multiple urban areas based on the interest point data of each of the multiple urban areas.
[0046] In some embodiments, POI basic attribute data provides basic information such as the name, location, and type of the POI, which can be used to describe the functional facilities within a region. Satellite imagery can be, for example, a 256×256 RGB image, capable of depicting the appearance characteristics of each region. It is understood that the above-described POI basic attribute categories, satellite image size, and color mode are merely examples and are not intended to limit the scope of this disclosure. POI data may also include other categories of basic attributes, and satellite imagery may be of other sizes or contain other information (e.g., terrain information, ground building information), which is not limited herein.
[0047] According to some embodiments, the interest point feature vector may include at least one of a first interest point feature sub-vector, a second interest point feature sub-vector, and a third interest point feature sub-vector.
[0048] The first point of interest feature sub-vector indicates at least one of the histograms of point of interest category distribution within the corresponding urban area and the histograms of point of interest category distribution within the surrounding urban areas of the corresponding urban area. The histogram of point of interest category distribution indicates the proportion of point of interest in each preset category within the corresponding area in the first preset category set. In some embodiments, the proportion of each type of POI within each area and the surrounding 3×3 area can be statistically analyzed, and a probability distribution histogram vector can be calculated as the POI category distribution feature. In an exemplary embodiment, the POI categories (the categories included in the first preset category set) may include bus stops, hospitals, schools, restaurants, subway stations, markets, etc., and are not limited thereto.
[0049] The second point of interest feature vector indicates the nearest distance of the corresponding urban area to each preset category of interest in the second preset category set. In some embodiments, to measure the ease with which residents within the area can access various basic living facilities, a series of POI radius features can be calculated. Each POI radius is defined as the nearest distance from the area to that type of POI.
[0050] The third point of interest feature vector indicates whether the area surrounding the corresponding urban region includes points of interest for each of the preset categories in the third preset category set. In some embodiments, to more directly represent the adequacy of an area's infrastructure, a Boolean feature—the infrastructure index—can be defined. This feature is set to 1 when an area contains all basic living facilities (i.e., in the third preset category set), and 0 otherwise.
[0051] It is understandable that the types of POIs included in the first, second, and third preset category sets can be set according to requirements. The first, second, and third preset category sets can be completely or partially the same, or they can be different; this is not limited here.
[0052] In some embodiments, the interest point feature vector may simultaneously include a first interest point feature sub-vector, a second interest point feature sub-vector, and a third interest point feature sub-vector, or be obtained based on these three. In an exemplary embodiment, these three interest point feature sub-vectors may be directly concatenated, or they may be aggregated in other ways to obtain the corresponding urban area's interest point feature vector.
[0053] According to some embodiments, the appearance features of urban areas can be extracted based on satellite images. In one exemplary embodiment, considering that pixel-level image data has a high dimensionality and directly using it to train a model can easily lead to overfitting, a pre-trained VGG16 model is used as a feature extractor to extract semantic features from the original satellite image. Specifically, the last two fully connected layers of the pre-trained VGG16 model are removed, and the satellite image of each region is taken as input. Then, the 4096-dimensional vector output by the model is used as the image feature of the region. It is understood that other existing neural network models or self-built neural network models can also be used to process satellite image data to obtain image features, or feature extraction can be performed on satellite image data through other means, or image data with other auxiliary information (e.g., terrain information, ground building information, or image data collected in the urban area, etc.) can be used, which is not limited here.
[0054] In some embodiments, the image feature vector and the interest point feature vector of a city area can be aggregated to obtain a first feature vector of the city area. In an exemplary embodiment, the image feature vector and the interest point feature vector can be directly concatenated, or the two feature vectors can be aggregated in other ways to obtain the first feature vector of the corresponding city area.
[0055] Therefore, the above steps yield a regional representation containing image data and POI data of the corresponding urban areas. The following section will introduce how to enhance the representation of each urban area by utilizing the relationships between urban areas.
[0056] According to some embodiments, when capturing the local relationships between each city region and its neighboring city regions, graph neural networks can be used to enhance the feature vector of each city region. For example... Figure 2 As shown, the task processing method may further include: step S204, processing the city region map, which includes multiple city regions and the adjacency relationships between them, using a trained graph attention network to update the first feature vector of each city region. Since the correlation between regions may be non-linear, using a graph attention network can better learn the relationships between regions.
[0057] In one exemplary embodiment, for each region v i , using x i To represent its feature vector, we can first calculate the attention score between each region and its neighbors or adjacent regions:
[0058]
[0059] Where, x j Indicates region v i The neighbor or adjacent area v j eigenvectors ( Indicates region v i In the urban area map URG (neighbors or adjacencies), W and a represent the learnable model parameters. This represents the vector concatenation operation, where σ represents the LeakyReLU activation function. Then, the attention score can be normalized using the softmax function to obtain the attention weights for feature aggregation as follows:
[0060]
[0061] Based on attention weights, local relationships between regions can be captured and a representation of the region (i.e., the first feature vector of the urban region) can be obtained:
[0062]
[0063] In some embodiments, two urban areas that are actually quite different may exhibit similar characteristics within a single modality of data. For example, an underdeveloped urban village in the city center and an upscale suburban community may both lack adequate basic living facilities and thus have similar POI (Point of Interest) distributions. Therefore, learning regional representations independently from POI data is likely to reduce the model's ability to identify urban villages. To ensure that the aggregation of neighboring regional features fully considers the interactions between cross-modal data and enhances the regional representation of each modality, contextual information within a single modality and between multiple modalities can be considered simultaneously during message passing and feature aggregation to address the problem of insufficient single-modal representation capabilities.
[0064] According to some embodiments, step S203, determining the first feature vector of each of the multiple city areas based on the city data of each city area in the multiple city areas, may further include: for each of the multiple city areas: determining an image-image feature vector of the city area based on the image feature vector of the city area and the image feature vectors of the city area surrounding the city area; determining an image-point-of-interest (POI) feature vector of the city area based on the image feature vector of the city area and the point-of-interest (POI) feature vectors of the city area surrounding the city area; determining a point-of-interest (POI)-image feature vector of the city area based on the point-of-interest (POI) feature vector of the city area and the image feature vectors of the city area surrounding the city area; determining a point-of-interest (POI)-POI feature vector of the city area based on the point-of-interest (POI) feature vectors of the city area surrounding the city area; and aggregating the image-image feature vector, image-POI feature vector, POI-image feature vector, and POI-POI feature vector of the city area to obtain the first feature vector of the city area. Therefore, by deeply aggregating the feature vectors of different modalities of each urban area and surrounding urban areas, the interaction between cross-modal data can be fully considered when aggregating the features of surrounding neighboring areas, and the regional representation of each modality can be enhanced, thus solving the problem of insufficient single-modal representation capabilities.
[0065] Understandably, various methods can be used to aggregate two feature vectors of the same or different modalities. For example, linear summation, concatenation, multilayer perceptron, graph neural network, or other methods and their arbitrary combinations can be used to obtain aggregated single-modal or multimodal features.
[0066] In one exemplary embodiment, feature aggregation of multiple modalities can be performed between adjacent or adjacent urban areas in the following manner.
[0067] First, considering that the interactions between regions are non-linear, a self-attention mechanism can be used to perform intramodal feature aggregation on the Urban Region Map (URG). Taking POI features (i.e., point of interest feature vectors) as an example, region v can be calculated as follows: i and v j Attention weights for POI feature aggregation:
[0068]
[0069] in, Indicates region v j POI features, region v j It is region v i Neighboring or adjacent areas on a city area map; W P It is a trainable transformation matrix; This represents the vector concatenation operation; a P←P σ represents the learnable parameter vector; σ represents the LeakyReLU activation function. Based on the attention weights mentioned above, a POI representation vector (i.e., interest point-interest point feature vector) considering intramodal context information can be learned for each region:
[0070]
[0071]
[0072] in These are the attention weights normalized using the softmax function. Correspondingly, image features (i.e., image-to-image feature vectors) based on intra-modal context information can be generated for each region in the same way:
[0073]
[0074] in, Indicates region v j Image features, W I and With W P and Correspondingly, this approach allows both POI and satellite image feature learning to consider inter-regional contextual information within a single modality.
[0075] To further consider the interactions between multimodal data, a cross-attention mechanism can be used to incorporate cross-modal regional contextual information during feature aggregation and update the representation vectors of each modality. Continuing with the POI feature as an example, the attention weights for cross-modal (image → POI) aggregation are calculated as follows:
[0076]
[0077] In this process, the context of image features can be learned from neighboring regions to enhance the learning of POI features in the current region. Wherein, W′ P and W′ I Let a represent the parameterized transformation matrices of POI features and image features, respectively; P←I It is a learnable parameter vector used to generate cross-modal attention weights, which represent the region v. j Image context for region v i The importance of POI feature learning. Based on this attention weight, contextual information between multimodal data can be calculated to enhance POI feature learning, thereby obtaining the regional interest point-image feature vector of the current urban area:
[0078]
[0079]
[0080] Similarly, we can also obtain the regional image-point of interest feature vector of the current urban area. I will not go into details here.
[0081] Next, an aggregation function AGG(·) can be used to combine the features learned based on intra-modal context and inter-modal context to obtain the enhanced feature vectors for each modality:
[0082]
[0083] The aggregation function can employ methods such as concatenation, summation, or attention mechanisms. Finally, by concatenating and aggregating the enhanced POI features and image features, a multimodal representation of the urban area (i.e., the first feature vector of the urban area) can be obtained:
[0084]
[0085] Furthermore, the aforementioned methods of using graph attention networks to enhance the first feature vector of urban areas and performing feature aggregation of multiple modalities between adjacent or neighboring urban areas can be used individually or in combination, without limitation here.
[0086] After obtaining the local representation of the urban area, in order to further capture the global and long-distance regional relationships and to overcome the labeling sparsity problem by utilizing the supervision signals of long-distance labeled regions, this disclosure organizes the urban area into a hierarchical structure, grouping semantically similar regions together so that similar but far-away regions can also interact.
[0087] Suppose there are K hidden nodes, representing K different semantic clusters in a city, with different semantic meanings for urban areas within each cluster. A hierarchical structure can be constructed, and representations of regions and semantic clusters can be learned. Regions can be assigned to various semantic clusters based on their characteristics, and the representations of semantic clusters can be learned based on the region representations through a region-to-semantic cluster information collection process. Then, pseudo-label prediction can be performed using the learned semantic cluster representations to determine whether the semantic cluster includes known urban village areas. Based on this information, a prediction network applicable to each urban area can be generated, as described below. Furthermore, the learned semantic cluster representations can be used as global interaction information shared between regions, and back-passed to similar but distant regions through a semantic cluster-to-region inverse mapping, using global interaction information to enhance the representation of regions. The specific steps are as follows:
[0088] According to some embodiments, in step S205, for each of the multiple city areas, the affiliation relationship between the city area and multiple preset semantic clusters can be determined based on the first feature vector of the city area. An allocation matrix can be defined. The assignment matrix represents the membership of a region to one of the K semantic clusters. This assignment matrix can be obtained by training a neural network on one or more steps of the task processing method. It is understood that the preset number of semantic clusters K is a hyperparameter, which can be determined as needed before training the corresponding neural network, and this disclosure does not intend to limit its specific value.
[0089] According to some embodiments, the affiliation between each of the multiple city areas and the multiple preset semantic clusters includes the probability that the city area belongs to each of the multiple preset semantic clusters. In one exemplary embodiment, B ij Let represent the probability (or membership degree) that the i-th region belongs to the j-th semantic cluster, and ∑ 1≤j≤K B ij =1. For each region v i Local representation The allocation matrix can be computed using a linear transformation and a row-wise softmax function:
[0090]
[0091] Among them, W B This represents the training parameter matrix for the linear transformation. This allocation matrix will serve as an information transfer channel between urban areas and semantic clusters.
[0092] According to some embodiments, after obtaining the membership relationship (i.e., allocation matrix B) between the city region and multiple preset semantic clusters, the city regions included in each preset semantic cluster can be determined. Step S205: For each city region among the multiple city regions, determining the membership relationship between the city region and multiple preset semantic clusters based on the first feature vector of the city region may include: determining the preset semantic cluster with the highest probability corresponding to the city region among the multiple preset semantic clusters as the preset semantic cluster including the city region. This step can be achieved by calculating a binarized allocation matrix. The matrix is obtained by treating each row as a one-hot vector, where the element corresponding to the largest element in each row of the original allocation matrix B has a value of 1, and the elements at other positions have a value of 0 (formally represented as...). In other words, each region will be assigned to the preset semantic cluster with the highest probability.
[0093] According to some embodiments, based on the representation of regions and the membership relationship of the allocation matrix, the representation of a preset semantic cluster, i.e., the semantic cluster feature vector, can be learned. Step S206: For each preset semantic cluster among multiple preset semantic clusters, determining the semantic cluster feature vector of the preset semantic cluster based on the first feature vectors of at least one city region included in the preset semantic cluster may include: for each preset semantic cluster among multiple preset semantic clusters, the sum of the first feature vectors of at least one city region included in the preset semantic cluster is determined as the semantic cluster feature vector of the preset semantic cluster. The semantic cluster feature vector can be represented as:
[0094]
[0095] Among them, h j This represents the semantic cluster feature vector of the preset semantic cluster -j. By binarizing the assignment matrix, the membership relationships of regions can be constrained, ensuring that each region is assigned only to the most likely semantic cluster. This avoids the representation of semantic clusters being dominated by a large number of regions with low membership.
[0096] Through the aforementioned region-to-semantic cluster mapping, these predefined semantic clusters divide the urban region into K groups, and the feature vector of each cluster summarizes the similar semantic information of the regions within the cluster. Then, considering the potential connections between different semantic clusters, the semantic cluster feature vector of each predefined semantic cluster can be updated based on the feature vectors of other predefined semantic clusters.
[0097] According to some embodiments, such as Figure 2As shown, the task processing method may further include: step S207, for each target preset semantic cluster among multiple preset semantic clusters, updating the semantic cluster feature vector of the target preset semantic cluster based on the semantic cluster feature vector of each preset semantic cluster among multiple preset semantic clusters and the weight of the preset semantic cluster with respect to the target preset semantic cluster. Thus, by using the feature vector of each preset semantic cluster and the weight corresponding to the target preset semantic cluster (the preset semantic cluster whose feature vector is currently to be updated) to update the feature vector of the target preset semantic cluster, the representation of each preset semantic cluster can learn information from other semantic clusters. It is understood that linear summation, concatenation, multilayer perceptrons, graph neural networks, or other methods and any combination thereof can be used to update the feature vector of the target preset semantic cluster based on the feature vector of each preset semantic cluster and the corresponding weight; no limitation is made here.
[0098] According to some embodiments, step S207, for each target preset semantic cluster among multiple preset semantic clusters, updating the semantic cluster feature vector of the target preset semantic cluster based on the semantic cluster feature vector of each preset semantic cluster and the weight of the preset semantic cluster with respect to the target preset semantic cluster, may include: processing the completed graph composed of multiple preset semantic clusters using a trained graph convolutional network to update the semantic cluster feature vector of each target preset semantic cluster among multiple preset semantic clusters. Thus, by constructing a complete graph from multiple preset semantic clusters and processing it using a graph convolutional network, the relationships between the preset semantic clusters can be fully learned.
[0099] In an exemplary embodiment, the updated semantic cluster feature vector of the preset semantic cluster can be represented as:
[0100] h′ i =σ(∑ 1≤j≤K e ij W h h j )
[0101] Where, h′ i W represents the updated semantic cluster representation. h e represents the transformation matrix shared by all semantic clusters. ij This represents the parameterized edge weight between semantic cluster-i and semantic cluster-j, which will be related to W. h Training together.
[0102] According to some embodiments, after obtaining the semantic cluster feature vector of each preset semantic cluster, global knowledge in the semantic cluster representation can be back-transmitted to each region through a semantic cluster → region knowledge sharing mechanism to enhance the region representation. For example... Figure 2As shown, the task processing method may further include: step S208, determining the second feature vector of the target city region based on the hierarchical relationship between the target city region and multiple preset semantic clusters, and the semantic cluster feature vectors of each preset semantic cluster. Thus, based on the hierarchical relationship between the city region and the preset semantic clusters, preset semantic clusters related to the target city region can be determined, and the second feature vector of the city region can be obtained using the semantic cluster feature vectors of these preset semantic clusters, thereby achieving the aforementioned semantic cluster → region knowledge sharing.
[0103] It is understandable that various methods can be used to determine the second feature vector of a city region based on the hierarchical relationship between the city region and multiple preset semantic clusters and the corresponding semantic cluster feature vectors. For example, the semantic cluster feature vectors of preset semantic clusters including the city region can be aggregated, or the semantic cluster feature vectors of multiple preset semantic clusters can be aggregated based on the probability that the city region belongs to each preset semantic cluster, or other methods can be used to obtain the second feature vector of the city region. No limitation is made here.
[0104] In some embodiments, the allocation matrix can be reused for backpropagation of global knowledge in the representation of preset semantic clusters. Step S208: For each city region among multiple city regions, determining the second feature vector of the city region based on the affiliation relationship between the city region and multiple preset semantic clusters and the semantic cluster feature vectors of each of the multiple preset semantic clusters may include: aggregating the semantic cluster feature vectors of each of the multiple preset semantic clusters based on the probability that the city region belongs to each of the multiple preset semantic clusters to obtain the second feature vector of the city region. This disclosure uses the original B instead of the binarized allocation matrix. This is because some weakly connected semantic clusters may still provide useful auxiliary information, enriching the representation of the region. This reverse knowledge sharing can be represented as:
[0105]
[0106] in, W represents the globally relation-aware region representation returned from the semantic cluster, i.e., the second feature vector. r This is the parameter matrix that needs to be learned.
[0107] After obtaining the second feature vector, local region features (first feature vector / updated first feature vector) and global region representation (second feature vector) can be aggregated to finally obtain an enhanced region representation (i.e., the aggregated first feature vector). According to some embodiments, such as... Figure 2As shown, the task processing method may further include: step S209, aggregating the first feature vector and the second feature vector of the target city region to obtain the aggregated first feature vector of the target city region. The aggregated first feature vector can be represented as:
[0108]
[0109] Here, AGG(·) represents an aggregation function, which can be used for concatenation, summation, etc. In this way, the region representation incorporates globally shared knowledge. Simultaneously, through... Regions that are far apart can interact with each other, and regions with sparse local labels can also obtain certain supervision signals from distant labeled regions, thus enabling better representation learning.
[0110] After obtaining the aggregated first feature vector as the final representation of the urban region, the aggregated first feature vector of the target urban region can be input into the trained prediction network to perform various downstream tasks, thereby obtaining the final task processing result.
[0111] However, due to the complexity and diversity of cities, different regions have different characteristics and different data distributions. If the same prediction model is used for different target urban regions, such a prediction model will not be able to adapt to different regions. Furthermore, due to the sparsity of the labeled data of urban villages, it is easy to cause overfitting problems if a model is trained specifically for each semantic cluster region.
[0112] Therefore, to balance model performance and adaptability to different regions, this disclosure first learns multimodal region representations containing local and global relationships in an end-to-end manner, obtaining a master model shared by all regions. Simultaneously, a hierarchical structure of urban regions is formed, determining the membership relationship between regions and semantic clusters. Then, based on the region-semantic cluster membership relationship (assignment matrix) learned in the previous stage, it first predicts whether each semantic cluster contains urban villages. This prediction result is then used as contextual information for the region to correct the master model and generate a region-customized secondary model. During the inference stage, after obtaining the semantic cluster feature vector of each preset semantic cluster, a pseudo-label for each preset semantic cluster can be predicted. This pseudo-label indicates whether the corresponding preset semantic cluster includes urban regions of the target category. Based on this prediction result and the membership relationship between each urban region and the preset semantic cluster, a parameter filtering matrix is determined to correct the master model (i.e., the trained prediction network) to obtain the secondary model. This parameter filtering matrix is then used to correct the master model to obtain a prediction network for that urban region, thus enabling accurate target category recognition results based on a network adapted to that urban region.
[0113] According to some embodiments, the main model (prediction network) can be represented as:
[0114]
[0115] in, Represents the main model, Φ c This indicates the model parameters that need to be trained. In some embodiments, the main model is a two-layer multilayer perceptron. It is understood that the number of layers in the multilayer perceptron can be adjusted as needed, or other neural networks can be used as the main model; this is not limited here.
[0116] After training, the allocation matrix The established regional affiliations were thus fixed. According to By collecting labels from regions to semantic clusters, the labels y of the regions are... i This is passed to the semantic cluster to which it belongs, and the pseudo-label of the semantic cluster is determined accordingly. Specifically, using... Let represent the pseudo-label of semantic cluster j. If there are known urban village areas in semantic cluster j, then let . otherwise The pseudo-label provides direct contextual information for regions within a semantic cluster, indicating whether these regions are semantically similar to known urban villages. The model should focus more on regions within semantic clusters with a pseudo-label of 1, as these are likely potential urban villages. The pseudo-label prediction results for the predefined semantic clusters can also be binarized.
[0117] In cities, only a very small number of urban villages are often known, resulting in only a small subset of semantic clusters having a pseudo-label of 1, while most semantic clusters have a pseudo-label of 0. However, these semantic clusters with a pseudo-label of 0 may actually contain potential urban villages. Simply assuming they do not contain urban villages could mislead the model's identification of urban villages. Therefore, in some embodiments, instead of directly using pseudo-labels, the probability of a semantic cluster containing an urban village can be estimated as the prediction result for the pseudo-label. More generally, the prediction result of the pseudo-label can indicate the probability that the corresponding predicted semantic cluster includes urban areas of the target category. Indicated by Φ p A pseudo-label prediction network with parameters h′, which uses the semantic cluster representation h′ j As input, the pseudo-labels are predicted using the following formula:
[0118]
[0119] in, The estimated probability of urban villages includes a semantic cluster containing known urban villages. It should be compared to semantic clusters that are not included. The probability is higher.
[0120] According to some embodiments, various methods can be used to obtain a parameter filtering matrix corresponding to a city region, used to obtain a sub-model for that city region, based on the prediction results of the pseudo-labels of each of the multiple preset semantic clusters and the subordinate relationship between the city region and the preset semantic clusters. For example, the pseudo-label prediction results of each preset semantic cluster and the subordinate relationship between the preset semantic cluster and the city region can be fused to obtain a vector of length equal to the number of preset semantic clusters, and then the vector can be transformed to obtain the parameter filtering matrix. It is understood that other methods can also be used to determine the parameter filtering matrix corresponding to the city region based on the prediction results of the pseudo-labels of each of the multiple preset semantic clusters and the subordinate relationship between the city region and the multiple preset semantic clusters, which is not limited here.
[0121] According to some embodiments, step S211, determining the parameter filtering matrix corresponding to the target city region, includes: aggregating the probability of the target city region belonging to each of multiple preset semantic clusters and the prediction results of the pseudo-labels of that semantic cluster to obtain the context feature vector of the target city region; and determining the parameter filtering matrix corresponding to the target city region based on the context feature vector of the target city region. Thus, context information of the region can be generated first by predicting the pseudo-labels of semantic clusters, and then the context information can be encoded into the parameters of the master parameter model to generate a region-customized slave model.
[0122] In one exemplary embodiment, the contextual representation of each region can be obtained by passing the probabilities along clusters→regions based on the assignment matrix B:
[0123]
[0124] Where, q i W represents the context vector of a region. q These are learnable parameters. B represents the inclusion probability of all semantic clusters. i,* This represents the i-th row of the allocation matrix. This represents the Hadamard product. The context vector indicates that region i is semantically similar to some urban village regions with varying probabilities.
[0125] Next, context information can be encoded into the parameters of the main model using a gating mechanism to generate a region-customized slave model. Specifically, a region-customized parameter filtering matrix can be generated first from the context vector:
[0126]
[0127] in, W represents the parameter filtering matrix for region i.f This represents the weights that linearly map the context vector to the parameter space of the main model. σ represents the Sigmoid activation function.
[0128] In some embodiments, the parameter filtering matrix The size of the filter matrix is the same as that of the main model's parameter matrix, allowing for the correction of all parameters of the main model. This filter matrix can be used to correct the parameters Φ of the main model (i.e., the prediction network). m You can then obtain a regionally customized model. (That is, the prediction network used for this urban area):
[0129]
[0130] in, This represents the parameters of the model, which fully consider the contextual information of the region. Based on the region-customized model, the final recognition task for each region can be represented as:
[0131]
[0132] In some embodiments, only some parameters in the main model may be modified, that is, at least some parameters in the prediction network may correspond to the parameter filtering matrix corresponding to the target city region. Step S212, modifying the trained prediction network using the parameter filtering matrix corresponding to the target city region to obtain a prediction network for the target city region may include: replacing at least some parameters of the prediction network with the Hadamard product of the parameter filtering matrix corresponding to the target city region and at least some parameters to obtain a prediction network for the target city region. Thus, flexible modification of the main model parameters is achieved.
[0133] According to another aspect of this disclosure, a method for training a neural network is disclosed. The neural network includes a local feature extraction subnetwork, a membership determination subnetwork, a semantic cluster feature extraction subnetwork, a pseudo-label prediction subnetwork, a parameter filtering matrix generation subnetwork, and a prediction subnetwork. For example... Figure 4As shown, the training method includes: Step S401, determining multiple urban areas in the target city, wherein the multiple urban areas include multiple sample urban areas; Step S402, obtaining the true labels of each of the multiple sample urban areas, wherein the true labels indicate whether the corresponding urban area is a target category urban area; Step S403, inputting the urban data of each of the multiple urban areas into the local feature extraction subnetwork to obtain the first feature vector of each of the multiple urban areas, wherein the urban data includes at least one of the image data, interest point data, and road network data of the corresponding urban area; Step S404, for each of the multiple urban areas, Step S405: Input the first feature vector of the city region into the subordinate relationship determination sub-network to obtain the subordinate relationship between the city region and multiple preset semantic clusters; Step S406: For each preset semantic cluster, input the first feature vector of at least one city region included in the preset semantic cluster into the semantic cluster feature extraction sub-network to obtain the semantic cluster feature vector of the preset semantic cluster; Step S407: Obtain the real pseudo-labels of each of the multiple preset semantic clusters, the real pseudo-labels indicating whether the corresponding preset semantic cluster includes the target category city region in the multiple sample city regions; Step S408: Input the semantic cluster of each preset semantic cluster into the semantic cluster of the multiple preset semantic clusters. The feature vector is input into the pseudo-label prediction sub-network to obtain the predicted pseudo-labels for each of the multiple preset semantic clusters; Step S408: For each sample city region among the multiple sample city regions, the predicted pseudo-labels for each of the multiple preset semantic clusters and the subordinate relationship between the sample city region and the multiple preset semantic clusters are input into the parameter filtering matrix to generate a sub-network, so as to obtain the parameter filtering matrix corresponding to the sample city region; Step S409: For each sample city region among the multiple sample city regions, the prediction sub-network is modified using the parameter filtering matrix corresponding to the sample city region to obtain the prediction sub-network for the sample city region, wherein the sub-network for the sample city region... The prediction subnetwork is configured to predict whether the city area belongs to the target category based on the first feature vector of the sample city area; step S410: For each sample city area among the multiple sample city areas, the first feature vector of the sample city area is input into the prediction subnetwork for the sample city area to obtain the predicted label of the sample city area; step S411: Based on the real labels of the multiple sample city areas, the predicted labels of the multiple sample city areas, the real pseudo labels of the multiple preset semantic clusters, and the predicted pseudo labels of the multiple preset semantic clusters, the loss value is determined; and step S412: Based on the loss value, the neural network is trained.
[0134] Therefore, by determining the hierarchical relationship between multiple city regions and multiple pre-constructed preset semantic clusters, and by determining the feature vector of each preset semantic cluster based on the first feature vector of the city regions included in each preset semantic cluster, the specific mining of regional semantics and the modeling of the relationship between global, long-distance similar regions are realized. Furthermore, by predicting pseudo-labels indicating whether each preset semantic cluster includes regions of the target category, and using the prediction results and the hierarchical relationship between each sample city region and multiple preset semantic clusters, the parameter filtering matrix corresponding to the sample city region is calculated. The parameter filtering matrix is then used to adjust the parameters of the prediction sub-network used to output the task results, so that prediction networks applicable to each city region can be obtained.
[0135] In this way, a neural network that balances the generalization ability of the model (main model) and its adaptability to specific regions (secondary model) can be obtained to process urban data in urban areas, thereby achieving accurate identification results for target category regions.
[0136] According to some embodiments, the neural network further includes a local feature update subnetwork, which is a graph attention network. For example... Figure 5 As shown, the training method for the neural network may further include: step S502, determining the adjacency relationships between multiple city areas; and step S505, using local feature update subnetworks to process the city area map including multiple city areas and the adjacency relationships between them, to update the first feature vector of each city area among the multiple city areas. It is understood that... Figure 5 The operations in steps S501, S503-S504, S506-S507, and S511-S517 are respectively... Figure 4 The operations of steps S401-S412 are similar and will not be repeated here. Step S517, training the neural network based on the loss value, may include: training the local feature update sub-network based on the loss value. Specifically, training the local feature update sub-network may include training the parameters W and a in the graph attention network.
[0137] According to some embodiments, the first feature vector may include the image feature vector of the corresponding urban area and the interest point feature vector of the corresponding urban area. The local feature extraction subnetwork is further configured to: determine image feature vectors for each of the multiple city regions based on image data of each city region; determine interest point feature vectors for each of the multiple city regions based on interest point data of each city region; for each city region: determine an image-image feature vector for the city region based on its image feature vector and the image feature vectors of its surrounding city regions; determine an image-interest point feature vector for the city region based on its image feature vector and the interest point feature vectors of its surrounding city regions; determine an interest point-image feature vector for the city region based on its image feature vector and the interest point feature vectors of its surrounding city regions; determine an interest point-interest point feature vector for the city region based on its interest point feature vector and the image feature vectors of its surrounding city regions; determine an interest point-interest point feature vector for the city region based on its interest point feature vector and the interest point feature vectors of its surrounding city regions; and aggregate the image-image feature vector, image-interest point feature vector, interest point-image feature vector, and interest point-interest point feature vector for the city region to obtain a first feature vector for the city region. Step S517, training the neural network based on the loss value may include: training the parameters W of the intra-modal feature aggregation based on the loss value. P ,a P←P W I ,a I←I and the parameter W′ for cross-modal feature aggregation P ,a P←I ,W′ I ,a I←P Parameters such as these.
[0138] According to some embodiments, the affiliation between each city area and multiple preset semantic clusters among multiple city areas can include the probability that the city area belongs to each of the multiple preset semantic clusters, i.e., the allocation matrix B. As mentioned above, the allocation matrix B can be represented as:
[0139]
[0140] Among them, W B The training parameter matrix representing the linear transformation can be trained during step S517.
[0141] According to some embodiments, the neural network may also include a semantic cluster feature update subnetwork, which is a graph convolutional network. For example... Figure 5As shown, the training method may further include: Step S508, processing the complete graph composed of multiple preset semantic clusters using the semantic cluster feature update sub-network to update the semantic cluster feature vector of each target preset semantic cluster in the multiple preset semantic clusters. Step S517, training the neural network based on the loss value may include: training the semantic cluster feature update sub-network based on the loss value. Specifically, training the semantic cluster feature update sub-network may include training the transformation matrix W shared by all semantic clusters in the jointly trained graph convolutional network. h The parameterized edge weight e between any two semantic clusters -i and -j ij .
[0142] According to some embodiments, the neural network may also include a global feature extraction subnetwork and an aggregation layer. For example... Figure 5 As shown, the training method may further include: step S509, for each sample city region among multiple sample city regions, inputting the subordinate relationship between the sample city region and multiple preset semantic clusters, as well as the semantic cluster feature vectors of each of the multiple preset semantic clusters, into a global feature extraction sub-network to obtain a second feature vector for the sample city region; and step S510, inputting the first feature vector and the second feature vector of the sample city region into an aggregation layer to obtain an aggregated first feature vector for the sample city region. Step S517, training the neural network based on the loss value may include: training the global feature extraction sub-network based on the loss value. Specifically, as mentioned above, the second feature vector can be represented as:
[0143]
[0144] in, W represents the globally relation-aware region representation returned from the semantic cluster, i.e., the second feature vector. r The parameter matrix that needs to be learned can be trained during step S517.
[0145] According to some embodiments, step S515, for each of the multiple sample city areas, inputting the first feature vector of the sample city area into the prediction sub-network for the sample city area to obtain the predicted label of the sample city area may include: for each of the multiple sample city areas, inputting the aggregated first feature vector of the sample city area into the prediction sub-network for the sample city area to obtain the predicted label of the sample city area.
[0146] According to some embodiments, the predicted pseudo-label indicates the probability that the corresponding predicted semantic cluster may include the urban area of the target category.
[0147] According to some embodiments, the parameter filtering matrix generation subnetwork can be configured to: for each of the multiple sample city regions, aggregate the probability of the sample city region belonging to each of the multiple preset semantic clusters and the predicted pseudo-label of the semantic cluster to obtain the context feature vector of the sample city region; and determine the parameter filtering matrix corresponding to the sample city region based on the context feature vector of the sample city region.
[0148] As mentioned earlier, the context feature vector can be represented as:
[0149]
[0150] Where, q i Represents a context vector, such as a region. B represents the inclusion probability of all semantic clusters. i,* This represents the i-th row of the allocation matrix. Indicates the Hadamardi product, W q These are learnable parameters that can be trained during step S517.
[0151] The parameter filtering matrix can be represented as:
[0152]
[0153] in, Let W represent the parameter filtering matrix for region i, σ represent the Sigmoid activation function, and W represent the parameter filtering matrix for region i. f This represents the weights that linearly map the context vector to the parameter space of the main model, which can be trained during step S517.
[0154] According to some embodiments, the parameter filtering matrix corresponding to each of the multiple sample city regions can correspond to at least a portion of the parameters in the prediction subnetwork. Step S514: For each of the multiple sample city regions, modifying the trained prediction subnetwork using the parameter filtering matrix corresponding to that sample city region to obtain a prediction subnetwork for that sample city region may include: replacing at least a portion of the parameters of the prediction subnetwork with the Hadamard product of the parameter filtering matrix corresponding to that sample city region and at least a portion of the parameters to obtain a prediction subnetwork for that sample city region.
[0155] According to some embodiments, step S516, determining the loss value based on the real labels, predicted labels, real pseudo labels, and predicted pseudo labels of multiple sample city regions, may include: determining a first loss value component based on the real labels and predicted labels of multiple sample city regions; determining a second loss value component based on the real pseudo labels and predicted pseudo labels of multiple preset semantic clusters; and determining the loss value based on the first and second loss value components. Thus, the pseudo label prediction task and the final region recognition result task can be combined to achieve end-to-end training of a neural network composed of multiple sub-networks.
[0156] In some embodiments, the loss function of the main model can be binary cross-entropy (BCE):
[0157]
[0158] Among them, V L This represents a set of labeled regions. The above formula can be used to determine the parameters Φ of the main model. p Conduct training.
[0159] After adjusting the parameters of the main model using the parameter filtering matrix to obtain the secondary model, the first loss component can be obtained:
[0160]
[0161] The overall optimization objective at this stage can be expressed as a weighted combination of the pseudo-label prediction loss and the urban village identification loss, where λ represents the balance parameter of the two loss functions:
[0162]
[0163] Therefore, the parameters Φ of the main model can be adjusted simultaneously. m Calculate the parameter filtering matrix All parameters used, and the parameter Φ used to calculate the pseudo-label. p Conduct training.
[0164] According to some embodiments, probability estimation for pseudo-labels is actually a positive-unlabeled learning (PU) problem, where semantic clusters that do not contain known urban villages should be considered as samples with unknown labels, rather than directly as negative samples. Therefore, the second loss component can adopt ranking loss:
[0165]
[0166] in, and These represent the sets of semantic clusters that contain / do not contain known urban villages, respectively. By minimizing... They will learn how to estimate the probability that a semantic cluster contains an urban village.
[0167] According to another aspect of this disclosure, a neural network for task processing is provided. For example... Figure 6 As shown, the neural network 600 includes: a local feature extraction subnetwork 602, configured to determine a first feature vector for each of the multiple urban regions based on urban data 616 of each urban region, wherein the urban data includes at least one of image data, point of interest data, and road network data of the corresponding urban region; a membership determination subnetwork 604, configured to determine the membership relationship between each urban region and multiple preset semantic clusters based on the first feature vector of that urban region; and a semantic cluster feature extraction subnetwork 606, configured to extract features for each preset semantic cluster based on the first feature vector of at least one urban region included in that preset semantic cluster. The semantic cluster feature vector of the preset semantic cluster is determined; the pseudo-label prediction subnetwork 608 is configured to predict pseudo-labels for each of the preset semantic clusters based on the semantic cluster feature vector of each of the preset semantic clusters, the pseudo-labels indicating whether the corresponding preset semantic cluster includes the target category's urban area; the parameter filtering matrix generation subnetwork 610 is configured to determine the parameter filtering matrix corresponding to the target urban area based on the prediction results of the pseudo-labels of the preset semantic clusters and the subordinate relationship between the target urban area and the preset semantic clusters in the multiple urban areas; and the prediction subnetwork 612 is configured to be corrected using the parameter filtering matrix corresponding to the target urban area to obtain the prediction subnetwork 614 for the target urban area (in Figure 6 (The prediction subnetwork 612 is shown in the same block as the prediction subnetwork 612), wherein the prediction subnetwork for the target city region is configured to output a prediction result 618 of whether the target city region is a city region of the target category based on a first feature vector of the target city region. It can be understood that the operations of subnetworks 602-614 in neural network 600 are respectively related to... Figure 1 The operations of steps S102-S108 are similar and will not be described in detail here.
[0168] In some embodiments, the arrow pointing from the subnetwork 604 to the parameter filtering matrix generation subnetwork 610 can refer to the assignment matrix B, and the arrow pointing from the subnetwork 604 to the semantic cluster feature extraction subnetwork 606 can refer to the binarized assignment matrix.
[0169] According to some embodiments, such as Figure 7As shown, the neural network 700 may further include a local feature update subnetwork 720. The local feature update subnetwork 720 can be a graph attention network and can be configured to process a city region graph including multiple city regions and adjacency relationships between them to update the first feature vector of that city region. It is understood that the operations of subnetworks 702-714, input 716, and output 718 in neural network 700 are similar to those of subnetworks 602-614, input 616, and output 618 in neural network 600, and will not be elaborated upon here.
[0170] According to some embodiments, such as Figure 7 As shown, the neural network 700 may further include a semantic cluster feature update subnetwork 722. The semantic cluster feature update subnetwork 722 is a graph convolutional network and can be configured to process a complete graph composed of multiple preset semantic clusters to update the semantic cluster feature vector of each target preset semantic cluster in the multiple preset semantic clusters.
[0171] According to some embodiments, such as Figure 7 As shown, the neural network 700 may further include: a global feature extraction subnetwork 724, configured to determine a second feature vector of the target city region based on the hierarchical relationship between the target city region and multiple preset semantic clusters, and the semantic cluster feature vectors of each of the multiple preset semantic clusters; and an aggregation layer 726, configured to aggregate the first feature vector and the second feature vector of the target city region to obtain an aggregated first feature vector of the target city region. For each of the multiple city regions, a prediction subnetwork 714 for that city region may be further configured to output a prediction result on whether the target city region is a city region of the target category based on the aggregated first feature vector of the target city region.
[0172] In some embodiments, the arrows pointing from the subnetwork 704 (subnetwork 704) to the parameter filtering matrix generation subnetwork 710 and the global feature extraction subnetwork 724 can refer to the assignment matrix B, and the arrow pointing from the subnetwork 704 to the semantic cluster feature extraction subnetwork 706 can refer to the binarized assignment matrix.
[0173] In summary, the proposed solution can fully leverage the advantages of multimodal information and graph neural networks (GNNs) to promote the fusion of multimodal data in the task of identifying urban areas of target categories, model complex spatial and semantic relationships between regions, overcome the problem of sparsity of labeled data, and improve the accuracy of identifying large-scale urban areas of target categories within the city.
[0174] Specifically, firstly, compared to manual experience-based methods such as questionnaires and field investigations, the method disclosed herein can achieve large-scale identification across the entire city. Secondly, compared to machine learning methods based on satellite imagery, this method utilizes multimodal data and incorporates cross-modal contextual information during feature aggregation across different modalities, promoting the fusion of multimodal information and enhancing regional representation. Simultaneously, leveraging the advantages of graph neural networks, it can model complex relationships between regions. Building upon this, this method further mines the semantic features of regions and models global relationships, promoting interactions between long-distance regions and effectively utilizing supervisory signals from distant labeled data to alleviate the training challenge of sparse labels in the identification of urban regions of target categories. Furthermore, this method considers the diversity of urban regions, proposing a master-slave model mechanism that balances the model's generalization performance and adaptability to different regions using very limited labeled data, thereby improving identification accuracy.
[0175] It is understood that some steps, sub-steps, or structures, sub-networks, modules, etc. in the neural network (e.g., aggregation functions, activation functions, loss functions, etc.) in this disclosure may be added, removed, adjusted, or replaced as needed, but this does not affect the embodiment of the inventive concept of this disclosure. All solutions obtained through such modifications are within the protection scope of this disclosure.
[0176] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0177] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0178] refer to Figure 8 The present invention describes a structural block diagram of an electronic device 800 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0179] like Figure 8As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0180] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, output unit 807, storage unit 808, and communication unit 809. Input unit 806 can be any type of device capable of inputting information to device 800. Input unit 806 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the electronic device, and can include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 807 can be any type of device capable of presenting information, and can include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 808 can include, but is not limited to, a hard disk and an optical disk. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and can include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0181] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning network algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as task processing methods and / or neural network training methods. For example, in some embodiments, the task processing methods and / or neural network training methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the task processing methods and / or neural network training methods described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform task processing methods and / or neural network training methods.
[0182] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0183] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0184] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0185] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0186] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0187] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0188] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0189] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.
Claims
1. A task processing method, comprising: Identify multiple urban areas within the target city; Based on the urban data of each of the plurality of urban areas, a first feature vector is determined for each of the plurality of urban areas, wherein the urban data includes at least one of the image data, point of interest data, and road network data of the corresponding urban area; For each of the multiple city regions, the subordinate relationship between the city region and multiple preset semantic clusters is determined based on the first feature vector of the city region. For each of the plurality of preset semantic clusters, the semantic cluster feature vector of the preset semantic cluster is determined based on the first feature vector of each of the at least one city region included in the preset semantic cluster. Based on the semantic cluster feature vector of each of the plurality of preset semantic clusters, predict the pseudo-label of each of the plurality of preset semantic clusters, and the pseudo-label indicates whether the corresponding preset semantic cluster includes the urban area of the target category; Based on the prediction results of the pseudo-labels of the multiple preset semantic clusters and the subordinate relationship between the target city region and the multiple preset semantic clusters in the multiple city regions, the parameter filtering matrix corresponding to the target city region is determined. The trained prediction network is modified using a parameter filtering matrix corresponding to the target city region to obtain a prediction network for the target city region. This prediction network is configured to predict whether the target city region belongs to the target category based on a first feature vector of the target city region. The first feature vector of the target city area is input into the prediction network for the target city area to obtain the prediction result.
2. The method according to claim 1, wherein, The subordinate relationship between each of the plurality of city regions and the plurality of preset semantic clusters includes the probability that the city region belongs to each of the plurality of preset semantic clusters. The parameter filtering matrix corresponding to the target city area includes: The probability of the target city region belonging to each of the plurality of preset semantic clusters and the prediction result of the pseudo-label of that semantic cluster are aggregated to obtain the context feature vector of the target city region; and Based on the context feature vector of the target city region, a parameter filtering matrix corresponding to the target city region is determined.
3. The method according to claim 2, wherein, The prediction result of the pseudo-label indicates the probability that the corresponding preset semantic cluster includes the urban area of the target category.
4. The method according to any one of claims 1-3, wherein, The parameter filtering matrix corresponding to the target city region corresponds to at least a portion of the parameters in the prediction network. The process of correcting the trained prediction network using the parameter filtering matrix corresponding to the target city region to obtain a prediction network for the target city region includes: At least some of the parameters of the prediction network are replaced with a parameter filtering matrix corresponding to the target city region and the Hadamard product of the at least some parameters to obtain a prediction network for the target city region.
5. The method according to claim 4, wherein, The prediction network is a multilayer perceptron.
6. The method according to any one of claims 1-3, further comprising: Based on the hierarchical relationship between the target city region and the multiple preset semantic clusters, and the semantic cluster feature vectors of each of the multiple preset semantic clusters, a second feature vector of the target city region is determined; as well as The first feature vector and the second feature vector of the target city region are aggregated to obtain the aggregated first feature vector of the target city region. Specifically, inputting the first feature vector of the target city region into a prediction network for the target city region to obtain prediction results includes: The aggregated first feature vector of the target city region is input into the prediction network for the target city region to obtain the prediction result.
7. The method according to any one of claims 1-3, further comprising: The trained graph convolutional network is used to process the complete graph composed of the multiple preset semantic clusters to update the semantic cluster feature vector of each preset semantic cluster.
8. The method according to any one of claims 1-3, wherein, For each of the plurality of preset semantic clusters, based on the first feature vectors of at least one urban area included in the preset semantic cluster, the semantic cluster feature vector of the preset semantic cluster is determined to include: For each of the plurality of preset semantic clusters, the sum of the first feature vectors of at least one urban area included in the preset semantic cluster is determined as the semantic cluster feature vector of the preset semantic cluster.
9. The method according to any one of claims 1-3, further comprising: Determine the adjacency relationships between the multiple city areas; as well as A trained graph attention network is used to process the city region map, which includes the multiple city regions and the adjacency relationships between them, to update the first feature vector of each of the multiple city regions. Furthermore, among the plurality of urban areas, two urban areas that satisfy at least one of the following conditions are adjacent to each other: Two adjacent urban areas; and Two urban areas within a preset distance in the road network data.
10. The method according to any one of claims 1-3, wherein, The first feature vector includes the image feature vector of the corresponding urban area and the interest point feature vector of the corresponding urban area. Determining the first feature vector for each of the plurality of urban areas based on the urban data of each urban area includes: Based on the image data of each of the multiple city regions, determine the image feature vector of each of the multiple city regions; Based on the point-of-interest data of each of the multiple city regions, determine the point-of-interest feature vector for each of the multiple city regions; and For each of the multiple city regions: Based on the image feature vectors of the urban area and the image feature vectors of the surrounding urban areas, the image-image feature vector of the urban area is determined. Based on the image feature vector of the urban area and the interest point feature vectors of the surrounding urban areas, the image-interest point feature vector of the urban area is determined. Based on the point of interest feature vector of the city area and the image feature vector of the surrounding city areas, the point of interest-image feature vector of the city area is determined. Based on the feature vectors of interest points in the urban area and the feature vectors of interest points in the surrounding urban areas, the interest point-interest point feature vector of the urban area is determined; and The image-image feature vector, image-point of interest feature vector, point of interest-image feature vector, and point of interest-point of interest feature vector of the city area are aggregated to obtain the first feature vector of the city area.
11. The method according to any one of claims 1-3, wherein, The target category refers to urban village areas.
12. A method for training a neural network, wherein, The neural network includes a local feature extraction subnetwork, a membership determination subnetwork, a semantic cluster feature extraction subnetwork, a pseudo-label prediction subnetwork, a parameter filtering matrix generation subnetwork, and a prediction subnetwork. The method includes: Identify multiple urban areas within the target city, wherein the multiple urban areas include multiple sample urban areas; Obtain the true labels of each of the multiple sample city regions, where the true labels indicate whether the corresponding city region is a city region of the target category. The city data of each of the plurality of city regions is input into the local feature extraction subnetwork to obtain the first feature vector of each of the plurality of city regions, wherein the city data includes at least one of the image data, point of interest data and road network data of the corresponding city region; For each of the multiple city regions, the first feature vector of the city region is input into the subordinate relationship determination sub-network to obtain the subordinate relationship between the city region and multiple preset semantic clusters; For each of the plurality of preset semantic clusters, the first feature vector of each of the at least one urban area included in the preset semantic cluster is input into the semantic cluster feature extraction sub-network to obtain the semantic cluster feature vector of the preset semantic cluster. Obtain the real pseudo-labels of each of the multiple preset semantic clusters, where the real pseudo-labels indicate whether the corresponding preset semantic cluster includes the target category city area among the multiple sample city areas; The semantic cluster feature vector of each of the plurality of preset semantic clusters is input into the pseudo-label prediction sub-network to obtain the predicted pseudo-labels of each of the plurality of preset semantic clusters. For each of the multiple sample city regions, the predicted pseudo-labels of the multiple preset semantic clusters and the subordinate relationship between the sample city region and the multiple preset semantic clusters are input into the parameter filtering matrix to generate a sub-network, so as to obtain the parameter filtering matrix corresponding to the sample city region. For each of the plurality of sample city regions, the prediction subnetwork is modified using the parameter filtering matrix corresponding to the sample city region to obtain a prediction subnetwork for the sample city region. The prediction subnetwork for the sample city region is configured to predict whether the sample city region is a city region of the target category based on the first feature vector of the sample city region. For each of the multiple sample city regions, the first feature vector of the sample city region is input into the prediction sub-network for that sample city region to obtain the predicted label of that sample city region. Based on the true labels of the multiple sample city regions, the predicted labels of the multiple sample city regions, the true pseudo labels of the multiple preset semantic clusters, and the predicted pseudo labels of the multiple preset semantic clusters, a loss value is determined; and The neural network is trained based on the loss value.
13. The method according to claim 12, wherein, The subordinate relationship between each of the plurality of city regions and the plurality of preset semantic clusters includes the probability that the city region belongs to each of the plurality of preset semantic clusters. The parameter filtering matrix generation subnetwork is configured as follows: For each of the multiple sample city regions, the probability of the sample city region belonging to each of the multiple preset semantic clusters and the predicted pseudo-label of that semantic cluster are aggregated to obtain the context feature vector of the sample city region; and Based on the contextual feature vector of the sample city region, determine the parameter filtering matrix corresponding to the sample city region.
14. The method according to claim 13, wherein, The predicted pseudo-label indicates the probability that the corresponding preset semantic cluster includes the urban area of the target category.
15. The method according to any one of claims 12-14, wherein, The parameter filtering matrix corresponding to each of the plurality of sample city regions corresponds to at least a portion of the parameters in the prediction sub-network. Specifically, for each of the plurality of sample city regions, the prediction sub-network is modified using the parameter filtering matrix corresponding to that sample city region to obtain a prediction sub-network for that sample city region, including: At least some of the parameters of the prediction subnetwork are replaced with the parameter filtering matrix corresponding to the sample city area and the Hadamard product of the at least some parameters to obtain the prediction subnetwork for the sample city area.
16. The method according to any one of claims 12-14, wherein, Based on the true labels of the multiple sample city regions, the predicted labels of the multiple sample city regions, the true pseudo labels, and the predicted pseudo labels, the loss value is determined as follows: Based on the true labels and predicted labels of the multiple sample city regions, the first loss value component is determined. Based on the real pseudo-labels and predicted pseudo-labels of the plurality of preset semantic clusters, a second loss value component is determined; and The loss value is determined based on the first loss value component and the second loss value component.
17. The method according to claim 16, wherein, The second loss component is the ranking loss.
18. The method according to any one of claims 12-14, wherein, The neural network further includes a global feature extraction subnetwork and an aggregation layer, and the method further includes: For each of the plurality of sample city regions, the hierarchical relationship between the sample city region and the plurality of preset semantic clusters, as well as the semantic cluster feature vectors of each of the plurality of preset semantic clusters, are input into the global feature extraction subnetwork to obtain the second feature vector of the sample city region; and The first feature vector and the second feature vector of the sample city region are input into the aggregation layer to obtain the aggregated first feature vector of the sample city region. Training the neural network based on the loss value includes: Based on the loss value, train the global feature extraction sub-network. Specifically, for each of the plurality of sample city regions, the first feature vector of the sample city region is input into the prediction sub-network for that sample city region to obtain the predicted label of that sample city region, including: For each of the multiple sample city regions, the aggregated first feature vector of the sample city region is input into the prediction sub-network for that sample city region to obtain the predicted label of that sample city region.
19. The method according to any one of claims 12-14, wherein, The neural network further includes a semantic cluster feature update sub-network, which is a graph convolutional network. The method further includes: The semantic cluster feature update sub-network is used to process the complete graph composed of the multiple preset semantic clusters to update the semantic cluster feature vector of each preset semantic cluster. Training the neural network based on the loss value includes: Based on the loss value, the semantic cluster feature update subnetwork is trained.
20. The method according to any one of claims 12-14, wherein, The neural network further includes a local feature update subnetwork, which is a graph attention network, and the method further includes: Determine the adjacency relationships between the multiple city areas; and The local feature update subnetwork is used to process the city region map, which includes the multiple city regions and the adjacency relationships between them, to update the first feature vector of each of the multiple city regions. Training the neural network based on the loss value includes: Based on the loss value, train the local feature update subnetwork. Furthermore, among the plurality of urban areas, two urban areas that satisfy at least one of the following conditions are adjacent to each other: Two adjacent urban areas; and Two urban areas within a preset distance in the road network data.
21. The method according to any one of claims 12-14, wherein, The first feature vector includes the image feature vector of the corresponding urban area and the interest point feature vector of the corresponding urban area, wherein the local feature extraction subnetwork is further configured as follows: Based on the image data of each of the multiple city regions, determine the image feature vector of each of the multiple city regions; Based on the point of interest data of each of the multiple city regions, determine the point of interest feature vector of each of the multiple city regions. For each of the multiple city regions: Based on the image feature vectors of the urban area and the image feature vectors of the surrounding urban areas, the image-image feature vector of the urban area is determined. Based on the image feature vector of the urban area and the interest point feature vectors of the surrounding urban areas, the image-interest point feature vector of the urban area is determined. Based on the point of interest feature vector of the city area and the image feature vector of the surrounding city areas, the point of interest-image feature vector of the city area is determined. Based on the feature vectors of interest points in the urban area and the feature vectors of interest points in the surrounding urban areas, the interest point-interest point feature vector of the urban area is determined; and The image-image feature vector, image-point of interest feature vector, point of interest-image feature vector, and point of interest-point of interest feature vector of the city area are aggregated to obtain the first feature vector of the city area.
22. A neural network for task processing, comprising: A local feature extraction subnetwork is configured to determine a first feature vector for each of the multiple urban regions based on urban data of each urban region, wherein the urban data includes at least one of image data, point of interest data, and road network data of the corresponding urban region; The subordinate relationship determination subnetwork is configured to determine the subordinate relationship between a city region and multiple preset semantic clusters based on a first feature vector of the city region for each of the multiple city regions. The semantic cluster feature extraction subnetwork is configured to determine the semantic cluster feature vector of each of the plurality of preset semantic clusters based on the first feature vector of each of the at least one urban area included in the preset semantic cluster. The pseudo-label prediction subnetwork is configured to predict pseudo-labels for each of the plurality of preset semantic clusters based on the semantic cluster feature vector of each preset semantic cluster. The pseudo-labels indicate whether the corresponding preset semantic cluster includes the urban area of the target category. A parameter filtering matrix generation subnetwork is configured to determine the parameter filtering matrix corresponding to the target city region based on the prediction results of the pseudo-labels of the multiple preset semantic clusters and the hierarchical relationship between the target city region and the multiple preset semantic clusters in the multiple city regions; and The prediction subnetwork is configured to be modified using a parameter filtering matrix corresponding to the target city region to obtain a prediction subnetwork for the target city region, wherein the prediction subnetwork for the target city region is configured to output a prediction result on whether the target city region is a city region of the target category based on a first feature vector of the target city region.
23. The neural network of claim 22, further comprising: A global feature extraction subnetwork is configured to determine a second feature vector of the target city region based on the hierarchical relationship between the target city region and the plurality of preset semantic clusters and the semantic cluster feature vectors of the plurality of preset semantic clusters. as well as The aggregation layer is configured to aggregate the first feature vector and the second feature vector of the target city region to obtain the aggregated first feature vector of the target city region. The prediction subnetwork for the target city area is further configured to output a prediction result on whether the target city area is a city area of the target category based on the aggregated first feature vector of the target city area.
24. The neural network according to claim 22, further comprising: A semantic cluster feature update subnetwork, wherein the semantic cluster feature update subnetwork is a graph convolutional network and is configured to process a complete graph composed of the plurality of preset semantic clusters to update the semantic cluster feature vector of each of the plurality of preset semantic clusters.
25. The neural network according to claim 22, further comprising: A local feature update subnetwork, wherein the local feature update subnetwork is a graph attention network and is configured to process a city region graph including the plurality of city regions and the adjacency relationships between the plurality of city regions to update the first feature vector of each of the plurality of city regions.
26. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-21.
27. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-21.
28. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method of any one of claims 1-21.