A new energy bus cross-line operation method based on deep learning

By applying a neural network based on the SAC algorithm to cross-route scheduling in the public transport network, the bus routes are optimized, solving the problem of fluctuating transport demand caused by changes in passenger flow and occasional events, and improving the operational efficiency and adaptability of the public transport network.

CN117494966BActive Publication Date: 2026-11-24LONGRUI SANYOU NEW ENERGY VEHICLE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311217318.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2026-11-24
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The existing bus route scheduling methods cannot effectively cope with changes in passenger flow and fluctuations in transport demand caused by unforeseen events, thus limiting the operational efficiency of the bus route network.

Method used

By deploying multiple buses in the public transport network and using a neural network based on the SAC algorithm for cross-route scheduling, vehicle routes are optimized based on real-time passenger flow and historical data, and an incentive mechanism is established to improve the efficiency of transport capacity operation.

Benefits of technology

It improved the operational efficiency of the bus route network, reduced unnecessary empty-running costs, and enhanced adaptability to changes in passenger flow and unforeseen events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117494966B_ABST
    Figure CN117494966B_ABST
Patent Text Reader

Abstract

This invention provides a deep learning-based method for cross-route operation of new energy buses. By establishing a neural network based on the SAC algorithm and training it using historical data of the bus route network, including cross-route scheduling, the method can effectively improve the operational efficiency of the entire bus route network and reduce unnecessary empty-run costs. Secondary training of the neural network using operational data from different routes with overlapping routes enhances its adaptability to changes in passenger flow caused by bus network planning or subjective passenger factors, thereby significantly improving the operational efficiency of cross-route scheduling and bus network restructuring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of public transport vehicle operation and dispatching technology, specifically relating to a method for cross-route operation of new energy buses based on deep learning. Background Technology

[0002] In the operation of public transportation networks, the tidal phenomenon of passenger flow and corresponding capacity demand has long existed, which often leads to insufficient capacity resources during peak hours and excessive capacity during off-peak hours for some bus routes. The existing bus route scheduling methods cannot effectively solve this problem. Although setting different departure intervals according to time periods can partially alleviate the capacity shortage during peak hours, it lacks good dynamic adaptability to changes in passenger flow and cannot cope with the extremely high capacity demand caused by accidental events such as accidents and traffic control, thus limiting the overall operational efficiency of the bus route network. Summary of the Invention

[0003] In view of this, and to address the technical problems existing in this field, the present invention provides a method for cross-route operation of new energy buses based on deep learning. This method involves deploying multiple buses within a bus network, enabling them to change routes as needed to improve overall operational efficiency. The method specifically includes the following steps:

[0004] Step 1: Statistically analyze the historical passenger numbers at different times of day for each stop within the entire bus network over a specific period, and obtain the data including the stop numbers L for each route. k Time period p, total number of passengers N in the public transport network p Historical data; assign corresponding station numbers to the starting and ending stations of each bus route; assign corresponding numbers x to buses that can be dispatched across routes, and record the historical route numbers when they run on different routes, the empty running distance Dx between different starting stations for each run, and the historical events of cross-route dispatch can be achieved by manual dispatch or based on existing dispatch models or methods;

[0005] Step 2: Establish a neural network based on the SAC (Soft Actor-Critic) algorithm to assign each bus route to which it can be dispatched across routes. The neural network consists of a Critic network, an Actor network, a binary tree, and an experience pool, where the experience pool is used to provide the samples required for training the Critic network and the Actor network.

[0006] Step 3: Using time period p, the current route number L and current stop number L of each cross-line dispatchable bus. kThe state space is constructed using the remaining number of stops m to the terminal station as the state variable, and the subsequent route number L' is selected as the action variable to construct the action space, considering the total number of passengers N in the public transport network. p Establish a corresponding reward function for the total empty driving distance ∑Dx when the vehicle changes routes;

[0007] Using the data obtained in step one, a training set is built and input into the neural network built in step two, so that the SAC algorithm agent selects the corresponding action and generates the reward according to the real-time state and enters the next time step state; train the neural network until the algorithm converges stably.

[0008] Step 4: For any bus route L r For sections where roads and travel directions overlap with other routes, the station numbers in the historical data of the same sections on other routes will be modified to reflect the route L. r The corresponding station number is used to establish a secondary training set; the same training process is then performed on the neural network obtained in step three using this secondary training set until the algorithm converges stably.

[0009] Step 5: Apply the trained neural network obtained in Step 4 online to the real-time assignment and scheduling of cross-line dispatchable buses. By obtaining the number of passengers at each route station during the current time period and the route information of each cross-line dispatchable bus, determine the next running route of each bus.

[0010] Furthermore, in step one, when acquiring historical data, specific periods with certain similarities in passenger flow changes at different times of the day are selected. For example, historical data can be acquired based on the same months or seasons over several consecutive years, or based on primary and secondary school semesters or holidays. For bus routes with both up and down directions, they are treated as two different bus routes for historical data acquisition, while loop lines are treated as only one route. Regarding the total number of passengers N... p Specifically, statistics are based on the number of electronic ticketing events.

[0011] Furthermore, the neural network established in step two based on the SAC algorithm specifically includes: one Actor network, four Critic networks, one experience pool, and a binary tree structure; wherein, the four Critic networks are specifically two current Critic networks Q1 and Q2 and two target Critic networks Q′1 and Q′2.

[0012] Furthermore, the following reward function is specifically defined for the neural network:

[0013] r=[ω1·Np-ω2·∑Dx]

[0014] Where ω1 is the capacity factor and ω2 is the empty driving distance factor.

[0015] Furthermore, the training process of the neural network in steps three and four is achieved through the following steps:

[0016] (1) Initialize the network parameters in the neural network: including π φ The network parameters φ, the network parameters θ1, θ2, θ′1, θ′2 of the current Critic network and the target Critic network; set the experience pool to empty, and the sample priority p of all child nodes of the binary tree;

[0017] (2) Input the training set into the SAC algorithm, and make it adjust according to the current state s. t Select action a t This includes maintaining the subsequent line number L' = the current line number L when m > 1, and selecting a new subsequent line number L' when m = 1, while simultaneously obtaining a reward r. t And enter the next state s t+1 , will sequence [s t a t r t s t+1 ] are stored as samples in the experience pool;

[0018] (3) Collect N samples from the experience pool through the following steps:

[0019] First, calculate the sampling probability: j represents the sample's index in the experience pool, p represents the sample's priority, and ρ represents the priority factor.

[0020] Then, samples are collected from the experience pool based on the sampling probability P.

[0021] Finally, calculate the importance sampling weight for each sample: B represents the total number of samples in the experience pool, and β represents the importance sampling factor;

[0022] (4) Train the Critic network using the samples collected in step (3), including:

[0023] First, select the target action: a t+1 =f φ (ε t ;s t+1 ), f φ Indicates the distribution of actions, ε t Indicates motion noise, Indicates the distribution of motion noise;

[0024] Then calculate the target Q value: i represents the Critic network number, γ represents the discount factor, and α represents the strategy exploration factor. This represents the Q-value calculated by the target Critic network;

[0025] Calculate the loss function of the Critic network: E[·] represents the current Q value, and E[·] represents the expected value.

[0026] Then, the parameters of the current Critic network are updated using stochastic gradient descent: Where, λ θ This represents the learning rate of the Critic network. It is the gradient operator;

[0027] Complete the target Critic network parameters: θ′ i ←τθ i +(1-τ)θ′ i τ is the update factor;

[0028] (5) Train the Actor network using the samples collected in step (3), including:

[0029] First, calculate the loss function of the Actor network:

[0030] Then, the Actor network parameters are updated using the same stochastic gradient descent method: λ φ This represents the learning rate of the Actor network. This represents the gradient of the function L(φ) with respect to φ;

[0031] Calculating the loss of an Actor network considering entropy And update the coefficients in, Let λ be the target entropy. α Let L(α) be the learning rate. Let L(α) be the gradient of the function L(α) with respect to α.

[0032] For each training round completed for the Actor network and Critic network, the temporal difference error ξ is calculated and the sample priority p of each child node of the binary tree is updated.

[0033] Furthermore, during training, threshold constraints are set for the empty driving distance of each vehicle when scheduling across lines, in order to improve the training speed and the scheduling efficiency of the trained neural network.

[0034] The deep learning-based cross-route operation method for new energy buses provided by this invention effectively improves the operational efficiency of the entire bus network and reduces unnecessary empty-run costs by establishing a neural network based on the SAC algorithm and training it using historical data of the bus network, including cross-route scheduling. Secondary training of the neural network using operational data from different overlapping routes enhances its adaptability to changes in passenger flow caused by bus network planning or subjective passenger factors, thereby significantly improving the operational efficiency of cross-route scheduling and bus network restructuring. Attached Figure Description

[0035] Figure 1 This is a flowchart illustrating the method provided by the present invention. Detailed Implementation

[0036] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] The deep learning-based method for cross-route operation of new energy buses provided by this invention, such as... Figure 1 As shown, the specific steps include:

[0038] Step 1: Statistically analyze the historical passenger numbers at different times of day for each stop within the entire bus network over a specific period, and obtain the data including the stop numbers L for each route. k Time period p, total number of passengers N in the public transport network p Historical data; assign corresponding station numbers to the starting and ending stations of each bus route; assign corresponding numbers x to buses that can be dispatched across routes, and record the historical route numbers when they run on different routes, the empty running distance Dx between different starting stations for each run, and the historical events of cross-route dispatch can be achieved by manual dispatch or based on existing dispatch models or methods;

[0039] Step 2: Establish a neural network based on the SAC algorithm to assign each bus route to which it can be dispatched across routes. The neural network consists of a Critic network, an Actor network, a binary tree, and an experience pool, where the experience pool is used to provide the samples required for training the Critic network and the Actor network.

[0040] Step 3: Using time period p, the current route number L and current stop number L of each cross-line dispatchable bus. kThe state space is constructed using the remaining number of stops m to the terminal station as the state variable, and the subsequent route number L' is selected as the action variable to construct the action space, considering the total number of passengers N in the public transport network. p Establish a corresponding reward function for the total empty driving distance ∑Dx when the vehicle changes routes;

[0041] Using the data obtained in step one, a training set is built and input into the neural network built in step two, so that the SAC algorithm agent selects the corresponding action and generates the reward according to the real-time state and enters the next time step state; train the neural network until the algorithm converges stably.

[0042] Due to factors such as bus route design and planning, and the routes passing through commercial areas or transportation hubs, passengers often have subjective preferences when choosing which bus to take in overlapping sections covered by multiple bus lines. For example, they may choose routes that are more convenient for subsequent transfers or that avoid densely populated areas such as train stations. To address this, this invention adds a method of reconstructing specific route data using data from other routes in the overlapping section to establish a secondary training set. By performing secondary training on the pre-trained neural network, fine-tuning is achieved to further improve the scheduling efficiency of the algorithm in online applications.

[0043] Step 4: For any bus route L r For sections where roads and travel directions overlap with other routes, the station numbers in the historical data of the same sections on other routes will be modified to reflect the route L. r The corresponding station number is used to establish a secondary training set; the same training process is then performed on the neural network obtained in step three using this secondary training set until the algorithm converges stably.

[0044] Step 5: Apply the trained neural network obtained in Step 4 online to the real-time assignment and scheduling of cross-line dispatchable buses. By obtaining the number of passengers at each route station during the current time period and the route information of each cross-line dispatchable bus, determine the next running route of each bus.

[0045] In a preferred embodiment of the present invention, when acquiring historical data in step one, specific periods with certain similarities in passenger flow changes at different times of the day are selected. For example, historical data is acquired based on the same months or seasons over several consecutive years, or based on primary and secondary school semesters or holidays. For bus routes with both up and down directions, they are treated as two different bus routes for acquiring historical data, while loop lines are treated as only one route. Regarding the total number of passengers N... p Specifically, statistics are based on the number of electronic ticketing events.

[0046] In a preferred embodiment of the present invention, the neural network established in step two based on the SAC algorithm specifically includes: an Actor network, four Critic networks, an experience pool, and a binary tree structure; wherein, the four Critic networks are specifically two current Critic networks Q1 and Q2 and two target Critic networks Q′1 and Q′2.

[0047] In a preferred embodiment of the present invention, the following reward function is specifically defined for the neural network:

[0048] r=[ω1·N p -ω2·∑Dx]

[0049] Where ω1 is the capacity factor and ω2 is the empty driving distance factor.

[0050] In a preferred embodiment of the present invention, the training process of the neural network in steps three and four is implemented through the following steps:

[0051] (1) Initialize the network parameters in the neural network: including π φ The network parameters φ, the network parameters θ1, θ2, θ′1, θ′2 of the current Critic network and the target Critic network; set the experience pool to empty, and the sample priority p of all child nodes of the binary tree;

[0052] (2) Input the training set into the SAC algorithm, and make it adjust according to the current state s. t Select action a t This includes maintaining the subsequent line number L' = the current line number L when m > 1, and selecting a new subsequent line number L' when m = 1, while simultaneously obtaining a reward r. t And enter the next state s t+1 , will sequence [s t a t r t s t+1 ] are stored as samples in the experience pool;

[0053] (3) Collect N samples from the experience pool through the following steps:

[0054] First, calculate the sampling probability: j represents the sample's index in the experience pool, p represents the sample's priority, and ρ represents the priority factor.

[0055] Then, samples are collected from the experience pool based on the sampling probability P.

[0056] Finally, calculate the importance sampling weight for each sample: B represents the total number of samples in the experience pool, and β represents the importance sampling factor;

[0057] (4) Train the Critic network using the samples collected in step (3), including:

[0058] First, select the target action: a t+1 =f φ (ε t ;s t+1 ), f φ Indicates the distribution of actions, ε t Indicates motion noise, Indicates the distribution of motion noise;

[0059] Then calculate the target Q value: i represents the Critic network number, γ represents the discount factor, and α represents the strategy exploration factor. This represents the Q-value calculated by the target Critic network;

[0060] Calculate the loss function of the Critic network: This represents the current Q value. Represents the mathematical expectation;

[0061] Then, the parameters of the current Critic network are updated using stochastic gradient descent: Where, λ θ This represents the learning rate of the Critic network. It is the gradient operator;

[0062] Complete the target Critic network parameters: θ′ i ←τθ i +(1-τ)θ′ i τ is the update factor;

[0063] (5) Train the Actor network using the samples collected in step (3), including:

[0064] First, calculate the loss function of the Actor network:

[0065] Then, the Actor network parameters are updated using the same stochastic gradient descent method: λ φ This represents the learning rate of the Actor network. This represents the gradient of the function L(φ) with respect to φ.

[0066] Calculating the loss of an Actor network considering entropy And update the coefficients in, Let λ be the target entropy. α Let L(α) be the learning rate. Let L(α) be the gradient of the function L(α) with respect to α.

[0067] For each training round completed for the Actor network and Critic network, the temporal difference error ξ is calculated and the sample priority p of each child node of the binary tree is updated.

[0068] In a preferred embodiment of the present invention, a threshold constraint is set for the empty driving distance of each vehicle during cross-line scheduling in order to improve the training speed and the scheduling efficiency of the trained neural network.

[0069] It should be understood that the sequence number of each step in the embodiments of the present invention does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0070] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for cross-route operation of new energy buses based on deep learning, characterized in that: Specifically, the following steps are included: Step one, for a certain period of time, the entire network of bus stations in each daily time period of the history of the number of passengers and get including each line station number L k , time p, the total number of passengers in the network N p The historical data; the starting and ending stations of each bus line are assigned corresponding station numbers; the bus that can be dispatched across lines is assigned a corresponding number x, and the historical line numbers when it runs on different lines are recorded, and the empty running distance Dx between different starting stations each time. Step 2: Establish a neural network based on the SAC algorithm to assign each bus route to which it can be dispatched across routes. The neural network consists of a Critic network, an Actor network, a binary tree, and an experience pool, where the experience pool provides training samples for the Critic network and the Actor network. Step three, take the time period p, the current line number L and the current station number L of each cross-line scheduling bus as state variables to construct the state space, take the subsequent line number L' as the action variable and construct the action space, and consider the total number of passengers N of the bus network k , the number of stations m remaining to the terminal station, to select the subsequent line number L' as the action variable and construct the action space, and consider the total number of passengers N of the bus network p , the total empty driving distance ∑Dx when the vehicle changes the line, to establish the corresponding reward function; Using the data obtained in step one, a training set is built and input into the neural network built in step two, so that the SAC algorithm agent selects the corresponding action and generates the reward according to the real-time state and enters the next time step state; train the neural network until the algorithm converges stably. Step 4: For any bus route L r For sections where roads and travel directions overlap with other routes, the station numbers in the historical data of the same sections on other routes will be modified to reflect the route L. r The corresponding station number is used to establish a secondary training set; the same training process is then performed on the neural network obtained in step three using this secondary training set until the algorithm converges stably. Step 5: Apply the trained neural network obtained in Step 4 online to the real-time assignment and scheduling of cross-line dispatchable buses. By obtaining the number of passengers at each route station during the current time period and the route information of each cross-line dispatchable bus, determine the next running route of each bus.

2. The method as described in claim 1, characterized in that: In step one, when acquiring historical data, specific periods with similar passenger flow changes at different times of the day are selected; for bus routes with both up and down directions, they are treated as two different bus routes for historical data acquisition, while loop routes are treated as only one route; regarding the total number of passengers N... p Specifically, statistics are based on the number of electronic ticketing events.

3. The method as described in claim 1, characterized in that: The neural network established in step two based on the SAC algorithm specifically includes: one Actor network, four Critic networks, one experience pool, and a binary tree structure; wherein, the four Critic networks are two current Critic networks Q1 and Q2 and two target Critic networks Q′1 and Q′2.

4. The method as described in claim 3, characterized in that: The following reward function is specifically defined for the neural network: r=[ω1·Np-ω2·∑Dx] Where ω1 is the capacity factor and ω2 is the empty driving distance factor.

5. The method as described in claim 4, characterized in that: The training process of the neural network in steps three and four is achieved through the following steps: (1) Initialize the network parameters in the neural network: including π φ The network parameters φ, the network parameters θ1, θ2, θ′1, θ′2 of the current Critic network and the target Critic network; set the experience pool to empty, and the sample priority p of all child nodes of the binary tree; (2) Input the training set into the SAC algorithm, and make it adjust according to the current state s. t Select action a t This includes maintaining the subsequent line number L' = the current line number L when m > 1, and selecting a new subsequent line number L' when m = 1, while simultaneously obtaining a reward r. t And enter the next state s t+1 , will sequence [s t ,a t ,r t ,s t+1 ] are stored as samples in the experience pool; (3) Collect N samples from the experience pool through the following steps: First, calculate the sampling probability: j represents the sample's index in the experience pool, p represents the sample's priority, and ρ represents the priority factor. Then, samples are collected from the experience pool based on the sampling probability P. Finally, calculate the importance sampling weight for each sample: B represents the total number of samples in the experience pool, and β represents the importance sampling factor; (4) Train the Critic network using the samples collected in step (3), including: First, select the target action: a t+1 =f φ (ε t ;s t+1 ), f φ Indicates the distribution of actions, ε t Indicates motion noise, Indicates the distribution of motion noise; Then calculate the target Q value: i represents the Critic network number, γ represents the discount factor, and α represents the strategy exploration factor. This represents the Q-value calculated by the target Critic network; Calculate the loss function of the Critic network: This represents the current Q value. Represents the mathematical expectation; Then, the parameters of the current Critic network are updated using stochastic gradient descent: Where, λ θ This represents the learning rate of the Critic network. It is the gradient operator; Complete the target Critic network parameters: θ′ i ←τθ i +(1-τ)θ′ i τ is the update factor; (5) Train the Actor network using the samples collected in step (3), including: First, calculate the loss function of the Actor network: Then, the Actor network parameters are updated using the same stochastic gradient descent method: λ φ This represents the learning rate of the Actor network. This represents the gradient of the function L(φ) with respect to φ; Calculating the loss of an Actor network considering entropy And update the coefficients in, Let λ be the target entropy. α Let L(α) be the learning rate. Let L(α) be the gradient of the function L(α) with respect to α. For each training round completed for the Actor network and Critic network, the temporal difference error ξ is calculated and the sample priority p of each child node of the binary tree is updated.

6. The method as described in claim 1, characterized in that: During training, a threshold constraint is set for the empty driving distance of each vehicle when scheduling across lines, in order to improve the training speed and the scheduling efficiency of the trained neural network.

Citation Information

Patent Citations

  • Bus route and scheduling optimization method, system and device and medium

    CN113657725A

  • Shared electric vehicle scheduling method based on deep reinforcement learning

    CN114971251A