Public transport vehicle scheduling optimization method and system, equipment and storage medium

By predicting the traffic data changes in public transportation sections and using deep Q network models to determine the scheduling strategy, the problem that traditional scheduling cannot be flexibly adjusted is solved, and more efficient public transportation resource allocation and operation management is achieved.

CN119863102AInactive Publication Date: 2025-04-22TANGSHAN CAOFEIDIAN LIANCHENG TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510352816.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional public transportation vehicle dispatch cannot be flexibly adjusted according to real-time traffic conditions and changes in passenger flow, resulting in overcrowding of vehicles and long waiting times for passengers during peak hours, while in low peak hours there are problems such as high vehicle air driving rate and waste of resources.

Method used

By predicting the second data based on the first data and historical data of the target road section, and determining the target scheduling strategy of public transportation vehicles using the target depth Q network model, fine management and scheduling optimization of vehicle operation are achieved.

Benefits of technology

It improves the accuracy and scientificity of public transportation vehicle scheduling optimization, optimizes the allocation of public transportation resources, reduces passenger waiting time, and improves vehicle utilization and overall operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863102A_ABST
    Figure CN119863102A_ABST
Patent Text Reader

Abstract

The invention provides a public transport vehicle scheduling optimization method and system, equipment and a storage medium, and belongs to the technical field of scheduling optimization, and the method comprises the steps: predicting second data of a target road section based on first data of the target road section and historical data of the target road section; wherein the first data is traffic data of the target road section in a current preset time period, the historical data is historical traffic data in a first duration, the first duration is a time period which is the same as the current preset time period, and the second data is predicted traffic data of the target road section; determining a target scheduling strategy of the public transport vehicle based on the plurality of scheduling strategies and a target depth Q network model, wherein the target scheduling strategy is a scheduling strategy corresponding to the second data; and carrying out scheduling optimization on the public transport vehicles based on the target scheduling strategy. According to the public transport vehicle scheduling optimization method and system, the equipment and the storage medium provided by the invention, the accuracy of public transport vehicle scheduling optimization can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of dispatching optimization, and more specifically, to a method and system, device, and storage medium for optimizing dispatching of public transportation vehicles. Background Art

[0002] With the acceleration of urbanization, public transportation, as an important part of urban transportation, has attracted much attention for its operational efficiency and service quality. Traditional public transportation vehicle scheduling is often based on experience or a simple fixed schedule, and cannot be flexibly adjusted according to factors such as real-time traffic conditions and changes in passenger flow. During peak hours, vehicles are prone to congestion and passengers wait too long; during off-peak hours, there may be a high rate of empty vehicles and a waste of resources. Therefore, there is an urgent need for an accurate public transportation vehicle scheduling optimization method. Summary of the invention

[0003] The purpose of the present disclosure is to provide a method and system, device, and storage medium for optimizing public transportation vehicle scheduling, so as to improve the accuracy of optimizing public transportation vehicle scheduling.

[0004] A first aspect of the embodiments of the present disclosure provides a method for optimizing public transportation vehicle scheduling, including: Predicting second data of the target road section based on first data of the target road section and historical data of the target road section; wherein the first data is traffic data of the target road section within a current preset time period, the historical data is historical traffic data within a first time period, the first time period is a time period that is the same as the current preset time period, and the second data is predicted traffic data of the target road section; Determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, wherein the target scheduling strategy is a scheduling strategy corresponding to the second data; The public transportation vehicle is dispatched and optimized based on the target dispatch strategy.

[0005] A second aspect of the embodiments of the present disclosure provides a public transportation vehicle scheduling optimization system, including: A data prediction module, configured to predict second data of the target road section based on first data of the target road section and historical data of the target road section; wherein the first data is traffic data of the target road section within a current preset time period, the historical data is historical traffic data within a first time period, the first time period is a time period having the same length as the current preset time period, and the second data is predicted traffic data of the target road section; A scheduling strategy determination module, used to determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, wherein the target scheduling strategy is a scheduling strategy corresponding to the second data; A scheduling strategy execution module is used to optimize the scheduling of the public transportation vehicles based on the target scheduling strategy.

[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned public transportation vehicle scheduling optimization method when executing the computer program.

[0007] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned public transportation vehicle scheduling optimization method are implemented.

[0008] The public transportation vehicle scheduling optimization method, system, device, and storage medium provided by the embodiments of the present disclosure have the following beneficial effects: The present disclosure predicts the second data through the first data and historical data of the target section, which can more accurately grasp the traffic data change trend of the target section and provide strong support for subsequent scheduling decisions. Afterwards, the present disclosure introduces a target deep Q network model to determine the target scheduling strategy for public transportation vehicles, thereby realizing the intelligence and automation of scheduling decisions, improving the accuracy and scientificity of scheduling decisions, and helping to optimize the allocation of public transportation resources. Finally, scheduling and optimizing public transportation vehicles based on the target scheduling strategy can achieve refined management of public transportation vehicle operations and further improve the overall operational efficiency of the public transportation system. Therefore, the present disclosure can improve the accuracy of public transportation vehicle scheduling optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of a process flow of a method for optimizing public transportation vehicle scheduling provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of a public transportation vehicle scheduling optimization system provided by an embodiment of the present disclosure; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0011] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0012] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0013] Please refer to Figure 1 , Figure 1 A flow chart of a method for optimizing public transportation vehicle scheduling provided by an embodiment of the present disclosure, the method comprising: S101: Predicting second data of the target road section based on first data of the target road section and historical data of the target road section; wherein the first data is the traffic data of the target road section within a current preset time period, the historical data is the historical traffic data within a first time period, the first time period is a time period having the same length as the current preset time period, and the second data is the predicted traffic data of the target road section.

[0014] In this embodiment, the target road section is a road section that needs to be optimized for public transportation vehicle scheduling, such as a specific street passed by a bus route in a city or a road in a certain area. The first data is the traffic data of the target road section in the current preset time period, wherein the current preset time period is a pre-set time interval, such as 15 minutes, 30 minutes, etc.; the traffic data may include passenger flow and traffic conditions, the passenger flow may be passenger boarding flow and passenger alighting flow, and the traffic conditions may be whether the traffic is congested and whether the road section has a speed limit.

[0015] The historical data is the traffic data of the target road section during the same preset time period in the past, and can be the traffic data of the same period of each day or month.

[0016] The second data is the predicted traffic data of the target road section, which is obtained by analyzing and processing the first data and historical data to predict the future traffic data situation of the target road section, such as predicting the traffic data changes in the next 30 minutes.

[0017] This embodiment can collect data such as the number of passengers getting on and off at each bus stop as the basis for passenger flow by setting sensors at bus stops; it can also obtain real-time road traffic congestion and speed limit data as the basis for traffic conditions through the interface of the traffic management department, and generate first data through collection. At the same time, the historical traffic data corresponding to the current preset time period in the target section is retrieved from the historical database, that is, historical data. This embodiment organizes and analyzes the collected first data and historical data, and uses appropriate prediction models or algorithms, such as time series analysis models, machine learning algorithms, etc., to predict the second data of the target section based on the processed first data and historical data, that is, future traffic data.

[0018] This embodiment applies the second data to the smart bus stop for display. The smart bus stop displays the arrival time, number, route and other information of the bus in real time on a large screen to ensure that passengers can clearly understand the arrival of the bus and avoid blind waiting and wasting time. At the same time, a function to display the congestion in the car can also be designed to help passengers choose a more comfortable ride. The smart bus stop is equipped with a high-definition camera to monitor the surrounding environment of the stop in real time, detect abnormal situations in time, and improve the safety of the stop. At the same time, the bus stop monitoring can be connected to the public security system to provide video data support for smart city construction and comprehensive social governance.

[0019] At the same time, the smart bus stop system includes website homepage, vehicle management, driver management, monitoring management, route management, publicity management, vehicle dispatching function, electronic map and route map. Among them, the smart bus stop system realizes the real-time dispatching and monitoring function of public buses. The system can optimize the dispatching of vehicles according to the real-time location and estimated arrival time of the vehicles; the location information of public buses can be displayed in real time on the smart bus stop system platform and the bus stop display screen. The bus stop displays the relative information of the route and vehicle location, as well as the estimated arrival time of the vehicle. The smart bus stop system supports the display of the relative information of the vehicle location and the station location, as well as the dynamic information of the actual location of the vehicle on the two-dimensional vector map.

[0020] In addition, passengers can use the smart bus stop system mobile APP to check bus routes and estimated arrival times in real time, and display the vehicle's running location through dynamic graphics; input the starting and ending stations to automatically display transfer information. The smart bus stop system mobile APP also displays personal information, ride history, etc., and also includes a scan-to-ride function, and provides a function to query bus card recharge points, etc.

[0021] S102: Determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, where the target scheduling strategy is a scheduling strategy corresponding to the second data.

[0022] In this embodiment, the multiple dispatching strategies are multiple feasible solutions pre-designed for public transportation vehicle dispatching, which may include different arrangements in terms of departure time interval setting, departure frequency adjustment, and route planning. For example, one dispatching strategy may be to dispatch a bus every 5 minutes during peak hours and travel along a regular route; another dispatching strategy may be to extend the departure time interval during off-peak hours and not stop at bus stops with zero passenger flow, thereby reducing parking time and improving efficiency in reaching the destination.

[0023] The target Deep Q-Network (DQN) model is a model based on reinforcement learning, which approximates the Q-value function by building a neural network to solve decision-making problems. In this embodiment, the target DQN model is a trained DQN model that can be used to evaluate the advantages and disadvantages of different scheduling strategies under various traffic conditions and passenger needs. The model can output the expected reward value that may be obtained by executing each scheduling strategy based on the input state information (such as traffic data in the current preset time period). In response to the maximum expected reward value corresponding to each scheduling strategy, the scheduling strategy is used as the target scheduling strategy.

[0024] The target scheduling strategy is the public transportation scheduling that is most suitable for predicting traffic data, determined from multiple scheduling strategies based on the evaluation results of the target DQN model. It is the optimal scheduling solution that can achieve the goals of minimizing passenger waiting time, maximizing vehicle utilization, and reducing operating costs.

[0025] Specifically, this embodiment first needs to design different public transportation vehicle scheduling strategies to construct a scheduling strategy set, that is, multiple scheduling strategies. For example, consider different departure time interval combinations, such as 5 minutes, 10 minutes, and 15 minutes; different driving route options, such as regular route, alternative route 1, alternative route 2, etc.; and different departure frequency adjustment rules, such as fixed frequency, dynamic frequency adjustment over time, etc., and form multiple scheduling strategies with the above different combinations.

[0026] Then, this embodiment uses a large amount of historical data and corresponding actual scheduling effect data to train the DQN model to obtain the target DQN model. During the training process, the DQN model will continuously learn the reward feedback obtained by adopting different scheduling strategies under different states, and by adjusting the parameters of the neural network, it can gradually accurately predict the expected reward value of each scheduling strategy under a given state, that is, the Q value.

[0027] Finally, by comparing the Q value of each scheduling strategy, the scheduling strategy with the highest Q value is selected as the target scheduling strategy.

[0028] S103: Optimizing the scheduling of public transportation vehicles based on the target scheduling strategy.

[0029] In this embodiment, after the target scheduling strategy is determined in step S102, it is applied to public transportation vehicles, that is, the operation of public transportation vehicles is adjusted and improved according to the target scheduling strategy to achieve the goals of reducing passenger waiting time, improving vehicle utilization, and controlling costs.

[0030] This embodiment clarifies the various contents of the target scheduling strategy and splits it into specific executable instructions. For example, if the target scheduling strategy stipulates that the departure frequency is adjusted during a specific period, it is necessary to clarify the time node of the adjustment and the specific frequency value after the adjustment; if it involves route changes, it is necessary to determine the triggering conditions of the change, the specific direction of the new route and the passing stations, etc. After that, the decomposed scheduling instructions are accurately conveyed to the relevant execution personnel and systems. For public buses, the departure time, driving route and other instructions are sent to the on-board terminal of each vehicle through the intelligent scheduling system to inform the driver to ensure the coordinated execution of all links. At the same time, during the execution of the scheduling strategy by public transportation vehicles, the real-time monitoring system can be used to continuously track information such as vehicle operation status, traffic conditions and passenger flow changes. Once it is found that the actual situation does not meet expectations, such as sudden traffic congestion causing the vehicle to fail to arrive at the station on time, and the passenger flow at a certain station far exceeds expectations, the scheduling strategy is fine-tuned in time according to the established rules or the target DQN model is re-called for evaluation to ensure that the vehicle operation is always in a better state.

[0031] From the above, it can be concluded that the present disclosure predicts the second data through the first data and historical data of the target section, which can more accurately grasp the traffic data change trend of the target section and provide strong support for subsequent scheduling decisions. Afterwards, the present disclosure introduces the target DQN model to determine the target scheduling strategy for public transportation vehicles, realizes the intelligence and automation of scheduling decisions, improves the accuracy and scientificity of scheduling decisions, and helps to optimize the allocation of public transportation resources. Finally, scheduling and optimizing public transportation vehicles based on the target scheduling strategy can achieve refined management of public transportation vehicle operations and further improve the overall operational efficiency of the public transportation system. Therefore, the present disclosure can improve the accuracy of public transportation vehicle scheduling optimization.

[0032] In one embodiment of the present disclosure, the traffic data includes passenger flow and traffic conditions; Predicting second data of the target road segment based on the first data of the target road segment and historical data of the target road segment includes: The passenger flow and historical passenger flow are input into the target autoregressive moving average model for prediction to obtain the predicted passenger flow; The traffic conditions and historical traffic conditions are input into the target traffic flow model for prediction to obtain the predicted traffic conditions; The second data of the target road section is obtained based on the predicted passenger flow and the predicted traffic conditions.

[0033] In this embodiment, the passenger flow can be the number of people waiting or getting on and off a bus at a bus stop within the current preset time period. The target auto-regressive moving average (ARIMA) model is a time series prediction model that predicts future data by analyzing the time series data's own historical values ​​(autoregressive part) and past prediction errors (moving average part). In this embodiment, it is used to predict future passenger flow based on current and historical passenger flow.

[0034] The traffic condition may be a road congestion condition or a vehicle speed condition within a current preset time period. The target traffic flow model is used to describe traffic flow characteristics, such as a model of vehicle driving, traffic congestion formation and dissipation. This embodiment predicts future traffic conditions based on current and historical traffic conditions. For example, the target traffic flow model may be a fluid mechanics model, a cellular transmission model, or a car-following model.

[0035] When the first data is passenger flow, the passenger flow data of the target section in the current preset time period is collected, and the historical passenger flow data of the corresponding historical time period is obtained at the same time. These two sets of data are input into the trained target ARIMA model. The model mines the law of passenger flow changes over time by learning from historical data, including periodicity, trend and other characteristics. Based on the above law, the input current passenger flow data is processed and calculated, and the predicted passenger flow is output, that is, the expected passenger flow situation of the target section in the future time period.

[0036] When the first data is the traffic condition, the traffic condition data of the target road section in the current preset time period, such as vehicle flow, vehicle speed, congestion index, etc., and the corresponding historical traffic condition data are first collected. The above data is input into the target traffic flow model, which uses traffic flow theory and historical data to model the traffic operation rules, such as analyzing the relationship between different traffic parameters and the propagation mechanism of traffic congestion. The target traffic flow model predicts the traffic conditions of the target road section in the future based on the input data and its own modeling results, such as whether congestion will occur, the degree and scope of congestion, and the change trend of vehicle speed, etc., to obtain the predicted traffic conditions.

[0037] This embodiment integrates the predicted passenger flow and the predicted traffic conditions to form complete predicted traffic data of the target road section, namely, the second data.

[0038] It can be concluded from the above that this embodiment uses the target ARIMA model and the target traffic flow model to predict the first data (passenger flow or traffic conditions) of the target road section and its historical data, respectively, to effectively improve the accuracy of the prediction. In addition, this embodiment can comprehensively consider the regularity of historical data and the real-time nature of current data to predict passenger flow and traffic conditions, which helps to fully grasp the traffic situation of the road section.

[0039] In one embodiment of the present disclosure, the training process of the target autoregressive moving average model includes: Iteratively optimize the hyperparameters of the autoregressive moving average model to obtain the target hyperparameters; In response to the iterative optimization satisfying the first condition or satisfying the second condition, determining a target autoregressive moving average model based on the target hyperparameters; The first condition is that within the first number of iterations, the difference between the fitness functions obtained in two consecutive iterations is less than the first fitness threshold; The second condition is that the number of iterations is equal to the second number of iterations, wherein the second number of iterations is greater than the first number of iterations.

[0040] In this embodiment, the hyperparameters of the ARIMA model include the autoregressive order (p), the difference order (d), and the moving average order (q). Iterative optimization is a process of gradually finding the hyperparameter combination that optimizes the performance of the ARIMA model by repeatedly calculating and adjusting the hyperparameters. In each iteration, the hyperparameters are modified according to the performance of the ARIMA model on the training data to obtain a better model effect.

[0041] The first condition is one of the conditions for judging whether the iterative optimization has converged, that is, within the first number of iterations, the difference of the fitness function after each iteration is less than the first fitness threshold. At this time, it indicates that the performance of the ARIMA model changes very little in multiple iterations, tends to be stable, and has reached a good hyperparameter combination. Among them, the first number of iterations is the number of times that the difference of a pre-set fitness function is less than the first fitness threshold, which can be set according to experience; the first fitness threshold is a pre-set reference value, which can be set according to experience and is used to measure the degree of change of the fitness function.

[0042] The second condition is another condition for determining the termination of iterative optimization. When the number of iterations reaches the second number of iterations, the iterations are stopped regardless of whether the model performance converges or not. The second number of iterations can be adjusted based on the performance of the model. The second number of iterations is the total number of iterations for ARIMA model training, which is also a preset number value and can be set based on experience.

[0043] The fitness function is used to evaluate the performance of the ARIMA model on the training data. The target ARIMA model is the ARIMA model obtained after iterative optimization and satisfying the first condition or the second condition. This model has a relatively good combination of hyperparameters and can make relatively accurate predictions on given time series data.

[0044] The core of the training process of this embodiment is to minimize the prediction error of the ARIMA model on the training data by continuously adjusting the hyperparameters. The iterative optimization process uses the optimization algorithm to search for the optimal solution, i.e., the target hyperparameter, in the hyperparameter space, and the first condition and the second condition provide a termination mechanism for the iterative process. Finally, a target ARIMA model with good performance on the training data is obtained.

[0045] It can be concluded from the above that the training process of the target ARIMA model ensures the accuracy and stability of the model by iteratively optimizing the hyperparameters.

[0046] In one embodiment of the present disclosure, iterative optimization of hyperparameters of the autoregressive moving average model includes: The fitness function of the particle swarm optimization algorithm is determined based on the dimension of the particles in the particle swarm optimization algorithm; the dimension of the particles in the particle swarm optimization algorithm includes the autoregressive order, the difference order and the moving average order; Determine the learning factor of the particle swarm optimization algorithm based on the passenger flow variation characteristics of the bus stops within the target section; The hyperparameters of the autoregressive moving average model are iteratively optimized based on the fitness function and the learning factor.

[0047] In this embodiment, the dimensions of the particles of the Particle Swarm Optimization (PSO) algorithm correspond to the parameters of the problem solution. For ARIMA model hyperparameter optimization, the dimensions of the particles are the autoregressive order (p), the differential order (d), and the moving average order (q), that is, each particle can be represented as a three-dimensional vector (p, d, q), representing a set of hyperparameter combinations of the ARIMA model.

[0048] The fitness function is used to evaluate the quality of a particle (i.e., a combination of hyperparameters) in solving a problem. In ARIMA model hyperparameter optimization, the fitness function can measure the fit of the ARIMA model built using a certain set of hyperparameters (particle positions) to the training data.

[0049] The calculation formula of the fitness function is:

[0050] in, is the particle position, is the actual passenger flow, To predict passenger flow, is the total time steps of historical data, is the penalty coefficient (the value range is 0-0.1). The total time steps of historical data is the total number of time segments divided in chronological order in the collected historical data.

[0051] In the above formula, It can intuitively reflect the error ratio of the predicted value to the actual value, reflecting the accuracy of the prediction; It is used to avoid overfitting of the ARIMA model due to too high an order. The sum of the autoregressive order, the difference order and the moving average order is penalized through the penalty coefficient, so that the ARIMA model can avoid excessive complexity while pursuing prediction accuracy.

[0052] The learning factor includes individual learning factor and global learning factor, which determines the extent to which the particle refers to its own historical optimal position (individual learning) and the group's global optimal position (global learning) when updating its own speed and position. This embodiment can balance the local search ability and global search ability of the particle by adjusting the learning factor.

[0053] The passenger flow change characteristics are the characteristics of the passenger flow at the bus stop in the target section over time, such as whether it has obvious periodicity, trend or volatility, etc. The above characteristics can help determine the value of the learning factor in the PSO algorithm to better guide the particles to search for appropriate ARIMA model hyperparameters.

[0054] In this embodiment, the learning factor of the particle swarm optimization algorithm is determined based on the passenger flow change characteristics of the bus stops in the target section, including: Determine the initial individual learning factor and initial global learning factor of the particle swarm optimization algorithm; In response to the passenger flow change characteristic being that the amplitude value is greater than or equal to the first amplitude threshold, increasing the initial individual learning factor by a fifth step to obtain a target individual learning factor; and increasing the initial global learning factor by a sixth step to obtain a target global learning factor; In response to the passenger flow change characteristic being that the amplitude value is less than the first amplitude threshold, the initial individual learning factor is reduced by a seventh step length to obtain a target individual learning factor; and the initial global learning factor is reduced by an eighth step length to obtain a target global learning factor; The first amplitude threshold, the fifth step length, the sixth step length, the seventh step length and the eighth step length are all set based on experience, and the value range of the fifth step length, the sixth step length, the seventh step length and the eighth step length is 0.05-0.2.

[0055] The initial individual learning factor and the initial global learning factor can both be set to an initial value based on experience. The maximum values ​​of the target individual learning factor and the target global learning factor are both no more than 2.

[0056] Specifically, the steps of this embodiment are: First, initialize the particle swarm. A group of particles is randomly generated, and the position of each particle represents a set of hyperparameters (p, d, q) of the ARIMA model. The initial velocity can be randomly set.

[0057] Second, calculate the fitness. For each particle, calculate its fitness value according to the fitness function determined in the first step, that is, use the hyperparameters represented by the particle to build an ARIMA model, predict the historical passenger flow data, and calculate the prediction error to get the fitness value.

[0058] Third, update the particles. According to the current position, speed, individual historical optimal position and group global optimal position of the particles, combined with the learning factor determined in the second step, the particles are updated using the speed and position update formula of the particle swarm optimization algorithm.

[0059] Fourth, repeat the iteration. Repeat the steps of calculating fitness and updating particles to continuously optimize the position of particles, that is, to find a better combination of ARIMA model hyperparameters. As the iteration proceeds, the particles gradually approach the global optimal solution until the preset termination condition is met.

[0060] It can be concluded from the above that this embodiment improves the accuracy of the target ARIMA model in predicting the passenger flow at the bus stop. This embodiment ensures that the ARIMA model can fully capture the characteristics of the time series data by accurately setting the dimensions of the particles, including the autoregressive order, the difference order, and the moving average order. At the same time, the learning factor is adjusted according to the passenger flow change characteristics of the bus stop in the target section to further optimize the search efficiency of the algorithm.

[0061] In one embodiment of the present disclosure, a target scheduling strategy for public transportation vehicles is determined based on multiple scheduling strategies and a target deep Q network model, including: determining a state space characteristic of the predicted traffic data based on the second data; Determine the action space characteristics corresponding to each scheduling strategy; The state space features and action space features are input into the target deep Q network model to obtain the target scheduling strategy for public transportation vehicles; wherein the target deep Q network model is obtained by training the deep Q network model based on historical data and Q value function.

[0062] In this embodiment, the state space feature is a feature vector extracted from the first data and the second data that can comprehensively and concisely describe the traffic data of the predicted state. The action space feature corresponds to each scheduling strategy and is used to describe the feature vector representation of the impact of the strategy when it is executed. For example, the change in the waiting time of passengers at different stations caused by adjusting the departure frequency under a certain scheduling strategy, the change in the driving time of vehicles after the route is changed, etc.

[0063] For example, assuming that the target road section has three bus stops (stop A, stop B, and stop C), and the traffic data for the next two time periods (each time period is 1 hour) is predicted, the feature vector of the state space feature can be [passenger flow predicted at stop A in the first time period, passenger flow predicted at stop A in the second time period, passenger flow predicted at stop B in the first time period, passenger flow predicted at stop B in the second time period, passenger flow predicted at stop C in the first time period, passenger flow predicted at stop C in the second time period, road congestion index predicted in the first time period, road congestion index predicted in the second time period].

[0064] Assuming that the first scheduling strategy is to increase the departure frequency and some vehicles change to alternative routes, the feature vector of the action space characteristics corresponding to this scheduling strategy can be [station A is expected to reduce waiting time, station B is expected to reduce waiting time, station C is expected to reduce waiting time, vehicle expected average full load factor, expected operating cost increase].

[0065] The target DQN model is based on the DQN model and is trained using historical traffic data and the Q-value function. The Q-value function is a function used to evaluate the long-term value of taking a specific action in a certain state. In the public transportation scheduling scenario, by calculating the Q-value of different state-action pairs, the long-term cumulative reward that a certain scheduling strategy (action) can bring under a specific traffic state is reflected. The higher the reward, the better the strategy.

[0066] It can be concluded from the above that this embodiment comprehensively considers multiple scheduling strategies, and fully utilizes the information value of the first data and the second data through the accurate extraction of state space features and action space features. Combined with the application of the target deep Q network model, it can be efficiently trained based on historical data and Q value functions, accurately predict and output the optimal scheduling strategy, and improve the scheduling efficiency and accuracy of public transportation vehicles.

[0067] In one embodiment of the present disclosure, the public transportation vehicle scheduling optimization method further includes: Determining reference state space characteristics based on historical data; Determine a reference action space feature corresponding to each historical scheduling strategy based on each historical scheduling strategy; The Q-value function of the deep Q network model is determined by weighted calculation based on the reference state space characteristics, the reference action space characteristics, the reward function, the discount factor and the penalty factor.

[0068] The public transport vehicle dispatch optimization method further includes: Determine the reward function by weighted calculation based on passenger waiting time, vehicle idle rate and operating cost; Adjust the discount factor based on the error in predicted passenger flow based on historical traffic data; In response to the error in the predicted passenger flow being greater than or equal to a first error threshold, reducing the discount factor by a first step; In response to the error in the predicted passenger flow being less than a first error threshold, increasing the discount factor by a second step size; The penalty factor is adjusted based on the on-time performance of public transportation vehicles based on historical traffic data; In response to the on-time rate of the public transportation vehicle being greater than or equal to the first on-time rate threshold, increasing the penalty factor by a third step length; In response to the on-time rate of the public transportation vehicle being less than the first on-time rate threshold, the penalty factor is reduced in a fourth step.

[0069] In this embodiment, the reference state space feature is a feature vector that can reflect historical data (i.e., passenger flow and traffic status). The reference action space feature is a set of feature vectors corresponding to each historical dispatch strategy, reflecting the impact of adopting a certain dispatch strategy in the past. The above impact can be a change in vehicle running time, a change in passenger satisfaction, etc., which is quantified as a feature vector to clarify the specific performance of each action (dispatching strategy) when training the model.

[0070] The reward function is a function used to measure the immediate reward obtained by taking a specific action in a certain state. In this embodiment, the reward function comprehensively considers factors such as passenger waiting time, vehicle empty rate and operating cost, and obtains a value through weighted calculation. The higher the value, the better the action is in the current state.

[0071] The reward function is calculated as:

[0072] in, is the eigenvector of the reference state space characteristics, is the feature vector of the reference action space feature, Waiting time for passengers, is the vehicle idle rate, For operating costs, are weight coefficients, .

[0073] It means that the shorter the waiting time, the higher the reward; The lower the empty driving rate, the higher the reward; The lower the cost, the higher the reward. This embodiment can flexibly control the relative importance of each factor in the reward function by adjusting the weight coefficient.

[0074] The calculation formula of the Q value function is:

[0075] in, is the discount factor, is the penalty factor, is the maximum Q value in the future state, To perform actions The new reference state space features feature vector, is the feature vector of the new reference action space feature.

[0076] The discount factor is a coefficient used to weigh the importance of current rewards and future rewards when calculating long-term cumulative rewards. The discount factor usually ranges from 0 to 1. The closer the value is to 1, the more importance is attached to future rewards; the closer the value is to 0, the more importance is attached to current rewards. In this embodiment, the discount factor is adjusted according to the error of the predicted passenger flow to adapt to different prediction accuracy situations.

[0077] The penalty factor is a coefficient used to punish bad behavior or situations that do not meet expectations. In this embodiment, the penalty factor is adjusted according to the punctuality of the bus. When the punctuality does not meet the requirements, the Q value of the corresponding action is reduced by the penalty factor, prompting the model to select a scheduling strategy that can better guarantee the punctuality.

[0078] The first error threshold is a preset threshold that can be set based on experience and is used to determine whether the error of the predicted passenger flow is too large.

[0079] The first and second step sizes are set based on experience. When the error in predicting passenger flow is greater than or equal to the first error threshold, the discount factor is gradually reduced to make the DQN model pay more attention to current rewards to cope with inaccurate predictions. When the error in predicting passenger flow is less than the first error threshold, the discount factor is gradually increased to make the DQN model pay more attention to future rewards and make full use of accurate prediction information.

[0080] The first punctuality rate threshold is a preset threshold that can be set based on experience and is used to determine whether the punctuality rate of the public transport vehicle meets the requirements.

[0081] The third and fourth step sizes are set based on experience. When the on-time rate of public buses is greater than or equal to the first on-time rate threshold, increasing the penalty factor appropriately can further encourage the DQN model to select a better scheduling strategy to maintain a higher on-time rate. When the on-time rate of public buses is less than the first on-time rate threshold, reducing the penalty factor can make the DQN model more flexible in selecting scheduling strategies and try different strategies to improve the on-time rate.

[0082] It can be concluded from the above that this embodiment can improve the intelligence and adaptability of scheduling strategy determination, which not only effectively reduces passenger waiting time, vehicle empty driving rate and operating costs, but also further enhances the accuracy and efficiency of scheduling through error-sensitive discount factor adjustment and punctuality-oriented penalty factor setting.

[0083] Corresponding to the public transportation vehicle scheduling optimization method of the above embodiment, Figure 2 This is a structural block diagram of a public transportation vehicle scheduling optimization system provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 2 The public transportation vehicle dispatching optimization system 20 includes: a data prediction module 21, a dispatching strategy determination module 22 and a dispatching strategy execution module 23.

[0084] The data prediction module 21 is used to predict the second data of the target road section based on the first data of the target road section and the historical data of the target road section; wherein the first data is the traffic data of the target road section in the current preset time period, the historical data is the historical traffic data in the first time period, the first time period is the same time period as the current preset time period, and the second data is the predicted traffic data of the target road section; A scheduling strategy determination module 22, used to determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, where the target scheduling strategy is a scheduling strategy corresponding to the second data; The dispatching strategy execution module 23 is used to optimize the dispatching of public transportation vehicles based on the target dispatching strategy.

[0085] In one embodiment of the present disclosure, the traffic data includes passenger flow and traffic conditions; The data prediction module 21 is specifically used to input the passenger flow and the historical passenger flow into the target autoregressive moving average model for prediction to obtain the predicted passenger flow; The traffic conditions and historical traffic conditions are input into the target traffic flow model for prediction to obtain the predicted traffic conditions; The second data of the target road section is obtained based on the predicted passenger flow and the predicted traffic conditions.

[0086] In one embodiment of the present disclosure, the data prediction module 21 is further used to iteratively optimize the hyperparameters of the autoregressive moving average model to obtain target hyperparameters; In response to the iterative optimization satisfying the first condition or satisfying the second condition, determining a target autoregressive moving average model based on the target hyperparameters; The first condition is that within the first number of iterations, the difference between the fitness functions obtained in two consecutive iterations is less than the first fitness threshold; The second condition is that the number of iterations is equal to the second number of iterations, wherein the second number of iterations is greater than the first number of iterations.

[0087] In one embodiment of the present disclosure, the data prediction module 21 is further used to determine the fitness function of the particle swarm optimization algorithm based on the dimension of the particles in the particle swarm optimization algorithm; the dimension of the particles in the particle swarm optimization algorithm includes the autoregressive order, the differential order and the moving average order; Determine the learning factor of the particle swarm optimization algorithm based on the passenger flow variation characteristics of the bus stops within the target section; The hyperparameters of the autoregressive moving average model are iteratively optimized based on the fitness function and the learning factor.

[0088] In one embodiment of the present disclosure, the scheduling strategy determination module 22 is specifically configured to determine the state space characteristics of the predicted traffic data based on the first data and the second data; Determine the action space characteristics corresponding to each scheduling strategy; The state space features and action space features are input into the target deep Q network model to obtain the target scheduling strategy for public transportation vehicles; wherein the target deep Q network model is obtained by training the deep Q network model based on historical data and Q value function.

[0089] In one embodiment of the present disclosure, the public transportation vehicle scheduling optimization system 20 further includes: a Q-value function determination module for determining reference state space characteristics based on historical data; Determine a reference action space feature corresponding to each historical scheduling strategy based on each historical scheduling strategy; The Q-value function of the deep Q network model is determined by weighted calculation based on the reference state space characteristics, the reference action space characteristics, the reward function, the discount factor and the penalty factor.

[0090] In one embodiment of the present disclosure, the public transportation vehicle dispatch optimization system 20 further includes: a parameter adjustment module for determining a reward function by weighted calculation based on passenger waiting time, vehicle empty driving rate and operating cost; Adjust the discount factor based on the error in predicted passenger flow based on historical traffic data; In response to the error in the predicted passenger flow being greater than or equal to a first error threshold, reducing the discount factor by a first step; In response to the error in the predicted passenger flow being less than a first error threshold, increasing the discount factor by a second step size; The penalty factor is adjusted based on the on-time performance of public transportation vehicles based on historical traffic data; In response to the on-time rate of the public transportation vehicle being greater than or equal to the first on-time rate threshold, increasing the penalty factor by a third step length; In response to the on-time rate of the public transportation vehicle being less than the first on-time rate threshold, the penalty factor is reduced in a fourth step.

[0091] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned system embodiments, such as Figure 2 The functions of modules 21 to 23 are shown.

[0092] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0093] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0094] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0095] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the public transportation vehicle scheduling optimization method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0096] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0097] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0098] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0100] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0102] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0103] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for optimizing public transportation vehicle scheduling, characterized in that: include: Predicting second data of the target road section based on first data of the target road section and historical data of the target road section; wherein the first data is traffic data of the target road section within a current preset time period, the historical data is historical traffic data within a first time period, the first time period is a time period that is the same as the current preset time period, and the second data is predicted traffic data of the target road section; Determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, wherein the target scheduling strategy is a scheduling strategy corresponding to the second data; The public transportation vehicle is dispatched and optimized based on the target dispatch strategy.

2. The method for optimizing public transportation vehicle scheduling according to claim 1, characterized in that: Traffic data includes passenger flow and traffic conditions; The predicting second data of the target road segment based on the first data of the target road segment and the historical data of the target road segment includes: Inputting the passenger flow and historical passenger flow into a target autoregressive moving average model for prediction to obtain a predicted passenger flow; Inputting the traffic condition and historical traffic condition into a target traffic flow model for prediction to obtain a predicted traffic condition; The second data of the target road section is obtained based on the predicted passenger flow and the predicted traffic condition.

3. The method for optimizing public transportation vehicle scheduling according to claim 2, characterized in that: The training process of the target autoregressive moving average model includes: Iteratively optimizing the hyperparameters of the autoregressive moving average model to obtain target hyperparameters; In response to the iterative optimization satisfying the first condition or satisfying the second condition, determining a target autoregressive moving average model based on the target hyperparameters; The first condition is that within the first number of iterations, the difference between the fitness functions obtained in two adjacent iterations is less than the first fitness threshold; The second condition is that the number of iterations is equal to a second number of iterations, wherein the second number of iterations is greater than the first number of iterations.

4. The method for optimizing public transportation vehicle scheduling according to claim 3, characterized in that: The iterative optimization of the hyperparameters of the autoregressive moving average model includes: Determining a fitness function of the particle swarm optimization algorithm based on the dimensions of particles in the particle swarm optimization algorithm; the dimensions of particles in the particle swarm optimization algorithm include autoregressive order, differential order and moving average order; Determining a learning factor of the particle swarm optimization algorithm based on the passenger flow variation characteristics of the bus stops within the target road section; The hyperparameters of the autoregressive moving average model are iteratively optimized based on the fitness function and the learning factor.

5. The method for optimizing public transportation vehicle scheduling according to claim 1, characterized in that: The method of determining a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model includes: determining a state space characteristic of the predicted traffic data based on the second data; Determine the action space characteristics corresponding to each scheduling strategy; The state space features and the action space features are input into a target deep Q network model to obtain a target scheduling strategy for the public transportation vehicle; wherein the target deep Q network model is obtained by training a deep Q network model based on the historical data and the Q value function.

6. The method for optimizing public transportation vehicle scheduling according to claim 5, characterized in that: Also includes: determining a reference state space characteristic based on the historical data; Determine a reference action space feature corresponding to each historical scheduling strategy based on each historical scheduling strategy; A Q-value function of the deep Q network model is determined by performing weighted calculation based on the reference state space feature, the reference action space feature, the reward function, the discount factor and the penalty factor.

7. The method for optimizing public transportation vehicle scheduling according to claim 6, characterized in that: Also includes: Determine the reward function by weighted calculation based on passenger waiting time, vehicle idle rate and operating cost; adjusting the discount factor based on the error of the predicted passenger flow of the historical traffic data; In response to the error of the predicted passenger flow being greater than or equal to a first error threshold, reducing the discount factor by a first step; In response to the error of the predicted passenger flow being less than a first error threshold, increasing the discount factor by a second step size; Adjusting the penalty factor based on the punctuality rate of public transportation vehicles in the historical traffic data; In response to the punctuality rate of the public transportation vehicle being greater than or equal to a first punctuality rate threshold, increasing the penalty factor by a third step size; In response to the punctuality rate of the public transportation vehicle being less than a first punctuality rate threshold, the penalty factor is reduced in a fourth step.

8. A public transport vehicle dispatch optimization system, characterized in that: include: A data prediction module, configured to predict second data of the target road section based on first data of the target road section and historical data of the target road section; wherein the first data is traffic data of the target road section within a current preset time period, the historical data is historical traffic data within a first time period, the first time period is a time period having the same length as the current preset time period, and the second data is predicted traffic data of the target road section; A scheduling strategy determination module, used to determine a target scheduling strategy for public transportation vehicles based on multiple scheduling strategies and a target deep Q network model, wherein the target scheduling strategy is a scheduling strategy corresponding to the second data; A scheduling strategy execution module is used to optimize the scheduling of the public transportation vehicles based on the target scheduling strategy.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Electric bus dynamic scheduling system and method based on deep reinforcement learning

    CN116895144A

  • Bus scheduling method based on Q-learning

    CN117875674A

  • Urban rail transit train working diagram real-time adjustment method based on reinforcement learning

    CN118674235A

  • Public transport vehicle scheduling method and device, electronic equipment and storage medium

    CN118762517A

  • Intelligent decision analysis system and method based on multi-source data

    CN119090306A