People flow prediction method and system based on space-time diagram neural network

By standardizing historical pedestrian flow data and constructing a spatiotemporal dependency graph, spatial attention weights are generated. Combined with gated convolutional coding to optimize feature representation, the problems of accuracy and efficiency in pedestrian flow prediction in existing methods are solved, and efficient and accurate pedestrian flow prediction is achieved.

CN121412922APending Publication Date: 2026-01-27LIGHT OF THE EARTH MUSEUM OPERATIONS & MANAGEMENT (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511576819.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing methods for predicting pedestrian flow based on spatiotemporal graph neural networks have shortcomings in data preprocessing and spatial dependency modeling, resulting in defects in the quality of pedestrian flow sequences and low prediction accuracy, which cannot meet the needs for rapid and accurate prediction of pedestrian flow changes.

Method used

By standardizing historical pedestrian flow data, spatial attention weights are generated, a spatiotemporal dependency graph is constructed, multimodal evolution and feature fusion are performed, and the temporal feature representation is optimized by gated convolutional coding, thus achieving deep coupling of multi-source features.

Benefits of technology

It improves the accuracy and efficiency of crowd flow prediction, reduces data error interference, and adapts to the needs of fast and accurate crowd flow prediction in real-world scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121412922A_ABST
    Figure CN121412922A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of space-time prediction, and discloses a people flow prediction method and system based on a space-time diagram neural network, and the method comprises the steps: carrying out the standardization processing of historical people flow data of a target region and corresponding time information data, and obtaining a people flow sequence; according to a preset graph attention network, generating a space attention weight between the people stream sequence nodes; based on the time information data and the space attention weight, carrying out multi-modal evolution on the people stream sequence to obtain a space-time dependency graph; performing convolution kernel aggregation on adjacent node features of the node feature matrix in the space-time dependency graph to obtain spatial feature representation; capturing a time sequence change track represented by the spatial features, and performing gating convolution coding on the time sequence change track to obtain time feature representation; performing multi-source feature fusion on the spatial feature representation and the time feature representation to obtain a people flow prediction result of the target area; the method can improve the efficiency of people flow prediction based on the space-time diagram neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spatiotemporal prediction technology, and in particular to a method and system for predicting pedestrian flow based on a spatiotemporal graph neural network. Background Technology

[0002] Current methods for pedestrian flow prediction based on spatiotemporal graph neural networks have significant shortcomings in data preprocessing. Most methods fail to implement comprehensive and standardized processing of historical pedestrian flow data, failing to effectively remove outliers to ensure data purity and struggling to unify indicators from different data sources. This results in quality defects in the generated pedestrian flow sequences, creating potential errors for subsequent prediction model inputs. Furthermore, in spatial dependency modeling, existing techniques lack sufficient depth in applying graph attention networks, failing to accurately calculate the correlation strength and spatial attention weights between nodes. This leads to poor spatial contextual joint effects of node features and insufficient extraction of spatially enhanced features, directly weakening the spatial feature learning foundation of the prediction model.

[0003] In the spatiotemporal feature fusion and prediction output stages, the performance bottlenecks of existing technologies are even more pronounced. For processing temporal features, existing methods struggle to efficiently capture the temporal series change trajectories of spatial feature representations. Even when attempting trend recursion, the design of gated convolutional coding is inadequate, failing to effectively generate high-order temporal evolution features and failing to thoroughly filter redundant values ​​in the features, significantly reducing the accuracy and effectiveness of temporal feature representations. Furthermore, in the multi-source feature fusion process, existing methods lack a systematic integration design for spatiotemporal features. Key steps such as spatial domain reconstruction of the fusion feature tensor, nonlinear fusion of multi-dimensional features, and distribution calibration are poorly handled, making it difficult to achieve deep coupling of spatiotemporal features. Ultimately, this not only results in low accuracy of pedestrian flow prediction results but also inefficiency in the entire prediction process, failing to meet the demands for rapid and accurate prediction of pedestrian flow changes in real-world scenarios. Therefore, improving the efficiency of pedestrian flow prediction based on spatiotemporal graph neural networks has become an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a method and system for predicting pedestrian flow based on spatiotemporal graph neural networks, in order to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a method for predicting pedestrian flow based on a spatiotemporal graph neural network, comprising:

[0006] S1. Obtain the historical pedestrian flow data and corresponding time information data of the target area, and standardize the historical pedestrian flow data to obtain the pedestrian flow sequence of the target area;

[0007] S2. Generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network;

[0008] S3. Based on the time information data and the spatial attention weight, perform multimodal evolution on the crowd flow sequence to obtain the spatiotemporal dependency graph of the crowd flow sequence;

[0009] S4. Perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region;

[0010] S5. Capture the time series change trajectory of the spatial feature representation, and perform gated convolutional encoding on the time series change trajectory to obtain the time feature representation of the target region;

[0011] S6. Perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.

[0012] In a preferred embodiment, the step of processing historical pedestrian flow data and corresponding time information data of the target area, and standardizing the historical pedestrian flow data to obtain the pedestrian flow sequence of the target area, includes:

[0013] Obtain historical pedestrian flow data and corresponding time information for the target area;

[0014] Remove outliers from the historical pedestrian flow data to obtain cleaned pedestrian flow data for the target area;

[0015] The cleaned pedestrian flow data is standardized by unifying the indicators to obtain standardized pedestrian flow data for the target area;

[0016] The standardized pedestrian flow data is serialized and reconstructed to obtain the pedestrian flow sequence of the target area.

[0017] In a preferred embodiment, generating spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network includes:

[0018] Extract the node feature matrix of the crowd flow sequence;

[0019] Calculate the association strength of nodes in the node feature matrix, wherein the formula for calculating the association strength is as follows:

[0020] ;

[0021] In the formula, Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, This represents the preset shared weight matrix. This represents the parameter vector in the graph attention network. This represents the transpose of the parameter vector. This represents the vector concatenation operation. Represents the activation function of the leaky rectifier linear unit;

[0022] Based on the association strength, calculate the spatial attention coefficient of the nodes in the node feature matrix;

[0023] The spatial attention coefficients are normalized to obtain the spatial attention weights between nodes in the pedestrian flow sequence.

[0024] In a preferred embodiment, the spatial attention coefficient is calculated using the following formula:

[0025] ;

[0026] In the formula, Represents the nodes in the node feature matrix and nodes Spatial attention coefficients between them Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, Indicates the node used for transformation Heterogeneous weight matrix, Indicates the node used for transformation The preset heterogeneous weight matrix, This represents the preset bias vector. This represents the transpose of the heterogeneous bias vector. This represents the vector concatenation operation. This represents the preset balance factor. Represents the nodes in the node feature matrix The set of adjacent nodes, express Activation function Represented by natural constant An exponential function with base 0.

[0027] In a preferred embodiment, the step of performing multimodal evolution on the pedestrian flow sequence based on the temporal information data and the spatial attention weights to obtain the spatiotemporal dependency graph of the pedestrian flow sequence includes:

[0028] Extract the time sequence pattern from the time information data;

[0029] Based on the spatial attention weights, spatial context joint is performed on the node features in the node feature matrix to obtain the spatial enhancement features of the pedestrian flow sequence;

[0030] The temporal pattern and the spatial enhancement features are subjected to feature fusion analysis to obtain the spatiotemporal fusion features of the pedestrian flow sequence;

[0031] Based on the spatiotemporal dependency of the pedestrian flow sequence, the spatiotemporal fusion features are subjected to multimodal evolution to obtain the spatiotemporal dependency graph of the pedestrian flow sequence.

[0032] In a preferred embodiment, the step of convolutional kernel aggregation of the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region includes:

[0033] Based on the topological structure of the spatiotemporal dependency graph, identify the adjacent nodes of the node feature matrix in the spatiotemporal dependency graph;

[0034] Local features are extracted from the nodes in the spatiotemporal dependency graph to obtain the initial spatial features of the target region;

[0035] By performing higher-order interactions on the initial spatial features, the enhanced spatial features of the target region are obtained;

[0036] The enhanced spatial features are topologically integrated to obtain a spatial feature representation of the target region.

[0037] In a preferred embodiment, capturing the temporal series change trajectory of the spatial feature representation and performing gated convolutional encoding on the temporal series change trajectory to obtain the temporal feature representation of the target region includes:

[0038] Capture the time-series change trajectory represented by the spatial features;

[0039] By performing trend recursion on the time series change trajectory, the initial temporal evolution characteristics of the target region are obtained;

[0040] The initial temporal evolution features are subjected to gated convolutional encoding to obtain the higher-order temporal evolution features of the initial temporal evolution features;

[0041] Redundant values ​​of the higher-order temporal evolution features are removed to obtain filtered temporal evolution features of the higher-order temporal evolution features;

[0042] The filtered temporal evolution features are reconstructed to obtain the temporal feature representation of the target region.

[0043] In a preferred embodiment, the step of fusing multi-source features from the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result for the target area includes:

[0044] The spatial feature representation and the temporal feature representation are concatenated to obtain the fused feature tensor of the target region;

[0045] Spatial reconstruction is performed on the fused feature tensor to obtain the predicted spatial distribution of the target region;

[0046] Spatial fusion analysis is performed on the predicted spatial distribution to obtain the predicted pedestrian flow results for the target area.

[0047] In a preferred embodiment, the step of mapping and transforming the fused feature tensor to obtain the predicted spatial distribution of the target region includes:

[0048] The fused feature tensor is subjected to feature decomposition to obtain the multi-dimensional feature components of the target region;

[0049] The multi-dimensional feature components are nonlinearly fused to obtain a multi-dimensional feature representation of the target region, wherein the calculation formula for the multi-dimensional feature representation is as follows:

[0050] ;

[0051] In the formula, This represents the multi-dimensional feature representation. This indicates the number of dimensions represented by the multi-dimensional feature. The multidimensional feature representation represents the first... Spatial attention coefficients in each dimension The multidimensional feature representation represents the first... Each dimension of feature components, The multidimensional feature representation represents the first... A learnable weight matrix in 3 dimensions. The multidimensional feature representation represents the first... A heterogeneous weight matrix with multiple dimensions The multidimensional feature representation represents the first... A learnable bias vector of 3 dimensions The multidimensional feature representation represents the first... Heterogeneous bias vectors of multiple dimensions express Linear activation function of type , express Activation function This represents element-wise multiplication;

[0052] Based on the multi-dimensional feature representation, the target region is spatially projected to obtain the initial spatial distribution of the target region;

[0053] The initial spatial distribution is calibrated to obtain the predicted spatial distribution of the target region.

[0054] To address the above problems, the present invention also provides a pedestrian flow prediction system based on a spatiotemporal graph neural network, the system comprising:

[0055] The data standardization module is used to standardize the historical pedestrian flow data and corresponding time information data of the target area to obtain the pedestrian flow sequence of the target area.

[0056] The weight generation module is used to generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network.

[0057] The spatiotemporal graph construction module is used to perform multimodal evolution on the human flow sequence based on the time information data and the spatial attention weights to obtain the spatiotemporal dependency graph of the human flow sequence;

[0058] The spatial feature aggregation module is used to perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region.

[0059] The temporal dynamic coding module is used to capture the temporal series change trajectory of the spatial feature representation and perform gated convolutional coding on the temporal series change trajectory to obtain the temporal feature representation of the target region;

[0060] The multi-source feature fusion module is used to perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.

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

[0062] 1. This invention standardizes historical pedestrian flow data in the target area, removes outliers, unifies indicators, and reconstructs sequences to obtain high-quality pedestrian flow sequences, reducing the interference of data errors on prediction. Then, based on graph attention networks, it strengthens the spatial context joint effect of node features by accurately calculating node association strength and spatial attention weights, effectively improving the accuracy of spatial feature learning and building a reliable foundation for subsequent prediction.

[0063] 2. This invention constructs a spatiotemporal dependency graph by combining temporal information and spatial weights. It accurately captures the temporal change trajectory of spatial features through gated convolutional coding and filters redundant values ​​to optimize the representation of temporal features. Subsequent multi-dimensional nonlinear fusion and distribution calibration achieve deep coupling of spatiotemporal features, which not only improves the accuracy of pedestrian flow prediction results, but also reduces invalid calculations through standardized processing, efficient feature aggregation and fusion, etc., significantly improving the efficiency of pedestrian flow prediction based on spatiotemporal graph neural networks and adapting to the needs of actual scenarios. Attached Figure Description

[0064] Figure 1 This is a flowchart illustrating a pedestrian flow prediction method based on a spatiotemporal graph neural network, provided in an embodiment of the present invention.

[0065] Figure 2 A functional block diagram of a crowd flow prediction system based on a spatiotemporal graph neural network provided in an embodiment of the present invention;

[0066] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0067] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0068] This application provides a method for predicting pedestrian flow based on a spatiotemporal graph neural network. The execution entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method for predicting pedestrian flow based on a spatiotemporal graph neural network can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cluster of cloud servers. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0069] Reference Figure 1 The diagram shown is a flowchart illustrating a pedestrian flow prediction method based on a spatiotemporal graph neural network according to an embodiment of the present invention. In this embodiment, the pedestrian flow prediction method based on a spatiotemporal graph neural network includes:

[0070] S1. Obtain the historical pedestrian flow data and corresponding time information data of the target area, and standardize the historical pedestrian flow data to obtain the pedestrian flow sequence of the target area;

[0071] In this embodiment of the invention, the step of processing historical pedestrian flow data and corresponding time information data of the target area, and standardizing the historical pedestrian flow data to obtain the pedestrian flow sequence of the target area, includes:

[0072] Obtain historical pedestrian flow data and corresponding time information for the target area;

[0073] Remove outliers from the historical pedestrian flow data to obtain cleaned pedestrian flow data for the target area;

[0074] The cleaned pedestrian flow data is standardized by unifying the indicators to obtain standardized pedestrian flow data for the target area;

[0075] The standardized pedestrian flow data is serialized and reconstructed to obtain the pedestrian flow sequence of the target area.

[0076] Specifically, the entire implementation process revolves around processing pedestrian flow data in the target area. First, data is extracted from the storage systems of deployed monitoring equipment such as infrared pedestrian counters and video surveillance pedestrian counting devices. During extraction, the data export function of the devices or a connection to the management platform is used to associate each pedestrian flow record with time information accurate to the year, month, day, hour, and minute. It is also ensured that each collection timestamp is synchronized with the device's system time to avoid deviations, thereby obtaining historical pedestrian flow data and corresponding time information. Next, for each historical pedestrian flow record, pedestrian flow data from three adjacent time points before and after it is selected as reference data. If a data point has fewer than three adjacent points, the existing adjacent points are used. The average of these reference data is calculated, and 50% of this average is set as a deviation threshold. The current data is compared with the average; values ​​exceeding the threshold are considered outliers and are manually confirmed to be due to equipment malfunction before being removed. To avoid accidental deletion, all outliers are removed to obtain cleaned pedestrian flow data. Then, the collection interval field of the cleaned pedestrian flow data is checked or the time difference between adjacent data is calculated using timestamps to confirm the statistical period. If there are differences such as one minute or five minutes, all data are uniformly adjusted to a one-minute period. For the five-minute period data, the total number of pedestrians in that period is divided by five to obtain the data per minute. After conversion, the sum of the data per minute is checked to see if it is consistent with the total number of pedestrians in the original period. After completion, standardized pedestrian flow data is obtained. Finally, the standardized pedestrian flow data is sorted in ascending order of timestamps. The data corresponding to the earliest time point is found as the first element of the sequence, and the data corresponding to subsequent time points are added in turn. After sorting, it is checked whether there are any missing time points. If there are, they are marked or filled with the average of adjacent data to ensure the continuity of the sequence. Finally, a set of standardized pedestrian flow data arranged in chronological order is formed, which is the pedestrian flow sequence of the target area.

[0077] Furthermore, when acquiring historical pedestrian flow data and corresponding time information, it is necessary to first confirm that the monitoring equipment, such as infrared pedestrian counters and video surveillance pedestrian statistics devices, is in normal online condition to avoid extracting invalid data from offline periods. Then, log in to the storage system through the management software provided with the equipment, and select the "pedestrian flow data" and "time information" associated export option in the data export module. During the export process, check the matching degree between the number of data entries and the actual collection time of the equipment in real time to ensure that each pedestrian flow has a corresponding, non-duplicate time record, avoiding the situation of missing time information or duplicate association. Through this operation, the historical pedestrian flow data and corresponding time information data of the target area can be obtained.

[0078] Furthermore, when removing outliers from historical pedestrian flow data, each individual data point and its preceding and following time points are extracted from the historical pedestrian flow data. If a data point has only two adjacent time points before it and three adjacent time points after it, a total of five adjacent data points are selected as reference data. The values ​​of these reference data points are added together and then divided by the total number of reference data points to obtain the average value of the reference data. This average value is then multiplied by 50% to obtain the deviation threshold. The average value is then subtracted from the current historical pedestrian flow data value to be judged. If the absolute value of the result is greater than the deviation threshold, the data is determined to be an outlier. At this point, the equipment operation log at the corresponding time point needs to be checked to confirm whether the data anomaly is caused by equipment obstruction, power failure, or other faults. After confirmation, the outlier is deleted from the historical pedestrian flow data list. After all data has been judged and processed, the remaining historical pedestrian flow data is the cleaned pedestrian flow data for the target area.

[0079] Furthermore, when standardizing the indicators of the cleaned pedestrian flow data, we first iterate through all the cleaned pedestrian flow data and check the "statistical period" field attached to each data point. If we find that some data are labeled as "one minute / data point" and some are labeled as "five minutes / data point", then we use "one minute / data point" as the unified standard. For the cleaned pedestrian flow data labeled "five minutes / data point", we first record the five-minute time period corresponding to the data and the total number of people in that time period. Then, we distribute the total number of people evenly to the five one-minute nodes in that time period. The number of people in each one-minute node is equal to the total number of people divided by five. After the distribution is completed, we check whether the sum of the number of people in these five one-minute nodes is consistent with the total number of people in the original five-minute time period to ensure that the data conversion is correct. After all the cleaned pedestrian flow data with different statistical periods are adjusted to "one minute / data point", the standardized pedestrian flow data of the target area is obtained.

[0080] Furthermore, when reconstructing the standardized pedestrian flow data into a sequence, the time information corresponding to all standardized pedestrian flow data is first collected. This time information is arranged in order from morning to evening, and the earliest time point is found. The pedestrian flow data corresponding to this time point is then found in the standardized pedestrian flow data and used as the first element of the pedestrian flow sequence. Next, the next time point after the earliest time point is found, and the corresponding standardized pedestrian flow data is taken out as the second element of the sequence. In this way, the standardized pedestrian flow data corresponding to each time point is added to the sequence in sequence. During the addition process, after each time point is added, it is checked whether there is a one-minute interval between the current time point and the previous time point to ensure that the time is continuous without any gaps. If there is a time interval of more than one minute, the average value of the standardized pedestrian flow data of the two adjacent time points is used to fill the missing time point data. After all the standardized pedestrian flow data corresponding to all time points are added in sequence, the resulting ordered data set is the pedestrian flow sequence of the target area.

[0081] In summary, by confirming the online status of the monitoring equipment, logging into the management software to export data, and verifying the matching degree, records with accurate time information can be extracted from the monitoring equipment storage system of the target area, thereby obtaining historical pedestrian flow data and corresponding time information data of the target area.

[0082] In summary, by flexibly selecting reference data, calculating the average value to determine the deviation threshold, and manually confirming the cause of the anomaly in the equipment logs before removing the outlier, valid data can be filtered out from historical pedestrian flow data to obtain the pedestrian flow data of the target area after cleaning.

[0083] In summary, by traversing the data to confirm the statistical period, converting non-one-minute period data to a unified standard of one minute, and verifying the accuracy of the conversion, it is possible to unify the indicators of the cleaned pedestrian flow data and obtain standardized pedestrian flow data for the target area.

[0084] In summary, by sorting standardized pedestrian flow data in ascending order by timestamp, checking time continuity, and filling in missing data, the standardized pedestrian flow data can be organized into an ordered set to obtain the pedestrian flow sequence of the target area.

[0085] S2. Generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network;

[0086] In this embodiment of the invention, generating spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network includes:

[0087] Extract the node feature matrix of the crowd flow sequence;

[0088] Calculate the association strength of nodes in the node feature matrix, wherein the formula for calculating the association strength is as follows:

[0089] ;

[0090] In the formula, Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, This represents the preset shared weight matrix. This represents the parameter vector in the graph attention network. This represents the transpose of the parameter vector. This represents the vector concatenation operation. Represents the activation function of the leaky rectifier linear unit;

[0091] Based on the association strength, calculate the spatial attention coefficient of the nodes in the node feature matrix;

[0092] The spatial attention coefficients are normalized to obtain the spatial attention weights between nodes in the pedestrian flow sequence.

[0093] The formula for calculating the spatial attention coefficient is as follows:

[0094] ;

[0095] In the formula, Represents the nodes in the node feature matrix and nodes Spatial attention coefficients between them Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, Indicates the node used for transformation Heterogeneous weight matrix, Indicates the node used for transformation The preset heterogeneous weight matrix, This represents the preset bias vector. This represents the transpose of the heterogeneous bias vector. This represents the vector concatenation operation. This represents the preset balance factor. Represents the nodes in the node feature matrix The set of adjacent nodes, express Activation function Represented by natural constant An exponential function with base 0.

[0096] Specifically, the entire process revolves around the generation of spatial attention weights between nodes in the pedestrian flow sequence. First, a node feature matrix containing information such as pedestrian flow, geography, and function of each sub-region is extracted. Then, the node association strength is calculated in two ways. Next, spatial attention coefficients are obtained using two calculation methods. Finally, the coefficients are normalized to obtain spatial attention weights.

[0097] Furthermore, when extracting the node feature matrix of the pedestrian flow sequence, it is crucial to clarify the core information encompassed by the pedestrian flow sequence within the target area, including the number of people, their actual geographical locations, functional attributes, and infrastructure scale at different time points. The structure of the node feature matrix is ​​determined as follows: each row corresponds to a sub-region, and each column corresponds to feature types such as average pedestrian flow, geographical location identifier, functional attribute category, and infrastructure scale value. For each node, information such as average pedestrian flow, geographical location identifier, functional attribute category, and infrastructure scale value is collected one by one. These features of all nodes are then filled into a pre-defined matrix row by row. The resulting structured matrix is ​​the node feature matrix of the pedestrian flow sequence. The node feature vectors used subsequently to calculate association strength and spatial attention coefficient are all derived from the features in this matrix.

[0098] Furthermore, there are two methods for calculating the association strength of nodes in the node feature matrix. One method determines the level based on the frequency of pedestrian exchange, geographical distance, and functional complementarity: if there is high pedestrian exchange, close proximity, and functional complementarity, the association strength level is "strong," corresponding to a quantized value of 10; if both conditions are met, the level is "medium," corresponding to 5; if only one condition or none are met, the level is "weak," corresponding to 1. The level is then converted into a quantized value. The other method uses node feature vectors for calculation: nodes are transformed using a preset shared weight matrix. and The feature vectors are concatenated and transformed. The resulting vector is then processed by transposing the predefined parameter vector and performing operations on the concatenated vector. Finally, this processed vector is input into the LeakyReLU activation function, and the output is the node. and correlation strength Both methods can quantify the degree of connection between nodes.

[0099] Furthermore, there are two ways to calculate the spatial attention coefficients of nodes in the node feature matrix. If calculated using a formula, the target node is selected... Extract it and other nodes The eigenvectors are transformed using a preset heterogeneous weight matrix, and then concatenated. The concatenated vector is then subjected to a transpose of the preset bias vector and an operation with the transpose of the bias vector, plus the product of the balance factor and the correlation strength. This result is input into the Sigmoid activation function to obtain the molecular exponent. For the target node... Each node in the set of adjacent nodes Repeat the numerator step, adding the exponential terms to get the denominator, and then divide the numerator exponent by the sum of the denominators to obtain the spatial attention coefficient. A simple approach involves selecting a target node, extracting its quantized association strength with all other nodes, summing the sums, and then dividing the sum by the quantized association strength between the target node and each other node. This yields the spatial attention coefficient of the target node towards those other nodes. Regardless of the method used, calculating the coefficients for each node as a target node results in a set containing the coefficient relationships between all target nodes and their corresponding nodes, which is the spatial attention coefficient of the nodes in the node feature matrix.

[0100] Furthermore, when normalizing the spatial attention coefficients, for each target node, the sum of all spatial attention coefficients is first calculated. If the sum is not 1, each coefficient is adjusted by dividing the sum. For example, if the sum of the coefficients for a target node is 1.1, each coefficient is divided by 1.1 to ensure the sum is 1. This process is repeated until the sum of the coefficients for all target nodes is 1. Then, the adjusted coefficients are organized into a structured coefficient table according to the relationship of "target node - corresponding node - normalized coefficient". This coefficient table represents the spatial attention weights between nodes in the pedestrian flow sequence.

[0101] In summary, by clarifying the core information of the pedestrian flow sequence, determining the matrix structure, and filling in the node features, the node feature matrix of the pedestrian flow sequence can be extracted, and the feature vectors used in subsequent calculations are transformed from the features of this matrix.

[0102] In general, the association strength of nodes in the node feature matrix can be calculated by determining the level and converting it into a quantitative value through statistical analysis of people flow, geographical distance, and functional complementarity, or by using node feature vectors, shared weight matrices, and the LeakyReLU activation function.

[0103] In summary, by selecting target nodes and calculating them using formulas or by summing and dividing the quantized association strength values, the spatial attention coefficients of the nodes in the node feature matrix can be obtained.

[0104] In summary, by calculating the sum of the coefficients corresponding to each target node, adjusting the coefficients to make the sum equal to 1 if it is not 1, and then organizing them into a structured coefficient table, the spatial attention weights between nodes in the flow sequence can be obtained.

[0105] S3. Based on the time information data and the spatial attention weight, perform multimodal evolution on the crowd flow sequence to obtain the spatiotemporal dependency graph of the crowd flow sequence;

[0106] In this embodiment of the invention, the step of performing multimodal evolution on the pedestrian flow sequence based on the time information data and the spatial attention weight to obtain the spatiotemporal dependency graph of the pedestrian flow sequence includes:

[0107] Extract the time sequence pattern from the time information data;

[0108] Based on the spatial attention weights, spatial context joint is performed on the node features in the node feature matrix to obtain the spatial enhancement features of the pedestrian flow sequence;

[0109] The temporal pattern and the spatial enhancement features are subjected to feature fusion analysis to obtain the spatiotemporal fusion features of the pedestrian flow sequence;

[0110] Based on the spatiotemporal dependency of the pedestrian flow sequence, the spatiotemporal fusion features are subjected to multimodal evolution to obtain the spatiotemporal dependency graph of the pedestrian flow sequence.

[0111] Specifically, the entire implementation process revolves around the mining of spatiotemporal features of pedestrian flow data. First, time-series patterns are extracted from time information data through periodic division and pattern summarization. Then, spatial enhanced features are obtained by combining the spatial context of the node feature matrix based on spatial attention weights. Subsequently, the time-series patterns and spatial enhanced features are matched and superimposed to form spatiotemporal fusion features. Finally, the spatiotemporal fusion features are processed by multimodal evolution based on spatiotemporal dependencies to construct a spatiotemporal dependency graph containing information related to time and space.

[0112] Furthermore, when extracting the time-series pattern, we first comprehensively analyze the year, month, day, hour, and minute dimensions of the time information data and the corresponding changes in pedestrian flow data. Each day is divided into multiple 30-minute sub-segments according to a daily cycle. We then statistically analyze the frequency of each time point within each sub-segment and the maximum, minimum, and average values ​​of the corresponding pedestrian flow data, observing the trend of pedestrian flow changes within the same sub-segment each day. Next, we divide the dates into weekdays and rest days according to a weekly cycle, comparing the differences in time point distribution and pedestrian flow changes within the same sub-segment of the two types of dates. Finally, we organize the time point distribution patterns and pedestrian flow change characteristics within these cycles into structured information, forming a time-series pattern.

[0113] Furthermore, before performing spatial context unification, it is necessary to clarify that the node feature matrix consists of features such as the area of ​​each sub-region of the target area, pedestrian density, type of surrounding facilities, and distance from other sub-regions. The spatial attention weight is set according to the frequency of pedestrian traffic between sub-regions in the past thirty days, with higher frequencies resulting in higher weights. During processing, the original features of each node are first extracted, and then multiplied one by one with the features of other nodes. The product is multiplied by the spatial attention weight between the two nodes to obtain a weighted feature. All weighted features are summed and then superimposed with the original features to obtain the spatial context unification feature of that node. After all nodes have been processed, they are integrated into the spatial enhancement feature.

[0114] Furthermore, during feature fusion analysis, the temporal pattern is first decomposed into elements such as core periodic time, rate of change in pedestrian flow, and correlation of time nodes. Spatial enhancement features are then decomposed into elements such as weighted pedestrian density, sub-region feature correlation strength, and facility correlation features. Matching is performed according to the correspondence between time and spatial elements; for example, the morning peak period corresponds to the weighted pedestrian density of each sub-region, and weekdays correspond to the correlation features of facilities around residential areas. The matched elements are then overlaid and combined, and arranged according to both temporal and spatial distribution order to form a spatiotemporal fusion feature containing information in both time and space dimensions.

[0115] Furthermore, before performing multimodal evolution, it is necessary to determine temporal dependencies by judging the magnitude of changes in fused features across consecutive time segments; the smaller the change, the stronger the dependency. Spatial dependencies are judged by the similarity of features of different nodes within the same time segment; the higher the similarity, the stronger the dependency. During evolution, the fused features are first divided into consecutive time segments of 30 minutes. A spatial dependency subgraph is constructed for each segment, with circular nodes representing sub-regions. Nodes with spatial dependencies are connected by straight lines of varying thicknesses, and the intensity level is labeled. Then, corresponding nodes in adjacent time segments are connected by arrowed curves of different colors, and the duration is labeled. Finally, all subgraphs are connected to form a complete spatiotemporal dependency graph.

[0116] In summary, by dividing time information data into daily and weekly cycles, statistically analyzing data from each time period, and summarizing the patterns of change, the time sequence patterns in the time information data can be extracted.

[0117] In summary, by clarifying the composition of the node feature matrix and the rules for setting spatial attention weights, and by performing feature weighted fusion and superposition processing on each node, spatial enhancement features of the pedestrian flow sequence can be obtained.

[0118] In summary, by decomposing temporal and spatial feature elements and matching them accordingly, and then superimposing and arranging the matched elements, feature fusion analysis can be completed to obtain spatiotemporal fusion features.

[0119] In summary, by determining the criteria for judging spatiotemporal dependencies, dividing time segments to construct spatial dependency subgraphs, and connecting the subgraphs, multimodal evolution can be completed to obtain a spatiotemporal dependency graph.

[0120] S4. Perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region;

[0121] In this embodiment of the invention, the step of performing convolutional kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region includes:

[0122] Based on the topological structure of the spatiotemporal dependency graph, identify the adjacent nodes of the node feature matrix in the spatiotemporal dependency graph;

[0123] Local features are extracted from the nodes in the spatiotemporal dependency graph to obtain the initial spatial features of the target region;

[0124] By performing higher-order interactions on the initial spatial features, the enhanced spatial features of the target region are obtained;

[0125] The enhanced spatial features are topologically integrated to obtain a spatial feature representation of the target region.

[0126] Specifically, the entire implementation process revolves around the mining and construction of spatial features of the target area. First, based on the topological structure of the spatiotemporal dependency graph, the adjacent nodes of the node feature matrix are determined by identifying the direct connection relationship between nodes. Then, specific types of local information are collected from the nodes of the spatiotemporal dependency graph to obtain initial spatial features. Next, the higher-order interaction of the initial spatial features is completed by calculating the feature association between nodes and adjacent nodes and judging the functional complementarity to obtain enhanced spatial features. Finally, the features are arranged according to the topological order of the spatiotemporal dependency graph and the connection relationship is integrated to form a spatial feature representation of the target area.

[0127] Furthermore, when identifying adjacent nodes, it is necessary to first clarify the specific composition of the spatiotemporal dependency graph topology. In this structure, each circular node corresponds one-to-one with a sub-region node in the node feature matrix, and the straight lines or curves between nodes represent the dependency connections between different nodes. For each target node in the node feature matrix, first find its corresponding circular node in the spatiotemporal dependency graph, and then carefully observe whether there are other circular nodes directly connected to this circular node by straight lines or curves. All nodes that can directly establish connections with the target node are its adjacent nodes. In this way, all nodes in the node feature matrix are processed one by one, and the names or identifiers of the nodes directly connected to each node in the spatiotemporal dependency graph are recorded in detail. Finally, a complete list containing each node and its corresponding adjacent nodes is formed, thus completing the identification of adjacent nodes.

[0128] Furthermore, when extracting local features, the type of local feature to be extracted for each node is first determined. This includes the actual area of ​​the sub-region represented by the node, the real-time pedestrian density of that sub-region during the current time period, the type of facility within the sub-region, and the strength level of the dependency connection between the sub-region and its neighboring nodes. For each node in the spatiotemporal dependency graph, specific information on the above four types of features is collected one by one. For example, the area of ​​the sub-region corresponding to a node is a specific value, the real-time pedestrian density is a specific number of people per 100 square meters, the facility type is a shopping mall, and the dependency strength level with neighboring nodes is strong. All these local feature information for all nodes are organized according to the original order of the nodes in the node feature matrix, forming a structured table. Each row of the table corresponds to a node, and each column corresponds to a type of local feature. This structured table represents the initial spatial features of the target area.

[0129] Furthermore, when performing high-level interactions, the core operation is clearly defined as the correlation analysis between the features of each node in the initial spatial features and the features of its neighboring nodes. For each target node in the initial spatial features, the pedestrian density feature of that node is first extracted, and then the pedestrian density features of all its neighboring nodes are extracted. The average difference between the pedestrian density of the target node and the pedestrian density of all its neighboring nodes is calculated to reflect the degree of correlation between the target node and its neighboring nodes in terms of pedestrian density. At the same time, the facility type features of the target node and the facility type features of its neighboring nodes are extracted. Based on the functional attributes of the facilities, it is determined whether there is functional complementarity between the two. For example, if the sub-area corresponding to the target node is a residential area and the sub-area corresponding to the neighboring node is a shopping mall, it is determined that there is functional complementarity; if both are shopping malls, it is determined that there is no functional complementarity. The calculated "average difference in pedestrian density" and the determination result "facility functional complementarity" are used as new interaction features and added to the original initial spatial features of the target node. Following the same process, high-level interaction processing is completed for all nodes in the initial spatial features, ultimately forming a complete feature set containing the original local features and the newly added interaction features. This set is the enhanced spatial feature of the target area.

[0130] Furthermore, during topology integration, the node arrangement order is first determined by referring to the topological structure of the spatiotemporal dependency graph. Specifically, nodes are sorted sequentially from the center to the edge of the target area according to their position in the spatiotemporal dependency graph. Based on this sorting result, the feature data of each node in the enhanced spatial features are arranged sequentially to form a continuous node feature sequence. Simultaneously, next to the arranged node feature sequence, detailed annotations are added to indicate the connection relationships between each node and its neighboring nodes, as well as the corresponding interaction feature values. For example, it is noted that node A and node B are connected, their average difference in pedestrian density is a specific value, and their facilities are complementary. The node feature sequence and the annotated connection information are integrated into a hierarchical structure. The first layer is the node feature data arranged in topological order, and the second layer is the description of the connection relationships and interaction features between nodes. This ensures that the two layers of information correspond one-to-one and are interconnected, together forming an information set that can completely reflect the spatial association of the target area. This set is the spatial feature representation of the target area.

[0131] In summary, by clarifying the correspondence between nodes and connections in the spatiotemporal dependency graph topology, and by finding and recording the direct connections of each node, the adjacent nodes of the node feature matrix in the spatiotemporal dependency graph can be identified.

[0132] In general, by determining the local feature types of nodes, collecting information on the area, pedestrian density, facility type, and connection strength level of each node, and organizing it into a structured table, the initial spatial characteristics of the target area can be obtained.

[0133] In summary, by calculating the average difference in pedestrian density between a node and its neighboring nodes, determining the complementarity of facility functions, and adding these as new features, higher-order interactions of the initial spatial features can be achieved, resulting in enhanced spatial features of the target area.

[0134] In summary, by arranging spatial features in a topological order according to the spatiotemporal dependency graph, labeling node connections and interaction features, and integrating them into a hierarchical structure, topological integration of enhanced spatial features can be completed, resulting in a spatial feature representation of the target region.

[0135] S5. Capture the time series change trajectory of the spatial feature representation, and perform gated convolutional encoding on the time series change trajectory to obtain the time feature representation of the target region;

[0136] In this embodiment of the invention, the step of capturing the temporal series change trajectory of the spatial feature representation and performing gated convolutional encoding on the temporal series change trajectory to obtain the temporal feature representation of the target region includes:

[0137] Capture the time-series change trajectory represented by the spatial features;

[0138] By performing trend recursion on the time series change trajectory, the initial temporal evolution characteristics of the target region are obtained;

[0139] The initial temporal evolution features are subjected to gated convolutional encoding to obtain the higher-order temporal evolution features of the initial temporal evolution features;

[0140] Redundant values ​​of the higher-order temporal evolution features are removed to obtain filtered temporal evolution features of the higher-order temporal evolution features;

[0141] The filtered temporal evolution features are reconstructed to obtain the temporal feature representation of the target region.

[0142] Specifically, the entire implementation process revolves around the construction of the temporal feature representation of the target region. First, the core information of the spatial feature representation is recorded at fixed time intervals to capture its temporal series change trajectory. Then, the changing patterns of the core indicators in the trajectory are analyzed and subsequent trends are inferred to obtain the initial temporal evolution features. Next, the initial features are encoded through a gated convolutional framework containing filtering and enhancement units to generate higher-order temporal evolution features. Subsequently, redundant values ​​in the higher-order features are removed and gaps are filled according to clear criteria to obtain the filtered temporal evolution features. Finally, the dimensions of the filtered features are reorganized according to the "time-feature-trend" logic to form the temporal feature representation of the target region.

[0143] Furthermore, when capturing the time-series changes in spatial feature representations, it is necessary to first clarify the core information contained in the spatial feature representations. Specifically, this includes node areas, pedestrian density, facility types, connection strength levels arranged in topological order, as well as interactive features such as the connection relationships between nodes, the average difference in pedestrian density, and the complementarity of facility functions. A fixed hourly data collection interval is set. At each collection moment, all the above information in the current spatial feature representation is completely recorded, ensuring that no node data or relationships are missed. The spatial feature information recorded at different collection moments is arranged chronologically to form a continuous list recording the changes in spatial features over time; this list constitutes the time-series change trajectory of the spatial feature representation.

[0144] Furthermore, when extrapolating the trend of time series changes, core analytical indicators are first extracted from the trajectory, including the increase or decrease in pedestrian density at nodes, the frequency of changes in the connection strength level between nodes, and the stability of the complementary functions of facilities. Based on the indicator change data from three consecutive collection intervals, the trend of indicator changes is determined. For example, if the pedestrian density at a certain node increases by a specific percentage, a specific percentage, and a specific percentage respectively over three consecutive hours, and the increase fluctuates slightly, then the pedestrian density at that node is determined to have a "steady upward" trend. If the connection strength level between nodes remains "strong" for three consecutive hours without change, then it is determined to have a "stable strong connection" trend. Based on the determined trends, the possible changes of each core indicator in the next collection interval are predicted. For example, the pedestrian density extrapolation under a "steady upward" trend is to maintain a similar increase. The existing change patterns of all core indicators and the extrapolation prediction results are integrated into structured information, which is the initial temporal evolution characteristics of the target area.

[0145] Furthermore, during gated convolutional coding, an operational framework comprising a "feature selection gate" and a "feature enhancement gate" is first constructed. The "feature selection gate" determines the importance of each indicator in the initial temporal evolution features by analyzing its impact on the overall trend. If a change in an indicator, such as the magnitude of change in pedestrian density, directly alters the overall trend direction, it is deemed "highly important," and its complete temporal change data is retained. If an indicator, such as the node area, remains unchanged for a long period and does not affect the trend, it is deemed "lowly important," and only its basic identifier information is retained. The "feature enhancement gate" processes the selected high-importance indicator features, associating and integrating the change data of this indicator within continuous acquisition intervals. For example, it integrates the change in pedestrian density over five consecutive hours into a "five-hour cumulative change curve." After all indicators of the initial temporal evolution features are selected and enhanced through these two gate units, the processed feature data is rearranged in chronological order, and the resulting feature set is the higher-order temporal evolution feature of the initial temporal evolution features.

[0146] Furthermore, when removing redundant values ​​from higher-order temporal evolution features, the criteria for redundancy determination are first established. These redundancy values ​​are those that are completely repeated within three or more consecutive acquisition intervals, or those whose deviation from adjacent acquisition intervals is minimal and does not affect the overall temporal trend. For example, the pedestrian density at a certain node may remain the same for three consecutive hours, or change from a certain value to another value with a deviation less than a specific proportion, while maintaining a stable overall trend. Each feature value in the higher-order temporal evolution features is then examined against the criteria to determine if it is redundant. If it meets the criteria, it is directly removed. For any gaps appearing in the feature sequence after removing redundant values, the average of the two valid feature values ​​before and after the gap is used to fill it, ensuring the continuity of the feature sequence. The resulting continuous feature sequence is the filtered higher-order temporal evolution feature.

[0147] Furthermore, when reconstructing the dimensions of the filtered temporal evolution features, the original dimensions are first identified, including the collection interval identifier, the magnitude of changes in pedestrian density at each node, the change values ​​of interaction characteristics between nodes, and the overall temporal trend type, such as steady increase, stability, or slow decrease. These dimensions are then reorganized according to the logical relationship of "time-feature-trend," using the collection interval identifier as the core index. The magnitude of changes in pedestrian density at each node and the change values ​​of interaction characteristics between nodes corresponding to each collection interval are categorized under this index. Simultaneously, the overall temporal trend type is labeled for each collection interval, forming structured data that links multiple features and trends with time as the core. The structured data from all collection intervals are arranged chronologically to form a complete and hierarchically clear set of temporal dimension features, which constitutes the temporal feature representation of the target area.

[0148] In summary, by clarifying the core information of spatial feature representation, setting an hourly collection interval, and arranging records by time, the temporal series change trajectory of spatial feature representation can be captured.

[0149] In summary, by extracting core indicators and judging trends using data from three consecutive collection intervals, and by inferring subsequent indicator changes based on these trends and integrating the results, the initial temporal evolution characteristics of the target area can be obtained.

[0150] In summary, by constructing a gated convolution framework containing filtering and enhancement units, processing the initial temporal evolution features and arranging the results by time, higher-order temporal evolution features of the initial temporal evolution features can be obtained.

[0151] In summary, by setting a redundancy criterion and eliminating redundancy, and filling the gaps with the average value to ensure sequence continuity, filtered temporal evolution features of higher-order temporal evolution features can be obtained.

[0152] In summary, by identifying the original dimensions and reorganizing them according to the "time-feature-trend" logic, and arranging the structured data into a set, a temporal characteristic representation of the target region can be obtained.

[0153] S6. Perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.

[0154] In this embodiment of the invention, the step of performing multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result for the target area includes:

[0155] The spatial feature representation and the temporal feature representation are concatenated to obtain the fused feature tensor of the target region;

[0156] Spatial reconstruction is performed on the fused feature tensor to obtain the predicted spatial distribution of the target region;

[0157] Spatial fusion analysis is performed on the predicted spatial distribution to obtain the predicted pedestrian flow results for the target area.

[0158] The step of spatially reconstructing the fused feature tensor to obtain the predicted spatial distribution of the target region includes:

[0159] The fused feature tensor is subjected to feature decomposition to obtain the multi-dimensional feature components of the target region;

[0160] The multi-dimensional feature components are nonlinearly fused to obtain a multi-dimensional feature representation of the target region, wherein the calculation formula for the multi-dimensional feature representation is as follows:

[0161] ;

[0162] In the formula, This represents the multi-dimensional feature representation. This indicates the number of dimensions represented by the multi-dimensional feature. The multidimensional feature representation represents the first... Spatial attention coefficients in each dimension The multidimensional feature representation represents the first... Each dimension of feature components, The multidimensional feature representation represents the first... A learnable weight matrix in 3 dimensions. The multidimensional feature representation represents the first... A heterogeneous weight matrix with multiple dimensions The multidimensional feature representation represents the first... A learnable bias vector of 3 dimensions The multidimensional feature representation represents the first... Heterogeneous bias vectors of multiple dimensions express Linear activation function of type , express Activation function This represents element-wise multiplication;

[0163] Based on the multi-dimensional feature representation, the target region is spatially projected to obtain the initial spatial distribution of the target region;

[0164] The initial spatial distribution is calibrated to obtain the predicted spatial distribution of the target region.

[0165] Specifically, the entire implementation process revolves around the prediction of pedestrian flow in the target area. First, the spatial feature representation and the temporal feature representation are concatenated to obtain a fused feature tensor. Then, the fused feature tensor is spatially reconstructed to obtain the predicted spatial distribution. Finally, the predicted pedestrian flow results for the target area are generated through spatial fusion analysis of the predicted spatial distribution.

[0166] Furthermore, during feature stitching, it is first clarified that the spatial feature representation is a hierarchical structure set of node feature data arranged in topological order, labeled with node connection relationships and interaction features, while the temporal feature representation is a structured data set reorganized according to the "time-feature-trend" logic, with time as the index to associate multiple types of features and trends. Next, the node feature data corresponding to each time point in the spatial feature representation is matched one-to-one with the features at that time point in the temporal feature representation, ensuring that the spatial and temporal features of each node at each time point correspond precisely. Then, the spatial and temporal feature vectors of each node at each time point are stitched together into a longer feature vector. Finally, the stitched feature vectors of all nodes and all time points are arranged in chronological and node topological order, organized into a three-dimensional tensor structure, which is the fused feature tensor of the target region.

[0167] Furthermore, during spatial reconstruction, the target area is first divided into multiple regular spatial grid units according to a preset grid size. Each grid unit corresponds to a portion of the nodes or feature regions in the fused feature tensor. Then, for each spatial location in the fused feature tensor, feature information for that location at all time points is extracted. Next, the feature information for each spatial location is spatially integrated, and weights are assigned to features at different time points based on their temporal proximity, with higher weights for more recent time points. A weighted average is then used to obtain the predicted pedestrian flow-related feature value for that location. Finally, the predicted feature values ​​of all spatial grid units are arranged according to their grid spatial location to form a two-dimensional matrix, which represents the predicted spatial distribution of the target area.

[0168] Furthermore, when implementing spatial fusion analysis, the predicted spatial distribution is first defined as a two-dimensional matrix composed of the predicted pedestrian flow-related characteristic values ​​of each spatial grid unit. Then, the differences in predicted pedestrian flow characteristic values ​​between adjacent spatial grid units are assessed. If the differences are within a preset range, these adjacent grid units are merged into a larger region, and the average pedestrian flow characteristic value of the merged region is calculated. If the differences exceed the preset range, the grid units remain independent. Next, combined with the actual geographical boundaries and functional zoning of the target area, the merged region or independent grid units are further integrated and adjusted to ensure that the merged region matches the actual geographical and functional zoning. Finally, based on the pedestrian flow characteristic values, area, and functional attributes of each merged region, the total predicted pedestrian flow for that region is calculated. The total predicted pedestrian flow for all regions is then summed to obtain the pedestrian flow prediction result for the target area.

[0169] Specifically, the entire process revolves around generating the predicted spatial distribution of the target region. First, the fused feature tensor is decomposed to obtain multi-dimensional feature components. Then, a multi-dimensional feature representation is obtained through nonlinear fusion. Next, spatial projection is performed based on this representation to obtain the initial spatial distribution. Finally, the initial spatial distribution is calibrated to obtain the predicted spatial distribution. Feature fusion is achieved by combining the calculation method of multi-dimensional feature representation in the process.

[0170] Furthermore, when performing feature decomposition on the fused feature tensor, it is clearly defined as a three-dimensional structure with time dimension, spatial node dimension, and comprehensive feature dimension. The comprehensive feature dimension includes mixed features such as spatial topology information, time trend information, and pedestrian flow interaction information. The comprehensive feature dimension is split according to its semantic category, and the semantic attributes of all features in the comprehensive feature dimension are sorted out. Features describing the connection relationship and relative position between spatial nodes are classified into the "spatial topology feature class", features describing the increase or decrease of pedestrian flow over time and periodic changes are classified into the "time trend feature class", and features describing the frequency and degree of influence of pedestrian flow between different spatial nodes are classified into the "pedestrian flow interaction feature class". Each type of semantic feature is separated from the fused feature tensor as an independent feature component. These components are the source of the feature components of each dimension when calculating the multi-dimensional feature representation. The final set of multiple independent semantic feature components is the multi-dimensional feature component of the target region.

[0171] Furthermore, when performing nonlinear fusion on multi-dimensional feature components, the correlation between each multi-dimensional feature component is first analyzed to determine that "spatial topological feature class" has the highest influence, followed by "time trend feature class", and then "human flow interaction feature class". The importance of these components corresponds to the spatial attention coefficient of each dimension when calculating the multi-dimensional feature representation. Next, the eigenvalues ​​of each feature component are nonlinearly adjusted to uniformly scale the eigenvalues ​​of each component to the same numerical range, avoiding weight failure due to different numerical ranges. At the same time, for each dimension, the learnable weight matrix is ​​multiplied with the feature component and a learnable bias vector is added, and then input into the SiLU activation function for nonlinear transformation. Then, the heterogeneous weight matrix is ​​multiplied with the feature component and a heterogeneous bias vector is added, and then input into the Sigmoid activation function to obtain another nonlinear transformation result. The two nonlinear transformation results are multiplied element-wise and then multiplied by the spatial attention coefficient of the corresponding dimension. Finally, the calculation results of all dimensions are added together and integrated into a unified feature set. This feature set is the multi-dimensional feature representation of the target region. Through such nonlinear fusion, the features of key dimensions are highlighted, making the multi-dimensional feature representation more accurate.

[0172] Furthermore, when spatially projecting the target area based on multi-dimensional feature representation, the target area is first divided into uniform spatial grid units according to its actual geographical range, with each grid unit corresponding to a specific small space within the target area. Feature information related to each spatial grid unit is extracted from the multi-dimensional feature representation, such as spatial topological features, time trend features, and human interaction features corresponding to each grid unit, and these feature information are transformed into quantifiable spatial distribution feature values. The distribution feature values ​​of each spatial grid unit are arranged sequentially according to their actual spatial location within the target area to form a two-dimensional spatial distribution matrix, which is the initial spatial distribution of the target area.

[0173] Furthermore, when calibrating the initial spatial distribution to obtain the predicted spatial distribution of the target area, historical spatial distribution data and actual geographic functional constraints of the target area are first collected. Historical data includes the actual population density and distribution patterns of each spatial grid unit during the same period in the past. Geographic functional constraints include the reasonable population density range corresponding to the functional attributes of each grid unit. The distribution characteristic value of each grid unit in the initial spatial distribution is checked one by one and compared with the actual value of the same grid unit with the same functional attributes in the historical data. If the initial characteristic value exceeds the reasonable fluctuation range of the historical data, the characteristic value is adjusted to a reasonable range according to the historical fluctuation pattern. At the same time, according to the geographic functional constraints, if the initial population density characteristic value of a residential area grid unit at night is higher than the constraint range, it is adjusted to a reasonable value that conforms to the nighttime population characteristics of the residential area. After all grid units are adjusted, the resulting spatial distribution matrix is ​​the predicted spatial distribution of the target area.

[0174] In summary, by clarifying the structure of spatial and temporal feature representations, performing feature correspondence matching, vector concatenation, and ordered arrangement, feature concatenation can be completed to obtain the fused feature tensor of the target region.

[0175] In summary, by dividing the space into grid cells, extracting feature information, integrating spatial dimensions, and arranging feature values, the spatial domain reconstruction of the fused feature tensor can be completed, and the predicted spatial distribution of the target region can be obtained.

[0176] In summary, by judging the differences between grid units, merging or retaining units, adjusting according to actual zoning, and calculating and summarizing the total pedestrian flow, spatial fusion analysis of predicted spatial distribution can be completed, and pedestrian flow prediction results for the target area can be obtained.

[0177] In summary, by clearly defining the structure of the fusion feature tensor and splitting it according to semantic categories, we can obtain multi-dimensional feature components of the target region, and these components are the source of each dimension feature component when calculating the multi-dimensional feature representation.

[0178] In summary, by analyzing the correlation and importance of multi-dimensional feature components, and combining the calculation methods of multi-dimensional feature representation with nonlinear transformation, weighted calculation and integration, we can obtain multi-dimensional feature representation of the target region, making the features more accurate and highlighting key information.

[0179] In summary, dividing the space into grid cells, extracting and transforming grid features into quantifiable values ​​from multi-dimensional feature representations, and arranging them according to their actual locations can yield the initial spatial distribution of the target area.

[0180] In summary, by collecting historical spatial distribution data and geographic functional constraints, and comparing and adjusting the characteristic values ​​of each grid cell in the initial spatial distribution, the predicted spatial distribution of the target area can be obtained.

[0181] like Figure 2 The diagram shown is a functional block diagram of a crowd flow prediction system based on a spatiotemporal graph neural network provided in an embodiment of the present invention.

[0182] The pedestrian flow prediction system 100 based on a spatiotemporal graph neural network described in this invention can be installed in an electronic device. Depending on the functions implemented, the pedestrian flow prediction system 100 based on a spatiotemporal graph neural network may include a data standardization module 101, a weight generation module 102, a spatiotemporal graph construction module 103, a spatial feature aggregation module 104, a temporal dynamic coding module 105, and a multi-source feature fusion module 106. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0183] In this embodiment, the functions of each module / unit are as follows:

[0184] The data standardization module 101 is used to standardize the historical pedestrian flow data and corresponding time information data of the target area to obtain the pedestrian flow sequence of the target area.

[0185] The weight generation module 102 is used to generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network.

[0186] The spatiotemporal graph construction module 103 is used to perform multimodal evolution on the pedestrian flow sequence based on the time information data and the spatial attention weight, so as to obtain the spatiotemporal dependency graph of the pedestrian flow sequence.

[0187] The spatial feature aggregation module 104 is used to perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region.

[0188] The temporal dynamic coding module 105 is used to capture the temporal series change trajectory of the spatial feature representation and perform gated convolutional coding on the temporal series change trajectory to obtain the temporal feature representation of the target region.

[0189] The multi-source feature fusion module 106 is used to perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.

[0190] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0191] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0192] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0193] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0194] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for predicting pedestrian flow based on a spatiotemporal graph neural network, characterized in that, The method includes: S1. Obtain the historical pedestrian flow data and corresponding time information data of the target area, and standardize the historical pedestrian flow data to obtain the pedestrian flow sequence of the target area; S2. Generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network; S3. Based on the time information data and the spatial attention weight, perform multimodal evolution on the crowd flow sequence to obtain the spatiotemporal dependency graph of the crowd flow sequence; S4. Perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region; S5. Capture the time series change trajectory of the spatial feature representation, and perform gated convolutional encoding on the time series change trajectory to obtain the time feature representation of the target region; S6. Perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.

2. The pedestrian flow prediction method based on spatiotemporal graph neural network as described in claim 1, characterized in that, The process of obtaining the pedestrian flow sequence of the target area by standardizing the historical pedestrian flow data and corresponding time information data of the target area includes: Obtain historical pedestrian flow data and corresponding time information for the target area; Remove outliers from the historical pedestrian flow data to obtain cleaned pedestrian flow data for the target area; The cleaned pedestrian flow data is standardized by unifying the indicators to obtain standardized pedestrian flow data for the target area; The standardized pedestrian flow data is serialized and reconstructed to obtain the pedestrian flow sequence of the target area.

3. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 1, characterized in that, The step of generating spatial attention weights between nodes in the pedestrian flow sequence based on a preset graph attention network includes: Extract the node feature matrix of the crowd flow sequence; Calculate the association strength of nodes in the node feature matrix, wherein the formula for calculating the association strength is as follows: ; In the formula, Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, This represents the preset shared weight matrix. This represents the parameter vector in the graph attention network. This represents the transpose of the parameter vector. This represents the vector concatenation operation. This represents the activation function of the leaky rectifier linear unit; Based on the association strength, calculate the spatial attention coefficient of the nodes in the node feature matrix; The spatial attention coefficients are normalized to obtain the spatial attention weights between nodes in the pedestrian flow sequence.

4. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 3, characterized in that, The formula for calculating the spatial attention coefficient is as follows: ; In the formula, Represents the nodes in the node feature matrix and nodes Spatial attention coefficients between them Represents the nodes in the node feature matrix and nodes The strength of the correlation between them Represents a node eigenvectors, Represents a node eigenvectors, Indicates the node used for transformation Heterogeneous weight matrix, Indicates the node used for transformation The preset heterogeneous weight matrix, This represents the preset bias vector. This represents the transpose of the heterogeneous bias vector. This represents the vector concatenation operation. This represents the preset balance factor. Represents the nodes in the node feature matrix The set of adjacent nodes, express Activation function Represented by natural constant An exponential function with base 0.

5. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 1, characterized in that, The process of performing multimodal evolution on the pedestrian flow sequence based on the temporal information data and the spatial attention weights to obtain the spatiotemporal dependency graph of the pedestrian flow sequence includes: Extract the time sequence pattern from the time information data; Based on the spatial attention weights, spatial context joint is performed on the node features in the node feature matrix to obtain the spatial enhancement features of the pedestrian flow sequence; The temporal pattern and the spatial enhancement features are subjected to feature fusion analysis to obtain the spatiotemporal fusion features of the pedestrian flow sequence; Based on the spatiotemporal dependency of the pedestrian flow sequence, the spatiotemporal fusion features are subjected to multimodal evolution to obtain the spatiotemporal dependency graph of the pedestrian flow sequence.

6. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 1, characterized in that, The step of convolutional kernel aggregation of the neighboring node features in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region includes: Based on the topological structure of the spatiotemporal dependency graph, identify the adjacent nodes of the node feature matrix in the spatiotemporal dependency graph; Local features are extracted from the nodes in the spatiotemporal dependency graph to obtain the initial spatial features of the target region; By performing higher-order interactions on the initial spatial features, the enhanced spatial features of the target region are obtained; The enhanced spatial features are topologically integrated to obtain a spatial feature representation of the target region.

7. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 1, characterized in that, The process of capturing the temporal series change trajectory of the spatial feature representation and performing gated convolutional encoding on the temporal series change trajectory to obtain the temporal feature representation of the target region includes: Capture the time-series change trajectory represented by the spatial features; By performing trend recursion on the time series change trajectory, the initial temporal evolution characteristics of the target region are obtained; The initial temporal evolution features are subjected to gated convolutional encoding to obtain the higher-order temporal evolution features of the initial temporal evolution features; Redundant values ​​of the higher-order temporal evolution features are removed to obtain filtered temporal evolution features of the higher-order temporal evolution features; The filtered temporal evolution features are reconstructed to obtain the temporal feature representation of the target region.

8. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 1, characterized in that, The step of fusing multi-source features from the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result for the target area includes: The spatial feature representation and the temporal feature representation are concatenated to obtain the fused feature tensor of the target region; Spatial reconstruction is performed on the fused feature tensor to obtain the predicted spatial distribution of the target region; Spatial fusion analysis is performed on the predicted spatial distribution to obtain the predicted pedestrian flow results for the target area.

9. The method for predicting pedestrian flow based on a spatiotemporal graph neural network as described in claim 8, characterized in that, The step of spatially reconstructing the fused feature tensor to obtain the predicted spatial distribution of the target region includes: The fused feature tensor is subjected to feature decomposition to obtain the multi-dimensional feature components of the target region; The multi-dimensional feature components are nonlinearly fused to obtain a multi-dimensional feature representation of the target region, wherein the calculation formula for the multi-dimensional feature representation is as follows: ; In the formula, This represents the multi-dimensional feature representation. This indicates the number of dimensions represented by the multi-dimensional feature. The multidimensional feature representation represents the first... Spatial attention coefficients in each dimension The multidimensional feature representation represents the first... Each dimension of feature components, The multidimensional feature representation represents the first... A learnable weight matrix in 3 dimensions. The multidimensional feature representation represents the first... A heterogeneous weight matrix with multiple dimensions The multidimensional feature representation represents the first... A learnable bias vector of 3 dimensions The multidimensional feature representation represents the first... Heterogeneous bias vectors of multiple dimensions express Linear activation function of type , express Activation function This represents element-wise multiplication; Based on the multi-dimensional feature representation, the target region is spatially projected to obtain the initial spatial distribution of the target region; The initial spatial distribution is calibrated to obtain the predicted spatial distribution of the target region.

10. A pedestrian flow prediction system based on a spatiotemporal graph neural network, characterized in that, The system includes: The data standardization module is used to standardize the historical pedestrian flow data and corresponding time information data of the target area to obtain the pedestrian flow sequence of the target area. The weight generation module is used to generate spatial attention weights between the nodes of the pedestrian flow sequence based on a preset graph attention network. The spatiotemporal graph construction module is used to perform multimodal evolution on the human flow sequence based on the time information data and the spatial attention weights to obtain the spatiotemporal dependency graph of the human flow sequence; The spatial feature aggregation module is used to perform convolution kernel aggregation on the neighboring node features of the node feature matrix in the spatiotemporal dependency graph to obtain the spatial feature representation of the target region. The temporal dynamic coding module is used to capture the temporal series change trajectory of the spatial feature representation and perform gated convolutional coding on the temporal series change trajectory to obtain the temporal feature representation of the target region; The multi-source feature fusion module is used to perform multi-source feature fusion on the spatial feature representation and the temporal feature representation to obtain the pedestrian flow prediction result of the target area.