Space-time perception subway passenger flow prediction method based on large model and multi-source information fusion
By constructing a data intelligent agent and combining an enhanced graph neural network with a large language model, the problems of complexity in multi-source external data collection and insufficient information fusion in existing technologies are solved, achieving high-precision and interpretable subway passenger flow prediction and improving prediction performance and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-03-31
AI Technical Summary
Existing spatiotemporal sensing subway passenger flow prediction technologies suffer from limitations due to the complexity and dynamism of multi-source external data collection, making it difficult to effectively integrate non-numerical information such as POI and weather data, resulting in insufficient prediction accuracy and robustness.
By constructing a data intelligence agent, large-scale language models and model context protocols are used to automatically collect and integrate interest point data around subway stations, generate text descriptions and their spatial context embedding vectors, combine them with enhanced graph neural networks for spatiotemporal prediction, and use pre-trained large-scale language models for domain knowledge calibration, thereby achieving the fusion of multi-source information and the calibration of prediction results.
It achieves efficient and standardized transformation of unstructured information into model features, improving prediction accuracy and interpretability, and enhancing the model's robustness to external factors and predictive performance.
Smart Images

Figure CN121543042B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of passenger flow prediction technology, specifically to a spatiotemporal perception-based subway passenger flow prediction method based on large models and multi-source information fusion. Background Technology
[0002] Subway passenger flow prediction primarily employs three methods: mathematical statistics, machine learning, and deep learning. Early research utilized statistical analysis-based prediction methods, such as ARIMA, to fit and analyze historical traffic flow data to predict future traffic flow. However, the effectiveness of these statistical analysis-based methods depends on parameter settings and requires high-quality historical data, making it difficult to capture complex nonlinear dynamics. In recent years, machine learning has been widely applied in traffic flow prediction, with algorithms such as Support Vector Machines (SVM) and K-Nearest Neighbors (KNN) being extensively used. However, while these machine learning methods address nonlinear issues to some extent, their shallow structure limits their feature extraction capabilities, making it difficult to deeply mine the high-dimensional features hidden within the data, thus hindering improvements in prediction accuracy.
[0003] To overcome these limitations, deep learning, with its powerful feature representation capabilities, has gradually become the dominant technology in this field. Early deep learning models mostly used convolutional neural networks and recurrent neural networks to extract spatial and temporal features, respectively. Given the inherent topological structure of subway networks, spatiotemporal perception models based on graph neural networks (GNNs) have become the mainstream research trend in subway passenger flow prediction. These models can more accurately capture the non-Euclidean spatial correlations between stations, significantly improving the accuracy and robustness of predictions. Existing GNN research focuses more on physical topology (such as distance and connectivity), and less on the driving role of external multi-source information such as point of interest (POI) distribution and weather changes in passenger flow. This lack of external semantic information means that the models still have certain prediction biases when facing sudden situations or environmental changes.
[0004] In summary, existing spatiotemporal perception-based subway passenger flow prediction technologies still suffer from the following key defects, limiting the performance and robustness of prediction systems in practical urban applications: (1) The complexity and dynamism of multi-source external data collection. Subway passenger flow fluctuations are not only limited by station location but also by the combined influence of surrounding environmental factors and various special events. Accurate passenger flow prediction requires the integration of these multi-source heterogeneous external data. However, the process of collecting and integrating these key unstructured or dynamic data (such as POIs and weather) is extremely complex and lacks an automated mechanism. (2) Existing mainstream spatiotemporal prediction models are essentially numerical models. Their design architecture determines that they are difficult to effectively integrate external non-numerical information, such as the nature of POIs and weather. This lack of background knowledge not only limits the model's ability to explain passenger flow behavior but also makes it difficult for the model to capture passenger flow correlations not determined by physical distance, ultimately affecting the prediction accuracy and robustness in complex real-world scenarios. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a spatiotemporal perception-based subway passenger flow prediction method based on large-scale model and multi-source information fusion. By deeply integrating multi-dimensional heterogeneous external factors (such as POIs and weather data), it significantly improves the performance, robustness, and interpretability of urban rail transit passenger flow prediction tasks.
[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:
[0007] A spatiotemporal perception-based subway passenger flow prediction method based on large-scale model and multi-source information fusion includes the following steps:
[0008] A data agent is constructed based on a large-scale language model agent and a model context protocol. The data agent is then used to generate text descriptions of each subway station and their corresponding spatial context embedding vectors based on the surrounding point of interest data of each subway station.
[0009] An augmented graph neural network is constructed based on the spatial context embedding vectors corresponding to each subway station. The augmented graph neural network is then used to perform spatiotemporal joint prediction based on historical passenger flow data and spatial context embedding vectors to obtain preliminary passenger flow prediction results.
[0010] A prompt word template is constructed that integrates text descriptions, historical passenger flow data, weather data, and preliminary passenger flow forecast results. A pre-trained large-scale language model is then used to perform domain knowledge calibration based on the prompt word template to obtain the final passenger flow forecast result.
[0011] Optionally, the data agent generates text descriptions of each subway station and their corresponding spatial context embedding vectors based on surrounding point-of-interest data, including:
[0012] By using data intelligence agents to call external tools, the system can automatically acquire surrounding point of interest data for each subway station in the target area, filter and integrate the surrounding point of interest data, and generate text descriptions of each subway station and their corresponding spatial context embedding vectors.
[0013] Optionally, the data agent generates text descriptions of each subway station and their corresponding spatial context embedding vectors based on surrounding point-of-interest data, including:
[0014] Use a map search tool to obtain a list of standard stations for the target subway line by keyword search, and use a geocoding tool to obtain the geographic coordinates of each station;
[0015] For each station, a list of points of interest within a preset radius is obtained by calling a surrounding search tool, centered on its geographical coordinates; based on a preset list of high-impact points of interest categories, the list of points of interest is filtered to retain those with high impact on passenger flow.
[0016] The selected points of interest information for each site is synthesized into a structured natural language text description;
[0017] The text embedding model is invoked to convert the text description into a numerical spatial context embedding vector.
[0018] Optionally, constructing an enhanced graph neural network based on the spatial context embedding vectors corresponding to each subway station includes:
[0019] The semantic spatial correlation between subway stations is learned by using spatial context embedding vectors, and an enhanced adjacency matrix is generated based on the semantic spatial correlation between subway stations to construct an enhanced graph neural network.
[0020] Optionally, constructing an enhanced graph neural network based on the spatial context embedding vectors corresponding to each subway station includes:
[0021] Spatial context is embedded into a vector input to a feedforward neural network for dimensionality reduction.
[0022] The dimensionality-reduced spatial context embedding vector is passed through a graph attention layer to calculate the association strength score between any two sites.
[0023] The association strength score is processed using a sparse activation function to obtain sparse attention weights;
[0024] An enhanced adjacency matrix is generated based on sparse attention weights.
[0025] Optionally, the association strength score is calculated as follows:
[0026]
[0027]
[0028] in, Let i be the combination matrix of site i and other sites. For splicing operations, For repeated operations, Embed a spatial context vector for site i. The total number of stations, Embed vectors for spatial context. Let i be the association strength score between site i and other sites. This is the second feedforward neural network.
[0029] Optionally, the enhanced adjacency matrix can be generated as follows:
[0030]
[0031] in, To enhance the adjacency matrix, This is the third feedforward neural network. For sparse activation functions, This is the correlation strength score matrix.
[0032] Optionally, an enhanced graph neural network is used to perform spatiotemporal joint prediction based on historical passenger flow data and spatial context embedding vectors to obtain preliminary passenger flow prediction results, including:
[0033] Using the enhanced adjacency matrix generated by spatial context embedding vectors as the spatial structure prior, historical passenger flow data and spatial context embedding vectors are concatenated as node input features, and enhanced graph neural networks are used for spatiotemporal joint prediction to obtain preliminary passenger flow prediction results.
[0034] Optionally, the augmented graph neural network employs graph diffusion convolution to capture spatial dependencies, specifically:
[0035]
[0036] in, To define the output features of the graph diffusion convolution operation, Let be the learnable weight matrix for the s-th order diffusion. For degree matrix, It is the identity matrix. To enhance the adjacency matrix, The input features for the graph diffusion convolution operation are... The maximum order of the diffusion process is given by the graph. This is a graph convolution operator based on an enhanced adjacency matrix A.
[0037] Optionally, the prompt word template includes the defined prediction target and time granularity, text descriptions of each subway station, historical passenger flow statistics patterns, historical passenger flow data, weather data, preliminary passenger flow prediction results, and real passenger flow data used during the training phase.
[0038] The present invention has the following beneficial effects:
[0039] (1) This invention proposes an architecture based on a large model and a model context protocol to build a data intelligence agent, realize autonomous, efficient and intelligent filtering of interest point data around subway stations, and generate semantically rich node description text and spatial context embedding enhanced by the large model, thus realizing efficient and standardized transformation from unstructured information to model-usable features.
[0040] (2) This invention proposes an innovative multi-source information fusion mechanism, which completely solves the limitation of traditional spatiotemporal prediction models that rely solely on numerical passenger flow data and physical location, ensuring that the model can comprehensively utilize external factors such as the functional area attributes of each station and weather conditions for prediction. The preliminary numerical prediction results of GNN, the station descriptions generated by the data agent, historical passenger flow statistics patterns, and weather data are jointly encoded into prompt words. The common sense reasoning ability of the large model is used to perform secondary calibration on the prediction results of GNN, ensuring that the final output conforms to the constraints of the real world, and significantly enhancing the interpretability and prediction accuracy of the model. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the spatiotemporal perception-based subway passenger flow prediction method based on large model and multi-source information fusion in this invention.
[0042] Figure 2 This is a schematic diagram of a heatmap based on spatial context embedding in this invention;
[0043] Figure 3 This is a schematic diagram of a heat map based on geographical distance in this invention;
[0044] Figure 4 This is a schematic diagram comparing the time-series changes of the predicted values output by the graph neural network in this invention with the actual observed passenger flow values. Detailed Implementation
[0045] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0046] This invention aims to provide a high-precision, highly interpretable, and highly adaptable spatiotemporal sequence prediction system. Through an innovative fusion architecture integrating data agents, spatiotemporal graph neural networks, and large language models, it systematically overcomes the bottlenecks of existing technologies in external context knowledge integration and predictive common sense consistency. The core technical problems this invention seeks to solve are as follows:
[0047] (1) To achieve proactive and efficient acquisition of contextual knowledge, design and build a data intelligence agent, utilize the reasoning ability of the large model, call external tools through the Model Context Protocol (MCP) to achieve autonomous and purposeful collection and intelligent filtering of unstructured POI data that is strongly related to passenger flow prediction, and refine and format it into structured text descriptions and numerical spatial embeddings, so as to overcome the pain points and complexities of traditional manual query, complex interface call, and time-consuming data cleaning process, and realize efficient and standardized transformation from unstructured information to model-usable features.
[0048] (2) To overcome the limitations of numerical models in terms of interpretability and practicality of prediction results due to the lack of domain knowledge, this paper combines the powerful contextual reasoning and knowledge embedding capabilities of large models with the spatiotemporal sequence modeling capabilities of GNNs to achieve a significant improvement in prediction performance. Through the prompting engineering and fine-tuning mechanism of large models, various information such as station descriptions, passenger flow patterns, weather, and initial prediction results of GNNs are integrated. The general reasoning capabilities of large models are used to constrain and calibrate the prediction results, ultimately outputting prediction values that are closer to reality and more domain-constrained, and enhancing the interpretability of the prediction process.
[0049] The present invention divides the entire process into three parts: (1) constructing a data intelligent agent; (2) constructing a large model enhancement graph and spatiotemporal prediction; and (3) calibrating the large model domain knowledge of the prediction results.
[0050] like Figure 1 As shown in the figure, the spatiotemporal perception-based subway passenger flow prediction method based on large model and multi-source information fusion provided by the present invention includes the following steps S1 to S3:
[0051] S1. Construct a data agent based on a large-scale language model agent and a model context protocol, and use the data agent to generate text descriptions of each subway station and their corresponding spatial context embedding vectors based on the surrounding interest point data of each subway station.
[0052] In an optional embodiment of the present invention, step S1 utilizes a data agent to generate text descriptions of each subway station and their corresponding spatial context embedding vectors based on surrounding point-of-interest data of each subway station, including:
[0053] By using data intelligence agents to call external tools, the system can automatically acquire surrounding point of interest data for each subway station in the target area, filter and integrate the surrounding point of interest data, and generate text descriptions of each subway station and their corresponding spatial context embedding vectors.
[0054] In a further implementation, step S1 utilizes a data agent to generate text descriptions of each subway station and their corresponding spatial context embedding vectors based on surrounding point-of-interest data, including:
[0055] Use a map search tool to obtain a list of standard stations for the target subway line by keyword search, and use a geocoding tool to obtain the geographic coordinates of each station;
[0056] For each station, a list of points of interest within a preset radius is obtained by calling a surrounding search tool, centered on its geographical coordinates; based on a preset list of high-impact points of interest categories, the list of points of interest is filtered to retain those with high impact on passenger flow.
[0057] The selected points of interest information for each site is synthesized into a structured natural language text description;
[0058] The text embedding model is invoked to convert the text description into a numerical spatial context embedding vector.
[0059] This embodiment aims to construct a data intelligence agent with autonomous perception and tool usage capabilities. Its goal is to address the deficiency of traditional spatiotemporal prediction models in lacking high-quality spatial context knowledge. Through intelligent and standardized methods, it efficiently collects, filters, and generates text descriptions T and spatial context embeddings for all subway stations in the target area, which are then used in downstream GNN models. , where N is the number of sites and d is the embedding dimension.
[0060] This embodiment constructs an architecture with a large language model as the core decision-making and task orchestration hub, and achieves standardized integration of external capabilities through the Model Context Protocol (MCP). Specifically, the system integrates two key MCP components: a POI search API and a large model text embedding service. The MCP acts as a standardized adapter in this solution. It encapsulates external proprietary APIs (such as the map POI search API) and the large model text embedding learning service into MCP tools with clear input and output specifications. This encapsulation effectively isolates the main agent from the complexity of external services, allowing the main agent to focus solely on task planning, parameter inference, and tool selection. In the four stages of task execution, POI data acquisition and text embedding generation must be achieved by calling the corresponding MCP tools.
[0061] The task workflow is divided into four logically progressive stages, each accompanied by the main agent's professional decision-making and strict protocol interaction.
[0062] Phase 1: Obtaining the List and Coordinates of Standard Subway Stations. This phase aims to accurately obtain the list and coordinates of standard subway stations. The agent calls a text search tool and uses the internal reasoning of the large model to strictly filter the results by "type," eliminating redundant information. Subsequently, the agent enters a loop, calling a geocoding tool for each filtered station to ensure accurate matching of station name and coordinates.
[0063] Phase Two: Precise Search and Intelligent Filtering of Key POIs. The agent calls the POI query tool to collect POI data, and then uses its internal reasoning ability and a pre-set list of high-impact POI categories to compare it. Only POIs that have a significant attraction or effect on customer traffic (such as large shopping malls, hospitals, office buildings, schools, etc.) are retained, and all low-impact or irrelevant POIs are immediately discarded. This demonstrates the agent's professionalism in domain knowledge application and data refinement.
[0064] Phase 3: Generation and storage of high-quality site text description T. The goal of this phase is to achieve efficient conversion of structured data into narrative text. The main agent uses a list of key POIs as the core input and, through customized generation prompts, is required to output and store a text description with high information density and professional style.
[0065] Phase Four: Spatial Context Embedding The generation and storage of text embeddings are the endpoints of this task. The main agent integrates large model capabilities through the MCP protocol, calls the pre-configured large model text embedding learning MCP tool, takes the site text description generated in stage three as input parameters, and then stores the returned text embedding vectors.
[0066] S2. Construct an enhanced graph neural network based on the spatial context embedding vectors corresponding to each subway station, and use the enhanced graph neural network to perform spatiotemporal joint prediction based on historical passenger flow data and spatial context embedding vectors to obtain preliminary passenger flow prediction results.
[0067] In an optional embodiment of the present invention, step S2, which constructs an enhanced graph neural network based on the spatial context embedding vectors corresponding to each subway station, includes:
[0068] The semantic spatial correlation between subway stations is learned by using spatial context embedding vectors, and an enhanced adjacency matrix is generated based on the semantic spatial correlation between subway stations to construct an enhanced graph neural network.
[0069] In a further implementation, step S2, which involves constructing an enhanced graph neural network based on the spatial context embedding vectors corresponding to each subway station, includes:
[0070] Spatial context is embedded into a vector input to a feedforward neural network for dimensionality reduction.
[0071] The dimensionality-reduced spatial context embedding vector is passed through a graph attention layer to calculate the association strength score between any two sites.
[0072] The association strength score is processed using a sparse activation function to obtain sparse attention weights;
[0073] An enhanced adjacency matrix is generated based on sparse attention weights.
[0074] Step S2 utilizes an enhanced graph neural network to perform spatiotemporal joint prediction based on historical passenger flow data and spatial context embedding vectors, obtaining preliminary passenger flow prediction results, including:
[0075] Using the enhanced adjacency matrix generated by spatial context embedding vectors as the spatial structure prior, historical passenger flow data and spatial context embedding vectors are concatenated as node input features, and enhanced graph neural networks are used for spatiotemporal joint prediction to obtain preliminary passenger flow prediction results.
[0076] To overcome the problem of graph structure learning driven by unstable numerical data in traditional GNNs, this embodiment utilizes the spatial context embedding E provided by the data agent to construct a more robust enhanced adjacency matrix A. This step leverages the spatial context embedding E generated by the agent to enhance the graph structure learning and spatiotemporal feature extraction capabilities of the GNN model, and performs preliminary spatiotemporal prediction of passenger flow.
[0077] First is the graph structure construction module for large model enhancement. To overcome the limitation of traditional GNNs that rely solely on physical distance to construct graph structures, this module utilizes the contextual embedding E generated by the agent to learn semantic space relevance. This embedding vector E is then processed by a feedforward network (…). The projection of the high-dimensional representation of the large model is transformed into a low-dimensional representation suitable for graph processing, and then the refined embedding E is input into the graph attention layer. Semantic similarity between any two sites i and j is calculated through repetition and concatenation (⊕). This process aims to capture: if the surrounding functions of two sites are similar (i.e., POI embedding vectors...), then... and Similar to each other, even if they are physically far apart, they will be considered strongly correlated on the graph, thus better capturing potential interactions between passenger flows. The graph attention layer calculates the correlation strength score as follows:
[0078]
[0079]
[0080] in, Let i be the combination matrix of site i and other sites. For splicing operations, For repeated operations, Embed a spatial context vector for site i. The total number of stations, Embed vectors for spatial context. Let i be the association strength score between site i and other sites. This is the second feedforward neural network.
[0081] To prevent information interference from low-weight noise nodes, this embodiment adopts... The attention score is standardized using a function instead of Softmax. The function enables sparsification of the graph structure, suppressing the influence of low-weight noise nodes and allowing the model to focus more on sites related to core functions. The final enhanced adjacency matrix A is derived from... produce:
[0082]
[0083] in, To enhance the adjacency matrix, This is the third feedforward neural network. For sparse activation functions, This is the correlation strength score matrix.
[0084] Next is graph neural network prediction. Using the generated enhanced adjacency matrix A as a spatial structure prior, and combining it with historical passenger flow data, a spatiotemporal joint prediction of passenger flow is performed. Historical passenger flow data... The context embedding E generated by the Agent is concatenated along the feature dimension to serve as the node input features of the model. To jointly model spatiotemporal dependencies, graph convolution operations are used to replace the standard matrix operations in traditional sequence models. Graph diffusion convolution is used to achieve multi-step diffusion of information on the graph, and the adjacency matrix A is used to capture spatial correlations. (Graph convolution operation) The definition is as follows:
[0085]
[0086] in, To define the output features of the graph diffusion convolution operation, Let be the learnable weight matrix for the s-th order diffusion. For degree matrix, It is the identity matrix. To enhance the adjacency matrix, The input features for the graph diffusion convolution operation are... The maximum order of the diffusion process is given by the graph. This is a graph convolution operator based on the enhanced adjacency matrix A. This operation ensures that at each time step, the model can effectively integrate information from semantically relevant spatial neighbors, thereby capturing the mutual influence of passenger flow. GNN utilizes graph structure and concatenation features to perform graph convolution and temporal modeling, ultimately outputting preliminary passenger flow prediction results. Subsequently, the original prediction result Aggregation and reshaping are performed on all samples to form numerical prediction tokens C. These numerical tokens are structured numerical information, and their dimensions are represented as follows:
[0087]
[0088] Where M represents the number of training / test samples, N represents the number of nodes, and T represents the prediction step size. These values, TokenC, serve as the core input to the large model module and will be injected into the prompt words for final domain knowledge injection and prediction calibration.
[0089] S3. Construct a prompt word template that integrates text description, historical passenger flow data, weather data, and preliminary passenger flow prediction results. Use a pre-trained large-scale language model to perform domain knowledge calibration based on the prompt word template to obtain the final passenger flow prediction result.
[0090] In an optional embodiment of the present invention, the prompt word template in step S3 includes the defined prediction target and time granularity, text descriptions of each subway station, historical passenger flow statistics patterns, historical passenger flow data, weather data, preliminary passenger flow prediction results, and real passenger flow data used in the training phase.
[0091] This embodiment aims to leverage the powerful commonsense reasoning capabilities of large models to perform preliminary numerical predictions for GNNs. Secondary reasoning and logical calibration are performed to ensure that the prediction results conform to the domain knowledge constraints of the real world.
[0092] First, there's the design of cue words for domain knowledge injection. To achieve efficient fusion of cross-modal knowledge, a refined cue word structure comprising seven key components was designed for supervised fine-tuning of large models. These components include clearly defined task instructions (such as prediction targets and time granularity), node descriptions T generated by the agent, node patterns extracted from historical data (periodic patterns and peak / valley characteristics of passenger flow), historical inputs (past real passenger flow data), weather data, numerical prediction results output by the GNN backbone network, and real passenger flow data used during the fine-tuning training phase (excluding real passenger flow data during the inference phase). This cue word structure juxtaposes previously isolated numerical sequence information with rich textual semantic information, enabling large models to perform deep inference based on multi-dimensional context.
[0093] In the context-aware calibration phase, a low-rank adaptive parameter efficient fine-tuning technique is employed to supervise the fine-tuning of the large model. The large model receives prompts containing the seven elements mentioned above and utilizes its general reasoning and generalization capabilities to perform secondary processing and refinement on the numerical prediction token C output by the GNN. This process achieves hard coding of domain constraints: the large model refers to common-sense knowledge (e.g., maximum and minimum passenger flow at the station, heavy rain during the forecast period, and passenger flow should be corrected downwards) contained in the "node description," "node pattern," and "weather data" to correct the original prediction values of the GNN. This common-sense constraint calibration ensures the realistic rationality and practicality of the final prediction results, avoiding prediction values that violate realistic constraints that may arise from the lack of domain knowledge in traditional numerical models. This module successfully compensates for the inherent deficiencies of numerical models in terms of interpretability and domain constraints by transforming the reasoning capabilities of the large model into a common-sense calibrator.
[0094] This invention was implemented in a passenger flow prediction task for a certain subway line 1.
[0095] Building Data Intelligence Agents:
[0096] (1) MCP environment configuration: Deploy MCP Host and configure its interaction with the large model Agent.
[0097] (2) Implementation of intelligent agent process: Realize the autonomous planning capability of large model intelligent agents, enabling them to call MCP tools sequentially (or in parallel) to complete the collection and filtering of POI data, and generate site text description T and spatial context embedding. .
[0098] (3) Enhanced graph structure generation: using spatial context embedding Generate an enhanced adjacency matrix A.
[0099] (4) Graph Neural Network Prediction: Using historical passenger flow data and the enhanced adjacency matrix A, preliminary passenger flow prediction results are generated. .
[0100] (5) Numerical prediction Token C generation: The preliminary passenger flow prediction results are generated. Aggregation and reshaping are performed on all samples to form the numerical prediction token C.
[0101] (6) Construction of prompt word dataset: Combine elements such as text description, historical passenger flow statistics pattern, historical input, weather data, and GNN prediction tokens into a supervised fine-tuning dataset.
[0102] (7) Large model fine-tuning: Use low-rank adaptive parameter efficient fine-tuning technology to fine-tune the large model.
[0103] (8) Final prediction: Deploy the fine-tuned large model inference service. During inference, the large model receives test set prompts, performs contextual reasoning and common sense calibration, and outputs the final, interpretable sequence of predicted values.
[0104] The spatiotemporal perception-based subway passenger flow prediction method proposed in this invention, based on large-scale models and multi-source information fusion, has significant and comprehensive beneficial effects in urban rail transit passenger flow prediction tasks, especially in scenarios facing data challenges and requiring extremely high prediction reliability. To verify the method of this invention, experiments were conducted on a historical passenger flow dataset of a subway line 1.
[0105] The first step is the construction of data intelligence agents, transforming the previously manual and inefficient process of data collection and knowledge textification into an automated and highly efficient agent-driven model. In the past, researchers needed to write customized code for different map APIs and manually process site names. latitude and longitude Complex chained queries for retrieving nearby POIs. This invention achieves fully automated end-to-end data collection by constructing a data intelligence agent. The agent can autonomously reason and invoke a standardized MCP toolset to decompose and execute complex tasks, making data collection more convenient and efficient.
[0106] Secondly, spatial context embedding generated by the intelligent agent is used. To construct graph structure A. Figure 2 and Figure 3 They are based on spatial context embedding The invention employs both heat maps based on geographic distance and heat maps based on geographical distance. Traditional methods use geographic distance to construct the graph structure A, which only reflects the physical accessibility between stations. However, passenger flow coupling is often based on urban functional attributes. The contextual embedding E used in this invention is obtained by intelligently filtering surrounding POIs through an agent. Therefore, the semantic adjacency matrix A constructed based on E can capture non-local associations. Even if two stations are far apart, if they are highly similar in functional attributes, the similarity of E will be high, thus forming strong connections in A and improving the accuracy of passenger flow prediction.
[0107] Then, the prediction results are derived from the graph neural network constructed based on the augmented graph. Figure 4 The predicted values (red dashed line) output by the graph neural network were compared with the actual observed passenger flow values (blue solid line) over a time window. It can be seen that the prediction results of the graph neural network based on the augmented graph highly match the actual values.
[0108] Finally, through the domain knowledge injection module, the initial numerical prediction token C from the GNN, the node description T generated by the agent, historical passenger flow statistics, and weather data are jointly encoded into prompt words. The common-sense reasoning ability of the large model is then used to perform a secondary calibration of the GNN's prediction results. This innovative design ensures that the final output conforms to real-world constraints, avoiding the possibility of predictions that violate real-world constraints due to a lack of domain knowledge in traditional numerical models. This makes the prediction results closer to reality, significantly enhancing the model's interpretability and prediction accuracy.
[0109] The implementation results in a passenger flow forecasting task for a subway line demonstrate that the method proposed in this invention exhibits superior performance in scenarios facing data challenges and requiring extremely high forecast reliability. It not only improves the accuracy of passenger flow forecasting but also provides a more reliable basis for decision-making in urban rail transit operation scheduling and resource allocation, contributing to improved overall operational efficiency and service quality of urban rail transit systems. It has broad application prospects and significant socio-economic benefits.
[0110] Table 1 compares the performance metrics of this invention with other prediction methods, including Feedforward Neural Network (FNN), Multivariate TimeSeries Forecasting Graph Neural Network (MTGNN), Adaptive Graph Convolutional Recurrent Network (AGCRN), and Graph Multi-Attention Network (GMAN). The data in Table 1 shows that the method proposed in this invention achieves optimal performance in terms of MAE (Mean Absolute Error), RMSE (Root Mean Square Error), and MAPE (Mean Absolute Percentage Error), particularly excelling in reducing MAE and MAPE, thus validating the effectiveness of its spatiotemporal modeling mechanism. Compared to other methods, this invention exhibits significant advantages in prediction accuracy, robustness, and practicality, making it suitable for spatiotemporal prediction scenarios with high accuracy requirements.
[0111] Table 1. Comparison of Indicators between the Invention and Other Prediction Methods
[0112]
[0113] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0116] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
[0117] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A large model and multi-source information fusion based spatio-temporal perception subway passenger flow prediction method, characterized in that, The method comprises the following steps: constructing a data agent based on a large language model and a model context protocol, and generating a text description and a corresponding spatial context embedding vector of each subway station based on surrounding point of interest data of each subway station by using the data agent; constructing an enhanced graph neural network according to the spatial context embedding vector corresponding to each subway station, and performing spatio-temporal joint prediction based on historical passenger flow data and the spatial context embedding vector by using the enhanced graph neural network to obtain a preliminary passenger flow prediction result; constructing a prompt word template fusing the text description, the historical passenger flow data, weather data and the preliminary passenger flow prediction result, and performing domain knowledge calibration based on the prompt word template by using a pre-trained large language model to obtain a final passenger flow prediction result; wherein the constructing of the enhanced graph neural network according to the spatial context embedding vector corresponding to each subway station comprises: learning semantic spatial correlation between each subway station by using the spatial context embedding vector, and generating an enhanced adjacency matrix based on the semantic spatial correlation between each subway station to construct the enhanced graph neural network; the constructing of the enhanced graph neural network according to the spatial context embedding vector corresponding to each subway station further comprises: inputting the spatial context embedding vector into a feedforward neural network for dimension reduction processing; calculating a correlation strength score between any two stations by a graph attention layer through the dimension-reduced spatial context embedding vector, and the calculation method is: ; ; wherein, is a combination matrix of the station i with other stations, is a concatenation operation, is a repetition operation, is a spatial context embedding vector of the station i, is a total number of stations, is a spatial context embedding vector, is a relevance strength score of the station i with other stations, is a second feed-forward neural network; processing the correlation strength score by using a sparsification activation function to obtain a sparsified attention weight; generating the enhanced adjacency matrix according to the sparsified attention weight, and the generation method is: ; wherein, is an enhanced adjacency matrix, is a third feedforward neural network, is a sparsified activation function, is a relevance strength score matrix; performing spatio-temporal joint prediction based on the historical passenger flow data and the spatial context embedding vector by using the enhanced graph neural network to obtain the preliminary passenger flow prediction result, which comprises: taking the enhanced adjacency matrix generated by using the spatial context embedding vector as a spatial structure prior, concatenating the historical passenger flow data and the spatial context embedding vector as node input features, and performing spatio-temporal joint prediction by using the enhanced graph neural network to obtain the preliminary passenger flow prediction result; the enhanced graph neural network adopts a graph diffusion convolution to capture spatial dependency, and specifically comprises: ; wherein, is an output feature of the graph diffusion convolution operation, is a learnable weight matrix of the s-th order diffusion, is a degree matrix, is an identity matrix, is an augmented adjacency matrix, is an input feature of the graph diffusion convolution operation, is a maximum order of the graph diffusion process, is a graph convolution operator based on the augmented adjacency matrix A.
2. The method according to claim 1, wherein, generating a text description and a corresponding spatial context embedding vector of each subway station based on surrounding point of interest data of each subway station by using the data agent, which comprises: automatically obtaining surrounding point of interest data of each subway station in a target area by calling an external tool through the data agent, and screening and integrating the surrounding point of interest data to generate a text description and a corresponding spatial context embedding vector of each subway station.
3. The method according to claim 2, wherein, generating a text description and a corresponding spatial context embedding vector of each subway station based on surrounding point of interest data of each subway station by using the data agent, which comprises: calling a map search tool to obtain a standard station list of a target subway line through keyword search, and calling a geocoding tool to obtain geographic coordinates of each station; for each station, calling a surrounding search tool to obtain a point of interest list within a preset radius centering on the geographic coordinates thereof; and based on a preset list of passenger flow high-impact point of interest categories, screening the point of interest list to retain passenger flow high-impact points of interest. The interest point information of each station after screening is synthesized into a structured natural language text description; A text embedding large model is called to convert the text description into a numerical spatial context embedding vector.
4. The method according to claim 1, wherein, The prompt word template includes a defined prediction target and time granularity, text descriptions of each subway station, historical passenger flow statistical patterns, historical passenger flow data, weather data, preliminary passenger flow prediction results, and real passenger flow data used in the training stage.
Citation Information
Patent Citations
Vehicle active service system based on end-side multi-modal large model and dynamic reasoning method thereof
CN120724397A
Method, system, computer program product and computer readable medium for traffic prediction
WO2025008653A1