An intensive scheduling method for driverless taxis based on demand density prediction
By combining the CELU network and heuristic genetic algorithm with the Hungarian algorithm, the demand characteristics of driverless taxis are dynamically aggregated, solving the problems of inaccurate prediction and unbalanced scheduling in existing technologies, and realizing efficient demand prediction and scheduling of driverless taxis.
Patent Information
- Application Number
- CN202211126102.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-09-16
AI Technical Summary
Existing methods for predicting demand for driverless taxis fail to fully consider the differences in internal information of features, resulting in low vehicle dispatch efficiency, long passenger waiting times, high communication costs, and an inability to effectively balance supply and demand.
An intensive scheduling method for driverless taxis based on demand density prediction is adopted. By using the CELU network structure and heuristic genetic algorithm, the spatiotemporal and external features of taxi demand are dynamically aggregated, and the Hungarian algorithm is combined to optimize the matching of vehicles and passengers.
It enables long-term, wide-range forecasting of driverless taxi demand, improving dispatch efficiency, reducing empty driving distances and passenger waiting times, and increasing profit margins and supply-demand balance.
Smart Images

Figure CN115438868B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of demand forecasting and scheduling technology, and in particular to an intensive scheduling method for driverless taxis based on demand density forecasting. Background Technology
[0002] Due to the rapid growth in traffic volume and inefficient dispatching operations, traditional transportation systems, while providing comfortable and convenient travel, also face serious challenges such as long passenger waiting times, increased fuel consumption, and traffic congestion. To address these issues and improve system efficiency, it is necessary to predict the distribution of vehicle demand in different spatial areas over different time intervals. Each platform should then intelligently allocate vehicles based on accurate predicted vehicle distribution information. Driverless taxis further reduce communication costs; citizens simply enter their destination in a mini-program, and the system automatically matches the corresponding route and pick-up point, hailing a vehicle and connecting passenger demand with vehicle dispatch. This also avoids contact with others in confined spaces, promising significant future improvements in traffic efficiency and convenience.
[0003] Currently, research on predicting the demand for driverless taxis mainly includes three methods: statistical, machine learning, and deep learning. While most methods integrate temporal and spatial features, they do not fully consider the information differences within those features. Vehicle dispatching is primarily used to balance passenger demand and taxi supply in urban areas. Traditional ride-hailing services, although fully considering passenger waiting times and supply-demand balance, still incur communication costs between drivers and passengers and rarely consider profit-related issues.
[0004] Therefore, designing a reasonable network internal structure and scheduling strategy that can be applied to a wider range of prediction scenarios, enabling a win-win situation for both the vehicle supply platform and passengers, is an urgent problem to be solved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing an intensive scheduling method for driverless taxis based on demand density prediction, so as to realize the prediction and high-yield scheduling of driverless taxi demand with long time delay and large span.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: an intensive scheduling method for driverless taxis based on demand density prediction, comprising the following steps:
[0007] Step 1: Dynamically aggregate the attribute characteristics of driverless taxi demand at different demand frequencies and time levels;
[0008] Step 1.1: Divide the demand for driverless taxis into adjacent layers H according to the time scale. c Periodic layer H d Near-trend layer Hk and distant trend layer H m Four time layers;
[0009] Step 1.2: Divide the demand for driverless taxis in each time layer into three perception domains according to the frequency of demand;
[0010] If a region is divided into PxQ spatial grids, and each grid has corresponding historical demand data for driverless taxis, then the historical demand data for driverless taxis corresponding to the four time layers are denoted as tensors. η = c, d, k, m is used to represent four time layers. Let represent real numbers; then, the demand for driverless taxis at each time level is divided into three perception domains according to the frequency of demand, as shown in the following formula:
[0011]
[0012] in, Let η represent the g-th perception domain corresponding to the time layer η, where g = 0, 1, 2, I is the demand for driverless taxis, and α and β are dynamically determined demand boundaries.
[0013] Step 1.3: Design a CELU network structure for the four time layers to capture the full range of spatiotemporal correlations of driverless taxi demand;
[0014] The CELU network structure consists of a convolutional layer Conva, an L-layer residual unit, and a convolutional layer Convb. It can dynamically aggregate the attribute features of autonomous taxi demand at different demand frequencies and time levels. The specific method is as follows:
[0015] (1) Based on the demand frequency within each time layer, the demand from different regions during historical periods is converted into a dual-channel image-like matrix. Preliminary feature extraction is performed using a convolutional layer (Conva), and the output is denoted as... As shown in the formula below:
[0016]
[0017] in, These are the weights and biases of the convolutional layer Conva, used to adjust the importance of different time layers to the prediction results; * indicates the convolution operator;
[0018] (2) The feature map output by the Conva convolutional layer is fed into l consecutive residual units. The calculation result of each residual unit is shown in the following formula:
[0019]
[0020] Where ξ is the residual function, This is the input for the residual unit; This represents all the parameters to be learned in the l-th residual unit;
[0021] The residual unit has a three-layer structure, where the first and second layers are both combinations of convolutional layers (Conv) and activation functions (ELU), and the third layer is a Dropout layer superimposed on the second layer.
[0022] (3) The output after the Lth residual unit is denoted as The data is then fed into a convolutional layer (Convb) for data specification unification, resulting in a time-layer output of autonomous taxi demand, denoted as... As shown in the formula below:
[0023]
[0024] in, It is an activation function; and These are the weights and biases of the Convb layer, respectively;
[0025] Step 2: Extract the external environmental features and points of interest features of the demand for driverless taxis;
[0026] Step 2.1: Extract the external environmental characteristics of the demand for driverless taxis;
[0027] For each time period, extract a set of external environmental feature vectors representing the demand for driverless taxis, including meteorological features. met Weekly vector It is an integer, working day O wrk and holidays O hol The feature vectors from different time periods are concatenated into a matrix, denoted as O. hmw The matrix is then fed into a fully connected layer for feature extraction, yielding a result based on O... met , O wrk and O hol The external environmental characteristics are denoted as O. st As shown in the formula below:
[0028]
[0029] Where × denotes matrix multiplication, W st and b st These represent the weights and biases of the external environment characteristics, respectively.
[0030] Step 2.2: Use a convolutional neural network combined with a fully connected layer to extract the interest point features of the demand for driverless taxis, obtaining the interest point-based features. poi Interest point features, denoted as Osc As shown in the formula below:
[0031]
[0032] Among them, W sc and b sc These represent the weights and biases of the features of the points of interest, respectively, and their values depend on the degree of influence of each point of interest on the demand for driverless taxis.
[0033] Step 3: Integrate the spatiotemporal and external characteristics of the demand for driverless taxis;
[0034] Step 3.1: Using a parameter matrix-based fusion method, spatiotemporal information of autonomous taxi demand is mined from four different time layers to obtain t. j The spatiotemporal characteristics of demand for driverless taxis during specific time periods are denoted as follows: As shown in the formula below:
[0035]
[0036] The fusion here consists of two parts. First, the fusion of three different demand frequency perception domains within each time layer is performed, and the resulting fusion vector is denoted as... The next step is the fusion of the four time layers, and the calculation formulas are shown in equations (8) and (9):
[0037]
[0038]
[0039] in, It is the Hadamard product; W η,0 W η,1 W η,2 W represents the weight matrices for the three demand frequency perception domains; c W d W k W m These represent the weight matrices for the four time layers; For bias;
[0040] Step 3.2: Fuse the external environment features and point-of-interest features to obtain the external features of the demand for driverless taxis, denoted as R. Ex As shown in equation (10):
[0041]
[0042] Among them, W sc W st b Ex All of these are adjustable weight parameters;
[0043] Step 3.3: Fuse the spatiotemporal and external features of the demand for driverless taxis, and train them together to obtain predicted values of driverless taxi demand in different domains;
[0044] Two different fusion methods are used to fuse spatiotemporal features and external features; a summation fusion method is employed. This is used to represent gradually changing demands, while for demands that change abruptly, a fusion method based on gating mechanisms is applied for fusion. Finally, the fused features are mapped to [-1, 1] using the Tanh function to obtain the predicted value of the demand for driverless taxis, as shown in the following formula:
[0045]
[0046] in, For t j The predicted demand for driverless taxis during a given time period, where φ is the gated activation function sigmoid;
[0047] Step 4: Predict the demand for driverless taxis from four time layers and external features;
[0048] To minimize the prediction matrix of driverless taxi demand and the real matrix The mean square error between the two is used as the objective function to obtain the optimal values of the weights and biases involved in the demand forecasting of driverless taxis, so as to achieve demand forecasting from four time layers and external features.
[0049] The formula for the objective function is shown below:
[0050]
[0051] Where ψ represents the objective function, and W and b represent the set of all weights and biases involved in the demand forecasting of driverless taxis, respectively;
[0052] Step 5: Based on the predicted demand for driverless taxis in Step 4, a heuristic genetic algorithm is used to match driverless taxis with passengers;
[0053] Step 5.1: Encode the driverless taxis and passengers using real number encoding;
[0054] Driverless taxis and passengers are represented using real number encoding, i.e., [x1, y1, x2, y2, ..., x n ,y n ], where x i For driverless taxis d id y iFor passengers id , [x i ,y i The symbol ] represents a driverless taxi matching a passenger, and also represents a gene within a chromosome, where i = 1, 2, ..., n, and n represents the number of driverless taxis;
[0055] Step 5.2: Population initialization;
[0056] The population is divided into C genomes, the number of genomes C is dynamically determined according to the location of the driverless taxis, and each group includes u genome chromosomes, the value of u is given by formula (13);
[0057]
[0058] Among them, A gen For the number of passengers within the genome, B gen The number of driverless taxis within the genome;
[0059] Within the genome, when A gen -B gen When >0, fixed driverless taxis d id Non-repeating random generation of passengers s id At this point, the number of driverless taxis is n = B. gen The vehicle is a perfect match; when A gen -B gen When < 0, the number of random selections is A. gen The driverless taxis are assigned a fixed vehicle number d. id Non-repeating randomly generated passenger numbers s id At this point, the number of driverless taxis is n = A. gen The passengers were a perfect match;
[0060] G complete chromosomes with genomic markers are formed by randomly selecting chromosomes from each genome and assembling them. The G complete chromosomes are deduplicated and genetically processed. After θ iterations, the optimal chromosome is selected as the matching result between the driverless taxi and the passenger.
[0061] Step 5.3: Remove duplicates and repair intact chromosomes within the population;
[0062] Step 5.3.1: Remove duplicate chromosomes from the population;
[0063] Step 5.3.1.1: Take the set S of passenger IDs from the chromosome. ID With vehicle number set D ID Locate the recurring passenger IDs in the chromosome and their corresponding genomes, and obtain the total set of passenger IDs within that genome and S. ID The difference set SDS The set of vehicle numbers and total vehicle numbers corresponding to duplicate passengers will be combined with D. ID The difference sets are summed into set D. DS Locate the recurring vehicle IDs in a chromosome and their corresponding genomes, then obtain the total set of vehicle IDs within that genome and the corresponding D. ID The difference set D DS The set of passenger IDs and total passenger IDs corresponding to duplicate vehicles are combined with S. ID The difference sets are summed into set S. DS ;
[0064] Step 5.3.1.2: Determine set S DS and D DS Is it an empty set? If it is, delete the gene from the chromosome; otherwise, add the set S. DS and D DS The elements in the graph are aggregated to form a bipartite graph. The Hungarian algorithm is used to find the gene that best matches the original gene and replace it in the original gene position.
[0065] Step 5.3.1.3: Determine whether all duplicate passenger and vehicle numbers have been replaced. If all have been replaced, end the operation; otherwise, repeat step 5.3.1.1.
[0066] Step 5.3.2: Repair the intact chromosome;
[0067] First, obtain the total vehicle and passenger ID sets, and then calculate the difference D between the total vehicle and passenger ID sets and the vehicle and passenger IDs in the chromosome. ds and S ds Then the difference set D ds and S ds The data is compiled and a bipartite graph is formed. The Hungarian algorithm is used to obtain the best-matching gene. Finally, the best-matching gene is added to the tail of the current chromosome.
[0068] After chromosome deduplication and repair operations, the number of driverless taxis is n = min{A,B}, where A is the total number of passengers and B is the total number of driverless taxis.
[0069] Step 5.4: Determine the fitness function of complete chromosomes within the population;
[0070] Chromosome fitness γ is defined as follows:
[0071]
[0072] in, For economic benefits Cluster benefits with demand density Weighted sum;
[0073]
[0074] Where ρ is the mileage fee for driverless taxis; δ is the time fee; For t j Average vehicle speed during the time period It is t j The average speed of a vehicle between any two locations during a given time period is calculated using the formula... Obtain the average time required for a vehicle to travel between any two locations within each time period. Determined; ε is the fuel consumption index, which is related to vehicle speed according to formula (16); N is the geodesic distance between the passenger's departure point and destination, and E is the matching distance between the vehicle and the passenger, the value of which varies with the order of the sensing neighborhood. It grows linearly, as shown in formula (17), where U is the geodetic distance between the vehicle's current location and the passenger's departure point;
[0075]
[0076]
[0077]
[0078] Where X is the demand density of driverless taxis in the drop-off area, and its value is the predicted demand value for driverless taxis; σ is the weighting coefficient; X represents the demand density of driverless taxis in the first-order sensing neighborhood of the drop-off area; avg τ represents the average global demand density during the time period in which the vehicle arrives at its destination; τ is the number of effective demand regions.
[0079] Step 5.5: Perform genetic operations on the complete chromosomes within the population to obtain the optimal matching results between driverless taxis and passengers;
[0080] Step 5.5.1: Select chromosomes within the population;
[0081] Chromosome selection was performed using a combination of roulette wheel selection and optimal chromosome preservation methods.
[0082] The probability of chromosome selection is shown in the following formula:
[0083]
[0084] Where, γ a Let G be the fitness of the a-th chromosome in the current population, and G be the population size.
[0085] Prioritize fitness The chromosomes are directly copied to the next generation without crossing over, and the remaining chromosomes... Chromosomes are selected for crossover using a roulette wheel selection method.
[0086] Step 5.5.2: Chromosome crossing over;
[0087] The crossover operation is performed under the condition that the crossover probability F = 0.9; first, a random number F between 0 and 1 is generated. rand When F is greater than F rand At that time, two intersection points are randomly generated after the passenger code bit. The area between the two intersection points is defined as the matching area. The matching areas of the two chromosomes are swapped using the position swap operation. The deduplication operation is performed, and chromosomes with fitness greater than the set value are retained and copied to the next generation.
[0088] Step 5.5.3: Chromosomal aberration;
[0089] The mutation operation is performed under the condition that the mutation probability K = 0.8; the process is as follows:
[0090] Step 5.5.3.1: Determine if there are any vehicle IDs in the total vehicle ID set that do not have a matching passenger ID. If not, proceed directly to step 5.5.3.2; otherwise, aggregate the vehicle IDs that do not have a matching passenger ID into set D. DS traversing D DS For each vehicle number, perform the following operations;
[0091] ① Obtain the passenger set S of the unmatched vehicles in the genome of the vehicle IDs for which no matching passenger ID was found. ds ,like Traverse S ds The process continues until a passenger ID that matches the vehicle ID and increases the chromosome's fitness value is found. If no passenger ID that increases the chromosome's fitness value is found, the process continues until a passenger ID that matches the vehicle ID is found is inserted into the chromosome along with the passenger ID. Then proceed directly to step ②;
[0092] ② Traverse D DS Find the next element and repeat step ① until D. DS All elements in the array have been traversed;
[0093] Step 5.5.3.2: Obtain the vehicle set D in the chromosome. ID and passenger group S ID Determine if there are any vehicle IDs in the total vehicle ID set that do not match any passenger IDs, and if there are any passenger IDs in the total passenger ID set that do not match any vehicle IDs. Then, aggregate the vehicle IDs that do not match any passenger IDs into a set D. DS Passenger IDs for which no vehicle ID was matched are grouped into set S. DS And perform the following operations:
[0094] i. Determine DDS and S DS Is it empty? Traversing D DS Element D DSn Then proceed to step ii;
[0095] ii. Traverse D ID Element D IDm Determine D IDm The genome and D DSn If the genomes are the same, then iterate through D. ID For the next element, repeat step ii until D has been traversed. ID All elements in D, then iterate through D. DS Next element; otherwise, proceed to step iii;
[0096] iii. Chromosome exchange D DSn With D IDm Check if the chromosome fitness value increases. If the chromosome fitness value increases, then traverse set D. ID If the next element is not found, repeat step i; otherwise, update the chromosome and retrieve set D again. ID S ID D DS and S DS And repeat step i;
[0097] like Execution and D DS Same operation; when and Or D DS S DS When all elements in the middle have been traversed, proceed to step 5.5.3.3;
[0098] Step 5.5.3.3: Obtain the vehicle set D in the chromosome. ID and passenger group S ID ; Traverse set D ID Element D IDu and perform the following operations:
[0099] I. Determine the element D IDu Check if the genome of the next element is the same. If it is, proceed to step II; otherwise, traverse set D. ID The next element is encountered, until the entire set D has been traversed. ID All elements in D; when the element D IDu After all subsequent elements have been evaluated, traverse set D. ID The next element in;
[0100] II. Exchange D IDuWith the next element D IDv Check if the chromosome fitness value increases. If it does not increase, then iterate through element D. IDv Find the next element and repeat operation I; otherwise, update the chromosome and retrieve set D again. ID With S ID And iterate through set D again. ID Element D IDu Perform operations I and II as described above.
[0101] The beneficial effects of adopting the above technical solution are as follows: The autonomous taxi intensive scheduling method based on demand density prediction provided by this invention eliminates the excessive dependence of autonomous taxi demand density on a certain feature, and can timely dispatch autonomous taxis to areas with high profit potential, taking into account both global supply and demand balance and overall profitability; it eliminates the influence of individual extreme points on autonomous taxi demand density, and can balance spaces with large data trends; it can effectively reduce the empty driving distance of autonomous taxis and passenger waiting time, and combined with the Hungarian algorithm, it prevents the genetic operation from causing gene loss and failing to obtain the optimal solution; it improves the order acceptance rate and profit margin of autonomous taxis, and achieves global supply and demand balance. Attached Figure Description
[0102] Figure 1 A flowchart illustrating an intensive scheduling method for driverless taxis based on demand density prediction, provided as an embodiment of the present invention;
[0103] Figure 2 This is a flowchart for removing duplicates from complete chromosomes within a population, provided in an embodiment of the present invention.
[0104] Figure 3 A flowchart of chromosome crossing provided for an embodiment of the present invention. Detailed Implementation
[0105] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0106] In this embodiment, a method for intensive scheduling of driverless taxis based on demand density prediction is described, such as... Figure 1 As shown, it includes the following steps:
[0107] Step 1: Dynamically aggregate the attribute characteristics of driverless taxi demand at different demand frequencies and time levels;
[0108] Step 1.1: Divide the demand for driverless taxis into adjacent layers H according to the time scale. c Periodic layer H d Near-trend layer Hk and distant trend layer H m Four time layers;
[0109] Step 1.2: Divide the demand for driverless taxis in each time layer into three perception domains according to the frequency of demand;
[0110] If a region is divided into PxQ spatial grids, and each grid has corresponding historical demand data for driverless taxis, then the historical demand data for driverless taxis corresponding to the four time layers are denoted as tensors. η = c, d, k, m is used to represent four time layers. Let represent real numbers; then, the demand for driverless taxis at each time level is divided into three perception domains according to the frequency of demand, as shown in the following formula:
[0111]
[0112] in, Let η represent the g-th perception domain corresponding to the time layer η, where g = 0, 1, 2, I is the demand for driverless taxis, and α and β are dynamically determined demand boundaries.
[0113] Step 1.3: Design a CELU network structure for the four time layers to capture the full range of spatiotemporal correlations of driverless taxi demand;
[0114] The CELU network structure consists of a convolutional layer Conva, an L-layer residual unit, and a convolutional layer Convb. It can dynamically aggregate the attribute features of autonomous taxi demand at different demand frequencies and time levels. The specific method is as follows:
[0115] (1) Based on the demand frequency within each time layer, the demand from different regions during historical periods is converted into a dual-channel image-like matrix. Preliminary feature extraction is performed using a convolutional layer (Conva), and the output is denoted as... As shown in the formula below:
[0116]
[0117] in, These are the weights and biases of the convolutional layer Conva, used to adjust the importance of different time layers to the prediction results; * indicates the convolution operator;
[0118] (2) The feature map output by the Conva convolutional layer is fed into l consecutive residual units. The calculation result of each residual unit is shown in the following formula:
[0119]
[0120] Where ξ is the residual function, This is the input for the residual unit; This represents all the parameters to be learned in the l-th residual unit;
[0121] The residual unit has a three-layer structure, where the first and second layers are both combinations of convolutional layers (Conv) and activation functions (ELU), and the third layer is a Dropout layer superimposed on the second layer.
[0122] (3) The output after the Lth residual unit is denoted as The data is then fed into a convolutional layer (Convb) for data specification unification, resulting in a time-layer output of autonomous taxi demand, denoted as... As shown in the formula below:
[0123]
[0124] in, It is an activation function (ELU); and These are the weights and biases of the Convb layer, respectively;
[0125] Step 2: Extract the external environmental features and points of interest features of the demand for driverless taxis;
[0126] Step 2.1: Extract the external environmental characteristics of the demand for driverless taxis;
[0127] For each time period, extract a set of external environmental feature vectors representing the demand for driverless taxis, including meteorological features. met Weekly vector It is an integer, working day O wrk and holidays O hol The feature vectors from different time periods are concatenated into a matrix, denoted as O. hmw The matrix is then fed into a fully connected layer for feature extraction, yielding a result based on O... met , O wrk and O hol The external environmental characteristics are denoted as O. st As shown in the formula below:
[0128]
[0129] Where × denotes matrix multiplication, W st and b st These represent the weights and biases of the external environment characteristics, respectively.
[0130] Step 2.2: Use a convolutional neural network combined with a fully connected layer to extract the interest point features of the demand for driverless taxis, obtaining the interest point-based features. poiInterest point features, denoted as O sc As shown in the formula below:
[0131]
[0132] Among them, W sc and b sc These represent the weights and biases of the features of the points of interest, respectively, and their values depend on the degree of influence of each point of interest on the demand for driverless taxis.
[0133] Step 3: Integrate the spatiotemporal and external characteristics of the demand for driverless taxis;
[0134] Step 3.1: Using a parameter matrix-based fusion method, spatiotemporal information of autonomous taxi demand is mined from four different time layers to obtain t. j The spatiotemporal characteristics of demand for driverless taxis during specific time periods are denoted as follows: As shown in the formula below:
[0135]
[0136] The fusion here consists of two parts. First, the fusion of three different demand frequency perception domains within each time layer is performed, and the resulting fusion vector is denoted as... The next step is the fusion of the four time layers, and the calculation formulas are shown in equations (8) and (9):
[0137]
[0138]
[0139] in, It is the Hadamard product (i.e., multiplying corresponding elements of two matrices to obtain an output matrix of the same dimension); W η,0 W η,1 W η,2 W represents the weight matrices for the three demand frequency perception domains; c W d W k W m These represent the weight matrices for the four time layers; These are the biases; these are all parameters that need to be learned during network training.
[0140] Step 3.2: Fuse the external environment features and point-of-interest features to obtain the external features of the demand for driverless taxis, denoted as R. Ex As shown in equation (10):
[0141]
[0142] Among them, Wsc W st b Ex All of these are adjustable weight parameters;
[0143] Step 3.3: Fuse the spatiotemporal and external features of the demand for driverless taxis, and train them together to obtain predicted values of driverless taxi demand in different domains;
[0144] Two different fusion methods are used to fuse spatiotemporal features and external features; a summation fusion method is employed. This is used to represent gradually changing demands, while for demands that change abruptly, a fusion method based on gating mechanisms is applied for fusion. Finally, the fused features are mapped to [-1, 1] using the Tanh function to achieve faster convergence during training and obtain the predicted value of the demand for driverless taxis, as shown in the following formula:
[0145]
[0146] in, For t j The predicted demand for driverless taxis during a given time period, where φ is the gated activation function sigmoid;
[0147] Step 4: Predict the demand for driverless taxis from four time layers and external features;
[0148] To minimize the prediction matrix of driverless taxi demand and the real matrix The mean square error between the two is used as the objective function to obtain the optimal values of the weights and biases involved in the demand forecasting of driverless taxis, so as to achieve demand forecasting from four time layers and external features.
[0149] The formula for the objective function is shown below:
[0150]
[0151] Where ψ represents the objective function, and W and b represent the set of all weights and biases involved in the demand forecasting of driverless taxis, respectively;
[0152] Step 5: Based on the predicted demand for driverless taxis in Step 4, a heuristic genetic algorithm is used to match driverless taxis with passengers;
[0153] Step 5.1: Encode the driverless taxis and passengers using real number encoding;
[0154] Driverless taxis and passengers are represented using real number encoding, i.e., [x1, y1, x2, y2, ..., x n,y n ], where x i For driverless taxis d id y i For passengers id , [x i ,y i The symbol ] represents a driverless taxi matching a passenger, and also represents a gene within a chromosome, where i = 1, 2, ..., n, and n represents the number of driverless taxis;
[0155] Step 5.2: Population initialization;
[0156] The population is divided into C genomes, the number of genomes C is dynamically determined according to the location of the driverless taxis, and each group includes u genome chromosomes, the value of u is given by formula (13);
[0157]
[0158] Among them, A gen For the number of passengers within the genome, B gen The number of driverless taxis within the genome;
[0159] Within the genome, when A gen -B gen When >0, fixed driverless taxis d id Non-repeating random generation of passengers s id At this point, the number of driverless taxis is n = B. gen The vehicle is a perfect match; when A gen -B gen When < 0, the number of random selections is A. gen The driverless taxis are assigned a fixed vehicle number d. id Non-repeating randomly generated passenger numbers s id At this point, the number of driverless taxis is n = A. gen The passengers were a perfect match;
[0160] G complete chromosomes with genomic markers are formed by randomly selecting chromosomes from each genome and assembling them. The G complete chromosomes are deduplicated and genetically processed. After θ iterations, the optimal chromosome is selected as the matching result between the driverless taxi and the passenger.
[0161] In this invention, "population," "genome," "genome chromosome," and "complete chromosome" are four distinct terms. The complete chromosome is no longer part of the genome but belongs to the population. "Genome" and "genome chromosome" are custom-defined terms, and a genome chromosome can be considered a part of a complete chromosome. Each genome contains a part of a complete chromosome; these parts are pieced together to form a complete chromosome.
[0162] Step 5.3: Remove duplicates and repair intact chromosomes within the population;
[0163] Step 5.3.1: Remove duplicate chromosomes from the population, such as... Figure 2 As shown, the specific method is as follows:
[0164] Randomly assembling chromosomes from different genomes can lead to gene duplication in the complete chromosome, so a method for deduplication is proposed.
[0165] Step 5.3.1.1: Take the set S of passenger IDs from the chromosome. ID With vehicle number set D ID Locate the recurring passenger IDs in the chromosome and their corresponding genomes, and obtain the total set of passenger IDs within that genome and S. ID The difference set S DS The set of vehicle numbers and total vehicle numbers corresponding to duplicate passengers will be combined with D. ID The difference sets are summed into set D. DS Locate the recurring vehicle IDs in a chromosome and their corresponding genomes, then obtain the total set of vehicle IDs within that genome and the corresponding D. ID The difference set D DS The set of passenger IDs and total passenger IDs corresponding to duplicate vehicles are combined with S. ID The difference sets are summed into set S. DS ;
[0166] Step 5.3.1.2: Determine set S DS and D DS Is it an empty set? If it is, delete the gene from the chromosome; otherwise, add the set S. DS and D DS The elements in the graph are aggregated to form a bipartite graph. The Hungarian algorithm is used to find the gene that best matches the original gene and replace it in the original gene position.
[0167] Step 5.3.1.3: Determine whether all duplicate passenger and vehicle numbers have been replaced. If all have been replaced, end the operation; otherwise, repeat step 5.3.1.1.
[0168] Step 5.3.2: Repair the intact chromosome;
[0169] First, obtain the total vehicle and passenger ID sets, and then calculate the difference D between the total vehicle and passenger ID sets and the vehicle and passenger IDs in the chromosome. ds and S ds Then the difference set D ds and S dsThe data is compiled and a bipartite graph is formed. The Hungarian algorithm is used to obtain the best-matching gene. Finally, the best-matching gene is added to the tail of the current chromosome.
[0170] After chromosome deduplication and repair operations, the number of driverless taxis is n = min{A,B}, where A is the total number of passengers and B is the total number of driverless taxis.
[0171] Step 5.4: Determine the fitness function of complete chromosomes within the population;
[0172] Chromosome fitness γ is defined as follows:
[0173]
[0174] in, For economic benefits Cluster benefits with demand density Weighted sum;
[0175]
[0176] Where ρ is the mileage fee for driverless taxis; δ is the time fee; For t j Average vehicle speed during the time period It is t j The average speed of a vehicle between any two locations during a given time period is calculated using the formula... Obtain the average time required for a vehicle to travel between any two locations within each time period. Determined; ε is the fuel consumption index, and its relationship with vehicle speed satisfies formula (16); N is the geodesic distance between the passenger's departure point and destination, and E is the matching distance between the vehicle and the passenger, the value of which varies with the order of the sensing neighborhood (the 8 closest areas around the vehicle are the first-order sensing neighborhood, the 16 outermost areas are the second-order sensing neighborhood, and so on). It grows linearly, as shown in formula (17), where U is the geodetic distance between the vehicle's current location and the passenger's departure point;
[0177]
[0178]
[0179]
[0180] Where X is the demand density of driverless taxis in the drop-off area, and its value is the predicted demand value for driverless taxis; σ is the weighting coefficient; X represents the demand density of driverless taxis in the first-order sensing neighborhood of the drop-off area; avgτ represents the average global demand density during the time period in which the vehicle arrives at its destination; τ is the number of effective demand areas (i.e., areas with a demand greater than 0).
[0181] Step 5.5: Perform genetic operations on the complete chromosomes within the population to obtain the optimal matching results between driverless taxis and passengers;
[0182] Step 5.5.1: Select chromosomes within the population;
[0183] Chromosome selection was performed using a combination of roulette wheel selection and optimal chromosome preservation methods.
[0184] The probability of chromosome selection is shown in the following formula:
[0185]
[0186] Where, γ a Let G be the fitness of the a-th chromosome in the current population, and G be the population size.
[0187] Prioritize fitness The chromosomes are directly copied to the next generation without crossing over, and the remaining chromosomes... Chromosomes are selected for crossover using a roulette wheel selection method.
[0188] Step 5.5.2: Chromosome crossing over;
[0189] Crossover operations are performed under the condition that the crossover probability F = 0.9, such as... Figure 3 As shown, the specific process is as follows: First, generate a random number F between 0 and 1. rand When F is greater than F rand At that time, two intersection points are randomly generated after the passenger code bit. The area between the two intersection points is defined as the matching area. The matching areas of the two chromosomes are swapped using the position swap operation. The deduplication operation is performed, and chromosomes with fitness greater than the set value are retained and copied to the next generation. The deduplication and repair methods are the same as in step 5.3.
[0190] Step 5.5.3: Chromosomal aberration;
[0191] The mutation operation is performed under the condition that the mutation probability K = 0.8; the process is as follows:
[0192] Step 5.5.3.1: Determine if there are any vehicle IDs in the total vehicle ID set that do not have a matching passenger ID. If not, proceed directly to step 5.5.3.2; otherwise, aggregate the vehicle IDs that do not have a matching passenger ID into set D. DS traversing D DS For each vehicle number, perform the following operations;
[0193] ① Obtain the passenger set S of the unmatched vehicles in the genome of the vehicle IDs for which no matching passenger ID was found. ds ,like Traverse S ds The process continues until a passenger ID that matches the vehicle ID and increases the chromosome's fitness value is found. If no passenger ID that increases the chromosome's fitness value is found, the process continues until a passenger ID that matches the vehicle ID is found is inserted into the chromosome along with the passenger ID. Then proceed directly to step ②;
[0194] ② Traverse D DS Find the next element and repeat step ① until D. DS All elements in the array have been traversed;
[0195] Step 5.5.3.2: Obtain the vehicle set D in the chromosome. ID and passenger group S ID Determine if there are any vehicle IDs in the total vehicle ID set that do not match any passenger IDs, and if there are any passenger IDs in the total passenger ID set that do not match any vehicle IDs. Then, aggregate the vehicle IDs that do not match any passenger IDs into a set D. DS Passenger IDs for which no vehicle ID was matched are grouped into set S. DS And perform the following operations:
[0196] i. Determine D DS and S DS Is it empty? Traversing D DS Element D DSn Then proceed to step ii;
[0197] ii. Traverse D ID Element D IDm Determine D IDm The genome and D DSn If the genomes are the same, then iterate through D. ID For the next element, repeat step ii until D has been traversed. ID All elements in D, then iterate through D. DS Next element; otherwise, proceed to step iii;
[0198] iii. Chromosome exchange D DSn With D IDm Check if the chromosome fitness value increases. If the chromosome fitness value increases, then traverse set D. ID If the next element is not found, repeat step i; otherwise, update the chromosome and retrieve set D again. ID S ID D DS and S DS And repeat step i;
[0199] like Execution and D DS Same operation; when and Or D DS S DS When all elements in the middle have been traversed, proceed to step 5.5.3.3;
[0200] Step 5.5.3.3: Obtain the vehicle set D in the chromosome. ID and passenger group S ID ; Traverse set D ID Element D IDu and perform the following operations:
[0201] I. Determine the element D IDu Check if the genome of the next element is the same. If it is, proceed to step II; otherwise, traverse set D. ID The next element is encountered, until the entire set D has been traversed. ID All elements in D; when the element D IDu After all subsequent elements have been evaluated, traverse set D. ID The next element in;
[0202] II. Exchange D IDu With the next element D IDv Check if the chromosome fitness value increases. If it does not increase, then iterate through element D. IDv Find the next element and repeat operation I; otherwise, update the chromosome and retrieve set D again. ID With S ID And iterate through set D again. ID Element D IDu Perform operations I and II as described above.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A demand density prediction based intensive dispatching method for self-driving taxis, characterized in that: The method comprises the following steps: Step 1: dynamically aggregating the attributes of unmanned taxi demand in different demand frequencies and different time layers; Step 1.1: Dividing the demand of autonomous taxi into four time layers: the adjacent layer , the periodic layer , the near-trend layer , and the far-trend layer Step 1.2: dividing the unmanned taxi demand in each time layer into three perception domains according to the demand frequency; Divide an area into PxQ spatial grids, each grid has corresponding historical demand data of unmanned taxi, then record the historical demand data of unmanned taxi corresponding to four time layers as tensor , for representing four time layers, representing real number; then divide the demand of unmanned taxi in each time layer into three perception domains according to demand frequency, as shown in the following formula: (1); wherein, represents a time layer a corresponding gth perception domain, I is the demand for driverless taxis; and is a dynamically determined demand boundary; Step 1.3: designing a CELU network structure to capture the full-range spatio-temporal correlation of the unmanned taxi demand for the four time layers; The CELU network structure is composed of a convolution layer Conva, an L-layer residual unit and a convolution layer Convb, which can dynamically aggregate the attributes of the unmanned taxi demand in different demand frequencies and different time layers, and the specific method is as follows: (1) For the demand frequency in each time layer, the demand of different regions in the historical period is converted into a two-channel image-like matrix, and the initial feature extraction is performed through the convolution layer Conva, and the output result is recorded as As shown in the following formula: (2); wherein, , are the weights and biases of the convolutional layer Conva, respectively, for adjusting the importance of different temporal layers for the result prediction; denotes a convolution operator; (2) the feature mapping output by the convolution layer Conva is sent to l consecutive residual units, and the calculation result of each residual unit is as shown in the following formula: (3); wherein, is a residual function, is an input to the residual unit; denotes all the parameters to be learned in the l-th residual unit; The residual unit is a three-layer structure, wherein the first layer and the second layer are both a structure combination of a convolution layer Conv and an activation function ELU, and the third layer is superimposed on the basis of the second layer. (3) The output after the Lth residual unit is denoted as It is sent to the convolution layer Convb to unify the data specification, thereby obtaining an unmanned taxi demand output of a time layer, denoted as As shown in the following formula: (4); wherein, is an activation function; and are weights and biases of the convolution layer Convb, respectively. Step 2: extracting external features of the unmanned taxi demand; the external features include external environment features and interest point features; Step 2.1: extracting external environment features of the unmanned taxi demand; For each time period, a set of external environment feature vectors of demand for unmanned taxis is extracted, including weather , day of the week vector , , is an integer, weekday and holiday ; and the feature vectors of different time periods are spliced into a matrix form, denoted as , and the matrix is sent to a fully connected layer for feature extraction to obtain external environment features based on , , and , denoted as , as shown in the following formula: (5); wherein, denotes the multiplication of matrices, and represent the weight and bias of the external environment feature, respectively; Step 2.2: Use a convolutional neural network combined with fully connected layers to extract features of interest points for the demand of the self-driving taxi, to get the features of interest points based on interest points, denoted as as shown in the following formula: (6); wherein, and respectively represent the weight and bias of the point of interest feature, the values of which depend on the degree of influence of each point of interest on the demand for driverless taxis. Step 3: fusing the spatio-temporal features and the external features of the unmanned taxi demand, so that the two are collaboratively trained to obtain the prediction value of the unmanned taxi demand in different fields; Step 3.1: Using the fusion method based on the parameter matrix, the spatiotemporal information of the demand for unmanned taxis is mined from four different time layers to obtain the spatiotemporal characteristics of the demand for unmanned taxis in the period, denoted as as shown in the following formula: (7); The fusion here is divided into two parts, firstly, the fusion of three different demand frequency perception domains in each time layer, the obtained fusion vector is denoted as , and then the fusion between four time layers, the calculation formula is shown in equations (8) and (9): (8); (9); wherein, is a Hadamard product; , , Wi, W2, and W3represent the weight matrix of the three demand frequency perception domains, respectively; , , , Wi, W2, W3, and W4represent the weight matrix of the four time layers, respectively; is a bias; Step 3.2: Fuse the external environment features and the point of interest features to obtain the external features of the demand for the driverless taxi, denoted as As shown in equation (10): (10); wherein, , , are adjustable weight parameters; Step 3.3: fusing the spatio-temporal features and the external features of the unmanned taxi demand, so that the two are collaboratively trained to obtain the prediction value of the unmanned taxi demand in different fields; Two different fusion methods are used to fuse the spatio-temporal features and external features; the summation fusion method ( ) is used to represent the gradually changing demand, while the gating mechanism-based fusion method is used to fuse the sudden change in demand ( ); finally, the fused features are mapped to [-1, 1] through the Tanh function to obtain the prediction value of the demand for unmanned taxis, as shown in the following formula: (11); wherein, is a predicted value of demand for self-driving taxi at a time period, is a gating activation function sigmoid; Step 4: predicting the unmanned taxi demand from the time layer and the external features; Step 5: on the basis of the unmanned taxi demand predicted in step 4, a heuristic genetic algorithm is used to realize the matching of the unmanned taxi and the passengers. 2.The demand density prediction based on intensive dispatching method for driverless taxis according to claim 1, characterized in that: The specific method of step 4 is as follows: To minimize the mean squared error between the predicted matrix of demand for driverless taxis and the real matrix The optimal values of the weights and biases involved in the prediction of demand for driverless taxis are obtained as the objective function, and the demand is predicted from four time layers and external features. The objective function is shown in the following formula: (12); where, represents the objective function, W and b represent the set of all weights and biases involved in the demand prediction for the driverless taxi, respectively. 3.The demand density prediction based on intensive dispatching method for driverless taxis according to claim 2, characterized in that: The specific method of step 5 is as follows: Step 5.1: using a real number coding method to code the unmanned taxi and the passengers; Real number coding is used to represent the unmanned taxi and the passenger, i.e. wherein, is the unmanned taxi , is the passenger , represents the matching of the unmanned taxi and the passenger, and also represents a gene in a chromosome, n represents the number of unmanned taxis; Step 5.2: population initialization; The population is divided into C gene groups, and the number of gene groups C is dynamically determined according to the position of the unmanned taxi, each group includes u gene group chromosomes, and the value of u is given by formula (13); (13); wherein, is the number of passengers within the genome, is the number of driverless taxis within the genome; Within the genome, when the number of unmanned taxis is fixed , the passenger numbers are randomly generated without repetition At this time, the number of unmanned taxis , the vehicle is completely matched; when , the number of unmanned taxis is randomly selected , and the corresponding vehicle number is fixed , the passenger numbers are randomly generated without repetition At this time, the number of unmanned taxis , the passenger is completely matched; Randomly select a complete chromosome with genomic markers from each genome to form G bands, respectively, and perform de-duplication and genetic operations on the G-band complete chromosomes, which undergo The optimal chromosome is selected as the matching result of the unmanned taxi and the passenger after the secondary iteration. Step 5.3: removing and repairing the complete chromosomes in the population; Step 5.4: determining the fitness function of the complete chromosomes in the population; chromosome fitness is defined as shown in the following equation: (14); wherein, economic benefits with demand density cluster benefits weighted sum; (15); in, For driverless taxi mileage fees; For time-based fees; for Average vehicle speed during the time period yes The average speed of a vehicle between any two locations during a given time period is calculated using the formula... This yields the average time required for a vehicle to travel between any two locations within each time period. Certain; The fuel consumption index is related to vehicle speed according to formula (16); N is the geodesic distance between the passenger's departure point and destination, and E is the matching distance between the vehicle and the passenger, the value of which varies with the order of the sensing neighborhood. It exhibits linear growth, as shown in formula (17). The distance between the vehicle's current location and the passenger's departure point is measured in geodetic distance. (16); (17); (18); wherein, is the demand density of the autonomous taxi in the passenger drop-off area, and its value is the demand prediction value of the autonomous taxi; is the weight coefficient; is the first-order sensing neighborhood demand density of the autonomous taxi in the passenger drop-off area; is the global demand density average of the time period to which the vehicle belongs when it arrives at the destination; is the number of effective demand areas; Step 5.5: performing genetic operation on the complete chromosomes in the population to obtain the optimal matching result of the unmanned taxi and the passengers. 4.The demand density prediction based on intensive dispatching method for driverless taxis according to claim 3, characterized in that: The specific method of step 5.3 is as follows: Step 5.3.1: removing the complete chromosomes in the population; Step 5.3.1.1: Take the set of passenger numbers in the chromosome and the set of vehicle numbers in the chromosome , locate the passenger numbers that repeat in the chromosome and their corresponding genomes, obtain the difference set between the set of total passenger numbers in the genome and , and summarize the difference set of vehicle numbers corresponding to the repeated passengers and the set of total vehicle numbers and to obtain the set ; locate the vehicle numbers that repeat in the chromosome and their corresponding genomes, obtain the difference set between the set of total vehicle numbers in the genome and , and summarize the difference set of passenger numbers corresponding to the repeated vehicles and the set of total passenger numbers and to obtain the set ; Step 5.3.1.2: judging the set and is empty, the gene is deleted from the chromosome, otherwise, the elements in the set and are summarized to form a bipartite graph, and the optimal matching gene of the gene is obtained by the Hungarian algorithm, and is replaced in the original gene position; Step 5.3.1.3: judging whether the numbers of all repeated passengers and vehicles are completely replaced, and if so, ending the operation, otherwise, re-executing step 5.3.1.1; Step 5.3.2: repairing the complete chromosomes; First, the total number of vehicles and passengers is obtained, and the difference between the total number of vehicles and passengers and the number of vehicles and passengers in the chromosome is calculated and The difference set and is summarized and a bipartite graph is formed, the optimal matching gene is obtained by using the Hungarian algorithm, and finally the optimal matching gene is added to the tail of the current chromosome; chromosomes after de-duplication and repair operations A is the total number of passengers and B is the total number of autonomous taxis.
5. The method of claim 4, wherein: The specific method of step 5.5 is as follows: Step 5.5.1: selecting the chromosomes in the population; The chromosome selection is performed in combination of the roulette selection method and the best chromosome preservation method. Chromosome selection probability As shown in the following equation: (19); wherein, G is the fitness of the a-th chromosome in the current population, and G is the population size. Ranking the chromosomes by fitness The best chromosomes are directly copied to the next generation without crossover, the rest of the chromosomes are selected for crossover using roulette wheel selection. Step 5.5.2: Chromosome crossover; The crossover operation is performed under the condition of satisfying a crossover probability F = 0.9; first, a random number between 0 and 1 is generated When F is greater than , two crossover points are randomly generated after the passenger code bits, a matching region between the two crossover points is defined, a position exchange operation is used to exchange the matching regions of the two chromosomes, a de-duplication operation is performed, and chromosomes with a fitness greater than a set value are retained and copied to the next generation; Step 5.5.3: Chromosome mutation; The mutation operation is performed under the condition that the mutation probability K = 0.8 is met; the flow is as follows: Step 5.5.3.1: judging whether there is a vehicle number in the vehicle total number set which is not matched to a passenger number, if not, directly executing step 5.5.3.2; otherwise, collecting the vehicle numbers which are not matched to passenger numbers into a set , traversing each vehicle number in the set, executing the following operations; ① Obtain the passenger set of the unmatched vehicle in the genome where the vehicle number that does not match the passenger number is located , if , traverse the elements in until a passenger number that can make the chromosome fitness value increase is found, and insert the vehicle number and the passenger number into the chromosome; if there is no passenger number that can make the chromosome fitness value increase or , directly execute step ②; ii. traversing the next element in the list and performing step i again until all elements in the list have been traversed. Step 5.5.3.2: Acquire the vehicle set in the chromosome and the passenger set , determine whether there is a vehicle number in the total vehicle number set that is not matched to a passenger number, and whether there is a passenger number in the total passenger number set that is not matched to a vehicle number, collect the vehicle numbers not matched to the passenger numbers into a set , and collect the passenger numbers not matched to the vehicle numbers into a set ; and perform the following operations: i. Judgment and Is it empty? traversal medium elements Then proceed to step ii; ii. Traversal medium elements ,judge The genome and If the genomes are the same, then iterate through them. For the next element, repeat step ii until all elements have been traversed. Then iterate through all elements in the list. Next element; otherwise, proceed to step iii; iii. exchanging chromosomes with , checking if the chromosome fitness value is increased, if the chromosome fitness value is increased, iterating through the next element of the set, repeating step i; otherwise, updating the chromosome, reacquiring the set , , , and , and performing step i again; If , the same operation as is performed; when or , elements are all traversed, step 5.5.3.3 is performed; Step 5.5.3.3: Acquire the set of vehicles in the chromosome and the set of passengers ; iterate over the elements of the set and perform the following operations: I. Determine the element Check if the genome of the next element is the same. If it is, proceed to step II; otherwise, iterate through the set. The next element is encountered, until the entire collection has been traversed. All elements in; when the element After all subsequent elements have been evaluated, iterate through the set. The next element in; II. exchange with the next element of the chromosome , check if the chromosome fitness value is increased, if not, traverse the next element of the element and repeat the operation I; otherwise, update the chromosome, reacquire the set with and traverse the elements of the set again, perform the above operations I, II.