Public transport prediction and optimization scheduling method and system based on multi-source data fusion
Patent Information
- Application Number
- CN202611195135.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-20
AI Technical Summary
[0007]本发明针对背景技术中存在使用静态OD矩阵缺乏实时修正能力,历史数据无法反映实时客流结构变化的问题,提出基于多源数据融合的公共交通预测优化调度方法及系统
[0024]第一,对于现有技术存在使用静态OD矩阵缺乏实时修正能力,历史数据无法反映实时客流结构变化的问题,本发明将所述OD推算人数与步骤二预测的j站下车客流量进行一致性校验,若两者偏差超过预设阈值,则以步骤二的预测值为主导进行加权修正,修正系数为历史同时段下OD矩阵的统计置信度,若两者偏差未超过预设阈值,则将所述预测人数与步骤二的预测值进行加权融合,以融合后的数值作为该站点下车客流的最终估计值,并将该数据点标记为高置信度,同时按权重比例更新OD换乘率矩阵中的对应元素,使静态历史数据持续获得实时修正,能够反映实时客流结构变化;
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention relates to the field of public transportation management technology, and in particular to a public transportation prediction and optimization scheduling method and system based on multi-source data fusion. Background Technology
[0002] The current mainstream public transportation scheduling methods can be summarized into three typical paradigms: traditional manual experience-based scheduling methods, big data-based intelligent bus scheduling methods, and neural network scheduling methods that integrate multi-source data.
[0003] Traditional manual experience-based dispatching relies on historical passenger flow data and personal experience to subjectively divide peak hours into morning peak, off-peak, and evening peak periods, estimating departure intervals and vehicle allocation for each period based on experience. Dispatchers at the terminal stations supervise on-time departures according to the timetable and record dispatch logs; dispatchers at intermediate stations monitor vehicle operation and arrival times at key stations. In case of emergencies such as delays, traffic congestion, or vehicle malfunctions, dispatchers implement temporary dispatching measures on-site, including adjusting train order (rescheduling), adjusting train intervals (schedule adjustments), dispatching empty trains to pick up passengers en route (release of vehicles), allowing passengers to skip stations, providing temporary express trains to major stops, and rescheduling trains to local routes, to restore operational order. While this method is intuitive and allows dispatchers to make quick decisions based on local experience, it also suffers from drawbacks such as reliance on individual dispatcher experience, lack of scientific rigor and consistency, inability to respond to real-time changes in traffic conditions, rigid dispatching plans, difficulty in accurately predicting passenger demand, potential capacity waste or shortages, and high decision-making pressure during peak hours, making oversights more likely.
[0004] For intelligent bus dispatching methods based on big data, a data platform is built to integrate multi-source data from internal and external sources, such as vehicle positioning, card scanning, departure schedules, passenger flow, and weather. Based on passenger flow analysis, an intelligent scheduling model is constructed to assist in planning by matching passenger flow, transport capacity, and road conditions, thus shifting from human control to intelligent control. This approach has advantages such as high prediction accuracy during regular and peak hours, low system response time, and low server load. However, it also has disadvantages such as only implementing a one-way prediction-scheduling process, lacking a closed-loop execution feedback loop, and lacking dynamic adjustment mechanisms for special scenarios such as prolonged road congestion and the dispersal of large events.
[0005] For neural network scheduling methods that integrate multi-source data fusion, historical operational data, real-time traffic information, weather, holidays, and other multi-dimensional data are integrated, cleaned, and fused to construct a feature set. Algorithms such as SVR, BP-ANN, and LSTM are used to predict passenger flow and arrival time. Based on the predicted passenger flow and vehicle capacity, departure intervals and the number of vehicles assigned are generated through a scheduling strategy network or operations research optimization model. This approach has the advantages of predicting operating time, passenger flow, and waiting time with a good fit between the predicted and actual values. However, it also has disadvantages such as high model complexity due to the integration of multiple algorithms, limited real-time performance, and the lack of a complete closed loop from prediction to optimization to execution.
[0006] In summary, the three existing methods all suffer from the drawbacks of using static OD matrices, lacking real-time correction capabilities, and historical data failing to reflect real-time changes in passenger flow structure. Therefore, this application proposes a public transportation prediction and optimization scheduling method and system based on multi-source data fusion. Summary of the Invention
[0007] This invention addresses the problems in the background technology where the use of static OD matrices lacks real-time correction capabilities and historical data cannot reflect real-time changes in passenger flow structure. It proposes a public transportation prediction and optimization scheduling method and system based on multi-source data fusion.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a public transportation prediction and optimization scheduling method based on multi-source data fusion, comprising the following steps:
[0009] Step 1: Build a unified public transportation data access gateway to collect vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from stations, and road congestion information in real time. After format normalization and data cleaning, output real-time data stream.
[0010] Step 2: Construct a spatiotemporal graph network model. Using the historical sequence of the past preset time window as input, the real-time data stream is mapped into a three-dimensional tensor consisting of time dimension, route station spatial dimension and multi-feature dimension. After spatial attention processing and temporal attention processing, the future station alighting passenger flow and road segment traffic speed are output.
[0011] Step 3: The predicted passenger flow at the station and the real-time passenger flow are used to back-calculate the cross-sectional demand through OD. A multi-objective model is established based on the cross-sectional demand, and the model is solved by NSGA-II. The optimal compromise scheduling scheme is output based on the real-time traffic conditions.
[0012] Step 4: Establish a three-level mapping table of event-level-policy. Based on the alarm level and the external event API, comprehensively evaluate the event level score. After arbitration, determine whether to perform incremental correction or scheme replacement for the optimal compromise scheduling scheme. Finally, output the corrected scheduling instruction set.
[0013] Step 5: Send the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP. At the same time, start the deviation monitoring thread to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, determine whether there is execution drift. If execution drift exists, trigger online recalibration.
[0014] Step 6: During the daily off-peak period, retrieve all actual operation data from the previous day, calculate the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers. Compare the calculated values of the indicators with the preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.
[0015] To achieve the above objectives, the present invention provides the following technical solution: a public transportation prediction and optimization scheduling system based on multi-source data fusion, comprising a multi-source data acquisition module, a spatiotemporal demand prediction module, a capacity optimization scheduling module, a scenario adaptive correction module, an instruction issuance module, an execution verification module, and an offline performance evaluation module;
[0016] The multi-source data acquisition module establishes a unified public transportation data access gateway, which collects vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from the platform, and road congestion information in real time. After format normalization and data cleaning, it outputs a real-time data stream.
[0017] The spatiotemporal demand prediction module constructs a spatiotemporal graph network model. Taking the historical sequence of the past preset time window as input, it maps the real-time data stream into a three-dimensional tensor composed of time dimension, line station spatial dimension and multi-feature dimension. After spatial attention processing and time attention processing, it outputs the station alighting passenger flow and road segment speed at future moments.
[0018] The capacity optimization and scheduling module uses the predicted passenger flow at the station and the real-time passenger flow to back-calculate the cross-sectional demand through OD, establishes a multi-objective model based on the cross-sectional demand, solves it through NSGA-II, and outputs the optimal compromise scheduling scheme based on real-time traffic conditions.
[0019] The scenario adaptive correction module establishes a three-level mapping table of event-level-policy, comprehensively evaluates the event level score based on alarm level and external event API, and determines whether to perform incremental correction or scheme replacement on the optimal compromise scheduling scheme after arbitration, and finally outputs the corrected scheduling instruction set.
[0020] The instruction issuing module will issue the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP;
[0021] The execution verification module starts a deviation monitoring thread at the same time as the instruction is issued to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, it determines whether there is execution drift. If execution drift exists, it triggers online recalibration.
[0022] The offline performance evaluation module retrieves all actual operating data from the previous day during the daily off-peak period, calculates the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers, and compares the calculated values of the indicators with preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.
[0023] Compared with the prior art, the present invention includes at least one of the following beneficial technical effects:
[0024] First, to address the problem that existing technologies lack real-time correction capabilities when using static OD matrices and that historical data cannot reflect real-time changes in passenger flow structure, this invention verifies the consistency between the estimated number of passengers at OD and the predicted passenger flow at station j in step two. If the deviation between the two exceeds a preset threshold, the predicted value in step two is used as the primary factor for weighted correction, with the correction coefficient being the statistical confidence level of the OD matrix during the same historical period. If the deviation between the two does not exceed the preset threshold, the predicted number of passengers and the predicted value in step two are weighted and fused together, and the fused value is used as the final estimate of the passenger flow at that station. This data point is marked as having high confidence, and the corresponding elements in the OD transfer rate matrix are updated according to the weight ratio, so that the static historical data can be continuously corrected in real time and reflect real-time changes in passenger flow structure.
[0025] Second, this invention constructs a spatiotemporal graph network model, taking the historical sequence of the past preset time window as input, and maps the real-time data stream into a three-dimensional tensor composed of time dimension, line station spatial dimension and multi-feature dimension. After spatial attention processing and temporal attention processing, it outputs the passenger flow at the station and the passage speed of the road segment at future time. Through the spatial attention mechanism, it dynamically captures the passenger flow correlation and congestion propagation between adjacent stations and transfer stations. Compared with the model that only relies on historical statistics, it can adaptively cope with the spatial coupling changes in abnormal scenarios. The temporal attention mechanism can simultaneously extract the periodic patterns of morning and evening peak hours and the temporal mutation features after sudden events, avoiding the failure of traditional models in sudden event scenarios.
[0026] Third, this invention, through step three, uses OD back-calculation combined with real-time boarding passenger flow and historical transfer rate matrix, and incorporates consistency verification and high confidence marking mechanisms. This approach better reflects the dynamic changes in real-time passenger flow structure than using only an OD matrix or a single predicted value. The optimization objectives are to minimize the average waiting time for passengers across the entire line, maximize the closeness of the occupancy rate of each section to the ideal occupancy rate, and minimize operational energy consumption. At the same time, it takes into account passenger experience, operational efficiency, and low-carbon requirements. Compared with single-objective optimization schemes, this approach is closer to actual operational constraints and effectively improves the accuracy of supply and demand matching. Attached Figure Description
[0027] Figure 1 A flowchart illustrating the steps of a public transportation prediction and optimization scheduling method based on multi-source data fusion;
[0028] Figure 2 This is a module connection diagram for a public transportation prediction and optimization scheduling system based on multi-source data fusion. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] like Figure 1 As shown, this embodiment provides a public transportation prediction and optimization scheduling method based on multi-source data fusion, including the following steps:
[0031] Step 1: Build a unified public transportation data access gateway to collect vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from stations, and road congestion information in real time. After format normalization and data cleaning, output real-time data stream.
[0032] Step 2: Construct a spatiotemporal graph network model. Using the historical sequence of the past preset time window as input, the real-time data stream is mapped into a three-dimensional tensor consisting of time dimension, route station spatial dimension and multi-feature dimension. After spatial attention processing and temporal attention processing, the future station alighting passenger flow and road segment traffic speed are output.
[0033] Step 3: The predicted passenger flow at the station and the real-time passenger flow are used to back-calculate the cross-sectional demand through OD. A multi-objective model is established based on the cross-sectional demand, and the model is solved by NSGA-II. The optimal compromise scheduling scheme is output based on the real-time traffic conditions.
[0034] Step 4: Establish a three-level mapping table of event-level-policy. Based on the alarm level and the external event API, comprehensively evaluate the event level score. After arbitration, determine whether to perform incremental correction or scheme replacement for the optimal compromise scheduling scheme. Finally, output the corrected scheduling instruction set.
[0035] Step 5: Send the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP. At the same time, start the deviation monitoring thread to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, determine whether there is execution drift. If execution drift exists, trigger online recalibration.
[0036] Step 6: During the daily off-peak period, retrieve all actual operation data from the previous day, calculate the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers. Compare the calculated values of the indicators with the preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.
[0037] Furthermore, the vehicle positioning data includes vehicle ID, latitude and longitude, instantaneous speed, heading angle, timestamp, and current passenger capacity.
[0038] The alarm data of the active safety control system includes alarm type, alarm level, triggering vehicle ID, trigger timestamp, and alarm duration. The alarm types include emergency braking, lane departure, forward collision, and driver fatigue.
[0039] The platform passenger flow monitoring data includes platform ID, cumulative number of people entering the station in the past 15 seconds, cumulative number of people exiting the station in the past 15 seconds, number of people remaining on the platform, and the start and end of the data time window.
[0040] The road congestion information includes road segment ID, congestion index, average traffic speed, and data update timestamps pushed every 5 minutes.
[0041] In this embodiment, it should be specifically noted that format normalization includes:
[0042] For vehicle positioning data, latitude and longitude are converted to UTM metric coordinates using the Proj library, speed is kept unchanged in km / h, and timestamps are truncated to the nearest 15 seconds.
[0043] For alarm data from the proactive safety control system, each alarm is assigned to the nearest 15-second window based on its trigger timestamp. If there are multiple alarms in the same window, the highest level is taken, and the window without alarms (indicating a safe state) is filled with 0. The alarm levels are, in order, level 1, level 2, level 3, level 4, level 5, level 6, level 7, level 8, level 9, and level 10.
[0044] For platform passenger flow monitoring data, linear downsampling is performed to a 15-second granularity (assuming uniform passenger flow, divided by 4). If the original window is not uniform (e.g., 55 seconds), it is scaled down to 15 seconds proportionally.
[0045] For road congestion information, populate forward to each 15-second window until the next update, converting speed to a congestion index: index = 1 - (v / v) freeflow ), where v freeflow This represents the free-flow velocity of this road section.
[0046] Furthermore, after format normalization and data cleaning, a real-time data stream is output. The real-time data stream has a time granularity of 15 seconds and includes the start and end times of the time window, data generation timestamp, route number, direction of travel, station number, road segment number, vehicle unique identifier, vehicle current horizontal coordinate, vehicle current vertical coordinate, vehicle instantaneous speed, vehicle current passenger capacity, current window alarm level, alarm type identifier, number of people entering the platform, number of people exiting the platform, number of people remaining on the platform, road segment congestion index, road segment average traffic speed, and data quality flags for each field.
[0047] In this embodiment, it is specifically noted that the start time of the time window is the starting UTC time of the 15-second data window, accurate to milliseconds, used for time alignment of all subsequent prediction and scheduling actions; the end time of the time window is the ending UTC time of the 15-second data window, accurate to milliseconds, which, together with the start time, defines the effective time range of this group of data; the data generation timestamp records the actual time when this wide table record was packaged and generated, used for internal system latency monitoring and data freshness judgment; the route number is the unique code identifying the public transportation route to which the current data belongs, used to distinguish the independent scheduling of different routes; the direction of travel identifies the current direction of vehicle travel, usually divided into uphill and downhill, used to distinguish the passenger flow in opposite directions. The differences between the current data and road conditions; the station number, which identifies the sequential position of the station associated with the current data on the route, starting from the starting station and used to establish the spatial adjacency relationship between stations; the road segment number, which is the unique code of the road segment associated with the current data, used to match road condition information and calculate travel time; the vehicle unique identifier, which is the identity code of the specific operating vehicle, used to track the vehicle's all-time and all-space trajectory; the vehicle's current horizontal coordinate, which is the lateral position value of the vehicle in the universal horizontal Mercator projection coordinate system, in meters, used for spatial distance calculation and trajectory matching; the vehicle's current vertical coordinate, which is the longitudinal position value of the vehicle in the same projection coordinate system, in meters, together with the horizontal coordinate to determine the vehicle's precise position; and the vehicle's instantaneous speed, which is the vehicle's speed in the horizontal direction. The vehicle's real-time speed, measured in kilometers per hour, is used to assess road traffic efficiency and driving status. The vehicle's current passenger capacity, obtained through a vehicle weighing system or door counting sensors, is used to calculate the cross-sectional occupancy rate. The current window alarm level is the highest level of safety alarm triggered within this 15-second time window, with a value range based on a preset safety classification system (e.g., 1 to 10). A value of zero indicates a safe and normal state if there is no alarm. The alarm type identifier records the specific type of alarm triggered, including but not limited to emergency braking, lane departure, forward collision warning, and abnormal driver fatigue, used to distinguish different emergency response strategies. The number of passengers entering the platform is the highest level of safety alarm triggered within this 15-second time window. Within a time window, the number of passengers entering the platform is counted by turnstiles or infrared counters; the number of passengers exiting the platform is counted within the same time window (usually referring to exit turnstiles or transfer passages); the number of passengers waiting on the platform is the total number of passengers waiting to board the train at the current moment, estimated in real time by binocular cameras or infrared beam devices inside the platform; the road congestion index is a dimensionless value reflecting the smoothness of traffic flow on the current road segment, ranging from zero to one, where zero represents completely smooth traffic and one represents completely stopped traffic, with intermediate values reflecting the severity of congestion proportionally; the average speed of traffic on the road segment is the average speed of all vehicles on the current road segment, in kilometers per hour, serving as a supplementary quantitative indicator to the congestion index;Each data quality flag, for each numerical field mentioned above, includes a corresponding quality status label. This label indicates whether the data is an original valid value, a value corrected by an algorithm, or a filled value generated by interpolation from historical means. This flag system is used by the subsequent predictive model to assign differentiated weights to data with different levels of confidence during training and inference.
[0048] Furthermore, the previously preset time window refers to the past 30 time windows, each time window being 15 seconds;
[0049] The future time refers to the next 15 minutes, with 60 output steps in 15-second windows;
[0050] The mapping of real-time data streams into a three-dimensional tensor consisting of time dimension, line station spatial dimension, and multi-feature dimension includes:
[0051] The real-time data streams of the past 30 time windows are mapped according to three dimensions: time, space, and feature, to obtain the first time dimension, the second space dimension, and the third feature dimension.
[0052] The first time dimension is fixed at 30, corresponding to 30 consecutive historical time windows, arranged in order from oldest to newest.
[0053] The second spatial dimension is fixed as the total number of stations under the jurisdiction of the line, arranged in order from the starting station to the ending station according to the direction of line operation. If the line includes branch lines or loop lines, they are uniformly coded according to the actual physical running order. Transfer stations are counted repeatedly as independent nodes in the spatial dimensions of different lines.
[0054] The third feature dimension is to aggregate the multi-source observations of each station in each time window into a feature vector of fixed length.
[0055] After the tensor is constructed, Z-score standardization is performed on each numerical field in the third feature dimension, which is to subtract the mean of the feature over all sites and all historical windows, and then divide by the standard deviation.
[0056] In this embodiment, it is specifically noted that when aggregating the multi-source observations of each station into a fixed-length feature vector at each time window, for vehicle operation data, the average instantaneous speed of all vehicles in the two adjacent station sections before and after the same station is taken as the inbound speed of that station at that moment; for safety alarm data, the highest alarm level of all vehicles within a 200-meter radius of the same station is taken; for platform passenger flow data, the number of people entering the station, the number of people exiting the station, and the number of people staying are used directly; for road condition data, the congestion index and average traffic speed of the road segment corresponding to the station are taken.
[0057] In this embodiment, it is specifically noted that each time slice (i.e., the feature vector of all stations at a certain moment) in the three-dimensional tensor is sequentially fed into the spatial attention module. The core of this module is to calculate the spatial correlation strength between each station and all other stations on the line.
[0058] The specific processing method is as follows: For the site feature matrix at the current time, query vector, key vector, and value vector are first generated through a learnable linear transformation. Then, the query vector of each site is multiplied by the key vectors of all other sites to obtain the original attention score. This score is scaled and the Softmax function is applied to obtain the normalized spatial attention weight, which reflects the relative importance of the information provided by other sites when predicting the current site state.
[0059] The physical basis for spatial association includes: passenger flow propagation between adjacent stations (passenger flow entering an upstream station becomes alighting passenger flow at a downstream station after a certain travel time), passenger flow exchange at transfer stations (passenger flow arriving on one line can be converted into passenger flow entering another line), and station-by-station propagation of congestion along the route (slow traffic on the road ahead gradually affects the arrival time of vehicles at subsequent stations). The spatial attention mechanism does not pre-determine a fixed adjacency matrix but dynamically calculates the aforementioned association strength based on real-time data, thus adaptively capturing spatial coupling relationships under unconventional circumstances.
[0060] After spatial attention weighting, the feature vector of each station is updated to the weighted sum of the feature vectors of all stations, so that each station naturally incorporates the real-time information of its upstream and downstream stations in subsequent predictions.
[0061] In this embodiment, it should be specifically noted that after spatial attention is completed, the spatial dimension of the tensor has achieved information aggregation. At this point, the processed sequence is sent to the temporal attention module according to the time dimension. This module independently processes the feature sequences of 30 historical time steps for each site, extracting the dependencies in the time dimension.
[0062] The specific processing method for temporal attention is as follows: For each site, its feature sequences across 30 time steps are transformed using different linear transformations to generate query vectors, key vectors, and value vectors in the time dimension. Then, the importance score of each historical moment relative to the current prediction moment is calculated. This score is determined based on the similarity between the features of that historical moment and the features of the latest moment. The temporal attention weight distribution is obtained by applying Softmax to the score sequence.
[0063] The time attention mechanism is designed to capture two typical time patterns: one is a periodic pattern, such as the regular rise and fall of passenger flow during morning and evening rush hours, where historical windows spaced 24 hours apart or within the same time period receive higher weight; the other is abrupt patterns, such as a sudden drop in traffic speed caused by traffic accidents or temporary traffic control, where recent windows receive a sudden increase in weight, while the weight of more distant historical windows rapidly decreases. The time attention mechanism automatically distinguishes between these two patterns through a data-driven approach, without requiring manual setting of peak periods or rule thresholds.
[0064] In this embodiment, it is specifically noted that the feature sequence, after being enhanced by both spatial and temporal attention, is fed into a multi-step decoder network. This decoder employs an autoregressive structure, meaning that the prediction output at each step depends simultaneously on the enhanced historical feature sequence and the prediction result of the previous step.
[0065] The decoder starts from the current moment and iterates backward step by step, outputting a predicted value for a 15-second window ahead at each step. This process is repeated for 60 steps, covering the entire time domain for the next 15 minutes. Each output contains two core predictions: the expected passenger flow at each station on the route at that future moment (i.e., how many passengers will alight at that station); and the expected average travel speed for each segment of the route at that future moment.
[0066] To prevent errors from accumulating step by step during autoregression, the decoder employs a planned sampling strategy during training. This involves randomly using a certain proportion of real historical values to replace the previous prediction value as the input for the next step, making the model robust to its own prediction errors during actual inference.
[0067] In this embodiment, it should be specifically noted that while outputting the above-mentioned point prediction values (i.e. the most likely estimated values), the system generates a 95% confidence interval for each prediction value to quantify the prediction uncertainty.
[0068] The confidence interval is achieved through a combination of two engineering-feasible methods:
[0069] Main method: During model training, in addition to fitting the mean of the target value, two independent output branches are set up to fit the 0.025 quantile and 0.975 quantile of the target value, respectively. The training loss function uses quantile loss, enabling the model to directly learn the conditional quantiles of the target value given the input conditions. During inference, the outputs of the two quantile branches constitute the lower and upper bounds of the 95% confidence interval.
[0070] Auxiliary verification method: During model inference, random deactivation is applied to some intermediate layer activation values of the decoder, and multiple forward propagations are performed (usually 30 times). Each propagation yields a set of predicted values. The standard deviation of these 30 sets of predicted values is then calculated and multiplied by 1.96 to obtain the interval half-width. This method is mainly used to verify whether the interval output by the quantile method is reasonable. When the difference between the interval widths given by the two methods exceeds 50%, a confidence interval widening warning is triggered, indicating that the current input data is in a high-uncertainty region outside the model training distribution.
[0071] Finally, each predicted output value is output to step three in the form of a triplet of point estimate + lower bound + upper bound, so that the capacity optimization model can distinguish between high-confidence predictions and low-confidence predictions under the constraints.
[0072] Furthermore, the step of using OD (Original Demand) to back-calculate the cross-sectional demand from the predicted station alighting passenger flow and the real-time boarding passenger flow includes:
[0073] The passenger flow at each station within a 15-second window over the next 15 minutes will be used as the expected number of passengers to alight at each station over the next 60 time windows.
[0074] The actual number of passengers entering each station within the latest 15-second window is extracted from the real-time data stream and used as the benchmark for boarding passenger flow at that moment. In the subsequent 15-minute prediction period, it is assumed that the boarding passenger flow of each station remains unchanged at the value of the latest window.
[0075] Call the OD transfer rate matrix that was pre-statistically calculated offline for the route. For any two stations i and j, i≠j, multiply the real-time boarding passenger flow of station i at the current time by the transfer rate from i to j in the OD matrix to obtain the estimated number of passengers who boarded at station i and whose destination is station j.
[0076] The estimated number of passengers at OD is checked for consistency with the predicted passenger flow at station j in step two. If the deviation between the two exceeds a preset threshold, the predicted value in step two is used as the main factor for weighted correction. The correction coefficient is the statistical confidence level of the OD matrix in the same historical period. If the deviation between the two does not exceed the preset threshold, the predicted number of passengers and the predicted value in step two are weighted and fused. The fused value is used as the final estimate of the passenger flow at that station, and the data point is marked as high confidence. At the same time, the corresponding elements in the OD transfer rate matrix are updated according to the weight ratio.
[0077] Repeat the consistency check above to obtain the OD passenger flow demand matrix between each pair of stations;
[0078] The OD demand matrix is accumulated and summed along the route to obtain the passenger flow at any adjacent station section. For each section, the maximum passenger flow in 60 windows within the next 15 minutes is taken as the peak passenger flow of that section.
[0079] In this embodiment, it should be specifically noted that the OD transfer rate matrix is a two-dimensional square matrix, with row indices representing boarding stations and column indices representing alighting stations. Each element represents the proportion of passengers who board at one station and alight at another. This matrix is statistically analyzed separately for weekdays, weekends, and holidays, and stored independently in 15-minute time slots throughout the day, resulting in a total of 96 time slot matrices. The system automatically selects the corresponding matrix based on the time slot to which the current time belongs.
[0080] In this embodiment, it should be specifically noted that for the section from station k to station k+1 in the direction of line operation, the passenger flow is equal to the sum of the passenger flows of all OD pairs where the boarding station is at or before station k and the alighting station is at or after station k+1.
[0081] Furthermore, the establishment of a multi-objective model based on cross-sectional requirements includes:
[0082] Based on the peak passenger flow at each cross-section, calculate the minimum departure frequency to meet transportation demand.
[0083] Read the total number of available vehicles and the driver scheduling limit for the route, and calculate the highest departure frequency that the system can provide;
[0084] Using the departure timetable in 15-second windows within the next 15 minutes as the decision variable, and with the optimization objectives of minimizing the average waiting time of passengers across the entire line, maximizing the closeness of the full load rate of each section to the ideal full load rate, and minimizing operating energy consumption, a multi-objective model is established after determining the constraints.
[0085] The constraints include the capacity supply of each section, i.e., the sum of the rated passenger capacity of all vehicles passing through the section within 15 minutes is greater than or equal to the peak passenger flow of the section; the actual departure frequency is between the calculated minimum departure frequency and the maximum departure frequency; the departure interval between any two consecutive buses on the same route is greater than or equal to the minimum safe interval allowed by the route and less than or equal to the maximum service interval specified by industry standards; the continuous running time of each vehicle is less than or equal to the maximum legal driving time limit for drivers; and the turnaround time meets the minimum time requirements for vehicle charging or refueling.
[0086] In this embodiment, it should be specifically explained that the calculation of the minimum departure frequency to meet transportation demand is as follows: divide the peak passenger flow of each section by the vehicle's rated passenger capacity to obtain the minimum number of departures required for that section; take the maximum value of this value among all sections as the minimum departure frequency for the entire line during the forecast period. This minimum frequency ensures that there will be no passenger congestion due to insufficient capacity at any section of the line.
[0087] In this embodiment, it should be specifically explained that the maximum departure frequency that the calculation system can provide is as follows: multiply the total number of available vehicles by the number of one-way trips a single vehicle can complete within 15 minutes (obtained by dividing the road segment speed predicted in step two by the total length of the route), and then divide by the number of route directions (up and down) to obtain the frequency upper limit based on the number of vehicles; furthermore, multiply the driver scheduling upper limit by the available manpower hours within 15 minutes to obtain the frequency upper limit based on manpower; take the smaller value of the two as the maximum departure frequency. This maximum frequency ensures that the scheduling scheme does not exceed the actual available physical resources.
[0088] In this embodiment, it is specifically noted that the decision variable is defined as a binary sequence of length 60, where each element represents whether a bus departs at the corresponding window (1 for departure, 0 for no departure). Each departure also requires a specific vehicle allocation number (assigned from the available vehicle pool). Waiting time is determined by both the departure interval and passenger flow at each station. Based on the time intervals between adjacent departures in the departure timetable and the current passenger flow at each station, the system uses the non-homogeneous Poisson arrival approximation formula from queuing theory to calculate the sum of the expected waiting times for all passengers at each station, and then divides this sum by the total passenger flow of the entire line to obtain the average waiting time. The system first calculates the expected load factor for each section at the current departure frequency based on the predicted location of each vehicle in the departure timetable and the passenger flow throughput predicted in step two. The ideal load factor is set to be between 70% and 80%. The objective function is the sum of the absolute values of the deviations between the load factor of each section and this ideal range. A smaller deviation indicates a more accurate match between capacity allocation and demand, avoiding both wasted capacity and overcrowding. Energy consumption is approximated by the weighted sum of the total number of vehicle starts and the number of invalid accelerations, where invalid acceleration refers to the extra acceleration operations performed by vehicles when frequent starts and stops occur due to road congestion. The objective function takes the road segment speed predicted in step two as input; the lower the speed, the greater the energy consumption penalty coefficient.
[0089] Furthermore, the method of solving the scheduling scheme using NSGA-II and outputting the optimal scheduling scheme based on real-time traffic conditions includes:
[0090] The established multi-objective model is input into the NSGA-II multi-objective genetic algorithm for solution, and the Pareto front solution set is obtained.
[0091] Obtain the latest road congestion index from Step 1, and read the confidence interval width of the predicted traffic speed of each road segment in the next 15 minutes from Step 2.
[0092] For each candidate scenario in the Pareto front, calculate the sensitivity of its travel time to congestion changes. This involves perturbing the current congestion index of each road segment upwards by 10%, recalculating the total travel time of all vehicles under each scenario during the forecast period, comparing it with the original travel time, and calculating the percentage increase in travel time. This percentage is taken as the road condition sensitivity of the scenario.
[0093] The solution with the lowest road condition sensitivity is selected from the Pareto front. It is then checked whether the solution meets the minimum departure frequency constraint. If it does, it is output directly. If it does not, the solution with the second lowest sensitivity is tried in turn from the Pareto front until a feasible solution that meets the minimum frequency requirement is found.
[0094] Output the optimal compromise scheduling scheme for the current forecast period. The optimal scheduling scheme includes an indication sequence of whether a train will depart in each 15-second window within the next 15 minutes and a designated vehicle number for each train.
[0095] Furthermore, the specific processing flow for step four is as follows:
[0096] Establish a three-level mapping table of events, levels, and policies. The first level is the event type, which is divided into internal security events and external environment events. The second level is the event level, with each event type corresponding to a level score. The third level is the corresponding policy, which includes the policy type, policy parameters, and policy duration.
[0097] Real-time monitoring of internal and external trigger sources. The internal trigger source is the alarm level in the real-time data stream. If multiple alarms exist within the same 15-second window, the highest level is taken as the internal event score for that window. The external trigger source is the external event information accessed through the external event API. The preset severity of the external event is mapped to a level score of 1 to 10. The maximum level score of all trigger events in the current window is taken as the current comprehensive event level score.
[0098] If no event is triggered, the overall event level score is 0, indicating that the current state is normal operation and no correction is needed; the optimal compromise scheduling solution is output directly.
[0099] When multiple events exist in the same window and have the same level score, the final response strategy is determined in descending order of priority: security events first, events with a large impact range first, and events with strong intervention capabilities first. If the priority still cannot be distinguished, events with preset plans in the system will be responded to first, and events without preset plans will be downgraded to only be reported for manual processing.
[0100] Based on the event type and level score determined after arbitration, the corresponding strategy record is searched in the mapping table, the departure frequency in the optimal compromise scheduling scheme is read, and the margin between the current departure frequency and the minimum departure frequency is determined. If the event level score is less than or equal to 5 points and the current departure frequency margin is greater than 20%, the incremental correction method is executed, and only the parameters of the original scheduling scheme are fine-tuned. If the event level score is greater than 5 points or the current departure frequency margin is insufficient, the scheme replacement method is executed, and the complete emergency plan pre-stored in the mapping table is directly called as the new scheduling scheme.
[0101] If the incremental correction method is executed, a set of correction coefficients is generated based on the strategy parameters in the mapping table. The set of correction coefficients includes the departure frequency correction coefficient, the route correction coefficient, and the skip station rule correction coefficient.
[0102] If the alternative plan is implemented, a complete departure timetable is loaded from the plan library. This timetable is a complete scheduling plan that has been prepared offline in advance and verified. It contains the departure instruction sequence and vehicle number for each 15-second window within the next 15 minutes. Its format is completely consistent with the optimal compromise scheduling plan.
[0103] The incrementally corrected scheduling scheme or the directly loaded emergency plan is uniformly packaged into a standard format scheduling instruction set and then output. The scheduling instruction set includes a scheme type identifier, event level score, trigger event type, and a complete departure timetable. If it is an incremental correction, the original values of the correction coefficient set are attached.
[0104] In this embodiment, it should be specifically noted that the internal safety events include, but are not limited to, sudden braking, lane departure, forward collision, and driver fatigue; the external environmental events include, but are not limited to, increased traffic congestion, the end of large events, temporary traffic control, and extreme weather; the event level score ranges from 1 to 10, with higher scores indicating greater event severity; the strategy types include incremental correction and scheme replacement; the strategy parameters include, but are not limited to, the magnitude of frequency increase / decrease, skip-stop range, and whether to activate backup vehicles. External event information includes, but is not limited to, large event scheduling, traffic control notices, and weather warnings. The frequency correction coefficient applies to the frequency output in step three, scaling it proportionally (e.g., multiplying by 1.3 indicates increased frequency). The route correction coefficient is used to indicate whether to activate the interval train or express train mode, for example, operating only on the most congested sub-segment of the route. The skip-stop rule correction coefficient is used to specify which stations will not be temporarily skipped under the current event.
[0105] In this embodiment, it is specifically noted that the system distributes scheduling instructions to three types of execution terminals via the MQTT protocol. For the vehicle-mounted terminal, the system sends the planned departure time, planned arrival time, and planned route for each vehicle. After receiving the information, the vehicle-mounted terminal provides a voice prompt to the driver to prepare for departure 60 seconds before the scheduled departure time. For the electronic bus stop sign, the system sends the estimated arrival time of the next bus at each stop on the route for passengers to check in real time. For the driver's app, the system sends the driver's shift schedule, the assigned vehicle number, and the estimated travel time for the current task. The distribution process employs a confirmation and retransmission mechanism: after each instruction is sent, the system waits for a confirmation receipt from the terminal. If no receipt is received within 3 seconds, the instruction is resent, with a maximum of 3 retries; if all 3 attempts fail, an alarm is reported, prompting manual intervention.
[0106] In this embodiment, it is specifically noted that the system compares the departure time deviation with a preset threshold. The threshold has two levels: a warning threshold and a recalibration threshold. For the warning threshold (60 seconds), if the deviation exceeds 60 seconds but does not exceed 120 seconds, the system marks the train as having a minor drift, only logs it, and highlights it in yellow on the monitoring interface to alert the dispatcher, without triggering automatic intervention. For the recalibration threshold (120 seconds), if the deviation exceeds 120 seconds, the system marks the train as having a "serious drift," determining that there is execution drift and immediately triggering the online recalibration process. If the same route experiences three or more "minor drifts" within 15 minutes, it automatically escalates to "serious drift," also triggering recalibration.
[0107] In this embodiment, it should be specifically noted that when execution drift is detected, the system performs online recalibration in the rolling time domain. The specific steps are as follows:
[0108] Determine the recalibration range, starting from the current time, and lock the next 5 minutes (i.e., the next 20 15-second windows) as the recalibration time domain. Subsequent trains outside this range will remain unchanged from their original schedules.
[0109] Calculate the cumulative deviation and calculate the total delay time that has occurred so far, which is the sum of the delays of all trains that have actually occurred at the current moment;
[0110] The departure intervals are partially adjusted, and the departure intervals of the remaining trains scheduled to depart within the next 5 minutes are reduced proportionally by the amount of the total delay time. This allows subsequent trains to gradually make up for the delays, while ensuring that the reduced departure intervals are not less than the minimum safe interval allowed by the line.
[0111] Generate a correction instruction, encapsulate the adjusted departure timetable into a partial correction instruction, send it to the affected execution terminals, and mark the instruction as a recalibration instruction.
[0112] During the lockout period, once a recalibration is triggered, recalibration is prohibited from being triggered again for the next 2 minutes to prevent system oscillation caused by high-frequency adjustments.
[0113] In this embodiment, it should be specifically noted that each deviation monitoring and recalibration operation generates a structured execution log, which includes the route number, shift number, planned departure time, actual departure time, deviation value, whether recalibration was triggered, and the planned departure time after recalibration. This log is written to the time-series database in real time for use by the offline performance evaluation module in step six during end-of-day analysis.
[0114] Furthermore, the prediction model error refers to the weighted average absolute percentage error of the station alighting passenger flow prediction and the weighted average absolute percentage error of the road segment traffic speed prediction. If either indicator exceeds the threshold, the prediction model is determined to need to be updated.
[0115] The actual load factor of each section in each 15-second window on the previous day is statistically analyzed and compared with the ideal load factor range set in the optimization model. The absolute value of the cumulative deviation of the part exceeding the range is calculated, and the average value of the whole day is taken to obtain the load factor deviation of the scheduling scheme. If the average value exceeds the preset threshold, it is determined that the target weight of the load factor of the optimization model needs to be adjusted.
[0116] The actual energy consumption of all vehicles on the previous day is statistically analyzed and compared with the planned energy consumption in the optimization model. The percentage deviation of the total energy consumption for the whole day is calculated to obtain the energy consumption deviation of the scheduling plan. If the deviation exceeds the preset threshold, it is determined that the energy consumption target weight of the optimization model needs to be adjusted.
[0117] Based on the number of passengers entering the platform recorded in step one and the actual departure time recorded in step five, the average actual waiting time of passengers at each platform for each time period is calculated using queuing theory formulas. The achievement rate is calculated based on the average actual waiting time and the planned waiting time in the optimization model. The achievement rate is equal to the proportion of actual waiting time not exceeding the planned waiting time. If the daily achievement rate is lower than the preset threshold, it is determined that the target weight of waiting time in the optimization model needs to be adjusted.
[0118] In this embodiment, it should be specifically noted that the system executes the following hierarchical update strategy for the prediction model:
[0119] If either the weighted average absolute percentage error of the predicted passenger flow at the station or the weighted average absolute percentage error of the predicted traffic speed on the road segment exceeds the threshold, an incremental learning update is triggered. This update only fine-tunes the parameters of the last two fully connected layers of the already trained spatiotemporal graph network model. An elastic weight consolidation method is used to prevent catastrophic forgetting. The updated data consists of all newly generated predicted-actual paired samples from the previous day. The incremental update is completed between 2:00 AM and 3:00 AM, taking no more than 30 minutes.
[0120] If all prediction errors do not exceed the threshold, incremental updates will not be performed.
[0121] Regardless of whether incremental updates are triggered, the system performs a full retraining every Sunday morning at midnight. Using all historical data from the past 30 days, the entire spatiotemporal graph network model is trained from scratch, all network layer parameters are updated, and the mean and standard deviation used for Z-score standardization in the third feature dimension are recalculated. The full retraining is completed between 2:00 AM and 6:00 AM, taking no more than 4 hours.
[0122] In this embodiment, it should be specifically noted that the system implements the following adjustment strategy for the optimization model:
[0123] If any evaluation indicator in sub-phase three or sub-phase four exceeds the threshold, the target weight coefficients in the multi-objective optimization model of step three will be adjusted. When the actual load factor deviation is large, the weight of the load factor closeness target will be increased; when the actual energy consumption deviation is large, the weight of the energy consumption target will be increased; when the waiting time achievement rate is low, the weight of the waiting time target will be increased. The weight adjustment range is proportional to the degree of deviation, and the maximum adjustment range in a single instance will not exceed 20% of the original weight.
[0124] If none of the evaluation indicators exceed the threshold, the existing weighting coefficients will remain unchanged.
[0125] In this embodiment, it should be noted that the preset values, thresholds, and weights used are selected based on actual needs, and no specific value restrictions are imposed here.
[0126] like Figure 2 As shown, this embodiment provides a public transportation prediction and optimization scheduling system based on multi-source data fusion, including a multi-source data acquisition module, a spatiotemporal demand prediction module, a capacity optimization scheduling module, a scenario adaptive correction module, an instruction issuance module, an execution verification module, and an offline performance evaluation module.
[0127] The multi-source data acquisition module establishes a unified public transportation data access gateway, which collects vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from the platform, and road congestion information in real time. After format normalization and data cleaning, it outputs a real-time data stream.
[0128] The spatiotemporal demand prediction module constructs a spatiotemporal graph network model. Taking the historical sequence of the past preset time window as input, it maps the real-time data stream into a three-dimensional tensor composed of time dimension, line station spatial dimension and multi-feature dimension. After spatial attention processing and time attention processing, it outputs the station alighting passenger flow and road segment speed at future moments.
[0129] The capacity optimization and scheduling module uses the predicted passenger flow at the station and the real-time passenger flow to back-calculate the cross-sectional demand through OD, establishes a multi-objective model based on the cross-sectional demand, solves it through NSGA-II, and outputs the optimal compromise scheduling scheme based on real-time traffic conditions.
[0130] The scenario adaptive correction module establishes a three-level mapping table of event-level-policy, comprehensively evaluates the event level score based on alarm level and external event API, and determines whether to perform incremental correction or scheme replacement on the optimal compromise scheduling scheme after arbitration, and finally outputs the corrected scheduling instruction set.
[0131] The instruction issuing module will issue the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP;
[0132] The execution verification module starts a deviation monitoring thread at the same time as the instruction is issued to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, it determines whether there is execution drift. If execution drift exists, it triggers online recalibration.
[0133] The offline performance evaluation module retrieves all actual operating data from the previous day during the daily off-peak period, calculates the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers, and compares the calculated values of the indicators with preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.
[0134] In this embodiment, it should be specifically noted that the system also includes a database, which stores data information from all modules in the system. The multi-source data acquisition module is connected to the spatiotemporal demand prediction module, the capacity optimization scheduling module, the scenario adaptive correction module, the execution verification module, and the offline performance evaluation module. The spatiotemporal demand prediction module is connected to the capacity optimization scheduling module. The capacity optimization scheduling module, the scenario adaptive correction module, the instruction issuance module, the execution verification module, and the offline performance evaluation module are sequentially connected. The offline performance evaluation module is connected to the spatiotemporal demand prediction module and the capacity optimization scheduling module. All modules in the system are connected to the database.
[0135] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A public transportation prediction and optimization scheduling method based on multi-source data fusion, characterized in that, Includes the following steps: Step 1: Build a unified public transportation data access gateway to collect vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from stations, and road congestion information in real time. After format normalization and data cleaning, output real-time data stream. Step 2: Construct a spatiotemporal graph network model. Using the historical sequence of the past preset time window as input, the real-time data stream is mapped into a three-dimensional tensor consisting of time dimension, route station spatial dimension and multi-feature dimension. After spatial attention processing and temporal attention processing, the future station alighting passenger flow and road segment traffic speed are output. Step 3: The predicted passenger flow at the station and the real-time passenger flow are used to back-calculate the cross-sectional demand through OD. A multi-objective model is established based on the cross-sectional demand, and the model is solved by NSGA-II. The optimal compromise scheduling scheme is output based on the real-time traffic conditions. Step 4: Establish a three-level mapping table of event-level-policy. Based on the alarm level and the external event API, comprehensively evaluate the event level score. After arbitration, determine whether to perform incremental correction or scheme replacement for the optimal compromise scheduling scheme. Finally, output the corrected scheduling instruction set. Step 5: Send the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP. At the same time, start the deviation monitoring thread to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, determine whether there is execution drift. If execution drift exists, trigger online recalibration. Step 6: During the daily off-peak period, retrieve all actual operation data from the previous day, calculate the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers. Compare the calculated values of the indicators with the preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.
2. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 1, characterized in that, The vehicle positioning data includes vehicle ID, latitude and longitude, instantaneous speed, heading angle, timestamp, and current passenger capacity. The alarm data of the active safety control system includes alarm type, alarm level, triggering vehicle ID, trigger timestamp, and alarm duration. The alarm types include emergency braking, lane departure, forward collision, and driver fatigue. The platform passenger flow monitoring data includes platform ID, cumulative number of people entering the station in the past 15 seconds, cumulative number of people exiting the station in the past 15 seconds, number of people remaining on the platform, and the start and end of the data time window. The road congestion information includes road segment ID, congestion index, average traffic speed, and data update timestamps pushed every 5 minutes.
3. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 2, characterized in that, The real-time data stream is output after format normalization and data cleaning. The real-time data stream has a time granularity of 15 seconds and includes the start time of the time window, the end time of the time window, the data generation timestamp, the route number, the direction of travel, the station number, the road segment number, the vehicle's unique identifier, the vehicle's current horizontal coordinate, the vehicle's current vertical coordinate, the vehicle's instantaneous speed, the vehicle's current passenger capacity, the current window alarm level, the alarm type identifier, the number of people entering the platform, the number of people exiting the platform, the number of people remaining on the platform, the road segment congestion index, the road segment average traffic speed, and the data quality flags for each field.
4. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 3, characterized in that, The previously preset time window refers to the past 30 time windows, each time window being 15 seconds; The future time refers to the next 15 minutes, with 60 output steps in 15-second windows; The mapping of real-time data streams into a three-dimensional tensor consisting of time dimension, line station spatial dimension, and multi-feature dimension includes: The real-time data streams of the past 30 time windows are mapped according to three dimensions: time, space, and feature, to obtain the first time dimension, the second space dimension, and the third feature dimension. The first time dimension is fixed at 30, corresponding to 30 consecutive historical time windows, arranged in order from oldest to newest. The second spatial dimension is fixed as the total number of stations under the jurisdiction of the line, arranged in order from the starting station to the ending station according to the direction of line operation. If the line includes branch lines or loop lines, they are uniformly coded according to the actual physical running order. Transfer stations are counted repeatedly as independent nodes in the spatial dimensions of different lines. The third feature dimension is to aggregate the multi-source observations of each station under each time window into a feature vector of fixed length. After the tensor is constructed, Z-score standardization is performed on each numerical field in the third feature dimension, which is to subtract the mean of the feature over all sites and all historical windows, and then divide by the standard deviation.
5. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 4, characterized in that, The process of using predicted station alighting passenger flow and real-time boarding passenger flow to back-calculate cross-sectional demand includes: The passenger flow at each station within a 15-second window over the next 15 minutes will be used as the expected number of passengers to alight at each station over the next 60 time windows. The actual number of passengers entering each station within the latest 15-second window is extracted from the real-time data stream and used as the benchmark for boarding passenger flow at that moment. In the subsequent 15-minute prediction period, it is assumed that the boarding passenger flow of each station remains unchanged at the value of the latest window. Call the OD transfer rate matrix that was pre-statistically calculated offline for the route. For any two stations i and j, i≠j, multiply the real-time boarding passenger flow of station i at the current time by the transfer rate from i to j in the OD matrix to obtain the estimated number of passengers who boarded at station i and whose destination is station j. The estimated number of passengers at OD is checked for consistency with the predicted passenger flow at station j in step two. If the deviation between the two exceeds a preset threshold, the predicted value in step two is used as the main factor for weighted correction. The correction coefficient is the statistical confidence level of the OD matrix in the same historical period. If the deviation between the two does not exceed the preset threshold, the predicted number of passengers and the predicted value in step two are weighted and fused. The fused value is used as the final estimate of the passenger flow at that station, and the data point is marked as high confidence. At the same time, the corresponding elements in the OD transfer rate matrix are updated according to the weight ratio. Repeat the consistency check above to obtain the OD passenger flow demand matrix between each pair of stations; The OD demand matrix is accumulated and summed along the route to obtain the passenger flow at any adjacent station section. For each section, the maximum passenger flow in 60 windows within the next 15 minutes is taken as the peak passenger flow of that section.
6. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 5, characterized in that, The multi-objective model based on cross-sectional requirements includes: Based on the peak passenger flow at each cross-section, calculate the minimum departure frequency to meet transportation demand. Read the total number of available vehicles and the driver scheduling limit for the route, and calculate the highest departure frequency that the system can provide; Using the departure timetable in 15-second windows within the next 15 minutes as the decision variable, and with the optimization objectives of minimizing the average waiting time of passengers across the entire line, maximizing the closeness of the full load rate of each section to the ideal full load rate, and minimizing operating energy consumption, a multi-objective model is established after determining the constraints. The constraints include the capacity supply of each section, i.e., the sum of the rated passenger capacity of all vehicles passing through the section within 15 minutes is greater than or equal to the peak passenger flow of the section; the actual departure frequency is between the calculated minimum departure frequency and the maximum departure frequency; the departure interval between any two consecutive buses on the same route is greater than or equal to the minimum safe interval allowed by the route and less than or equal to the maximum service interval specified by industry standards; the continuous running time of each vehicle is less than or equal to the maximum legal driving time limit for drivers; and the turnaround time meets the minimum time requirements for vehicle charging or refueling.
7. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 6, characterized in that, The scheduling scheme, which is solved using NSGA-II and outputs the optimal scheduling based on real-time traffic conditions, includes: The established multi-objective model is input into the NSGA-II multi-objective genetic algorithm for solution, and the Pareto front solution set is obtained. Obtain the latest road congestion index from Step 1, and read the confidence interval width of the predicted traffic speed of each road segment in the next 15 minutes from Step 2. For each candidate scenario in the Pareto front, calculate the sensitivity of its travel time to congestion changes. This involves perturbing the current congestion index of each road segment upwards by 10%, recalculating the total travel time of all vehicles under each scenario during the forecast period, comparing it with the original travel time, and calculating the percentage increase in travel time. This percentage is taken as the road condition sensitivity of the scenario. The solution with the lowest road condition sensitivity is selected from the Pareto front. It is then checked whether the solution meets the minimum departure frequency constraint. If it does, it is output directly. If it does not, the solution with the second lowest sensitivity is tried in turn from the Pareto front until a feasible solution that meets the minimum frequency requirement is found. Output the optimal compromise scheduling scheme for the current forecast period. The optimal scheduling scheme includes an indication sequence of whether a train will depart in each 15-second window within the next 15 minutes and a designated vehicle number for each train.
8. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 7, characterized in that, The specific processing flow for step four is as follows: Establish a three-level mapping table of events, levels, and policies. The first level is the event type, which is divided into internal security events and external environment events. The second level is the event level, with each event type corresponding to a level score. The third level is the corresponding policy, which includes the policy type, policy parameters, and policy duration. Real-time monitoring of internal and external trigger sources. The internal trigger source is the alarm level in the real-time data stream. If multiple alarms exist within the same 15-second window, the highest level is taken as the internal event score for that window. The external trigger source is the external event information accessed through the external event API. The preset severity of the external event is mapped to a level score of 1 to 10. The maximum level score of all trigger events in the current window is taken as the current comprehensive event level score. If no event is triggered, the overall event level score is 0, indicating that the current state is normal operation and no correction is needed; the optimal compromise scheduling solution is output directly. When multiple events exist in the same window and have the same level score, the final response strategy is determined in descending order of priority: security events first, events with a large impact range first, and events with strong intervention capabilities first. If the priority still cannot be distinguished, events with preset plans in the system will be responded to first, and events without preset plans will be downgraded to only be reported for manual processing. Based on the event type and level score determined after arbitration, the corresponding strategy record is searched in the mapping table, the departure frequency in the optimal compromise scheduling scheme is read, and the margin between the current departure frequency and the minimum departure frequency is determined. If the event level score is less than or equal to 5 points and the current departure frequency margin is greater than 20%, the incremental correction method is executed, and only the parameters of the original scheduling scheme are fine-tuned. If the event level score is greater than 5 points or the current departure frequency margin is insufficient, the scheme replacement method is executed, and the complete emergency plan pre-stored in the mapping table is directly called as the new scheduling scheme. If the incremental correction method is executed, a set of correction coefficients is generated based on the strategy parameters in the mapping table. The set of correction coefficients includes the departure frequency correction coefficient, the route correction coefficient, and the skip station rule correction coefficient. If the alternative plan is implemented, a complete departure timetable is loaded from the plan library. This timetable is a complete scheduling plan that has been prepared offline in advance and verified. It contains the departure instruction sequence and vehicle number for each 15-second window within the next 15 minutes. Its format is completely consistent with the optimal compromise scheduling plan. The incrementally corrected scheduling scheme or the directly loaded emergency plan is uniformly packaged into a standard format scheduling instruction set and then output. The scheduling instruction set includes a scheme type identifier, event level score, trigger event type, and a complete departure timetable. If it is an incremental correction, the original values of the correction coefficient set are attached.
9. The public transportation prediction and optimization scheduling method based on multi-source data fusion according to claim 1, characterized in that, The prediction model error refers to the weighted average absolute percentage error of the predicted passenger flow at the station and the weighted average absolute percentage error of the predicted road speed. If either indicator exceeds the threshold, the prediction model is determined to need to be updated. The actual load factor of each section in each 15-second window on the previous day is statistically analyzed and compared with the ideal load factor range set in the optimization model. The absolute value of the cumulative deviation of the part exceeding the range is calculated, and the average value of the whole day is taken to obtain the load factor deviation of the scheduling scheme. If the average value exceeds the preset threshold, it is determined that the target weight of the load factor of the optimization model needs to be adjusted. The actual energy consumption of all vehicles on the previous day is statistically analyzed and compared with the planned energy consumption in the optimization model. The percentage deviation of the total energy consumption for the whole day is calculated to obtain the energy consumption deviation of the scheduling plan. If the deviation exceeds the preset threshold, it is determined that the energy consumption target weight of the optimization model needs to be adjusted. Based on the number of passengers entering the platform recorded in step one and the actual departure time recorded in step five, the average actual waiting time of passengers at each platform for each time period is calculated using queuing theory formulas. The achievement rate is calculated based on the average actual waiting time and the planned waiting time in the optimization model. The achievement rate is equal to the proportion of actual waiting time not exceeding the planned waiting time. If the daily achievement rate is lower than the preset threshold, it is determined that the target weight of waiting time in the optimization model needs to be adjusted.
10. A public transportation prediction and optimization scheduling system based on multi-source data fusion, employing the public transportation prediction and optimization scheduling method based on multi-source data fusion as described in any one of claims 1-9, characterized in that, It includes a multi-source data acquisition module, a spatiotemporal demand prediction module, a capacity optimization and scheduling module, a scenario adaptive correction module, an instruction issuance module, an execution verification module, and an offline performance evaluation module. The multi-source data acquisition module establishes a unified public transportation data access gateway, which collects vehicle positioning data, alarm data from the active safety control system, passenger flow monitoring data from the platform, and road congestion information in real time. After format normalization and data cleaning, it outputs a real-time data stream. The spatiotemporal demand prediction module constructs a spatiotemporal graph network model. Taking the historical sequence of the past preset time window as input, it maps the real-time data stream into a three-dimensional tensor composed of time dimension, line station spatial dimension and multi-feature dimension. After spatial attention processing and time attention processing, it outputs the station alighting passenger flow and road segment speed at future moments. The capacity optimization and scheduling module uses the predicted passenger flow at the station and the real-time passenger flow to back-calculate the cross-sectional demand through OD, establishes a multi-objective model based on the cross-sectional demand, solves it through NSGA-II, and outputs the optimal compromise scheduling scheme based on real-time traffic conditions. The scenario adaptive correction module establishes a three-level mapping table of event-level-policy, comprehensively evaluates the event level score based on alarm level and external event API, and determines whether to perform incremental correction or scheme replacement on the optimal compromise scheduling scheme after arbitration, and finally outputs the corrected scheduling instruction set. The instruction issuing module will issue the revised dispatch instruction set to the vehicle terminal, electronic bus stop sign and driver APP; The execution verification module starts a deviation monitoring thread at the same time as the instruction is issued to monitor the deviation between the actual departure time and the planned departure time. Based on the monitoring results, it determines whether there is execution drift. If execution drift exists, it triggers online recalibration. The offline performance evaluation module retrieves all actual operating data from the previous day during the daily off-peak period, calculates the prediction model error, the full load rate deviation of the scheduling plan, the energy consumption deviation of the scheduling plan, and the achievement rate of the average waiting time for passengers, and compares the calculated values of the indicators with preset thresholds to determine whether the prediction model needs to be updated and whether the optimization model parameters need to be adjusted.