Urban model area representation generation method, device, electronic device and medium
By constructing a multi-dimensional urban knowledge graph and a graph convolutional neural network, the representation vector of the urban model area is generated, which solves the problem of inaccurate representation caused by a single data source and improves the prediction accuracy of socio-economic indicators.
Patent Information
- Application Number
- CN202311380249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-10-23
AI Technical Summary
The urban model area representation in the existing technology is based on a single data source, resulting in inaccurate representation and inability to accurately predict socioeconomic indicators.
By constructing a multi-dimensional urban knowledge graph and combining it with a graph convolutional neural network, global and local representation vectors are generated, and the loss function is optimized to obtain the target representation vector.
It achieves accurate representation of urban model areas and improves the prediction accuracy of socio-economic indicators.
Smart Images

Figure CN117390197B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and medium for generating a city model area representation. Background Art
[0002] The regional representation of the city model can be understood as using the massive multi-source heterogeneous data of the city model to learn a representation vector for each region in the city model, so that the socioeconomic indicators of the city model, such as population, education, crime, etc., can be predicted based on the regional representation vector. However, in the prior art, the regional representation of the city model in the city model is often obtained based on a single data source of the city model, such as crowd movement data, which leads to inaccurate regional representation of the city model in the city model. Summary of the invention
[0003] The present application provides a method, device, electronic device and medium for generating a city model area representation, which can accurately generate a target representation vector of the city model area in the city model, thereby laying a foundation for accurately predicting the socio-economic indicators of the city model based on the target representation vector of the city model area.
[0004] In a first aspect, the present application provides a method for generating a city model region representation, comprising:
[0005] Acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of points of interest located in the city model areas;
[0006] Based on the city data information, construct a city knowledge graph of the target city model; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0007] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0008] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0009] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0010] In one embodiment, based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained, including:
[0011] Based on the city knowledge graph, determining an initial global representation vector of an entity corresponding to the city model area;
[0012] Based on the initial global representation vector, obtaining a global representation vector to be optimized for the city model area through a preset first graph convolutional neural network;
[0013] Obtaining a local representation vector of the subgraph to be optimized in the city model area under the dimension corresponding to the knowledge graph subgraph; the local representation vector of the subgraph to be optimized is obtained by taking the global representation vector to be optimized as an initial representation and inputting the initial representation into a preset second graph convolutional neural network;
[0014] Based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, a target loss function is determined, and the first graph convolutional neural network and the second graph convolutional neural network are iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges, so as to obtain an optimized first graph convolutional neural network and an optimized second graph convolutional neural network;
[0015] The global representation vector to be optimized output by the optimized first graph convolutional neural network is used as the global representation vector of the city model area, and the sub-graph local representation vector to be optimized output by the optimized second graph convolutional neural network is used as the sub-graph local representation vector of the city model area.
[0016] In one embodiment, before determining the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, the method further includes:
[0017] Determining the weight value of each local representation vector of the sub-graph to be optimized;
[0018] The determining of the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized includes:
[0019] Based on the weight value and each of the sub-graph local representation vectors to be optimized, obtaining the local representation vector to be optimized of the city model area;
[0020] Based on the global representation vector to be optimized, determining a triple score of the fact triple corresponding to the global representation vector to be optimized;
[0021] Based on the triple score, determining a knowledge graph completion loss function; the knowledge graph completion loss function is used to characterize the rationality of the fact corresponding to the fact triple;
[0022] Based on the global representation vector to be optimized and the local representation vector to be optimized, obtaining a fused representation vector to be optimized for the city model area;
[0023] Based on the fused representation vector to be optimized, estimating the probability of passenger flow transfer in the urban model area;
[0024] Based on the passenger flow transfer probability, determining a regional similarity loss function; the regional similarity loss function is used to characterize the similarity between different city model regions;
[0025] Based on the knowledge graph completion loss function and the region similarity loss function, the target loss function is obtained.
[0026] In one embodiment, the step of obtaining the weight value of each local representation vector of the sub-graph to be optimized includes:
[0027] Based on each of the local representation vectors of the subgraph to be optimized, determining the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph to be optimized;
[0028] Based on the importance value, a weight value of the local representation vector of the subgraph to be optimized is determined.
[0029] In one embodiment, obtaining the local representation vector of the city model area based on the sub-graph local representation vector includes:
[0030] Based on the subgraph local representation vector, determining the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector;
[0031] Based on the importance value, determining a weight value of the subgraph local representation vector;
[0032] Based on the weight value and the sub-graph local representation vector, a local representation vector of the city model area is obtained.
[0033] In one embodiment, the city knowledge graph includes at least a knowledge graph subgraph under the spatial knowledge dimension, a knowledge graph subgraph under the functional knowledge dimension, a knowledge graph subgraph under the crowd movement knowledge dimension, and a knowledge graph subgraph under the business knowledge dimension; the spatial knowledge represents the proximity relationship of the city model areas in spatial distance; the functional knowledge represents the affiliation of the points of interest and the category information of the points of interest, and the positional relationship between the points of interest and the city model areas; the crowd movement knowledge represents the flow of people transfer relationship between different city model areas; the business knowledge represents the positional relationship between the business district, the points of interest and the city model areas.
[0034] In one embodiment, constructing a city knowledge graph of the target city model based on the city data information includes:
[0035] Based on the location information and category information of POIs, spatial knowledge, functional knowledge, crowd movement knowledge and business knowledge are constructed; spatial knowledge describes the proximity relationship of spatial distances between urban model regions; functional knowledge describes the relationship between POIs, POI categories and urban model regions; crowd movement knowledge describes the relationship between the flow of people between regions; business knowledge describes the relationship between business districts and POIs and regions;
[0036] Entities and relationships between entities corresponding to the spatial knowledge, the functional knowledge, the crowd movement knowledge and the business knowledge are extracted from the city data to obtain the city knowledge graph.
[0037] In a second aspect, the present application provides a device for generating a city model region representation, including: an acquisition module, a construction module, and a generation module;
[0038] An acquisition module, configured to acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of a point of interest located in the city model area;
[0039] A construction module, used to construct a city knowledge graph of the target city model based on the city data information; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0040] Generate modules for:
[0041] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0042] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0043] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0044] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a city model area representation as described in the first aspect is implemented.
[0045] In a fourth aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating a city model area representation as described in the first aspect.
[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating a city model area representation as described in the first aspect.
[0047] The method, device, electronic device and medium for generating the representation of the urban model area provided by the present application obtain the urban data information of the target urban model, and construct the urban knowledge graph of the target urban model based on the urban data information; based on the urban knowledge graph, obtain the global representation vector of the urban model area, and the local representation vectors of the subgraphs of the urban model area in the dimensions corresponding to the knowledge graph subgraphs; based on the local representation vectors of each subgraph, obtain the local representation vector of the urban model area, and based on the global representation vector and the local representation vector, obtain the target representation vector of the urban model area. The technical solution of the embodiment of the present application can be used to accurately generate the target representation vector of the urban model area, thereby laying a foundation for accurately predicting the socio-economic indicators of the urban model based on the target representation vector of the urban model area. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 It is a flowchart of the method for generating the urban model area representation provided by the present application;
[0050] Figure 2 It is a schematic diagram of the framework of the urban knowledge graph provided by this application;
[0051] Figure 3 It is a schematic diagram of the framework of the knowledge graph subgraph provided by this application;
[0052] Figure 4 It is a schematic diagram of the process of obtaining the global representation vector of the city model area and the subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph based on the city knowledge graph provided by this application;
[0053] Figure 5 It is a flowchart of determining the target loss function provided by this application;
[0054] Figure 6 It is a structural schematic diagram of a device for generating a city model area representation provided by the present application;
[0055] Figure 7 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0057] Knowledge Graph is a knowledge base that uses a graph structure to store facts in the real world. Entities in the knowledge graph represent things and concepts in the real world, and edges between entities represent the relationships between entities. Facts in the knowledge graph are usually described by triples (h, r, t), where h and t represent the head entity and the tail entity, and r represents the relationship between them.
[0058] The method for generating the urban model region representation provided in this application integrates various knowledge in the city by constructing an urban knowledge graph, models the semantic information between the elements of each urban model, and designs a hierarchical knowledge distillation model (corresponding to the first graph convolutional neural network and the second graph convolutional neural network) to capture global knowledge (corresponding to the global representation vector) and various domain knowledge (corresponding to the local representation vector) to obtain the representation vector of the urban model region. The urban model can be understood as a collection of cities composed of multiple cities gathered together, so each city in the urban model can be represented as a target city model.
[0059] Figure 1 It is a flowchart of the method for generating the urban model area representation provided in this application.
[0060] In order to further introduce the urban model area representation generation method provided by this application, Figure 1 Provide explanation.
[0061] In an exemplary embodiment of the present application, Figure 1 It can be seen that the method for generating a city model region representation may include steps 110 to 150, and each step will be introduced below.
[0062] In step 110, city data information of the target city model is obtained.
[0063] In step 120, a city knowledge graph of the target city model is constructed based on the city data information.
[0064] The target city model includes multiple city model areas, and the city data information includes at least the location information and category information of the points of interest located in the city model areas. The city knowledge graph includes knowledge graph subgraphs under multiple dimensions. The city data is multivariate heterogeneous city data.
[0065] In one embodiment, in the process of constructing a city knowledge graph, four types of knowledge related to the target city model and the region - spatial knowledge, functional knowledge, crowd movement knowledge and business knowledge - can be considered and the entities corresponding to the four types of knowledge and the relationships between the entities can be extracted from the city data.
[0066] Among them, spatial knowledge describes the proximity relationship of spatial distances in urban model areas; functional knowledge describes the relationship between points of interest, categories of points of interest and urban model areas; crowd movement knowledge describes the relationship between the transfer of people flow between areas; and commercial knowledge describes the relationship between business districts and points of interest and areas.
[0067] In another exemplary embodiment of the present application, the city knowledge graph may include at least a knowledge graph subgraph under the spatial knowledge dimension, a knowledge graph subgraph under the functional knowledge dimension, a knowledge graph subgraph under the crowd movement knowledge dimension, and a knowledge graph subgraph under the business knowledge dimension; the spatial knowledge represents the proximity relationship of the urban model areas in spatial distance; the functional knowledge represents the affiliation of the points of interest and the category information of the points of interest, and the positional relationship between the points of interest and the urban model areas; the crowd movement knowledge represents the flow transfer relationship between different urban model areas; the business knowledge represents the positional relationship between business districts, points of interest and urban model areas.
[0068] Figure 2 It is a schematic diagram of the framework of the urban knowledge graph provided by this application. Figure 3 This is a schematic diagram of the knowledge graph subgraph provided by this application. Figure 2 and Figure 3 It can be seen that the knowledge graph subgraph under the spatial knowledge dimension can correspond to Figure 3 The spatial subgraph in the functional knowledge dimension can correspond to Figure 3 The functional subgraph in the knowledge graph; the knowledge graph subgraph under the crowd mobile knowledge dimension can correspond to Figure 3 The crowd movement subgraph in the business knowledge dimension can correspond to Figure 3 The business subgraph in .
[0069] In another embodiment, the city knowledge graph can be constructed in the following manner:
[0070] In the spatial knowledge dimension, each city model region can be added as an entity to the city knowledge graph. Since spatially adjacent regions are more likely to have similar characteristics, a relationship "region junction" can be added between two regions that share some boundaries. At the same time, the "region proximity" relationship can also be used to connect two regions with a minimum distance of less than 1,000 meters, so as to model the spatial proximity relationship between regions at different scales.
[0071] In the dimension of functional knowledge, the function of a region is mainly determined by the points of interest and the categories of points of interest therein. Points of interest such as schools, restaurants, and parks are basic functional units in the city, and can be divided into multiple categories according to their functions. Therefore, points of interest and categories of points of interest can be added to the urban knowledge graph as entities, and the points of interest and the regions to which they belong are connected by the relationship "points of interest are located", and the relationship "points of interest co-occur" is used to describe the common access relationship between points of interest. At the same time, add the relationship "category to which the points of interest belong" to connect the points of interest and their categories. In addition, the cosine similarity between regions can be calculated based on the proportion of points of interest of each category in each region, and each region and the most similar k regions can be connected with the relationship "regional functional similarity".
[0072] In the knowledge dimension of crowd movement, crowd movement data can be generated by the GPS tracks of mobile devices or vehicles, which describes the relationship between the transfer of people between regions and is very important for describing regional characteristics. For example, an area with a large number of people leaving in the morning and a large number of people entering in the evening is likely to be a residential area. The flow of people between two regions can be counted. For each region, it is connected to the k regions with the largest number of people departing from and arriving at the region with a "flow of people to" relationship; at the same time, it is connected to the k regions with the largest number of people arriving at the region with a "flow of people from" relationship.
[0073] In the business knowledge dimension, it can immediately describe the knowledge related to business in the city. The business districts in the city can be added as entities to the knowledge graph. Then, each business district and the areas within its influence range are connected with the relationship "business district service radiation". For each point of interest, the relationship "point of interest belongs to business district" is added between it and the business district to which it belongs, and the relationship "point of interest competition" is added between points of interest that are close in space and have a competitive relationship.
[0074] In another embodiment, the meaning of each relationship in the city knowledge graph and the connected entity categories can be summarized as shown in Table 1:
[0075] Table 1 Summary of the meaning of each relationship and the connected entity categories in the city knowledge graph
[0076]
[0077]
[0078] It is understandable that the city knowledge graph constructed in this embodiment includes multiple entities in the city and complex relationships between entities, and can model semantic information between entities. In practical applications, the structure of the city knowledge graph can be adjusted according to the available data. For example, when a certain type of data is missing, the corresponding entities and relationships can be deleted, and other entities and relationships can be further added when there are more types of city data.
[0079] In step 130, based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained.
[0080] In step 140, a local representation vector of the city model area is obtained based on the local representation vectors of each sub-graph.
[0081] In one embodiment, the global knowledge of the urban model area can be captured based on the urban knowledge graph to obtain a global representation vector of the urban model area. In addition, the subgraphs corresponding to each knowledge can be extracted from the urban knowledge graph, and the subgraph local representation vectors of the urban model area in each dimension corresponding to the knowledge graph subgraph can be obtained.
[0082] Furthermore, the local representation vectors of each sub-graph may be fused to obtain the local representation vector of the city model area.
[0083] In another exemplary embodiment of the present application, based on the local representation vectors of each sub-graph, a local representation vector of the city model area is obtained, which can be implemented in the following manner:
[0084] Based on the local representation vectors of each subgraph, determine the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph;
[0085] Based on the importance value, determine the weight value of the sub-graph local representation vector;
[0086] Based on the weight values and the local representation vectors of each sub-graph, a local representation vector of the city model area is obtained.
[0087] In one embodiment, the importance of urban data knowledge possessed by knowledge graph subgraphs is different. Therefore, the local representation vectors of each subgraph under different knowledge dimensions can be adaptively fused to obtain a more reasonable and accurate local representation vector of the urban model area.
[0088] In another embodiment, the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector can be determined according to each subgraph local representation vector. In another example, the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector can be represented by formula (1):
[0089]
[0090] in, Represents the knowledge graph subgraph corresponding to the subgraph local representation vector The importance value of M} represents M knowledge graph subgraphs; A collection representing the city model regions; Represents the city model area i in the knowledge graph subgraph G k The local representation vector of the sub-graph under the corresponding dimension; q is the attention vector; W is the weight matrix, and b is the bias vector.
[0091] In another embodiment, the weight value of the corresponding subgraph local representation vector can be determined according to the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector, and then the local representation vector of the city model area can be obtained based on the weight value and the local representation vectors of each subgraph.
[0092] In another embodiment, based on the weight value and the local representation vectors of each sub-graph, the local representation vector of the city model area can be obtained by using formula (2):
[0093]
[0094] in, Represents the local representation vector of area i of the urban model; Indicates the corresponding weight value.
[0095] In another embodiment, the importance value may be normalized to obtain the weight value of the sub-graph local representation vector. The weight value of the sub-graph local representation vector may be obtained by using formula (3):
[0096]
[0097] In step 150, a target representation vector of the city model area is obtained based on the global representation vector and the local representation vector.
[0098] In one embodiment, the global representation vector and the local representation vector can be concatenated to obtain the target representation vector of the city model area. In one example, the global representation vector can be expressed as e KG , the local representation vector can be expressed as e sub , the target representation vector of the urban model area can be expressed as e reg =[e KG ;e sub ].
[0099] In the present application, a city knowledge graph is constructed by utilizing multi-dimensional heterogeneous urban data, thereby ensuring that the global representation vector and local representation vector of the urban model area obtained based on the urban knowledge graph can cover a variety of information, thereby ensuring the accuracy of the target representation vector of the urban model area obtained based on the global representation vector and local representation vector of the urban model area, and laying the foundation for accurate prediction of the socioeconomic indicators of the urban model based on the target representation vector of the urban model area.
[0100] The urban model area representation generation method provided in the present application obtains urban data information of the target urban model, and constructs an urban knowledge graph of the target urban model based on the urban data information; based on the urban knowledge graph, obtains a global representation vector of the urban model area, and a subgraph local representation vector of the urban model area in each dimension corresponding to the knowledge graph subgraph; based on each subgraph local representation vector, obtains a local representation vector of the urban model area, and based on the global representation vector and the local representation vector, obtains a target representation vector of the urban model area. The technical solution of the embodiment of the present application can be used to accurately generate the target representation vector of the urban model area, thereby laying a foundation for accurately predicting the socioeconomic indicators of the urban model based on the target representation vector of the urban model area.
[0101] Figure 4 This application provides a flow chart of obtaining a global representation vector of a city model area based on a city knowledge graph, and a sub-graph local representation vector of the city model area in each dimension corresponding to a knowledge graph sub-graph.
[0102] In order to further introduce the urban model area representation generation method provided by this application, Figure 4 Provide explanation.
[0103] In an exemplary embodiment of the present application, Figure 4 It can be seen that obtaining the global representation vector of the urban model area and the subgraph local representation vector of the urban model area in each dimension corresponding to the knowledge graph subgraph based on the urban knowledge graph may include steps 410 to 450, and each step will be introduced below.
[0104] In step 410, an initial global representation vector of an entity corresponding to the city model area is determined based on the city knowledge graph.
[0105] In step 420, based on the initial global representation vector, a global representation vector to be optimized of the urban model area is obtained by a preset first graph convolutional neural network.
[0106] The urban knowledge graph contains a variety of knowledge such as space and function, and is a global modeling of various knowledge in the city. In the application process, the knowledge graph embedding model R-GCN can be selected as the global knowledge encoder to distill global knowledge from the urban knowledge graph. In other words, the knowledge graph embedding model R-GCN can be selected as the first graph convolutional neural network, the initial global representation vector can be input into the first graph convolutional neural network, and after multi-layer processing of the first graph convolutional neural network, the global representation vector to be optimized in the urban model area can be obtained.
[0107] In another example, for the entity e corresponding to the city model area i The formula for updating the R-GCN at the (l+1)th layer can be expressed using formula (4):
[0108]
[0109] in, Indicates e i The representation after the lth layer of R-GCN is also called the initial global representation vector of the entity corresponding to the city model area; is through the relationship r and entity e i A collection of connected nodes; and is the learnable weight matrix in the l-th layer R-GCN; σ is the nonlinear activation function; It is the set of all relations in the city knowledge graph; Represents entity e i The representation vector of the (l+1)th layer is also called the global representation vector to be optimized in the urban model area.
[0110] In step 430, a local representation vector of the subgraph to be optimized in the city model area in a dimension corresponding to the knowledge graph subgraph is obtained; the local representation vector of the subgraph to be optimized is obtained by taking the global representation vector to be optimized as the initial representation and inputting the initial representation into a pre-set second graph convolutional neural network.
[0111] It is understandable that regions may play different roles in different knowledge, so in addition to global knowledge, various domain knowledge can also be considered separately. For example, based on the spatial knowledge, functional knowledge, crowd movement knowledge, and business knowledge obtained above, the corresponding entities and relationships are extracted from the city knowledge graph to obtain four subgraphs: spatial subgraph, functional subgraph, crowd movement subgraph, and business subgraph. Each subgraph is also a knowledge graph. In other words, knowledge graph subgraphs under different knowledge dimensions can be obtained.
[0112] In another embodiment, R-GCN can be used as the domain knowledge encoder, that is, R-GCN is used as the second graph convolutional neural network to encode each subgraph separately, and obtain the local representation vector of the subgraph to be optimized in the city model area under the dimension corresponding to the knowledge graph subgraph. It should be pointed out that the initial representation of the region here is the representation encoded by the global knowledge encoder, that is, the local representation vector of the subgraph to be optimized is obtained by using the global representation vector to be optimized (corresponding to the above ) as an initial representation and inputting the initial representation into a preset second graph convolutional neural network to obtain it.
[0113] In step 440, based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, the target loss function is determined, and the first graph convolutional neural network and the second graph convolutional neural network are iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges to obtain the optimized first graph convolutional neural network and the optimized second graph convolutional neural network.
[0114] In step 450, the global representation vector to be optimized output by the optimized first graph convolutional neural network is used as the global representation vector of the city model area, and the sub-graph local representation vector to be optimized output by the optimized second graph convolutional neural network is used as the sub-graph local representation vector of the city model area.
[0115] In another embodiment, the target loss function can be determined according to the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, and the first graph convolutional neural network and the second graph convolutional neural network can be iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges to obtain the optimized first graph convolutional neural network and the optimized second graph convolutional neural network. In the process of model optimization of the first graph convolutional neural network and the second graph convolutional neural network, the network model parameters can be updated based on the gradient descent method.
[0116] Furthermore, after obtaining the optimized first graph convolutional neural network and the optimized second graph convolutional neural network, the global representation vector to be optimized output by the optimized first graph convolutional neural network can be used as the global representation vector of the urban model area, and the local representation vector of the subgraph to be optimized output by the optimized second graph convolutional neural network can be used as the local representation vector of the subgraph of the urban model area. This embodiment can ensure that the representation vectors output by the optimized first graph convolutional neural network and the optimized first graph convolutional neural network are more accurate and more matched with the multivariate heterogeneous data contained in the urban knowledge graph.
[0117] Figure 5 It is a flowchart of determining the target loss function provided by this application.
[0118] The following will be combined Figure 5The process of determining the target loss function is explained.
[0119] In another exemplary embodiment of the present application, Figure 5 It can be seen that determining the target loss function may include steps 510 to 580, and each step will be introduced below.
[0120] In step 510, the weight value of each sub-graph local representation vector to be optimized is determined.
[0121] In one embodiment, the weight value of each local representation vector of the subgraph to be optimized can be obtained in the following manner:
[0122] Based on the local representation vectors of each subgraph to be optimized, determining the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph to be optimized;
[0123] Based on the importance value, the weight value of the local representation vector of the subgraph to be optimized is determined.
[0124] It can be understood that the subgraph local representation vector to be optimized is a subgraph local representation vector that has not been optimized, so the weight value of the subgraph local representation vector to be optimized can be determined in the same way as the weight value of the subgraph local representation vector. In other words, the weight value of the subgraph local representation vector to be optimized can be determined using formulas (1) to (3).
[0125] In step 520, based on the weight values and the local representation vectors of each sub-graph to be optimized, the local representation vector to be optimized of the city model area is obtained.
[0126] In yet another embodiment, the local representation vector to be optimized of the city model area may be obtained according to the weight value and the weighted sum of the local representation vectors of each optimized subgraph.
[0127] In step 530 , based on the global representation vector to be optimized, a triple score of the fact triple corresponding to the global representation vector to be optimized is determined.
[0128] In step 540, based on the triple score, a knowledge graph completion loss function is determined; the knowledge graph completion loss function is used to characterize the rationality of the fact corresponding to the fact triple.
[0129] In another embodiment, after obtaining the global representation vector to be optimized, the fact triple (h, r, t) corresponding to the global representation vector to be optimized can be determined, and the triple score of the fact triple (h, r, t) can be calculated. The triple score can be implemented using formula (5):
[0130]
[0131] Among them, φ(h,r,t) represents the triple score; e h 、e r and e t are the representation vectors of the head entity h, relation r, and tail entity t in the fact triple corresponding to the global representation vector to be optimized. It can be understood that the triple score represents the rationality of the fact. In the application process, the score φ of the triples existing in the knowledge graph should be higher, while the score of the triples not existing in the knowledge graph should be lower. Therefore, the knowledge graph completion loss function is defined as the cross entropy loss function in the following form; the knowledge graph completion loss function can be expressed by formula (6):
[0132]
[0133] in, represents the knowledge graph completion loss function; represents the set of fact triples in the urban knowledge graph; ε represents the set of entities in the urban knowledge graph; (h, r, t′) represents a fact triple different from (h, r, t).
[0134] In step 550, based on the global representation vector to be optimized and the local representation vector to be optimized, a fused representation vector to be optimized of the city model area is obtained.
[0135] In step 560, based on the fused representation vector to be optimized, the probability of passenger flow transfer in the urban model area is estimated.
[0136] In step 570, based on the probability of passenger flow transfer, a regional similarity loss function is determined; the regional similarity loss function is used to characterize the similarity between different city model regions.
[0137] In one embodiment, the goal of the regional similarity loss function is to make the representation vector of the city model region reflect the similarity between the city model regions. In the application process, the global representation vector to be optimized and the local representation vector to be optimized can be combined to obtain the fused representation vector to be optimized for the city model region. The fused representation vector to be optimized for the city model region can be expressed by formula (7):
[0138] e fuse‘ =e KG’ +e sub’ (7)
[0139] Among them, e fuse‘ represents the fusion representation vector to be optimized in the urban model area; e KG’ represents the global representation vector to be optimized; e sub’ Represents the local representation vector to be optimized.
[0140] Furthermore, based on the fused representation vector to be optimized, the probability of the flow of people in the urban model area is estimated. The probability of the flow of people in the urban model area can be expressed by formula (8):
[0141]
[0142] in, represents the probability of passenger flow transfer from urban model area j to urban model area i; represents the fusion representation vector to be optimized in the urban model area i; The fusion representation vector to be optimized for the urban model area j; in the application process, the set of origin-destination area pairs can be obtained from the crowd mobility data Each element represents a trajectory starting from region i and arriving at region j.
[0143] In another embodiment, based on the probability of people flow transfer, the regional similarity loss function can be expressed by formula (9):
[0144]
[0145] in, Represents the region similarity loss function.
[0146] In step 580, a target loss function is obtained based on the knowledge graph completion loss function and the region similarity loss function.
[0147] In another embodiment, a target loss function can be obtained based on a combination of a knowledge graph completion loss function and a region similarity loss function; the target loss function can be determined using formula (10):
[0148]
[0149] in, represents the objective loss function; λ represents a hyperparameter.
[0150] In another embodiment, a population prediction task for the urban model area can be performed based on the target characterization vector of the urban model area. During the application process, the urban model area can be divided into a training set, a validation set, and a test set according to a preset ratio. The ridge regression model is trained using the training set area, where X is the target characterization vector of the urban model area obtained, and Y is the population of the area (logarithm processing). The best parameters are selected based on the prediction effect on the validation set, and the prediction effect is tested on the test set. The mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R 2 ) measures the accuracy of the prediction.
[0151] In another embodiment, the obtained target characterization vector of the urban model area can also be used to predict the income level of the area. In the application process, the urban model area can be divided into a training set, a validation set and a test set according to a preset ratio. The ridge regression model is trained using the training set area, where X is the obtained target characterization vector of the urban model area, and Y is the income level of the area (logarithm processing). The best parameters are selected based on the prediction effect on the validation set, and the prediction effect is tested on the test set. The mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) measures the accuracy of the prediction.
[0152] According to the above description, the urban model area representation generation method provided by the present application constructs an urban knowledge graph of a target urban model based on urban data information; the urban knowledge graph includes knowledge graph subgraphs under multiple dimensions; based on the urban knowledge graph, a global representation vector of the urban model area and local representation vectors of the subgraphs of the urban model area under each dimension corresponding to the knowledge graph subgraph are obtained; based on the local representation vectors of each subgraph, a local representation vector of the urban model area is obtained, and based on the global representation vector and the local representation vector, a target representation vector of the urban model area is obtained. The target representation vector of the urban model area can be accurately generated, thereby laying a foundation for accurately predicting the socioeconomic indicators of the urban model based on the target representation vector of the urban model area.
[0153] Based on the same concept, the present application also provides a device for generating a city model area representation.
[0154] The city model area representation generation device provided in the present application is described below. The city model area representation generation device described below and the city model area representation generation method described above can be referenced to each other.
[0155] Figure 6 It is a structural schematic diagram of the urban model area representation generation device provided in this application.
[0156] In an exemplary embodiment of the present application, Figure 6 It can be seen that the city model area representation generating device may include an acquisition module 610 , a construction module 620 and a generation module 630 .
[0157] An acquisition module 610 is used to acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of points of interest located in the city model areas;
[0158] A construction module 620 is used to construct a city knowledge graph of the target city model based on the city data information; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0159] The generating module 630 is used to:
[0160] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0161] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0162] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0163] In an exemplary embodiment of the present application, the generating module 630 is further used for:
[0164] Based on the city knowledge graph, determining an initial global representation vector of an entity corresponding to the city model area;
[0165] Based on the initial global representation vector, obtaining a global representation vector to be optimized for the city model area through a preset first graph convolutional neural network;
[0166] Obtaining a local representation vector of the subgraph to be optimized in the city model area under the dimension corresponding to the knowledge graph subgraph; the local representation vector of the subgraph to be optimized is obtained by taking the global representation vector to be optimized as an initial representation and inputting the initial representation into a preset second graph convolutional neural network;
[0167] Based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, a target loss function is determined, and the first graph convolutional neural network and the second graph convolutional neural network are iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges, so as to obtain an optimized first graph convolutional neural network and an optimized second graph convolutional neural network;
[0168] The global representation vector to be optimized output by the optimized first graph convolutional neural network is used as the global representation vector of the city model area, and the sub-graph local representation vector to be optimized output by the optimized second graph convolutional neural network is used as the sub-graph local representation vector of the city model area.
[0169] In an exemplary embodiment of the present application, the city model area representation generating device is further used for:
[0170] Determining the weight value of each local representation vector of the sub-graph to be optimized;
[0171] The determining of the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized includes:
[0172] Based on the weight value and each of the sub-graph local representation vectors to be optimized, obtaining the local representation vector to be optimized of the city model area;
[0173] Based on the global representation vector to be optimized, determining a triple score of the fact triple corresponding to the global representation vector to be optimized;
[0174] Based on the triple score, determining a knowledge graph completion loss function; the knowledge graph completion loss function is used to characterize the rationality of the fact corresponding to the fact triple;
[0175] Based on the global representation vector to be optimized and the local representation vector to be optimized, obtaining a fused representation vector to be optimized for the city model area;
[0176] Based on the fused representation vector to be optimized, estimating the probability of passenger flow transfer in the urban model area;
[0177] Based on the passenger flow transfer probability, determining a regional similarity loss function; the regional similarity loss function is used to characterize the similarity between different city model regions;
[0178] Based on the knowledge graph completion loss function and the region similarity loss function, the target loss function is obtained.
[0179] In an exemplary embodiment of the present application, the city model area representation generating device is further used for:
[0180] Based on each of the local representation vectors of the subgraph to be optimized, determining the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph to be optimized;
[0181] Based on the importance value, a weight value of the local representation vector of the subgraph to be optimized is determined.
[0182] In an exemplary embodiment of the present application, the generating module 630 is further used for:
[0183] Based on the subgraph local representation vector, determining the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector;
[0184] Based on the importance value, determining a weight value of the subgraph local representation vector;
[0185] Based on the weight value and the sub-graph local representation vector, a local representation vector of the city model area is obtained.
[0186] In an exemplary embodiment of the present application, the construction module 620 is further used to:
[0187] Based on the location information and category information of POIs, spatial knowledge, functional knowledge, crowd movement knowledge and business knowledge are constructed; spatial knowledge describes the proximity relationship of spatial distances between urban model regions; functional knowledge describes the relationship between POIs, POI categories and urban model regions; crowd movement knowledge describes the relationship between the flow of people between regions; business knowledge describes the relationship between business districts and POIs and regions;
[0188] Entities and relationships between entities corresponding to the spatial knowledge, the functional knowledge, the crowd movement knowledge and the business knowledge are extracted from the city data to obtain the city knowledge graph.
[0189] The specific embodiments of the urban model area representation generating device provided in the present application are basically the same as the embodiments of the urban model area representation generating method, and will not be described in detail here.
[0190] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730 and a communication bus 740; the processor 710, the communications interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the city model area representation generation method, which includes:
[0191] Acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of points of interest located in the city model areas;
[0192] Based on the city data information, construct a city knowledge graph of the target city model; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0193] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0194] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0195] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0196] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0197] On the other hand, the present application also provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the city model area representation generation method provided by the above methods, the method includes:
[0198] Acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of points of interest located in the city model areas;
[0199] Based on the city data information, construct a city knowledge graph of the target city model; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0200] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0201] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0202] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0203] In another aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a city model area representation provided by the above methods is implemented, and the method includes:
[0204] Acquire city data information of a target city model; the target city model includes a plurality of city model areas, and the city data information includes at least location information and category information of points of interest located in the city model areas;
[0205] Based on the city data information, construct a city knowledge graph of the target city model; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions;
[0206] Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained;
[0207] Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area;
[0208] Based on the global characterization vector and the local characterization vector, a target characterization vector of the city model area is obtained.
[0209] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0210] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0211] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present application, it should not be understood as requiring the operations to be performed in the specific order or serial order shown, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0212] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a city model region representation, characterized in that: include: Obtain city data information of the target city model; The target city model includes a plurality of city model areas, and the city data information includes at least location information of points of interest located in the city model areas and category information of the points of interest; Based on the city data information, construct a city knowledge graph of the target city model; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions; Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained; Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area; Based on the global representation vector and the local representation vector, obtaining a target representation vector of the city model area; The obtaining of the global representation vector of the city model area and the subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph based on the city knowledge graph includes: Based on the city knowledge graph, determining an initial global representation vector of an entity corresponding to the city model area; Based on the initial global representation vector, obtaining a global representation vector to be optimized for the city model area through a preset first graph convolutional neural network; Obtaining a local representation vector of the subgraph to be optimized in the city model area under the dimension corresponding to the knowledge graph subgraph; the local representation vector of the subgraph to be optimized is obtained by taking the global representation vector to be optimized as an initial representation and inputting the initial representation into a preset second graph convolutional neural network; Based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, a target loss function is determined, and the first graph convolutional neural network and the second graph convolutional neural network are iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges, so as to obtain an optimized first graph convolutional neural network and an optimized second graph convolutional neural network; Using the global representation vector to be optimized output by the optimized first graph convolutional neural network as the global representation vector of the city model area, and using the subgraph local representation vector to be optimized output by the optimized second graph convolutional neural network as the subgraph local representation vector of the city model area; Before determining the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, the method further includes: Determining the weight value of each local representation vector of the sub-graph to be optimized; The determining of the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized includes: Based on the weight value and each of the sub-graph local representation vectors to be optimized, obtaining the local representation vector to be optimized of the city model area; Based on the global representation vector to be optimized, determining a triple score of the fact triple corresponding to the global representation vector to be optimized; Based on the triple score, determining a knowledge graph completion loss function; the knowledge graph completion loss function is used to characterize the rationality of the fact corresponding to the fact triple; Based on the global representation vector to be optimized and the local representation vector to be optimized, obtaining a fused representation vector to be optimized for the city model area; Based on the fused representation vector to be optimized, estimating the probability of passenger flow transfer in the urban model area; Based on the passenger flow transfer probability, determining a regional similarity loss function; the regional similarity loss function is used to characterize the similarity between different city model regions; Based on the knowledge graph completion loss function and the region similarity loss function, obtaining the target loss function; The step of obtaining the weight value of each local representation vector of the sub-graph to be optimized comprises: Based on each of the local representation vectors of the subgraph to be optimized, determining the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph to be optimized; Based on the importance value, a weight value of the local representation vector of the subgraph to be optimized is determined.
2. The method for generating a city model area representation according to claim 1, characterized in that: The obtaining of the local representation vector of the city model area based on the local representation vector of the sub-graph includes: Based on the subgraph local representation vector, determining the importance value of the knowledge graph subgraph corresponding to the subgraph local representation vector; Based on the importance value, determining a weight value of the subgraph local representation vector; Based on the weight value and the sub-graph local representation vector, a local representation vector of the city model area is obtained.
3. The method for generating a city model area representation according to claim 1 or 2, characterized in that: The city knowledge graph at least includes a knowledge graph subgraph under the spatial knowledge dimension, a knowledge graph subgraph under the functional knowledge dimension, a knowledge graph subgraph under the crowd movement knowledge dimension, and a knowledge graph subgraph under the business knowledge dimension; the spatial knowledge represents the proximity relationship of the city model area in spatial distance; The functional knowledge represents the affiliation between the interest point and the category information of the interest point, and the position relationship between the interest point and the city model area; The crowd movement knowledge represents the crowd flow transfer relationship between different urban model areas; The business knowledge represents the location relationship between the business district, the points of interest, and the city model area.
4. The method for generating a city model area representation according to claim 3, characterized in that: The step of constructing the city knowledge graph of the target city model based on the city data information includes: Based on the location information and category information of POIs, spatial knowledge, functional knowledge, crowd movement knowledge and business knowledge are constructed; spatial knowledge describes the proximity relationship of spatial distances between urban model regions; functional knowledge describes the relationship between POIs, POI categories and urban model regions; crowd movement knowledge describes the relationship between the flow of people between regions; business knowledge describes the relationship between business districts and POIs and regions; Entities and relationships between entities corresponding to the spatial knowledge, the functional knowledge, the crowd movement knowledge and the business knowledge are extracted from the city data to obtain the city knowledge graph.
5. A device for generating a city model area representation, characterized in that: include: Get modules, build modules, and generate modules; An acquisition module is used to acquire city data information of a target city model; The target city model includes a plurality of city model areas, and the city data information includes at least location information of points of interest located in the city model areas and category information of the points of interest; A construction module, used to construct a city knowledge graph of the target city model based on the city data information; the city knowledge graph includes knowledge graph subgraphs under multiple dimensions; Generate modules for: Based on the city knowledge graph, a global representation vector of the city model area and a subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph are obtained; Based on the sub-graph local representation vector, obtaining a local representation vector of the city model area; Based on the global representation vector and the local representation vector, obtaining a target representation vector of the city model area; The obtaining of the global representation vector of the city model area and the subgraph local representation vector of the city model area in each dimension corresponding to the knowledge graph subgraph based on the city knowledge graph includes: Based on the city knowledge graph, determining an initial global representation vector of an entity corresponding to the city model area; Based on the initial global representation vector, obtaining a global representation vector to be optimized for the city model area through a preset first graph convolutional neural network; Obtaining a local representation vector of the subgraph to be optimized in the city model area under the dimension corresponding to the knowledge graph subgraph; the local representation vector of the subgraph to be optimized is obtained by taking the global representation vector to be optimized as an initial representation and inputting the initial representation into a preset second graph convolutional neural network; Based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, a target loss function is determined, and the first graph convolutional neural network and the second graph convolutional neural network are iteratively optimized for multiple rounds in combination with the target loss function until the target loss function converges, so as to obtain an optimized first graph convolutional neural network and an optimized second graph convolutional neural network; Using the global representation vector to be optimized output by the optimized first graph convolutional neural network as the global representation vector of the city model area, and using the subgraph local representation vector to be optimized output by the optimized second graph convolutional neural network as the subgraph local representation vector of the city model area; Before determining the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized, the method further includes: Determining the weight value of each local representation vector of the sub-graph to be optimized; The determining of the target loss function based on the global representation vector to be optimized and the local representation vector of the subgraph to be optimized includes: Based on the weight value and each of the sub-graph local representation vectors to be optimized, obtaining the local representation vector to be optimized of the city model area; Based on the global representation vector to be optimized, determining a triple score of the fact triple corresponding to the global representation vector to be optimized; Based on the triple score, determining a knowledge graph completion loss function; the knowledge graph completion loss function is used to characterize the rationality of the fact corresponding to the fact triple; Based on the global representation vector to be optimized and the local representation vector to be optimized, obtaining a fused representation vector to be optimized for the city model area; Based on the fused representation vector to be optimized, estimating the probability of passenger flow transfer in the urban model area; Based on the passenger flow transfer probability, determining a regional similarity loss function; the regional similarity loss function is used to characterize the similarity between different city model regions; Based on the knowledge graph completion loss function and the region similarity loss function, obtaining the target loss function; The step of obtaining the weight value of each local representation vector of the sub-graph to be optimized comprises: Based on each of the local representation vectors of the subgraph to be optimized, determining the importance value of the knowledge graph subgraph corresponding to the local representation vector of the subgraph to be optimized; Based on the importance value, a weight value of the local representation vector of the subgraph to be optimized is determined.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for generating a city model area representation according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a city model area representation according to any one of claims 1 to 4 is implemented.
