Priori and data dual-guided urban resident activity intensity prediction method

By constructing a priori constraint matrix with multiple functions similarity and an adjacency matrix of data similarity, combined with time convolution and graph attention network, the problem of failure to fully explore the similarity of multiple functions among grids in the existing technology is solved, and more accurate prediction of urban residents' activity intensity is achieved.

CN120596824APending Publication Date: 2025-09-05FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510673480.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The existing urban residents' activity intensity prediction method fails to fully explore the multivariate functional similarity between grids, resulting in errors in modeling space-time dependencies and inability to accurately reflect the time-varying and complexity of urban functions.

Method used

A priori constraint matrix based on multivariate functional similarity and an adjacency constraint matrix based on data similarity are constructed using a self-supervised learning method. Combining a time convolution network and a graph attention neural network, deep graph neural networks are guided to learn spatial dependencies, and urban residents' activity intensity prediction is carried out through hypergraph convolution and graph attention.

Benefits of technology

It significantly improves the accuracy and generalization performance of the model, can more accurately predict the activity intensity of urban residents, and reduce the root mean square error and average absolute error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596824A_ABST
    Figure CN120596824A_ABST
Patent Text Reader

Abstract

The invention relates to a priori and data dual-guided urban resident activity intensity prediction method, and belongs to the technical field of spatial information. According to the method, multivariate function similarity is extracted on the basis of POI and a grid to serve as priori knowledge, and complementation with the priori knowledge is formed on the basis of similarity of historical data mining and learning data levels; the similarity of priori knowledge and historical data is used to guide a depth map neural network to learn a spatial dependency relationship, and a time convolutional network and an output layer are combined to predict the activity intensity of urban residents. The method has the advantages that (1) the prior knowledge of multivariate function similarity is deeply excavated to guide the model to focus on the relation between the grids which really exist in space dependence, and the precision of the model is remarkably improved; and (2) priori knowledge and data dual guidance is adopted, and the weights of priori knowledge and data are dynamically and adaptively adjusted through a fusion module, so that advantage complementation is realized, and the generalization performance of the method is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of spatial information technology, and in particular relates to a method for predicting the activity intensity of urban residents using dual guidance of a priori knowledge and data. Background Art

[0002] Urban activity intensity refers to the number of residents distributed across study units within a city over a period of time. It provides a real-time, dynamic reflection of population density differences and their temporal patterns. Proactively forecasting urban activity intensity can help city managers accurately identify potential high- and low-intensity activity areas, which is crucial for preventing traffic congestion, ensuring public safety, and building smart cities.

[0003] The prediction of urban resident activity intensity is essentially a spatiotemporal prediction. Data-guided prediction methods have become the mainstream method for predicting urban resident activity intensity [1,2]. Data-guided methods have natural advantages. They do not require the establishment of explicit mathematical expressions and only use historical data to establish nonlinear spatiotemporal dependencies between input and output. At present, graph-oriented deep neural network models are the most common spatiotemporal prediction modeling methods [3–6]. For example, Li et al. [7] abstracted the study area into a graph structure, constructed edge weights based on the interaction intensity of physical space and social space, and used graph convolution to learn spatial dependencies. Liu et al. [8] combined attention mechanism, gated recurrent unit and graph convolution, used graph convolution to learn spatial dependencies, and then used attention mechanism to enhance them and combined gated recurrent unit to learn temporal dependencies. Li et al. [9] constructed the weights of graph model edges based on pedestrian flow, used word2vec algorithm to learn high-order interaction relationships between graph nodes, and combined time series features to predict the distribution of people. Wang et al.

[10] abstracted the study area into graph and hypergraph structures, and used graph convolution and hypergraph convolution to learn spatial dependencies.

[0004] Existing prediction methods are still insufficient in deeply mining prior knowledge and using it to guide the learning of spatial dependencies. For example, existing methods often use the Euclidean distance of the "POI sequence" between research units as an indicator to measure regional functional similarity. However, urban functional types are highly diverse, and research units often have multiple functional attributes at the same time. The dominant urban function will show dynamic time-varying characteristics. For example, the dominant urban function of a certain area during the day may be office, but it may be residential at night. Simple evaluation indicators such as Euclidean distance will ignore this time-varying characteristic and cause errors in the functional similarity measurement. Therefore, it is urgent to construct a modeling method based on high-order multivariate relationships to accurately mine this complex functional similarity between grids as prior knowledge. However, how to effectively model and realize this complex structural expression and apply it to guide spatial dependency modeling in deep graph neural networks remains a key challenge. Summary of the Invention

[0005] The purpose of the present invention is to overcome the defects of the existing technology and provide a method for predicting the activity intensity of urban residents guided by both prior knowledge and data. It captures the complex many-to-many relationship between grids and urban functional characteristics through self-supervised learning, and mines the multivariate functional similarities between grids implicitly represented by this relationship as prior knowledge to guide deep graph neural network modeling of spatial dependencies; it mines the spatiotemporal dependency information implied by the observation data to supplement the prior knowledge and accurately model spatiotemporal dependencies under the dual guidance of prior knowledge and data.

[0006] To achieve the above objectives, the technical solution of the present invention is: a method for predicting the activity intensity of urban residents guided by both prior knowledge and data, which uses multivariate functional similarity extracted based on POI and grid as prior knowledge, and complements the prior knowledge with similarity at the learning data level based on historical data mining and learning, uses prior knowledge and similarity of historical data to guide deep graph neural networks to learn spatial dependencies and combines temporal convolutional networks and output layers to predict the activity intensity of urban residents.

[0007] Furthermore, the method includes:

[0008] Construction of a priori constraint matrix based on multivariate functional similarity;

[0009] Adjacency constraint matrix construction based on data similarity;

[0010] Learning spatiotemporal dependencies and predicting value output with dual guidance of prior data.

[0011] Furthermore, a priori constraint matrix based on multivariate functional similarity is constructed, specifically including:

[0012] 1) Hypergraph construction: Construct a hypergraph oriented towards the semantics of urban functions, abstracting grids into hypergraph nodes and urban functions into hyperedges;

[0013] 2) Learning the complex multivariate relationship between grid and urban functions: Construct a grid-urban function hypergraph weight matrix that represents the multivariate relationship between grid and urban functions. Specifically, a matrix is ​​randomly initialized and then passed through the grid-function learning module to obtain the grid-urban function hypergraph weight matrix W. Grid-func ;

[0014] 3) Self-supervised learning:

[0015] (a) Input and reconstruction target construction: POIs are reclassified and spatially overlaid with the grid to obtain a grid-POI matrix. Random row replacement, row masking, and row retention are performed on the grid-POI matrix. The replaced, masked, and retained rows serve as the reconstruction targets for self-supervised learning. The entire perturbed grid-POI matrix serves as the input for self-supervised learning.

[0016] (b) Forward propagation of self-supervised learning: The entire perturbed grid-POI matrix and the grid-city function hypergraph weight matrix representing the multivariate relationship are input into the feedforward neural network. Specifically, the perturbed grid-POI matrix is ​​first increased in dimension using the dimensionality-increasing feedforward neural network. The grid-city function hypergraph weight matrix is ​​then multiplied by its own transpose, and then multiplied on the left by the increased-dimensional grid-POI matrix. Finally, the dimensionality-reducing feedforward neural network is used to obtain the predicted value of the perturbed row in the grid-POI matrix.

[0017] (c) Error calculation, back propagation, and parameter update for self-supervised learning: This method calculates the root mean square error between the predicted value and the true value of the perturbed row and performs back propagation to update all parameters in the self-supervised learning neural network. When the model converges, the grid-city function hypergraph weight matrix output by the self-supervised learning neural network is binarized, i.e., values ​​greater than 0 are set to 1, otherwise to 0, to obtain the output, i.e., the prior constraint matrix H based on multivariate functional similarity. Prior .

[0018] Furthermore, in 2), the formula of the grid-function learning module is as follows:

[0019] W Grid-func =softmax(topk(Conv1D(W Random ))) (1)

[0020] Where: W Grid-func ∈R N×M is the output grid-city function hypergraph weight matrix, where R represents the real number domain, N represents the number of grids, M represents the number of city functions, and W Random Represents a randomly initialized matrix, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, topk represents taking the largest k numbers in each row and assigning the rest to 0, and softmax represents performing softmax normalization on the k numbers taken from topk. The formula for softmax normalization is as follows:

[0021]

[0022] Where: Softmax(x i ) represents the result of softmax normalization, x i and x j They represent the i-th and j-th numbers taken out of topk in each row mentioned above respectively.

[0023] Furthermore, in 3), the formula of the feedforward neural network is as follows:

[0024]

[0025] Where: · represents vector or matrix multiplication, is the predicted grid-POI matrix, from which the predicted value of the disturbed row can be obtained, M Grid-poi is the disturbed grid-POI matrix, W Grid-func is the grid-city function hypergraph weight matrix, FNN Expand and FNN Reduce They are respectively dimensionality increasing and dimensionality reducing feedforward neural networks.

[0026] Furthermore, the constraint matrix based on data similarity is constructed, including:

[0027] 1) Preprocessing:

[0028] (a) Construction of grid-based daily probability distribution: Constructing the urban resident activity intensity tensor from the urban resident activity intensity sequence (N represents the number of city grids, D represents the number of days, T represents the number of time steps per day, and R represents the real number domain.) The activity intensity matrix corresponding to grid i is selected to construct the daily-scale probability distribution:

[0029]

[0030] Where, and is the distribution value of urban residents’ activity intensity on the dth and kth days in grid i, Indicates from The intraday activity intensity vector of the grid i on the dth day selected in the slice, is an intermediate vector of grid i, ||·||2 represents the L2 norm calculation, p i represents the probability distribution corresponding to grid i, Represents the probability value of grid i on day d.

[0031] (b) Construction of intraday activity difference matrix based on time step information: From the urban residents' activity intensity tensor The activity intensity matrices corresponding to two grids i and j are selected, and the cosine distance between the intra-day activity intensity vectors in the two grids is calculated as the value in the intra-day activity difference matrix based on time step information;

[0032] 1) Time series similarity measurement:

[0033] (a) First-order Wasserstein distance calculation: Linear programming is used to solve the first-order Wasserstein distance between grids i and j;

[0034] (b) Construction of daily activity difference matrix: Traverse all grid pairs and use the first-order Wasserstein distance between the activity intensity sequences of the grid pairs to obtain the data-based similarity matrix. The data-based similarity matrix is ​​subjected to topk threshold constraints by row, that is, the largest k' values ​​in each row are set to 1 and the rest are set to 0, to obtain the data-based adjacency constraint matrix H Data .

[0035] Furthermore, in (b) of 1), the formula for calculating the value in the intraday activity difference matrix based on time step information is as follows:

[0036]

[0037] In the formula, · represents vector or matrix multiplication, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, and Represent the activity intensity tensor of urban residents The intraday activity intensity vector of grid i on day k and the intraday activity intensity vector of grid j on day l selected by the middle slice, ||·||2 represents the L2 norm calculation.

[0038] Furthermore, in (a) of 2), the first-order Wasserstein distance is calculated as follows:

[0039]

[0040] In the formula, Was(p i ,p j ) is the first-order Wasserstein distance between grid i and grid j, represents the joint distribution of two distributions, represents the value of the kth row and lth column in the joint distribution, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, p i [k] and p j [l] represents the kth value of the daily scale probability distribution of grid i and the lth value of the daily scale probability distribution of grid j, respectively.

[0041] Furthermore, the spatiotemporal dependency learning and prediction output guided by prior data include:

[0042] 1) Temporal Dependency Learning: Using Temporal Convolutional Networks to Learn Temporal Dependencies:

[0043] X Out =Conv1D(X) (7)

[0044] Where X∈R L×Nrepresents the input historical resident activity intensity sequence, R represents the real number domain, L represents the input historical sequence length, N represents the number of grids, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, and X Out Represents the output of temporal dependency learning.

[0045] 2) Prior-guided adaptive hypergraph convolution modeling spatial dependencies:

[0046] (a) Construction of adaptive hyperedge weights:

[0047] Based on randomly initialized grid attribute matrix W Grid ∈R N×F (R represents the real number domain, N represents the number of grids, and F represents the number of attributes) and the urban function attribute matrix W Func ∈R M×F (R represents the real number domain, M represents the number of urban functions, and F represents the number of attributes) A ​​series of activation functions are used to obtain the adaptive hyperedge weight matrix W Adaptive :

[0048] W Adaptive =ReLU(Tanh(α(Tanh(αW Grid )·Tanh(αW Func T ))) (8)

[0049] In the formula, · represents vector or matrix multiplication, α is a constant, ReLU and Tanh are two activation functions, and their calculation formulas are as follows:

[0050] ReLU(x)=max(0,x) (9)

[0051] Where ReLU(x) represents the output of the activation function and x represents the input.

[0052]

[0053] Where Tanh(x) represents the output of the activation function and x represents the input.

[0054] (b) Using the prior constraint matrix H based on multivariate functional similarity Prior Apply sparsity constraints to the adaptive hyperedge weight matrix:

[0055]

[0056] Where, represents the hyperedge weight matrix after sparsification, and ⊙ represents element-by-element multiplication.

[0057] (c) Using the sparse hyperedge weight matrix Perform hypergraph convolution:

[0058]

[0059] In the formula, · represents vector or matrix multiplication, represents the output of the prior-guided hypergraph convolution, X Out Denotes the output of temporal dependency learning, Conv1D denotes a one-dimensional convolution with a convolution kernel size of 3, and D Node and D Edge Denote the degree matrices of hypergraph nodes and hyperedges respectively, W HGCN ∈R h×h is a learnable weight matrix, R represents the real number domain, h is the hidden dimension, σ represents the nonlinear activation function, W∈R M×M is the identity matrix, R represents the real number field, and M is the number of city functions. At the same time, residual connections are added to the hypergraph convolution.

[0060] 3) Data-guided graph attention:

[0061] While using prior-guided adaptive hypergraph convolution, we also introduce the adjacency constraint matrix H based on data similarity. Data Guided Graph Attention Neural Networks for Accurate Modeling of Spatial Dependencies:

[0062]

[0063] Where, is the output of the data-guided graph attention, α ij is the attention score, W GAT ∈R h×h is the learnable weight matrix, h1,h2,...,h i ,..,h j ,...,h N Represents the embedding vector of the activity intensity sequence corresponding to each grid, and TransConv represents the mapping from each embedding vector to the output. At the same time, a residual connection is added to the graph attention.

[0064] 4) Fusion of dual-guided results:

[0065] In order to complement the advantages of prior and data guidance, this paper designs a fusion module to fuse the results of prior-guided hypergraph convolution and data-guided graph attention:

[0066]

[0067] In the formula, · represents vector or matrix multiplication, represents the output of the dual-guided fusion module, ReLU is the activation function, concat represents the concatenation operation, and W F ∈R 2h×his a learnable weight matrix, R represents the real number field, and h is the hidden dimension.

[0068] 5) Output layer:

[0069] The original sequence of urban resident activity intensity is passed through a temporal convolutional network, a parallel hypergraph convolution and graph attention network, and a temporal convolutional network, and this cycle is repeated twice to obtain a sequence that learns spatiotemporal dependencies. The last time step of the sequence is then taken and passed through the output layer to obtain the final predicted value. The formula of the output layer is as follows:

[0070] Y out =ReLU((Y spatio-temporal )·W o ) (15)

[0071] In the formula, · represents vector or matrix multiplication, Y out is the final predicted value, ReLU activation function, Y spatio-temporal represents the output of spatiotemporal dependency learning, W o ∈R h×1 is a learnable weight matrix, R represents the real number field, and h is the hidden dimension.

[0072] The present invention also provides a computer-readable storage medium on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, any of the method steps described above can be implemented.

[0073] Compared with the prior art, the present invention has the following beneficial effects:

[0074] (1) Deeply explore the prior knowledge of multivariate functional similarity to guide the model to focus on the connections between grids that actually have spatial dependencies, significantly improving the accuracy of the model;

[0075] (2) It adopts dual guidance of prior knowledge and data, and dynamically and adaptively adjusts the weights of the two through the fusion module, thereby achieving complementary advantages and enhancing the generalization performance of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 Provides a technical framework for predicting urban residents' activity intensity.

[0077] Figure 2 is the spatial distribution of Shannon entropy and absolute error in different time periods. DETAILED DESCRIPTION

[0078] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.

[0079] This paper provides a method for predicting the activity intensity of urban residents using both prior knowledge and data guidance. It uses multivariate functional similarity extracted from POIs and grids as prior knowledge, and complements this knowledge with historical data mining and learning data-level similarity. This method uses prior knowledge and historical data similarity to guide a deep graph neural network to learn spatial dependencies, and combines this with a temporal convolutional network and output layer to predict the activity intensity of urban residents. The main contents include:

[0080] (1) Construction of a priori constraint matrix based on multivariate functional similarity;

[0081] (2) Construction of adjacency constraint matrix based on data similarity;

[0082] (3) Learning of spatiotemporal dependencies and output of predicted values ​​guided by dual prior data.

[0083] The following is a specific implementation process of the present invention.

[0084] The present invention provides a method for predicting the activity intensity of urban residents guided by both prior knowledge and data. Figure 1 , including the following steps:

[0085] The first step is to construct a priori constraint matrix based on multivariate functional similarity:

[0086] 1) Hypergraph construction: Construct a hypergraph oriented towards the semantics of urban functions, abstracting grids into hypergraph nodes and urban functions into hyperedges;

[0087] 2) Learning the complex multivariate relationship between grid and urban functions: Construct a grid-urban function hypergraph weight matrix that represents the multivariate relationship between grid and urban functions. Specifically, a matrix is ​​randomly initialized and then passed through the grid-function learning module to obtain the grid-urban function hypergraph weight matrix W. Grid-func The formula of the grid-function learning module is as follows:

[0088] W Grid-func =softmax(topk(Conv1D(W Random ))) (1)

[0089] Where: W Grid-func ∈R N×M is the output grid-city function hypergraph weight matrix, where R represents the real number domain, N represents the number of grids, M represents the number of city functions, and W Random Represents a randomly initialized matrix, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, topk represents taking the largest k numbers in each row and assigning the rest to 0, and softmax represents performing softmax normalization on the k numbers taken from topk. The formula for softmax normalization is as follows:

[0090]

[0091] Where: Softmax(x i ) represents the result of softmax normalization, x i and x j They represent the i-th and j-th numbers taken out of topk in each row mentioned above respectively.

[0092] 3) Self-supervised learning:

[0093] (a) Input and reconstruction target construction: This method reclassifies POIs (Appendix 1) and spatially overlays them with the grid, resulting in a grid-POI matrix. This matrix is ​​subjected to random row replacement, row masking, and row retention. The replaced, masked, and retained rows serve as the reconstruction targets for self-supervised learning. The entire perturbed grid-POI matrix serves as the input for self-supervised learning.

[0094] Appendix 1 POI reclassification table

[0095]

[0096] (b) Forward propagation for self-supervised learning: The entire perturbed grid-POI matrix and the grid-city function hypergraph weight matrix representing multivariate relationships are input into the feedforward neural network:

[0097]

[0098] Where: · represents vector or matrix multiplication, is the predicted grid-POI matrix, from which the predicted value of the disturbed row can be obtained, M Grid-poi is the disturbed grid-POI matrix, W Grid-func is the grid-city function hypergraph weight matrix, FNN Expand and FNN Reduce They are respectively dimensionality increasing and dimensionality reducing feedforward neural networks.

[0099] (c) Error calculation, back propagation, and parameter update for self-supervised learning: This method calculates the root mean square error between the predicted value and the true value of the perturbed row and performs back propagation to update all parameters in the self-supervised learning neural network. When the model converges, the grid-city function hypergraph weight matrix output by the self-supervised learning neural network is binarized, i.e., values ​​greater than 0 are set to 1, otherwise to 0, to obtain the output, i.e., the prior constraint matrix H based on multivariate functional similarity. Prior .

[0100] The second step is to construct a constraint matrix based on data similarity:

[0101] 1) Preprocessing:

[0102] (a) Construction of grid-based daily probability distribution: Constructing the urban resident activity intensity tensor from the urban resident activity intensity sequence (N represents the number of city grids, D represents the number of days, T represents the number of time steps per day, and R represents the real number domain.) The activity intensity matrix corresponding to grid i is selected to construct the daily-scale probability distribution:

[0103]

[0104] Where, and is the distribution value of urban residents’ activity intensity on the dth and kth days in grid i, Indicates from The intraday activity intensity vector of the grid i on the dth day selected in the slice, is an intermediate vector of grid i, ||·||2 represents the L2 norm calculation, p i represents the probability distribution corresponding to grid i, Represents the probability value of grid i on day d.

[0105] (b) Construction of intraday activity difference matrix based on time step information: From the urban residents' activity intensity tensor The activity intensity matrices corresponding to two grids i and j are selected, and the cosine distance between the intra-day activity intensity vectors in the two grids is calculated as the value in the intra-day activity difference matrix based on time step information;

[0106]

[0107] In the formula, · represents vector or matrix multiplication, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, and Represent the activity intensity tensor of urban residents The intraday activity intensity vector of grid i on day k and the intraday activity intensity vector of grid j on day l selected by the middle slice, ||·||2 represents the L2 norm calculation.

[0108] 2) Time series similarity measurement:

[0109] (a) First-order Wasserstein distance calculation: Linear programming is used to solve the first-order Wasserstein distance between grids i and j:

[0110]

[0111] In the formula, Was(p i ,p j ) is the first-order Wasserstein distance between grid i and grid j, Represents two distributions p i and p j The joint distribution of represents the value of the kth row and lth column in the joint distribution, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, p i [k] and p j [l] represents the kth value of the daily scale probability distribution of grid i and the lth value of the daily scale probability distribution of grid j, respectively.

[0112] (b) Construction of daily activity difference matrix: Traverse all grid pairs and use the first-order Wasserstein distance between the activity intensity sequences of the grid pairs to obtain the data-based similarity matrix. The data-based similarity matrix is ​​subjected to topk threshold constraints by row, that is, the largest k' values ​​in each row are set to 1 and the rest are set to 0, to obtain the data-based adjacency constraint matrix H Data .

[0113] The third step is to learn the spatiotemporal dependency relationship and output the predicted value based on the dual guidance of prior data;

[0114] 1) Temporal Dependency Learning: Using Temporal Convolutional Networks to Learn Temporal Dependencies:

[0115] X Out =Conv1D(X) (7)

[0116] Where X∈R L×N represents the input historical resident activity intensity sequence, R represents the real number domain, L represents the input historical sequence length, N represents the number of grids, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, and X Out Represents the output of temporal dependency learning.

[0117] 2) Prior-guided adaptive hypergraph convolution modeling spatial dependencies:

[0118] (a) Construction of adaptive hyperedge weights:

[0119] Based on randomly initialized grid attribute matrix W Grid ∈R N×F (R represents the real number domain, N represents the number of grids, and F represents the number of attributes) and the urban function attribute matrix W Func ∈R M×F (R represents the real number domain, M represents the number of urban functions, and F represents the number of attributes) A ​​series of activation functions are used to obtain the adaptive hyperedge weight matrix W Adaptive :

[0120] W Adaptive=ReLU(Tanh(α(Tanh(αW Grid )·Tanh(αW Func T ))) (8)

[0121] In the formula, · represents vector or matrix multiplication, α is a constant, ReLU and Tanh are two activation functions, and their calculation formulas are as follows:

[0122] ReLU(x)=max(0,x) (9)

[0123] Where ReLU(x) represents the output of the activation function and x represents the input.

[0124]

[0125] Where Tanh(x) represents the output of the activation function and x represents the input.

[0126] (b) Using the prior constraint matrix H based on multivariate functional similarity Prior Apply sparsity constraints to the adaptive hyperedge weight matrix:

[0127]

[0128] Where, represents the hyperedge weight matrix after sparsification, and ⊙ represents element-by-element multiplication.

[0129] (c) Using the sparse hyperedge weight matrix Perform hypergraph convolution:

[0130]

[0131] In the formula, · represents vector or matrix multiplication, represents the output of the prior-guided hypergraph convolution, X Out Denotes the output of temporal dependency learning, Conv1D denotes a one-dimensional convolution with a convolution kernel size of 3, and D Node and D Edge Denote the degree matrices of hypergraph nodes and hyperedges respectively, W HGCN ∈R h×h is a learnable weight matrix, R represents the real number domain, h is the hidden dimension, σ represents the nonlinear activation function, W∈R M×M is the identity matrix, R represents the real number field, and M is the number of city functions. At the same time, residual connections are added to the hypergraph convolution.

[0132] 3) Data-guided graph attention:

[0133] While using prior-guided adaptive hypergraph convolution, we also introduce the adjacency constraint matrix H based on data similarity. Data Guided Graph Attention Neural Networks for Accurate Modeling of Spatial Dependencies:

[0134]

[0135] Where, is the output of the data-guided graph attention, α ij is the attention score, W GAT ∈R h×h is the learnable weight matrix, h1,h2,…,h i ,..,h j ,…,h N Represents the embedding vector of the activity intensity sequence corresponding to each grid, and TransConv represents the mapping from each embedding vector to the output. At the same time, a residual connection is added to the graph attention.

[0136] 4) Fusion of dual-guided results:

[0137] In order to complement the advantages of prior and data guidance, this paper designs a fusion module to fuse the results of prior-guided hypergraph convolution and data-guided graph attention:

[0138]

[0139] In the formula, · represents vector or matrix multiplication, represents the output of the dual-guided fusion module, ReLU is the activation function, concat represents the concatenation operation, and W F ∈R 2h×h is a learnable weight matrix, R represents the real number field, and h is the hidden dimension.

[0140] 5) Output layer:

[0141] The original sequence of urban resident activity intensity is passed through a temporal convolutional network, a parallel hypergraph convolution and graph attention network, and a temporal convolutional network, and this cycle is repeated twice to obtain a sequence that learns spatiotemporal dependencies. The last time step of the sequence is then taken and passed through the output layer to obtain the final prediction value:

[0142] Y out =ReLU((Y spatio-temporal )·W o ) (15)

[0143] In the formula, · represents vector or matrix multiplication, Y out is the final predicted value, ReLU activation function, Y spatio-temporal represents the output of spatiotemporal dependency learning, W o ∈Rh×1 is a learnable weight matrix, R represents the real number field, and h is the hidden dimension.

[0144] This method was experimented with the activity intensity of residents in a city extracted from the mobile phone positioning data of a city, and its effectiveness was analyzed. This method is significantly superior to the more cutting-edge and classic methods in terms of both root mean square error and mean absolute error (Appendix 2). In terms of the root mean square error indicator, the best baseline method is DSTAGNN, with a root mean square error of 22.26. Compared with this model, the root mean square error of the model proposed in this invention is reduced by about 3.2%; in terms of the mean absolute error indicator, the best baseline method is HYGCN, with a mean absolute error of 13.89. Compared with this model, the mean absolute error of the model proposed in this invention is reduced by about 9.1%. Since neither DSTAGNN nor HYGCN uses the prior knowledge of multivariate functional similarity for guidance, it can be confirmed that the method of this invention is effective in its innovative approach of mining multivariate functional similarity to guide the model.

[0145] Appendix 2 Comparison with other methods

[0146]

[0147] In order to further verify the effectiveness of each module of the method of the present invention, an ablation experiment was conducted to eliminate the prior-guided hypergraph convolution and data-guided graph attention neural network in turn, and observe the accuracy performance of the model. As shown in Table 3, when the prior-guided hypergraph convolution was removed, the root mean square error and mean absolute error increased by 2.35 and 1.15 respectively compared with the complete model, an increase of about 10.9% and 9.1%. When the data-guided graph attention was removed, the two indicators increased by 0.68 and 0.39 respectively, an increase of about 4.3% and 4.4%. The results show that both types of guidance have a significant contribution to the improvement of model accuracy. Compared with data guidance, the role of prior guidance is more obvious, which once again proves the necessity of introducing multivariate functional similarity to guide the model to model complex spatial dependencies.

[0148] Appendix 3 Ablation experiment results

[0149]

[0150] In order to study the reliability and rationality of the method of the present invention, we calculated the absolute error of the five time periods on weekdays in the validation set and the Shannon entropy of the reclassified POIs in Appendix 1, and visualized their spatial distribution. Figure 2As shown in the figure, from a temporal perspective, the maximum errors for 8:00-8:15, 12:00-12:15, and 18:00-18:15 all exceed 170, while the maximum error for 22:00-22:15 is less than 110, and the maximum error for 2:30-2:45 is no more than 60. Overall, the prediction error is smaller at night than during the day. This temporal variation in error is primarily due to the cyclical nature of urban residents' activities throughout the day. Residents typically sleep from 11:00 PM to 6:00 AM, spending the rest of the day commuting, working, and entertaining. Compared to recreational and commuting activities, sleep occurs in relatively fixed locations, and the spatial distribution of activity intensity during this time period is relatively consistent throughout the day, making prediction easier and resulting in smaller errors. From a spatial perspective, the overall prediction error for Huli District in the northern part of a city is higher than that for Siming District in the southern part, regardless of time period. This is because the northern part of the city generally has a larger population than the southern part. A large population base will lead to complex patterns of resident mobility and interaction, and thus the activity intensity of residents in high-population areas is highly unpredictable. Figure 2 The spatial distribution of the POI Shannon entropy in (a) generally matches the spatial distribution of the prediction error. This is because if an area contains multiple urban functions, such as office, residential, and commercial areas, residents' activities in that area are multi-purpose, making it difficult to predict their activity intensity. Relatively speaking, prediction is easier in areas with a single function. The Shannon entropy of a POI represents the degree of urban functional mixing; a higher value indicates a higher degree of functional mixing. Therefore, areas with high Shannon entropy have greater unpredictability of resident activity intensity and larger errors. The above analysis demonstrates that the spatiotemporal distribution of the prediction error of this method generally conforms to existing theoretical knowledge, demonstrating its reliability and rationality.

[0151] The present invention also provides a computer-readable storage medium on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, any of the method steps described above can be implemented.

[0152] References:

[0153] [1] Wang Peixiao, Zhang Hengcai, Zhang Yan, et al. Research progress and development trend of geospatial intelligent prediction[J]. Journal of Geo-information Science, 2025, 27(1): 60–82.

[0154] [2] Gao Song. Summary and reflections on recent research on geospatial artificial intelligence[J]. Journal of Wuhan University (Information Science Edition), 2020, 45(12): 1865–1874.

[0155] [3]Wang P, Zhang H, Cheng S, et al. A lightweight spatiotemporal graphdilated convolutional network for urban sensor state prediction[J]. Sustainable Cities and Society, 2024,101:105105.

[0156] [4]Wang P, Zhang H, Liu J, et al. Efficient inference of large-scale airquality using a lightweight ensemble predictor[J]. International Journal ofGeographical Information Science, 2025, 39(4):900–924.

[0157] [5] Wang Peixiao, Zhang Hengcai, Zhang Tong, et al. PM2.5 concentration prediction and interpretability analysis based on attention ordinary differential equation [J]. Journal of Geo-Information Science, 2024, 26(6): 1363–1373.

[0158] [6] Wang Peixiao, Zhang Tong, Nie Shichao, et al. Spatiotemporal prediction network based on causal graphs with missing values[J]. Acta Geodaetica et Cartographica Sinica, 2023, 52(5):818–830.

[0159] [7] Li M, Gao S, Lu F, et al. Prediction of human activity intensity using the interactions in physical and social spaces through graph convolutional networks [J]. International Journal of Geographical Information Science, 2021, 35(12): 2489–2516.

[0160] [8]Liu H, Zhu C, Zhang D, et al.Attention-based spatial-temporal graphconvolutional recurrent networks for traffic forecasting[Z / OL].arXiv,2023(2023)[2024–12–02].https: / / arxiv.org / abs / 2302.12973.

[0161] [9]Li M,Gao S,Qiu P,et al.Fine-grained crowd distribution forecastingwith multi-order spatial interactions using mobile phone data[J].Transportation Research Part C:Emerging Technologies,2022,144:103908.

[0162]

[10] Wang Y, Zhu DA hypergraph-based hybrid graph convolutional network for intracity human activity intensity prediction and geographicrelationship interpretation[J]. Information Fusion, 2024,104:102149..

[0163] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions and effects do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. A method for predicting the activity intensity of urban residents based on both prior knowledge and data, characterized in that: The multi-functional similarity extracted based on POI and grid is used as prior knowledge, and the similarity at the data level is mined and learned based on historical data to complement the prior knowledge. The prior knowledge and the similarity of historical data are used to guide the deep graph neural network to learn spatial dependencies and combined with the temporal convolutional network and output layer to predict the activity intensity of urban residents.

2. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 1 is characterized in that: include: Construction of a priori constraint matrix based on multivariate functional similarity; Adjacency constraint matrix construction based on data similarity; Learning spatiotemporal dependencies and predicting value output with dual guidance of prior data.

3. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 2 is characterized in that: The prior constraint matrix based on multivariate functional similarity is constructed, specifically including: 1) Hypergraph construction: Construct a hypergraph oriented towards the semantics of urban functions, abstracting grids into hypergraph nodes and urban functions into hyperedges; 2) Learning complex multivariate relationships between grids and urban functions: Constructing a grid-urban function hypergraph weight matrix W that represents the multivariate relationships between grids and urban functions Grid-func Specifically, a matrix is ​​randomly initialized and then the matrix is ​​passed through the grid-function learning module to obtain the grid-city function hypergraph weight matrix; 3) Self-supervised learning: (a) Input and reconstruction target construction: POIs are reclassified and spatially overlaid with the grid to obtain a grid-POI matrix. Random row replacement, row masking, and row retention are performed on the grid-POI matrix. The replaced, masked, and retained rows serve as the reconstruction targets for self-supervised learning. The entire perturbed grid-POI matrix serves as the input for self-supervised learning. (b) Forward propagation of self-supervised learning: The entire perturbed grid-POI matrix and the grid-city function hypergraph weight matrix representing the multivariate relationship are input into the feedforward neural network. Specifically, the perturbed grid-POI matrix is ​​first increased in dimension using the dimensionality-increasing feedforward neural network. The grid-city function hypergraph weight matrix is ​​then multiplied by its own transpose, and then multiplied on the left by the increased-dimensional grid-POI matrix. Finally, the dimensionality-reducing feedforward neural network is used to obtain the predicted value of the perturbed row in the grid-POI matrix. (c) Perform error calculation, back propagation, and parameter update for self-supervised learning: Calculate the root mean square error between the predicted value and the true value of the perturbed row and perform back propagation to update all parameters in the self-supervised learning neural network; When the model converges, binarize the grid-city function hypermap weight matrix output by the self-supervised learning neural network, that is, set values ​​greater than 0 to 1, otherwise to 0, and obtain the output, that is, the prior constraint matrix H based on multivariate functional similarity. Prior .

4. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 3 is characterized in that: 2) In the grid-function learning module, the formula is as follows: IN Grid-func =softmax(topk(Conv1D(W Random ))) (1) Where: W Grid-func ∈R N×M is the output grid-city function hypergraph weight matrix, R represents the real number domain, N represents the number of grids, M represents the number of city functions, and W Random Represents a randomly initialized matrix, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, topk represents taking the largest k numbers in each row and assigning the rest to 0, and softmax represents performing sofmtax normalization on the k numbers taken from topk. The formula for sofmtax normalization is as follows: Where: Sofmtax(x i ) represents the result of sofmtax normalization, x i and x j They represent the i-th and j-th numbers taken out of topk in each row mentioned above respectively.

5. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 3 is characterized in that: 3), the formula of the feedforward neural network is as follows: Where: · represents vector or matrix multiplication, is the predicted grid-POI matrix, from which the predicted value of the disturbed row is obtained, M Grid-poi is the disturbed grid-POI matrix, W Grid-func is the grid-city function hypergraph weight matrix, FNN Expand and FNN Reduce They are respectively dimensionality increasing and dimensionality reducing feedforward neural networks.

6. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 2 is characterized in that: The constraint matrix based on data similarity is constructed, including: 1) Preprocessing: (a) Construction of daily grid-scale probability distribution: Constructing the urban resident activity intensity tensor based on the urban resident activity intensity sequence In the equation, N represents the number of city grids, D represents the number of days, T represents the number of time steps per day, and R represents the real number domain. The activity intensity matrix corresponding to grid i is selected to construct the daily scale probability distribution: Where, and is the distribution value of urban residents’ activity intensity on the dth and kth days in grid i, Indicates from The intraday activity intensity vector of the grid i on the dth day selected in the slice, is an intermediate vector of grid i, ||·||2 represents the L2 norm calculation, p i represents the probability distribution corresponding to grid i, represents the probability value of grid i on day d; (b) Construction of intraday activity difference matrix based on time step information: From the urban residents' activity intensity tensor The activity intensity matrices corresponding to two grids i and j are selected, and the cosine distance between the intra-day activity intensity vectors in the two grids is calculated as the value in the intra-day activity difference matrix based on time step information; 2) Time series similarity measurement: (a) First-order Wasserstein distance calculation: Linear programming is used to solve the first-order Wasserstein distance between grids i and j; (b) Matrix construction: Traverse all grid pairs and use the first-order Wasserstein distance between the resident activity intensity sequences of the grid pairs minus one to obtain the data-based similarity matrix. The data-based similarity matrix is ​​subjected to topk threshold constraints by row, that is, the largest k' values ​​in each row are set to 1 and the rest are set to 0, to obtain the data-based adjacency constraint matrix H Data .

7. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 6 is characterized in that: In (b) of 1), the formula for calculating the value in the intraday activity difference matrix based on time step information is as follows: In the formula, · represents vector or matrix multiplication, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, and Represent the activity intensity tensor of urban residents The intraday activity intensity vector of grid i on the kth day and the intraday activity intensity vector of grid j on the lth day selected by the middle slice, T is the transpose symbol, and ||·||2 indicates the L2 norm calculation.

8. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 6 is characterized in that: In (a) of 2), the first-order Wasserstein distance is calculated as follows: In the formula: Was(p i ,p j ) is the first-order Wasserstein distance between grid i and grid j, represents the joint distribution of two distributions, represents the value of the kth row and lth column in the joint distribution, represents the value of the kth row and lth column of the intraday activity difference matrix between grid i and grid j, p i [k] and p j [l] represents the kth value of the daily scale probability distribution of grid i and the lth value of the daily scale probability distribution of grid j, respectively.

9. The method for predicting the activity intensity of urban residents based on a priori and data dual guidance according to claim 2, characterized in that: Learning spatiotemporal dependencies and outputting predicted values ​​using dual guidance from prior data, specifically including: 1) Temporal Dependency Learning: Using Temporal Convolutional Networks to Learn Temporal Dependencies: X Out =Conv1D(X) (7) Where X∈R L×n represents the input historical resident activity intensity sequence, R represents the real number domain, L represents the input historical sequence length, n represents the number of grids, Conv1D represents a one-dimensional convolution operation with a convolution kernel size of 3, and X Out Represents the output of temporal dependency learning; 2) Prior-guided adaptive hypergraph convolution modeling spatial dependencies: (a) Construction of adaptive hyperedge weights: Based on randomly initialized grid attribute matrix W Grid ∈R N×F , and the urban function attribute matrix W Func ∈R M×F , R represents the real number domain, N represents the number of grids, M represents the number of urban functions, F represents the number of attributes, and a series of activation functions are used to obtain the adaptive hyperedge weight matrix W Adaptive : W Adaptive =ReLU(Tanh(α(Tanh(αW Grid )·Tanh(αW Func T ))) (8) In the formula, · represents vector or matrix multiplication, α is a constant, ReLU and Tanh are two activation functions, and their calculation formulas are as follows: ReLU(x)=max(0,x) (9) Where ReLU(x) represents the output of the activation function and x represents the input; Where Tanh(x) represents the output of the activation function, and x represents the input; (b) Using the prior constraint matrix H based on multivariate functional similarity Prior Apply sparsity constraints to the adaptive hyperedge weight matrix: Where, represents the hyperedge weight matrix after sparsification, and ⊙ represents element-by-element multiplication; (c) Using the sparse hyperedge weight matrix Perform hypergraph convolution: In the formula, · represents vector or matrix multiplication, represents the output of the prior-guided hypergraph convolution, X Out Denotes the output of temporal dependency learning, Conv1D denotes a one-dimensional convolution with a convolution kernel size of 3, and D Node and D Edge Denote the degree matrices of hypergraph nodes and hyperedges respectively, W HGCN ∈R h×h is a learnable weight matrix, R represents the real number domain, h is the hidden dimension, σ represents the nonlinear activation function, W∈R M×M is the unit matrix, R represents the real number field, and M is the number of city functions. At the same time, residual connections are added to the hypergraph convolution. 3) Data-guided graph attention: While using prior-guided adaptive hypergraph convolution, we also introduce the adjacency constraint matrix H based on data similarity. Data Guided Graph Attention Neural Networks for Accurate Modeling of Spatial Dependencies: In the formula, · represents vector or matrix multiplication, is the output of the data-guided graph attention, α ij is the attention score, W GAT ∈R h×h is the learnable weight matrix, h1,h2,…,h i ,..,h j ,…,h N Represents the embedding vector of the activity intensity sequence corresponding to each grid, and TransConv represents the mapping from each embedding vector to the output; at the same time, a residual connection is added to the graph attention; 4) Fusion of dual-guided results: In order to complement the advantages of prior and data guidance, a fusion module is designed to fuse the results of prior-guided hypergraph convolution and data-guided graph attention: In the formula, · represents vector or matrix multiplication, represents the output of the dual-guided fusion module, ReLU is the activation function, concat represents the concatenation operation, and W F ∈R 2h×h is a learnable weight matrix, R represents the real number field, and h is the hidden dimension; 5) Output layer: The original sequence of urban resident activity intensity is passed through a temporal convolutional network, a parallel hypergraph convolution and graph attention network, and a temporal convolutional network, and this cycle is repeated twice to obtain a sequence that learns spatiotemporal dependencies. The last time step of the sequence is then taken and passed through the output layer to obtain the final predicted value. The formula of the output layer is as follows: Y out =ReLU((Y spatio-temporal )·IN o ) (15) In the formula, · represents vector or matrix multiplication, Y out is the final predicted value, ReLU activation function, Y spatio-temporal represents the output of spatiotemporal dependency learning, W o ∈R h×1 is a learnable weight matrix, R represents the real number field, and h is the hidden dimension.

10. A computer-readable storage medium storing computer program instructions that can be executed by a processor, wherein when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 9 can be implemented.