A passenger flow analysis method and device based on deep learning adaptive feature extraction
By using a deep learning-based adaptive feature extraction method and combining passenger transaction and vehicle operation data, a potential travel chain sample set is constructed and a disembarkation intention inference model is trained. This solves the error and privacy issues of traditional public transport passenger flow analysis and achieves accuracy and comprehensiveness in public transport passenger flow analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI PUBLIC TRANSPORTATION GRP CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-07-21
AI Technical Summary
Traditional public transport passenger flow analysis methods struggle to accurately obtain passenger alighting station information, are prone to errors and subjective inferences, affecting the accuracy and privacy of the analysis results and failing to effectively support public transport operation decisions.
An adaptive feature extraction method based on deep learning is adopted to construct a potential travel chain sample set by acquiring passenger transaction sequences, vehicle operation sequences and passenger alighting and disembarking counts, train a disembarking intention inference model, and use Bayesian correction to generate passenger flow analysis results.
It improves the accuracy and reliability of bus passenger flow analysis, can accurately infer hidden drop-off points, provides scientific data support, and provides a basis for refined bus operation and network optimization.
Smart Images

Figure CN122434584A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent transportation, and in particular to a passenger flow analysis method and apparatus based on deep learning adaptive feature extraction. Background Technology
[0002] With the advancement of intelligent transportation construction and refined public transportation operation, the accuracy of public transportation passenger flow analysis results has become a key technical requirement for capacity allocation and network optimization.
[0003] Currently, traditional bus passenger flow analysis methods struggle to accurately obtain passenger alighting station information, and various inference methods contain errors. This not only results in subjective inferences and uncertainties in passenger flow analysis results but also reduces the accuracy of the analysis results. Furthermore, it fails to effectively protect passenger data privacy, affecting the scientific nature of subsequent bus operation decisions. Summary of the Invention
[0004] This application provides a passenger flow analysis method and apparatus based on deep learning adaptive feature extraction, which improves the current situation where it is difficult to accurately obtain the alighting points in bus passenger flow analysis and traditional inference methods have certain errors, thereby improving the accuracy and reliability of passenger flow analysis results.
[0005] This application discloses the following technical solution: Firstly, this application provides a passenger flow analysis method based on deep learning adaptive feature extraction, the method comprising: Obtain passenger transaction sequence, vehicle operation sequence, and passenger boarding and alighting counts for the target route within the statistical period; The passenger transaction sequence and vehicle operation sequence are spatiotemporally aligned and matched to construct a potential travel chain sample set indexed by anonymous passenger identifiers; A deep spatiotemporal feature autoencoder network was constructed to train a disembarkation intention inference model with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains. The real-time collected passenger transaction sequence and vehicle operation data are input into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger. Based on the passenger flow counts, Bayesian correction is performed on the hidden alighting stations to obtain corrected alighting stations. These are then aggregated to generate cross-sectional passenger flow and OD matrices, which serve as the passenger flow analysis results.
[0006] Secondly, this application provides a passenger flow analysis device based on deep learning adaptive feature extraction, the device comprising: The data acquisition module is used to acquire passenger transaction sequences, vehicle operation sequences, and passenger boarding and alighting counts for the target route within the statistical period. The travel chain construction module is used to perform spatiotemporal alignment and matching of the passenger transaction sequence and the vehicle operation sequence, and to construct a potential travel chain sample set indexed by anonymous passenger identifiers. The model training module is used to construct a deep spatiotemporal feature autoencoder network with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains, and to train the disembarkation intention inference model. The station inference module is used to input the real-time collected passenger transaction sequence and vehicle operation data into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger. The passenger flow aggregation module is used to perform Bayesian correction on the hidden alighting stations based on the passenger flow counts, obtain the corrected alighting stations, and aggregate them to generate cross-sectional passenger flow and OD matrix as the passenger flow analysis result.
[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages: This application proposes a passenger flow analysis method and device based on deep learning adaptive feature extraction. By acquiring operational data step by step, constructing a travel chain sample set, training a disembarkation intention inference model, inferring implicit disembarkation stations, performing Bayesian correction and passenger flow aggregation, it achieves accurate inference of the implicit disembarkation intention of passengers on target bus routes and in-depth analysis of passenger flow characteristics across all dimensions. First, passenger transaction sequences, vehicle operation sequences, and passenger alighting / disembarking counts for the target route within the statistical period are obtained. After data cleaning and normalization, a multi-dimensional passenger flow analysis data foundation is constructed. Next, the passenger transaction sequences and vehicle operation sequences are spatiotemporally aligned and matched, and contextual features are extracted to construct a potential travel chain sample set indexed by anonymous passenger identifiers. Then, a deep spatiotemporal feature autoencoder network is constructed, with the dual optimization objectives of maximizing passenger flow distribution reconstruction accuracy and potential travel chain consistency. The network parameters are iteratively optimized through loss weighting and backpropagation to train a disembarking intention inference model. Real-time contextual features are generated by spatiotemporally aligning the real-time collected passenger transaction sequences and vehicle operation data, and input into this model to obtain the most likely hidden disembarking station for each passenger. Finally, a likelihood function is constructed based on the passenger alighting / disembarking counts. The hidden disembarking stations are corrected by fusing prior probabilities and observed data using Bayes' theorem, and the cross-sectional passenger flow and origin-destination (OD) matrix are aggregated to complete the full-dimensional passenger flow analysis.
[0008] The technical solution proposed in this application solves the problems of traditional public transport passenger flow analysis, such as reliance on manual statistics, difficulty in inferring hidden drop-off points, poor correlation of passenger flow data, low analysis accuracy, strong lag, and inability to accurately capture the spatiotemporal distribution patterns of passenger flow. It avoids misjudgment and analysis bias of passenger flow, improves the accuracy, comprehensiveness and real-time nature of public transport passenger flow analysis, and provides scientific and reliable data support for refined operation scheduling, network optimization and station resource allocation of public transport. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A flowchart illustrating a passenger flow analysis method based on deep learning adaptive feature extraction, provided for an embodiment of this application; Figure 2 This is a schematic diagram of a passenger flow analysis device based on deep learning adaptive feature extraction, provided as an embodiment of this application.
[0011] The components represented by each number in the attached diagram are explained below: Data acquisition module 01, travel chain construction module 02, model training module 03, site inference module 04, passenger flow aggregation module 05. Detailed Implementation
[0012] This application provides a passenger flow analysis method and apparatus based on deep learning adaptive feature extraction, which solves the technical problems in the prior art, such as the difficulty in accurately obtaining alighting points in bus passenger flow analysis, the inherent errors of traditional inference methods, and the resulting subjective inference, uncertainty, and decreased accuracy and privacy in passenger flow analysis results.
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] Example 1, as shown in the appendix Figure 1 As shown, this application provides a passenger flow analysis method based on deep learning adaptive feature extraction, the method comprising the following steps: S110: Obtain the passenger transaction sequence, vehicle operation sequence, and passenger boarding and alighting counts for the target route within the statistical period; In this embodiment of the application, in the actual scenario of refined operation and scheduling of urban public transport, in order to explore the travel patterns of passenger flow on the route and provide real raw data support for inferring the intention to get off the bus, it is necessary to collect and organize three types of operational data—passenger transaction sequence, vehicle operation sequence, and passenger flow count—within a set statistical period for the target bus route, so as to build a multi-dimensional passenger flow analysis data foundation.
[0015] In the method provided in this application embodiment, the passenger transaction sequence includes multiple passengers' boarding timestamps, boarding station IDs, and anonymous passenger identifiers, and the vehicle operation sequence includes multiple timestamps and corresponding vehicle locations.
[0016] Firstly, the collection of passenger transaction sequences should focus on data generated during the payment process for public transport passengers, covering each passenger's boarding timestamp, boarding station ID, and anonymous passenger identifier. The anonymous passenger identifier is generated by the payment system through anonymization, enabling correlation analysis of multiple rides by the same passenger while strictly protecting passenger privacy and complying with public transport data usage regulations.
[0017] In addition, the collection of passenger transaction sequences is completed using the existing payment terminal system of public transportation, without the need for additional hardware deployment. The full amount of transaction data within the statistical period can be extracted synchronously from the payment backend, ensuring the comprehensiveness and convenience of data collection.
[0018] Specifically, during the collection of passenger transaction sequences, the original payment data needs to be cleaned to remove abnormal data such as duplicate transactions and invalid payments. At the same time, the boarding timestamps are uniformly calibrated to a standard time format, and the boarding station IDs are matched with the station coding system of the target route to ensure the standardization and consistency of the data.
[0019] For example, for a regular bus route in a certain area, a statistical period of 7 days is set. All card swiping and QR code scanning transaction data within this period are extracted from the payment backend. After cleaning, a passenger transaction sequence containing hundreds of thousands of records is obtained. Each record is clearly marked with the passenger's boarding timestamp, the corresponding boarding station's numerical code, and the anonymized identifier.
[0020] Secondly, the collection of vehicle operation sequences relies on the GPS positioning equipment carried by the buses. It mainly collects each timestamp and the corresponding real-time location information of the vehicles. The collection frequency of the positioning data is consistent with the normal working frequency of the GPS equipment to ensure that the driving trajectory and stop information of each vehicle on the target route can be completely restored within the statistical period.
[0021] The collected vehicle operation sequences need to be calibrated to match the latitude and longitude coordinates of the real-time vehicle location with the geographic information system of the target route. At the same time, abnormal data caused by GPS signal loss and location drift are removed to ensure the accuracy of vehicle location information.
[0022] For example, GPS data was collected simultaneously over a 7-day statistical period for 10 operating vehicles on the same target bus route at the same location. After calibration and cleaning, the data formed a vehicle operation sequence, which can accurately reflect the specific location of each vehicle at different timestamps and clearly show the location changes of the vehicles when they arrive at and leave each station.
[0023] Meanwhile, the passenger flow count is collected by infrared sensors installed at the front and rear doors of the bus. The sensors record the number of passengers getting on and off the bus at each stop in real time, forming continuous passenger flow count data. After the collection of all data within the statistical period is completed, the passenger flow count data needs to be bound with the corresponding vehicle identification, stop information and time information to ensure that each passenger flow count data can be accurately matched with a specific vehicle, a specific stop and a specific time.
[0024] For example, the infrared sensors at the front and rear doors of the 10 operating vehicles on the aforementioned target route will record the number of passengers getting on and off at each station in real time within a 7-day statistical period. After data binding, the specific passenger flow data of a certain vehicle at a certain station and at a certain time can be clearly queried, providing data support for the subsequent real-time passenger volume estimation of vehicles.
[0025] Finally, after collecting, cleaning and organizing the three types of data separately, it is necessary to uniformly collect the passenger transaction sequence, vehicle operation sequence and passenger boarding and alighting count according to the target route and statistical period, and establish a data association index to ensure that the three types of data can be quickly matched based on vehicle identifier, station ID and timestamp, laying the data foundation for subsequent spatiotemporal alignment and matching of multi-source data.
[0026] S120: Perform spatiotemporal alignment and matching of the passenger transaction sequence and the vehicle operation sequence to construct a potential travel chain sample set indexed by anonymous passenger identifiers; In this embodiment of the application, in order to establish an effective correlation between passenger travel behavior and vehicle operation status and to explore the continuous travel characteristics of individual passengers, it is necessary to carry out systematic spatiotemporal alignment and matching operations on passenger transaction sequences and vehicle operation sequences, and at the same time extract relevant features that meet the needs of passenger flow analysis, so as to form a structured potential travel chain sample set that can be used for model training.
[0027] Specifically, based on the mapping relationship between vehicle location and preset route station electronic fences, and combined with the timestamps in the vehicle operation sequence, the arrival time window and departure time window of the vehicle to each station are generated, establishing a time reference for matching passenger transactions and vehicle station stopping behavior.
[0028] Furthermore, the boarding timestamp in the passenger transaction sequence is matched with the arrival time window sequence. When the boarding timestamp falls into a certain arrival time window, the transaction is bound with the corresponding vehicle identifier, boarding station ID and departure time window to form a complete ride event record, thus realizing the initial association between passenger transactions and vehicle operation data.
[0029] Furthermore, using the anonymous passenger identifier as the primary key, all ride event records under the same identifier are arranged in ascending order by boarding timestamp to form an initial travel chain, thus sorting out the continuous ride behavior trajectory of an individual passenger in the time dimension and reflecting the individual travel characteristics of the passenger.
[0030] Furthermore, for each ride event recorded in the initial travel chain, the contextual features required to construct the sample are associated and extracted. These contextual features include the boarding station ID, time period, the real-time estimated passenger capacity of the vehicle at the time of boarding, and the departure time corresponding to the departure time window, enriching the feature dimensions of the sample and enabling the sample to reflect the spatiotemporal context of the passenger's ride and the vehicle's operational status.
[0031] Finally, all ride event records and their associated contextual features are integrated and categorized according to anonymous passenger identifiers to construct a potential travel chain sample set indexed by anonymous passenger identifiers. This sample set not only reflects the travel patterns of individual passengers but also provides comprehensive sample data support for the training of the subsequent disembarkation intention inference model.
[0032] Step S120 in the method provided in this application embodiment includes: Based on the mapping relationship between vehicle location and preset route station electronic fence, and combined with the timestamp in the vehicle operation sequence, the arrival time window and departure time window of the vehicle to each station are generated. The boarding timestamp in the passenger transaction sequence is matched with the arrival time window sequence. When the boarding timestamp falls into a certain arrival time window, the transaction is bound with the corresponding vehicle identifier, boarding station ID and departure time window to form a ride event record. Using the anonymous passenger identifier as the primary key, all ride event records under the same identifier are sorted in ascending order according to the boarding timestamp to form an initial travel chain; For each ride event record in the initial travel chain, associate and extract the contextual features required to construct the sample; The context features include at least the boarding station ID, time period, real-time estimated passenger capacity of the vehicle at the time of boarding, and departure time corresponding to the departure time window; Based on all ride event records and associated contextual features, a potential travel chain sample set indexed by anonymous passenger identifiers is constructed.
[0033] Specifically, based on the mapping relationship between vehicle location and preset route station electronic fences, and combined with the timestamps in the vehicle operation sequence, an arrival time window and a departure time window for each station are generated. The route station electronic fence is a dedicated geographical area defined by the geographic coordinates of each station, used to determine whether a vehicle has arrived at the station area. The generation of the time windows establishes a time matching basis for passenger transaction behavior and vehicle station stopping behavior, resolving the minor discrepancy between vehicle GPS positioning time and passenger payment time.
[0034] For example, for a certain bus stop on a certain bus route in a certain area, the electronic fence is defined as a geographical range of 50 meters around the center of the stop. When the GPS location of a vehicle falls within this range, the timestamp at this time is recorded as the start point of the arrival time. When the GPS location of the vehicle leaves this range, the timestamp at this time is recorded as the end point of the departure time. The time period between the two timestamps is the arrival time window of the vehicle at the stop. The departure time window is defined as a fixed time interval based on the departure time start point.
[0035] Furthermore, the boarding timestamp in the passenger transaction sequence is matched with the arrival time window sequence. When the boarding timestamp falls within a certain arrival time window, the transaction is bound to the corresponding vehicle identifier, boarding station ID, and departure time window to form a ride event record. This step achieves accurate association between a single passenger ride transaction and the specific operating vehicle and stop, establishing a one-to-one correspondence between previously independent passenger and vehicle data.
[0036] For example, if a passenger's boarding timestamp is 7:35:20, and this timestamp falls within the arrival time window of bus route 101 at station A from 7:35:00 to 7:35:30, then the passenger's transaction is bound to the vehicle identifier of bus route 101, the station ID of station A, and the departure time window of the vehicle at station A, forming a complete ride event record.
[0037] Furthermore, using the anonymous passenger identifier as the primary key, all ride event records under the same identifier are arranged in ascending order by boarding timestamp to form an initial travel chain. The anonymous passenger identifier is a unique identifier after the passenger payment data has been anonymized, enabling the association of multiple rides by the same passenger while protecting passenger privacy. The ascending order arrangement clearly reconstructs the passenger's continuous ride trajectory over time, reflecting the passenger's individual travel patterns and behavioral characteristics.
[0038] For example, an anonymous passenger identified as X001 has three ride-hailing event records with boarding timestamps of 7:35:20, 18:02:15, and 9:10:30 on weekends. Arranging these records in ascending order of boarding timestamps forms the passenger's initial travel chain, clearly reflecting the passenger's ride-hailing time patterns and frequency of travel.
[0039] Furthermore, for each ride event record in the initial travel chain, the contextual features required to construct the sample are associated and extracted. These contextual features include at least the boarding station ID, time period, the vehicle's real-time estimated passenger capacity at the time of boarding, and the departure time corresponding to the departure time window.
[0040] Specifically, the boarding station ID is a unique numerical code for each station on the target route, corresponding one-to-one with the route's station system, and is a characteristic parameter reflecting the passenger's starting point. The time slots are divided according to the operational passenger flow patterns of urban public transport, and are divided into four fixed time periods based on peak travel characteristics: morning peak, off-peak, evening peak, and nighttime, which can characterize the temporal attributes of the boarding event.
[0041] Furthermore, the departure time window corresponds to the base time point when the vehicle leaves the current boarding station, reflecting the actual departure time characteristics of the vehicle after passengers board, and providing a time reference for analyzing passenger travel time and disembarkation decisions. The real-time estimated passenger capacity of the vehicle at the time of boarding is based on the vehicle identifier and departure time window bound to the boarding event, reflecting the actual operating load status of the vehicle when the boarding event occurs.
[0042] In the method provided in this application embodiment, the step of obtaining the real-time estimated passenger capacity of the vehicle upon boarding includes: Determine the vehicle identifier and departure time window associated with the ride event record; Retrieve all historical passenger flow counts generated before the current departure time window, wherein the historical passenger flow counts are obtained by infrared sensors installed on the front and rear doors of the vehicle; The net number of passengers boarding the bus is accumulated from the historical passenger flow counts to obtain the real-time estimated passenger capacity of the vehicle at the time the boarding event occurs.
[0043] Specifically, the first step is to determine the vehicle identifier and departure time window associated with the ride event record. The vehicle identifier is a unique digital identification code for urban public transport vehicles, which enables accurate location of the operating vehicle corresponding to the ride event and serves as the basis for retrieving vehicle-specific operational data.
[0044] In addition, the departure time window is the time interval for vehicles to depart from the corresponding boarding station. As a key node for dividing the historical passenger flow counting time range of vehicles, only by locking the vehicle identifier and the departure time window at the same time can we avoid misalignment and deviation in data retrieval and ensure that the obtained passenger flow data matches the current travel event.
[0045] For example, a certain ride event record is bound to vehicle ID 902 of a certain bus route in a certain area. The departure time window is from 8:15:00 to 8:15:10 when the vehicle is at the government affairs district station. At this time, vehicle ID 902 is identified as the only subject for data retrieval. 8:15:00 is used as the time threshold to define the retrieval time range of historical passenger flow counts.
[0046] Furthermore, all historical passenger flow counts generated before the current departure time window are retrieved, where the historical passenger flow counts are obtained through infrared sensors installed on the front and rear doors of the vehicle.
[0047] Specifically, infrared sensors are standard passenger flow data collection hardware installed on buses. They can capture passenger passage at the front and rear doors of the vehicle in real time through infrared sensing, enabling dynamic statistics on the number of passengers boarding and alighting at each stop. The collected passenger flow data is the original data basis for reflecting the dynamic changes in the vehicle's passenger capacity from the start of operation to the current stop.
[0048] In addition, limiting the time range before the departure time window is to ensure that all the passenger flow counting data retrieved are operational data generated by the vehicle at each stop along the route before the occurrence of this riding incident, so as to truly reflect the basic load status of the vehicle at the moment when passengers boarded.
[0049] However, in real-world scenarios, if there are situations such as dense passenger flow, simultaneous passage, or obstruction, the monitoring data from infrared sensors may be undercounted or have errors. Such errors can be ignored when used alone to estimate the real-time passenger capacity of a vehicle corresponding to a single ride event, but if such errors continue to accumulate, they will cause certain deviations when used to calculate accurate passenger flow analysis results for the entire route.
[0050] Finally, by accumulating the net boarding numbers from historical passenger flow counts, the real-time estimated passenger capacity of the vehicle at the time of the boarding event is obtained. The net boarding number is calculated by subtracting the number of alighting passengers from the number of boarding passengers at a single stop along the route. This value reflects the change in passenger capacity at that stop; a positive net boarding number indicates an increasing passenger capacity, while a negative net boarding number indicates a decreasing passenger capacity.
[0051] In addition, by continuously accumulating the net number of passengers boarding the vehicle at all stations along the route before the departure time window, it is possible to reconstruct the entire process of the dynamic change in passenger volume from the vehicle's departure from the first station to the station corresponding to the current boarding event. The final cumulative calculation result is the actual operating passenger volume of the vehicle at the moment when the passenger completes the boarding operation, which can reflect the degree of vehicle congestion and is an important operational status characteristic that affects passengers' decision to disembark.
[0052] For example, after the aforementioned vehicle No. 902 departed from the first station, the net number of passengers boarding at the bus station was 20, the net number of passengers boarding at the pedestrian street station was -5, and the net number of passengers boarding at the science and technology museum station was 8. There were no other stops along the way before the departure time window at the government affairs district station. The net number of passengers boarding in this series was continuously accumulated, 20-5+8=23, which means that the real-time estimated passenger capacity of vehicle No. 902 at the government affairs district station at the time of this travel event was 23.
[0053] Furthermore, after the context features are constructed, a potential travel chain sample set is built based on all ride event records and associated context features, indexed by anonymous passenger identifiers. The anonymous passenger identifier is a unique identification code generated after anonymizing passenger payment information. This code protects passenger privacy while enabling effective association of all ride event records for the same passenger. Using this as an index for the sample set allows each index to correspond to the passenger's complete travel behavior trajectory.
[0054] In addition, after associating various contextual features with ride event records, all data will be classified and collected according to the identifier. At the same time, ride event records under the same identifier will be arranged in ascending order by boarding timestamp to ensure the continuity of the travel chain in the time dimension. This allows the sample set to contain both the feature information of a single ride and the continuous travel patterns of passengers.
[0055] For example, within a statistical period of a certain bus route in a certain area, under the index of the anonymous passenger identified as X001, multiple ride event records with contextual features of the passenger are collected and arranged from morning to night according to the boarding timestamp, clearly showing the passenger's ride situation at different times and stations. Finally, after integrating the structured data corresponding to all the identifiers, a complete potential travel chain sample set is formed.
[0056] S130: Construct a deep spatiotemporal feature autoencoder network to train a disembarkation intention inference model with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains. In this embodiment of the application, in order to learn the characteristic patterns of passengers' intention to get off the bus, it is necessary to construct a deep spatiotemporal feature autoencoder network and design a dual optimization objective to carry out model training. At the same time, the network parameters are optimized through loss weighting and backpropagation to obtain an intention to get off the bus inference model with accurate inference capabilities.
[0057] Specifically, the encoder of the deep spatiotemporal feature autoencoder network is first constructed. The context features of the ride event record are taken as input and the corresponding low-dimensional latent vector is output, so as to realize the spatiotemporal feature extraction and dimensionality reduction representation of multi-dimensional context features.
[0058] Furthermore, a decoder for a deep spatiotemporal feature autoencoder network is constructed. The low-dimensional latent vector output by the encoder is used as input, and the output is the predicted distribution of alighting passengers from the current boarding station ID to the end of the line, thus realizing the reconstruction of passenger flow distribution based on low-dimensional latent vector.
[0059] Furthermore, based on the passenger flow count to form the actual passenger flow distribution, the difference between the predicted passenger flow distribution and the actual passenger flow distribution is calculated and used as the loss of passenger flow distribution reconstruction accuracy, thus quantifying the model's ability to reconstruct passenger flow distribution.
[0060] Furthermore, using anonymous passenger identifiers and time periods as constraints, sample pairs are constructed from the potential travel chain sample set. The distance loss between the low-dimensional latent vectors corresponding to two trips with the same anonymous passenger identifier and in adjacent time periods is calculated and used as the travel chain coherence constraint loss to ensure the model's learning effect on the continuous travel characteristics of passengers.
[0061] Furthermore, the weighted sum of the passenger flow distribution reconstruction accuracy loss and the travel chain coherence constraint loss is obtained to get the total training loss. The parameters of the deep spatiotemporal feature autoencoder network are iteratively optimized through the backpropagation algorithm, allowing the network to continuously approach the dual optimization objective.
[0062] Finally, when the training reaches the preset stopping condition, the network parameter iteration is stopped and the encoder's network parameters are saved. At this point, the encoder is the trained disembarkation intention inference model, which can be used to infer the implicit disembarkation point of passengers.
[0063] Step S130 in the method provided in this application embodiment includes: Construct an encoder for a deep spatiotemporal feature autoencoder network, wherein the input of the encoder is the contextual features of the ride event record, and the output is the corresponding low-dimensional latent vector; Construct a decoder for the deep spatiotemporal feature autoencoder network, wherein the input of the decoder is the low-dimensional latent vector, and the output is the predicted distribution of alighting passenger flow from the current boarding station ID to the end of the line for all subsequent stations. Based on the passenger disembarkation count, the actual passenger disembarkation distribution is formed, and the difference between the predicted passenger disembarkation distribution and the actual passenger disembarkation distribution is calculated as the passenger flow distribution reconstruction accuracy loss. Using the anonymous passenger identifier and time segment as constraints, sample pairs are constructed from the potential travel chain sample set, and the distance loss between the low-dimensional latent vectors corresponding to two trips belonging to the same anonymous passenger identifier and in adjacent time segments is calculated as the travel chain coherence constraint loss. The total training loss is obtained by weighted summing of the passenger flow distribution reconstruction accuracy loss and the travel chain coherence constraint loss, and the parameters of the deep spatiotemporal feature autoencoder network are optimized by backpropagation algorithm. When the training reaches the preset stopping condition, the network parameters of the encoder are saved, and the encoder is the trained vehicle disembarkation intention inference model.
[0064] Specifically, an encoder for a deep spatiotemporal feature autoencoder network is first constructed. This encoder integrates a network structure of spatiotemporal convolutional layers and fully connected layers. The spatiotemporal convolutional layers can capture the spatial location information of the boarding station and the time sequence information of the ride contained in the context features. The fully connected layers perform nonlinear mapping and dimensionality compression on the fused high-dimensional spatiotemporal features. The multi-dimensional context features contained in the ride event records are used as network inputs. After multi-layer feature extraction and transformation, the corresponding low-dimensional latent vector is output. This low-dimensional latent vector is a compact expression of the core features of the passenger's intention to get off the bus, preserving the key spatiotemporal information that affects the passenger's decision to get off the bus.
[0065] For example, a four-dimensional contextual feature containing the boarding station ID, time period, real-time estimated passenger capacity of the vehicle at the time of boarding, and departure time is input into the encoder. After feature transformation by the network layer, a low-dimensional latent vector with a dimension of 64 is output, thereby realizing the effective extraction and representation of the core features of the disembarkation intention.
[0066] Furthermore, a decoder for a deep spatiotemporal feature autoencoder network is constructed. This decoder adopts a combination of deconvolutional and fully connected layers that correspond to the encoder structure, forming a symmetrical network architecture with the encoder. The low-dimensional latent vectors output by the encoder are used as the input of the decoder. First, the feature dimension is increased through the fully connected layer, and then the spatiotemporal features are restored and predicted through the deconvolutional layer. Finally, the predicted distribution of alighting passengers from the current boarding station ID to the end of the line is output. This predicted distribution can reflect the model's prediction results of the proportion and number of alighting passengers at each subsequent station based on the passenger boarding context features. It is the core output content for reconstructing the alighting passenger flow distribution of the line.
[0067] For example, a target bus route has 10 stops from the current boarding point to the end of the route. After feature restoration and prediction, the decoder outputs a predicted distribution of alighting passengers containing 10 values, each value corresponding to the predicted relative proportion of alighting passengers at the next stop.
[0068] Furthermore, based on the passenger disembarkation count, the actual passenger disembarkation distribution is formed, and the difference between the predicted passenger disembarkation distribution and the actual passenger disembarkation distribution is calculated as the accuracy loss of passenger flow distribution reconstruction.
[0069] The method provided in this application embodiment, based on the number of passengers alighting, forms a true passenger alighting distribution, and calculates the difference between the predicted passenger alighting distribution and the true passenger alighting distribution as the passenger flow distribution reconstruction accuracy loss, including: Extract the vehicle identifier associated with the current ride event record and the corresponding alighting passenger counts for each station after the boarding station ID from the passenger flow count data. Arrange the alighting passenger counts into a true alighting passenger distribution vector according to the route station sequence; The predicted passenger flow distribution output by the decoder is processed into a predicted passenger flow distribution vector. The cross-entropy between the predicted passenger flow distribution vector and the actual passenger flow distribution vector is calculated as the accuracy loss of the passenger flow distribution reconstruction.
[0070] Specifically, firstly, from the passenger flow counting data for boarding and alighting, the vehicle identifier associated with the current ride event record and the corresponding passenger flow count for each alighting station after the boarding station ID are extracted.
[0071] The passenger flow counts for boarding and alighting are collected and uploaded in real time by infrared sensors mounted on the front and rear doors of the buses. The vehicle identifier serves as the sole basis for locating the operating vehicle corresponding to the boarding event. Furthermore, limiting the alighting passenger flow counts to each station after extracting the boarding station ID ensures that the acquired data matches the reconstructed passenger flow distribution range of the current boarding event, providing a data source for subsequently constructing the accurate distribution.
[0072] For example, a ride event record is bound to vehicle ID 806 of a certain bus route in a certain city, and the boarding station ID is the 5th station of the route. At this time, the actual alighting passenger count values of vehicle 806 in this trip from the 6th to the last station are extracted from the passenger flow count data. Each station corresponds to one actual number of alighting passengers.
[0073] Furthermore, according to the route station sequence, the alighting passenger counts are arranged into a true alighting passenger flow distribution vector. The route station sequence is the fixed station driving order of bus operation, which is the spatial dimension basis for constructing the passenger flow distribution vector. The extracted alighting passenger counts of each station are strictly arranged in this order, which can transform discrete station passenger flow data into a structured vector form. The dimension of this vector is consistent with the number of stations after the boarding station ID. The value of each dimension corresponds to the actual alighting passenger count of a station. The true alighting passenger flow distribution vector, as a digital representation of the spatial distribution of actual alighting passengers on the route, is the benchmark for subsequent comparison with the predicted distribution.
[0074] For example, in the above-mentioned vehicle No. 806, stations 6 to 12 in this journey are all stations after the boarding station. The extracted passenger flow counts for disembarking are 6, 9, 4, 7, 3, 5, and 2 respectively. After arranging them in the order of the station sequence, the actual passenger flow distribution vector for disembarking is [6, 9, 4, 7, 3, 5, 2], which fully reflects the actual passenger flow distribution of each subsequent station in this journey.
[0075] Furthermore, the predicted passenger flow distribution output by the decoder is processed into a predicted passenger flow distribution vector. The predicted passenger flow distribution output by the decoder is the passenger flow distribution prediction result generated by the model based on the context features of the boarding event. Its output format naturally matches the dimension of the actual passenger flow distribution vector. For all line stations after the boarding station ID, the predicted distribution is standardized by format conversion and numerical normalization, processing it into a predicted passenger flow distribution vector with the same dimension and data format as the actual passenger flow distribution vector, thus eliminating the difference in data format.
[0076] For example, for the boarding event of vehicle No. 806 mentioned above, the predicted distribution of alighting passengers output by the decoder is formatted to obtain a predicted distribution vector of alighting passengers of the same dimension as [5.8, 8.9, 4.2, 6.7, 3.1, 4.9, 2.2], and the values of each dimension correspond one-to-one with the actual vector.
[0077] Finally, the cross-entropy between the predicted and actual passenger flow distribution vectors is calculated as the accuracy loss for passenger flow distribution reconstruction. Cross-entropy is a classic metric that measures the degree of difference between two probability distributions, quantifying the fit between the predicted and actual distributions. A smaller cross-entropy value indicates a higher degree of fit between the predicted and actual passenger flow distribution vectors, and a better reconstruction effect of the deep spatiotemporal feature autoencoder network on the passenger flow distribution. Conversely, a larger cross-entropy value indicates a significant deviation between the model's reconstruction results and the actual passenger flow situation.
[0078] Furthermore, using cross-entropy as the accuracy loss for passenger flow distribution reconstruction can provide a numerical loss signal for model training, allowing the model to continuously adjust parameters during iteration and gradually reduce the loss value, thereby achieving accurate reconstruction of the actual passenger flow distribution on the route.
[0079] For example, substituting the actual passenger flow distribution vector [6, 9, 4, 7, 3, 5, 2] and the predicted passenger flow distribution vector [5.8, 8.9, 4.2, 6.7, 3.1, 4.9, 2.2] obtained above into the cross-entropy calculation formula, the calculated cross-entropy value is 0.035. This value is the passenger flow distribution reconstruction accuracy loss corresponding to this ride event, and it serves as an important loss basis for model training in the calculation of the subsequent total training loss.
[0080] Furthermore, after calculating the accuracy loss of passenger flow distribution reconstruction, using anonymous passenger identifiers and time periods as constraints, sample pairs are constructed from the potential travel chain sample set, and the distance loss between the low-dimensional latent vectors corresponding to two trips belonging to the same anonymous passenger identifier and in adjacent time periods is calculated as the travel chain coherence constraint loss.
[0081] Among them, the anonymous passenger identifier is the only basis for distinguishing different individual passengers. This constraint ensures that the constructed sample pairs are records of two rides by the same passenger. The time periods are divided into categories such as morning peak, off-peak, evening peak, and nighttime according to the bus operation rules. This constraint can filter out ride events of the same passenger in adjacent time intervals, so that the sample pairs have reasonable temporal correlation.
[0082] After constructing sample pairs, the distance loss between low-dimensional latent vectors is solved by calculating the 1-cosine similarity. This calculation method can effectively quantify the feature similarity between two latent vectors. The smaller the value, the higher the feature correlation between the two trips of the same passenger, and the more coherent the feature expression of the travel chain.
[0083] For example, an anonymous passenger identified as 9012 is selected from the potential travel chain sample set. The low-dimensional latent vectors output by the encoder for the two ride events during the morning peak and off-peak are V1 and V2, respectively. The cosine similarity between the two is calculated to be 0.93, and the corresponding distance loss is 0.07. This value is the constraint loss of the coherence of the corresponding travel chain on the constructed sample.
[0084] Furthermore, the total training loss is obtained by weighted summation of the passenger flow distribution reconstruction accuracy loss and the travel chain coherence constraint loss. The weight coefficients of the two loss terms are determined based on the actual business needs of public transport passenger flow analysis and the optimization objectives of model training. After verification through multiple sets of comparative experiments, a reasonable weight ratio is configured to balance the model's ability to reconstruct the passenger flow distribution of the route group and its ability to learn the travel chain characteristics of individual passengers. The weighted summation calculation method can integrate the dual optimization objectives into a unified numerical loss signal, providing a comprehensive judgment basis for the iterative optimization of model parameters.
[0085] For example, in a certain round of model training, the accuracy loss of passenger flow distribution reconstruction is 0.035 and the loss of travel chain coherence constraint is 0.07. The weight coefficients of the two are set to 0.6 and 0.4 respectively. The total training loss is calculated to be 0.049. This value is the basis for the comprehensive loss of this round of training.
[0086] Furthermore, after obtaining the total training loss, the parameters of the deep spatiotemporal feature autoencoder network are optimized through the backpropagation algorithm. This algorithm backpropagates the numerical signal of the total training loss from the output layer to the input layer of the network layer layer by layer to calculate the gradient value of the parameters of each network layer. According to the gradient descent rule, the weights, biases and other parameters of the encoder and decoder are iteratively adjusted so that the network parameters are optimized in each round of training in the direction of reducing the total training loss, gradually approaching the dual goal of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains.
[0087] For example, the total training loss of 0.049 obtained above is substituted into the backpropagation algorithm to calculate the gradient values of each parameter of the encoder spatiotemporal convolutional layer and the decoder deconvolutional layer. The parameters are then updated and adjusted according to the preset learning rate of 0.001 to complete the network parameter optimization in this round.
[0088] Furthermore, when the training reaches the preset stopping condition, the network parameters of the encoder are saved, and the encoder becomes the trained model for inferring the intention to get off the vehicle. The preset stopping condition comprehensively considers the convergence state of the total training loss and the number of training rounds of the model. When the decrease in the total training loss after multiple consecutive iterations is lower than the preset loss threshold, or when the actual number of training rounds of the model reaches the preset maximum number of rounds, it is determined that the model training has reached a convergent and stable state, and the iterative optimization of the network parameters is stopped.
[0089] Furthermore, the decoder only plays a role in reconstructing passenger flow distribution during the model training phase. In the actual passenger disembarkation intention inference phase, it is only necessary to extract the low-dimensional latent vector of the riding context features through the encoder. Therefore, it is only necessary to save all network parameters of the encoder.
[0090] For example, the maximum number of training rounds for the preset model is 200 rounds, and the convergence threshold of the total training loss is 0.002. When the model is trained to 130 rounds, the decrease in the total training loss is less than 0.002 for 15 consecutive rounds. The training is then determined to have reached the preset stopping condition, and the parameter iteration is immediately stopped. The parameters of all network layers, such as the spatiotemporal convolutional layer and the fully connected layer of the encoder, are completely saved at this time. This encoder is a vehicle disembarkation intention inference model that can be directly put into practical application.
[0091] S140: Input the real-time collected passenger transaction sequence and vehicle operation data into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger; In this embodiment of the application, in order to infer passengers’ implicit alighting needs based on real-time ride data and determine the most likely alighting station for each passenger, it is necessary to rely on the trained alighting intention inference model to perform spatiotemporal alignment and feature extraction on real-time data, and to carry out similarity matching in combination with the semantic representation of the station, so as to achieve accurate determination of passengers’ implicit alighting station.
[0092] Specifically, the system first integrates real-time passenger transaction sequences and vehicle operation data. Based on vehicle location information and boarding timestamps and boarding station IDs in the passenger transaction sequences, it performs a spatiotemporal alignment and matching process consistent with the sample set construction. This generates real-time contextual features containing multi-dimensional information for each real-time ride event, ensuring that the real-time data features are consistent with the model training data features.
[0093] Furthermore, the generated real-time contextual features are input into the trained vehicle disembarkation intention inference model. Through feature extraction and dimensionality reduction mapping of the model, the corresponding low-dimensional latent vector of the model output is obtained.
[0094] Furthermore, the similarity between the low-dimensional latent vector and the semantic representation of each station on the preset route is calculated to obtain a matching score between the latent vector and the semantic representation of each station. The semantic representation of the station is a feature vector generated by unsupervised clustering learning based on the contextual features of the alighting passenger count and related travel event records of each station within the historical statistical period of the route. It can characterize the passenger flow characteristics and travel behavior characteristics of each station.
[0095] Finally, the matching scores calculated based on similarity are sorted, and the station ID with the highest matching score is selected as the most likely hidden drop-off station for the passenger in this ride-hailing event, thus completing the inference of the drop-off intention for a single real-time ride-hailing event.
[0096] Step S140 in the method provided in this application embodiment includes: The vehicle operation data includes at least vehicle location information, real-time passenger flow counts, real-time estimated passenger capacity, and vehicle departure time. Based on the vehicle location information and the boarding timestamp and boarding station ID in the passenger transaction sequence, a spatiotemporal alignment and matching process is executed to generate real-time context features for each real-time ride event. The real-time context features are input into the trained vehicle disembarkation intention inference model to obtain the corresponding low-dimensional latent vector output by the model. The similarity between the low-dimensional latent vector and the semantic representation of each station on the preset route is calculated to obtain a matching score with each station. The semantic representation is a feature vector generated through unsupervised clustering learning based on the contextual features of the alighting passenger count and related boarding event records of each station within the historical statistical period of the route. The station ID with the highest matching score was selected as the most likely hidden drop-off station for this ride-hailing event.
[0097] Specifically, the system first integrates real-time collected passenger transaction sequences and vehicle operation data. Vehicle operation data includes vehicle location information, real-time passenger boarding and alighting counts, real-time estimated passenger capacity, and vehicle departure times, reflecting the real-time operational status of vehicles and changes in passenger flow. Passenger transaction sequences, on the other hand, include passenger boarding timestamps, boarding station IDs, and anonymous passenger identifiers, serving as core data characterizing passenger behavior. These two types of data together constitute the foundational data source for real-time inference of passenger disembarkation intentions.
[0098] For example, in the real-time operation data of a certain bus route in a certain area, vehicle location information is transmitted back in real time through the on-board GPS, the real-time passenger flow count is collected by the infrared sensor at the door, and the passenger transaction sequence comes from the real-time transaction records of the on-board payment terminal, forming a complete real-time data system.
[0099] Furthermore, based on the vehicle location information and the boarding timestamp and boarding station ID in the passenger transaction sequence, a spatiotemporal alignment and matching process is performed to generate real-time contextual features for each real-time ride event.
[0100] The spatiotemporal alignment and matching process is consistent with the process used in constructing the potential travel chain sample set. Relying on the mapping relationship between vehicle location information and the electronic fence of the preset route station, the matching relationship between the real-time location of the vehicle corresponding to the passenger boarding timestamp and the boarding station is confirmed to ensure consistency in the time and space dimensions. Based on the matching result, the real-time operation status data of the vehicle corresponding to each real-time ride event is associated to generate real-time contextual features including boarding station ID, time period, real-time estimated passenger capacity of the vehicle at the time of boarding, and departure time. This ensures that the feature dimensions of the real-time data are consistent with the input feature dimensions during model training, ensuring that the model can effectively extract feature information.
[0101] For example, if a passenger's boarding timestamp is 8:12 and the boarding station ID is Huaihe Road Station, and the vehicle location information is combined with the vehicle GPS, it is confirmed that the vehicle is within the electronic fence range of Huaihe Road Station at that time. Then, the real-time estimated passenger capacity of the vehicle at that time (32 people) and departure time (8:13) are associated with the boarding event to generate complete real-time context features.
[0102] Furthermore, the real-time contextual features are input into the trained disembarkation intention inference model to obtain the corresponding low-dimensional latent vector output by the model. The disembarkation intention inference model is the encoder of a trained deep spatiotemporal feature autoencoder network. This encoder has learned the spatiotemporal correlation between riding contextual features and passenger disembarkation intentions through massive amounts of samples. It can accurately extract features and compress dimensions from the input high-dimensional real-time contextual features, transforming them into a low-dimensional latent vector containing the core information of the passenger's disembarkation intention. This latent vector is a compact representation of the passenger's disembarkation intention features, preserving the key spatiotemporal features that influence the passenger's disembarkation decision.
[0103] For example, a four-dimensional real-time contextual feature containing the boarding station ID, the morning peak time period, the real-time estimated passenger capacity of 32 people, and the departure time of 8:13 is input into the model. After feature transformation by the encoder, a low-dimensional latent vector with a dimension of 64 is output. This vector contains the core feature information of the passenger's intention to get off the bus.
[0104] Furthermore, the low-dimensional latent vectors are compared with the semantic representations of each station on the preset route to calculate the similarity score. The semantic representations of each station are contextual features generated through K-means++ unsupervised clustering learning, based on the passenger flow counts and related travel event records of each station within the historical statistical period of the route. These feature vectors accurately characterize the passenger flow patterns, functional attributes, and corresponding passenger disembarkation behavior features of each station, serving as a digital representation of the disembarkation intentions associated with each station.
[0105] In addition, the similarity calculation adopts the cosine similarity method, which can effectively quantify the feature similarity between the low-dimensional latent vector and the semantic representation of each station. The higher the cosine similarity value, the higher the matching score, which means that the passenger's intention to get off the bus matches the passenger flow characteristics of the corresponding station.
[0106] For example, the cosine similarity of the 64-dimensional low-dimensional latent vectors mentioned above with the 64-dimensional semantic representations of 15 stations on a certain bus route in a certain city is calculated sequentially. The matching scores of each station are 0.21, 0.89, 0.35, 0.18...0.42, respectively, with the second station having the highest matching score.
[0107] The generation process of semantic representations of route stations relies on historical operational data of the route. It selects the alighting passenger count and related boarding event context features of each station within the historical statistical period. After data cleaning and standardization, the K-means++ unsupervised clustering learning algorithm is used for feature extraction and mapping to generate a semantic representation of the station that is consistent with the dimension of the low-dimensional latent vector output by the model. This ensures dimensional matching when calculating similarity. At the same time, the semantic representation is updated regularly according to the changes in the historical passenger flow patterns of the route to ensure the accuracy of its representation of station passenger flow characteristics.
[0108] Finally, the station ID with the highest matching score is selected as the most likely hidden alighting station for this ride. Specifically, after calculating the similarity between the low-dimensional latent vector and the semantic representations of all stations, the matching scores of all stations are sorted, and the ID corresponding to the station with the highest score is selected as the most likely hidden alighting station for the passenger. This determination relies on the alighting intention feature patterns and station passenger flow characteristics learned by the model, achieving an effective analysis of the passenger's hidden alighting intention. Compared with traditional passenger flow statistics methods, it is more in line with the actual alighting needs of passengers.
[0109] For example, in the above-mentioned bus route in a certain place, the matching score of the second station after similarity calculation is 0.89, which is the highest among all stations. Therefore, the ID of this station is selected as the most likely hidden drop-off station for the passenger, thus completing the inference of the drop-off intention for this bus ride.
[0110] S150: Based on the passenger flow counts, perform Bayesian correction on the hidden alighting stations to obtain the corrected alighting stations, and aggregate them to generate cross-sectional passenger flow and OD matrix as the passenger flow analysis result.
[0111] In this embodiment of the application, in order to improve the accuracy of the alighting station determination and analyze the spatiotemporal distribution and travel characteristics of the passenger flow on the line, it is necessary to combine real-time passenger flow counts to perform Bayesian probability fusion correction on the inference results, and then carry out passenger flow data aggregation and statistics based on the correction results to generate passenger flow analysis results that can reflect the actual operating status of the line.
[0112] Specifically, the station ID with the highest matching score output by the disembarkation intention inference model is first used as the prior probability distribution of the disembarkation station for the current ride event, providing an initial probability basis for station determination at the model learning level.
[0113] Furthermore, based on the real-time passenger flow counts from vehicle operation data, the actual number of passengers alighting at subsequent stops of the associated vehicles is extracted, providing real passenger flow data support for probability correction.
[0114] Furthermore, based on the observed actual number of passengers alighting and the historical statistical patterns of passengers alighting at each station, a likelihood function based on the Poisson distribution for implicit alighting stations is constructed to achieve a probabilistic representation of the real-time observation data. According to Bayes' theorem, the prior probability distribution and the likelihood function are fused to calculate the posterior probability of each station as a true alighting station, achieving probabilistic fusion optimization between model inference and actual observation. The station ID with the highest posterior probability is selected as the corrected alighting station after Bayesian correction.
[0115] Furthermore, based on the corrected alighting station and corresponding boarding station IDs of all boarding events, an origin-destination (OD) matrix is constructed. Based on the OD matrix and the station sequence of the route, the cross-sectional passenger flow of each pair of adjacent stations is counted, that is, the number of passengers whose boarding station is located upstream of the section and whose corrected alighting station is located downstream of the section is counted.
[0116] Finally, based on preset thresholds, peak and low-load sections of passenger flow are identified from the cross-sectional passenger flow, the main passenger flow directions are calculated and screened from the OD matrix, and key travel corridors of the route are identified by combining cross-sectional passenger flow data, thus completing a comprehensive passenger flow data aggregation analysis.
[0117] Step S150 in the method provided in this application embodiment includes: The station ID with the highest matching score, output by the disembarkation intention inference model, is used as the prior probability distribution of the disembarkation station for the current travel event. Based on the real-time passenger flow counts from the vehicle operation data, extract the actual number of passengers getting off the vehicle at subsequent stops that are associated with the current ride event. Based on the observed actual number of passengers getting off the bus and the statistical patterns of historical passengers getting off the bus at each station, a likelihood function for the hidden drop-off stations is constructed, wherein the likelihood function is constructed based on the Poisson distribution; According to Bayes' theorem, by combining the prior probability distribution and the likelihood function, the posterior probability of each station being the actual drop-off point is calculated. The station ID with the highest posterior probability is selected as the corrected drop-off station after Bayesian correction.
[0118] Based on the corrected alighting station and the corresponding boarding station ID for all boarding events, the number of passengers from each boarding station ID to each corrected alighting station is counted, and an origin-destination (OD) matrix is constructed. The steps for constructing the origin-end point OD matrix include: Initialize an N×N matrix with all stations on the line as rows and columns, where N is the total number of stations; Iterate through all boarding events to find the corrected alighting station and the corresponding boarding station ID; For each ride event, increment the cell count in the matrix corresponding to the boarding station ID row and the corrected alighting station column by 1; After traversal, the complete origin-end point (OD) matrix is obtained; Based on the origin-destination OD matrix, according to the order of the route station sequence, for each pair of adjacent stations, the number of passengers whose boarding station ID is upstream of the current interval and whose corrected alighting station is downstream of the current interval is counted, and the cross-sectional passenger flow is generated. Based on the passenger flow at the cross-section, identify the peak passenger flow cross-section and the low-load cross-section; The peak passenger flow section is the section where the passenger flow exceeds the preset peak threshold, and the low load section is the section where the passenger flow is lower than the preset low load threshold. Based on the origin-destination (OD) matrix, the main passenger flow directions and key travel corridors are analyzed; The main passenger flow direction is obtained by calculating the ratio of passenger flow to total passenger flow for each origin-destination pair in the origin-destination OD matrix, and filtering out origin-destination pairs whose ratio exceeds a preset flow direction threshold. The key travel corridor is obtained by identifying multiple consecutive station intervals that are continuous in the route station sequence and whose passenger flow at all adjacent station cross-sections exceeds a preset corridor threshold.
[0119] Specifically, the station ID with the highest matching score, output by the disembarkation intention inference model, is first used as the prior probability distribution of the disembarkation station for the current travel event. In this model, the prior probability distribution is the initial probability representation of the matching relationship between passenger disembarkation intention features and stations learned by the model based on historical samples. The station ID with the highest matching score corresponds to the highest prior probability, while other stations are assigned corresponding low probability values according to their matching scores, forming a complete probability distribution.
[0120] For example, after a certain ride-hailing event is inferred by the model, the station with the highest matching score is station A, and the corresponding prior probability is set to 0.7. The prior probabilities of the other stations, stations B, C, and D, are 0.15, 0.1, and 0.05, respectively, which constitute the prior probability distribution of the drop-off station for this ride-hailing event.
[0121] Furthermore, based on the real-time passenger flow counts from vehicle operation data, the actual number of passengers alighting at subsequent stops associated with the current boarding event is extracted. Based on the actual number of alighting passengers observed and the historical alighting passenger statistics at each stop, a likelihood function for implicit alighting stations is constructed.
[0122] The likelihood function is based on the Poisson distribution. The Poisson distribution is often used to describe the number of rare events occurring within a unit of time or space, and it is well-suited to the distribution characteristics of discrete passenger flow data such as the number of people getting off at bus stops. The historical statistical patterns of the number of people getting off at each stop provide the mean parameter for the Poisson distribution. This mean parameter is determined by the average number of people getting off at each stop within the historical statistical period of the statistical route. The core function of the likelihood function is to quantify the probability of observing the actual number of people getting off at a given stop.
[0123] For example, the average number of people getting off at station A during the historical statistical period is 10. Based on the Poisson distribution, a likelihood function is constructed. When the actual number of people getting off is observed to be 12, the likelihood function value of this observation value when station A is the actual drop-off station is calculated to be 0.108. Similarly, the likelihood function values corresponding to stations B, C, and D can be calculated to be 0.038, 0.061, and 0.089, respectively.
[0124] Furthermore, according to Bayes' theorem, by fusing the prior probability distribution and the likelihood function, the posterior probability of each station being a true alighting point can be calculated. In Bayes' theorem, the numerator is the product of the prior probability of a station and the corresponding likelihood function value, and the denominator is the sum of the numerator values of all stations, i.e., the normalization constant. By calculating using this formula, the prior probability and the probability information from real-time observation data can be fused to obtain the normalized posterior probability of each station being a true alighting point.
[0125] For example, the numerator of station A is 0.7 × 0.108 = 0.0756, station B is 0.15 × 0.038 = 0.0057, station C is 0.1 × 0.061 = 0.0061, and station D is 0.05 × 0.089 = 0.00445. The sum of the denominators is 0.0756 + 0.0057 + 0.0061 + 0.00445 = 0.09185. The posterior probabilities of stations A, B, C, and D are calculated to be 0.823, 0.062, 0.066, and 0.048, respectively.
[0126] Finally, the station ID with the highest posterior probability is selected as the corrected alighting station after Bayesian correction. The posterior probability integrates information from the model's prior knowledge and real-time passenger flow observation data. Its value directly reflects the credibility of a station as a true alighting station. Selecting the station ID with the highest value can minimize the error of a single model inference and improve the accuracy of alighting station determination.
[0127] For example, among the above stations, station A has the highest posterior probability of 0.823. Therefore, the ID of station A is selected as the corrected alighting station after Bayesian correction for this ride event.
[0128] Furthermore, after determining the corrected alighting station for all boarding events, based on the corrected alighting station and the corresponding boarding station ID for all boarding events, the number of passengers from each boarding station ID to each corrected alighting station is counted, and an origin-destination (OD) matrix is constructed.
[0129] Specifically, first, an N×N matrix with all zeros is initialized, with all stations on the route as rows and columns. Here, N is the total number of stations on the route, the rows of the matrix represent boarding stations, the columns represent corrected alighting stations, and the values in the matrix cells represent the number of passengers traveling from the corresponding boarding station to the corrected alighting station.
[0130] Subsequently, the corrected alighting station and the corresponding boarding station ID of all travel events are traversed. For each travel event, the row containing the corresponding boarding station ID and the column containing the corrected alighting station in the matrix are found, and the count value of the cell is incremented by 1. After all travel events have been traversed, the complete origin-destination (OD) matrix can be obtained. This matrix can clearly show the passenger travel correlation and traffic distribution between stations on the route.
[0131] For example, a certain route has 10 stations. A 10×10 all-zero matrix is initialized. When the boarding station ID of a certain ride event is 3 and the corrected alighting station ID is 7, the count value of the cell in the 3rd row and 7th column of the matrix is incremented by 1. After traversing all ride events, the value in the 3rd row and 7th column of the matrix is 45, which means that the number of passengers from station 3 to station 7 is 45.
[0132] Furthermore, based on the origin-destination (OD) matrix, and according to the sequence of station locations, for each pair of adjacent stations, the number of passengers whose boarding station ID is upstream of the current interval and whose corrected alighting station is downstream of the current interval is counted, thus generating cross-sectional passenger flow.
[0133] Among them, the cross-sectional passenger flow is the core indicator for measuring the passenger flow load of each section of the line. The section formed by adjacent stations is a passenger flow cross-section. The total number of passengers from all the upstream boarding stations to all the downstream alighting stations of this cross-section can intuitively reflect the actual passenger flow carrying capacity of this cross-section.
[0134] For example, the adjacent stations 4 and 5 in the route station sequence constitute a passenger flow section. The total number of passengers with boarding station IDs of 1, 2, 3, and 4 and corrected alighting station IDs of 5, 6, 7, 8, 9, and 10 is counted, and the passenger flow of this section is 89 people, which is the passenger flow of this section.
[0135] Furthermore, based on cross-sectional passenger flow, peak-hour and low-load cross-sections are identified. Both the preset peak threshold and the preset low-load threshold are determined based on historical passenger flow data from the same period. The preset peak threshold is typically set to the higher percentile of the historical passenger flow data, such as the top 20% of the cross-sectional passenger flow. The preset low-load threshold is set to the lower percentile of the historical passenger flow data, such as the bottom 20% of the cross-sectional passenger flow. The passenger flow of each cross-section is compared with these two thresholds; cross-sections exceeding the preset peak threshold are considered peak-hour cross-sections, and cross-sections below the preset low-load threshold are considered low-load cross-sections.
[0136] For example, the top 20% of the historical passenger flow data for a certain route corresponds to 100 people, and the bottom 20% corresponds to 40 people. The passenger flow at a certain section is 120 people, which exceeds the preset peak threshold and is therefore determined to be a peak passenger flow section. The passenger flow at another section is 35 people, which is below the preset low load threshold and is therefore determined to be a low load section.
[0137] Furthermore, based on the origin-destination (OD) matrix, the main passenger flow directions and key travel corridors are analyzed. The main passenger flow directions are obtained by calculating the ratio of passenger volume to total passenger volume for each origin-destination pair in the OD matrix, and filtering out origin-destination pairs whose ratios exceed a preset flow direction threshold. This preset threshold is determined based on data analysis of the target route's historical statistical periods; for example, a passenger volume ratio > 1.5% indicates that such origin-destination pairs reflect the most critical passenger travel directions on the route.
[0138] For example, a route has a total passenger flow of 1000 people, and the passenger flow between the origin and destination points (stations 2-6) is 20 people, corresponding to a ratio of 2%. This exceeds a preset flow direction threshold of 1.5%, and is therefore identified as a major passenger flow direction. Key travel corridors are identified by recognizing multiple consecutive station intervals in the route's station sequence where the passenger flow at all adjacent stations exceeds a preset corridor threshold. The preset corridor threshold is determined based on data analysis of the target route's historical statistical periods. For example, a corridor consisting of multiple consecutive adjacent station intervals meeting the condition (passenger flow at one station > 75% of the historical passenger flow) reflects a continuous operational segment with highly concentrated passenger flow on the route.
[0139] For example, the cross-sectional passenger flow of the three adjacent station intervals of the line station sequence, namely 3-4, 4-5, and 5-6, all exceed 75% of the historical cross-sectional passenger flow (corresponding to a value of 85 people). These three consecutive station intervals constitute the key travel corridor of the line.
[0140] Through the above steps, a complete process from Bayesian correction of implicit alighting points to passenger flow data aggregation and analysis was achieved. This not only improved the accuracy of alighting point determination through probabilistic fusion correction, but also uncovered key characteristics of the route passenger flow, such as the origin-destination relationship, section load, core flow direction, and concentrated corridors, through the generation of OD matrix and cross-sectional passenger flow. The generated passenger flow analysis results can provide comprehensive and practical scientific basis for operational decisions such as public transport capacity allocation, network optimization, and station resource allocation.
[0141] The embodiments of this application, through the specific implementation methods described above, achieve the following technical effects: This application proposes a passenger flow analysis method and apparatus based on deep learning adaptive feature extraction. First, it collects passenger transaction sequences, vehicle operation sequences, and passenger boarding and alighting counts within a statistical period for the target route. After cleaning, normalizing, and associating the data, a multi-dimensional passenger flow analysis data foundation is constructed to ensure that the data fully reflects passenger travel and vehicle operation characteristics. Next, the passenger transaction sequences and vehicle operation sequences are spatiotemporally aligned and matched to generate ride event records, organize initial travel chains, and extract contextual features, constructing a potential travel chain sample set indexed by anonymous passenger identifiers to provide structured sample support for model training. Finally, a deep spatiotemporal feature autoencoder network is constructed to maximize the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains. With consistency as the dual optimization objective, the total training loss is obtained by calculating the accuracy loss of passenger flow distribution reconstruction and the travel chain coherence constraint loss, and then weighted summing them. The network parameters are iteratively optimized through backpropagation to train a model for inferring alighting intentions. Next, real-time passenger transaction sequences and vehicle operation data are spatiotemporally aligned to generate real-time contextual features, which are input into the model to obtain low-dimensional latent vectors. These vectors are then matched with the semantic representations of each station on the route to determine the most likely latent alighting station for each passenger. Finally, a Poisson distribution likelihood function is constructed based on passenger flow counts. The latent alighting stations are corrected by fusing prior probabilities and observation data using Bayes' theorem. The data are then aggregated to generate cross-sectional passenger flow and origin-destination (OD) matrices, completing a full-dimensional passenger flow analysis.
[0142] The technical solution proposed in this application solves the problems of traditional public transport passenger flow analysis, such as reliance on manual statistics, difficulty in accurately inferring hidden drop-off points, poor correlation of passenger flow data, low analysis accuracy, and strong lag, through the technical process of "data collection-sample construction-model training-intent inference-correction aggregation". It avoids passenger flow misjudgment and analysis bias, and improves the accuracy, comprehensiveness and real-time performance of public transport passenger flow analysis.
[0143] Example 2, as shown in the appendix Figure 2 As shown, based on the inventive concept of a passenger flow analysis method based on deep learning adaptive feature extraction provided in Embodiment 1, this application also provides a passenger flow analysis device based on deep learning adaptive feature extraction, specifically including: Data acquisition module 01 is used to acquire passenger transaction sequence, vehicle operation sequence and passenger boarding and alighting count of the target route within the statistical period; The travel chain construction module 02 is used to perform spatiotemporal alignment and matching of the passenger transaction sequence and the vehicle operation sequence to construct a potential travel chain sample set indexed by anonymous passenger identifiers. Model training module 03 is used to construct a deep spatiotemporal feature autoencoder network with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains, and to train the disembarkation intention inference model. The station inference module 04 is used to input the real-time collected passenger transaction sequence and vehicle operation data into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger. The passenger flow aggregation module 05 is used to perform Bayesian correction on the hidden alighting stations based on the passenger flow counts, obtain the corrected alighting stations, and aggregate them to generate cross-sectional passenger flow and OD matrix as passenger flow analysis results.
[0144] In one embodiment, the data acquisition module 01 is further configured to: the passenger transaction sequence includes multiple passengers' boarding timestamps, boarding station IDs, and anonymous passenger identifiers; and the vehicle operation sequence includes multiple timestamps and corresponding vehicle locations.
[0145] In one embodiment, the travel chain construction module 02 is further configured to: generate arrival time windows and departure time windows for each station based on the mapping relationship between vehicle location and preset route station electronic fences, combined with timestamps in the vehicle operation sequence; match the boarding timestamps in the passenger transaction sequence with the arrival time window sequence, and when the boarding timestamp falls into a certain arrival time window, bind this transaction with the corresponding vehicle identifier, boarding station ID, and departure time window to form a ride event record; use the anonymous passenger identifier as the primary key, arrange all ride event records under the same identifier in ascending order according to the boarding timestamp to form an initial travel chain; associate and extract the context features required for constructing samples for each ride event record in the initial travel chain; the context features include at least the boarding station ID, time segment, real-time estimated passenger capacity of the vehicle at the time of boarding, and departure time corresponding to the departure time window; and construct a potential travel chain sample set indexed by the anonymous passenger identifier based on all ride event records and associated context features.
[0146] Furthermore, the travel chain construction module 02 also includes: determining the vehicle identifier and departure time window bound to the ride event record; retrieving all historical passenger flow counts generated by the vehicle before the current departure time window, wherein the historical passenger flow counts are obtained by infrared sensors installed on the front and rear doors of the vehicle; and accumulating the net number of passengers boarding in the historical passenger flow counts to obtain the real-time estimated passenger capacity of the vehicle at the time the ride event occurs.
[0147] In one embodiment, the model training module 03 is further configured to: construct an encoder for a deep spatiotemporal feature autoencoder network, wherein the input of the encoder is the contextual features of the ride event record, and the output is the corresponding low-dimensional latent vector; construct a decoder for the deep spatiotemporal feature autoencoder network, wherein the input of the decoder is the low-dimensional latent vector, and the output is the predicted distribution of alighting passengers from the current boarding station ID to the end of the route; based on the alighting passenger count, form the actual alighting passenger distribution, and calculate the difference between the predicted alighting passenger distribution and the actual alighting passenger distribution as the accuracy of the passenger distribution reconstruction. The training loss is calculated as follows: using the anonymous passenger identifier and time segment as constraints, sample pairs are constructed from the potential travel chain sample set, and the distance loss between the low-dimensional latent vectors corresponding to two trips belonging to the same anonymous passenger identifier and in adjacent time segments is calculated as the travel chain coherence constraint loss; the passenger flow distribution reconstruction accuracy loss and the travel chain coherence constraint loss are weighted and summed to obtain the total training loss, and the parameters of the deep spatiotemporal feature autoencoder network are optimized through the backpropagation algorithm; when the training reaches the preset stopping condition, the network parameters of the encoder are saved, and the encoder is the trained disembarkation intention inference model.
[0148] Furthermore, the model training module 03 also includes: extracting the vehicle identifier associated with the current ride event record and the alighting passenger count corresponding to each station after the boarding station ID from the boarding passenger count data; arranging the alighting passenger count into a true alighting passenger distribution vector according to the route station sequence order; processing the alighting passenger flow prediction distribution output by the decoder into a predicted alighting passenger flow distribution vector; and calculating the cross-entropy between the predicted alighting passenger flow distribution vector and the true alighting passenger flow distribution vector as the accuracy loss of the passenger flow distribution reconstruction.
[0149] In one embodiment, the station inference module 04 is further configured to: the vehicle operation data include at least vehicle location information, real-time passenger flow counts, real-time estimated passenger capacity, and vehicle departure time; perform a spatiotemporal alignment and matching process based on the vehicle location information and the boarding timestamp and boarding station ID in the passenger transaction sequence to generate real-time contextual features for each real-time ride event; input the real-time contextual features into the trained alighting intention inference model to obtain the corresponding low-dimensional latent vector output by the model; perform similarity calculation between the low-dimensional latent vector and the semantic representation of each station on the preset route to obtain a matching score with each station; the semantic representation is a feature vector generated by unsupervised clustering learning based on the contextual features of the alighting passenger flow count and associated ride event records of each station within the historical statistical period of the route; and select the station ID with the highest matching score as the most likely latent alighting station for this ride event.
[0150] In one embodiment, the passenger flow aggregation module 05 is further configured to: use the station ID with the highest matching score output by the disembarkation intention inference model as the prior probability distribution of the disembarkation station for the current travel event; extract the actual number of passengers disembarking at subsequent stations for vehicles associated with the current travel event based on the real-time passenger flow counts in the vehicle operation data; construct a likelihood function for the implicit disembarkation station based on the actual number of passengers disembarking and the historical disembarkation statistics of each station, wherein the likelihood function is constructed based on the Poisson distribution; calculate the posterior probability of each station as the true disembarkation station by fusing the prior probability distribution and the likelihood function according to Bayes' theorem; and select the station ID with the highest posterior probability as the corrected disembarkation station after Bayesian correction. Based on the corrected alighting stations and corresponding boarding station IDs for all travel events, the number of passengers traveling from each boarding station ID to each corrected alighting station is counted, and an origin-destination (OD) matrix is constructed. The construction steps of the origin-destination OD matrix include: initializing an N×N matrix with all stations on the route as rows and columns, where N is the total number of stations; iterating through the corrected alighting stations and corresponding boarding station IDs for all travel events; for each travel event, incrementing the cell count in the row containing the corresponding boarding station ID and the column containing the corrected alighting station by 1; after the iteration is complete, the complete origin-destination OD matrix is obtained; based on the origin-destination OD matrix, according to the route station sequence, for each pair of adjacent stations, the number of passengers traveling from each pair of adjacent stations is counted, and the number of passengers traveling from each pair of adjacent stations is counted. The number of passengers upstream of the current section and whose corrected alighting station is downstream of the current section is used to generate cross-sectional passenger flow. Based on the cross-sectional passenger flow, peak passenger flow sections and low-load sections are identified. The peak passenger flow section is the section where the passenger flow exceeds a preset peak threshold, and the low-load section is the section where the passenger flow is lower than a preset low-load threshold. Based on the origin-destination (OD) matrix, the main passenger flow directions and key travel corridors are analyzed. The main passenger flow directions are obtained by calculating the ratio of passenger flow to total passenger flow for each origin-destination pair in the origin-destination (OD) matrix and filtering out origin-destination pairs whose ratio exceeds a preset flow direction threshold. The key travel corridors are obtained by identifying multiple consecutive station sections that are continuous in the route station sequence and where the cross-sectional passenger flow between all adjacent stations exceeds a preset corridor threshold.
[0151] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
Claims
1. A passenger flow analysis method based on deep learning adaptive feature extraction, characterized in that, The method includes: Obtain passenger transaction sequence, vehicle operation sequence, and passenger boarding and alighting counts for the target route within the statistical period; The passenger transaction sequence and vehicle operation sequence are spatiotemporally aligned and matched to construct a potential travel chain sample set indexed by anonymous passenger identifiers; A deep spatiotemporal feature autoencoder network was constructed to train a disembarkation intention inference model with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains. The real-time collected passenger transaction sequence and vehicle operation data are input into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger. Based on the passenger flow counts, Bayesian correction is performed on the hidden alighting stations to obtain corrected alighting stations. These are then aggregated to generate cross-sectional passenger flow and OD matrices, which serve as the passenger flow analysis results.
2. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, The passenger transaction sequence includes multiple passengers' boarding timestamps, boarding station IDs, and anonymous passenger identifiers, while the vehicle operation sequence includes multiple timestamps and corresponding vehicle locations.
3. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, The passenger transaction sequence and vehicle operation sequence are spatiotemporally aligned and matched to construct a potential travel chain sample set indexed by anonymous passenger identifiers, including: Based on the mapping relationship between vehicle location and preset route station electronic fence, and combined with the timestamp in the vehicle operation sequence, the arrival time window and departure time window of the vehicle to each station are generated. The boarding timestamp in the passenger transaction sequence is matched with the arrival time window sequence. When the boarding timestamp falls into a certain arrival time window, the transaction is bound with the corresponding vehicle identifier, boarding station ID and departure time window to form a ride event record. Using the anonymous passenger identifier as the primary key, all ride event records under the same identifier are sorted in ascending order according to the boarding timestamp to form an initial travel chain; For each ride event record in the initial travel chain, associate and extract the contextual features required to construct the sample; The context features include at least the boarding station ID, time period, real-time estimated passenger capacity of the vehicle at the time of boarding, and departure time corresponding to the departure time window; Based on all ride event records and associated contextual features, a potential travel chain sample set indexed by anonymous passenger identifiers is constructed.
4. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 3, characterized in that, The steps for obtaining the real-time estimated passenger capacity of the vehicle upon boarding include: Determine the vehicle identifier and departure time window associated with the ride event record; Retrieve all historical passenger flow counts generated before the current departure time window, wherein the historical passenger flow counts are obtained by infrared sensors installed on the front and rear doors of the vehicle; The net number of passengers boarding the bus is accumulated from the historical passenger flow counts to obtain the real-time estimated passenger capacity of the vehicle at the time the boarding event occurs.
5. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, A deep spatiotemporal feature autoencoder network is constructed with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains. A disembarkation intention inference model is trained, including: Construct an encoder for a deep spatiotemporal feature autoencoder network, wherein the input of the encoder is the contextual features of the ride event record, and the output is the corresponding low-dimensional latent vector; Construct a decoder for the deep spatiotemporal feature autoencoder network, wherein the input of the decoder is the low-dimensional latent vector, and the output is the predicted distribution of alighting passenger flow from the current boarding station ID to the end of the line for all subsequent stations. Based on the passenger disembarkation count, the actual passenger disembarkation distribution is formed, and the difference between the predicted passenger disembarkation distribution and the actual passenger disembarkation distribution is calculated as the passenger flow distribution reconstruction accuracy loss. Using the anonymous passenger identifier and time segment as constraints, sample pairs are constructed from the potential travel chain sample set, and the distance loss between the low-dimensional latent vectors corresponding to two trips belonging to the same anonymous passenger identifier and in adjacent time segments is calculated as the travel chain coherence constraint loss. The total training loss is obtained by weighted summing of the passenger flow distribution reconstruction accuracy loss and the travel chain coherence constraint loss, and the parameters of the deep spatiotemporal feature autoencoder network are optimized by backpropagation algorithm. When the training reaches the preset stopping condition, the network parameters of the encoder are saved, and the encoder is the trained vehicle disembarkation intention inference model.
6. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 5, characterized in that, Based on the passenger disembarkation count, a true passenger disembarkation distribution is formed, and the difference between the predicted passenger disembarkation distribution and the true passenger disembarkation distribution is calculated as the passenger flow distribution reconstruction accuracy loss, including: Extract the vehicle identifier associated with the current ride event record and the corresponding alighting passenger counts for each station after the boarding station ID from the passenger flow count data. Arrange the alighting passenger counts into a true alighting passenger distribution vector according to the route station sequence; The predicted passenger flow distribution output by the decoder is processed into a predicted passenger flow distribution vector. The cross-entropy between the predicted passenger flow distribution vector and the actual passenger flow distribution vector is calculated as the accuracy loss of the passenger flow distribution reconstruction.
7. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, The real-time collected passenger transaction sequences and vehicle operation data are input into the disembarkation intention inference model to determine the most likely hidden disembarkation point for each passenger, including: The vehicle operation data includes at least vehicle location information, real-time passenger flow counts, real-time estimated passenger capacity, and vehicle departure time. Based on the vehicle location information and the boarding timestamp and boarding station ID in the passenger transaction sequence, a spatiotemporal alignment and matching process is executed to generate real-time context features for each real-time ride event. The real-time context features are input into the trained vehicle disembarkation intention inference model to obtain the corresponding low-dimensional latent vector output by the model. The similarity between the low-dimensional latent vector and the semantic representation of each station on the preset route is calculated to obtain a matching score with each station. The semantic representation is a feature vector generated through unsupervised clustering learning based on the contextual features of the alighting passenger count and related boarding event records of each station within the historical statistical period of the route. The station ID with the highest matching score was selected as the most likely hidden drop-off station for this ride-hailing event.
8. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, Based on the passenger flow counts, Bayesian correction is performed on the hidden alighting stations to obtain corrected alighting stations, including: The station ID with the highest matching score, output by the disembarkation intention inference model, is used as the prior probability distribution of the disembarkation station for the current travel event. Based on the real-time passenger flow counts from the vehicle operation data, extract the actual number of passengers getting off the vehicle at subsequent stops that are associated with the current ride event. Based on the observed actual number of passengers getting off the bus and the statistical patterns of historical passengers getting off the bus at each station, a likelihood function for the hidden drop-off stations is constructed, wherein the likelihood function is constructed based on the Poisson distribution; According to Bayes' theorem, by combining the prior probability distribution and the likelihood function, the posterior probability of each station being the actual drop-off point is calculated. The station ID with the highest posterior probability is selected as the corrected drop-off station after Bayesian correction.
9. The passenger flow analysis method based on deep learning adaptive feature extraction according to claim 1, characterized in that, Aggregate and generate cross-sectional passenger flow and OD matrix, including: Based on the corrected alighting station and the corresponding boarding station ID for all boarding events, the number of passengers from each boarding station ID to each corrected alighting station is counted, and an origin-destination (OD) matrix is constructed. The steps for constructing the origin-end point OD matrix include: Initialize an N×N matrix with all stations on the line as rows and columns, where N is the total number of stations; Iterate through all boarding events to find the corrected alighting station and the corresponding boarding station ID; For each ride event, increment the cell count in the matrix corresponding to the boarding station ID row and the corrected alighting station column by 1; After traversal, the complete origin-end point (OD) matrix is obtained; Based on the origin-destination OD matrix, according to the order of the route station sequence, for each pair of adjacent stations, the number of passengers whose boarding station ID is upstream of the current interval and whose corrected alighting station is downstream of the current interval is counted, and the cross-sectional passenger flow is generated. Based on the passenger flow at the cross-section, identify the peak passenger flow cross-section and the low-load cross-section; The peak passenger flow section is the section where the passenger flow exceeds the preset peak threshold, and the low load section is the section where the passenger flow is lower than the preset low load threshold. Based on the origin-destination (OD) matrix, the main passenger flow directions and key travel corridors are analyzed; The main passenger flow direction is obtained by calculating the ratio of passenger flow to total passenger flow for each origin-destination pair in the origin-destination OD matrix, and filtering out origin-destination pairs whose ratio exceeds a preset flow direction threshold. The key travel corridor is obtained by identifying multiple consecutive station intervals that are continuous in the route station sequence and whose passenger flow at all adjacent station cross-sections exceeds a preset corridor threshold.
10. A passenger flow analysis device based on deep learning adaptive feature extraction, characterized in that, The apparatus is used to perform a passenger flow analysis method based on deep learning adaptive feature extraction as described in any one of claims 1-9, the apparatus comprising: The data acquisition module is used to acquire passenger transaction sequences, vehicle operation sequences, and passenger boarding and alighting counts for the target route within the statistical period. The travel chain construction module is used to perform spatiotemporal alignment and matching of the passenger transaction sequence and the vehicle operation sequence, and to construct a potential travel chain sample set indexed by anonymous passenger identifiers. The model training module is used to construct a deep spatiotemporal feature autoencoder network with the dual optimization objectives of maximizing the accuracy of passenger flow distribution reconstruction and the consistency of potential travel chains, and to train the disembarkation intention inference model. The station inference module is used to input the real-time collected passenger transaction sequence and vehicle operation data into the disembarkation intention inference model to determine the most likely hidden disembarkation station for each passenger. The passenger flow aggregation module is used to perform Bayesian correction on the hidden alighting stations based on the passenger flow counts, obtain the corrected alighting stations, and aggregate them to generate cross-sectional passenger flow and OD matrix as the passenger flow analysis result.