A public transportation commuter trip demand analysis method based on space-time features
By analyzing historical travel data of public transport passengers, screening commuter passenger groups and extracting spatiotemporal features, and using a distributed gradient enhancement model to build a prediction model, the problem of inaccurate commuter passenger demand prediction in traditional methods is solved, and accurate demand prediction during peak hours is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2024-12-20
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional historical data analysis methods are insufficient to accurately predict the fluctuating travel demand of commuters in public transportation systems, resulting in a mismatch between capacity and demand and an inability to provide efficient and convenient travel services.
By acquiring historical travel data of public transport passengers, a personal travel behavior dataset is constructed. Commuter passenger groups are screened, and the entropy values of travel time and stations and the similarity of travel chains are analyzed. Travel chain, time and space dimension features are extracted, and a travel demand prediction model is constructed by training a distributed gradient enhancement model.
It improves the accuracy of commuter travel demand forecasting, especially during peak hours, enabling efficient forecasting of commuters' next travel time and origin/destination, with a significant improvement in forecast accuracy.
Smart Images

Figure CN120013118B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of public transportation big data processing technology, and in particular to a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics. Background Technology
[0002] In recent years, urban public transport has faced the severe challenge of a continuous decline in passenger volume. Data shows that between 2012 and 2022, the passenger volume of conventional public transport systems decreased year by year, and the daily passenger capacity per vehicle also decreased significantly. This has resulted in a stark contrast between high capacity investment and low passenger flow efficiency for urban public transport.
[0003] To address this challenge, public transport companies have begun implementing various measures to optimize operational efficiency and service quality. Methods such as optimizing route layout, increasing customized bus services, and adjusting the number and distribution of vehicles have been widely adopted in many large cities. For example, by the end of 2022, City A had optimized 138 bus routes, added 60 stops, and achieved 200-meter connections between all subway stations and bus routes in the city center. While these measures have alleviated operational pressure to some extent, more accurate passenger demand forecasting is still needed to ensure the effective allocation and continuous improvement of public transport resources.
[0004] Currently, demand forecasting in the public transportation sector largely relies on traditional historical data analysis methods, neglecting the spatiotemporal characteristics and travel chain patterns of passenger travel behavior. In particular, the demand of commuters is typically concentrated during morning and evening rush hours, making it difficult for traditional methods to accurately predict these fluctuating demand changes. With the increasing complexity of urban spatial structures and the diversification of travel modes, traditional demand forecasting methods cannot fully meet the capacity scheduling needs of the public transportation system during peak hours. This leads to a mismatch between capacity and demand, failing to provide passengers with efficient and convenient travel services.
[0005] Therefore, existing technologies still need improvement. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics, in order to solve the problem that traditional historical data analysis methods are difficult to accurately predict fluctuating capacity scheduling demand.
[0007] The technical solution adopted by this invention to solve the technical problem is as follows:
[0008] In a first aspect, the present invention provides a method for analyzing the travel demand of public transport commuters based on spatiotemporal characteristics, including:
[0009] Obtain historical travel data of public transport passengers and construct a personal travel behavior dataset;
[0010] Commuter passenger groups are screened based on travel frequency, and travel spatiotemporal patterns are analyzed based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains.
[0011] Based on the aforementioned travel spatiotemporal patterns, extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target;
[0012] A feature matrix is constructed based on the extracted features. The features in the feature matrix are trained using a distributed gradient enhancement model. Based on the trained travel demand prediction model, the travel demand of commuting passengers is predicted and output.
[0013] In one implementation, acquiring historical travel data of public transport passengers and constructing a personal travel behavior dataset includes:
[0014] Obtain information on bus passengers' boarding and alighting stops, boarding times, and alighting times to obtain the historical travel data;
[0015] The personal travel behavior dataset is constructed based on the historical travel data.
[0016] In one implementation, the step of filtering commuter passenger groups based on travel frequency includes:
[0017] Based on the aforementioned personal travel behavior dataset, analyze the daily travel frequency, weekly travel frequency, and frequency of repeated travel chains for the corresponding passengers.
[0018] Based on the daily travel frequency, the weekly travel frequency, and the frequency of repeated travel chains, commuter passengers are screened from the historical travel data of the public transport passengers to determine the commuter passenger group.
[0019] In one implementation, the step of analyzing travel spatiotemporal patterns based on passenger travel time, entropy values of travel stations, and travel chain similarity includes:
[0020] The travel time, entropy value of travel stations, and similarity of travel chains on the same workday are calculated for commuter passengers and non-commuter passengers respectively, and the spatiotemporal patterns of the commuter passengers' travel patterns are obtained by comparison.
[0021] In one implementation, the step of extracting travel chain-dimensional features, time-dimensional features, and spatial-dimensional features related to the prediction target based on the travel spatiotemporal patterns includes:
[0022] Extract OD1 data of the same workday and the same travel order, travel time T1 of the same workday and the same travel order, the highest frequency travel time T2 corresponding to the OD1 data, and the highest frequency travel time OD2 data corresponding to the travel time T1 to obtain the travel chain dimension features.
[0023] Extract the travel time of commuter passengers for their most recent preset trip to obtain the time dimension feature;
[0024] Extract the travel origin-destination (OD) data of the commuter passengers corresponding to the most recent preset trip, and extract the highest frequency OD data corresponding to the historical starting point O that is closest to the destination D of the previous trip for each trip, to obtain the spatial dimension features.
[0025] In one implementation, the step of constructing a feature matrix based on the extracted features, training the features in the feature matrix using a distributed gradient enhancement model, and predicting and outputting the travel demand of commuters based on the trained travel demand prediction model includes:
[0026] The feature matrix is constructed based on the extracted features, and the trip chain dimension features, time dimension features and spatial dimension features in the feature matrix are one-hot encoded.
[0027] The travel demand prediction model is trained based on the distributed gradient enhancement model to obtain the travel chain dimension features, time dimension features and spatial dimension features in the feature matrix.
[0028] The trained travel demand prediction model predicts and outputs the travel demand of commuter passengers.
[0029] In one implementation, training the trip chain dimension features, time dimension features, and spatial dimension features in the feature matrix based on the distributed gradient enhancement model includes:
[0030] The extracted spatiotemporal features are trained based on the distributed gradient enhancement model to construct a travel demand prediction model.
[0031] The travel demand prediction model was validated using the K-fold cross-validation method, and the model parameters were optimized based on the validation results to obtain the trained travel demand prediction model.
[0032] Secondly, the present invention provides a public transportation commuter travel demand analysis system based on spatiotemporal characteristics, comprising:
[0033] The dataset acquisition module is used to acquire historical travel data of public transport passengers and construct a personal travel behavior dataset.
[0034] The travel spatiotemporal pattern analysis module is used to filter commuter passenger groups based on travel frequency and analyze travel spatiotemporal patterns based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains.
[0035] The multi-dimensional feature extraction module is used to extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target based on the travel spatiotemporal patterns.
[0036] The prediction and output module is used to construct a feature matrix based on the extracted features, train the features in the feature matrix using a distributed gradient enhancement model, and predict and output the travel demand of commuter passengers based on the trained travel demand prediction model.
[0037] Thirdly, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, and the public transportation commuter travel demand analysis program based on spatiotemporal characteristics, when executed by the processor, is used to implement the operation of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics as described in the first aspect.
[0038] Fourthly, the present invention also provides a medium, which is a computer-readable storage medium, storing a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, wherein the public transportation commuter travel demand analysis program based on spatiotemporal characteristics, when executed by a processor, is used to implement the operation of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics as described in the first aspect.
[0039] The present invention, by employing the above technical solution, has the following effects:
[0040] This invention analyzes historical travel data of public transportation commuters to determine their spatiotemporal patterns. By extracting features from time, space, and travel chain dimensions, and using the XGBoost algorithm to model these multidimensional features, a machine learning prediction model is constructed. This model can effectively improve the accuracy of demand forecasting and thus accurately predict the travel needs of commuters. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0042] Figure 1 This is a flowchart of the method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics in this invention.
[0043] Figure 2 This is a heatmap showing the similarity of a commuter's weekday travel chain in this invention.
[0044] Figure 3 This is a schematic diagram of the high-frequency travel origin-destination (OD) distribution of a commuter passenger in this invention.
[0045] Figure 4 This is a schematic diagram of the system structure of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics in this invention.
[0046] Figure 5 This is a functional schematic diagram of the terminal in one implementation of the present invention.
[0047] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0049] Exemplary methods
[0050] Current urban public transport system passenger flow forecasting primarily relies on traditional traffic demand models, which typically consider temporal and spatial characteristics. However, these methods fail to fully utilize individual passengers' historical travel data for efficient and accurate forecasting. This is especially true for commuter passenger demand forecasting, as traditional methods often overlook the highly regular and spatiotemporally specific characteristics of their travel behavior, leading to poor forecasting results. Therefore, it is necessary to adopt a novel method for forecasting public transport commuter passenger travel demand based on temporal, spatial, and travel chain characteristics.
[0051] To address the aforementioned technical problems, this invention provides a method for predicting the travel demand of public transport commuters based on time, space, and travel chain characteristics. This method deeply analyzes public transport card swipe data, extracting key factors influencing commuter travel demand from multiple dimensions such as time patterns, spatial matching, and historical travel chains. Finally, it uses machine learning algorithms to accurately predict the future travel behavior of individual commuters.
[0052] This invention first identifies the commuter passenger group, revealing significant temporal and spatial regularities in their travel behavior. Temporally, commuter passengers exhibit greater regularity in their travel times; spatially, their origin-destination stations are more concentrated and stable. Based on these characteristics, this invention comprehensively considers the sequential characteristics of historical travel chains and their correlation with future travel, extracting features from the three dimensions of time, space, and travel chains to establish a data-driven demand forecasting framework. By introducing the XGBoost model (Distributed Gradient Boosting Model), combined with feature engineering optimization and model validation evaluation, this invention effectively improves the accuracy and reliability of predictions, achieving efficient prediction of the next travel time and origin-destination for individual commuters, with a significant improvement in prediction accuracy.
[0053] like Figure 1 As shown, this embodiment of the invention provides a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics, including the following steps:
[0054] Step S100: Obtain historical travel data of bus passengers and construct a personal travel behavior dataset.
[0055] In this embodiment, the first step is to acquire historical travel data containing information such as departure point, destination, and travel time to construct a personal travel behavior dataset. Public transportation systems are a crucial indicator of urban operational efficiency and sustainable development. Especially in urban commuting, the operational efficiency of the public transportation system and the degree to which passenger demand is matched directly impact the optimization of urban traffic management and residents' travel experience. Therefore, accurately acquiring passenger travel behavior data and constructing a reasonable personal travel behavior dataset is essential for further analysis of passengers.
[0056] In this embodiment, smart card swipe data is combined with bus AVL (Automatic Vehicle Location) trajectory data to obtain information such as the passenger's departure point, destination, and travel time. Through the collection and processing of historical travel data, information including boarding and alighting points (OD), boarding time, alighting time, and route is obtained.
[0057] Specifically, in one implementation of this embodiment, step S100 includes the following steps:
[0058] Step S101: Obtain the boarding stop, alighting stop, boarding time, and alighting time information of bus passengers to obtain the historical travel data;
[0059] Step S102: Construct the personal travel behavior dataset based on the historical travel data.
[0060] In this embodiment, data from the bus card reader system is acquired, including information such as the boarding and alighting times, bus numbers, origin and destination stations for each passenger. Through data cleaning and processing, a passenger dataset that meets the requirements of the analysis is obtained.
[0061] As an example, in a practical application scenario, firstly, historical card-swiping data of the public transportation system in City A is obtained, extracting the card-swiping time and corresponding boarding station data for each passenger's ride. Then, by combining this with bus AVL trajectory data, the alighting station and corresponding alighting time information for each trip are obtained. Next, based on the passenger's historical travel records, the OD data pairs (departure and destination) for each trip and their corresponding time information are analyzed to construct a personal travel behavior dataset. Based on each passenger's personal travel behavior dataset, the structural features of the travel chain (continuous travel chains and time series) are extracted for subsequent analysis. Finally, the extracted OD data pairs are matched with geographic information data from a map platform (e.g., data from a certain map service) to calibrate the coordinates and location labels of the departure and destination points, resulting in an accurate personal travel behavior dataset for each passenger.
[0062] like Figure 1 As shown, this embodiment of the invention provides a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics, including the following steps:
[0063] Step S200: Filter commuter passenger groups based on travel frequency, and analyze the spatiotemporal patterns of travel based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains.
[0064] In this embodiment, commuter passenger groups are screened based on travel frequency. Commuting trips are usually characterized by high frequency and strong regularity. By mining the patterns of travel behavior in time and space distribution, key input variables can be provided for subsequent demand prediction modeling.
[0065] Specifically, in one implementation of this embodiment, step S200 includes the following steps:
[0066] Step S201: Analyze the daily travel frequency, weekly travel frequency, and repeat travel chain frequency of the corresponding passenger based on the personal travel behavior dataset;
[0067] Step S202: Based on the daily travel frequency, the weekly travel frequency, and the travel frequency of the repeat travel chain, commuter passengers are screened from the historical travel data of the bus passengers to determine the commuter passenger group;
[0068] Step S203: Calculate the travel time, entropy value of travel stations, and similarity of travel chains on the same workday for commuter and non-commuter passengers respectively, and compare them to obtain the spatiotemporal pattern of the commuter passengers' travel patterns.
[0069] In this embodiment, after extracting the personal travel behavior dataset, the embodiment accurately identifies commuter passenger groups by setting filtering rules for commuting behavior. Specifically, based on the travel chain structure within a week, if a passenger's same travel chain (including OD and time combinations) appears twice or more on different workdays, it can be considered that they have significant repetitive behavior. In addition, passengers with an average daily travel frequency of two or more are filtered to ensure that they meet the high-frequency characteristics of commuting behavior. At the same time, combined with the condition that the total number of trips within a week reaches three or more, the stability and regularity of commuter passengers are further limited.
[0070] In this embodiment, based on the identified commuter passenger group, the selected commuter passenger data is used to further analyze its spatiotemporal patterns. From a time perspective, the temporal regularity of commuting travel chains and the regularity of passenger travel time periods on different weekdays are analyzed.
[0071] Specifically, in analyzing the temporal regularity of commuting travel chains and the regularity of passenger travel time periods across different workdays, we first conduct a time-series analysis of the travel chains for each workday from the individual travel behavior dataset to study the similarity of travel chains between different workdays. The specific steps are as follows:
[0072] 1. Using the Jaccard similarity index, the overlap ratio of passenger travel stations on different workdays is calculated to measure the similarity of spatial distribution.
[0073] In this embodiment, the Jaccard similarity of a two-working-day travel chain is expressed as follows:
[0074]
[0075] Represent the OD set of travel chain A;
[0076] B represents the OD set of the travel chain B.
[0077] 2. The edit distance algorithm is used to match and compare the station sequences of the travel chain, analyze the consistency of the order of each travel chain, and eliminate the impact of chain length differences through standardization; for example... Figure 2 As shown, Figure 2 A heatmap showing the similarity of a commuter's weekday travel routes in City A. Figure 2 The heatmap value of weekday travel chain similarity can be used to analyze the consistency of the order of each travel chain.
[0078] 3. By combining Jaccard similarity and standardized edit distance, a comprehensive similarity model is constructed to characterize the regularity of commuting routes during different weekdays.
[0079] Then, by analyzing the time periods of the personal travel behavior dataset, the regularity of commuter travel time periods is studied. The specific steps are as follows:
[0080] 1. Extract travel time periods: Extract the boarding time of each travel record from the individual travel behavior dataset and divide it into several time periods based on the specific time, such as by hour (e.g., 6:00–7:00, 7:00–8:00, etc.). Each passenger's multiple travel records will be mapped to the corresponding time periods.
[0081] 2. Frequency Calculation for Each Time Period: For each passenger, the frequency of all their travel records within different time periods is calculated, and the frequencies are normalized. The probability distribution of travel within each time period is then calculated. , which indicates A specific time period.
[0082] 3. Calculate the entropy value of the travel time period: Based on the information entropy formula, calculate the regularity index (entropy value) of the passenger's travel time:
[0083]
[0084] in:
[0085] Indicates the time period of the passenger The probability of travel;
[0086] H represents the entropy value of the passenger's travel time distribution, which measures the uncertainty of the time distribution.
[0087] 4. Determine the regularity of travel time: When the entropy value is low, it indicates that the passenger's travel time is relatively concentrated and has a high degree of regularity; when the entropy value is high, it indicates that the passenger's travel time is relatively dispersed and has a weaker regularity.
[0088] In this embodiment, after analyzing the temporal regularity of commuting travel chains and the regularity of passenger travel time periods on different weekdays, the regularity of commuter passenger travel OD is studied by analyzing the origin-destination (OD) of each travel record in the individual travel behavior dataset. The specific implementation process is as follows:
[0089] 1. Extracting Travel Origin / Destination (OD) Data: Extract the departure station (origin O) and arrival station (destination D) for each travel record from the individual travel behavior dataset, and combine them into travel OD pairs (O, D). Each passenger's multiple travel records will be mapped to multiple OD pairs.
[0090] 2. Count the frequency of OD pairs: For each passenger, count the frequency of different OD pairs in all their travel records, normalize the frequency, and calculate the travel probability distribution for each OD pair. ,in This indicates a specific OD pair.
[0091] 3. Calculate the entropy value of the travel origin-destination (OD) distribution: Based on the information entropy formula, calculate the regularity index (entropy value) of the passenger's OD distribution:
[0092]
[0093] in:
[0094] Is it the passenger's choice of OD (Original Design Occupation)? The probability of travel;
[0095] H represents the entropy value of the passenger's travel origin-destination (OD) distribution, which measures the uncertainty of OD selection.
[0096] 4. Determine the regularity of travel origin-destination (OD) patterns: When the entropy value is low, it indicates that the passenger's travel origin-destination patterns are relatively concentrated and have a high degree of regularity; when the entropy value is high, it indicates that the passenger's travel origin-destination patterns are relatively dispersed and have a weaker regularity.
[0097] In this embodiment, after analyzing the origin and destination of each trip record in the personal travel behavior dataset, the main spatiotemporal patterns of commuters are obtained by combining the regularity indicators of time and space dimensions; the specific implementation process is as follows:
[0098] 1. Comprehensive temporal and spatial pattern indicators: These indicators calculate travel time pattern characteristics (time entropy values related to travel time). ) and the calculated spatial pattern index of travel (the regular spatial entropy value on the OD distribution) By combining these methods, we can comprehensively analyze the regular characteristics of commuter passengers.
[0099] 2. Summarize the spatiotemporal patterns of commuting passengers:
[0100] Time dimension: Entropy of commuter passengers' travel time The lower value indicates that commuting time is highly concentrated, usually during fixed morning and evening peak hours, showing a clear temporal regularity.
[0101] Spatial Dimension: Origin Entropy of Commuter Passengers' Travel The lower value indicates that the spatial distribution of commuting trips is also significantly concentrated, usually corresponding to fixed departure and destination stations, showing a stable spatial regularity.
[0102] 3. Outputting the main spatiotemporal patterns of commuter passengers: The overall travel behavior of commuter passengers exhibits strong spatiotemporal regularities, with travel times concentrated in specific peak hours on weekdays, and trip origin-destination pairs concentrated on high-frequency combinations of specific routes and stations. This regularity provides a reliable basis for demand forecasting. For example... Figure 3 As shown, Figure 3 This is a high-frequency travel origin-destination (OD) distribution diagram of a commuter in City A. Figure 3 The analysis results reveal the main spatiotemporal patterns of commuters.
[0103] like Figure 1 As shown, this embodiment of the invention provides a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics, including the following steps:
[0104] Step S300: Extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target based on the travel spatiotemporal patterns.
[0105] In this embodiment, based on the spatiotemporal patterns of commuters, features related to the prediction target are extracted from historical travel behavior data, including travel chain dimension, time dimension and spatial dimension features.
[0106] Specifically, in one implementation of this embodiment, step S300 includes the following steps:
[0107] Step S301: Extract OD1 data of the same workday and the same travel order, travel time T1 of the same workday and the same travel order, the highest frequency travel time T2 corresponding to the OD1 data, and the highest frequency travel time OD2 data corresponding to the travel time T1 to obtain the travel chain dimension feature.
[0108] In this embodiment, the trip chain dimension reflects the consistency and regularity of commuter passengers' behavior across multiple trips. The specific process of extracting features from the trip chain dimension includes:
[0109] (1) Extract origin-destination pairs (ODs) of trips on the same workday and with the same travel order, and record them as follows: This is to capture common destination patterns in this travel sequence.
[0110] (2) Extract the corresponding travel time and record it as... We will analyze the time stability of this travel order.
[0111] (3) Statistical analysis of historical data The most frequent travel time is recorded as This is to reflect its high-frequency time pattern.
[0112] (4) Statistics from historical data The corresponding highest frequency travel origin (OD) is denoted as To capture spatial preferences in time.
[0113] Step S302: Extract the travel time of commuter passengers in their most recent preset trip to obtain the time dimension feature.
[0114] In this embodiment, the time dimension features describe the travel patterns of commuters over time. Specifically, the process of extracting time dimension features includes: extracting the travel time data of each commuter's most recent 5 trips (i.e., a preset 5 trips) to analyze the continuity and regularity over time.
[0115] Step S303: Extract the travel OD data of the commuter passenger corresponding to the most recent preset trip, and extract the highest frequency OD data corresponding to the historical starting point O that is closest to the destination D of the previous trip for each trip, to obtain the spatial dimension feature.
[0116] In this embodiment, spatial dimension features describe the spatial travel preferences and distribution patterns of commuter passengers. The specific process of extracting spatial dimension features includes:
[0117] (1) Extract the travel origin and destination of each commuter’s most recent 5 trips (i.e., the preset number of trips is 5) to capture the changing patterns of travel origin and destination in the short term.
[0118] (2) Extract the highest frequency OD corresponding to the historical starting point O that is closest to the previous trip destination D, in order to analyze the spatial continuity and preference patterns of the trip chain.
[0119] In this embodiment, to ensure the rationality and importance of the extracted features for demand prediction, conditional probability analysis is also required to verify the relevance of these features. The specific process includes:
[0120] 1. Calculate the conditional probability of a feature: For each feature, calculate its conditional probability value with respect to the prediction target;
[0121] In this embodiment, the formula for calculating conditional probability is expressed as follows:
[0122]
[0123] The higher the conditional probability value, the stronger the explanatory power and contribution of the feature to the prediction target.
[0124] 2. Screening key travel influencing factors: Based on the calculation results of conditional probabilities, prioritize the selection of features with higher conditional probabilities as model input variables to ensure that the model can capture the core patterns and driving factors of travel behavior.
[0125] Through the above steps, the key features of commuters in the travel chain, time and space dimensions were successfully extracted and verified, providing a scientific basis for the construction of subsequent demand prediction models.
[0126] like Figure 1 As shown, this embodiment of the invention provides a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics, including the following steps:
[0127] Step S400: Construct a feature matrix based on the extracted features, train the features in the feature matrix using a distributed gradient enhancement model, and predict and output the travel demand of commuter passengers based on the trained travel demand prediction model.
[0128] In this embodiment, a travel demand prediction model is constructed based on the extracted spatiotemporal feature data using machine learning algorithms for feature modeling; that is, a feature matrix is constructed based on the extracted spatiotemporal feature data, and the XGBoost model (i.e., distributed gradient boosting model) is used for training and optimization. The trained travel demand prediction model can accurately predict the next travel time and travel origin-destination (OD) information for each commuter passenger.
[0129] Specifically, in one implementation of this embodiment, step S400 includes the following steps:
[0130] Step S401: Construct the feature matrix based on the extracted features, and perform one-hot encoding on the travel chain dimension features, time dimension features and spatial dimension features in the feature matrix;
[0131] Step S402: Based on the distributed gradient enhancement model, train the travel chain dimension features, time dimension features and spatial dimension features in the feature matrix to obtain the trained travel demand prediction model.
[0132] In one implementation of this embodiment, step S402 includes the following steps:
[0133] Step S402a: Train the extracted spatiotemporal features based on the distributed gradient enhancement model to construct a travel demand prediction model;
[0134] Step S4022b: The travel demand prediction model is validated using the K-fold cross-validation method, and the model parameters are optimized based on the validation results to obtain the trained travel demand prediction model.
[0135] In this embodiment, the specific process of using machine learning algorithms for feature modeling and constructing a travel demand prediction model includes:
[0136] 1. Constructing the feature matrix: For the extracted travel chain dimension features, time dimension features, and spatial dimension features, one-hot encoding and other methods are used to encode the categorical variables and transform them into numerical features suitable for model input. Then, a feature matrix containing the historical travel behavior features of commuters is constructed, and the training set and test set are divided in an 8:2 ratio to ensure the scientific nature of model training and evaluation.
[0137] 2. Model Training and Optimization: The XGBoost algorithm is used to train the feature matrix to build a travel demand prediction model. The K-fold cross-validation method is used to verify the model performance. The hyperparameters of the model (tree depth, learning rate, etc.) are optimized to improve the accuracy and robustness of the prediction. Accuracy is selected as the model evaluation index to ensure that the model can comprehensively measure the effect of travel demand prediction.
[0138] 3. Model performance analysis:
[0139] The experiment used bus card swipe data from City A from April 24 to May 21, 2018 for verification. The data covers approximately 4.53 million passengers, totaling 31.1 million travel records, including route information and origin-destination (OD) characteristic data;
[0140] The model achieved an average accuracy of 84.1% during weekday morning rush hour (7:00 to 9:00) and evening rush hour (17:00 to 20:00), with the highest prediction accuracy of 85.5% during the morning rush hour.
[0141] The low prediction accuracy during off-peak hours indicates that the model has limited performance in travel scenarios with weak regularity; however, by combining historical travel origin-destination (OD) data, similar travel day patterns, and high-frequency OD features, the overall prediction accuracy is further improved, especially in high-frequency travel scenarios.
[0142] Specifically, in one implementation of this embodiment, step S400 further includes the following steps:
[0143] Step S403: Based on the trained travel demand prediction model, predict and output the travel demand of commuter passengers.
[0144] In this embodiment, the specific process of making predictions based on the trained travel demand prediction model includes:
[0145] 1. Prediction Objective: Based on the constructed XGBoost model (the trained travel demand prediction model), the system takes the spatiotemporal characteristics of commuter passengers as input and accurately predicts the next travel time and travel origin-destination (OD) of each passenger; the output prediction results include travel time and spatial distribution characteristics to support the bus company in the precise allocation of transportation resources.
[0146] As an example, such as Figure 4 As shown, the input consists of AVL (Automatic Vehicle Location) data and bus IC card data. Then, data preprocessing (boarding station matching and alighting station estimation) and trip chain similarity calculation are performed. After that, trip features (trip chain dimension features, time dimension features, and spatial dimension features) are extracted. Finally, the extracted trip features are input into the XGBoost algorithm model for prediction.
[0147] 2. Analysis of Prediction Results:
[0148] (1) Temporal distribution: The prediction results show that the commuter travel behavior on weekdays has obvious temporal regularity, especially during the morning and evening peak hours. The model can effectively capture the characteristics of travel demand during peak hours; the high prediction accuracy during peak hours indicates that commuter passengers have high behavioral repetition and travel regularity during these time periods.
[0149] (2) Spatial distribution: The model accurately predicted the main travel OD pairs of commuters, especially in high-frequency travel scenarios; the spatial dimension prediction further verified the importance of combining features such as the most similar travel day and the historical highest frequency OD, which played a significant role in capturing spatial patterns.
[0150] This embodiment achieves the following technical effects through the above technical solution:
[0151] This embodiment analyzes historical travel data of public transportation commuters to determine their spatiotemporal patterns. By extracting features from time, space, and travel chain dimensions, and using the XGBoost algorithm to model these multidimensional features, a machine learning prediction model is constructed. This effectively improves the accuracy of demand forecasting, thereby accurately predicting the travel needs of commuters.
[0152] Exemplary device
[0153] Based on the above embodiments, the present invention also provides a public transportation commuter travel demand analysis system based on spatiotemporal characteristics, comprising:
[0154] The dataset acquisition module is used to acquire historical travel data of public transport passengers and construct a personal travel behavior dataset.
[0155] The travel spatiotemporal pattern analysis module is used to filter commuter passenger groups based on travel frequency and analyze travel spatiotemporal patterns based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains.
[0156] The multi-dimensional feature extraction module is used to extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target based on the travel spatiotemporal patterns.
[0157] The prediction and output module is used to construct a feature matrix based on the extracted features, train the features in the feature matrix using a distributed gradient enhancement model, and predict and output the travel demand of commuter passengers based on the trained travel demand prediction model.
[0158] This embodiment achieves the following technical effects through the above technical solution:
[0159] This embodiment analyzes historical travel data of public transportation commuters to determine their spatiotemporal patterns. By extracting features from time, space, and travel chain dimensions, and using the XGBoost algorithm to model these multidimensional features, a machine learning prediction model is constructed. This effectively improves the accuracy of demand forecasting, thereby accurately predicting the travel needs of commuters.
[0160] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 5 As shown.
[0161] The terminal includes: a processor, a memory, an interface, a display screen, and a communication module connected via a system bus; wherein, the processor of the terminal provides computing and control capabilities; the memory of the terminal includes a storage medium and internal memory; the storage medium stores the operating system and computer programs; the internal memory provides an environment for the operation of the operating system and computer programs in the storage medium; the interface is used to connect to external devices; the display screen is used to display relevant information; and the communication module is used to communicate with a cloud server or other devices.
[0162] When executed by the processor, this computer program is used to implement a method for analyzing the travel demand of public transportation commuters based on spatiotemporal characteristics.
[0163] It will be understood by those skilled in the art that Figure 5 The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0164] In one embodiment, a terminal is provided, comprising: a processor and a memory, the memory storing a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, the public transportation commuter travel demand analysis program being executed by the processor to implement the operation of the above-described public transportation commuter travel demand analysis method based on spatiotemporal characteristics.
[0165] In one embodiment, a storage medium is provided, wherein the storage medium stores a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, which, when executed by a processor, is used to implement the operation of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics as described above.
[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, database, or other media used in the embodiments provided by this invention can include both non-volatile and volatile memory.
[0167] In summary, this invention provides a method for analyzing the travel demand of public transport commuters based on spatiotemporal features, comprising: acquiring historical travel data of public transport passengers and constructing a personal travel behavior dataset; filtering commuter passenger groups based on travel frequency and analyzing spatiotemporal patterns of travel based on passenger travel time, entropy values of travel stops, and travel chain similarity; extracting travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target based on the spatiotemporal patterns of travel; constructing a feature matrix based on the extracted features; training the features in the feature matrix using a distributed gradient enhancement model; and predicting and outputting the travel demand of commuters based on the trained travel demand prediction model. This invention achieves efficient and accurate prediction of commuter passenger travel demand by integrating multidimensional travel features of commuters with machine learning algorithms.
[0168] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for analyzing the travel demand of public transport commuters based on spatiotemporal characteristics, characterized in that, include: Obtain historical travel data of public transport passengers and construct a personal travel behavior dataset; Commuter passenger groups are screened based on travel frequency, and travel spatiotemporal patterns are analyzed based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains. Based on the aforementioned travel spatiotemporal patterns, extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target; A feature matrix is constructed based on the extracted features. The features in the feature matrix are trained using a distributed gradient enhancement model. Based on the trained travel demand prediction model, the travel demand of commuting passengers is predicted and output. The step of extracting travel chain-dimensional features, time-dimensional features, and spatial-dimensional features related to the prediction target based on the travel spatiotemporal patterns includes: Extract OD1 data of the same workday and the same travel order, travel time T1 of the same workday and the same travel order, the highest frequency travel time T2 corresponding to the OD1 data, and the highest frequency travel time OD2 data corresponding to the travel time T1 to obtain the travel chain dimension features. Extract the travel time of commuter passengers for their most recent preset trip to obtain the time dimension feature; Extract the travel origin-destination (OD) data of the commuter passengers corresponding to the most recent preset trip, and extract the highest frequency OD data corresponding to the historical starting point O that is closest to the destination D of the previous trip for each trip to obtain the spatial dimension features; The process of constructing a feature matrix based on extracted features, training the features in the feature matrix using a distributed gradient enhancement model, and predicting and outputting the travel demand of commuters based on the trained travel demand prediction model includes: The feature matrix is constructed based on the extracted features, and the trip chain dimension features, time dimension features and spatial dimension features in the feature matrix are one-hot encoded. The travel demand prediction model is trained based on the distributed gradient enhancement model to obtain the travel chain dimension features, time dimension features and spatial dimension features in the feature matrix. Based on the trained travel demand prediction model, the travel demand of commuter passengers is predicted and output. The training of the trip chain dimension features, time dimension features, and spatial dimension features in the feature matrix based on the distributed gradient enhancement model includes: The extracted spatiotemporal features are trained based on the distributed gradient enhancement model to construct a travel demand prediction model. The travel demand prediction model was validated using the K-fold cross-validation method, and the model parameters were optimized based on the validation results to obtain the trained travel demand prediction model.
2. The method for analyzing the travel demand of public transport commuters based on spatiotemporal characteristics according to claim 1, characterized in that, The acquisition of historical travel data of public transport passengers and the construction of a personal travel behavior dataset include: Obtain information on bus passengers' boarding and alighting stops, boarding times, and alighting times to obtain the historical travel data; The personal travel behavior dataset is constructed based on the historical travel data.
3. The method for analyzing the travel demand of public transport commuters based on spatiotemporal characteristics according to claim 1, characterized in that, The method of filtering commuter passenger groups based on travel frequency includes: Based on the aforementioned personal travel behavior dataset, analyze the daily travel frequency, weekly travel frequency, and frequency of repeated travel chains for the corresponding passengers. Based on the daily travel frequency, the weekly travel frequency, and the frequency of repeated travel chains, commuter passengers are screened from the historical travel data of the public transport passengers to determine the commuter passenger group.
4. The method for analyzing the travel demand of public transport commuters based on spatiotemporal characteristics according to claim 1, characterized in that, The analysis of travel spatiotemporal patterns based on passenger travel time, entropy values of travel stations, and travel chain similarity includes: The travel time, entropy value of travel stations, and similarity of travel chains on the same workday are calculated for commuter passengers and non-commuter passengers respectively, and the spatiotemporal patterns of the commuter passengers' travel patterns are obtained by comparison.
5. A public transport commuter travel demand analysis system based on spatiotemporal characteristics, used to implement the public transport commuter travel demand analysis method based on spatiotemporal characteristics as described in any one of claims 1-4, characterized in that, include: The dataset acquisition module is used to acquire historical travel data of public transport passengers and construct a personal travel behavior dataset. The travel spatiotemporal pattern analysis module is used to filter commuter passenger groups based on travel frequency and analyze travel spatiotemporal patterns based on passengers' travel time, the entropy value of travel stations, and the similarity of travel chains. The multi-dimensional feature extraction module is used to extract travel chain dimension features, time dimension features, and spatial dimension features related to the prediction target based on the travel spatiotemporal patterns. The prediction and output module is used to construct a feature matrix based on the extracted features, train the features in the feature matrix using a distributed gradient enhancement model, and predict and output the travel demand of commuter passengers based on the trained travel demand prediction model.
6. A terminal, characterized in that, include: The processor and memory, wherein the memory stores a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, and the public transportation commuter travel demand analysis program based on spatiotemporal characteristics, when executed by the processor, is used to implement the operation of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a public transportation commuter travel demand analysis program based on spatiotemporal characteristics, which, when executed by a processor, is used to implement the operation of the public transportation commuter travel demand analysis method based on spatiotemporal characteristics as described in any one of claims 1-4.
Citation Information
Patent Citations
Individual trajectory data travel purpose prediction method based on long short-term memory network
CN115600751A
Individual travel mode analysis method based on semi-supervised hypergraph clustering
CN115809279A