An AI scheduling method and system for passenger flow-energy consumption combined optimization of an electric bus fleet

By combining station passenger flow prediction, passenger load curve coupled modeling with energy consumption/SOC and measured SOC residual correction, and adopting reinforcement learning and minimum modification projection repair strategies, the problem of coordinating passenger service and energy consumption optimization in electric bus fleet scheduling was solved, improving the feasibility and stability of scheduling schemes and reducing operating costs and battery degradation.

CN121809989BActive Publication Date: 2026-06-19HANGZHOU TAIYI DIGITAL TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU TAIYI DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-03-09
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies in the dispatching of electric bus fleets struggle to achieve coordinated optimization of energy consumption, electricity costs, and charging resources while ensuring passenger service levels. Furthermore, the feasibility and stability of dispatching schemes are insufficient in complex urban passenger flow environments. In particular, fluctuations in passenger flow and deviations in energy consumption prediction can easily lead to the accumulation of SOC deviations and the inability to execute charging plans.

Method used

By integrating station passenger flow prediction, passenger load curve and energy consumption/SOC coupled modeling, an online correction and write-back mechanism based on measured SOC residuals is introduced. Reinforcement learning is used to generate candidate decisions and a feasible solution with minimum modification projection repair and a frozen window rolling re-optimization strategy to collaboratively optimize passenger service and energy consumption costs, ensuring the feasibility and stability of the scheduling scheme under complex constraints.

Benefits of technology

It enables feasible and stable scheduling of electric bus fleets under dynamic disturbances, reduces passenger waiting time and the risk of overcrowding and refusal to carry passengers, optimizes electricity purchase and peak power costs, extends battery life, and improves the feasibility and robustness of scheduling schemes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809989B_ABST
    Figure CN121809989B_ABST
Patent Text Reader

Abstract

This invention discloses an AI scheduling method and system for joint optimization of passenger flow and energy consumption for electric bus fleets. The method integrates multi-source data, including route topology, station passenger flow, vehicle positioning and arrival / departure data, State of Charge (SOC), available and occupied charging pile sections, depot power limits, and time-of-use pricing, to predict station-time slice passenger flow and generate vehicle segment passenger load curves. Using these passenger load curves as explicit input, an energy consumption-SOC evolution model is established. Residual compensation is constructed based on measured SOC from recent cycles, forcibly writing back to the initial SOC value and predicted trajectory for the next rolling cycle, simultaneously resetting the SOC safety corridor boundary and available charging energy budget. Upon deviation triggering, a closed-loop re-optimization is performed within a frozen window. This solution can improve punctuality and service stability, and reduce passenger rejection, energy consumption, and peak costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and in particular to an AI scheduling method and system for joint optimization of passenger flow and energy consumption for electric bus fleets. Background Technology

[0002] Electric buses have advantages over traditional fuel-powered buses in terms of energy consumption costs and emission control. However, their operation and scheduling decisions are constrained by multiple factors, including battery state of charge (SOC), the concurrent capacity of charging infrastructure, the maximum power limit of the total incoming line at depots, time-of-use electricity pricing, and vehicle turnaround and turnaround times. Meanwhile, urban public transport passenger flow exhibits significant temporal and spatial imbalances. Peak hours, unforeseen events, and weather changes can cause rapid fluctuations in passenger demand and vehicle arrival / departure times, leading to problems such as increased passenger waiting times, overcrowding and passenger refusal, vehicles returning to depots due to low power, charging queues, and increased electricity costs due to excessively high peak power at depots. Against this backdrop, how to achieve synergistic optimization of energy consumption, electricity costs, and charging resources while ensuring passenger service levels (waiting time, crowding, passenger refusal rate, etc.) has become an important research and engineering application direction in the field of intelligent dispatching of electric bus fleets.

[0003] In existing technologies, one type of solution uses "demand response / passenger flow demand" as the core input. It constructs a collaborative optimization model of operation and charging plans to output the electric bus's route, timetable, and charging strategy. For example, patent CN115100896B discloses an electric demand response bus scheduling method that considers opportunistic charging strategies: before operation, it collects passenger travel demand information and vehicle initial location information, constructs a collaborative optimization model of operation and charging plans, and combines this with the setting of fast charging stations to provide charging during departure intervals, ultimately outputting scheduling results such as routes and timetables. This type of method can achieve "operation-charging" linkage to a certain extent and emphasizes obtaining better solutions through algorithmic search.

[0004] However, the above solutions are usually more inclined to collaborative optimization at the "pre-operation" or "planning level": First, the characterization of passenger flow often stops at the level of passenger demand allocation, route combination and timetable generation, and it is difficult to refine the impact of passenger flow fluctuations at the station-time slice scale on vehicle passenger load curves and the probability of overcrowding / refusal of passengers in the vehicle; Second, the characterization of energy consumption is mostly based on rules or experience constraints, and lacks the coupling mechanism of "passenger flow → passenger load → energy consumption / SOC evolution" as a computable input to the scheduling solution; Third, in actual operation, SOC and energy consumption prediction are significantly affected by changes in temperature, road conditions, air conditioning load and passenger volume. If there is a lack of online residual correction and rolling back mechanism based on measured SOC, SOC deviation is likely to accumulate, leading to a decrease in the feasibility of the plan, temporary insertion of charging or return to the depot, thereby affecting the stability of the timetable and the quality of passenger service.

[0005] Another approach focuses on modeling charging resource constraints (such as queuing, concurrency, charging duration, and cost), optimizing charging plans, and integrating them with the operation map. For example, patent CN116485157A discloses an electric bus charging plan optimization method that considers vehicle queuing at charging stations: the charging station is divided into queuing area, charging area, and waiting area; the vehicle queuing charging process is modeled; and an orderly charging optimization model is established to decide whether to charge, the start time of charging, and the charging duration, so as to reduce charging costs and queuing costs. The optimal queuing and charging information is integrated into the electric bus operation map, and the trends of SOC changes and charging pile load changes are output.

[0006] While these technologies can significantly improve the rationality and fairness of charging plans, their typical limitations are as follows: First, the optimization objectives focus more on charging costs and queuing costs, and rarely model passenger-side service indicators (waiting, congestion, refusal to carry passengers) and operational decision variables such as departure intervals in a unified manner; Second, the integration of charging plans and operation maps is mostly based on the premise of "given operation map / timetable", making it difficult to form an online closed-loop re-optimization mechanism that takes into account "departure - scheduling - charging power / time window" when passenger flow fluctuates or vehicle delays occur; Third, grid-side constraints such as the upper limit of total power of the station and demand electricity cost / peak power penalty are often key bottlenecks in engineering. If the charging time and sequence are optimized only at the level of a single pile, it may lead to uncontrollable peak power of the station and insufficient feasibility of the charging plan.

[0007] Another approach starts with vehicle scheduling and battery capacity prediction, combining charging pile attributes to establish a charging model, and generating scheduling and charging arrangements using heuristic or combinatorial optimization methods. For example, patent CN111325483A proposes a scheduling method for electric buses based on battery capacity prediction: constructing SOC prediction and energy consumption prediction under multiple factors, establishing a power consumption model by combining operating mileage and expected turnaround time, and establishing a charging model based on charging pile attributes to calculate charging time, thereby achieving vehicle scheduling that links charging and operation. This approach also emphasizes automatic prediction of scheduling elements such as "recharging per minute" and "when to recharge," and uses heuristic algorithms to improve scheduling efficiency.

[0008] While such solutions can improve the automation of scheduling, they still have shortcomings in complex urban passenger flow environments: First, passenger flow is usually not included as a strong constraint or key objective in the solution, making it difficult to handle the reverse constraints of peak congestion and passenger refusal on departure intervals and vehicle configuration; Second, although SOC prediction and energy consumption prediction are introduced, without the closed-loop correction and constraint linkage update of "measured SOC residual → compensation term → write back to the initial SOC value / trajectory of the next rolling cycle", the scheduling scheme may still be frequently broken during execution due to prediction deviations; Third, in the environment of a depot with multiple charging piles and multiple vehicles charging concurrently, calculating charging time based solely on the attributes of a single vehicle or a single pile is often insufficient to achieve stable and executable charging scheduling under the constraint of "total power limit of the depot + allocated charging pile occupancy range", especially when electricity price peaks or demand response events are triggered, it is even more necessary to coordinate the charging power setting, charging time window and departure plan together.

[0009] In addition, there are many publicly available methods for bus departure scheduling driven by passenger flow prediction. For example, patent CN107248280B provides a bus departure scheduling method based on real-time passenger flow prediction. By collecting the number of passengers getting on and off at stations and establishing a real-time passenger flow prediction model, a mathematical model of real-time passenger flow and departure scheduling is further established to guide departure scheduling. However, such technologies are mostly aimed at the organization of traditional bus departures and do not fully consider the electrification constraints unique to electric buses, such as SOC safety constraints, concurrent charging piles, and station power limits. It is even more difficult to maintain the feasibility and stability of the scheduling scheme under the strong coupling of "passenger flow fluctuations - energy consumption / SOC evolution - charging resources".

[0010] In summary, while existing technologies offer beneficial solutions for demand response operation-charging collaborative optimization, queuing-considered charging plan optimization, vehicle scheduling based on SOC / energy consumption prediction, and departure dispatching based on real-time passenger flow prediction, they generally suffer from the following shortcomings: a lack of a unified mechanism to transform station-level passenger flow fluctuations into vehicle passenger load curves and explicitly couple them to the energy consumption / SOC evolution model; a lack of a closed-loop strategy for online correction based on measured SOC residuals and writing the compensation results back to the next rolling cycle, synchronously updating SOC safety constraints and charging energy budgets; and a lack of a systematic method to generate executable solutions under constraints including departure commitment freezing and charging pile occupancy freezing through "minimum modification projection repair" after generating candidate scheduling actions using reinforcement learning and other intelligent solutions, thereby reducing online re-optimization jitter and improving engineering feasibility. Therefore, it is necessary to propose an AI scheduling method and system for joint optimization of passenger flow and energy consumption for electric bus fleets to achieve collaborative optimization of passenger service and energy costs, and to ensure the executability and stability of the scheduling scheme under complex constraints and dynamic disturbances. Summary of the Invention

[0011] This invention aims to provide an AI scheduling method and system for joint optimization of passenger flow and energy consumption for electric bus fleets. By integrating station passenger flow prediction, passenger load curve and energy consumption / SOC coupled modeling, and introducing an online correction and write-back mechanism based on measured SOC residuals, as well as a feasible solution and frozen window rolling re-optimization strategy of "reinforcement learning candidate decision + minimum modification projection repair", under the premise of meeting constraints such as departure interval, passenger capacity, charging pile concurrency, station power limit and SOC safety corridor, it collaboratively reduces passenger waiting and congestion / refusal risks, as well as electricity purchase and peak power costs, and extends battery life, thereby achieving executable and stable integrated optimization of electric bus scheduling and charging under dynamic disturbances.

[0012] To achieve the objectives of this invention, the following technical solution is adopted:

[0013] A joint optimization AI scheduling method for passenger flow and energy consumption of electric bus fleets, comprising:

[0014] S1: Collects data on line topology, station passenger flow, vehicle arrival / departure / location, SOC / temperature, available and occupied charging pile areas, total power limit of the station, and time-of-use electricity price;

[0015] S2: Predict station-time slice passenger flow and generate segment passenger load curve; establish energy consumption-SOC evolution model with passenger load curve as explicit input, and construct prediction residuals based on measured SOC of nearly (m) cycles and update residual compensation terms online. The residual compensation terms must be written back to the initial value of SOC and prediction trajectory of the next rolling cycle, and the SOC safety corridor boundary and available charging energy budget are reset accordingly.

[0016] S3: Generate candidate scheduling actions within the rolling time domain, targeting waiting / congestion / rejection and power purchase / peak power / attenuation.

[0017] S4: Solve the projection repair feasibility subproblem with the objective of "minimizing the change in candidate actions". The constraint set of the feasibility subproblem includes at least the following: minimum / maximum departure interval, vehicle availability and turnaround time, vehicle capacity, frozen committed departure times, frozen allocated charging pile occupancy intervals, charging pile concurrency and single-pile power limit, total power limit of the station, and SOC safety corridor.

[0018] S5: Output the feasible solution of vehicle-shift-departure-pile allocation-charging power / time window and issue it for execution. When a deviation is triggered, only the variables outside the window are re-optimized under the freeze window rule.

[0019] As a further improvement, the passenger load curve of the section is obtained by combining the station boarding demand with the historical or real-time boarding and alighting distribution to form a passenger load sequence of vehicles in adjacent station sections, and a consistency check is performed with the vehicle capacity limit.

[0020] As a further improvement, the energy consumption-SOC evolution model includes traction energy consumption items and auxiliary load energy consumption items, and the auxiliary load energy consumption items are at least related to ambient temperature and air conditioning operating status.

[0021] As a further improvement, the online update includes at least one of the following: updating the parameters of the energy consumption-SOC evolution model online based on recursive least squares or Kalman filtering, or outputting the SOC residual compensation amount through a residual learning model; the SOC safety corridor is an opportunity constraint or a risk constraint, ensuring that the SOC is not lower than the safety lower limit under a preset confidence level, and adopting sampling approximation or deterministic equivalent transformation when solving.

[0022] As a further improvement, the triggering deviation includes at least passenger flow prediction error, vehicle delay, charging pile failure, or SOC deviation reaching a threshold; the freezing window freezes at least the departure time and the occupied area of ​​the allocated charging pile within a future preset freezing period, and only allows adjustment of charging power and charging time window outside the freezing window to match subsequent trips.

[0023] As a further improvement, the available charging energy budget is defined as: within a future rolling window, under the premise of satisfying the upper limit of the total power of the station, the upper limit of the power of a single charging pile, and the freezing constraint of the occupied area of ​​the allocated charging piles, the upper limit of the charging energy available for each vehicle; and after the residual compensation term is written back to the initial value and predicted trajectory of SOC in the next rolling cycle, the gap energy is recalculated based on the corrected predicted trajectory of SOC and the target SOC demand, and the available charging energy budget is updated so that the updated budget is not less than the minimum supplementary energy required to maintain the SOC safety corridor and does not exceed the upper limit of the available energy under the constraints of the station and charging piles.

[0024] As a further improvement, the "minimum change of candidate action" in the projection repair feasibility subproblem is achieved through a weighted distance metric: the objective function is the weighted sum of the departure time offset, charging start time offset, charging end time offset, and charging power setting offset corresponding to the candidate action, where each offset represents the change of the repaired action relative to the candidate action, and the weight is used to characterize the relative importance of passenger service stability and charging execution stability.

[0025] Another aspect of this invention provides an AI scheduling system for joint optimization of passenger flow and energy consumption for electric bus fleets, comprising: a data fusion module for collecting route topology, station passenger flow, vehicle arrival / departure / location, SOC / temperature, available and occupied charging piles, total power limit of depots, and time-of-use electricity prices to form a multi-source dataset; a passenger flow prediction and passenger load curve generation module for predicting station-time slice passenger flow and generating segment passenger load curves; and an energy consumption-SOC coupling modeling and residual correction module for establishing an energy consumption-SOC evolution model with the passenger load curve as explicit input, constructing a prediction residual based on the measured SOC of nearly (m) cycles, updating the residual compensation term online, and writing the residual compensation term back to the initial SOC value and prediction trajectory of the next rolling cycle, and according to... This synchronously resets the SOC safety corridor boundary and available charging energy budget; the rolling joint optimization and two-layer solution module is used to generate candidate scheduling actions in the rolling time domain, and solve the projection repair feasibility subproblem with the objective of "minimizing the change of candidate actions". The constraint set of the feasibility subproblem includes at least the minimum / maximum departure interval, vehicle availability and turnaround time, vehicle capacity, frozen committed departure time, frozen allocated pile occupancy interval, charging pile concurrency and single pile power limit, station total power limit, and SOC safety corridor, thereby outputting a feasible solution for vehicle-shift-departure-pile allocation-charging power / time window; the closed-loop distribution module is used to distribute the feasible solution and, when a deviation is triggered, only re-optimize the out-of-window variables according to the frozen window rule.

[0026] A third aspect of the present invention provides a computer device, the computer device including a processor, a graphics processing unit (GPU) and a memory, the memory storing a computer program, which, when executed by the processor and the GPU, causes the computer device to perform the method described thereon.

[0027] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program causing the computer device to perform the method when executed by a computer device.

[0028] This invention employs a chain-like modeling approach—"passenger flow prediction → segment passenger load curve → energy consumption / SOC coupled evolution"—to enable scheduling decisions to reflect the impact of vehicle load changes on energy consumption and SOC in real time as passenger flow fluctuates. This avoids the accumulation of SOC deviations caused by traditional estimations based solely on experience or static mileage. Furthermore, it constructs predictive residuals based on measured SOC over several recent cycles and updates compensation terms online, forcibly writing back the initial SOC value and predicted trajectory to the next rolling cycle. Simultaneously, it resets the SOC safety corridor boundary and available charging energy budget, thereby significantly reducing uncontrollable events such as SOC overruns, temporary return trips, and plug-in charging, and improving the executability and robustness of the operation plan and charging schedule. At the solution level, this invention adopts a two-layer decision structure of "reinforcement learning to generate candidate scheduling actions + minimum modification projection repair". It performs feasibility repair on candidate solutions under a set of constraints including departure interval, vehicle turnaround, capacity, charging pile concurrency, single pile power limit, total station power limit, SOC corridor, and frozen committed departure time and allocated pile occupancy interval. By minimizing the weighted average of departure time, charging start / end time and power setting offset, it prioritizes maintaining the established service commitment and execution stability, significantly reducing the frequent map changes and scheduling jitter caused by online re-optimization. In terms of operational effectiveness, this invention can shorten passenger waiting time, reduce peak congestion and the probability of refusing passengers, and improve punctuality and service consistency under the same vehicle resource conditions. In terms of energy consumption and grid-side effects, by incorporating electricity purchase costs, peak power penalties and battery degradation costs and being constrained by the power limit of the depot, it coordinates charging time windows and power settings to achieve peak shaving and valley filling, reduce demand / peak electricity price costs and slow down battery degradation. Overall, it achieves a comprehensive technical effect of "improved passenger service quality + reduced energy consumption / electricity costs + improved battery life and scheduling feasibility". Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall structure of the "AI Dispatch System for Joint Optimization of Passenger Flow and Energy Consumption for Electric Bus Fleets" of the present invention;

[0030] Figure 2 This is a flowchart illustrating the overall technical route of the method of the present invention;

[0031] Figure 3 The flowchart shows the two-layer AI solution and the closed-loop control of the frozen window. Detailed Implementation

[0032] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0033] I. Terminology and Symbol Conventions

[0034] 1. Electric bus fleet: refers to a collection of pure electric buses under the unified dispatch and management of the same operating entity (such as a bus company), including vehicles of different models, battery capacities, and charging power limits.

[0035] 2. Station-Time Slice Passenger Flow: Refers to the boarding demand, alighting demand, or cumulative waiting volume at the platform, statistically analyzed / predicted by station and discrete time slices. The time slice length can be set to... .

[0036] 3. Segment passenger load curve: refers to the passenger load curve of a vehicle in a segment between adjacent stations (stations). To the station The sequence of passenger numbers within a given time / segment is used to characterize the impact of changes in in-vehicle load on energy consumption and state of charge (SOC).

[0037] 4. SOC (State of Charge): The state of charge of a battery, representing the proportion of usable electricity to its rated capacity. It is typically taken as... or .

[0038] 5. Energy Consumption-SOC Evolution Model: Used to predict energy consumption per unit section based on vehicle operating conditions (road conditions, gradient, speed, temperature, air conditioning status, passenger capacity, etc.) and to calculate the change of SOC over time / mileage.

[0039] 6. Predicted Residuals and Residual Compensation Term: The residual is the sequence of differences between the predicted SOC and the measured SOC; the residual compensation term is a correction amount output by an online update mechanism (such as recursive least squares, Kalman filtering, residual learning model), used to correct the initial value of SOC and the predicted trajectory in the next rolling cycle.

[0040] 7. Rolling time domain (rolling window): refers to scheduling optimization within a time domain of a specified length. Solve within a time window, and with a step size (such as each) It scrolls forward and updates (or every few minutes).

[0041] 8. SOC Safety Corridor: The safety upper and lower limits of SOC form a constraint zone that changes over time / task, ensuring that the vehicle's SOC does not fall below the safety lower limit and meets lifespan / power requirements when performing shifts and charging plans.

[0042] 9. Available charging energy budget: The upper limit of the charging energy that can be allocated to each vehicle within a rolling window, under constraints such as the total power limit of the station and the freezing / concurrency of charging pile resources.

[0043] 10. Candidate scheduling actions: Preliminary decisions (vehicle-shift matching, departure time / interval, charging start / end time, charging pile allocation, power setting, etc.) output by the reinforcement learning policy network, which do not guarantee that all constraints will be met.

[0044] 11. Projection Repair Feasibility Subproblem: With the objective of "minimizing the change in candidate actions", solve the problem under a set of constraints including double freezing, and repair the candidate actions into executable and feasible solutions.

[0045] 12. Freeze Window: To ensure execution stability, when a deviation is triggered, the promised departure times and the occupied intervals of the allocated piles within a certain period of the future are frozen. Only variables outside the frozen window are re-optimized, thereby reducing scheduling jitter.

[0046] II. System Structure

[0047] like Figure 1 As shown, the "AI-based dispatching system for joint optimization of passenger flow and energy consumption for electric bus fleets" provided by this invention can be deployed on a local server, private cloud, or edge-cloud collaborative platform in the dispatch center of a bus company. The system includes at least the following modules:

[0048] 1. Data Fusion Module: Used to collect and fuse multi-source data, including: route and station topology data (route station sequence, distance between stations, estimated travel time, turnaround points, etc.); station passenger flow data (card swipe / QR code scan, video passenger flow count, platform turnstiles, historical OD statistics, etc.); vehicle operation data (GPS / BeiDou positioning, arrival and departure events, vehicle speed and mileage, driver condition, air conditioning on / off status); battery and charging data (SOC, temperature, charging power curve, single-pile power limit, charging pile availability status, pile occupancy range, queuing information); station grid-side data (station total power limit, time-of-use pricing, demand response event flags, demand billing parameters, etc.); road condition and environmental data (congestion index, weather temperature, slope / road grade, etc.). The data fusion module can adopt a message queue + time-series database architecture to perform time alignment and missing data completion for asynchronously sampled data.

[0049] 2. Passenger Flow Forecasting and Passenger Load Curve Generation Module:

[0050] Used to output station-time slice passenger flow forecasts and uncertainty intervals, and to map passenger flow to vehicle segment passenger load curves (see S2 for details).

[0051] 3. Energy consumption-SOC coupled modeling and residual correction module:

[0052] Used to establish an energy consumption-SOC evolution model and update residual compensation terms online based on measured SOC, performing "must write back + corridor and energy budget reset" (see S3 and S4 for details).

[0053] 4. Rolling Joint Optimization and Reinforcement Learning Strategy Module:

[0054] Used to construct joint optimization objectives and constraints within a rolling window, and to call the reinforcement learning policy network to generate candidate scheduling actions (see S5 for details).

[0055] 5. Projection Repair Feasibility Module:

[0056] Used to solve the projection repair subproblem, candidate actions are repaired into executable solutions under a set of constraints such as double freeze, power limit, and SOC corridor, and a weighted distance metric "minimum change" is used (see S5 for details).

[0057] 6. Closed-loop distribution and window freeze control module:

[0058] Used to distribute scheduling plans to vehicle and depot execution terminals, monitor deviation triggering conditions, and perform frozen window rolling re-optimization (see S6 for details).

[0059] The system's external interfaces include: vehicle terminal interface (receiving departure / return / charging commands), station charging management system interface (pile allocation, power setting, occupancy zone locking), passenger flow collection system interface, and enterprise production scheduling system interface, etc.

[0060] III. Overall Technical Route for Implementing the Method of the Invention

[0061] like Figure 2 As shown, the method of the present invention includes steps S1 to S6, forming a closed-loop link of "data - prediction - coupled modeling - residual write-back - two-layer solution - closed-loop execution". Each step can run at a fixed cycle (e.g., once every 5 minutes) or run encrypted according to event triggers (e.g., sudden large passenger flow or charging pile failure).

[0062] The specific implementation method of each step is explained in detail below.

[0063] S1: Multi-source data acquisition, cleaning, and fusion

[0064] The goal of S1 is to create a unified dataset that can be used for prediction, modeling, and optimization, and to provide traceable timestamp consistency. In its implementation, the system executes the following sub-steps:

[0065] S1.1 Data Acquisition and Time Alignment

[0066] (1) Basic data on route topology and timetable: Imported from the operations planning department or route database, including station sequence Distance between stations Standard running time Turnaround points, vehicle return routes, etc.

[0067] (2) Station passenger flow data: Collect card / QR code boarding records (including station ID and timestamp), video / gate counts, and historical OD matrix. To improve real-time performance, streaming computing can be used. Aggregate the demand for boarding at one site.

[0068] (3) Vehicle operation data: The vehicle terminal reports location (latitude and longitude, speed, heading), arrival and departure events (arrival / departure timestamps), and odometer data. Arrival and departure events can be generated through geofencing or station parking recognition algorithms.

[0069] (4) Battery and charging data: The battery management system (BMS) provides SOC, temperature, current and voltage, etc.; the charging management system (CMS) provides charging pile status, single charging pile power limit, charging session records, queuing information, locked and occupied areas, etc.

[0070] (5) Power grid and electricity price data of the power station: collect the upper limit of the total incoming power of the power station. Time-of-use electricity pricing Demand response event flags wait.

[0071] (6) Traffic and weather data: Congestion coefficients can be provided by third-party traffic interfaces or historical congestion models. Temperature is provided by the weather interface. wait.

[0072] Different data sources have different sampling frequencies, so the system uses a uniform time granularity. Building a time grid All data is aligned. The alignment method can be "nearest neighbor alignment + linear interpolation" or "event-based segmented preservation (zero-orderhold)", and the alignment error is recorded for subsequent quality assessment.

[0073] S1.2 Data Cleaning and Anomaly Handling

[0074] (1) Eliminate or correct obvious outliers, such as sudden jumps in SOC (exceeding the physical possible rate of change), location drift (abnormally large speed), negative passenger flow count, etc.

[0075] (2) To fill in the missing segments, you can use the mean of the same week / weather in history, imputation based on the correlation of adjacent stations, or use a lightweight model to predict and fill in the missing segments.

[0076] (3) Merge conflicting events, such as repeated arrival events and repeated entry and exit from the fence in a short period of time. Sort by timestamp and combine with speed threshold to determine valid events.

[0077] (4) Generate data quality tags This is used to select whether to degrade the operation in S2–S5 (e.g., the passenger flow prediction model degrades to the historical average, the energy consumption model adopts a conservative upper bound, etc.).

[0078] S1.3 Unified Dataset Output

[0079] The system outputs a unified data structure for subsequent modules, such as a station passenger flow tensor. Vehicle status (Including SOC, temperature, location, and whether it is at a charging station); Charging resource status (pile Available, occupied range, power limit); site constraints. With electricity price Road conditions and environment .

[0080] S2: Station-Time Slice Passenger Flow Forecasting and Segment Passenger Load Curve Generation

[0081] S2.1 Passenger Flow Forecasting Model Construction and Output

[0082] Passenger flow forecasting can employ spatiotemporal prediction models (such as spatiotemporal graph convolution + sequence models, Transformer-like models, or statistical regression models). System inputs include: historical passenger flow sequences, holiday / weather / event characteristics, station topological adjacency relationships, and current passenger flow observations. Outputs include: station data. In time slice Forecast of boarding demand Uncertainty range or variance Optional output: Cumulative waiting time at the platform Probability of being refused service when fully loaded Crowding index wait.

[0083] To facilitate subsequent decision-making, the system performs consistency processing on the prediction results:

[0084] (1) For nonnegativity constraints: ;

[0085] (2) Cut off or smooth extreme peaks to prevent short-term noise from causing unstable scheduling;

[0086] (3) Constraining the correlation between stations (e.g., the peak values ​​of adjacent stations on the same line cannot be infinitely amplified at the same time) can be achieved through regularization terms or post-processing.

[0087] S2.2 Generates vehicle segment passenger load curves from passenger flow forecasts.

[0088] (1) Define the vehicle On the site The arrival time is The demand for boarding during this time slot is .

[0089] (2) Define the site The disembarkation rate (or OD transfer probability) is , indicating in Passengers boarding the bus The probability of getting off the bus can be estimated from historical card swipe OD (Original Discharge) data and corrected online.

[0090] (3) The vehicle is at the station The number of passengers boarding can be allocated according to "demand-supply": if the waiting capacity at this station is [missing information], then [missing information]. The remaining capacity of the vehicle is ( If the number of passengers is inside the train before arrival at the station, then the number of passengers boarding is...

[0091] ;

[0092] Parameter definition: For vehicles On the site Number of passengers boarding; This represents the number of people waiting on the platform at that moment. For vehicle capacity; This refers to the number of passengers on the train before arrival at the station.

[0093] (4) Number of people getting off the bus It can be estimated based on OD distribution or drop-off ratio:

[0094] ;

[0095] Parameter definition: For vehicles On the site Number of people getting off the bus; To from the site Get on the bus and The probability of getting off the bus.

[0096] (5) Then the vehicle is at the station The number of passengers after leaving the station is

[0097] ;

[0098] Parameter definition: For vehicles Leave the station The number of people in the car after that.

[0099] (6) Vehicles in the section The passenger load curve within can be defined as (Approximately constant within the segment), or expanded into a piecewise function by incorporating passenger pick-up and drop-off points along the route (such as branch lines / shuttle buses). The system ultimately generates a set of segment passenger load curves for vehicles within a scrolling window. And perform consistency checks on capacity constraints: .

[0100] S2.3 Quantification of Risks of Refusal to Carry and Congestion

[0101] when At that time, the number of passengers refused service was... Based on this, a rejection rate or rejection probability can be defined, and it can be used as a penalty term in the joint optimization objective; congestion can be expressed as passenger load factor. Alternatively, a segmented penalty function can be entered into the objective function, thereby suppressing overcrowding in scheduling.

[0102] S3: Energy Consumption-SOC Coupling Modeling and Prediction

[0103] The goal of S3 is to predict the segmental energy consumption and SOC trajectory of each vehicle within a rolling window, given a passenger load curve and operating conditions, so as to provide a basis for subsequent residual correction, SOC corridor constraints and energy budget.

[0104] S3.1 Energy Consumption Model Structure

[0105] This embodiment uses an interpretable component model: the section energy consumption consists of traction energy consumption and auxiliary load energy consumption.

[0106] ;

[0107] Parameter definition: For vehicles In the section Energy consumption (kWh); For traction energy consumption; Energy consumption for auxiliary loads (such as air conditioning, vehicle systems, etc.).

[0108] Traction energy consumption can be related to vehicle mass (including passenger load), road conditions / gradient, and speed curve; in engineering, empirical regression or physical approximation can be used. An example expression is:

[0109] ;

[0110] Parameter definition: For segment distance; This refers to the congestion / operating condition coefficient for the section. This refers to the slope or equivalent slope index. Passenger capacity of the section; These are parameters calibrated using historical data.

[0111] The energy consumption of auxiliary loads can be modeled according to air conditioning and ambient temperature:

[0112] ;

[0113] Parameter definition: For auxiliary load power, it varies with ambient temperature. With air conditioning status change; This refers to the segment's operating time.

[0114] S3.2SOC trajectory prediction

[0115] Set up vehicles The rated usable capacity of the battery is (kWh), then without considering charging, the SOC update can be written as:

[0116] ;

[0117] Parameter definition: For a moment SOC; This represents the energy consumption for that time slice.

[0118] If the vehicle is charging during a certain time period, the charging power is set to [value]. Charging efficiency is Then the SOC is updated to:

[0119] ;

[0120] Parameter definition: This refers to the charging power. For charging efficiency.

[0121] By recursively applying the results to all segments and time slices within the rolling window, the predicted SOC trajectory under the candidate scheduling can be obtained. .

[0122] S3.3 Initialization and Calibration of Model Parameters

[0123] In implementation, Parameters can be calibrated using least squares or piecewise regression based on historical operating data (mileage, gradient, passenger load, temperature, energy consumption); different vehicle models can be calibrated separately. If data is insufficient, the energy consumption baseline model provided by the vehicle manufacturer can be used first, and then converged gradually in S4 through residual correction.

[0124] S4: Online correction, forced write-back, and corridor / energy budget reset based on measured SOC residuals.

[0125] S4.1 Residual Construction and Online Update

[0126] During each rolling update, the system obtains the measured SOC sequence from the BMS. Compared with the previous cycle forecast value The residuals are obtained by comparison:

[0127] ;

[0128] Parameter definition: This represents the SOC residual.

[0129] System proximity Residual sequence of periods The compensation item is output using an online update mechanism. The compensation term can be obtained in any of the following ways: recursive least squares (RLS) updates the model parameters and then re-predicts the SOC; Kalman filtering treats the SOC as a state for online estimation; or residual learning models (such as small regression networks) output residual compensation.

[0130] The formal expression of "direct write-back of compensation items" in this embodiment:

[0131] ;

[0132] Parameter definition: For online operator updates; This is the residual compensation item.

[0133] S4.2 Forced Write-back Rules

[0134] The compensation term is not only used for the current error interpretation, but must also be written back to the initial SOC value and predicted trajectory for the next rolling cycle. Specifically:

[0135] ;

[0136] Parameter definition: This serves as the initial value for the SOC in the next rolling cycle. This is the starting time of the scrolling window.

[0137] And perform a consistent write-back (e.g., additive write-back or time-decay write-back) on the entire predicted trajectory:

[0138] ;

[0139] Parameter definition: Predict the trajectory for the SOC after write-back; For write-back weights, a constant of 1 or a weight that decays over time can be used to avoid over-correction in the long term.

[0140] S4.3SOC Security Corridor Boundary Reset

[0141] Based on the rewritten SOC trajectory, the system synchronously resets the SOC corridor boundaries. The basic safety lower limit is set as follows: The safety limit is The corridor can then be dynamically adjusted based on "predictive uncertainty" and "task risk," for example:

[0142] ;

[0143] Parameter definition: This is the reset dynamic lower limit; The uncertainty in SOC prediction (which can be obtained from residual variance or sampling); This is a conservative coefficient.

[0144] This reset enables the system to automatically increase safety redundancy and reduce the risk of SOC exceeding limits when residual fluctuations increase.

[0145] Definition and Update of Available Charging Energy Budget in S4.4

[0146] The "energy budget" is defined as the upper bound of the charging energy that can be allocated to each vehicle within a rolling window, under the constraints of the station's total power limit, single-pile power limit, frozen pile occupancy interval, and concurrency constraints. In practice, it can be calculated using the following approach:

[0147] (1) Calculate the upper limit of the supplyable energy within the rolling window:

[0148] ;

[0149] Parameter definition: The maximum charging energy that the station can supply within the rolling window; A collection of charging stations; For piles Power limit; Indicator Stake At any moment Is it available (including the impact of frozen occupied range)?

[0150] (2) For each vehicle Based on the rewritten SOC trajectory and target SOC requirements (such as the SOC required to complete future shifts, return SOC targets, etc.), the energy gap is calculated:

[0151] ;

[0152] Parameter definition: For the target SOC; This refers to the available battery capacity.

[0153] (3) Update the available charging energy budget between meeting the "minimum replenishment energy" (maintaining the corridor from crossing the boundary) and the "upper limit of the station's available energy supply". :

[0154] ;

[0155] Parameter definition: The maximum chargeable energy of a single vehicle within the window is limited by the available time window and the maximum power limit of a single charging station.

[0156] This budget will be used as an upper resource constraint in the joint optimization of S5, thus forming a closed loop of "residual write-back → corridor / budget reset → optimization constraint update".

[0157] S5: Rolling Joint Optimization and "Two-Layer AI Solution" (e.g.) Figure 3 (As shown)

[0158] S5.1 Decision Variables and Objective Function

[0159] The decision variables within the scrolling window should include at least: vehicle-shift matching. (vehicle Whether to implement shift schedule Departure time Or departure interval Charging station allocation (vehicle At any moment Does it occupy a pile? ); Charging start / end time Charging power setting .

[0160] The objective function must include at least both passenger service costs and energy consumption costs. An example expression is:

[0161] ;

[0162] Parameter definition: For the cost of waiting time; Penalty for overcrowding; As a penalty for refusing to carry passengers; For electricity purchase costs; Peak power penalty; For battery degradation costs; For weights.

[0163] S5.2 Constraint Set

[0164] The constraints for joint optimization include at least the following:

[0165] 1) Minimum / maximum departure interval constraints;

[0166] 2) Vehicle availability and turnaround time constraints;

[0167] 3) Capacity constraints (guaranteed by the S2 passenger load curve or further constrained);

[0168] 4) Constraints on concurrent charging piles and maximum power per pile;

[0169] 5) Maximum power limit constraint for the power station: ;

[0170] 6) SOC safety corridor constraints: ;

[0171] 7) Frozen departure times already committed: For frozen collections Internal shifts, ;

[0172] 8) Freezing of the occupied area of ​​the allocated piles: For the frozen occupied area, Maintain the established locked state.

[0173] S5.3 First Layer: Reinforcement Learning Outputs Candidate Scheduling Actions

[0174] The reinforcement learning policy network takes the system state as input (passenger flow prediction, passenger load curve, SOC trajectory after write-back, available power of piles and stations, frozen information, electricity price, etc.) and outputs candidate actions. The state can be represented as The action is represented as The strategy is Training can be conducted using offline historical playback combined with online fine-tuning, with the reward function corresponding to the objective function. And add a feasibility penalty item.

[0175] S5.4 Second Layer: Projection Repair Feasibility Sub-problem

[0176] Since the RL output does not guarantee strict satisfaction of all engineering constraints, this invention constructs a projection repair subproblem, aiming to minimize the change in candidate actions, and solves it to obtain feasible solutions. .

[0177] (1) The minimum change metric is a weighted distance constructed from departure time offset, charging start / end time offset, and power setting offset:

[0178] ;

[0179] Parameter definition: To repair the offset vector of the departure time relative to the candidate time; , These are the offsets for the start and end times of charging, respectively. Set an offset for the charging power; The weight is used to reflect the strategy of "prioritizing service stability over charging fine-tuning".

[0180] (2) Projection Repair Subproblem Form

[0181] ;

[0182] Parameter definition: The feasible region of the above constraint set (including at least departure interval, availability, capacity, double freeze, pile concurrency / power, station power, SOC corridor, etc.).

[0183] In engineering implementation, this subproblem can be transformed into mixed integer programming, quadratic programming, or phased feasibility (first satisfying freezing and power, then repairing the SOC corridor), and heuristic projection (e.g., constraint-by-constraint repair + local search) can be used to ensure real-time performance when the solution time is limited.

[0184] (3) Output feasible solutions and feasibility proof information

[0185] The projection repair module outputs the final executable solution and records evidence that the constraints are met (such as the power curve of the station does not exceed the limit, the SOC trajectory does not cross the boundary, and the freeze constraint is met), which facilitates the audit and subsequent review by the dispatch center.

[0186] S6: Optimization of the closed-loop process for scheme issuance, execution, and freezing window.

[0187] S6 ensures that the algorithm output can be implemented and remain stable under disturbances. The system distributes feasible solutions from S5 to the vehicle and depot ends, and triggers a freeze window for re-optimization through deviation monitoring.

[0188] S6.1 Solution Issuance and Execution Closed Loop

[0189] (1) Send the following to the vehicle terminal: shift task, departure time / interval, turnaround instruction, return to the depot and charging instruction.

[0190] (2) Send the following to the charging management system of the station: pile allocation, charging start / end time, and charging power setting curve. And lock the corresponding occupied range to avoid resource conflicts.

[0191] (3) Execution end feedback: arrival and departure events, actual departure deviation, charging session status, real-time SOC, etc., forming a closed loop feedback to enter the next round S1–S5.

[0192] S6.2 Deviation Triggering Condition

[0193] Triggering deviations may include at least the following: passenger flow prediction error exceeding the threshold (e.g., a sudden increase in waiting time at the station); vehicle delay exceeding the threshold (congestion, accidents); charging pile malfunction or unavailability (pile offline, power derating); SOC deviation exceeding the threshold (large deviation between actual and predicted values, abnormal temperature leading to a decrease in available capacity); after triggering, the system enters a frozen window mode.

[0194] S6.3 Freeze Window Rules and Scrolling Re-optimization

[0195] (1) Determine the length of the freeze window With Frozen Object Collection: Frozen Future The committed departure time and the allocated pile occupancy range correspond to the "double freeze" clause in the right constraint set 1.

[0196] (2) Only re-optimize variables outside the frozen window: Allow adjustment of charging power, charging time window, subsequent shift matching and departure interval fine-tuning outside the frozen window.

[0197] (3) To reduce jitter, the system can add a "change penalty" or increase the objective function. Equal weighting ensures that repairs prioritize absorbing disturbances from the charging side rather than drastically altering delivery commitments.

[0198] (4) After re-optimization, the system is re-issued and executed to form a stable closed loop.

[0199] IV. Specific Application Examples: "Reduced Waiting Time / Refusal to Board + Fewer SOC Outbound Events" under Peak Passenger Flow Fluctuations

[0200] 1.1 Application Scenarios and Configuration

[0201] The city's main bus route L1 (28 stops in both directions, approximately 18.5km one way, including the charging station S at the turnaround point) is selected, and the fleet consists of 12 pure electric buses.

[0202] Model A: 8 vehicles, available battery capacity kWh, capacity Maximum charging power for a person or a single vehicle kW;

[0203] Model B: 4 vehicles kWh, people, kW.

[0204] Station S is equipped with 8 DC power piles, with a single pile power limit of 120 / 150kW respectively; the total power limit of the station is... kW (fixed). Scrolling window min, rolling step size min, time slice min; duration of the freeze window min; residual window (i.e., nearly 60 minutes).

[0205] 1.2 Key Points of Implementation of the Invention

[0206] S2: Station-Time Slice Passenger Flow Forecast Output and interval Generate passenger load curve for the section And calculate the risk of being refused boarding;

[0207] S4: Constructing residuals based on measured SOC Online updates of compensation items It also forces a writeback to the initial SOC value / trajectory for the next cycle, while resetting the SOC corridor and available charging energy budget. ;

[0208] S5: RL outputs candidate scheduling actions, and the projected repair subproblem generates a feasible solution with minimal changes under the constraint set such as "departure time freeze, pile occupancy freeze, station power limit, SOC corridor";

[0209] S6: When the peak passenger flow prediction error exceeds the threshold or the vehicle delay exceeds 3 minutes, a freeze window is triggered, and only the charging power / time window outside the freeze window is adjusted to match the subsequent trains.

[0210] 1.3 Scale Settings

[0211] Comparative Example 1 (Traditional Timetable + Experience-Based Charging): Vehicles return to the depot at fixed departure intervals (6 minutes during peak hours and 10 minutes during off-peak hours) and are charged in a queue according to the SOC threshold (e.g., SOC < 25%), with the charging power set to maximum by default; no residual write-back or freezing mechanism is implemented.

[0212] Comparative Example 2 (Joint optimization but without "residual write-back + budget reset" and "projection repair double freeze"): There are passenger flow prediction and joint optimization objectives, but SOC prediction is only an offline model and does not write back the residuals; candidate solutions are directly output by the optimizer (or directly output by RL) and a simple feasibility check is performed. Minimum modification projection repair is not used, and the departure and pile occupancy intervals are not frozen.

[0213] 1.4 Testing Process and Indicators

[0214] After operating for 5 consecutive working days (07:00–10:00 morning peak, including two sudden surges in passenger flow: large event closing time and rainy days), the following statistics were compiled: average waiting time. (min / person); Refusal rate (Number of passengers refused service / Number of passengers requiring service); Crowding level inside the vehicle (Mean and 95th percentile of passenger load factor); Number of SOC (Standardized Occupancy Rate) violations (SOC below the safety limit or temporary return to the field due to insufficient power); Number of scheduling jitters (Number of times the departure time of the same train has been changed).

[0215] 1.5 Results Data

[0216]

[0217] Results: Compared to Comparative Example 1, this invention reduces peak waiting time by approximately 32%, load rejection rate by approximately 63%, and SOC out-of-bounds events from 9 to 1. Compared to Comparative Example 2, this invention significantly suppresses SOC deviation accumulation through "residual write-back + corridor / budget reset" and reduces scheduling jitter from 21 to 6 through "double freeze + minimal modification projection repair," maintaining a stable and executable runtime.

[0218] The foregoing description of embodiments of the present invention, through which those skilled in the art are able to implement or use the present invention, will be readily apparent to those skilled in the art. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novelty disclosed herein.

Claims

1. A passenger-flow-energy-consumption joint optimization AI scheduling method for an electric bus fleet, characterized in that, include: S1: Collects line topology, station passenger flow, vehicle arrival and departure information and location information, vehicle battery state of charge (SOC) and temperature, charging pile availability and occupancy range, station total power limit and time-of-use electricity price. S2: Predict station-time slice passenger flow and generate segment passenger load curves; establish an energy consumption-SOC evolution model using the segment passenger load curves as explicit inputs to obtain the SOC prediction trajectory of each vehicle in the current rolling cycle; construct prediction residuals based on the measured SOC and corresponding SOC prediction values ​​of nearly m cycles, and obtain residual compensation terms through online updates; write the residual compensation terms back to the initial SOC value of the next rolling cycle, and correct the SOC prediction trajectory of the next rolling cycle according to the preset write-back weights; Based on the corrected SOC prediction trajectory, the SOC safety corridor boundary for the next rolling cycle is reset, and the available charging energy budget for each vehicle in the future rolling window is updated, provided that the total power limit of the station, the power limit of a single charging pile, and the freezing constraints of the occupied area of ​​the allocated charging pile are met. S3: In the rolling time domain, with the objective function being the minimum weighted sum of passenger waiting time cost, congestion penalty cost, refusal penalty cost, electricity purchase cost, peak power penalty cost, and battery degradation cost, the reinforcement learning policy network takes the system state as input and generates candidate scheduling actions. The candidate scheduling actions include at least vehicle-shift matching, departure time or departure interval, charging pile allocation, charging start time, charging end time, and charging power setting. S4: Using the candidate scheduling action as input, construct a projection repair feasibility subproblem, and solve it with the objective of minimizing the change of the repaired action relative to the candidate scheduling action to obtain a feasible solution. The constraint set of the projection repair feasibility subproblem includes at least the following constraints: minimum departure interval constraint, maximum departure interval constraint, vehicle availability constraint, vehicle turnaround time constraint, vehicle capacity constraint, committed departure time freeze constraint, allocated charging pile occupied area freeze constraint, charging pile concurrency constraint, single pile power upper limit constraint, total station power upper limit constraint, and SOC safety corridor constraint. S5: Output the feasible solutions for vehicle-shift-departure-charging pile allocation-charging power / time window and issue them for execution; when a deviation is triggered, only variables outside the window are re-optimized under the freeze window rule; the triggered deviation includes at least passenger flow prediction error, vehicle delay, charging pile failure or SOC deviation reaching a threshold; the freeze window freezes at least the departure time and the occupied interval of the allocated charging pile within the preset freeze period in the future, and only allows adjustment of the charging power and charging time window outside the freeze window to match with subsequent shifts.

2. The method according to claim 1, characterized in that, The passenger load curve of the section is obtained by combining the boarding demand at the station with the historical or real-time boarding and alighting distribution, forming a sequence of passenger numbers of vehicles in adjacent station sections, and is checked for consistency with the upper limit of vehicle capacity.

3. The method according to claim 1, characterized in that, The energy consumption-SOC evolution model includes traction energy consumption and auxiliary load energy consumption, and the auxiliary load energy consumption is at least related to ambient temperature and air conditioning operating status.

4. The method according to claim 1, characterized in that, The online update includes at least one of the following: updating the parameters of the energy consumption-SOC evolution model online based on recursive least squares or Kalman filtering, or outputting the SOC residual compensation amount through a residual learning model; The SOC safety corridor is an opportunity constraint or a risk constraint, ensuring that the SOC is not lower than the safety lower limit under a pre-set confidence level, and that sampling approximation or deterministic equivalent transformation is used in the solution process.

5. The method according to claim 1, characterized in that, The available charging energy budget is defined as: the upper limit of the charging energy that can be allocated to each vehicle within a future rolling window, provided that the upper limit of the total power of the station, the upper limit of the power of a single charging pile, and the freezing constraint of the occupied area of ​​the allocated charging pile are met. Furthermore, after the residual compensation term is written back to the initial SOC value and predicted trajectory of the next rolling cycle, the gap energy is recalculated based on the corrected SOC predicted trajectory and the target SOC demand, and the available charging energy budget is updated so that the updated budget is not less than the minimum supplementary energy required to maintain the SOC safety corridor and does not exceed the upper limit of the available energy under the constraints of the station and charging pile.

6. A computer device, characterized in that, The computer device includes a processor, a graphics processing unit (GPU), and a memory, wherein the memory stores a computer program that, when executed by the processor and the GPU, causes the computer device to perform the method as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a computer device, causing the computer device to perform the method as described in any one of claims 1 to 5.