Passenger flow prediction method and device
By using a spatiotemporal hybrid prediction model based on multi-source heterogeneous data, which combines time, space, and environmental factors, the problem of single data source in existing rail transit passenger flow prediction methods is solved, enabling more accurate and flexible passenger flow prediction and supporting real-time decision-making.
Patent Information
- Application Number
- CN202511372148.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2026-02-17
AI Technical Summary
Existing rail transit passenger flow forecasting methods rely on a single data source, ignoring other key factors affecting passenger flow changes, resulting in low forecast accuracy and a lack of multi-dimensional collaborative modeling capabilities, making them unable to effectively cope with emergencies and network-level collaborative optimization.
A spatiotemporal hybrid prediction model is adopted, which uses multi-source heterogeneous data input. Feature vectors are extracted through time, space and environment modules and then fused for prediction. The model includes a Prophet module, LSTM layer, attention mechanism and fully connected neural network. The weights are adjusted in combination with real-time data to achieve multi-dimensional passenger flow prediction.
It significantly improves the accuracy and reliability of passenger flow forecasting, and can cope with complex spatiotemporal correlations and emergencies, providing real-time decision support.
Smart Images

Figure CN121543775A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and apparatus for predicting passenger flow. Background Technology
[0002] Passenger flow forecasting for rail transit is a core technology for achieving intelligent operation and management of rail transit.
[0003] Most existing methods rely on a single data source for the forecasting process. For example, they use historical passenger flow data generated by the subway's automatic fare collection system for forecasting. This single-data-source forecasting approach ignores other key factors affecting passenger flow changes, resulting in low accuracy in passenger flow forecasting. Summary of the Invention
[0004] This invention provides a passenger flow prediction method and apparatus to improve the accuracy of passenger flow prediction for rail transit.
[0005] This invention provides a passenger flow prediction method, comprising the following steps: Acquire multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data, and environmental impact data; The multi-source heterogeneous data is input into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0006] According to a passenger flow prediction method provided by the present invention, the time module includes a Prophet module and a Long Short-Term Memory (LSTM) layer. Based on the time module, time-series passenger flow features are extracted from historical passenger flow data to obtain a time-series passenger flow feature vector, including: Based on the historical passenger flow data, a historical passenger flow time series is constructed; The historical passenger flow time series is decomposed based on the Prophet module to obtain a macro forecast component that includes trend, seasonality and holiday effects, and the residual series between the macro forecast component and the historical passenger flow time series is calculated. The residual sequence is input into the LSTM layer to extract the nonlinear temporal dependencies in the residual sequence, thereby obtaining the nonlinear dynamic components of the historical passenger flow data. The time-series passenger flow feature vector is obtained by fusing the macroscopic prediction component and the nonlinear dynamic component.
[0007] According to a passenger flow prediction method provided by the present invention, spatial feature extraction is performed on network topology data based on the spatial module to obtain a spatial feature vector, including: Based on the stations in the network topology data as nodes and the lines in the network topology data as edges, a topology graph of the rail transit network is constructed. For each node in the topology graph, the importance score of neighboring nodes relative to the current node is determined based on an attention mechanism; Based on the importance score, the information of each node's neighboring nodes is weighted and summed to obtain a spatial feature vector containing network spatial dependencies.
[0008] According to a passenger flow prediction method provided by the present invention, based on an environmental module, environmental impact features are extracted from environmental impact data to obtain an environmental impact feature vector, including: Based on a fully connected neural network layer, the mapping relationship between each influencing factor and passenger flow changes in the environmental impact data is extracted; Based on the mapping relationship, an environmental impact feature vector is constructed.
[0009] According to a passenger flow prediction method provided by the present invention, the step of fusing the temporal passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and predicting passenger flow based on the obtained fused feature vector, includes: Based on preset weights, the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector are weighted and fused to obtain fused features; Passenger flow prediction is performed based on the fusion features to determine the passenger flow prediction results.
[0010] According to a passenger flow prediction method provided by the present invention, after obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Obtain real-time passenger flow data of the rail transit network; The real-time passenger flow data is compared with the passenger flow data in the passenger flow prediction results. If the comparison error is greater than the preset error threshold, the preset weight is adjusted.
[0011] According to a passenger flow prediction method provided by the present invention, after obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Based on the passenger flow forecast results, a heat map of the rail transit network is constructed; Based on the heat map, information on vehicle departure frequency adjustments and passenger flow management for the rail transit network is determined.
[0012] The present invention also provides a passenger flow prediction device, comprising the following modules: The data acquisition module is used to acquire multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data, and environmental impact data. The prediction module is used to input the multi-source heterogeneous data into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data; The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the passenger flow prediction method as described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the passenger flow prediction method as described above.
[0015] The passenger flow forecasting method and apparatus provided by this invention decompose the passenger flow forecasting problem into three independent but interrelated dimensions: time, space, and environment, and then perform fusion forecasting through a unified forecasting framework. This structured approach allows the model to understand the complex driving factors of passenger flow changes more deeply from multiple perspectives, thereby significantly improving the accuracy and reliability of passenger flow forecasting. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the passenger flow prediction method provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the passenger flow prediction device provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] The relevant methods for predicting passenger flow rely on a single data source (such as data from an Automatic Fare Collection System (AFC)). They struggle to integrate multimodal heterogeneous data such as mobile signaling, social media, weather, and points of interest (POIs), resulting in predictions that fail to reflect sudden fluctuations in passenger flow and complex spatiotemporal relationships.
[0022] Furthermore, the models used in the relevant methods (such as the Autoregressive Integrated Moving Average Model (ARIMA) and Long Short-Term Memory (LSTM) networks) only process time or space features individually. The serial spatiotemporal models are prone to feature distortion and loss of global information, and they do not effectively quantify the impact of external factors (such as holidays and events).
[0023] Insufficient dynamic response capability: Most models in the relevant methods lack online learning mechanisms and cannot adapt in real time to cyclical changes in passenger flow (such as the switching between commuting and holiday modes) and emergencies (such as large-scale events and extreme weather).
[0024] Network-level collaborative prediction is lacking: most related methods are limited to single-line prediction and do not make full use of the subway network topology (such as transfer stations, origin-destination distribution, OD) to achieve multi-line passenger flow collaborative optimization.
[0025] To address the shortcomings of existing methods, this invention provides a passenger flow prediction method. Figure 1 This is a flowchart illustrating the passenger flow prediction method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 110: Obtain multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data, and environmental impact data; Step 120: Input the multi-source heterogeneous data into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0026] The subject executing the passenger flow prediction method provided by this invention can be an electronic device, a component within an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), or personal computer (PC), etc. This invention does not impose specific limitations.
[0027] The technical solution of this invention will be described in detail below using the example of a computer executing the passenger flow prediction method provided by this invention.
[0028] In step 110, multi-source heterogeneous data of the rail transit network is acquired, including historical passenger flow data, network topology data, and environmental impact data.
[0029] Multi-source heterogeneous data refers to a collection of data from different sources and with varying structures, but which are related to changes in passenger flow. In this invention, multi-source heterogeneous data specifically includes: Historical passenger flow data reflects the basic patterns of passenger flow changes over time. This data can be obtained from AFC (Automatic Flow Control) and includes station-level entry and exit card swipe records, timestamps, and generated station passenger flow information. Optionally, to compensate for the lack of data on non-card-swiping passengers (such as passengers using special ticket types), mobile signaling data can be integrated, and the dynamics of network passenger flow over a wider area can be inferred by analyzing the movement trajectories of anonymized devices between base stations.
[0030] Network topology data describes the physical structure and connectivity of a rail transit network. Specifically, it can include the geographical information of each station (such as latitude and longitude), station type (such as ordinary station, transfer station), line affiliation information, and the connections between stations (i.e., line alignment). This data forms the basis for spatial analysis.
[0031] Environmental impact data refers to external factors that can influence passengers' travel decisions. Examples include weather data (such as sunny days, rain, snow, temperature, wind speed, etc.), point-of-interest data (such as the distribution and operational status of shopping malls, schools, office areas, and sports venues around the station), and information on special events (such as holiday arrangements, major sporting events, concerts, temporary traffic control, etc.).
[0032] In step 120, the multi-source heterogeneous data is input into a pre-trained spatiotemporal hybrid prediction model to obtain passenger flow prediction results.
[0033] The spatiotemporal hybrid prediction model is a deep learning model designed to simultaneously process and fuse feature information from three dimensions: time, space, and environment. This model requires supervised learning training using historical, multi-source, heterogeneous sample data and their corresponding real-world passenger flow labels.
[0034] In this invention, the spatiotemporal hybrid prediction model is structurally composed of four core modules: The time module is used to process historical passenger flow data and determine the time dependence within it. This module receives historical passenger flow data and, by analyzing its inherent periodicity, trends, and abrupt changes, extracts a time-series passenger flow feature vector that characterizes the evolution of passenger flow over time.
[0035] The spatial module processes network topology data and models the spatial dependencies between stations. By analyzing the connectivity of the subway network, this module learns how passenger flow at a station is affected by the passenger flow status of its neighboring stations and even the entire network, ultimately outputting a spatial feature vector representing this spatial dependency.
[0036] The environment module is used to quantify the impact of external environmental factors on passenger flow. This module receives environmental impact data, learns and establishes a complex mapping relationship between various external factors and passenger flow fluctuations, and encodes it into an environmental impact feature vector.
[0037] The output module, as the final part of the model, is responsible for integrating the outputs of the first three modules. This module effectively fuses the temporal passenger flow feature vector, spatial feature vector, and environmental impact feature vector to form a comprehensive fused feature vector containing multi-dimensional information. Finally, based on this fused feature vector, one or more prediction layers are used to calculate and output the final passenger flow prediction results, such as the number of passengers entering, exiting, or transferring at each station within a specific future time period.
[0038] The passenger flow forecasting method provided by this invention decomposes the passenger flow forecasting problem into three independent but interrelated dimensions: time, space, and environment, and performs fusion forecasting through a unified forecasting framework. This structured approach enables the model to understand the complex driving factors of passenger flow changes more deeply from multiple perspectives, thereby significantly improving the accuracy and reliability of passenger flow forecasting.
[0039] In one embodiment, the time module includes a Prophet module and a Long Short-Term Memory (LSTM) layer. Based on the time module, time-series passenger flow features are extracted from historical passenger flow data to obtain a time-series passenger flow feature vector. This includes: constructing a historical passenger flow time series based on the historical passenger flow data; decomposing the historical passenger flow time series based on the Prophet module to obtain a macro-prediction component containing trend, seasonality, and holiday effects, and calculating the residual sequence between the macro-prediction component and the historical passenger flow time series; inputting the residual sequence into the LSTM layer to extract the nonlinear temporal dependencies in the residual sequence to obtain the nonlinear dynamic component of the historical passenger flow data; and fusing the macro-prediction component and the nonlinear dynamic component to obtain the time-series passenger flow feature vector.
[0040] Based on the acquired historical passenger flow data, a historical passenger flow time series is constructed. This is typically a sequence of passenger flow values recorded at a fixed time granularity.
[0041] The constructed historical passenger flow time series is input into the Prophet module. The Prophet module is a time series forecasting tool whose core idea is to decompose the time series into trend, seasonal, and holiday components. In this invention, the Prophet module is used to decompose the historical passenger flow time series, capturing its macroscopic and deterministic patterns of change. For example, trends can reflect long-term growth or decline in passenger flow due to urban development or route extensions; seasonality can capture periodic patterns such as weekday morning and evening rush hours and weekend off-peak hours; and holiday effects can quantify the specific impact of statutory holidays or special event days on passenger flow. After processing by the Prophet module, a macroscopic forecast component containing these patterns is obtained. Simultaneously, subtracting this macroscopic forecast component from the original historical passenger flow time series yields a residual series. This residual series represents those random, nonlinear passenger flow fluctuations that cannot be explained by deterministic patterns.
[0042] The residual sequence is then fed into a Long Short-Term Memory (LSTM) layer. LSTM is a type of recurrent neural network that can capture long-term dependencies and nonlinear dynamics in time series data. Through LSTM processing, the implicit nonlinear temporal dependencies in the residual sequence can be extracted, such as sudden passenger flow abrupt changes caused by events like congestion or train delays, thus obtaining the nonlinear dynamic components of historical passenger flow data.
[0043] Finally, the macroscopic prediction component output by the Prophet module is fused with the nonlinear dynamic component output by the LSTM layer. This can be achieved by vector concatenation, together forming the final temporal passenger flow feature vector.
[0044] The passenger flow prediction method provided by this invention, based on a time module, can simultaneously determine the macro-periodic patterns and micro-nonlinear fluctuations of passenger flow, making the extracted time-series passenger flow features more comprehensive and accurate, and providing high-quality time-dimensional information for subsequent predictions.
[0045] In one embodiment, based on the spatial module, spatial feature extraction is performed on the network topology data to obtain a spatial feature vector, including: constructing a topology graph of the rail transit network based on stations in the network topology data as nodes and lines in the network topology data as edges; for each node in the topology graph, determining the importance score of neighboring nodes relative to the current node based on an attention mechanism; and performing a weighted summation of the information of the neighboring nodes of each node based on the importance score to obtain a spatial feature vector containing network spatial dependencies.
[0046] Based on the acquired network topology data, a topological graph of the rail transit network structure is constructed. In this graph, each subway station is identified as a node, and the direct line connections between stations are identified as edges. Based on this, the subway network is represented as a graph structure.
[0047] To differentiate the degree of influence of different neighboring nodes on the current node (e.g., a large transfer station has a much greater impact on surrounding smaller stations than the other way around), this invention introduces an attention mechanism. For each node in the topology graph, the importance score of all its directly connected neighboring nodes relative to the current node is calculated based on the attention mechanism. This score is dynamically learned and can reflect the influence weight of different neighboring nodes under different times or passenger flow conditions.
[0048] Based on the calculated importance score, the information contained in the neighboring nodes of each node (such as the passenger flow, site type, and other characteristics of the neighboring nodes) is weighted and summed.
[0049] The future state of the current node is a weighted average of the current states of all its neighboring nodes, and the weights are determined by the attention mechanism, ultimately resulting in a spatial feature vector that contains the spatial dependencies of the network.
[0050] In one embodiment, based on the environment module, environmental impact features are extracted from the environmental impact data to obtain an environmental impact feature vector, including: extracting the mapping relationship between each influencing factor and passenger flow changes in the environmental impact data based on a fully connected neural network layer; and constructing the environmental impact feature vector based on the mapping relationship.
[0051] The acquired environmental impact data (such as weather data, whether it is a holiday, whether there are large-scale events in the surrounding area, etc.) is quantified and vectorized. Then, these feature vectors are input into a fully connected neural network (FNN) layer.
[0052] Fully connected neural network layers, based on the ability of multi-layer nonlinear transformations, can learn and extract the complex, nonlinear mapping relationships between various influencing factors and passenger flow changes in environmental impact data. For example, the model can learn that during weekday morning rush hour in light rain, commuter passenger flow will decrease by 5% but become more concentrated, or that when there is a game at a sports stadium, passenger flow at nearby stations will increase sharply 2 hours before and 1 hour after the game.
[0053] The output of the fully connected neural network layer is the environmental impact feature vector. The environmental impact feature vector is a compact representation of environmental impact data in a high-dimensional feature space, which quantitatively encodes the intensity and direction of the comprehensive impact of the external environment on passenger flow.
[0054] In one embodiment, fusing the temporal passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and predicting passenger flow based on the obtained fused feature vector, includes: weighting and fusing the temporal passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector based on preset weights to obtain fused features; and predicting passenger flow based on the fused features to determine the passenger flow prediction result.
[0055] The time-series passenger flow feature vector output by the time module, the spatial feature vector output by the spatial module, and the environmental impact feature vector output by the environmental module are weighted and fused. Weighting refers to assigning preset weights to the feature vectors from the three different dimensions. These weight values reflect the relative importance of the three factors—time, space, and environment—in the passenger flow prediction task.
[0056] For example, when predicting peak commuting times, the weight of time-series passenger flow features can be set to the highest; while when predicting holiday travel flow, the weight of environmental impact features can be increased. These weights can be used as hyperparameters of the model, manually set through methods such as cross-validation, or as learnable parameters of the model, automatically optimized during training. The three feature vectors can be fused into a unified fusion feature by weighted summation or concatenation followed by a linear layer.
[0057] The obtained fused features are input into the final prediction layer (e.g., one or more fully connected layers) to predict passenger flow, thereby determining the final passenger flow prediction result.
[0058] In one embodiment, after obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: acquiring real-time passenger flow data of the rail transit network; comparing the real-time passenger flow data with the passenger flow data in the passenger flow prediction result; and adjusting the preset weights if the comparison error is greater than a preset error threshold.
[0059] The real-time passenger flow data is compared with the passenger flow data in the passenger flow prediction results output by the model, and the error between the two is calculated. For example, indicators such as mean absolute error (MAE) or root mean square error (RMSE) are used.
[0060] Set a preset error threshold. If the comparison error exceeds this threshold, an adjustment to the preset weights will be triggered.
[0061] The adjustment process can employ an incremental learning strategy, using the latest data to fine-tune the model parameters, particularly adjusting the weights when fusing the three feature vectors of time, space, and environment. For example, if the model makes a severely inaccurate prediction on a sudden rainstorm day, the weights of environmental impact features can be automatically increased to enhance the model's sensitivity to weather factors.
[0062] By introducing this real-time feedback and dynamic adjustment mechanism, the passenger flow forecasting model has the ability to learn online, continuously learn from new data and make corrections, thereby effectively responding to the long-term evolution and short-term changes in passenger flow patterns and ensuring the long-term effectiveness of forecast accuracy.
[0063] In one embodiment, after obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: constructing a heat map of the rail transit network based on the passenger flow prediction result; and determining vehicle departure frequency adjustment information and passenger flow guidance information of the rail transit network based on the heat map.
[0064] Based on passenger flow forecasts, a heat map of the rail transit network is constructed. A heat map is an intuitive way to visualize data, which can mark the predicted passenger flow or congestion level of each station at a future point in time on the subway line map with different colors (e.g., green for smooth flow, yellow for busy flow, and red for congestion). The operators in the dispatch center can grasp the future passenger flow distribution of the entire network.
[0065] Based on heat maps, decision support information can be generated, specifically including information on adjusting train frequency and passenger flow management. For example, if a heat map shows that a certain line will have multiple red congested stations within the next hour, a train dispatching suggestion can be generated to increase the train frequency of Line 2 from 5 minutes / train to 3 minutes / train at a certain time. Simultaneously, for transfer stations where congestion is imminent, passenger flow management strategies can be generated, such as diverting some passengers to another transfer line through announcements, electronic displays, and staff guidance within the station, or sending early warning information to passengers about to reach the station.
[0066] The passenger flow prediction device provided by the present invention is described below. The passenger flow prediction device described below can be referred to in correspondence with the passenger flow prediction method described above.
[0067] like Figure 2 As shown, the device includes: Data acquisition module 210 is used to acquire multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data and environmental impact data; The prediction module 220 is used to input the multi-source heterogeneous data into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0068] The passenger flow prediction device provided by this invention decomposes the passenger flow prediction problem into three independent but interrelated dimensions: time, space, and environment, and performs fusion prediction through a unified prediction framework. This structured approach enables the model to understand the complex driving factors of passenger flow changes more deeply from multiple perspectives, thereby significantly improving the accuracy and reliability of passenger flow prediction.
[0069] In one embodiment, the prediction module 220 is specifically used for: The time module includes a Prophet module and a Long Short-Term Memory (LSTM) layer. Based on the time module, time-series passenger flow features are extracted from historical passenger flow data to obtain a time-series passenger flow feature vector, including: Based on the historical passenger flow data, a historical passenger flow time series is constructed; The historical passenger flow time series is decomposed based on the Prophet module to obtain a macro forecast component that includes trend, seasonality and holiday effects, and the residual series between the macro forecast component and the historical passenger flow time series is calculated. The residual sequence is input into the LSTM layer to extract the nonlinear temporal dependencies in the residual sequence, thereby obtaining the nonlinear dynamic components of the historical passenger flow data. The time-series passenger flow feature vector is obtained by fusing the macroscopic prediction component and the nonlinear dynamic component.
[0070] In one embodiment, the prediction module 220 is further configured to: Based on the aforementioned spatial module, spatial features are extracted from the network topology data to obtain a spatial feature vector, including: Based on the stations in the network topology data as nodes and the lines in the network topology data as edges, a topology graph of the rail transit network is constructed. For each node in the topology graph, the importance score of neighboring nodes relative to the current node is determined based on an attention mechanism; Based on the importance score, the information of each node's neighboring nodes is weighted and summed to obtain a spatial feature vector containing network spatial dependencies.
[0071] In one embodiment, the prediction module 220 is further configured to: Based on the environmental module, environmental impact features are extracted from the environmental impact data to obtain an environmental impact feature vector, including: Based on a fully connected neural network layer, the mapping relationship between each influencing factor and passenger flow changes in the environmental impact data is extracted; Based on the mapping relationship, an environmental impact feature vector is constructed.
[0072] In one embodiment, the prediction module 220 is further configured to: The process of fusing the temporal passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and then predicting passenger flow based on the resulting fused feature vector, includes: Based on preset weights, the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector are weighted and fused to obtain fused features; Passenger flow prediction is performed based on the fusion features to determine the passenger flow prediction results.
[0073] In one embodiment, the prediction module 220 is further configured to: After obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Obtain real-time passenger flow data of the rail transit network; The real-time passenger flow data is compared with the passenger flow data in the passenger flow prediction results. If the comparison error is greater than the preset error threshold, the preset weight is adjusted.
[0074] In one embodiment, the prediction module 220 is further configured to: After obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Based on the passenger flow forecast results, a heat map of the rail transit network is constructed; Based on the heat map, information on vehicle departure frequency adjustments and passenger flow management for the rail transit network is determined.
[0075] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions from the memory 330 to execute a passenger flow prediction method. This method includes acquiring multi-source heterogeneous data from the rail transit network, including historical passenger flow data, network topology data, and environmental impact data. The multi-source heterogeneous data is input into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0076] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0077] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the passenger flow prediction method provided by the above methods, the method including: acquiring multi-source heterogeneous data of the rail transit network, the multi-source heterogeneous data including historical passenger flow data, network topology data and environmental impact data; The multi-source heterogeneous data is input into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0078] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the passenger flow prediction method provided by the above methods, the method comprising: acquiring multi-source heterogeneous data of a rail transit network, the multi-source heterogeneous data including historical passenger flow data, network topology data, and environmental impact data; The multi-source heterogeneous data is input into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
[0079] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units 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. Those skilled in the art can understand and implement this without any creative effort.
[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A passenger flow prediction method, characterized in that, include: Acquire multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data, and environmental impact data; The multi-source heterogeneous data is input into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on the multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data. The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
2. The passenger flow prediction method according to claim 1, characterized in that, The time module includes a Prophet module and a Long Short-Term Memory (LSTM) layer. Based on the time module, time-series passenger flow features are extracted from historical passenger flow data to obtain a time-series passenger flow feature vector, including: Based on the historical passenger flow data, a historical passenger flow time series is constructed; The historical passenger flow time series is decomposed based on the Prophet module to obtain a macro forecast component that includes trend, seasonality and holiday effects, and the residual series between the macro forecast component and the historical passenger flow time series is calculated. The residual sequence is input into the LSTM layer to extract the nonlinear temporal dependencies in the residual sequence, thereby obtaining the nonlinear dynamic components of the historical passenger flow data. The time-series passenger flow feature vector is obtained by fusing the macroscopic prediction component and the nonlinear dynamic component.
3. The passenger flow prediction method according to claim 1, characterized in that, Based on the aforementioned spatial module, spatial features are extracted from the network topology data to obtain a spatial feature vector, including: Based on the stations in the network topology data as nodes and the lines in the network topology data as edges, a topology graph of the rail transit network is constructed. For each node in the topology graph, the importance score of neighboring nodes relative to the current node is determined based on an attention mechanism; Based on the importance score, the information of each node's neighboring nodes is weighted and summed to obtain a spatial feature vector containing network spatial dependencies.
4. The passenger flow prediction method according to claim 1, characterized in that, Based on the environmental module, environmental impact features are extracted from the environmental impact data to obtain an environmental impact feature vector, including: Based on a fully connected neural network layer, the mapping relationship between each influencing factor and passenger flow changes in the environmental impact data is extracted; Based on the mapping relationship, an environmental impact feature vector is constructed.
5. The passenger flow prediction method according to claim 1, characterized in that, The process of fusing the temporal passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and then predicting passenger flow based on the resulting fused feature vector, includes: Based on preset weights, the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector are weighted and fused to obtain fused features; Passenger flow prediction is performed based on the fusion features to determine the passenger flow prediction results.
6. The passenger flow prediction method according to claim 5, characterized in that, After obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Obtain real-time passenger flow data of the rail transit network; The real-time passenger flow data is compared with the passenger flow data in the passenger flow prediction results. If the comparison error is greater than the preset error threshold, the preset weight is adjusted.
7. The passenger flow prediction method according to claim 1, characterized in that, After obtaining the passenger flow prediction result output by the spatiotemporal hybrid prediction model, the method further includes: Based on the passenger flow forecast results, a heat map of the rail transit network is constructed; Based on the heat map, information on vehicle departure frequency adjustments and passenger flow management for the rail transit network is determined.
8. A passenger flow prediction device, characterized in that, include: The data acquisition module is used to acquire multi-source heterogeneous data of the rail transit network, including historical passenger flow data, network topology data, and environmental impact data. The prediction module is used to input the multi-source heterogeneous data into the spatiotemporal hybrid prediction model to obtain the passenger flow prediction result output by the spatiotemporal hybrid prediction model; the spatiotemporal hybrid prediction model is trained based on multi-source heterogeneous sample data and the passenger flow labels of the multi-source heterogeneous sample data; The spatiotemporal hybrid prediction model includes a time module, a spatial module, an environmental module, and an output module. The time module is used to extract time-series passenger flow features from historical passenger flow data to obtain a time-series passenger flow feature vector. The spatial module is used to extract spatial features from network topology data to obtain a spatial feature vector. The environmental module is used to extract environmental impact features from environmental impact data to obtain an environmental impact feature vector. The output module is used to fuse the time-series passenger flow feature vector, the spatial feature vector, and the environmental impact feature vector, and determine the passenger flow prediction result based on the obtained fused feature vector.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the passenger flow prediction method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the passenger flow prediction method as described in any one of claims 1 to 7.