Urban activity structure prediction method based on spatio-temporal representation learning
By establishing a knowledge graph of visits between individuals and urban areas, using reinforcement learning and anisotropic diffusion models, and combining robust continuous clustering methods, we have solved the problem that existing technologies fail to accurately and comprehensively mine the urban activity structure, realized the discovery of urban activity structure from the perspective of individual travel, and improved the accuracy of urban management and public transportation planning.
Patent Information
- Application Number
- CN202510705011.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies make it difficult to explore the urban activity structure in a detailed and comprehensive manner, and do not fully consider the heterogeneity of individual travel and the interactive information between individuals and urban space.
A method based on spatiotemporal representation learning is adopted to establish a knowledge graph of individual and urban area visits. Reinforcement learning and anisotropic diffusion models are used to dynamically represent the interactive knowledge graph of individual travel and urban areas. The robust continuous clustering method is combined to discover the urban activity structure.
It has achieved the discovery of urban activity structure from the perspective of individual travel, which can explain the relationship between people and cities more accurately and meticulously, and provide support for urban management and bus route planning.
Smart Images

Figure CN120633915A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban activity structure prediction, and in particular to an urban activity structure prediction method based on spatiotemporal representation learning. Background Art
[0002] In urban space, humans are the primary actors. With the continuous development of transportation, the impact of human travel on urban structure and form continues to deepen, for example, from a single-center urban model to a multi-center model and hotspots. As a complex network system, cities possess diverse and varied population flows, resulting in distinct patterns of human activity in different locations and over time. Uncovering changes in urban structure and patterns from human travel is a current research hotspot in disciplines such as urban geography, computer science, and complex networks. At a micro level, studying the structure and patterns of urban activity can reveal patterns of human activity within cities, analyze the travel behavior of urban residents, and reveal the impact of urban space on human travel. At a macro level, uncovering the structure and patterns of urban activity is crucial for understanding the laws of urban development, urban road management, public transportation route planning, and the dynamics of economic activity.
[0003] Today, urban space has become a carrier of human activities, and convenient travel services have improved residents' mobility and broadened their scope of activities. Accordingly, more and more human activity data are being recorded, such as trajectory data (GPS data (Global Positioning System) of taxis and buses, etc.), mobile phone positioning data (such as check-in data of WeChat and Weibo), communication data, etc. According to statistics, in large cities such as Beijing and Shenzhen, the average daily public transportation traffic exceeds five million, which generates a massive amount of travel data. These data not only record the residents' urban location and time information, but also contain potential information in residents' travel activities, such as travel preferences, emotions, etc., which provides data support for the discovery of urban activity structure and patterns.
[0004] Urban structure represents the relative locational relationships and distribution patterns of geographical elements within a given geographic space. It is the cumulative result of human spatial activities and locational choices over a long period of time. Urban activity structure, on the other hand, examines the impact of human activities on urban space. Specifically, it summarizes the impact of human travel patterns and patterns on urban areas, as well as the interactions between individuals and urban areas. For example, the activity structure of residential areas is typically characterized by individuals commuting to work and returning home, while the activity structure of commercial areas is characterized by leisure and entertainment. However, the diverse temporal and spatial travel needs of individuals within urban areas over different time periods lead to more complex changes in urban activity structure.
[0005] In the early days, scholars both domestically and internationally considered urban activity structures to be static, focusing primarily on how these structures constrain individual travel behaviors. For example, they observed changes in individual travel behaviors after analyzing land use and residential area size, or attempted to evaluate urban policies through individual travel behaviors. Since the 1970s, scientists have come to believe that cities function as dynamic systems, rather than static ones, due to the complex flows of material, energy, and information within and between urban areas. Furthermore, given that individual travel activities connect discrete physical resources into a comprehensive system, individual travel activities represent the interconnectedness of urban space. Therefore, the impact of individual travel behavior on urban structure has attracted the attention of geographers. Scholars have proposed that cities should be explained beyond the spatial distribution of physical environment and economic resources. For example, the literature "Berry BJL, Goheen PG, Goldstein H. Metropolitan areadefinition: a reevaluation of concept and statistical practice [M]. USDepartment of Commerce, Bureau of the Census, 1968. Camagni R, Gibelli MC, Rigamonti P. Urban mobility and urban form: the social and environmental costs of different patterns of urban expansion [J]. Ecological economics, 2002, 40 (2): 199-216" explored the potential urban structure using flow systems. However, due to the limitations of data sources, analytical tools and computing power, these studies have made limited progress, and most studies on urban activity structure have focused on urban form.
[0006] With the continuous expansion of cities and the improvement of data scale and computing power, many geographers have begun to use large-scale individual travel data to explore urban centrality, functional areas, and the interaction between residents and cities. For example, the document "Jiang S, Ferreira Jr J, Gonzalez M C. Discovering urban spatial-temporal structure from human activity patterns [C]. Proceedings of the ACM SIGKDD international workshop on urban computing. 2012: 95-102. (Discovering urban spatial-temporal structure from human activity patterns, ACM SIGKDD International Workshop on Urban Computing. 2012: 95-102.) discovered the structures of four cities, including London and Vienna, based on card swipe data, and found that the connections between cities are rich and complex; the document "Zhong C, Arisona SM, Huang X, et al. Detecting the dynamics of urban structure through spatial network analysis [J]. International Journal of Geographical Information Science, 2014, 28(11): 2178-2199 (Detecting the dynamics of urban structure through spatial network analysis, International Journal of Geographic Information Science)” detected the spatiotemporal clustering effect of the population in Chicago by statistical methods, and proposed that the perception of urban structure should be extended from the spatial dimension to the temporal dimension; the literature “Yuan NJ, Zheng Y, Xie X, et al. Discovering urban functional zones using latent activity trajectories[J]. IEEE Transactions on Knowledge and Data Engineering, 2014, 27(3): 712-725 (Discovering urban functional zones using latent activity trajectories, IEEE Transactions on Knowledge and Data Engineering)” divides the city into different units using roads, and uses a data-driven method to fuse POI and taxi trajectory data to discover the functional characteristics of each unit in the city; the literature “Berkowitz AE, Takano K. Exchange anisotropy—a review[J].Journal of Magnetism and Magneticmaterials, 1999, 200(1-3):552-570 (Exchange Anisotropy - A Review, Journal of Magnetism and Magnetic Materials)" used network science methods to conduct a statistical analysis of card swipe data in Singapore in 2010, 2011, and 2012, and found a relationship between urban center development and population mobility.
[0007] The above studies can, to a certain extent, reveal the structure and patterns of urban activities, but some problems still exist. For example, they do not fully consider the heterogeneity of individual travel itself and the interactive information between individuals and urban space. Therefore, the above studies are difficult to explore the structure of urban activities in a detailed and comprehensive manner (previous human activity modeling was not comprehensive enough). Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a method for predicting urban activity structure based on spatiotemporal representation learning, which can accurately and comprehensively mine the urban activity structure.
[0009] The technical solution adopted by the present invention is: a method for predicting urban activity structure based on spatiotemporal representation learning, the method comprising the following steps:
[0010] Step 1: Establish a knowledge graph of individual and city area visits;
[0011] Step 2: Input the knowledge graph of the individual and urban area visits into the initializer TransD model to obtain the individual integrated representation and the urban area initialization representation;
[0012] Step 3: Input the individual integrated representation and the initial urban area representation into the reinforcement learning environment to dynamically represent individual trips and urban areas;
[0013] Step 4: Represent individual trips and urban areas and use reinforcement learning methods to predict the next urban area to be visited.
[0014] Furthermore, the prediction method of the reinforcement learning method in step 4 above is as follows: the individual-city area interaction knowledge graph in each time period is processed into a vector, the pooling of the knowledge graph is designed in a hierarchical manner, and the average pooling of the two knowledge graphs is used for individual travel and city area to generate vectorized representations of the knowledge graph, namely individual travel representation and city area representation. In each time period, average pooling is used on the two vectors of individual travel representation and city area representation, and they are connected to form a new vector expression, as shown in the following formula:
[0015] h con =concatenate(h u ,h p )
[0016] Where h u ,h p are individual representation and urban area representation, respectively, and concatenate(·) is the connection method;
[0017] Then connect the h con The input is fed into the fully connected network, which maps the given state s to a set of relations Q(s,a) in the knowledge graph and selects the city area with the highest Q(s,a) as the prediction result.
[0018] Furthermore, the above individual travel representation introduces an anisotropic diffusion model to express the travel situation of each individual, and then uses the anisotropic diffusion model as a guide to map the heterogeneity of individual travel into the representation result; the anisotropic diffusion model expresses heterogeneity from two aspects: direction and rate, as shown in formula (2):
[0019]
[0020] Where, I t is the current state, I t+1 is the state at the next moment, the divergence formula is to find the partial derivative in four directions, λ is the weight, which adjusts the diffusion intensity. represents the divergence of the north, represents the divergence to the south, represents the divergence of the East, represents the divergence in the west, and the partial derivatives in the north, south, east, and west directions are shown in formula (3):
[0021]
[0022] Among them, I x,y The current position, x and y represent longitude and latitude respectively, cN x,y 、cS x,y 、cE x,y 、cW x,y are the thermal conductivity coefficients in the north, south, east and west directions respectively, and the formula is shown as follows (4):
[0023]
[0024] Among them, k is the weight of thermal conductivity, which is used to adjust the intensity of thermal conductivity;
[0025] Replace λ in the anisotropic diffusion model with the attraction index between two places. Therefore, the individual travel representation vector is updated according to the anisotropic idea, as shown in formula (5):
[0026]
[0027] Among them, W u The weight of the interaction between the i-th individual and the j-th city area is used to update the individual travel representation, and are the representations of individuals and urban areas at time l, Dir is the four directions of east, south, west and north, c p is the attraction between individual i at time l and time l+1 in the direction p, Represents the representation of individual i. By improving the traditional gravity model, the attraction between the two places is calculated, as shown in formula (6):
[0028]
[0029] Where G poi,d Indicates the number of POIs at the destination. The more POIs there are, the better the economic situation of the destination. b and L s Indicates how many bus routes and subway lines there are between the departure point o and the arrival point d, t od,b and t od,s are the time taken to take the bus and subway from o to d, w1 and w2 represent the proportion of the population taking the bus and subway respectively; the individual dynamic representation result at the last moment is used as the spatiotemporal representation of the individual travel, recorded as n is the number of individuals.
[0030] Furthermore, the above-mentioned dynamic representation of urban areas is based on the representation of individual travel, and the process from individual representation to dynamic representation of urban areas is completed. The whole process is based on the knowledge graph of individual travel. Individuals visit urban areas, and the interactive relationship between individuals and urban areas is explored. The dynamic update of urban areas is achieved by relying on this relationship. Then, the urban area update formula based on individual travel representation is shown in formula (7):
[0031]
[0032] This process occurs when the jth individual visits the i-th city area. is the representation of the i-th urban area at time l, W z In order to update the weight of the urban area with the individual as the anchor point, the dynamic representation result of the urban area at the last moment is used as the spatiotemporal representation of the urban area, which is recorded as n is the number of urban areas.
[0033] like Figure 4 As shown, in individual u i and urban areas j During the interaction process, based on the representation of individual trips, update p j Therefore, p jThe representation of is updated to During this process, p j The representation results contain interactive information with individuals, realizing the dynamic update process from individual representation to urban area representation.
[0034] Furthermore, the construction of the interactive knowledge graph between individuals and urban areas in the above step 1 adopts the representation of individual visits to urban areas. The formula for individual visits to urban areas is:
[0035] KG u-p ={U,v,Z}
[0036] Where KG u-p represents an individual visiting a city area, U is the set of individuals, is the number of individuals traveling, v is the visit relationship, Z is the set of urban areas, is the number of urban areas that the individual interacts with;
[0037] The implicit feedback of the interaction between individuals and urban space is expressed as
[0038]
[0039] Where y uz Indicates the interaction between individuals and urban space, if there is interaction it is 1, if there is no interaction it is 0, u represents the individual, z represents the urban area, and U represents the set of passengers;
[0040] When u and z interact, y uz =1, otherwise, y uz =0.
[0041] Furthermore, in step 2 above, the robust continuous clustering method is used to discover the urban activity structure. The main function of the robust continuous clustering method is expressed as:
[0042]
[0043] Where h z,i is the characterization result of the i-th urban area, Z=[z1,z2,…,z n ] is the representation set of cities, n is the number of cities, Y=[y1,y2,…,y n ] is the learned category of Z, and the clustering result is obtained by optimizing Y; ε represents the city pairs with high similarity, and the similarity is calculated and generated by m-KNN; the weight ω i→j Balance the contribution of each data point to the GDP of the city; λ is the weight between different items, l i,j is a regularization term used to control the generalization ability of the model, as shown in formula (9):
[0044]
[0045] Where C = Σ (i,j)∈ε ω i→j l i,j (e i -e j )(e i -e j ) T , ei and ej are indicator vectors, indicating that they are 1 in the i-dimension and j-dimension respectively.
[0046] Beneficial effects of the present invention: Compared with the prior art, the effects of the present invention are as follows:
[0047] (1) The present invention proposes a method for predicting urban activity structure based on reinforcement learning. This method can, on the one hand, take into account the spatiotemporal heterogeneity of individual travel and, on the other hand, effectively model the interaction between individuals and urban space, so as to achieve the goal of comprehensively and accurately predicting the urban activity structure. Experimental results show that the urban activity structure discovery results based on the perspective of individual travel have obvious advantages in explaining the relationship between people and cities, and can more accurately and meticulously explain the intrinsic influence of individuals on cities.
[0048] (2) A knowledge graph of the interaction between individuals and urban space was established. The knowledge graph was used as prior knowledge to guide reinforcement learning to represent individuals and urban space respectively. In the representation learning process, the heterogeneity of individual travel was taken into account, and the generalized anisotropy idea was introduced, which provided a basis for the individual representation update process. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of the urban activity structure prediction method based on spatiotemporal representation;
[0050] Figure 2 This is a diagram of the reinforcement learning process;
[0051] Figure 3 It is a dynamic representation diagram of individual-city region joint;
[0052] Figure 4 Design graphs for policies in reinforcement learning;
[0053] Figure 5 This is a dynamic representation diagram of individual-city area travel. In the figure, the change of vector color represents the change of representation.
[0054] Figure 6 is a diagram of the robust continuous clustering process;
[0055] Figure 7 This is the visualization result of Shenzhen City map;
[0056] Figure 8 Figure 1. Result of discovering the urban activity structure on weekdays and weekends. (a) Weekdays, (b) weekends.
[0057] Figure 9 This is a statistical diagram of individual travel information; in the figure, (a) average travel time, (b) average stay time, (c) average travel distance, and (d) distance to the nearest bus stop;
[0058] Figure 10 The flow diagram between urban activity structures; in the figure, (a) weekdays, (b) weekends; the size of the circle represents the area size of the urban activity structure, and the color represents the different types of urban activity structures. Figure 6 The statistical graph in the circle represents the normalized value of the density of various POIs. The direction of the arrow represents the flow direction, and the thickness of the arrow represents the flow size.
[0059] Figure 11 Figure 2 shows the structure of urban activities during the morning and evening peaks. (a) The structure of urban activities during the morning peak, (b) the structure of urban activities during the evening peak.
[0060] Figure 12 Figure 2 shows the net flow diagram during the morning and evening peaks on weekdays; (a) weekday, (b) evening peak;
[0061] Figure 13 The structure diagram of urban activities on weekdays for comparing algorithms; in the figure, (a) Combo algorithm, (b) GraphEncoder algorithm, (c) group travel integrated representation, (d) individual representation, and (e) the method of the present invention;
[0062] Figure 14 This is a visualization result diagram of the T-SNE algorithm; in the figure, (a) Combo, (b) GraphEncoder, (c) group travel integrated representation, (d) individual representation, and (e) the method of the present invention. DETAILED DESCRIPTION
[0063] The urban activity structure refers to the summary of individual travel patterns, rules, and their interactions within a certain urban area. The discovery and research of the urban activity structure are of great significance for urban management, bus line planning, etc. With the continuous development of the transportation industry, the individual travel activities of urban residents have not only expanded the urban boundary but also affected the internal structure and form of the city. Individual travel is complex and diverse, injecting vitality and energy into urban development and also changing the urban structure. Currently, most of the discovery research on urban activity structure treats the urban space as a static network to detect the interaction between groups and the urban activity structure, lacking an answer to the key question of how individuals affect the urban activity structure in real-time and dynamically from the perspective of individual travel. Therefore, from the individual perspective, a spatio-temporal representation method based on reinforcement learning, such as in Embodiment 1, is proposed. On the one hand, this method can take into account the spatio-temporal heterogeneity of individual travel, and on the other hand, it can effectively model the interaction between individuals and urban space to achieve the goal of comprehensively and accurately discovering the urban activity structure. The experimental results show that the discovery results of urban activity structure from the perspective of individual travel have obvious advantages in explaining the relationship between people and the city and can more accurately and meticulously illustrate the internal impact of individuals on the city.
[0064] Representation learning, also known as feature learning, has been a hot topic in computer science research in recent years. Its purpose is to map the graph structure G n×n to a low-dimensional space where d << n, and the result carries the characteristics of the original graph structure; the result of representation learning can complete downstream applications such as clustering, classification, edge prediction, and recommendation.
[0065] The development of representation learning can be broadly categorized into three main groups: factorization-based methods, random walk-based methods, and deep learning-based methods. Factorization-based methods convert graphs into matrices, such as domain matrices and Laplacian matrices, and factorize these matrices to maintain node similarity. Decomposition methods vary depending on the properties of the matrices, with representative algorithms including HOPE and LLE. Random walk-based algorithms include DeepWalk and node2vec. Their core concept is to repeatedly perform random walks through the network, ultimately forming a complete path through the network. This implicitly preserves node similarity and captures local contextual information within the graph. The increasing research on deep learning has led to the application of a large number of deep neural network-based methods to graph representation. Deep autoencoders can model nonlinear structures in data. For example, SDNE uses autoencoders to simultaneously optimize first-order and second-order similarities, thereby retaining local and global structures and having a certain degree of robustness; DNGR combines random walks and autoencoders to capture higher-order similarities; VGAE and GAE use graph convolutional networks (GCNs) and inner product decoders. Similar to convolutional networks, graph convolutional networks solve the problem of sparse graphs being difficult to calculate efficiently by defining convolution operators on graphs. At the same time, they can learn the similarity between nodes and have good generalization capabilities.
[0066] Example 1: Figure 1-Figure 7 As shown, a method for predicting urban activity structure based on spatiotemporal representation learning includes the following steps:
[0067] Step 1: Establish a knowledge graph of individual and city area visits: Based on actual individual travel activities, establish an interactive knowledge graph between individuals and city areas;
[0068] The construction of the interactive knowledge graph between individuals and urban areas adopts the representation of individual visits to urban areas. The formula of the individual-urban area interactive knowledge graph is:
[0069] KG u-p ={U,v,Z}
[0070] Where KG u-p represents an individual visiting a city area, U is the set of individuals, is the number of individuals traveling, v is the visit relationship, Z is the set of urban areas, is the number of urban areas that interact with the individual; the implicit feedback of the interaction between the individual and the urban space is expressed as
[0071]
[0072] Where y uz Indicates the interaction between individuals and urban space, if there is interaction it is 1, if there is no interaction it is 0, u represents the individual, z represents the urban area, and U represents the set of passengers;
[0073] When u and z interact, y uz =1, otherwise, y uz =0;
[0074] Step 2: Input the knowledge graph of the individual and urban area visits into the initializer TransD model to obtain the individual integrated representation and the urban area initialization representation;
[0075] Step 3: Input the individual integrated representation and the initial urban area representation into the reinforcement learning environment to dynamically represent individual trips and urban areas;
[0076] Key elements in reinforcement learning
[0077] The agent can imitate the behavior of individuals and provide personalized action predictions for the agent based on the current environment and state.
[0078] Action is the visit event of the agent, that is, the visit action of the individual to the city area, formally defined as: i,j The action of agent i is to visit point j. Then, when a visits z at time l j , which can be expressed as a i l =a i,j .
[0079] Environment is defined as dynamic representation rules based on the knowledge graph of individual travel. On the one hand, individual access behavior affects the representation of urban areas, and on the other hand, urban areas also affect the representation of individual travel. Based on the access relationship between individuals and urban areas in the knowledge graph, dynamic representation rules for individuals and urban areas can be comprehensively and accurately formulated.
[0080] State refers to the representation of the current individual or city area. The state at time l can be expressed as in, represents the set of individual representations at time l, Represents the set of representations of the urban area at time l.
[0081] Reward: Whether the city area visited by the agent is consistent with the reality can be divided into whether the location of the visited city area is close and whether the ID of the city area is consistent. Then, the "reward" obtained by the agent for visiting the city area can be divided into: 1) r d, the weighted sum of inverse distances, i.e., the inverse of the distance between the actual location and the predicted location of the visited urban area, 2)r p , the difference between the predicted ID and the real ID of the visited place. Then, the reward is expressed as,
[0082] r=λ d ×r d +λ p ×r p (1)
[0083] Among them, λ d and λ p r d and r p The weight of .
[0084] like Figure 2 As shown, the agent is in state s at time l l and reward r l Under the constraint of i l ), after being constrained by environmental conditions, update the representation state s l+1 and reward r l+1 , until the end of the cycle. The higher the reward score, the better the state (individual representation and city area representation) results.
[0085] Step 4: Represent individual trips and urban areas through reinforcement learning to predict the next urban area to be visited. The interactive knowledge graph is processed through reinforcement learning to dynamically update the representations of individuals and urban areas. In this process, the spatiotemporal heterogeneity of individual trips is taken into account, and the generalized anisotropy concept is introduced to guide the reinforcement learning model to update the individual and urban area representation results in the desired direction.
[0086] Individual-city region joint dynamic representation learning algorithm: taking into account the interaction between individuals and city regions during individual travel, constructing a knowledge graph of the interaction between individuals and city regions during individual travel, and with the support of the reinforcement learning model, jointly dynamically representing individuals and city regions. In the dynamic representation process, it is necessary to combine the access relationship between individuals and city regions and serve as anchors for each other; in the dynamic representation process, taking into account the heterogeneity of individual travel, the anisotropy idea is introduced to guide the dynamic representation process of individual travel, which makes the representation results of individuals and city regions contain spatiotemporal heterogeneity information, thereby achieving the comprehensiveness and objectivity of the individual-city region dynamic representation results, such as Figure 3 shown.
[0087] Figure 3Middle: The process of joint dynamic representation of individuals and city regions: ① Establish a knowledge graph of individual and city region visits, ② Input the visit knowledge graph into the initializer TransD model, ③ Input the individual integrated representation and the city region initialization representation into the reinforcement learning environment to dynamically represent individual trips and city regions, ④ Use the individual trip and city region representations to predict the next city region to be visited through the reinforcement learning strategy, ⑤ Evaluate the agent's prediction based on the score: the higher the score, the better the reinforcement learning state (the results of individual trip representation and city region representation).
[0088] Furthermore, the reinforcement learning prediction method in step 4 above is to process the individual-city region interaction knowledge graph in each time period into a vector. However, the current graph pooling method is not suitable for the heterogeneous relationship between individual city regions and ignores the connection between individuals and city regions. Therefore, the pooling of the knowledge graph is designed in a hierarchical manner. The average pooling of the two knowledge graphs is used for individual travel and city regions to generate vectorized representations of the knowledge graph, namely individual travel representation and city region representation. In each time period, average pooling is used on the two vectors of individual travel representation and city region representation, and they are concatenated to form a new vector representation, as shown in the following formula:
[0089] h con =concatenate(h u ,h p )
[0090] Where h u ,h p are individual representation and urban area representation, respectively, and concatenate(·) is the connection method;
[0091] Then connect the h con The input is fed into the fully connected network, which maps the given state s to a set of relations Q(s,a) in the knowledge graph and selects the city area with the highest Q(s,a) as the prediction result.
[0092] Intuitively, visiting a city region action a l The higher the reward, the better the agent imitates the individual in the next visit, and the greater the contribution of the data sample to the strategy training. Therefore, for each data sample (s l ,a l ,r l ,s l+1 ), (s l ,a l ,r l ,s l+1 ) represent the state, action, reward at time l and the state at time l+1 respectively, and the priority score prio based on the rewardr is defined as the reward r l ,Right now:
[0093] prio r (s l ,a l ,r l ,s l+1 )=r l
[0094] In addition, the temporal difference (TD) was originally set for updating DQN. The larger the temporal difference (TD), the greater the value and information content of the data sample for the next agent learning. Therefore, the time error is defined as the priority score, that is:
[0095] prio TD (s l ,a l ,r l ,s l+1 )=r l +γmax Q(s l+1 ,a l+1 )-Q(s l ,a l )
[0096] Among them, γ is the balance coefficient, such as Figure 4 shown.
[0097] Based on the interactive knowledge graph between individuals and urban areas, the TransD model is used to initialize the representation of individuals and urban areas. Then, based on reinforcement learning, a dynamic joint representation of individuals and urban areas is performed.
[0098] Individual dynamic representation based on anisotropy: During individual travel, there will be heterogeneity in direction and rate changes, that is, there is anisotropy in travel between individuals. This paper introduces an anisotropic diffusion model to express the travel situation of each individual, and then uses the anisotropic diffusion model as a guide to map the heterogeneity of individual travel into the representation results. The anisotropic diffusion model expresses heterogeneity in terms of direction and rate, as shown in formula (2):
[0099]
[0100] Where, I t is the current state, I t+1 is the state at the next moment, the divergence formula is to find the partial derivative in four directions, λ is the weight, which adjusts the diffusion intensity. represents the divergence of the north, represents the divergence to the south, represents the divergence of the East, represents the divergence in the west, and the partial derivatives in the north, south, east, and west directions are shown in formula (3):
[0101]
[0102] Among them, I x,y The current position, x and y represent longitude and latitude respectively, cN x,y 、cS x,y 、cE x,y 、cW x,y are the thermal conductivity coefficients in the north, south, east and west directions respectively, and the formula is shown as follows (4):
[0103]
[0104] Among them, k is the weight of thermal conductivity, which is used to adjust the intensity of thermal conductivity;
[0105] In reality, the rate of individual travel (anisotropic diffusion) is affected by the attraction between the two locations. The greater the attraction of the urban area to the individual, the stronger the individual's travel intention. Therefore, replace λ in the anisotropic diffusion model with the attraction index between the two locations. Therefore, based on the anisotropic idea, the individual travel representation vector is updated as shown in formula (5):
[0106]
[0107] Among them, W u The weight of the interaction between the i-th individual and the j-th city area is used to update the individual travel representation, and are the representations of individuals and urban areas at time l, Dir is the four directions of east, south, west and north, c p is the attraction between individual i at time l and time l+1 in the direction p, Represents the representation of individual i. By improving the traditional gravity model, the attraction between the two places is calculated, as shown in formula (6):
[0108]
[0109] Where G poi,d Indicates the number of POIs at the destination. The more POIs there are, the better the economic situation of the destination. b and L s Indicates how many bus routes and subway lines there are between the departure point o and the arrival point d, t od,b and t od,s are the time taken to take the bus and subway from o to d, w1 and w2 represent the proportion of the population taking the bus and subway respectively; the individual dynamic representation result at the last moment is used as the spatiotemporal representation of the individual travel, recorded as n is the number of individuals.
[0110] like Figure 5 As shown, individual u i Visit city area p from the previous city area j After that, according to the urban area p j The representation of each individual and the various heterogeneities during the trip, update individual u i The travel representation of individual u i Dynamic representation This process not only allows the individual characterization results to have original travel information, such as attribute information of the departure and arrival places, travel time, length of stay, etc., but also has heterogeneous information during the travel process, that is, the various heterogeneities represented by direction and speed. Finally, the individual characterization results can contain the interaction information between individuals and urban areas.
[0111] The dynamic representation of urban areas is based on the representation of individual travel, and the process from individual representation to dynamic representation of urban areas is completed. The whole process is based on the knowledge graph of individual travel. Individuals visit urban areas, and the interactive relationship between individuals and urban areas is explored. The dynamic update of urban areas is achieved by relying on this relationship. Then, the urban area update formula based on individual travel representation is shown in formula (7):
[0112]
[0113] This process occurs when the jth individual visits the i-th city area. is the representation of the i-th urban area at time l, W z In order to update the weight of the urban area with the individual as the anchor point, the dynamic representation result of the urban area at the last moment is used as the spatiotemporal representation of the urban area, which is recorded as n is the number of urban areas.
[0114] like Figure 5 As shown, in individual u i and urban areas j During the interaction process, based on the representation of individual trips, update p j Therefore, p j The representation of is updated to During this process, p j The representation results contain interactive information with individuals, realizing the dynamic update process from individual representation to urban area representation.
[0115] Discovering urban activity structures relies on the aforementioned representation results. This combined representation method gives urban areas consistent dimensions and uniform distribution characteristics. Therefore, clustering and other methods can be used to explore urban activity structures.
[0116] Traditional clustering uses Euclidean distance to identify nodes with similar characteristics. Traditional clustering algorithms process two-dimensional point information. The closer the distance between two points, the more similar they are, and therefore the more likely they are to be clustered into the same category. Research on urban activity structure discovery requires multidimensional information. Traditional clustering methods have poor interpretability for multidimensional information and require multiple parameter inputs, such as the number of clusters for K-means clustering and the minimum distance for DBSCAN clustering.
[0117] The robust continuous clustering algorithm does not rely on prior knowledge of the actual number of clusters and can adaptively find the number of clusters. As a simple, fast, and efficient clustering algorithm, robust continuous clustering can be expressed as a global continuous objective optimization process based on robust estimation. Therefore, the robust continuous clustering method is selected to discover the urban activity structure. The main function of the robust continuous clustering method is expressed as:
[0118]
[0119] Where h z,i is the characterization result of the i-th urban area, Z=[z1,z2,…,z n ] is the representation set of cities, n is the number of cities, Y=[y1,y2,…,y n ] is the learned category of Z, and the clustering result is obtained by optimizing Y; ε represents the city pairs with high similarity, and the similarity is calculated and generated by m-KNN; the weight ω i→j Balance the contribution of each data point to the GDP of the city; λ is the weight between different items, l i,j is a regularization term used to control the generalization ability of the model, as shown in formula (9):
[0120]
[0121] Where C = ∑ (i,j)∈ε ω i→j l i,j (e i -e j )(e i -e j ) T , ei and ej are indicator vectors, indicating that they are 1 in the i-dimension and j-dimension respectively.
[0122] Formula (9) can achieve efficient and scalable optimization results through the least squares iteration, and can be easily extended to data sets with tens of thousands of samples. Then, the optimization of robust continuous clustering can be regarded as a process of optimizing (Y, L) separately: when Y is fixed, each l can bei,j Decoupling obtains the optimal solution; when L is fixed, it is transformed into a least squares problem. According to this structure, Y and L are updated alternately to achieve the optimization purpose. The process of robust continuous clustering is as follows Figure 6 shown.
[0123] In order to illustrate the feasibility of the method of the present invention, the following simulation experiment of active structure detection in a certain city in China was conducted:
[0124] 1. Data Description
[0125] Shenzhen, with a population of over 12.5 million, covers an area of over 2,000 square kilometers. Shenzhen has the most comprehensive bus and subway system in China, including 8 subway lines, a total of 199 subway stations, 808 bus routes, and 6,226 bus stops. The map of Shenzhen is from the Tianditu system of the National Geographic Information Public Service Platform (https: / / www.tianditu.gov.cn / ). The visualization results are as follows: Figure 7 shown.
[0126] Based on the SCD, bus trajectory data, bus network, and road information, we reconstructed bus trips by establishing temporal and spatial rules to reconstruct the trip chain. From April 3 to April 9, 2017, we recorded the travel time, travel location, arrival time, arrival location, and transfer stations, as shown in Table 1.
[0127] Table 1 Example of passenger travel chain on April 3, 2017
[0128]
[0129] Over a week, we collected more than 40 million records, of which the POI data was the layer data of Amap in 2017. The specific data description is shown in Table 2.
[0130] Table 2 Data description
[0131]
[0132] Shenzhen has a total of nine administrative districts and one functional district. Luohu, Futian, and Nanshan Districts are generally considered Shenzhen's central area, with a trend of expansion towards Bao'an, Longgang, and Longhua Districts. The central area is densely populated with commercial and residential areas. Due to the diverse land uses in the city center, residents can travel short distances to their workplaces and leisure centers. Despite this, most residents living in the suburbs make long commutes via the subway system on weekdays, primarily due to job opportunities located in the central areas of Luohu, Futian, and Nanshan Districts, as well as in southern Longhua District and western Longgang District. In some suburban and rural areas (such as Bao'an, Guangming, Longhua, Pingshan, and northern Longgang Districts), industrial areas and urban villages remain the dominant land use types. These areas are characterized by a concentration of temporary workers and urban villagers, who use public transportation relatively less than residents of the city center.
[0133] The distribution of POIs exhibits significant spatial heterogeneity. Shenzhen has 54,897 commercial points and 194 public facilities, most of which are located in the urban area (Futian, Nanshan, and Luohu districts). Smaller commercial points are scattered in the residential areas of Bao'an, Guangming, Longhua, and Longgang districts. Educational points (3,540), government agencies (5,394), and medical services (7,520) are also unevenly distributed: Futian and Nanshan districts dominate, while other areas offer few educational and medical opportunities. Commercial and educational institutions are almost nonexistent in Pingshan and Dapeng. Clusters of tourist attractions (186) are found in Bao'an, western Guangming, Longhua, central Pingshan, northern Longgang, and remote areas of Dapeng.
[0134] First, Shenzhen was gridded on a 100-meter-by-100-meter grid to refine the urban area. Unsuitable areas for habitation, such as mountains and water bodies, were removed, resulting in 181,570 grids. To reduce the overall computational effort and generate a continuously accessible map, cells with similar travel patterns were merged. The specific implementation process included: 1) Finding each grid cell that serves as a boarding point, setting the maximum walking distance to bus and subway stations to 400 meters and 1000 meters, respectively. Using these thresholds, Dijkstra was used to calculate the walking distance from the grid centroid to the nearest station. 2) Generating a nearby station vector for each grid cell, recording the IDs of all stations within walking distance as a vector for each grid cell. 3) Using Formula 6.1, the similarity of adjacent grids (eight neighborhoods) was calculated. Grids with high similarity were merged and assigned new IDs, ultimately forming 18,108 urban areas.
[0135] 2 Results Analysis
[0136] 2.1 Analysis of the results of urban activity structure findings on weekdays and weekends
[0137] Based on the characterization results of urban areas, the urban activity structure of Shenzhen was detected on weekdays and weekends, and the detection results were analyzed separately.
[0138] Based on the clustering results of the Robust Continuous Clustering (RCC) algorithm, urban areas were adaptively divided into five categories for weekdays (Monday through Friday) and weekends (Saturday and Sunday). Due to the varying travel patterns and interactions between individuals within urban areas, even adjacent activity patches can exhibit significant heterogeneity, a phenomenon particularly pronounced in the central Shenzhen area. In contrast, areas with relatively underdeveloped public transportation, such as Pingshan District, exhibit a relatively homogeneous structure.
[0139] From above Figure 8 As can be seen from the urban activity structure discovered based on the knowledge graph of interactions between individuals and urban areas, weekend activity structures are more heterogeneous than weekdays. Weekdays are dominated by Types I and V, while weekend activity structures are more complex. This is primarily due to the fact that weekdays are dominated by commuting activities, resulting in relatively simple individual travel patterns, while weekends offer a variety of individual travel activities. The same area performs different functions at different times of the year. For example, although Type V structures are located in areas with high levels of economic development, they typically provide work opportunities for individual interaction on weekdays, but transform into leisure venues and entertainment services on weekends.
[0140] Specifically, the results obtained from the individual ensemble representation learning algorithm and the joint dynamic representation algorithm for individuals and urban areas show that on weekdays, the inflow and outflow of individuals in the Type I urban activity structure is low, resulting in low interaction between individuals and urban areas, indicating weak connections between individuals and urban areas within this activity structure. Locally, this activity structure is found in high-priced housing areas in Nanshan District and Futian District, indicating that individuals' willingness to use public transportation decreases in areas with higher economic development. Type II urban activity structures are primarily located along subway lines in Bao'an District, Longgang District, and Longhua District, and along bus routes in Pingshan District, indicating strong accessibility. Type II urban activity structures are primarily found in areas with medium-to-low housing prices, low density of various point-of-interest (POIs), and low-to-medium economic development levels in Shenzhen. Type III urban activity structures are primarily found in northern Bao'an District, northwestern Pingshan District, and the fringes of Longhua District. These areas have medium-to-low housing prices and relatively low economic development levels. Areas belonging to Type III urban activity structures lack subway lines, making long-distance travel by public transportation difficult. Type IV urban activity structures are located along the borders of Nanshan, Luohu, and Futian districts, as well as in the northern part of Bao'an district, the border between Guangming and Longhua districts, and Yantian district. These activity structures are found at the edges of administrative districts. Type V urban activity structures have more distinct distributional characteristics, primarily found in the economically developed Nanshan, Futian, and Luohu districts, as well as along the subway lines of Longgang, Longhua, and Bao'an districts. This type of urban activity structure is located in areas with high housing prices and serves as a primary location for the exchange of materials, energy, and information.
[0141] Different from the distribution of urban activities on weekdays, Figure 8 (b) As can be seen, the distribution area of Type I urban activity structures is significantly smaller, primarily located around the economic centers of Nanshan District, Luohu District, and Futian District, as well as Longgang District and northern Bao'an District, which have well-developed subway networks. Type II urban activity structures are primarily located in Guangming District, northern Bao'an District, Pingshan District, and Dapeng District, which are located far from the city center. Housing prices in these areas are medium-to-low, and economic development is at a lower-to-medium level in Shenzhen. Type III urban activity structures are more sparsely distributed, primarily located in northern Bao'an District and parts of Nanshan District, areas of Longhua District far from subway lines, and central and northern Longgang District. Housing prices in these areas are at a lower-to-medium level. Type IV urban activity structures are primarily located in Bao'an District, northwestern Longhua District, Guangming District, and Pingshan District. Type V urban activity structures are located in the economically developed Nanshan District, Futian District, and Luohu District, which have well-developed public transportation and comprehensive entertainment facilities, and experience significant inflows and outflows of individuals. However, the distribution range is significantly smaller than the Class V urban activity structure on weekdays. This is mainly because commuting activities are the main type of activities in such areas on weekdays, while residents travel for shopping, dining and other entertainment activities on weekends. Some people do not have a strong desire to travel on holidays. On the other hand, there are many high-tech enterprises in the southern part of Longhua District, which mainly commute on weekdays. On weekends, individuals switch from commuting activities to other travel modes, resulting in the Class V urban activity structure in Longhua District on weekdays turning into the Class IV and Class I urban activity structures on weekends.
[0142] In order to further describe the urban activity structure on weekdays and weekends, the average travel time, average stay time, average travel distance and distance to the nearest subway station for each type of urban activity structure were calculated, such as Figure 9 shown.
[0143] according to Figure 9 It can be seen that, except for the fourth type of urban activity structure on weekdays, the average travel time of individuals in other types of urban activity is longer than that of the urban activity structure corresponding to weekends. This is mainly because the traffic volume on weekdays is significantly greater than that on weekends, which easily causes traffic congestion, resulting in longer travel time for individuals in the first, second, third, and fifth types of urban activity structures on weekdays; while the fourth type of activity structure on weekends is mainly distributed in remote areas, and the travel time required to reach Nanshan District, Luohu District, Futian District and other areas for work, entertainment, etc. is longer.
[0144] In terms of average length of stay ( Figure 9(b)) The average length of stay on weekdays is longer than on weekends, as residents need to stay longer at their workplaces on weekdays due to commuting. Individuals belonging to Category IV on weekdays have the longest stays, exceeding 300 minutes. This indicates that individuals in this category primarily travel for work purposes, indirectly suggesting that the primary type of activity structure for Category IV may be residential. Individuals belonging to Category IV also stay longer on weekends, and this type of urban activity structure often engages in recreational activities through tourism and dining. Whether on weekdays or weekends, the length of stay for Category V urban activity structures is also longer, at around 130 minutes. This is primarily due to the strong demand for shopping, entertainment, and dining with friends among residents of Category V urban activity structures on weekends. Shenzhen housing price data shows that Category V urban activity structures are primarily located in areas with high housing prices (averaging around 120,000 yuan), and people from these areas are more willing to enjoy their leisure time during holidays by staying away from home.
[0145] In terms of travel distance, Figure 9 (c) Residents of Type III and Type IV urban activity structures travel longer distances. Combining the spatial distribution of Type III and Type IV urban activity structures reveals that residents of these structures primarily engage in medium- and long-distance commuting on weekdays. On weekends, most residents travel medium- and long-distance to reach central areas with dense commercial POIs for leisure and entertainment. Therefore, residents of other urban activity structures travel longer distances than on weekdays. This is primarily due to the ample time and greater freedom of travel on weekends. Among them, Type IV urban activity structures have the longest travel distances, representing a long-distance travel pattern. Type V urban activity structures have the shortest travel distances on weekends, representing short-distance travel.
[0146] Judging from the distance to the nearest subway station, Figure 9 (d) Whether on weekdays or weekends, Type I urban activity structures are farthest from the nearest subway station. Subway lines provide efficient and fast services for long-distance travel. Therefore, due to the constraints of subway lines, Type I urban activity structures are not conducive to long-distance travel. Types IV and V urban activity structures are both closer to the nearest subway station, laying the foundation for long-distance travel.
[0147] The above analysis shows that on weekdays, Type I urban activity structures are characterized by medium- and long-distance trips, short travel times, and a stay of approximately two hours, indicating that this type of urban activity structure's travel pattern is medium- and long-distance travel in remote areas with a medium stay. Type II activity structures have shorter travel times and shorter distances, with a stay of approximately two hours, indicating that this type of urban activity structure's travel pattern is short-distance, efficient travel. Type III trips are longer, but the travel distances are shorter, with longer stays, indicating that this type of urban activity structure is short-distance, inefficient commuting. Type IV trips have the longest travel times, longest travel distances, and longest stays, and are closer to the nearest subway station, indicating that this type of urban activity structure's travel pattern is long-distance, high-stay commuting travel away from the city center. Type V urban activity structures have short individual trips with longer stays, travel distances of 8,000 to 10,000 meters, and are closest to the nearest subway station. Residents of this type of urban activity structure primarily stay within their own area and spend longer stays, indicating that the activity pattern of residents of this type of urban activity structure is medium-distance travel in and around the central area.
[0148] The activity structure of Type I cities on weekends is similar to that on weekdays, which is short-to-medium distance and medium stay time travel; the activity structure of Type II cities is characterized by short travel time, short stay time, and a travel distance of about 11,000 meters, which can be summarized as an efficient medium-distance travel mode; the activity structure of Type III cities is characterized by longer travel time and travel distance, but shorter stay time, which can be summarized as short-stay time and long-distance travel in the midstream of economic development; the activity structure of Type IV cities is long-stay time, long-distance and inefficient travel in the midstream of economic development; the activity structure of Type V cities is characterized by short-distance travel with low travel time and low stay time in the city center.
[0149] In order to summarize the deep-seated characteristics of the urban activity structure, a flow diagram of the urban activity structure is drawn, such as Figure 10 shown.
[0150] On average, there are 4,830,923 trip data points on weekdays, and 3,882,505 trip data points on weekends. The amount of data on weekends is 24.43% less than on weekdays, indicating that individuals' willingness to travel is significantly lower on weekends than on weekdays.
[0151] Depend on Figure 10As shown in Figure (a), from the perspective of POI distribution, the distribution of various POIs in the Type I urban activity structure is relatively even. Public facilities and medical facilities account for a large proportion of the area in the Type I area, and the area is also the largest. The Type II urban activity structure has a large proportion of medical POIs, followed by government agencies and commercial locations, with smaller areas. The area in the Type III urban activity structure has a large proportion of medical facilities, a small number of POIs overall, and a smaller area. Compared with other urban activity structures, the Type IV area has the fewest POIs overall, indicating that this area is remote and has a medium-to-low level of economic development. The Type V area has the largest number of POIs, with the largest proportion of public facilities and a larger area. In terms of flow, the inflow and outflow between two urban activity structures are basically equal, indicating that most individuals choose to return to their original area. The flow within the Type V urban activity structure is the largest; the connection between Type I and Type V urban activity structures is relatively close, and the flow is relatively large, mainly because the people in Type I activity structure rely on the job opportunities, public facilities, commerce, education, etc. brought by Type V urban activity structure, and the flow within Type I urban activity structure is also large, indicating that its own resources can meet some basic needs; the connection between Type II urban activity structure and Type V is also relatively close, followed by Type I and Type II, Type IV and Type V, and there are fewer connections between other activity structures.
[0152] Depend on Figure 10(b) It can be seen that in the first type of urban activity structure, POIs are evenly distributed, with the most medical points, the least government agencies and public facilities, and the largest area. In the second type of urban activity structure, medical institutions account for the largest proportion, and educational institutions account for a smaller proportion. In the third type of urban activity structure, the density of POIs of various types has increased significantly, and medical facilities account for the largest proportion in the third type of urban activity structure. The distribution of POIs of various types in the fourth type of urban activity structure is relatively sparse, and the economic development is at a medium-low level. The fifth type of urban activity structure is located in the economic center of Shenzhen, with the highest density of POIs of various types, and the largest distribution of government, commercial, educational and medical points. From the perspective of the flow of each urban activity structure, the flow within the Class V urban activity structure is the largest, mainly due to the well-developed subway and bus network and good accessibility; the flow within the Class I urban activity structure is also large, and the facilities within this structure can basically meet the basic needs of residents; the flow between Class I and Class V urban activities is also large, mainly because Class I and Class V urban activity structures are connected by subway lines, and individuals within Class I urban activity structure rely on the commercial, public facilities and other leisure conditions brought by Class V urban activity structure. Class I urban activity structure has a large number of attractions, which has a certain appeal to residents of Class V urban activity structure; the flow between Class II and Class V urban activity structures is also large, and there is a subway line connecting the two, so the accessibility between the two is good and the attraction is strong; the connection between the remaining urban activity structures is not large, among which Class IV has the smallest connection with other urban structures.
[0153] 2.2 Analysis of the urban activity structure findings during morning and evening peaks
[0154] Weekdays and weekends exhibit distinct urban activity structures, demonstrating significant differences in the structure of urban activity by day of the week. Building on this, we further explored the structure of urban activity during the weekday morning and evening peaks (the morning peak is from 7:00 AM to 10:00 AM, and the evening peak is from 5:00 PM to 8:00 PM) and analyzed the patterns of change within these peaks.
[0155] from Figure 11 (a) The morning peak map shows that the first type of urban activity structure is distributed in areas close to subway stations with relatively developed transportation facilities; the second type of urban activity structure is more scattered, mainly distributed along the Bao'an District Metro Line 11, the Longhua District Metro Line 4, and the Longgang District Metro Line 3; the third type of urban activity structure is consistent with the weekday type I urban activity structure distribution, which is a low-visit area; the fourth type of activity structure is mainly distributed in the economic centers of Nanshan, Luohu, and Futian, as well as along the subway lines in Bao'an District, Longgang District, and Longhua District.
[0156] from Figure 11(b) The findings for the urban activity structure during the evening peak differ significantly from those during the morning peak, primarily due to individuals commuting to work during the morning peak and returning to their residences during the evening peak. Because individuals primarily visit their residences during the evening peak, the area of the fourth type of urban activity structure decreases during the evening peak. The second type of urban activity structure is primarily distributed along subway lines, representing areas of high individual interaction. The third type of urban activity structure is consistent with the distribution during the morning peak and represents areas of low visitation.
[0157] Net flow diagrams were further drawn to analyze the interrelationships between the urban activity structures during the morning and evening peaks, e.g. Figure 12 shown.
[0158] Net traffic during the morning and evening peak hours on weekdays Figure 12 Shenzhen's employment and residential structure are imbalanced. Because the fourth urban activity structure provides employment opportunities, other urban activity structures have a net inflow into the fourth. The net inflow from the second to the fourth urban activity structures is the largest, with the second type occurring in areas surrounding the central area or along subway lines with high accessibility. The fourth urban activity structure exhibits significant inflow and outflow during peak hours in the morning and evening, and is generally balanced, indicating a relatively balanced employment-residence relationship in the city center. However, the current rapid development of non-central areas has resulted in numerous high-density residential areas lacking sufficient employment opportunities and essential urban services. Peak-hour flow maps reveal distinct land use types between suburban areas and the city center.
[0159] 2.3 Comparative Experiment
[0160] In order to verify the reliability of this method, the following algorithm comparisons are performed:
[0161] 1) Population-based urban activity structure discovery algorithms, including the Combo algorithm, the deep learning-based GraphEncoder algorithm, and the integrated representation algorithm;
[0162] 2) A reinforcement learning prediction algorithm based on the interaction between individuals and urban areas. Among the group-based urban activity structure discovery algorithms, the Combo algorithm provides a general optimization framework for extracting urban activity structures suitable for different objective functions. Its core is an improved Modularity algorithm that can adaptively partition urban activity structures. The GraphEncoder algorithm clusters nodes with similar characteristics based on an autoencoder model, achieving superior results compared to traditional clustering algorithms. It has four layers, and the number of clusters is determined to be 10 based on the Gap statistic. Since Combo and GraphEncoder can only process a single network, the input matrix is the traffic matrix between urban areas. The deep learning-based GraphEncoder algorithm primarily mines urban activity structures from the perspective of individuals to urban areas, essentially aiming to enhance the predictive capabilities of the reinforcement learning model. The input is a knowledge graph of interactions between individuals and POIs and a knowledge graph of affiliations between POIs and urban areas, and the output is a representation of the urban areas. Finally, robust continuous clustering is used to obtain the urban activity structure.
[0163] The urban activity structure discovery results of various algorithms are as follows Figure 13 shown.
[0164] Depend on Figure 13 As can be seen, the urban activity structure obtained by Combo is highly heterogeneous, displaying strong local patterns. Because it applies the modular optimization principle internally and extracts strong internal connections, it can only detect the urban activity structure of short-distance trips. The Combo algorithm can only input a single matrix and does not consider attribute similarity and trip connection details (such as spatiotemporal heterogeneity and interaction information), which are key factors in helping to identify dynamic urban activity structures. Therefore, the Combo algorithm can only mine single information about the urban activity structure.
[0165] Compared to Combo, GraphEncoder achieved superior results in revealing the global structure of urban activity. This is primarily due to the GraphEncoder algorithm's ability to construct a high-order similarity matrix and transform the topological relationships between city regions into embeddings between them. Like the Combo algorithm, GraphEncoder only accepts a single matrix as input, resulting in more dispersed urban activity structures mined by GraphEncoder, making their distribution patterns difficult to grasp. GraphEncoder is a typical deep learning clustering method that can mine nonlinear relationships between city regions. However, it only considers node out-degree and in-degree, as well as topological information between city regions, making it difficult to account for essential travel dynamics. Furthermore, this method cannot incorporate interaction information, a drawback that results in an imbalance in the number of nodes in different urban activity structures. Consequently, GraphEncoder can only detect simple urban activity structures.
[0166] The results of the integrated representation algorithm for discovering urban activity structures based on group travel sets can, to a certain extent, uncover group activity patterns. This method uncovered group activity patterns in economically developed city centers and along subway lines. Because the algorithm considers static urban attributes and incorporates dynamic travel characteristics, it detects a relatively satisfactory urban activity structure through the fusion of static and dynamic data. However, this algorithm, based on group travel statistics, still falls short in discovering more detailed urban activity patterns, such as failing to uncover individual interactions in Longhua District.
[0167] Compared to group travel representation methods, reinforcement learning representation of individual trips can uncover more detailed urban activity structures, such as the Type 8 activity structure along the subway lines in Bao'an and Longgang districts. This approach considers the interaction between individuals and POIs and uses this interaction to dynamically represent both individuals and POIs. However, this algorithm fails to account for the heterogeneity of individual trips: the greater the heterogeneity between individuals, the greater the distance between them in the representation space. Consequently, this approach fails to fully uncover the individual travel patterns within the urban activity structure.
[0168] In order to further compare the urban activity discovery results of various algorithms, this paper uses the T-SNE algorithm to reduce the input data of various algorithms to 2 dimensions and visualize the 2-dimensional results after dimensionality reduction. The results are as follows: Figure 14 shown.
[0169] from Figure 14 From the visualization results of the T-SNE algorithm in (a) and (b), the results of the Combo and GraphEncoder algorithms do not show regularity, which indicates that the Combo and GraphEncoder algorithms are insufficient in mining the urban activity structure.
[0170] from Figure 14 (c) It can be seen that the urban activity structure discovery results based on group travel are better, mainly because the group travel-based method can take into account the travel patterns and static attribute information of the group, and improve the modular constraints during the training process, so the visualization results are more compact.
[0171] from Figure 14 (d) As can be seen, the individual representation algorithm performs well in mining certain urban activity structures, such as those in categories 1, 4, and 5. Based on their spatial distribution, we can infer that these three categories are located in areas with low visitation rates. However, it struggles to mine categories 7 and 8, located in the city center. Therefore, we can infer that the individual representation algorithm is only suitable for low-visit, low-interaction patterns in individual travel, but performs poorly in complex, high-visit areas.
[0172] Simulation Conclusion: By analyzing common travel patterns within specific urban activity structures, we can uncover the reasons behind these unsatisfactory public transportation services. Specifically, the method we present, based on urban activity structure detection results, reveals that the imbalance between work and residence in Shenzhen is a primary factor driving directional mobility during morning and evening rush hours between major urban work centers and suburban monofunctional residential areas. Significantly, there are significant differences between weekday and weekend urban activity structures: weekday activity is primarily driven by commuting, while weekend activity is primarily driven by activities such as entertainment and leisure.
[0173] In other strategic transportation planning efforts to alleviate traffic problems, urban activity structure maps can also be used to prioritize future land development plans, such as developing high-tech parks and office buildings in specific areas such as Longhua District to promote overall transportation accessibility. For urban activity structures with low public transportation travel, transit-oriented development should be encouraged to promote public transportation ridership and reduce car use, such as the Dapeng District and Yantian District. The proposed method can provide a deep understanding of the city, including residents' mobility and accessibility, social inequality, the functions of different urban areas, and the effectiveness of the current public transportation system over time. This knowledge can provide a reference for urban planners and managers to provide environmentally sustainable, equitable, and efficient public services.
Claims
1. A method for predicting urban activity structure based on spatiotemporal representation learning, characterized by: The method comprises the following steps: Step 1: Establish a knowledge graph of individual and city area visits; Step 2: Input the knowledge graph of the individual and urban area visits into the initializer TransD model to obtain the individual integrated representation and the urban area initialization representation; Step 3: Input the individual integrated representation and the initial urban area representation into the reinforcement learning environment to dynamically represent individual trips and urban areas; Step 4: Represent individual trips and urban areas and use reinforcement learning methods to predict the next urban area to be visited.
2. The urban activity structure prediction method based on spatiotemporal representation learning according to claim 1 is characterized in that: The prediction method of the reinforcement learning method in step 4 is as follows: the individual-city area interaction knowledge graph in each time period is processed into a vector, the pooling of the knowledge graph is designed in a hierarchical manner, and the average pooling of the two knowledge graphs is used for individual travel and city area to generate vectorized representations of the knowledge graph, namely individual travel representation and city area representation. In each time period, average pooling is used on the two vectors of individual travel representation and city area representation, and they are connected to form a new vector expression, as shown in the following formula: h con =concatenate(h u ,h p ) Where h u ,h p are individual representation and urban area representation, respectively, and concatenate(·) is the connection method; Then connect the h con The input is fed into the fully connected network, which maps the given state s to a set of relations Q(s,a) in the knowledge graph and selects the city area with the highest Q(s,a) as the prediction result.
3. The urban activity structure prediction method based on spatiotemporal representation learning according to claim 2 is characterized in that: Individual travel characterization introduces anisotropic diffusion models to express the travel situation of each individual. Then, guided by the anisotropic diffusion model, the heterogeneity of individual travel is mapped into the characterization results. The anisotropic diffusion model expresses heterogeneity from two aspects: direction and rate, as shown in formula (2): Where, I t is the current state, I t+1 is the state at the next moment, the divergence formula is to find the partial derivative in four directions, λ is the weight, which adjusts the diffusion intensity. represents the divergence of the north, represents the divergence to the south, represents the divergence of the East, represents the divergence in the west, and the partial derivatives in the north, south, east, and west directions are shown in formula (3): Among them, I x,y The current position status, x and y represent longitude and latitude respectively, cN x,y 、cS x,y 、cE x,y 、cW x,y are the thermal conductivity coefficients in the north, south, east and west directions respectively, and the formula is shown as follows (4): Among them, k is the weight of thermal conductivity, which is used to adjust the intensity of thermal conductivity; Replace λ in the anisotropic diffusion model with the attraction index between two places. Therefore, the individual travel representation vector is updated according to the anisotropic idea, as shown in formula (5): Among them, W u The weight of the interaction between the i-th individual and the j-th city area is used to update the individual travel representation, and are the representations of individuals and urban areas at time l, Dir is the four directions of east, south, west and north, c p is the attraction between the two places in the direction p for individual i at time l and time l+1. By improving the traditional gravitational model, the attraction between the two places is calculated as shown in formula (6): Where G poi,d Indicates the number of destination POIs, L b and L s Indicates how many bus routes and subway lines there are between the departure point o and the arrival point d, t od,b and t od,s are the time taken to take the bus and subway from o to d, w1 and w2 represent the proportion of the population taking the bus and subway respectively; the individual dynamic representation result at the last moment is used as the spatiotemporal representation of the individual travel, recorded as n is the number of individuals.
4. The urban activity structure prediction method based on spatiotemporal representation learning according to claim 3 is characterized in that: The dynamic representation of urban areas is based on the representation of individual travel, and the process from individual representation to dynamic representation of urban areas is completed. The whole process is based on the knowledge graph of individual travel. Individuals visit urban areas, and the interactive relationship between individuals and urban areas is explored. The dynamic update of urban areas is achieved by relying on this relationship. Then, the urban area update formula based on individual travel representation is shown in formula (7): This process occurs when the jth individual visits the i-th city area. is the representation of the i-th urban area at time l, W z In order to update the weight of the urban area with the individual as the anchor point, the dynamic representation result of the urban area at the last moment is used as the spatiotemporal representation of the urban area, which is recorded as n is the number of urban areas.
5. The urban activity structure prediction method based on spatiotemporal representation learning according to claim 1 is characterized in that: In step 1, the construction of the interactive knowledge graph between individuals and urban areas uses the visit relationship of individuals visiting urban areas to construct the knowledge graph. The formula for individuals visiting urban areas is: KG u-p ={U,v,Z} Where KG u-p represents an individual visiting a city area, U is the set of individuals, is the number of individuals traveling, v is the visit relationship, Z is the set of urban areas, is the number of urban areas that the individual interacts with; The implicit feedback of the interaction between individuals and urban space is expressed as Where y uz Indicates the interaction between individuals and urban space, if there is interaction it is 1, if there is no interaction it is 0, u represents the individual, z represents the urban area, and U represents the set of passengers; When u and z interact, y uz =1, otherwise, y uz =0.
6. The urban activity structure prediction method based on spatiotemporal representation learning according to claim 2 is characterized in that: In step 2, the robust continuous clustering method is used to discover the urban activity structure. The main function of the robust continuous clustering method is expressed as: Where h z,i is the characterization result of the i-th urban area, Z=[z1,z2,…,z n ] is the representation set of cities, n is the number of cities, Y=[y1,y2,…,y n ] is the learned category of Z, and the clustering result is obtained by optimizing Y; ε represents the city pairs with high similarity, and the similarity is calculated and generated by m-KNN; the weight ω i→j Balance the contribution of each data point to the GDP of the city; λ is the weight between different items, l i,j is a regularization term used to control the generalization ability of the model, as shown in formula (9): Where C = ∑ (i,j)∈ε ω i→j l i,j (e i -e j )(e i -e j ) T , ei and ej are indicator vectors, indicating that they are 1 in the i-dimension and j-dimension respectively.