Urban rail transit passenger flow prediction method based on multi-modal information fusion
By integrating urban points of interest and social media information, and utilizing a multi-head cross-attention model and LSTM network, the problem of poor cross-modal adaptability in urban rail transit passenger flow forecasting in existing technologies is solved, achieving more accurate passenger flow forecasting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2023-09-13
- Publication Date
- 2026-05-05
AI Technical Summary
Existing urban rail transit passenger flow prediction methods are not effective in cross-modal and cross-domain transfer learning, and have poor adaptability to nonlinear and non-stationary data. Multimodal information fusion has not been effectively utilized, resulting in insufficient prediction accuracy and robustness.
By integrating urban point of interest features, rail transit station features, and social media text features, and utilizing a multi-head cross-attention model and LSTM network for information fusion and prediction, a passenger flow prediction method based on multimodal information is constructed, including point of interest feature extraction, station correlation calculation, social media text analysis, and passenger flow feature extraction.
It improves the accuracy and robustness of urban rail transit passenger flow forecasting, enabling it to better characterize public travel preferences and predict passenger flow changes.
Smart Images

Figure CN117112931B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of urban rail transit passenger flow technology, and more specifically, relates to an urban rail transit passenger flow prediction method based on multimodal information fusion. Background Technology
[0002] Traffic flow forecasting is a crucial issue in the transportation sector. It helps transportation management departments better plan and allocate transportation resources, improve traffic efficiency, and enhance the service level of the transportation system. With rapid economic growth and the urgent needs of urban development, many cities have undertaken large-scale urban rail transit construction. Accurately forecasting passenger flow for urban rail transit has become a critical issue for rail transit management. Forecasting helps transportation managers predict future passenger volume, thereby adjusting capacity and optimizing train schedules to meet passenger travel demands. It also provides a basis for future rail transit line and station layouts, continuously improving the service level of the transportation system.
[0003] Most current mainstream rail transit traffic flow prediction methods are based on historical traffic flow data, employing time series analysis, machine learning, and deep learning methods, combined with other relevant spatiotemporal data such as weather, time, and holidays, to model and predict traffic flow. However, time series analysis methods have low accuracy and robustness, and are poorly adapted to nonlinear and non-stationary data. Machine learning and deep learning methods require large amounts of historical data for training, demanding high data quality and quantity, and necessitate feature engineering for different modalities and scenarios. Furthermore, effective solutions for cross-modal and cross-domain transfer learning related to rail transit remain unsolved.
[0004] With the diversification of information collection channels in the transportation sector, a multimodal information database composed of data, text, images, and videos has been formed. Using this multimodal information collectively for traffic flow prediction can improve the accuracy and robustness of forecasts. Existing multimodal information related to urban rail transit includes public travel card swipe information, passenger location information, route and station distribution information, vehicle operation information, and also urban environmental information and social media information closely related to rail transit. Due to the different sources of information, some of this information is textual, some is numerical, and some is graphical or image-based, forming a multimodal, cross-domain hybrid information. This multimodal, cross-domain information describes people's travel intentions, attitudes, and behaviors from different angles, methods, and dimensions. However, how to integrate and analyze this information to accurately and reliably predict urban rail transit passenger flow requires further research. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for predicting urban rail transit passenger flow based on multimodal information fusion. This method integrates urban point of interest features and text features from social media to predict urban rail transit passenger flow, thereby improving prediction accuracy.
[0006] To achieve the above-mentioned objectives, the urban rail transit passenger flow prediction method based on multimodal information fusion of the present invention includes the following steps:
[0007] S1: Obtain city point of interest (POI) data, including the name, category, coordinates, and area of each POI. Encode the name and category of each POI to obtain a name vector and a category vector, respectively. Normalize the coordinate vector and area of each POI. Then concatenate the name vector, category vector, normalized coordinate vector, and normalized area of each POI to obtain its feature vector. Let D be the number of POIs in the city, and s be the feature vector of the d-th POI. d d = 1, 2, ..., D;
[0008] S2: Obtain the feature vectors of rail transit stations, including the following steps:
[0009] S2.1: Obtain the Station information for each rail transit station. n The location data includes station number, geographic coordinates, line code, distance to the previous station and distance to the next station, n = 1, 2, ..., N, where N represents the number of rail transit stations; then, an undirected graph of rail transit is built based on the location data of each station. The specific method is as follows: each station is treated as a node, and the edges between stations are determined according to the connection relationship between stations. The weight of the edge between adjacent stations is the travel time of the train between the two adjacent stations.
[0010] S2.2: For each Point of Interest (POI) d Calculate the geographical distance between the station and each rail transit station, then select the K1 nearest geographical neighbors, where the value of K1 is set according to the actual situation; obtain the public's data from each nearest geographical neighbor station. nk To Point of Interest (POI) d Required travel time (time(n)) k ,d),n k This represents the original index of the k-th geographic nearest neighbor station, where k = 1, 2, ..., K1;
[0011] For each other station n′ ,n′=1,2,…,N,n′≠n k Calculate its relationship with each geographic nearest neighbor station in the undirected graph of rail transit. nkThe weight of each path and the sum of its components constitute the travel time of that path. If a station is connected to a geographically nearest station (Station)... nk If there is no path between them, the journey time is infinite; then for the station... n′ The minimum trip duration is selected from all trip durations, and the index of the geographical nearest neighbor station is denoted as n. k* The corresponding trip duration is denoted as time(n,n). k* ); calculate the station n′ To Point of Interest (POI) d The journey duration time(n′,d) = time(n,n) k* )+time(n k* The correlation degree r(n′,d) = 1 / time(n′,d);
[0012] S2.3: For each Point of Interest (POI) d Select the top K2 rail transit stations with the shortest travel time as Points of Interest (POIs). d The nearest neighbor station on the itinerary; the value of K2 is set according to the actual situation.
[0013] S2.4: For each rail transit station n Get the station n The set of points of interest as the nearest neighbor stations on the itinerary ω n , set of interest points ω n The feature vectors of each interest point are concatenated, and then the concatenated feature vectors are aligned to a preset dimension γ1 through orthogonal mapping to obtain the feature vector S. n , set of interest points ω n Points of Interest and Stations in China n The correlation degree is used to construct a correlation degree vector, and then the correlation degree vector is aligned to a preset dimension γ2 through orthogonal mapping to obtain the feature vector R. n Thus, a Station is formed. n eigenvectors G n =[Line n ,Num n ,S n ,R n ], where Line n Station indicates rail transit station n Line number, Num n Station indicates rail transit station n The site number;
[0014] S3: Extract public travel city point of interest features from social media text, including the following steps:
[0015] S3.1: Set the keywords and time period duration according to actual needs, crawl several sets of text information from social media, each set of text information contains T consecutive time periods of text information, including user-posted content, comments and tags, and use a preset preprocessing method to preprocess each set of text information to obtain text data;
[0016] S3.2: Extract the topic for each text data collected in step S3.1, filter out the text data of the transportation and travel topic, and delete the text data of the other topics;
[0017] S3.3: For each group of text data filtered by the theme of transportation, integrate the text data into a merged text data according to the time period, and form a text data sequence by combining the merged text data of T time periods.
[0018] S3.4: Mine travel interest content features from each merged text dataset and perform sentiment feature analysis, then construct a travel interest feature matrix, including the following steps:
[0019] S3.4.1: For each merged text data in each text data sequence, the CBoW model is used to extract several central words w from the merged text data. i Word vector f(w) i )=[t i,1 t i,2 …t i,H ], i = 1, 2, ..., M, where M represents the number of central words in the text data and H represents the dimension of the word vector;
[0020] S3.4.2: For each merged text data in each text data sequence, for each center word, the word vector f(w) i Emotional characteristic analysis was performed to obtain its emotional polarity e. i When the sentiment feature analysis result is positive, then the sentiment polarity e i =1; when the sentiment feature analysis result is neutral, then the sentiment polarity e i =0; when the sentiment characteristic analysis result is negative, then the sentiment polarity e i =-1;
[0021] S3.4.3: For each merged text data in each text data sequence, combine the word vector and sentiment polarity of each central word to obtain the feature vector f. i =[t i,1 t i,2 …t i,H e iThen, for each feature vector f i As row vectors, we construct a travel interest feature matrix F′ of size M×(H+1);
[0022] S3.5: Based on the feature vector s of the interest points d As row vectors, construct an interest point feature matrix S of size D×J, where J represents the interest point feature vector s. d The dimension is then used to transform the travel interest feature matrix F′ of each merged text data into the vector space of the interest point feature matrix S, thus obtaining the transformed travel interest feature matrix F;
[0023] S3.6: For each merged text data in each text data sequence, calculate the Pearson correlation coefficient PCC(F,S) between the travel interest feature matrix F and the interest point feature matrix S;
[0024] S3.7: For each merged text data in each text data sequence, expand the travel interest feature matrix F into a vector. Expand the interest point feature matrix S into a vector. Then, the public travel interest feature vector of each merged text data is obtained by concatenation. This leads to the public travel interest feature sequence corresponding to the text data sequence;
[0025] S4: Set up the rail transit stations to be predicted according to actual needs. For each text data sequence, count the passenger flow data of the station in the time period corresponding to each merged text data and the next time period of the text data sequence, and extract the passenger flow feature vector.
[0026] S5: Construct a passenger flow prediction model, including a multi-head cross-attention model and an LSTM network, where:
[0027] The multi-head cross-attention model is used to fuse the station feature vector, public travel interest feature vector, and passenger flow feature vector of the corresponding time period of the rail transit station to be predicted, and then input the fused feature vector sequence composed of T fused feature vectors obtained from the text data sequence into the LSTM network.
[0028] The LSTM network is used to extract features from the received fused feature vector sequence and predict the passenger flow feature vector for the next time period.
[0029] The public travel interest feature vector of the merged text data obtained in step S3 is combined with the station feature vector of the rail transit station to be predicted and the passenger flow feature vector of the corresponding time period as input. The passenger flow feature vector of the station in the next time period of the text data sequence is used as the label to train the passenger flow prediction model and obtain the trained passenger flow prediction model.
[0030] S6: For the rail transit station to be predicted, crawl the text information of social media in the most recent T time periods, extract the passenger flow feature vector sequence according to the same method in step S3, and then combine the station feature vector of the rail transit station to be predicted with the passenger flow feature vector of the corresponding time period, and input it into the passenger flow prediction model trained in step S5 to obtain the predicted passenger flow feature vector for the next time period.
[0031] This invention presents a method for predicting urban rail transit passenger flow based on multimodal information fusion. First, feature vectors of urban points of interest are obtained. Then, a directed graph of rail transit stations and the positional relationship between rail transit stations and points of interest are constructed to extract feature vectors of rail transit stations. Social media texts from various time periods are crawled to extract public travel interest feature vectors. Then, the public travel interest feature vectors, rail transit station feature vectors, and historical passenger flow feature vectors are fused based on a multi-head cross-attention model. Finally, the LTSM network is used to predict the passenger flow feature vector for the next time period.
[0032] The present invention has the following beneficial effects:
[0033] 1) The present invention obtains station information based on urban point of interest information mining, which can better represent the public's tendency to choose stations when traveling and is more conducive to the accuracy of passenger flow prediction.
[0034] 2) When extracting public travel interest features, this invention combines urban point of interest information and social media text information, which can better extract public travel interests;
[0035] 3) This invention improves the accuracy of prediction by integrating public travel interest characteristics and rail transit station characteristics to predict urban rail transit passenger flow. Attached Figure Description
[0036] Figure 1 This is a structural diagram illustrating a specific implementation of the urban rail transit passenger flow prediction method based on multimodal information fusion according to the present invention.
[0037] Figure 2 This is a flowchart of the process for obtaining feature vectors of rail transit stations in this invention;
[0038] Figure 3 This is a flowchart of obtaining public travel training samples in this invention;
[0039] Figure 4 This is a flowchart of the topic extraction process in this embodiment;
[0040] Figure 5 This is a flowchart of the process for extracting travel interest feature vectors in this invention. Detailed Implementation
[0041] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0042] Example
[0043] Figure 1 This is a structural diagram illustrating a specific implementation of the urban rail transit passenger flow prediction method based on multimodal information fusion according to the present invention. Figure 1 As shown, the specific steps of the urban rail transit passenger flow prediction method based on multimodal information fusion of the present invention are as follows:
[0044] S101: Obtain the feature vector of interest points:
[0045] The system acquires city point of interest (POI) data, including the POI's name, category, coordinates, and area. The POI classification can be set according to actual conditions; in this embodiment, the POI classification is based on the existing 231 secondary industry categories. In this embodiment, the POI area is calculated using the Reverse Address Resolution (ROR) API. Based on the coordinates of the current POI, a list of surrounding POIs is obtained. Then, the area calculation API is used to calculate the area occupied by the current POI based on the coordinates in the returned POI list.
[0046] The names and categories of points of interest (POIs) are encoded separately to obtain name vectors and category vectors. The coordinate vectors and areas of POIs are normalized. Then, the name vector, category vector, normalized coordinate vector, and normalized area of each POI are concatenated to obtain its feature vector. Let D be the number of POIs in the city, and s be the feature vector of the d-th POI. d , d=1,2,…,D.
[0047] In this embodiment, the names and categories of points of interest are encoded using the bag-of-words (BOW) model, assuming the following four points of interest:
[0048] -POI1: Name: Plaza, Category: Attraction, Coordinates: (39.9087, 116.3975), Area: 440,000
[0049] -POI2: Name: Museum, Category: Museum, Coordinates: (39.9163, 116.3971), Area: 720,000
[0050] -POI3: Name: North Railway Station, Category: Railway Station, Coordinates: (39.9049, 116.4273), Area: 25000
[0051] -POI4: Name: Zoo, Category: Zoo, Coordinates: (39.9386, 116.3390), Area: 890000
[0052] The name and category of the POI are encoded into a sparse vector using the bag-of-words (BoW) model:
[0053] -POI1: Name vector: [1,1,0,0,0,0,0], Category vector: [1,0,0,0]
[0054] -POI2: Name vector: [0,0,1,1,0,0,0], Category vector: [0,1,0,0]
[0055] -POI3: Name vector: [0,0,0,0,1,1,0], Category vector: [0,0,1,0]
[0056] -POI4: Name vector: [0,0,0,0,1,0,1], Category vector: [0,0,0,1]
[0057] Next, the coordinate vector and area of the POI need to be normalized and concatenated to the end of the name vector and category vector to obtain the feature vector of the POI.
[0058] S102: Obtain the feature vector of rail transit stations:
[0059] There is a certain correlation between rail transit stations and urban points of interest (POIs). Passengers entering and exiting a rail transit station may have visited or are heading to certain POIs. Therefore, this invention constructs feature vectors for rail transit stations based on the correlation between them. The correlation is calculated by measuring the distance between the station and surrounding POIs. Smaller distances indicate a closer correlation, suggesting the passenger's interest likely lies in these POIs; larger distances indicate a looser correlation. Figure 2 This is a flowchart illustrating the process of obtaining feature vectors for rail transit stations in this invention. For example... Figure 2 As shown, the specific steps for obtaining the feature vector of a rail transit station in this invention include:
[0060] S201: Constructing an undirected graph model for rail transit:
[0061] First, obtain the station information for each rail transit station. nThe location data includes station number, geographic coordinates, line code, distance to the previous station, and distance to the next station, n = 1, 2, ..., N, where N represents the number of rail transit stations. Then, an undirected graph of the rail transit system is constructed based on the location data of each station. Specifically, each station is treated as a node, and the edges between stations are determined according to their connectivity. The weight of the edge between adjacent stations is the travel time of the train between those two adjacent stations.
[0062] S202: Calculate travel parameters between points of interest and stations:
[0063] The locations of urban points of interest and rail transit networks remain fixed within a certain period of time. Therefore, distance can be calculated using location coordinates to obtain the nearest neighbor stations of the points of interest. The specific method is as follows:
[0064] For each Point of Interest (POI) d The system calculates the geographical distance between the point of interest and each rail transit station, and then selects the K1 nearest neighbor stations. The value of K1 is set according to the actual situation. Generally, for points of interest within the urban area, these K1 nearest neighbor stations are stations that can be reached by walking or cycling. The system then retrieves information from the public at each nearest neighbor station. To Point of Interest (POI) d Required travel time (time(n)) k ,d),n k Let k represent the original index of the k-th geographic nearest neighbor station, where k = 1, 2, ..., K1. In calculating time(n... k The value of ,d) can be obtained through statistics or by setting a reasonable speed.
[0065] Then for each other Station n′ ,n′=1,2,…,N,n′≠n k Calculate its relationship with each geographic nearest neighbor station in the undirected graph of rail transit. The weight of each path and the sum of its edges constitute the travel time of that path. If a station is connected to a geographically nearest neighbor station... If no path exists between them, the travel time is infinite. Then, for the station... n′ The minimum trip duration is selected from all trip durations, and the index of the geographical nearest neighbor station is denoted as n. k* The corresponding trip duration is denoted as time(n,n). k* ). Calculate the station n′ To Point of Interest (POI) d The journey duration time(n′,d) = time(n,n) k* )+time(nk* ,d), the correlation degree r(n′,d)=1 / time(n′,d).
[0066] S203: Filter matching sites:
[0067] For each Point of Interest (POI) d Select the top K2 rail transit stations with the shortest travel time as Points of Interest (POIs). d The nearest neighbor station for the journey, the value of K2 is set according to the actual situation.
[0068] S204: Constructing Site Feature Vectors:
[0069] For each rail transit station n Get the station n The set of points of interest as the nearest neighbor stations on the itinerary ω n , set of interest points ω n The feature vectors of each interest point are concatenated, and then the concatenated feature vectors are aligned to a preset dimension γ1 through orthogonal mapping to obtain the feature vector S. n , set of interest points ω n Points of Interest and Stations in China n The correlation degree is used to construct a correlation degree vector, and then the correlation degree vector is aligned to a preset dimension γ2 through orthogonal mapping to obtain the feature vector R. n Thus, a Station is formed. n eigenvectors G n =[Line n ,Num n ,S n ,R n ], where Line n Station indicates rail transit station n Line number, Num n Station indicates rail transit station n The site number.
[0070] S103: Extracting public travel interest characteristics:
[0071] To more accurately predict passenger flow at rail transit stations, this invention also extracts public travel city point of interest features from social media text. Figure 3 This is a flowchart illustrating the process of obtaining public travel training samples in this invention. For example... Figure 3 As shown, the specific steps for obtaining public travel training samples in this invention include:
[0072] S301: Obtain social media text data:
[0073] Based on actual needs, set keywords and time periods, crawl several sets of text information from social media, each set of text information contains T consecutive time periods of text information, including user-posted content, comments and tags, and use a preset preprocessing method to preprocess each set of text information to obtain text data.
[0074] This embodiment employs a web crawler to extract text information from social media. Specifically, the crawler browses websites, accesses public pages on social media platforms, and retrieves raw text information such as users, posts, and comments using pre-defined keywords. In this embodiment, the keyword list includes popular events (e.g., coffee festivals), holidays (May Day), and concert names (e.g., a concert). For social media platforms that provide APIs, text information can be obtained via the API. The text information is then preprocessed. In this embodiment, preprocessing operations include cleaning, word segmentation, and stop word removal. Generally, each piece of raw social media text information includes the posting time, body, and location. Cleaning aims to remove stop words, punctuation marks, and irrelevant numbers that do not affect semantics. Word segmentation transforms a continuous text sequence into a discrete word sequence. A self-constructed stop word list is used for stop word processing. This list is based on a general word list with added manually annotated stop words. Manual stop word annotation is targeted at posts and comments related to road traffic. Regular expressions are used to remove punctuation marks and other information. Use the precise mode in the jieba word segmentation tool for word segmentation processing.
[0075] S302: Filter text data related to transportation and travel:
[0076] For each text data collected in step S301, extract the topic, filter out the text data of the transportation and travel topic, and delete the text data of the other topics.
[0077] The topic extraction of text data can be carried out by selecting an appropriate topic extraction method according to actual needs. In this embodiment, the topic extraction method based on the LDA model is adopted. Figure 4 This is a flowchart for extracting the topic in this embodiment. For example... Figure 4 As shown, the specific steps for extracting the subject matter in this invention include:
[0078] S401: Establish the bag-of-words model:
[0079] The word frequency vector corresponding to each text data obtained in step S301 is obtained based on the bag-of-words model (BOW), and then the word frequency vectors of the text data are used as row vectors to form a word frequency matrix.
[0080] S402: Training the bag-of-words model:
[0081] The bag-of-words model is trained using the Latent Dirichlet Allocation (LDA) model. Then, topic-word probability matrices and document-topic probability matrices are generated from the trained bag-of-words model. The topic-word probability matrix describes the probability of each word appearing in each topic category, also known as a weight. It is obtained by dividing the frequency of feature words by the total number of words in that topic category. The top few keywords with the highest weights are selected to generate the topic-word distribution matrix. The document-topic probability matrix describes the probability of each topic appearing in each document. By calculating the probability of each document relative to each topic category, a higher probability indicates a greater relevance between the document and that topic category.
[0082] S403: Identifying Transportation Themes
[0083] Using the generated topic-word probability matrix and document-topic probability matrix, the topics of the text data are extracted. If the topic matches a pre-defined transportation category topic, the text data is retained; otherwise, it is deleted.
[0084] S303: Obtain text data sequences related to transportation and travel:
[0085] For each group of text data filtered by the theme of transportation, the text data is integrated into a merged text data according to the time period, and the merged text data of T time periods are used to form a text data sequence.
[0086] S304: Extract the travel interest feature matrix:
[0087] In order to extract users' travel interest features, this invention mines travel interest content features from each merged text data and performs sentiment feature analysis, and then constructs a travel interest feature matrix. Figure 5 This is a flowchart illustrating the extraction of travel interest feature vectors in this invention. For example... Figure 5 As shown, the specific steps for extracting travel interest feature vectors in this invention include:
[0088] S501: Obtain the word vector of the center word:
[0089] For each merged text data in each text data sequence, a continuous bag-of-words model is used to extract several central words w from the merged text data. i Word vector f(w) i )=[t i,1 t i,2 …t i,HLet i = 1, 2, ..., M, where M represents the number of central words in the text data and H represents the dimension of the word vectors. Each central word in the text data represents a user's travel interest, and the word vector of that central word can be regarded as the feature vector of the user's travel interest.
[0090] The CBoW (Continuous Bag-of-Words) model predicts the target word using the words in the context. Its input is a fixed-size window, where the context word vectors are averaged and summed into a single context vector. The output of CBoW is the vector of the predicted center word, calculated by minimizing the distance between the center word vector and the predicted vector. This embodiment uses the softmax function as the distance metric. The purpose of using the softmax function is to convert each element in the predicted vector into the probability of the word it represents appearing in the context. Since the goal of the CBoW method is to minimize the distance between the center word vector and the predicted vector, an appropriate loss function needs to be chosen; in this embodiment, the cross-entropy function is used. The specific steps of the CBoW method are as follows:
[0091] (1) Data preparation: Create a corpus according to actual needs;
[0092] (2) Generate training data: construct a word vocabulary, one-hot encoding of words, and word index.
[0093] (3) Training the model: One-hot encoding is passed through forward propagation, the error is evaluated by calculating the loss function, and the weight matrix is adjusted through backpropagation.
[0094] (4) Output: Use the trained model to generate word vectors and find similar words.
[0095] S502: Sentiment Feature Analysis:
[0096] For each merged text data in each text data sequence, for the word vector f(w) of each center word... i Emotional characteristic analysis was performed to obtain its emotional polarity e. i When the sentiment feature analysis result is positive, then the sentiment polarity e i =1; when the sentiment feature analysis result is neutral, then the sentiment polarity e i =0; when the sentiment characteristic analysis result is negative, then the sentiment polarity e i =-1.
[0097] In this embodiment, the Term Frequency-Inverse Document Frequency (TF-IDF) formula is used for sentiment feature analysis. The specific calculation formula is as follows:
[0098] TF-IDF(f(w i),d)=TF(f(w i ),d)×IDF(f(w i ),d)
[0099]
[0100] Among them, TF(f(w) i ),d) represents the word vector f(w) i The frequency of occurrence of ) in text data d, IDF(f(w) i ),d) represents the word vector f(w) i The inverse document frequency in text data d.
[0101] S503: Constructing a travel interest feature matrix:
[0102] For each merged text data in each text data sequence, the word vector and sentiment polarity of each center word are combined to obtain the feature vector f. i =[t i,1 t i,2 …t i,H e i Then, for each feature vector f i As row vectors, we construct a travel interest feature matrix F′ of size M×(H+1).
[0103] S305: Obtain the feature vector of travel interest points:
[0104] In order to associate public travel interests with actual urban rail transit stations, this invention first identifies which urban points of interest are consistent with or closely related to the public's travel interests, thereby obtaining travel interest feature vectors and establishing a connection between public travel interests and urban rail transit stations.
[0105] Since travel interest feature vectors and city point of interest feature vectors may have two different dimensions, it is necessary to map the vector spaces to a common vector space. This invention uses orthogonal mapping for vector alignment, mapping one vector space to another, so that the mapped vectors retain their length and angle. The specific method is as follows:
[0106] Based on the feature vector s of interest points d As row vectors, construct an interest point feature matrix S of size D×J, where J represents the interest point feature vector s. d The dimension is then used to transform the travel interest feature matrix F′ of each merged text data into the vector space of the interest point feature matrix S, thus obtaining the transformed travel interest feature matrix F.
[0107] S306: Calculate the correlation coefficient:
[0108] For each merged text data in each text data sequence, calculate the Pearson correlation coefficient PCC(F,S) between the travel interest feature matrix F and the interest point feature matrix S.
[0109] S307: Constructing a sequence of public travel interest features:
[0110] For each merged text data in each text data sequence, the travel interest feature matrix F is expanded into a vector. Expand the interest point feature matrix S into a vector. Then, the public travel interest feature vector of each merged text data is obtained by concatenation. This leads to the public travel interest feature sequence corresponding to the text data sequence.
[0111] S104: Statistical Passenger Flow Feature Vector
[0112] Set up the rail transit stations to be predicted according to actual needs. For each text data sequence, count the passenger flow data of the station in the corresponding time period and the next time period of each merged text data sequence, and extract the passenger flow feature vector.
[0113] In this embodiment, to more accurately predict passenger flow, passenger flow characteristics include three categories: time characteristics (hour, weekday, season, year), and entry / exit characteristics (entry passenger volume, exit passenger volume). The statistical features are the entry passenger flow statistics and the exit passenger flow statistics, with the statistical features including average, maximum, minimum, and variance. Therefore, in this embodiment, the passenger flow feature vector = [hour, weekday, season, year, average entry passenger volume, maximum entry passenger volume, minimum entry passenger volume, variance of entry passenger volume, average exit passenger volume, maximum exit passenger volume, minimum exit passenger volume, variance of entry passenger volume].
[0114] S105: Construct and train the passenger flow prediction model:
[0115] Construct a passenger flow prediction model, including a multi-head cross-attention model and an LSTM network, wherein:
[0116] The Multi-Head Cross Attention Model (MTA) fuses the station feature vector, public travel interest feature vector, and passenger flow feature vector for the corresponding time period of a rail transit station to obtain a fused feature vector. This fused feature vector sequence, consisting of T fused feature vectors obtained from the text data sequence, is then input into an LSTM network. The MTA uses multiple sub-attention mechanisms to calculate the correlation between features of different modalities and assigns weights based on this correlation, thereby achieving feature selection and fusion to extract new features. The MTA is a commonly used attention model; its specific principles and working process will not be elaborated upon here.
[0117] LSTM (Long Short Term Memory) networks are used to extract features from a received fused feature vector sequence and predict passenger flow feature vectors for the next time period. LSTM is a commonly used neural network, and its specific principles and working process will not be elaborated here.
[0118] The public travel interest feature vector of the merged text data obtained in step S103 is combined with the station feature vector of the rail transit station to be predicted and the passenger flow feature vector of the corresponding time period as input. The passenger flow feature vector of the station in the next time period of the text data sequence is used as the label to train the passenger flow prediction model and obtain the trained passenger flow prediction model.
[0119] S106: Passenger Flow Forecast:
[0120] For the rail transit station to be predicted, crawl the text information of social media in the most recent T time periods, extract the passenger flow feature vector sequence according to the same method in step S103, and then combine the station feature vector of the rail transit station to be predicted with the passenger flow feature vector of the corresponding time period, and input it into the passenger flow prediction model trained in step S105 to obtain the predicted passenger flow feature vector for the next time period.
[0121] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the 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 invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A method for predicting urban rail transit passenger flow based on multimodal information fusion, characterized in that, Includes the following steps: S1: Obtain city point of interest (POI) data, including the name, category, coordinates, and area of each POI. Encode the name and category of each POI to obtain a name vector and a category vector, respectively. Normalize the coordinate vector and area of each POI. Then concatenate the name vector, category vector, normalized coordinate vector, and normalized area of each POI to obtain its feature vector. Let D be the number of POIs in the city, and s be the feature vector of the d-th POI. d d = 1, 2, ..., D; S2: Obtain the feature vectors of rail transit stations, including the following steps: S2.1: Obtain the Station information for each rail transit station. n The location data includes station number, geographic coordinates, line code, distance to the previous station and distance to the next station, n = 1, 2, ..., N, where N represents the number of rail transit stations; then, an undirected graph of rail transit is built based on the location data of each station. The specific method is as follows: each station is treated as a node, and the edges between stations are determined according to the connection relationship between stations. The weight of the edge between adjacent stations is the travel time of the train between the two adjacent stations. S2.2: For each Point of Interest (POI) d Calculate the geographical distance between the station and each rail transit station, then select the K1 nearest geographical neighbors, where the value of K1 is set according to the actual situation; obtain public information from each nearest geographical neighbor station. To Point of Interest (POI) d Required travel time (time(n)) k ,d),n k This represents the original index of the k-th geographic nearest neighbor station, where k = 1, 2, ..., K1; For each other station n′ ,n′=1,2,…,N,n′≠n k Calculate its relationship with each geographic nearest neighbor station in the undirected graph of rail transit. The weight of each path and the sum of its edges constitute the travel time of that path. If a station is connected to a geographically nearest neighbor station... If there is no path between them, the travel time is infinite; then for each station... Filter out the minimum trip duration and denote the index of the geographically nearest neighbor station as follows: The corresponding trip duration is recorded as Calculate the station n′ To Point of Interest (POI) d Trip duration The correlation degree r(n′,d) = 1 / time(n′,d); S2.3: For each Point of Interest (POI) d Select the top K2 rail transit stations with the shortest travel time as Points of Interest (POIs). d The nearest neighbor station on the itinerary; the value of K2 is set according to the actual situation. S2.4: For each rail transit station n Get the station n The set of points of interest as the nearest neighbor stations on the itinerary ω n , set of interest points ω n The feature vectors of each interest point are concatenated, and then the concatenated feature vectors are aligned to a preset dimension γ1 through orthogonal mapping to obtain the feature vector S. n , set of interest points ω n Points of Interest and Stations in China n The correlation degree is used to construct a correlation degree vector, and then the correlation degree vector is aligned to a preset dimension γ2 through orthogonal mapping to obtain the feature vector R. n Thus, a Station is formed. n eigenvectors G n =[Line n ,Num n ,S n ,R n ], where Line n Station indicates rail transit station n Line number, Num n Station indicates rail transit station n The site number; S3: Extract public travel city point of interest features from social media text, including the following steps: S3.1: Set the keywords and time period duration according to actual needs, crawl several sets of text information from social media, each set of text information contains T consecutive time periods of text information, including user-posted content, comments and tags, and use a preset preprocessing method to preprocess each set of text information to obtain text data; S3.2: Extract the topic for each text data collected in step S3.1, filter out the text data of the transportation and travel topic, and delete the text data of the other topics; S3.3: For each group of text data filtered by the theme of transportation, integrate the text data into a merged text data according to the time period, and form a text data sequence by combining the merged text data of T time periods. S3.4: Mine travel interest content features from each merged text dataset and perform sentiment feature analysis, then construct a travel interest feature matrix, including the following steps: S3.4.1: For each merged text data in each text data sequence, the CBoW model is used to extract several central words w from the merged text data. i Word vector f(w) i )=[t i,1 t i,2 … t i,H ], i = 1, 2, ..., M, where M represents the number of central words in the text data and H represents the dimension of the word vector; S3.4.2: For each merged text data in each text data sequence, for each center word, the word vector f(w) i Emotional characteristic analysis was performed to obtain its emotional polarity e. i When the sentiment feature analysis result is positive, then the sentiment polarity e i =1; when the sentiment feature analysis result is neutral, then the sentiment polarity e i =0; when the sentiment characteristic analysis result is negative, then the sentiment polarity e i =-1; S3.4.3: For each merged text data in each text data sequence, combine the word vector and sentiment polarity of each central word to obtain the feature vector f. i =[t i,1 t i,2 … t i,H e i Then, for each feature vector f i As row vectors, we construct a travel interest feature matrix F′ of size M×(H+1); S3.5: Based on the feature vector s of the interest points d As row vectors, construct an interest point feature matrix S of size D×J, where J represents the interest point feature vector s. d The dimension is then used to transform the travel interest feature matrix F′ of each merged text data into the vector space of the interest point feature matrix S, thus obtaining the transformed travel interest feature matrix F; S3.6: For each merged text data in each text data sequence, calculate the Pearson correlation coefficient PCC(F,S) between the travel interest feature matrix F and the interest point feature matrix S; S3.7: For each merged text data in each text data sequence, expand the travel interest feature matrix F into a vector. Expand the interest point feature matrix S into a vector. Then, the public travel interest feature vector of each merged text data is obtained by concatenation. This leads to the public travel interest feature sequence corresponding to the text data sequence; S4: Set up the rail transit stations to be predicted according to actual needs. For each text data sequence, count the passenger flow data of the station in the time period corresponding to each merged text data and the next time period of the text data sequence, and extract the passenger flow feature vector. S5: Construct a passenger flow prediction model, including a multi-head cross-attention model and an LSTM network, where: The multi-head cross-attention model is used to fuse the station feature vector, public travel interest feature vector, and passenger flow feature vector of the corresponding time period of the rail transit station to be predicted, and then input the fused feature vector sequence composed of T fused feature vectors obtained from the text data sequence into the LSTM network. The LSTM network is used to extract features from the received fused feature vector sequence and predict the passenger flow feature vector for the next time period. The public travel interest feature vector of the merged text data obtained in step S3 is combined with the station feature vector of the rail transit station to be predicted and the passenger flow feature vector of the corresponding time period as input. The passenger flow feature vector of the station in the next time period of the text data sequence is used as the label to train the passenger flow prediction model and obtain the trained passenger flow prediction model. S6: For the rail transit station to be predicted, crawl the text information of social media in the most recent T time periods, extract the passenger flow feature vector sequence according to the same method in step S3, and then combine the station feature vector of the rail transit station to be predicted with the passenger flow feature vector of the corresponding time period, and input it into the passenger flow prediction model trained in step S5 to obtain the predicted passenger flow feature vector for the next time period.
2. The urban rail transit passenger flow prediction method according to claim 1, characterized in that, The specific method for extracting the topic in step S3.2 is as follows: S3.2.1: Based on the bag-of-words model, obtain the word frequency vector corresponding to each text data obtained in step S3.1, and then use the word frequency vectors of the text data as row vectors to form a word frequency matrix; S3.2.2: Use the LDA model to train the bag-of-words model, and then generate the topic-word distribution probability matrix and the document-topic distribution probability matrix from the trained bag-of-words model; S3.2.3: Use the generated topic-word distribution probability matrix and document-topic distribution probability matrix to extract the topics from the text data.
3. The urban rail transit passenger flow prediction method according to claim 1, characterized in that, In step S3.4.2, the sentiment feature analysis is performed using word frequency-inverse document frequency, and the specific calculation formula is as follows: TF-IDF(f(w i ),d)=TF(f(w i ),d)×IDF(f(w i ),d) Among them, TF(f(w) i ),d) represents the word vector f(w) i The frequency of occurrence of ) in text data d, IDF(f(w) i ),d) represents the word vector f(w) i The inverse document frequency in text data d.
4. The urban rail transit passenger flow prediction method according to claim 1, characterized in that, The passenger flow characteristics in step S4 include three types of characteristics: time characteristics (hour, weekday, season, year), and entry / exit characteristics (entry passenger volume, exit passenger volume). The characteristic statistics are entry passenger flow statistics and exit passenger flow statistics. The statistical characteristics include average, maximum, minimum, and variance, respectively. The passenger flow characteristic vector is: [hour, weekday, season, year, average entry passenger volume, maximum entry passenger volume, minimum entry passenger volume, variance of entry passenger volume, average exit passenger volume, maximum exit passenger volume, minimum exit passenger volume, variance of entry passenger volume].
Citation Information
Patent Citations
Urban crowd flow prediction method and system based on regional function enhancement features
CN114862001A
Public traffic flow prediction method combining urban interest points and space-time causal relationship
CN115204478A