Customized bus route generation method and system based on passenger travel big data
By combining passenger travel big data and a spatiotemporal graph attention network model, virtual stops and customized bus routes are generated, solving the problem of insufficient passenger demand response in existing bus route planning. This enables more accurate demand forecasting and route optimization, improving the operational efficiency and feasibility of the bus system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN URBAN PLANNING & DESIGN INST
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-08
AI Technical Summary
Existing bus route planning technologies are unable to respond to changes in passenger travel demand in real time, resulting in some routes being overcrowded and congested, while others have idle capacity. Furthermore, they lack effective perception of station congestion and actual passenger waiting behavior, making it difficult to generate customized bus routes that meet passenger needs.
By acquiring passenger origin-destination (OD) records, bus card swipe records, platform surveillance videos, and road network data, and using object detection and multi-object tracking technologies, the system extracts the number of people waiting, boarding and alighting, and stop time, constructs a spatiotemporal demand tensor, and uses a spatiotemporal graph attention network model to predict boarding and alighting demand and congestion risk, generates a virtual stop candidate set, and finally forms a customized bus route and outputs departure schedules and timetables between stations.
It improved the accuracy of passenger demand forecasting and the relevance of route generation, reduced empty running rate and invalid stop rate, and improved the feasibility of bus route implementation and travel efficiency.
Smart Images

Figure CN121998376A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of route planning technology, and more specifically to a method and system for generating customized bus routes based on big data of passenger travel. Background Technology
[0002] With the continuous expansion of urban scale, the deepening separation of work and residence, and the increasing diversification of commuting needs, traditional fixed bus routes are gradually becoming unable to meet passengers' demands for efficient, punctual, and differentiated travel in some areas. Especially between industrial parks, large residential areas, transportation hubs, schools, hospitals, and business districts, passenger travel typically exhibits obvious tidal, clustering, and repetitive patterns, forming relatively stable travel corridors during morning and evening rush hours. Existing conventional bus routes are usually set up based on long-term statistical experience, resulting in long adjustment cycles and difficulty in responding promptly to changes in regional passenger flow. This leads to a situation where, on the one hand, some routes are consistently overloaded and severely congested, while on the other hand, some routes suffer from idle capacity and high empty-running rates. Therefore, how to dynamically generate customized bus routes that better align with passenger travel patterns based on actual travel needs has become an important research direction in the field of intelligent transportation.
[0003] Currently, for route planning of customized or demand-responsive buses, existing technologies typically rely on reservation information, card swipe records, historical origin-destination (OD) data, or manual survey results to statistically analyze passenger demand and design routes or select stops based on demand hotspots. While this approach can improve the match between routes and demand to some extent, it still has several limitations. First, existing technologies lack effective perception of actual passenger waiting behavior, station congestion levels, vehicle dwell time, and the situation of people unable to board after the bus is full. They often rely solely on card swipe records, reservation records, or historical OD data for demand analysis. However, card swipe data only reflects completed travel behavior and cannot reflect potential unmet needs; reservation data is also easily limited by users' active submissions, making it difficult to comprehensively cover all travelers. As a result, there is still a discrepancy between the generated route plan and the actual station operation status.
[0004] Secondly, existing technologies for passenger flow modeling often employ single time-series statistics, cluster analysis, or simple graphical models for demand forecasting. These methods typically only describe historical demand scales and struggle to simultaneously characterize spatial relationships between different areas, dynamic changes between different time windows, and the impact of the external operating environment on passenger flow. Particularly when road conditions change, bus stop congestion fluctuates, or localized demand surges occur, existing methods fall short in representing the spatiotemporal evolution of passenger flow trends, thus affecting the accuracy of subsequent route generation.
[0005] Secondly, most existing customized bus route generation technologies treat bus stops as fixed facilities, primarily filtering and combining existing bus stops within their boundaries. They lack a mechanism for automatically discovering virtual stops along demand corridors and applying refined constraints. For scenarios where existing stops are poorly laid out or deviate significantly from actual passenger pick-up and drop-off locations, relying solely on existing stops for route organization can easily lead to excessively long walking distances for passengers, low passenger pick-up and drop-off efficiency, and significant route detours. Furthermore, some existing solutions do not adequately consider factors such as road width, no-stopping conditions, and the risk of queue overflow, potentially causing safety or feasibility issues when the generated routes are actually implemented.
[0006] Existing spatiotemporal modeling methods for public transport passenger flow prediction typically employ graph neural networks, temporal convolutional networks, or attention networks based on fixed adjacency relationships to predict passenger flow at stations or grids. However, most of these methods only utilize road topology adjacency relationships or historical flow correlations for feature propagation, failing to incorporate prior constraints directly related to customized bus route formation, such as tidal travel corridors, road no-stopping conditions, station queuing spillover risks, and the feasibility of virtual stops, into the prediction model. This leads to the model's tendency to over-aggregate neighboring nodes unrelated to route formation during information transmission between nodes, resulting in demand representation bias, unstable hotspot corridor identification, and insufficient sensitivity to abnormally congested areas. Furthermore, existing models often use a single adjacency matrix to describe node relationships, making it difficult to simultaneously characterize the differences between road physical connectivity and historical OD flow correlations. This causes a disconnect between the prediction results and subsequent virtual stop selection, route skeleton generation, and insertion point optimization, ultimately affecting the relevance, feasibility, and optimization effectiveness of the generated routes.
[0007] Furthermore, existing technologies typically focus on single indicators such as coverage, operating mileage, or operating costs during the route optimization phase, rarely incorporating factors like waiting area congestion risk, degree of service duplication, stop time, and the number of passengers stranded after vehicles are fully loaded into the route formation decision-making process. This results in route plans that, while theoretically feasible, may still encounter problems in actual operation, such as severe station congestion, excessively long stop times, significant local service duplication, or unreasonable departure schedules. Especially during peak hours, without comprehensively considering predicted passenger flow and station operating conditions, it is difficult to formulate route plans that balance travel efficiency, operating costs, and feasibility.
[0008] Therefore, existing technologies still lack a technical solution that can integrate passenger origin-destination (OD) records, bus card swipe records, platform surveillance videos, road network data, and bus stop data; comprehensively utilize video object detection and multi-object tracking to extract dynamic features of stations; and further extract tidal demand corridors through spatiotemporal prediction models, generate a virtual stop candidate set, and complete customized bus route generation and scheduling output under constraints such as capacity and detours. To address these issues, there is an urgent need to propose a new method and system for generating customized bus routes based on big data from passenger travel. Summary of the Invention
[0009] To address the aforementioned technical problems, this invention discloses a method and system for generating customized bus routes based on passenger travel big data. The method acquires passenger origin-destination (OD) records, bus card swipe records, platform surveillance videos, road network data, and bus stop data; extracts waiting passenger numbers, boarding and alighting passenger numbers, number of passengers who did not board after the vehicle departed, and average stop time through object detection and multi-object tracking; constructs a spatiotemporal demand tensor and inputs it into a spatiotemporal graph attention network model to predict boarding and alighting demand and congestion risk; extracts tidal travel demand corridors by combining historical OD distribution and the path of minimum temporal impedance, generating a candidate set of virtual stops; inserts virtual stops under constraints of vehicle capacity, adjacent station spacing, and single-stop detour time, forming customized bus routes and generating departure schedules and timetables between stations. This solution improves the accuracy of demand forecasting, the relevance of route generation, and the feasibility of operation.
[0010] A method for generating customized bus routes based on big data of passenger travel includes the following steps:
[0011] S1. Obtain passenger OD records, bus card swipe records, platform surveillance video, road network data, and bus stop data;
[0012] S2. Perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting for the train, the number of people getting on and off the train, the arrival and departure times of the vehicles, the number of people who did not get on the train after it left the station, and the average stopping time for each station in each time window.
[0013] S3. Map OD records, card swipe records, and video extraction features to a hexagonal spatial grid and time window to construct a spatiotemporal demand tensor that represents grid travel demand and station congestion status.
[0014] S4. Input the spatiotemporal demand tensor into the spatiotemporal graph attention network model to predict the boarding and alighting demand and congestion risk of each grid in the future time period, and construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance.
[0015] S5. Generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and generate a virtual stop candidate set by combining the roadside parking areas, road width, no-parking information and queue overflow risk.
[0016] S6. Under the constraints of vehicle capacity, distance between adjacent stations and detour time per station, virtual stops are inserted into the route skeleton one by one according to the maximum increase in net revenue of the route to generate target customized bus routes. Departure times and timetables between stations are generated based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.
[0017] Preferably, in step S2, when performing target detection and multi-target tracking on the platform monitoring video, the waiting area and the door area are first identified, and then the number of passengers getting on and off the train is counted based on the passenger trajectory and the crossing events of the door area. The number of passengers who did not get on the train after the train left the station is determined based on the number of passenger targets still in the waiting area after the train left the station.
[0018] Preferably, the average stopping time is determined based on the difference between the arrival time and departure time of the same vehicle, wherein the arrival time is the time when the leading edge of the vehicle enters the platform stopping area, and the departure time is the time when the trailing edge of the vehicle leaves the platform stopping area.
[0019] Preferably, the spatiotemporal demand tensor includes at least grid boarding demand characteristics, grid alighting demand characteristics, station waiting number characteristics, number of people who did not board after the vehicle left the station characteristics, average station dwell time characteristics, and station congestion status characteristics, wherein each characteristic is aligned and encoded according to a hexagonal spatial grid and a time window.
[0020] Preferably, the spatiotemporal graph attention network model includes an input embedding layer, a spatial graph attention layer, a temporal convolutional layer, and a prediction output layer. A corridor prior gating unit is inserted between the spatial graph attention layer and the temporal convolutional layer. The corridor prior gating unit generates gating coefficients based on the minimum path overlap of temporal impedance, road no-stopping signs, queue spillover risk, and virtual docking feasibility to enhance or suppress node features and adjacent edge weights.
[0021] Preferably, the spatiotemporal graph attention network model adopts a dual adjacency matrix, which includes a spatial adjacency matrix constructed based on road connectivity and a demand adjacency matrix constructed based on historical OD flow intensity. The corridor prior gating unit performs weighted fusion on the attention weights corresponding to the two adjacency matrices respectively.
[0022] Preferably, when extracting the tidal travel demand corridor in S4, OD pairs with an intensity greater than a preset threshold are selected, and the paths with the minimum time impedance corresponding to each OD pair are superimposed and statistically analyzed. The continuous road segments with a path overlap number greater than a preset number and directional consistency greater than a preset proportion are determined as the tidal travel demand corridor.
[0023] Preferably, when generating the virtual stop candidate set in S5, road points are sampled at preset distance intervals on the demand corridor, and sampling points that meet the following conditions are selected as virtual stop candidate points: the distance from the existing bus stop is greater than a preset exclusion distance, the distance from the road intersection is greater than a preset safety distance, the road segment is not a no-parking section, and the road width is greater than a preset threshold.
[0024] Preferably, the queue overflow risk is determined based on the relationship between the queue length and the platform safety boundary. When the end of the queue exceeds the platform boundary or encroaches on the motor vehicle lane, the corresponding station is marked as a high overflow risk station, and the priority of that station and its adjacent sampling points being selected as virtual stops is reduced. The net route revenue in S6 is obtained by subtracting the additional detour time cost, duplicate service penalty cost, and congestion penalty cost from the revenue from the increased coverage passenger flow. The duplicate service penalty cost is determined based on the overlap ratio between the service radius of the virtual stop and the existing bus station, and the congestion penalty cost is determined based on the congestion risk of the corresponding station.
[0025] This application also provides a customized bus route generation system based on passenger travel big data, including:
[0026] The data acquisition module is used to acquire passenger OD records, bus card swipe records, platform surveillance videos, road network data, and bus stop data;
[0027] The video analysis module is used to perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting, boarding and alighting, vehicle arrival and departure times, number of people who did not board after the vehicle left the station, and average station dwell time for each station in each time window.
[0028] The demand tensor construction module is used to map the OD records, card swipe records and video extracted features to a hexagonal spatial grid and a time window to construct a spatiotemporal demand tensor that represents the grid travel demand and the station congestion status.
[0029] The demand forecasting and corridor extraction module is used to input the spatiotemporal demand tensor into the spatiotemporal graph attention network model, predict the boarding and alighting demand and congestion risk of each grid in the future time period, construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance.
[0030] The candidate point generation module is used to generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and to generate a virtual stop candidate set by combining the roadside parking area, road width, no-parking information and queue overflow risk.
[0031] The route generation and scheduling module is used to insert virtual stops one by one into the route skeleton under the constraints of vehicle capacity, adjacent station distance and single station detour time, so as to generate target customized bus routes and generate departure times and station timetables based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.
[0032] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0033] (1) By introducing platform monitoring video and combining target detection and multi-target tracking technologies, this invention extracts the number of people waiting, boarding and alighting, the number of people who did not board after the vehicle left the station, and the average stopping time. This enables the system to not only reflect completed travel needs but also identify unmet needs caused by factors such as full vehicle load and station congestion. Compared with solutions that rely solely on card swipe records or historical OD data, this invention provides a more comprehensive perception of the actual operating status of the station and can more accurately characterize the degree of station congestion and passenger congestion, thereby providing a data foundation that is closer to the actual operating scenario for subsequent route generation.
[0034] (2) This invention constructs a spatiotemporal demand tensor and uses a spatiotemporal graph attention network model to predict future boarding and alighting demand and congestion risk. Simultaneously, it combines historical OD distribution and the minimum path of road network temporal impedance to extract tidal travel demand corridors. This allows for the simultaneous characterization of spatial correlation, temporal evolution, and corridor clustering features during the demand prediction stage. In particular, by introducing corridor prior gating units and a double adjacency matrix, the prediction results are more consistent with subsequent route generation constraints, reducing interference from nodes unrelated to the route formation and improving the stability of hotspot corridor identification and the accuracy of demand prediction.
[0035] (3) This invention generates a route framework based on tidal travel demand corridors and generates a candidate set of virtual stops by combining roadside parking areas, road width, no-stopping information, and queue overflow risk. Under constraints of vehicle capacity, distance between adjacent stations, and detour time per station, virtual stops are inserted point by point according to the maximum increase in net revenue of the route, and finally customized bus routes are generated and departure schedules and timetables between stations are output. This scheme takes into account the coverage of new passenger flow, detour costs, duplicate services, and congestion risks, which helps to improve the targeting, feasibility, and scheduling rationality of route generation, and reduce empty running rate and invalid stop rate. Attached Figure Description
[0036] Figure 1 This is a flowchart of a customized bus route generation method based on passenger travel big data according to the present invention;
[0037] Figure 2 This is a structural diagram of a customized bus route generation system based on passenger travel big data, according to the present invention. Detailed Implementation
[0038] Those skilled in the art will understand that, in order to make the above-mentioned objects, features, and beneficial effects of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This application illustrates a method for generating customized bus routes based on big data of passenger travel, including the following steps:
[0039] S1. Obtain passenger OD records, bus card swipe records, platform surveillance video, road network data, and bus stop data;
[0040] In one embodiment, step S1 involves obtaining passenger origin-destination (OD) records for a preset period within the target area through an urban travel data platform. These OD records include at least departure location, arrival location, departure time, arrival time, and anonymous user identifier. It also involves obtaining bus card swipe records through a public transport fare collection system and a public transport operation platform. These records include at least route number, vehicle number, station number, and swipe time. Furthermore, it involves acquiring station monitoring video through cameras installed at bus stops or adjacent monitoring poles. This video video covers at least the waiting area, vehicle parking area, and passenger boarding / alighting area. Finally, it involves obtaining road network data through an electronic map platform or a transportation geographic information system. This road network data includes at least road topology, road width, no-stopping information, and time impedance information. Finally, it involves obtaining bus stop data through a public transport operation management platform. This bus stop data includes at least the station location, station number, station boundary, and associated route information. The multi-source data is then integrated into a unified data processing platform for time synchronization, number mapping, and unified storage, forming a foundational dataset for subsequent video parsing, spatiotemporal demand tensor construction, and route generation.
[0041] S11. Obtain passenger OD records. Obtain passenger OD records within a preset time range in the target area through a city travel data platform, mobile terminal location service platform, public transport reservation platform, or third-party traffic data interface. The OD record includes at least departure location, arrival location, departure time, arrival time, travel date, and anonymous user identifier; wherein, the departure location and arrival location can be represented by latitude and longitude coordinates, road grid number, or administrative block number. Preferably, to protect privacy, the original identity information is de-identified, retaining only the spatiotemporal attribute information related to travel demand modeling. Furthermore, OD records for multiple consecutive days are stored in categories of weekdays, weekends, and holidays to facilitate the subsequent construction of travel demand sample sets under different scenarios.
[0042] S12. Obtain bus card swipe records. Obtain bus card swipe records within the target area through the bus fare collection system, on-board card swipe terminal, or bus operation management platform. The card swipe records include at least the route number, vehicle number, station number, card swipe time, boarding identifier, card type, and anonymous passenger identifier; when the system supports alighting card swipes, the alighting station and alighting time can also be obtained. Preferably, the bus card swipe records are associated with basic bus route information and vehicle operation logs to form a "vehicle-route-station-card swipe event" association data table, which is used to represent the distribution of completed ride demand on existing routes. For single card swipe scenarios that only record boarding information, the passenger alighting area can be estimated by combining vehicle trajectory, historical alighting distribution, or OD inference rules.
[0043] S13. Acquire platform surveillance video. Platform surveillance video is acquired using cameras deployed on the bus stop platform, the top of the shelter, the signpost, or nearby municipal monitoring poles. The cameras are preferably video cameras with a fixed overhead or oblique viewing angle, with a capture frequency set to 15 to 30 frames per second and a video resolution of 720P, 1080P, or higher. The acquired video should at least cover the waiting area, the vehicle stopping area, and the passenger boarding / alighting area. Preferably, the video stream is uniformly accessed through a network video recorder, edge computing gateway, or video access platform, and stored using the station number, camera number, and capture time as indexes. To improve subsequent identification accuracy, the camera installation height, field of view, orientation, and corresponding platform geometric boundary information can be recorded simultaneously during the capture phase.
[0044] S14. Obtain road network data. Obtain road network data within the target area through an electronic map platform, urban traffic geographic information system, or road management database. The road network data includes at least road nodes, road edges, road length, road grade, number of lanes, road width, traffic direction, speed limit information, intersection locations, and no-stopping section information. Preferably, the road network data is converted into a topological graph structure, where road intersections are nodes and road segments are edges, and the travel time impedance, turning restrictions, and bus passability attributes of each edge are recorded. Further, historical floating car data, bus GPS data, or traffic operation monitoring data can be combined to update the travel time parameters of each road segment under different time windows.
[0045] S15. Obtain bus stop data. Obtain bus stop data through a bus operation management platform, electronic bus stop system, or bus infrastructure database. The bus stop data includes at least the stop number, stop name, stop latitude and longitude, platform length, platform boundary, route, stop type, and up / down direction attributes. Preferably, spatial relationship data between the stop and adjacent road segments, subway entrances / exits, park entrances / exits, and residential area entrances / exits are also obtained for subsequent generation of demand corridors and virtual stop candidate sets.
[0046] S16. Perform unified access and time synchronization of multi-source data. The acquired passenger OD records, bus card swipe records, platform surveillance videos, road network data, and bus stop data are accessed to a unified data processing platform. Clock correction is performed according to a unified time base, and the data is sliced according to a preset time window. Preferably, a unified mapping relationship between station numbers, vehicle numbers, and grid numbers is established for data from different sources, so that card swipe events, video recognition results, and road traffic conditions can be mapped together into a unified spatiotemporal framework.
[0047] S2. Perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting for the train, the number of people getting on and off the train, the arrival and departure times of the vehicles, the number of people who did not get on the train after it left the station, and the average stopping time for each station in each time window.
[0048] S21. Platform Monitoring Video Preprocessing. Acquire continuous video streams from the corresponding cameras at each station within the target time period. Extract frames from the video stream at a preset frame rate, preferably 10 to 15 frames per second. Perform noise reduction, brightness equalization, perspective correction, and image stabilization on the extracted video frames to reduce the impact of rain, fog, backlight, and slight shaking on the recognition results. Based on the camera installation location and platform structure, pre-mark the waiting area, vehicle stopping area, and door access area for each station, creating corresponding area mask files. The waiting area is used to count the number of people waiting, the vehicle stopping area is used to identify vehicle arrival and departure status, and the door access area is used to identify passenger boarding and alighting behavior.
[0049] S22. Passenger and Bus Target Detection. The preprocessed video frames are input into a target detection network to identify passenger and bus targets. Preferably, a YOLO series detection network is used to identify "person" and "bus" targets, outputting the bounding box, category label, and confidence score for each target. Targets with confidence scores below a preset threshold are removed to reduce false detections. For bus targets identified in adjacent frames, their spatial overlap with the vehicle stopping area is further determined to ascertain whether the vehicle is stopped at a platform.
[0050] S23. Multi-target tracking and trajectory generation. Passenger and bus targets from consecutive frames are input into the multi-target tracking module. The DeepSORT tracking method is preferably used to assign a unique tracking number to each target and generate a continuous trajectory across frames. For passenger trajectories, the time sequence of their entry into the waiting area, approach to the door area, crossing the door passage area, and leaving the waiting area is recorded. For bus trajectories, the time sequence of their entry into the vehicle stopping area, remaining stopped, and leaving the vehicle stopping area is recorded. To avoid trajectory interruptions caused by occlusion, Kalman filtering can be introduced during the trajectory prediction stage for short-term compensation of the target position.
[0051] S24. Extracting the number of waiting passengers. Within each statistical time window, the number of passengers who are in the waiting area but whose movement direction does not cross the vehicle door passage area or leave the waiting area is counted as the number of waiting passengers for that time window. Preferably, pedestrians who stop briefly but do not engage in waiting behavior are excluded. The exclusion rule is: if the target's stay time in the waiting area is less than a preset threshold and its trajectory direction is inconsistent with the main direction of the waiting area, it is not included in the number of waiting passengers. To enhance robustness, the median or weighted average of the number of waiting passengers in each frame within the time window can be taken as the final number of waiting passengers.
[0052] S25. Passenger Entry and Exit Count Extraction. When a bus is detected within the vehicle stopping area, the entry and exit event recognition for the corresponding door passage area is initiated. For any passenger trajectory, if they cross from one side of the waiting area to the inside of the door area during the vehicle's stop, it is counted as a boarding event; if they cross from the inside of the door area to the waiting area or the outside of the platform area, it is counted as an exit event. The number of passengers boarding is obtained by counting all boarding events within the same vehicle stopping cycle, and the number of passengers exiting is obtained by counting all exit events. To prevent duplicate counting caused by passengers moving back and forth in the door area, an event deduplication time threshold and a trajectory direction consistency threshold can be set.
[0053] S26. Vehicle arrival and departure times extraction. When a bus first enters the vehicle stopping area and its center point speed is below a preset threshold, that moment is determined as the vehicle's arrival time. When a bus leaves the stopping area and does not return within several consecutive frames, the first departure time is determined as the vehicle's departure time. Preferably, the arrival time can be further corrected by combining the positional relationship between the vehicle's leading edge and the platform stop line, and the departure time can be further corrected by combining the moment the vehicle's trailing edge leaves the platform boundary, thereby improving the accuracy of stop time calculation.
[0054] S27. Extraction of the number of passengers who did not board the vehicle after departure. After the same vehicle stop cycle ends, select passengers who remain in the waiting area after the vehicle's departure time and who did not participate in any boarding / crossing events during the vehicle's stop. Record this number as the number of passengers who did not board the vehicle after departure. Preferably, to avoid misclassifying newly arrived passengers as those who did not board, only passengers who entered the waiting area within a preset time before the vehicle's departure and remained there until the departure time are counted.
[0055] S28. Average Stop Time Extraction. For multiple vehicle stop events at the same station within a statistical period, the stop time for each stop event is calculated. The stop time is the time difference between the departure time and the arrival time. Then, the arithmetic mean of the multiple stop times within the statistical period is taken to obtain the average stop time of the station within that time window. Preferably, extreme stop time samples caused by traffic light malfunctions, road accidents, or abnormal parking can be removed to improve the representativeness of the average stop time.
[0056] S29. Output Results. For each station, the number of people waiting, boarding, alighting, arrival time, departure time, number of passengers who did not board after departure, and average dwell time within each time window are stored in a structured format of "station number - time window number - feature value". This data will be used as input features for the subsequent construction of the spatiotemporal demand tensor.
[0057] In some embodiments, taking bus stop A in an industrial park as an example, the camera captures video at 15 frames per second during the morning rush hour from 7:00 to 9:00. The system pre-labels the waiting area, the vehicle stopping area, and the passage areas for the two doors. At 7:35:12, a bus is detected entering the vehicle stopping area and stops at 7:35:16; the system records 7:35:16 as the arrival time. At 7:35:46, the system detects the rear edge of the vehicle leaving the platform boundary, recording it as the departure time. The total stop time for this stop is 30 seconds. During this stop cycle, 11 passenger trajectories are detected crossing from the waiting area into the door area, recorded as 11 people boarding; 3 trajectories are detected crossing from the door area to the platform area, recorded as 3 people alighting. After the vehicle departs, if there are still 4 passengers in the waiting area who entered the waiting area before departure but did not board, the number of passengers who did not board after the vehicle departs is determined to be 4. The average stopping time of multiple vehicle stop events within the time window of 7:30 to 7:45 is taken as the average stopping time within that time window, and then output together with the number of waiting passengers and the number of passengers getting on and off the vehicle.
[0058] In one embodiment, in step S2, the platform monitoring video is first subjected to frame extraction, noise reduction, and perspective correction, and the waiting area, vehicle stopping area, and door passage area are pre-labeled. Then, a target detection network is used to identify passenger targets and bus targets in the video frames, and a multi-target tracking algorithm is used to generate corresponding trajectories. The number of waiting passengers is extracted based on the number of passenger targets in the waiting area, the number of passengers getting on and off is extracted based on the events of passenger trajectories crossing the door passage area, the arrival time and departure time of the bus are determined based on the times when the bus targets enter and leave the vehicle stopping area, the number of passengers who did not get on the bus after the vehicle left the station is extracted based on the number of passenger targets that remained in the waiting area after the vehicle left the station and did not have any boarding events, and the average stopping time is calculated based on the difference between the arrival and departure times of each vehicle stopping event within the same statistical time window. Finally, the above-mentioned features extracted by each station within each time window are output in a structured manner for subsequent spatiotemporal demand tensor construction and route generation.
[0059] S3. Map OD records, card swipe records, and video extraction features to a hexagonal spatial grid and time window to construct a spatiotemporal demand tensor that represents grid travel demand and station congestion status.
[0060] In one embodiment, step S3 includes the following sub-steps: S31, constructing a hexagonal spatial grid. Based on the electronic map range of the target area, the study area is discretized into hexagonal grids to form a continuous, non-overlapping set of hexagonal spatial grids. Preferably, the side length of each hexagonal grid is set to 100 meters to 300 meters to balance spatial resolution and computational complexity. Each hexagonal grid is assigned a unique grid number, and its center point coordinates, boundary range, and relationships with adjacent grids are recorded. Because hexagonal grids have the characteristics of uniform adjacency directions and small boundary effects, they can more stably represent the spatial demand distribution around bus stops and along roads.
[0061] S32. Construct a time window sequence, dividing the preset statistical period into continuous time windows. The preferred time window length is 5 minutes, 10 minutes, or 15 minutes. Assign a unique time window number to each time window, and label different time periods throughout the day as morning peak, off-peak, evening peak, or nighttime periods. Subsequently, all OD records, card swipe records, and video extracted features are mapped to the corresponding time windows to achieve time alignment of multi-source data.
[0062] S33. OD record mapping: Spatial positioning is performed on the departure and arrival locations in the passenger OD records, mapping the departure location to the corresponding starting point hexagonal grid and the arrival location to the corresponding ending point hexagonal grid; simultaneously, the OD record is mapped to the corresponding time window based on the departure or arrival time. OD records within the same time window, and in the same starting and ending point grids, are aggregated and statistically analyzed to obtain the OD travel intensity between grids. Preferably, the departure demand, arrival demand, average travel time, and commuting directionality indicators for each grid can also be statistically analyzed as part of the subsequent demand characteristics.
[0063] S34. Card swipe record mapping: Based on bus stop data, determine the stop location corresponding to each card swipe record and map the stop location to its corresponding hexagonal grid; then map it to the corresponding time window based on the card swipe time. For boarding card swipe records, accumulate the boarding demand features of the corresponding stop grid within the time window; when there is alighting card swipe information, accumulate the alighting demand features of the corresponding stop grid; when there is no alighting card swipe information, the alighting grid can be estimated by combining vehicle trajectory, historical OD distribution, or alighting probability model, thereby completing the alighting demand features of the grid. Preferably, card swipe frequency, route coverage, and stop transfer attributes are jointly encoded as stop service features.
[0064] S35. Video feature extraction and mapping: The number of waiting passengers, boarding passengers, alighting passengers, number of passengers who did not board after the vehicle departed, and average stopping time extracted in S2 are matched to the corresponding station locations based on the station number and then mapped to the relevant hexagonal grid. Each feature is also mapped to its corresponding time window based on the statistical time period. For multiple stations within the same grid, aggregation can be performed using summation, averaging, or weighted fusion. Preferably, the video features of multiple stations are fused using station passenger flow scale or platform length as weights to obtain the waiting intensity, congestion level, dwell time level, and stopping time characteristics of that grid within the corresponding time window.
[0065] S36. Station congestion status calculation: Based on the mapped number of waiting passengers, the number of passengers who did not board the vehicle after departure, and the average stopping time, the station congestion status index is calculated. Preferably, factors such as the number of waiting passengers exceeding a preset threshold, the proportion of passengers who did not board the vehicle to the total number of waiting passengers, and the degree to which the average stopping time deviates from the historical average can be normalized and then weighted and summed to obtain the station congestion status value; then the station congestion status value is mapped to the corresponding grid and time window to characterize the congestion risk level of the grid in the corresponding time period.
[0066] S37. Spatiotemporal demand tensor construction: The multidimensional features of each hexagonal grid under each time window are stacked in a unified order to construct a three-dimensional or four-dimensional spatiotemporal demand tensor. Preferably, the spatiotemporal demand tensor can be represented as X∈R^(T×N×F), where T represents the number of time windows, N represents the number of hexagonal grids, and F represents the feature dimension corresponding to each grid. The feature dimension F includes at least: grid departure demand feature, grid arrival demand feature, number of passengers boarding at stations, number of passengers alighting at stations, number of passengers waiting for trains, number of passengers who did not board after the vehicle left the station, average stop time feature, and station congestion status feature. If necessary, auxiliary features such as road width, station density, surrounding POI type, or number of lines covered can be further added.
[0067] S38. Normalization and Missing Value Handling: To eliminate differences in the dimensions of different features, the features in each dimension of the spatiotemporal demand tensor are normalized, preferably using min-max normalization or Z-score standardization. Missing feature values can be filled using methods such as interpolation with neighboring time windows, imputation using the mean of adjacent grids, or imputation using the mean of historical time windows of the same type. For obviously anomalous feature values, they can be truncated or removed according to preset upper and lower thresholds to improve the stability of subsequent model inputs. The completed spatiotemporal demand tensor, grid adjacency relationships, station-to-grid mapping table, and time window number table are output together as the input data basis for the spatiotemporal graph attention network model in step S4.
[0068] In some embodiments, taking a core urban area as an example, the target area is divided into a hexagonal grid with a side length of 150 meters, resulting in 420 grids; the time from 6:00 to 22:00 is divided into 96 10-minute time windows. A passenger's origin-destination (OD) record shows a departure location in grid G105 and an arrival location in grid G268, with a departure time of 7:32. This record is then mapped to the 7:30-7:40 time window, and the OD intensity of G105 to G268 is incremented by 1 within this time window. A bus stop S17 is located in grid G106. Within the 7:30-7:40 time window, 18 people swipe their cards to board, 23 people wait for the bus (based on video extraction), 4 people did not board after the bus left, and the average stop time is 28 seconds. These features are then written into the feature vector of the corresponding time window in G106. After mapping all grids and all time windows, a spatiotemporal demand tensor is formed to characterize regional travel demand and station congestion.
[0069] In one embodiment, in step S3, the target area is first divided into hexagonal spatial grids, and the preset statistical period is divided into continuous time windows; then, the departure and arrival locations in the passenger OD records are mapped to the corresponding start-point and end-point grids, respectively, and mapped to the corresponding time windows according to the departure or arrival time, so as to statistically analyze the OD travel intensity between grids; the bus card swipe records are mapped to the grids according to the station locations, and mapped to the corresponding time windows according to the card swipe time, so as to form grid-level boarding demand characteristics and alighting demand characteristics; the waiting number and boarding / alighting numbers extracted in step S2 are then analyzed. The number of passengers, the number of passengers who did not board the vehicle after it left the station, and the average stopping time are mapped to the grid to which the station belongs based on its location, and then mapped to the corresponding time window according to the statistical time period to form grid-level station operation characteristics. Then, the station congestion status is calculated based on the number of waiting passengers, the number of passengers who did not board the vehicle after it left the station, and the average stopping time, and mapped to the corresponding grid and time window. Finally, the travel demand characteristics and station congestion status characteristics of each grid under each time window are stacked in a unified dimension to construct a spatiotemporal demand tensor representing the grid travel demand and station congestion status, which is used for prediction by the subsequent spatiotemporal graph attention network model.
[0070] S4. Input the spatiotemporal demand tensor into the spatiotemporal graph attention network model to predict the boarding and alighting demand and congestion risk of each grid in the future time period, and construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance.
[0071] In one embodiment, step S4 specifically includes the following sub-steps: S41, preparing model input data, using the spatiotemporal demand tensor constructed in step S3 as model input data. The spatiotemporal demand tensor uses hexagonal spatial grids as nodes and continuous time windows as sequences to record the travel demand characteristics and station congestion status characteristics of each grid within multiple historical time windows. Preferably, the characteristics include grid boarding demand, grid alighting demand, number of people waiting at stations, number of people boarding at stations, number of people alighting at stations, number of people not boarding after the vehicle leaves the station, average stopping time, and station congestion status. In addition to the spatiotemporal demand tensor, two types of node relationship data are also constructed simultaneously. The first type is road topology relationship data, used to indicate whether each grid is directly connected by roads and the traffic attributes of the corresponding roads; the second type is historical travel association relationship data, used to indicate the degree of strong or weak association between each grid based on historical OD traffic. Further, corridor prior data related to subsequent line formation is extracted, including the degree of overlap of the path with minimum time impedance, road no-stopping information, queue spillover risk, and virtual stopping feasibility.
[0072] S42. Input the spatiotemporal graph attention network model for prediction. The spatiotemporal demand tensor, road topology data, historical travel correlation data, and corridor prior data are all input into the spatiotemporal graph attention network model. The model outputs the predicted boarding demand, predicted alighting demand, and predicted congestion risk for each grid within a future target time window. Preferably, the model can perform rolling predictions for a single future time window, multiple consecutive time windows, or a specified peak period.
[0073] S43. Construct an OD intensity matrix. After obtaining the predicted boarding and alighting demand for each grid in future time periods, construct an OD intensity matrix for future time periods by combining historical OD distributions. Specifically, for each pair of origin and destination grids, calculate the OD intensity of the origin-destination pair in future time periods based on the predicted boarding demand of the origin grid, the predicted alighting demand of the destination grid, and the travel transfer probability between the origin and destination in the historical period. After completing the calculation for all origin-destination grid pairs, an OD intensity matrix reflecting the strength of future passenger flow directions is obtained. Preferably, only high-intensity OD pairs with values greater than a preset threshold are retained to reduce noise impact. The threshold can be set based on historical mean, percentile, or fixed business threshold.
[0074] S44. Extract tidal travel demand corridors. For the selected high-intensity OD pairs, calculate the corresponding minimum time impedance path in the road network. The time impedance considers not only road length but also, preferably, average travel time, intersection delay, congestion level, turning restrictions, and bus passability conditions. Then, superimpose the minimum time impedance paths corresponding to all high-intensity OD pairs onto the road network, and count the number of times each road segment is traversed by the path, the dominant direction, and continuity. A tidal travel demand corridor is defined when several consecutive road segments meet the following conditions: 1) the number of times they are repeatedly covered by high-intensity OD paths reaches a preset number; 2) the main travel directions are significantly consistent; and 3) they have high demand aggregation characteristics within the corresponding time period. Finally, output the set of tidal travel demand corridors for subsequent generation of route skeletons and virtual stop candidate sets.
[0075] The spatiotemporal graph attention network model comprises an input embedding layer, a two-branch spatial graph attention layer, a corridor prior gating unit, a temporal modeling layer, a temporal attention layer, and a multi-task prediction output layer. The structure and function of each layer are as follows: The input embedding layer maps the original multidimensional features in the spatiotemporal demand tensor to a unified feature space. Since the input features have different sources, dimensions, and ranges of variation, directly inputting them into subsequent networks can easily lead to training instability. Therefore, the original features of each grid under each time window are first normalized, and then converted into a hidden feature vector of uniform length through embedding mapping. The function of this layer is to compress heterogeneous features such as boarding demand, alighting demand, number of waiting passengers, number of passengers not yet boarding, stop time, and congestion status into a unified representation space, facilitating subsequent models to simultaneously learn spatial correlations and temporal evolution patterns.
[0076] The dual-branch spatial graph attention layer is one of the core structures of this model, comprising a road topology branch and a demand flow branch. The road topology branch describes the spatial physical adjacency relationships between grids based on the road network. For example, two grids that are close on the map but have no connecting road should have a weak spatial propagation relationship; conversely, grids continuously distributed along main roads should have a strong demand propagation relationship. This branch learns the influence of different neighboring nodes on the current node based on road network connectivity. The demand flow branch describes the travel association relationships between grids based on historical origin-destination (OD) flows. Some origin-destination grids are not geographically adjacent, but due to long-term stable commuting demand, they have a significant travel coupling relationship. This branch establishes demand adjacency relationships through historical OD strength, enabling the model to learn long-distance demand connections that are "non-adjacent but highly correlated." These two branches work in parallel, generating spatial feature representations of the current node from the perspectives of road physical structure and historical travel connections, respectively.
[0077] The corridor prior gating unit is positioned after the spatial graph attention layer and before the temporal modeling layer to directly inject business priors related to customized bus route formation into the network structure. The preferred inputs for this unit include the degree of path overlap with minimum temporal impedance, road no-stopping information, queue spillover risk, virtual stop feasibility, and tidal direction consistency. Specifically, this unit assigns higher weights to grid nodes and their associated edges located on high-value tidal corridors, and lower weights to nodes and their associated edges located in no-stopping sections, with high queue spillover risk, or unsuitable for setting up virtual stops. In other words, this unit does not simply propagate information based on statistical data, but actively introduces constraints and preferences directly related to route generation during the propagation process. By setting the corridor prior gating unit, the interference of nodes unrelated to subsequent route formation on the prediction results can be reduced, making the model output closer to the needs of virtual stop selection and route skeleton generation.
[0078] The temporal modeling layer is used to extract passenger flow variation patterns from continuous time windows. Preferably, this layer adopts a temporal convolution structure, but dilated convolution, gated temporal units, or other structures that can describe temporal dependencies can also be used. This layer mainly learns the following patterns: first, continuous changes in passenger flow at short time scales, such as the impact of changes in the number of people waiting in the previous time window on the congestion level in the next time window; second, trend changes in passenger flow at medium time scales, such as the gradual accumulation of demand before the peak and the gradual decline of demand after the peak; and third, the feedback effect of station operation characteristics on subsequent demand, such as longer station dwell time often indicating an increased risk of local congestion.
[0079] In a preferred embodiment, the model further includes a temporal attention layer to further identify the most critical time segments for future predictions from multiple historical time windows. This layer does not simply treat all historical time windows equally, but automatically increases the attention given to critical time windows, such as the critical period of the morning rush hour, periods of sudden congestion, and periods before and after sudden surges in passenger flow. By introducing the temporal attention layer, the model can more accurately distinguish which historical changes are most indicative of future boarding demand, alighting demand, and congestion risk, thereby improving prediction accuracy.
[0080] The multi-task prediction output layer simultaneously outputs three types of results: future boarding demand, future alighting demand, and future congestion risk. Preferably, this layer employs a shared backbone network and a multi-head output structure, meaning the spatial and temporal modeling parts share parameters, and finally, independent output heads are set for different prediction targets. The advantage of this structure is that boarding demand, alighting demand, and congestion risk are inherently correlated, and shared encoding improves overall learning efficiency; simultaneously, it retains the independent output capability of different tasks, making the prediction results more aligned with their respective business implications.
[0081] The working principle of the spatiotemporal graph attention network model can be summarized as follows.
[0082] First, the model receives grid demand features and site congestion features from multiple historical time windows and maps them to a unified hidden feature representation. Then, the model propagates spatial information in two directions: on one hand, it learns the influence relationships between physically adjacent grids along the road network; on the other hand, it learns the demand connections between highly coupled grids along historical OD associations. This reflects both the local propagation effect brought about by "road adjacency" and the remote linkage effect brought about by "demand association."
[0083] After initial spatial feature aggregation, the model introduces corridor prior gating units, embedding line-related priors such as tidal corridor overlap, road no-parking information, queue spillover risk, and virtual docking feasibility into the node weight adjustment process. Nodes located in high-value demand corridors and with docking conditions are enhanced, while nodes located in unsuitable or high-risk areas are suppressed. In this way, the model output not only reflects the demand itself but also the effectiveness of the demand in subsequent route generation.
[0084] Subsequently, the model utilizes a temporal modeling layer and a temporal attention layer to learn the patterns of demand and congestion status changes over time, identifying the contribution of different time windows to future predictions. Finally, the model outputs the boarding demand, alighting demand, and congestion risk for each grid in future time periods through a multi-task prediction layer. Compared to schemes that only use single adjacency relationships and ordinary graph networks, the model in this embodiment simultaneously considers road physical connectivity, historical OD correlation, and prior constraints on route formation. This ensures that the prediction results are more consistent with subsequent tidal corridor extraction, virtual stop point generation, and route optimization processes, thereby improving the relevance and feasibility of route generation.
[0085] In some embodiments, taking the morning rush hour on a weekday in a city as an example, six consecutive ten-minute time windows from the past are selected as input. For each hexagonal grid, the input features include grid boarding demand, grid alighting demand, number of waiting passengers, number of passengers boarding, number of passengers alighting, number of passengers who did not board after the vehicle left the station, average stop time, and station congestion status. The road topology branch establishes grid adjacency relationships based on road connectivity, while the demand flow branch establishes demand adjacency relationships based on the historical OD distribution of the past thirty working days. The corridor prior gating unit receives prior data such as path overlap, no-stopping information, and queue spillover risk, and adjusts the node weights accordingly. The model outputs the boarding and alighting demand and congestion risk for each grid within the next two ten-minute time windows. Then, an OD intensity matrix is constructed by combining the historical OD distribution, selecting the path with the minimum computational time impedance for high-intensity OD pairs, and identifying the tidal travel demand corridor from the residential area to the industrial park through path superposition, which serves as the basis for generating the subsequent route skeleton.
[0086] In one embodiment, in step S4, the spatiotemporal demand tensor, road topology data, historical travel correlation data, and corridor prior data constructed in step S3 are jointly input into the spatiotemporal graph attention network model. The spatiotemporal graph attention network model includes an input embedding layer, a two-branch spatial graph attention layer, a corridor prior gating unit, a temporal modeling layer, a temporal attention layer, and a multi-task prediction output layer. The two-branch spatial graph attention layer performs feature propagation between nodes based on road connectivity and historical OD flow direction, respectively. The corridor prior gating unit enhances or suppresses node features and edge weights based on the degree of overlap of the minimum time impedance path, road no-stopping information, queue spillover risk, and virtual parking feasibility. The temporal modeling layer and the temporal attention layer are used to extract temporal evolution features within a continuous time window. The multi-task prediction output layer is used to output the boarding demand, alighting demand, and congestion risk of each grid in the future time period. Then, based on the predicted boarding and alighting demand and the historical OD distribution, an OD intensity matrix is constructed. For OD pairs greater than a preset threshold, the minimum time impedance path of the road network is calculated, and tidal travel demand corridors are extracted through path superposition and direction consistency statistics.
[0087] S5. Generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and generate a virtual stop candidate set by combining the roadside parking areas, road width, no-parking information and queue overflow risk.
[0088] In one embodiment, step S5 specifically includes the following sub-steps: S51, determining the existing bus stops at both ends of the demand corridor; for each tidal travel demand corridor extracted in step S4, determining the demand center areas corresponding to its starting and ending ends. The demand center areas can be determined based on the aggregation centers of the high-intensity OD centering starting and ending grids. Then, retrieving the existing bus stop closest to the demand center at the starting end from the bus stop data as the starting station, and retrieving the existing bus stop closest to the demand center at the ending end as the ending station. Preferably, the starting station and the ending station are also required to be located along roads accessible to buses and to meet vehicle stopping conditions and passenger distribution conditions.
[0089] S52. Generate a route skeleton by searching for candidate paths connecting the origin and destination stations in the road network, using the origin and destination stations as constraint endpoints. Preferably, the path with the minimum time impedance is used as the initial route skeleton, where time impedance comprehensively considers road length, average travel time, intersection delay, bus passability attributes, and turning restrictions. To avoid the initial skeleton deviating from the demand corridor, it is preferable to select road segments as candidate segments only within the coverage area of the demand corridor and the preset buffer distances on both sides. For the same origin and destination, if multiple feasible paths exist, it is preferable to select the path with the highest overlap with the tidal travel demand corridor and the minimum total time impedance as the route skeleton.
[0090] S53. Extract the road sections along the backbone that can be used for stopping, and analyze the road stopping conditions segment by segment along the backbone to identify road sections suitable for passenger pick-up and drop-off. The stopping conditions include at least: there is continuous space on one side of the road for buses to pull over, the road width is greater than a preset threshold, the road section is not a no-stopping section, and the distance from intersections and zebra crossings is greater than a preset safety distance. Preferably, road sections along the backbone are sampled at fixed intervals to form multiple candidate sampling points, and the stopping feasibility of the road section where each sampling point is located is used as the basis for subsequent screening.
[0091] S54. Calculate the roadside parking area. For each candidate sampling point, calculate the corresponding roadside parking area length based on the road boundary, number of lanes, roadside clearance length, and existing bus stop distribution. Preferably, when the continuous available parking length along the vehicle travel direction of a sampling point is greater than the preset minimum parking length, the sampling point is determined to meet the roadside parking area requirements; when the continuous available parking length is insufficient, the sampling point is removed. The minimum parking length can be set according to the target bus model length and safety margin.
[0092] S55. Screening road width and no-parking conditions: For sampling points that meet the requirements for roadside parking areas, further screening is performed based on road width and no-parking information. Preferably, if the width of the road segment where the sampling point is located is less than a preset road width threshold, the sampling point is removed to avoid affecting the normal passage of other vehicles after parking; if the sampling point is located in a no-parking section, a bus-only no-parking zone, a fire lane, a bridge no-parking zone, or other restricted parking areas, the sampling point is also removed. If necessary, verification can also be performed in conjunction with road monitoring data or electronic map annotation results.
[0093] S56. Prioritize candidate points by considering queue overflow risk. For sampling points that have passed the above screening, adjust the risk based on the queue overflow risk of adjacent existing stations or nearby areas. Preferably, if a sampling point's neighboring station has repeatedly shown instances in historical videos where the end of the waiting queue extends beyond the platform boundary or encroaches on the vehicle lane, the area is considered to have a high queue overflow risk, and the priority of that sampling point is lowered. If the sampling point has good passenger evacuation space, platform expansion conditions, or a low congestion risk, its priority is increased. This step avoids directly setting up virtual stops in areas with high congestion and high overflow risk.
[0094] S57. Generate a virtual stop candidate set. Sampling points that meet the stopping conditions, road width conditions, no-stopping conditions, and have a priority higher than a preset threshold are retained, and the virtual stop candidate set is formed according to the order along the route skeleton. Preferably, to avoid overly dense candidate points, a distance constraint between adjacent candidate points is further implemented. When the distance between two candidate points is less than a preset minimum station distance, only the one with higher priority is retained. The final output includes a virtual stop candidate set containing the candidate point number, spatial coordinates, road segment, stopping feasibility score, and spillover risk score, for use in step S6 to perform point interpolation and line formation.
[0095] In some embodiments, taking a tidal travel demand corridor from a residential area to an industrial park as an example, the system determines that the starting point of the corridor is located in residential area A and the ending point is located in industrial park B based on high-intensity OD pairs. By searching the bus stop database, the system selects the existing bus stop S1, which is closest to residential area A, as the starting station, and the existing bus stop S9, which is closest to industrial park B, as the ending station. Subsequently, the system searches for candidate paths between S1 and S9 in the road network and selects the road path with the highest overlap with the demand corridor as the route skeleton. Samples are taken every 80 meters along this skeleton to obtain several sampling points. The continuous parking length, road width, and no-parking attribute of each sampling point are calculated, and sampling points with insufficient continuous parking length, located in no-parking sections, or too close to intersections are eliminated. Combining the queuing spillover risk extracted from historical videos of adjacent stations, the remaining sampling points are prioritized, and low-priority sampling points that are too close to each other are deleted, finally obtaining 8 virtual stop candidate points, which serve as the basis for inserting the route skeleton point by point in the subsequent step S6.
[0096] In one embodiment, in step S5, firstly, based on the origin and destination demand center areas corresponding to both ends of the tidal travel demand corridor, the existing bus stops closest to the corresponding demand center are selected from the bus stop data as the origin and destination stations. Using the origin and destination stations as endpoints, road paths with low time impedance and high overlap with the demand corridor are searched within the coverage area of the demand corridor and the preset buffer areas on both sides, serving as the route skeleton. Subsequently, road points are sampled along the route skeleton at preset distance intervals, and the sampled road points are filtered in conjunction with the roadside parking area, road width, no-parking information, and queue overflow risk. The roadside parking area is used to characterize the continuous spatial length where buses can safely park, the road width is used to characterize the remaining road capacity after parking, the no-parking information is used to exclude no-parking sections, and the queue overflow risk is used to suppress the setting of stops in high-congestion and high-overflow areas. Finally, the sampled road points that meet the filtering conditions are deduplicated and sorted according to the order along the route skeleton and the adjacent station distance constraint to generate a virtual stop candidate set.
[0097] S6. Under the constraints of vehicle capacity, distance between adjacent stations and detour time per station, virtual stops are inserted into the route skeleton one by one according to the maximum increase in net revenue of the route to generate target customized bus routes. Departure times and timetables between stations are generated based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.
[0098] In one embodiment, step S6 specifically includes the following sub-steps: S61, Initialize the route skeleton and candidate point set, using the route skeleton generated in step S5 as the initial route, and read the virtual stop candidate set sorted along the route skeleton. The initial route includes at least the starting station, the ending station, and the sequence of skeleton road segments connecting the two. For each virtual stop candidate point, record its spatial coordinates, the road segment it belongs to, its stop availability score, the intensity of nearby demand, the risk of queue overflow, its distance from existing bus stops, and the predicted boarding demand and predicted alighting demand within the corresponding time window.
[0099] S62. Establish insertion point constraints and perform an insertion feasibility judgment for each candidate point. The feasibility judgment includes at least the following constraints: Vehicle capacity constraint: After inserting the candidate point into the current route, update the passenger capacity in the vehicle based on the predicted number of passengers boarding and alighting at each station. The predicted passenger capacity of any inter-station section must not exceed the rated passenger capacity of the target vehicle. If it does, the candidate point is determined to be uninsertable under the current schedule, or marked as requiring additional service times for further evaluation. Adjacent station distance constraint: When the distance along the route between the candidate point and its preceding or following station is less than the preset minimum station distance, the candidate point is determined to be uninsertable to avoid excessively dense stops leading to decreased operating efficiency. Single-station detour time constraint: Calculate the sum of the inter-station travel time, deceleration time, stop time, and departure acceleration time added by the route to serve the candidate point. If the added time exceeds the preset single-station detour time threshold, the candidate point is determined to be uninsertable. Preferably, constraints on total route length, total route travel time, and first and last station service periods can also be further set.
[0100] S63. Calculate the net revenue increment of the route after inserting a candidate point. For each candidate point that meets the feasibility constraints, simulate the route changes after its insertion into the current route and calculate the corresponding net revenue increment. The net revenue of the route preferably consists of the following components: Increased coverage passenger flow revenue: The revenue corresponding to the number of passengers newly covered by the route within the candidate point's walking service area after insertion; the increased coverage passenger flow can be determined based on the predicted boarding demand, predicted alighting demand, and the proportion of the original route not covered by the candidate point's neighboring grids. Increased detour cost: The increased operating time and cost due to extended vehicle routes, sidewalk stops, and restarts after the candidate point is inserted. Duplicate service penalty cost: When the candidate point overlaps with the service area of existing bus stops or already inserted stops, a penalty is applied to the duplicate coverage portion to avoid stop redundancy. Congestion penalty cost: When the area where the candidate point is located has a high risk of congestion, a high risk of queue overflow, or poor roadside parking conditions, a penalty is applied to reduce the probability of high-risk candidate points being selected first. Subtract the above costs from the increased coverage passenger flow revenue to obtain the net revenue increment of the candidate point. Preferably, all feasible candidate points are sorted from highest to lowest based on the net income increment.
[0101] S64. Generate the target route by point-by-point insertion. A greedy point-by-point insertion method is used to generate the target customized bus route. Specifically, first, the candidate point with the largest net revenue increment is selected and inserted into its corresponding optimal position in the route skeleton; then, the route station sequence, inter-station distance, inter-station travel time, passenger capacity of each segment, and net revenue increment of the remaining candidate points are updated; then, the candidate point with the largest net revenue increment is reselected from the remaining candidate points to perform the next round of insertion. This process is repeated until any of the following stopping conditions are met: no more candidate points satisfying the constraints exist; the net revenue increment of all remaining candidate points is less than the preset minimum revenue threshold; the current route length, travel time, or number of stops reaches the preset upper limit. Finally, a target customized bus route containing the starting station, the terminal station, and several virtual stops is obtained.
[0102] S65. Determine the passenger volume at each stop and the passenger capacity of each section. After the target customized bus route is generated, determine the expected number of passengers boarding and alighting at each stop based on the predicted boarding and alighting demand within the service area corresponding to each stop. Then, calculate the expected passenger volume for each section along the route's direction of travel to identify sections at risk of full capacity and highly congested stops. Preferably, when the expected passenger volume of certain sections approaches the vehicle's capacity limit, the route is marked as a high-capacity demand route, and the departure frequency is increased during the schedule generation stage.
[0103] S66. Generate departure schedules based on the predicted passenger flow, vehicle capacity, historical road segment travel time, and average stop time for the target route. Specifically, first calculate the total predicted passenger flow for the route within the target time period and the hourly passenger flow for each time window; then calculate the minimum number of departures required for each time window based on vehicle capacity and the target load factor threshold; finally, combine the route's one-way travel time, vehicle turnaround time, and the number of available vehicles to generate a departure schedule plan for the target time period. Preferably, increase the departure frequency during morning and evening peak hours and decrease the departure frequency during off-peak hours, thereby forming a dynamic time-segmented departure plan.
[0104] S67. Generate an inter-station timetable. After determining the departure schedule, generate an inter-station timetable based on the route station sequence, historical road segment travel times, and average stop times at each station. Specifically, starting from the departure time of the first station, accumulate the historical average travel time of each road segment along the route, and add the corresponding average stop time at each stop to obtain the estimated arrival and departure times for each station. Preferably, use historical travel times during peak hours for congested road segments and historical travel times during off-peak hours for off-peak road segments to improve the accuracy of the timetable.
[0105] S68. Output Results: Outputs the route number, station sequence, spatial coordinates of each station, estimated passenger volume at each station, estimated passenger volume for each section, departure schedule, and timetable between stations for the customized bus route. If necessary, it can also simultaneously output the total route length, one-way travel time, route net revenue evaluation value, and full-load risk warning information for subsequent use by the dispatching system.
[0106] Taking the tidal commuting scenario from residential area A to industrial park B as an example, step S5 obtains the route skeleton with existing stations S1 and S9 as the two endpoints, forming eight virtual stop candidate points P1 to P8. The system first reads the predicted boarding and alighting demand of the neighboring grids of each candidate point during the morning peak from 7:00 to 9:00, and sets the vehicle's rated passenger capacity to 40 people, the minimum station spacing to 500 meters, and the single-station detour time threshold to 2 minutes. Subsequently, the system simulates the effect of inserting P1 to P8 into the current route one by one, calculates the revenue from the increased coverage passenger flow, the cost of the increased detour, the cost of duplicate service penalties, and the cost of congestion penalties, and obtains the corresponding net revenue increment. Assuming that P3 has the highest net revenue increment, P3 is prioritized for insertion into the route skeleton; after updating the route, the net revenue increment of the remaining candidate points is recalculated, and P5 and P7 are inserted in sequence. When the remaining candidate points either result in too small an adjacent station distance or the net revenue increment is below the threshold, the insertion is stopped, and the target customized bus route consisting of S1, P3, P5, P7, and S9 is finally generated.
[0107] In some embodiments, the number of departures required for each time window is calculated based on the predicted passenger flow for the route during four time windows: 7:00-7:30, 7:30-8:00, 8:00-8:30, and 8:30-9:00. For example, the predicted passenger flow is highest in the 7:30-8:00 time window, requiring 4 departures; demand decreases in the 8:30-9:00 time window, requiring only 2 departures. Combining this with the route's one-way travel time of 28 minutes, average station dwell time, and vehicle turnaround time, departure schedules are generated at 7:05, 7:20, 7:35, 7:50, 8:05, 8:20, 8:40, and 8:55. Finally, based on the historical travel time between stations and the average station dwell time, the estimated arrival and departure timetables for the entire route S1 to S9 are generated sequentially.
[0108] In one embodiment, in step S6, the route skeleton and virtual stop candidate set are first read, and the demand intensity of the vicinity, stopability score, congestion risk, and spatial relationship with existing stations are recorded for each candidate point. Then, under the constraints of vehicle capacity, adjacent station distance, and single-station detour time, the insertion feasibility judgment is performed on each candidate point, and the changes in the newly covered passenger flow, detour time increase, degree of duplicate service, and congestion risk after its insertion into the current route are simulated respectively. The net route cost is obtained by subtracting the newly added detour cost, duplicate service penalty cost, and congestion penalty cost from the revenue of the newly covered passenger flow. The revenue increment is calculated; then, according to the principle of maximizing the net revenue increment of the route, virtual stops that meet the constraints are inserted into the route skeleton one by one until there are no candidate stops that meet the constraints and whose net revenue increment is greater than the preset threshold, thereby generating the target customized bus route; on this basis, based on the predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time of the target route, the required number of departures for each time window is calculated, a departure schedule is generated, and the historical travel time and stop time between each station are accumulated along the route direction to obtain the expected arrival and departure times of each station, forming the station timetable.
[0109] Preferably, in step S2, when performing target detection and multi-target tracking on the platform monitoring video, the waiting area and the door area are first identified, and then the number of passengers getting on and off the train is counted based on the passenger trajectory and the crossing events of the door area. The number of passengers who did not get on the train after the train left the station is determined based on the number of passenger targets still in the waiting area after the train left the station.
[0110] Preferably, the average stopping time is determined based on the difference between the arrival time and departure time of the same vehicle, wherein the arrival time is the time when the leading edge of the vehicle enters the platform stopping area, and the departure time is the time when the trailing edge of the vehicle leaves the platform stopping area.
[0111] Preferably, the spatiotemporal demand tensor includes at least grid boarding demand characteristics, grid alighting demand characteristics, station waiting number characteristics, number of people who did not board after the vehicle left the station characteristics, average station dwell time characteristics, and station congestion status characteristics, wherein each characteristic is aligned and encoded according to a hexagonal spatial grid and a time window.
[0112] Preferably, the spatiotemporal graph attention network model includes an input embedding layer, a spatial graph attention layer, a temporal convolutional layer, and a prediction output layer. A corridor prior gating unit is inserted between the spatial graph attention layer and the temporal convolutional layer. The corridor prior gating unit generates gating coefficients based on the minimum path overlap of temporal impedance, road no-stopping signs, queue spillover risk, and virtual docking feasibility to enhance or suppress node features and adjacent edge weights. In one embodiment, the corridor prior gating unit receives the minimum path overlap of time impedance, road no-stopping markers, queue overflow risk, and virtual docking feasibility corresponding to each grid node. It first normalizes each indicator and concatenates them into a prior feature vector. Then, it generates gating coefficients with values from 0 to 1 through a fully connected layer, an activation layer, and a Sigmoid gating layer. The road no-stopping markers are used to reduce the corresponding node and edge weights, the path overlap and virtual docking feasibility are used to increase the corresponding node and edge weights, and the queue overflow risk is used to reduce high-risk nodes and their adjacent edge weights. Subsequently, the gating coefficients are multiplied element-wise with the node features and adjacent edge weights output by the spatial graph attention layer to achieve enhancement or suppression.
[0113] Preferably, the spatiotemporal graph attention network model adopts a dual adjacency matrix, which includes a spatial adjacency matrix constructed based on road connectivity and a demand adjacency matrix constructed based on historical OD flow intensity. The corridor prior gating unit performs weighted fusion on the attention weights corresponding to the two adjacency matrices respectively.
[0114] Preferably, when extracting the tidal travel demand corridor in S4, OD pairs with an intensity greater than a preset threshold are selected, and the paths with the minimum time impedance corresponding to each OD pair are superimposed and statistically analyzed. The continuous road segments with a path overlap number greater than a preset number and directional consistency greater than a preset proportion are determined as the tidal travel demand corridor.
[0115] Preferably, when generating the virtual stop candidate set in S5, road points are sampled at preset distance intervals on the demand corridor, and sampling points that meet the following conditions are selected as virtual stop candidate points: the distance from the existing bus stop is greater than a preset exclusion distance, the distance from the road intersection is greater than a preset safety distance, the road segment is not a no-parking section, and the road width is greater than a preset threshold.
[0116] Preferably, the queue overflow risk is determined based on the relationship between the queue length and the platform safety boundary. When the end of the queue exceeds the platform boundary or encroaches on the motor vehicle lane, the corresponding station is marked as a high overflow risk station, and the priority of that station and its adjacent sampling points being selected as virtual stops is reduced. The net route revenue in S6 is obtained by subtracting the additional detour time cost, duplicate service penalty cost, and congestion penalty cost from the revenue from the increased coverage passenger flow. The duplicate service penalty cost is determined based on the overlap ratio between the service radius of the virtual stop and the existing bus station, and the congestion penalty cost is determined based on the congestion risk of the corresponding station.
[0117] This application also provides a customized bus route generation system based on passenger travel big data, such as... Figure 2 As shown, the data acquisition equipment is used to collect raw data related to passenger travel, specifically including: (1) a platform video acquisition terminal, such as a camera installed on the bus platform, the top of the shelter, the pole of the bus stop sign or the adjacent monitoring pole, for collecting platform monitoring video; (2) a card swiping data acquisition terminal, such as a bus card reader, a vehicle charging terminal or a bus charging server, for collecting bus card swiping records; (3) a vehicle positioning terminal, such as a GPS / Beidou positioning terminal installed on a bus, for obtaining vehicle location, driving trajectory and arrival / departure auxiliary information; (4) an external data access terminal, for accessing passenger OD records, road network data and bus stop data, wherein the external data access terminal can be a server gateway, a data interface server or a data access device on the communication base station side.
[0118] Edge computing devices are installed in platform-side, roadside cabinets, or bus station equipment rooms to receive video streams output from platform video acquisition terminals and perform video preprocessing, target detection, multi-target tracking, and feature extraction to obtain station operation characteristics such as the number of people waiting for the bus, the number of people getting on and off the bus, the arrival and departure times of vehicles, the number of people who did not get on the bus after it left the station, and the average stopping time.
[0119] The central processing server is used to perform multi-source data fusion, spatiotemporal demand tensor construction, spatiotemporal graph attention network model prediction, OD intensity matrix construction, tidal travel demand corridor extraction, route skeleton generation, virtual stop candidate set generation, point insertion into lines, departure schedule generation, and station timetable generation.
[0120] Preferably, the central processing server may include: an application server for performing business logic operations; an AI inference server for running a space-time graph attention network model; and a scheduling computing server for performing route optimization and scheduling calculations.
[0121] Storage devices are used to store raw video data, card swipe data, OD records, road network data, bus stop data, intermediate feature data, model parameters, candidate route results, and departure schedule results. These storage devices can be relational database servers, distributed file storage servers, network-attached storage devices, or cloud storage nodes. Network communication equipment is used to enable data transmission between various hardware components, and may specifically include switches, routers, wireless communication modules, 4G / 5G communication modules, fiber optic transceivers, industrial gateways, etc. Dispatch output terminals are used to display or distribute target customized bus routes, departure schedules, and timetables between stations. These dispatch output terminals can be bus dispatch workstations, driver-mounted display terminals, smart bus stop terminals, operation management platform terminals, or mobile dispatch tablets.
[0122] In one embodiment, the customized bus route generation system based on passenger travel big data includes a platform video acquisition terminal, a card-swiping data acquisition terminal, a vehicle positioning terminal, an external data access terminal, an edge computing device, a central processing server, a storage device, a network communication device, and a dispatch output terminal. The platform video acquisition terminal is communicatively connected to the edge computing device to send platform monitoring video. The edge computing device is communicatively connected to the central processing server to send data on waiting passengers, boarding and alighting passengers, vehicle arrival and departure times, number of passengers who did not board after a vehicle departs, and average stopping time. The card-swiping data acquisition terminal, vehicle positioning terminal, and external data access terminal are each communicatively connected to the central processing server to send bus card swipe records, vehicle positioning data, passenger OD records, road network data, and bus stop data. The central processing server is communicatively connected to the storage device to read and write raw data, feature data, model parameters, and route generation results. The central processing server is also communicatively connected to the dispatch output terminal to output the target customized bus route, departure schedule, and timetable between stations.
[0123] The data acquisition module is used to acquire passenger OD records, bus card swipe records, platform surveillance videos, road network data, and bus stop data;
[0124] The video analysis module is used to perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting, boarding and alighting, vehicle arrival and departure times, number of people who did not board after the vehicle left the station, and average station dwell time for each station in each time window.
[0125] The demand tensor construction module is used to map the OD records, card swipe records and video extracted features to a hexagonal spatial grid and a time window to construct a spatiotemporal demand tensor that represents the grid travel demand and the station congestion status.
[0126] The demand forecasting and corridor extraction module is used to input the spatiotemporal demand tensor into the spatiotemporal graph attention network model, predict the boarding and alighting demand and congestion risk of each grid in the future time period, construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance.
[0127] The candidate point generation module is used to generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and to generate a virtual stop candidate set by combining the roadside parking area, road width, no-parking information and queue overflow risk.
[0128] The route generation and scheduling module is used to insert virtual stops one by one into the route skeleton under the constraints of vehicle capacity, adjacent station distance and single station detour time, so as to generate target customized bus routes and generate departure times and station timetables based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.
[0129] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0130] (1) By introducing platform monitoring video and combining target detection and multi-target tracking technologies, this invention extracts the number of people waiting, boarding and alighting, the number of people who did not board after the vehicle left the station, and the average stopping time. This enables the system to not only reflect completed travel needs but also identify unmet needs caused by factors such as full vehicle load and station congestion. Compared with solutions that rely solely on card swipe records or historical OD data, this invention provides a more comprehensive perception of the actual operating status of the station and can more accurately characterize the degree of station congestion and passenger congestion, thereby providing a data foundation that is closer to the actual operating scenario for subsequent route generation.
[0131] (2) This invention constructs a spatiotemporal demand tensor and uses a spatiotemporal graph attention network model to predict future boarding and alighting demand and congestion risk. Simultaneously, it combines historical OD distribution and the minimum path of road network temporal impedance to extract tidal travel demand corridors. This allows for the simultaneous characterization of spatial correlation, temporal evolution, and corridor clustering features during the demand prediction stage. In particular, by introducing corridor prior gating units and a double adjacency matrix, the prediction results are more consistent with subsequent route generation constraints, reducing interference from nodes unrelated to the route formation and improving the stability of hotspot corridor identification and the accuracy of demand prediction.
[0132] (3) This invention generates a route framework based on tidal travel demand corridors and generates a candidate set of virtual stops by combining roadside parking areas, road width, no-stopping information, and queue overflow risk. Under constraints of vehicle capacity, distance between adjacent stations, and detour time per station, virtual stops are inserted point by point according to the maximum increase in net revenue of the route, and finally customized bus routes are generated and departure schedules and timetables between stations are output. This scheme takes into account the coverage of new passenger flow, detour costs, duplicate services, and congestion risks, which helps to improve the targeting, feasibility, and scheduling rationality of route generation, and reduce empty running rate and invalid stop rate.
[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products, and therefore this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0134] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A method for generating customized bus routes based on passenger travel big data, characterized in that, Including the following steps: S1. Obtain passenger OD records, bus card swipe records, platform surveillance video, road network data, and bus stop data; S2. Perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting for the train, the number of people getting on and off the train, the arrival and departure times of the vehicles, the number of people who did not get on the train after it left the station, and the average stopping time for each station in each time window. S3. Map OD records, card swipe records, and video extraction features to a hexagonal spatial grid and time window to construct a spatiotemporal demand tensor that represents grid travel demand and station congestion status. S4. Input the spatiotemporal demand tensor into the spatiotemporal graph attention network model to predict the boarding and alighting demand and congestion risk of each grid in the future time period, and construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance. S5. Generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and generate a virtual stop candidate set by combining the roadside parking areas, road width, no-parking information and queue overflow risk. S6. Under the constraints of vehicle capacity, distance between adjacent stations and detour time per station, virtual stops are inserted into the route skeleton one by one according to the maximum increase in net revenue of the route to generate target customized bus routes. Departure times and timetables between stations are generated based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.
2. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, In S2, when performing target detection and multi-target tracking on the platform monitoring video, the waiting area and the door area are first identified. Then, the number of passengers getting on and off the train is counted based on the passenger trajectory and the crossing events of the door area. Finally, the number of passengers who did not get on the train after the train left the station is determined based on the number of passenger targets still in the waiting area after the train left the station.
3. The method for generating customized bus routes based on passenger travel big data according to claim 2, characterized in that, The average stopping time is determined based on the difference between the arrival time and departure time of the same vehicle. The arrival time is the time when the leading edge of the vehicle enters the platform stopping area, and the departure time is the time when the trailing edge of the vehicle leaves the platform stopping area.
4. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, The spatiotemporal demand tensor includes at least the grid boarding demand characteristics, grid alighting demand characteristics, station waiting number characteristics, number of people who did not board after the vehicle left the station characteristics, average station stop time characteristics, and station congestion status characteristics, wherein each characteristic is aligned and encoded according to a hexagonal spatial grid and a time window.
5. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, The spatiotemporal graph attention network model includes an input embedding layer, a spatial graph attention layer, a temporal convolutional layer, and a prediction output layer. A corridor prior gating unit is inserted between the spatial graph attention layer and the temporal convolutional layer. The corridor prior gating unit generates gating coefficients based on the minimum path overlap of temporal impedance, road no-stopping signs, queue spillover risk, and virtual docking feasibility to enhance or suppress node features and adjacent edge weights.
6. The method for generating customized bus routes based on passenger travel big data according to claim 5, characterized in that, The spatiotemporal graph attention network model adopts a dual adjacency matrix, which includes a spatial adjacency matrix constructed based on road connectivity and a demand adjacency matrix constructed based on historical OD flow intensity. The corridor prior gating unit performs weighted fusion on the attention weights corresponding to the two adjacency matrices respectively.
7. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, When extracting the tidal travel demand corridor in S4, OD pairs with an intensity greater than a preset threshold are selected from the OD intensity matrix. The paths with the minimum time impedance corresponding to each OD pair are superimposed and statistically analyzed. Continuous road segments with a path overlap number greater than a preset number and directional consistency greater than a preset proportion are determined as tidal travel demand corridors.
8. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, When generating a candidate set of virtual stops in S5, road points are sampled at preset distance intervals along the demand corridor, and sampling points that meet the following conditions are selected as candidate virtual stops: the distance from existing bus stops is greater than a preset exclusion distance, the distance from road intersections is greater than a preset safety distance, the road segment is not a no-stopping section, and the road width is greater than a preset threshold.
9. The method for generating customized bus routes based on passenger travel big data according to claim 1, characterized in that, The queue spillover risk is determined based on the relationship between the queue length and the platform safety boundary. When the end of the queue exceeds the platform boundary or encroaches on the motor vehicle lane, the corresponding station is marked as a high spillover risk station, and the priority of that station and its adjacent sampling points as virtual stops is reduced. The net route revenue in S6 is obtained by subtracting the additional detour time cost, duplicate service penalty cost, and congestion penalty cost from the revenue from the increased passenger flow coverage. The duplicate service penalty cost is determined based on the overlap ratio between the service radius of the virtual stop and the existing bus station, and the congestion penalty cost is determined based on the congestion risk of the corresponding station.
10. A customized bus route generation system based on passenger travel big data, characterized in that: include: The data acquisition module is used to acquire passenger OD records, bus card swipe records, platform surveillance videos, road network data, and bus stop data; The video analysis module is used to perform target detection and multi-target tracking on the platform monitoring video, and extract the number of people waiting, boarding and alighting, vehicle arrival and departure times, number of people who did not board after the vehicle left the station, and average station dwell time for each station in each time window. The demand tensor construction module is used to map the OD records, card swipe records and video extracted features to a hexagonal spatial grid and a time window to construct a spatiotemporal demand tensor that represents the grid travel demand and the station congestion status. The demand forecasting and corridor extraction module is used to input the spatiotemporal demand tensor into the spatiotemporal graph attention network model, predict the boarding and alighting demand and congestion risk of each grid in the future time period, construct the OD intensity matrix in combination with the historical OD distribution, and extract the tidal travel demand corridor in combination with the minimum path of road network time impedance. The candidate point generation module is used to generate a route skeleton with the existing bus stops at both ends of the demand corridor as the starting and ending points, and to generate a virtual stop candidate set by combining the roadside parking area, road width, no-parking information and queue overflow risk. The route generation and scheduling module is used to insert virtual stops one by one into the route skeleton under the constraints of vehicle capacity, adjacent station distance and single station detour time, so as to generate target customized bus routes and generate departure times and station timetables based on predicted passenger flow, vehicle capacity, historical road segment travel time and average stop time.