Shared bicycle dynamic scheduling method based on station demand prediction and user reward mechanism

Through clustered site selection and CNN-LSTM model, and combined with user reward mechanism, a dynamic scheduling model of shared bicycles is built, which solves the problem of unbalanced supply and demand of shared bicycle systems, and realizes efficient bicycle resource allocation and user participation, improving user satisfaction.

CN119831230AActive Publication Date: 2025-04-15KUNMING UNIV OF SCI & TECH +1

Patent Information

Application Number
CN202411879893.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-15
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The shared bicycle system has an imbalance in supply and demand within a specific time period, resulting in an oversupply of shared bicycles at some sites, while other sites have no cars available, affecting the timely satisfaction of users' travel needs.

Method used

The shared bicycle site is selected through clustering, and the CNN-LSTM neural network model is used to predict the borrowing/returning needs of users at different sites at different times. Combined with the user reward mechanism, a dynamic scheduling model of shared bicycles is constructed, and the objective function is solved using greedy algorithms to obtain the best scheduling path to reasonably and efficiently plan the scheduling route of the scheduling truck.

Benefits of technology

It effectively solved the problem of unbalanced supply and demand of shared bicycles, improved the scientificity and efficiency of bicycle resource allocation, reduced operating costs, encouraged users to participate in scheduling, and improved user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831230A_ABST
    Figure CN119831230A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of traffic system prediction and intelligent scheduling, and discloses a shared bicycle dynamic scheduling method based on station demand prediction and a user reward mechanism. The method comprises the following steps: based on travel data of shared bicycles, clustering shared bicycle stations in combination with a DBSCAN clustering algorithm and a K-Means clustering algorithm, and predicting the future demand quantity of each station by adopting a CNN-LSTM neural network; building a shared bicycle dynamic scheduling model based on demand prediction and a user reward mechanism by comprehensively considering the fixed cost and the transportation cost of the scheduled bicycle, the enterprise rebate cost under the user reward mechanism and the punishment cost deviating from the expected inventory; and solving the model through a greedy algorithm, dynamically updating the bicycle data of the shared bicycle station and predicting the future demand of the station, optimizing a dynamic path in real time, and solving an optimal scheme of the minimum total scheduling cost. Therefore, the scheduling path planning problem of the shared bicycles can be effectively solved, and the scheduling efficiency and the overall performance of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic system prediction and intelligent scheduling, and in particular relates to a shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism. Background Art

[0002] With the continuous development of the concept of sharing economy, shared bicycles, as a new urban travel mode, have played an important role in solving the travel problems of the "first kilometer" and "last kilometer", and have been widely favored by users in recent years. However, the asymmetry of user demand in time and space has led to an imbalance in supply and demand in the shared bicycle system within a specific time period. Specifically, there is an oversupply of shared bicycles at some stations, while there are no bicycles available at other stations, which affects the timely satisfaction of users' travel needs.

[0003] In order to deal with the imbalance between supply and demand of shared bicycles, scheduling is usually used to alleviate it. Existing scheduling strategies include dynamic scheduling and static scheduling. Static scheduling usually builds a scheduling model based on historical data for one-time scheduling planning. In static scheduling, the real-time changes in station demand and the number of bicycles are not considered and remain unchanged throughout the scheduling process. Dynamic scheduling is based on real-time data and continuously optimizes the scheduling plan according to the current real-time status. The dynamic scheduling strategy can be adjusted according to the current situation and can respond to changes in user needs in real time, providing a more flexible solution.

[0004] Most of the existing dispatching strategies focus on the operators using dispatching vehicles to redistribute shared bicycles, and rarely consider the potential participation of users in the dispatching process. In fact, by encouraging users to actively participate in the dispatching tasks of shared bicycles, it can not only reduce the dispatching pressure of operators, but also reduce dispatching costs and environmental pollution. Therefore, how to achieve scientific and efficient shared bicycle dispatching, optimize bicycle resource allocation, reduce operating costs, encourage users to participate in dispatching and improve user satisfaction has become a key issue to be solved. Summary of the invention

[0005] The main purpose of the present invention is to select the location of shared bicycle stations through clustering and predict the user borrowing / returning needs at different stations at different times. It considers issuing red envelope rewards to users to encourage them to participate in scheduling, and finally designs a scheduling plan to reasonably and efficiently plan the scheduling routes of scheduling trucks, thereby solving the technical problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides a shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism, comprising the following steps:

[0007] S1: Extract the OD data of shared bicycle users’ travel;

[0008] S2: Combine the DBSCAN clustering algorithm and the K-Means clustering algorithm to evaluate the shared bicycle travel OD data, and then cluster the data after determining the optimal number of clusters based on the evaluation result indicators to divide the shared bicycle dispatching stations;

[0009] S3: Use the constructed CNN-LSTM neural network model to predict the future demand for different shared bicycle dispatching stations;

[0010] S4: A dynamic scheduling model for shared bicycles is constructed based on demand forecasting and user reward mechanism. A greedy algorithm is used to solve the objective function and obtain the optimal scheduling path. The optimal scheduling path is used to guide the scheduling vehicles to dynamically schedule shared bicycles in different areas.

[0011] More specifically, the above S2 combines the DBSCAN clustering algorithm and the K-Means clustering algorithm to cluster the shared bicycle travel OD data, including:

[0012] S2.1: Preprocess the shared bicycle travel OD data and remove abnormal data and null value data;

[0013] S2.2: Use the DBSCAN clustering algorithm to cluster the shared bicycle travel OD data, adjust the parameters of the DBSCAN clustering algorithm according to the evaluation index of the silhouette coefficient S(i), determine the parameter radius parameter ε and the minimum sample parameter minPts, and estimate the approximate cluster number interval of the shared bicycle OD points;

[0014] S2.3: Calculate the silhouette coefficient S(i) and the average distortion Evaluate the clustering effect of the K-Means clustering algorithm;

[0015] The calculation formula of silhouette coefficient S(i) is as follows:

[0016]

[0017] Where a(i) represents the closeness between sample i and other samples in its cluster, which is calculated as the average distance between sample i and other samples; b(i) represents the separation between sample i and its nearest cluster, which is calculated as the average distance between sample i and all samples in its nearest cluster;

[0018] Average distortion The calculation formula is as follows:

[0019]

[0020] where k is the number of clusters, C kis the set of all data points in the ith cluster, u i represents the cluster center of the i-th cluster, x i Represents the data point of the i-th cluster.

[0021] More specifically, the optimal number of clusters is determined based on the evaluation result indicators, and clustering is performed to divide the shared bicycle dispatching stations into:

[0022] S2.4: The cluster number interval of the shared bicycle OD points determined by S2.2 is used as the reference cluster number range of S2.3, and the number of clusters corresponding to the maximum value of the silhouette coefficient S(i) and the average distortion degree are calculated. The optimal number of clusters k is determined by the “elbow point” that decreases rapidly and approaches a gentle level;

[0023] S2.5: Use the K-Means clustering algorithm to cluster the shared bicycle travel OD data, and the obtained cluster center coordinates are used as the shared bicycle dispatch station coordinates.

[0024] Furthermore, the K-Means clustering algorithm is used to cluster the shared bicycle travel OD data, including:

[0025] S2.5.1: Randomly select K data points as the initial cluster centers μ1,μ2,…,μ K ;

[0026] S2.5.2: For each shared bicycle trip OD data coordinate x j , calculate its difference with all cluster centers μ i The Euclidean distance of:

[0027]

[0028] Where: x j is the OD data coordinate of shared bicycle travel, μ i are the cluster center coordinates, D is the data dimension, in this problem D = 2;

[0029] Point x j Assign to the nearest cluster center

[0030] S2.5.3: For each cluster C i , recalculate the cluster centers Where: |C i | is cluster C i The number of midpoints; x j It is cluster C i The point in

[0031] S2.5.4: Repeat SS2.5.2 and S2.5.3 until the cluster center μ is satisfied. iNo longer changes or the cluster assignment of data points no longer changes, output the cluster centers μ1,μ2,…,μ K .

[0032] Furthermore, the constructed CNN-LSTM neural network model is used to predict different shared bicycle dispatching stations, including:

[0033] S3.1: Standardize the shared bicycle OD data to [0,1], divide the stations into a two-dimensional matrix, and construct a time series dataset, which includes a training set, a validation set, and a test set;

[0034] S3.2: Input time series data, i.e., the OD travel volume of shared bicycles, with a shape of [N, T, H, W], where: N is the number of samples, T is the length of the time series, H and W are the spatial distributions, and the predicted value shape for future OD data is [N, T′, H, W], where T′ is the predicted time step;

[0035] For each time step of OD data X t Perform convolution operation in: is the output feature of the kth convolution kernel, W (k) is the convolution kernel parameter, * is the two-dimensional convolution operation; σ is the activation function;

[0036] Downsample the convolution output to reduce the dimension P of the feature map t = pooling(Z t ), and perform pooling operation P on the pooling layer i,j =max{Z m,n |(m,n)∈window(i,j)}, where window(i,j) is the pooling window;

[0037] The pooled output P of each time step t Stacked by time dimension to form a time series input P = [P1, P2, ..., P n ];

[0038] S3.3: Input LSTM to sequence P and update hidden state: input gate i t =σ(W i ·[h t-1 , P t ]+b i ); forget gate f t =σ(W f ·[h t-1 , P t ]+b f ); candidate memory unit Update memory unit Output gate: ot =σ(W o ·[h t-1 , P t ]+b o ); hidden state h t =o t ⊙tanh(C t );

[0039] The final output of LSTM is the time series feature H = [h1, h2, ..., h T ], used to predict future OD data;

[0040] S3.4: Input the LSTM output H into the fully connected layer and map it to the target OD data in is the predicted value, W h , b h are the weight and bias of the fully connected layer respectively;

[0041] S3.5: Train the CNN-LSTM neural network model and use mean square error as the loss function Update parameters using Adam optimizer Where θ is the model parameter; η is the learning rate;

[0042] Hyperparameters adjust the relevant parameters of the CNN layer and LSTM, as well as the time series length T and the prediction step length T′;

[0043] S3.6: Input the test data set and predict future OD data The mean square error (MSE), mean absolute error (MAE) and coefficient of determination (R 2 ) to evaluate the model performance.

[0044] Furthermore, the shared bicycle dispatching model is constructed based on demand forecasting and user reward mechanism, including:

[0045] S4.1: In the shared bicycle dispatching with user participation, it is necessary to reward users who park the shared bicycle at the demand station and then walk to the destination. The variable considered is the user's walking distance. The user reward model y=0.184+0.004x is constructed, where y is the reward amount and x is the walking distance from the demand station to the user's destination;

[0046] S4.2: Taking the operator's cost minimization as the optimization goal and considering the penalty cost of deviation from the expected inventory, the shared bicycle dynamic scheduling model based on demand forecasting and user reward mechanism is composed of the objective function expressed by the following formula (4) to formula (7) and the constraints expressed by formula (8) to formula (21):

[0047]

[0048] The meaning of each parameter is as follows:

[0049] V: site set V = {1, ..., n};

[0050] V0: the set of sites and dispatch centers V0 = {0, 1, ..., n};

[0051] K: dispatch vehicle set K = {1, 2..., m};

[0052] O: user departure set O = {1, 2, ..., q};

[0053] D: User purpose set D = {1, 2, ..., q};

[0054] i: dispatching site, i∈V;

[0055] p: user OD site, p∈O,D;

[0056] V i : the i-th scheduling site;

[0057] d ij : The distance from site i to site j;

[0058] x ijk : Whether vehicle k goes from node i to node j, if yes then x ijk =1, otherwise 0;

[0059] α1: Transportation cost incurred by dispatching vehicles during transportation;

[0060] α2: Fixed cost of enabling dispatch vehicles;

[0061] c: constant;

[0062] k′: red envelope reward coefficient;

[0063] r ip : Whether the user parks the shared bicycle at station i and walks to destination p, if yes, then r ip =1, otherwise 0;

[0064] d ip : The walking distance of the user from station i to destination p;

[0065] P i : The penalty coefficient for site i to deviate from the expectation;

[0066] E i : Expected demand number of site i;

[0067] Ii : Inventory quantity before transfer at site i;

[0068] m i : The number of shared bicycles dispatched to or from station i. If the vehicle is dispatched in, then m i >0, call out then m i <0;

[0069] t ik : The time when vehicle k starts scheduling to station i;

[0070] a i : left time window of station i;

[0071] b i : right time window of station i;

[0072] S ik : The service time of the dispatched vehicle at station i. If vehicle k does not serve station i, then S ik =0;

[0073] t ij : The travel time of the dispatched vehicle from station i to station j;

[0074] y i : The number of shared bicycles loaded when the dispatch vehicle arrives at station i;

[0075] y′ i : The number of shared bicycles loaded when the dispatch vehicle leaves station i;

[0076] U i : The number of red envelope vehicles transferred into station i;

[0077] Q: The maximum number of bicycles that each dispatch vehicle can carry;

[0078] S i : The time it takes to load and unload a shared bicycle.

[0079] S4.3: Input the relevant parameters of S4.2 into the greedy algorithm, define the shared bicycle scheduling problem and initialize the vehicles and time windows;

[0080] The calculation to obtain the best scheduling path is as follows:

[0081] At each step, the station closest to the current distribution point is selected under the conditions of time window and capacity constraints; when a vehicle arrives at a distribution point, the available time window (a i ,b i ), whose available time window is adjusted according to actual traffic conditions or delays, while updating the real-time inventory and future demand of each shared bicycle station, and adjusting the delivery order according to the urgency or demand priority of different stations;

[0082] If the vehicle arrives at a delivery point earlier than the scheduled time window, it can choose to wait;

[0083] If a vehicle does not arrive at a delivery point earlier than the scheduled time window, there are potential fines or costs to consider;

[0084] Each time the optimal next delivery point is selected, the path is added to the current vehicle's route, and it is iterated until all deliveries are completed to obtain the optimal scheduling path. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 A flow chart of the shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism of the present invention;

[0086] Figure 2 is the silhouette coefficient and average distortion degree of the K-Means clustering of the present invention;

[0087] Figure 3 It is the K-Means clustering site visualization result of the present invention;

[0088] Figure 4 The CNN-LSTM neural network site demand prediction result of the present invention;

[0089] Figure 5 It is the dispatching vehicle delivery path and user travel path of the present invention. DETAILED DESCRIPTION

[0090] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the examples described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0091] like Figure 1 As shown, the embodiment of the present invention provides a shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism, comprising the following steps:

[0092] S1: Extract the OD data of shared bicycle users’ travel;

[0093] S2: Combine the DBSCAN clustering algorithm and the K-Means clustering algorithm to evaluate the shared bicycle travel OD data. After determining the optimal number of clusters based on the evaluation result indicators, clustering is performed to divide the shared bicycle dispatching stations.

[0094] S3: Use the constructed CNN-LSTM neural network model to predict the future demand for bicycles at different shared bicycle stations;

[0095] S4: Build a shared bicycle scheduling model based on the user reward mechanism, use the greedy algorithm to solve the objective function, and obtain the optimal scheduling path.

[0096] The optimal dispatching path is used to guide the dispatching vehicles, that is, to dynamically dispatch shared bicycles in different areas.

[0097] For the above S1: extracting the shared bicycle user travel OD data, wherein the shared bicycle travel OD data includes: bicycle number, start time, start position horizontal coordinate, start position vertical coordinate, end time, end position horizontal coordinate and end position vertical coordinate;

[0098] For example, Table 1 below lists the travel OD data of shared bicycle users in a certain area;

[0099] Table 1: OD data of shared bicycle users in a certain area

[0100]

[0101]

[0102] Wherein, bike_id represents the ID number of the shared bike that the user rides, start_time represents the time when the user starts riding, start_location_x represents the horizontal coordinate of the user's starting position, start_location_y represents the vertical coordinate of the user's starting position, end_time represents the time when the user ends riding, end_location_x represents the horizontal coordinate of the user's ending position, and end_location_y represents the vertical coordinate of the user's ending position;

[0103] For the above S2: combining the DBSCAN clustering algorithm and the K-Means clustering algorithm to cluster and evaluate the shared bicycle travel OD data, the following steps are included:

[0104] S2.1: Clean the shared bicycle user travel OD data, remove outlier data such as long riding time, null value data, and data beyond the research scope, and slice the processed shared bicycle user travel OD data in hours to provide a data basis for the shared bicycle station demand forecast in S below;

[0105] S2.2: For the problem of shared bicycle station location selection, the K-Means clustering algorithm is a classic unsupervised learning algorithm used to divide data points into different clusters. It divides data points into K clusters so that each data point belongs to the center of the cluster closest to it, and the sum of the distances between all data points and the center of their cluster (such as Euclidean distance) is minimized. However, the K-Means clustering algorithm requires the number of clusters K to be specified in advance, while the DBSCAN algorithm automatically determines the number of clusters based on the density of the data because it identifies clusters based on the principle of density connection;

[0106] Therefore, when clustering shared bicycle stations, the present invention combines the K-Means clustering algorithm with the DBSCAN algorithm. The DBSCAN algorithm is first used to determine the number of core points and clusters in the shared bicycle travel location data, and then the result is used as the initial point or cluster center of K-Means, avoiding the limitation that K-Means needs to specify K in advance; in addition, K-Means can provide a better initial cluster center, and DBSCAN can adjust the cluster boundary through density information, thereby improving the accuracy and robustness of clustering as a whole;

[0107] The DBSCAN clustering algorithm is used to cluster the shared bicycle travel OD data. The DBSCAN clustering algorithm is adjusted according to the evaluation index of the silhouette coefficient S(i). After determining the parameter radius parameter ε and the minimum sample parameter minPts, the approximate cluster number interval of the shared bicycle OD points is estimated; the silhouette coefficient S(i) is calculated as follows:

[0108]

[0109] Where a(i) represents the closeness between sample i and other samples in its cluster, which is calculated as the average distance between sample i and other samples; b(i) represents the separation between sample i and its nearest cluster, which is calculated as the average distance between sample i and all samples in its nearest cluster;

[0110] S2.3: Calculate the silhouette coefficient S(i) and the average distortion Evaluate the clustering effect of the K-Means clustering algorithm; average distortion degree The calculation formula is as follows:

[0111]

[0112] where k is the number of clusters, C k is the set of all data points in the ith cluster, u i represents the cluster center of the i-th cluster, x i Represents the data point of the i-th cluster.

[0113] For the above S2: after determining the optimal number of clusters according to the evaluation result indicators, clustering is performed to divide the shared bicycle dispatching stations, including the following steps:

[0114] S2.4: The cluster number interval of the shared bicycle OD points determined by S2.2 is used as the reference cluster number range of S2.3, and the number of clusters corresponding to the maximum value of the silhouette coefficient S(i) and the average distortion degree are calculated. The optimal number of clusters k is determined by the “elbow point” that decreases rapidly and approaches a gentle level.

[0115] The average distortion curve usually presents a shape similar to an "elbow". The point where the average distortion decreases rapidly and approaches a flattened state is called the "elbow point". When selecting the optimal number of clusters, the "elbow point" is usually sought as the optimal number of clusters, because it indicates that increasing the number of clusters after this point will not bring about a significant reduction in the average distortion, so it can be regarded as the optimal number of clusters.

[0116] In this embodiment, the processed shared bicycle travel OD data is clustered using the DBSCAN clustering algorithm to cluster the horizontal and vertical coordinates of the shared bicycle travel points. In the parameter setting, the radius parameter ε is set to 0.1, the minimum sample parameter minPts is set to 0.5, the noise points are ignored, and the number of clusters is counted as 43. Then, the travel data is clustered in the K-Means clustering. The parameter adjustment process of the K-Means clustering is as follows: Figure 2 As shown in the figure, it can be found that the silhouette coefficient is the largest when the k value is 39, and the average distortion degree tends to be flat after the k value is 39, so the number of clusters of K-Means clustering is determined to be 39.

[0117] S2.5: Use the K-Means clustering algorithm to cluster the shared bicycle travel OD data, and the obtained cluster center coordinates are used as the shared bicycle dispatch station coordinates.

[0118] For the above S2.5: clustering the shared bicycle travel OD data using the K-Means clustering algorithm, the following steps are included:

[0119] S2.5.1: Randomly select K data points as the initial cluster centers μ1, μ2, ..., μ K , in this embodiment, K is 39;

[0120] S2.5.2: For each shared bicycle trip OD data coordinate x j , calculate its difference with all cluster centers μ i The Euclidean distance of:

[0121]

[0122] Where: x jμ is the OD data coordinate of shared bicycle travel; i are the cluster center coordinates; D is the data dimension, in this problem D = 2;

[0123] Point x j Assign to the nearest cluster center

[0124] S2.5.3: For each cluster C i , recalculate the cluster centers Where: |C i | is cluster C i The number of midpoints; x j It is cluster C i The point in

[0125] S2.5.4: Repeat SS2.5.2 and S2.5.3 until the cluster center μi no longer changes or the cluster assignment of the data point no longer changes, and output the cluster center μ1, μ2, ..., μ K .

[0126] In this embodiment, after completing the above S2.5.1 to S2.5.4, the following is obtained: Figure 2 The K-Means clustering result of the shared bicycle travel OD data is shown, and the cluster center coordinates μ1, μ2, ..., μ K Export and match the travel data in the dataset, and add cluster station labels to each travel data to facilitate the subsequent demand forecasting process;

[0127] For S3 above: In predicting the future bicycle demand of different shared bicycle stations using the constructed CNN-LSTM neural network model, the following steps are included:

[0128] S3.1: Standardize the shared bicycle OD data to [0, 1], divide the stations into a two-dimensional matrix, and construct a time series data set, where the time series data set includes a training set, a validation set, and a test set. The ratio of the training set, validation set, and test set is 7:2:1;

[0129] S3.2: Input time series data, i.e., the OD travel volume of shared bicycles, in the shape of [N, T, H, W], where: N is the number of samples. When predicting the demand volume for each station, the number of samples is the number of shared bicycle OD points belonging to the station; T is the length of the time series, which is one hour in this embodiment; H and W are the spatial distribution, H is the station ID, and W is a plurality of features of each station at each time step, including the station coordinates, the number of station demands within the time period, and the time; the predicted value shape for future OD data is [N, T′, H, W], where T′ is the predicted time step;

[0130] For each time step of OD data X t Perform convolution operation in: is the output feature of the kth convolution kernel; W (k) is the convolution kernel parameter; * is the two-dimensional convolution operation; σ is the activation function;

[0131] Downsample the convolution output to reduce the dimension P of the feature map t = pooling(Z t ), and perform pooling operation P on the pooling layer i,j =max{Z m,n |(m,n)∈window(i,j)}, where window(i,j) is the pooling window;

[0132] The pooled output P of each time step t Stacked by time dimension to form a time series input P = [P1, P2, ..., P n ];

[0133] S3.3: Input LSTM to sequence P and update hidden state: input gate i t =σ(W i ·[h t-1 , P t ]+b i ); forget gate f t =σ(W f ·[h t-1 , P t ]+b f ); candidate memory unit Update memory unit Output gate: o t =σ(W o ·[h t-1 , P t ]+b o ); hidden state h t =o t ⊙tanh(C t );

[0134] The final output of LSTM is the time series feature H = [h1, h2, ..., h T ], used to predict future OD data;

[0135] S3.4: Input the LSTM output H into the fully connected layer and map it to the target OD data in is the predicted value; W h , b hare the weight and bias of the fully connected layer respectively;

[0136] S3.5: Train the model and use mean square error as the loss function Update parameters using Adam optimizer Where θ is the model parameter; η is the learning rate;

[0137] Hyperparameters adjust the relevant parameters of the CNN layer and LSTM, as well as the time series length T and the prediction step length T′;

[0138] S3.6: Input the test data set and predict future OD data The mean square error (MSE), mean absolute error (MAE) and coefficient of determination (R 2 ) to evaluate the model performance.

[0139] Through the above technical solution, we can obtain Figure 3 K-Means clustering site visualization results are shown.

[0140] In this embodiment, the model evaluation effect of the CNN-LSTM neural network model is shown in Table 2, and the site demand prediction result of the CNN-LSTM neural network is shown in Table 2. Figure 4 As shown;

[0141] Table 2: Model evaluation results of CNN-LSTM neural network model

[0142]

[0143] From the data in Table 2 and Figure 4 The prediction result chart shows that the deviation between the model's predicted value and the true value is small and the error distribution is relatively concentrated. The MSE and RMSE of the test set have increased accordingly, which shows that the model's prediction error on unseen data has increased, which is a direct reflection of the model's generalization ability. The MAPE value is relatively low, and the model's prediction accuracy is high. 2 The coefficient of 0.933 indicates that the model can still effectively capture most of the variability in the test data and has good generalization performance.

[0144] In this embodiment, for the demand forecast of the dispatching station, the shared bicycle travel data from 7:00 to 8:00 on August 1st is extracted as the basic data for the dispatching route planning. Through the station demand forecast in the upper part, it is concluded that there will be a large travel demand at station 1, station 15, station 17, station 23, station 32, and station 36 from 8:00 to 9:00. The forecast demand of each dispatching station in this time period is shown in Table 3;

[0145] Table 3: Forecast demand for each dispatching station

[0146]

[0147]

[0148] For the above S4: Building a shared bicycle dispatching model based on demand forecasting and user reward mechanism, the following steps are included:

[0149] In the shared bicycle scheduling problem, the demand for each station is not fixed, but changes with time, and is also related to the time when the shared bicycle arrives at the station. Therefore, the shared bicycle scheduling problem studied in this invention is a dynamic scheduling problem; in addition, this invention considers the mechanism of user rewards, and by issuing a certain amount of reward to users, users are encouraged to park shared bicycles at demand stations closer to their destinations, thereby encouraging users to participate in scheduling tasks and alleviating regional scheduling pressure;

[0150] S4.1: In the shared bicycle dispatching with user participation, it is necessary to reward users who park the shared bicycle at the demand station and then walk to the destination. The variable considered is the user's walking distance. The user reward model y=0.184+0.004x is constructed, where y is the reward amount and x is the walking distance from the demand station to the user's destination;

[0151] Based on the above description of the shared bicycle scheduling problem with the user reward mechanism, the following necessary assumptions are made for the model:

[0152] (1) There is only one dispatch center for a dispatch area;

[0153] (2) Each dispatch vehicle is homogeneous, that is, the dispatch vehicle's dispatch fee, capacity limit, and transportation cost per unit distance are the same;

[0154] (3) The number of dispatch vehicles in the dispatch center can meet the dispatch tasks within the dispatch area;

[0155] (4) The dispatch vehicle departs from the dispatch center and must return to the dispatch center after completing the dispatch task;

[0156] (5) The locations of the dispatch center and the stations are known, and the distances between the dispatch center and each station and between each station are fixed. The Euclidean distance is used as the distance between two points.

[0157] (6) The demand and time window of each station are known;

[0158] (7) A station can only be served by one dispatch vehicle once, and the service time depends on the number of shared bicycles that need to be loaded and unloaded at the station;

[0159] (8) Each station can only have the demand to load or unload a bicycle within a time window, but not both at the same time.

[0160] S4.2: With the optimization goal of minimizing the operator's cost and taking into account the penalty cost of deviation from the expected inventory, the shared bicycle dynamic scheduling model based on demand forecasting and user reward mechanism is composed of the following objective function expressed as formula (4) to formula (7) and its constraint conditions expressed as formula (8) to formula (21):

[0161]

[0162]

[0163] The meaning of each parameter is as follows:

[0164] V: site set V = {1, ..., n};

[0165] V0: the set of sites and dispatch centers V0 = {0, 1, ..., n};

[0166] K: dispatch vehicle set K = {1, 2..., m};

[0167] O: user departure set O = {1, 2, ..., q};

[0168] D: User purpose set D = {1, 2, ..., q};

[0169] i: dispatching site, i∈V;

[0170] p: user OD site, p∈O,D;

[0171] V i : the i-th scheduling site;

[0172] d ij : The distance from site i to site j;

[0173] x ijk : Whether vehicle k goes from node i to node j, if yes then x ijk =1, otherwise 0;

[0174] α1: Transportation cost incurred by dispatching vehicles during transportation;

[0175] α2: Fixed cost of enabling dispatch vehicles;

[0176] c: constant;

[0177] k′: red envelope reward coefficient;

[0178] r ip : Whether the user parks the shared bicycle at station i and walks to destination p, if yes, then r ip =1, otherwise 0;

[0179] d ip : The walking distance of the user from station i to destination p;

[0180] P i : The penalty coefficient for site i to deviate from the expectation;

[0181] E i : Expected demand number of site i;

[0182] I i : Inventory quantity before transfer at site i;

[0183] m i : The number of shared bicycles dispatched to or from station i. If the vehicle is dispatched in, then m i >0, call out then m i <0;

[0184] t ik : The time when vehicle k starts scheduling to station i;

[0185] a i : left time window of station i;

[0186] b i : right time window of station i;

[0187] S ik : The service time of the dispatched vehicle at station i. If vehicle k does not serve station i, then S ik =0;

[0188] t ij : The travel time of the dispatched vehicle from station i to station j;

[0189] y i : The number of shared bicycles loaded when the dispatch vehicle arrives at station i;

[0190] y′ i : The number of shared bicycles loaded when the dispatch vehicle leaves station i;

[0191] U i : The number of red envelope vehicles transferred into station i;

[0192] Q: The maximum number of bicycles that each dispatch vehicle can carry;

[0193] S i : The time it takes to load and unload a shared bicycle.

[0194] Constraint (8) indicates that each vehicle will eventually return to the dispatch center after completing all dispatch tasks from the dispatch center;

[0195] Constraints (9) and (10) indicate that the number of dispatched vehicles departing from and returning to the dispatch center is greater than 0;

[0196] Constraints (11)(12) indicate that each station is served by only one dispatch vehicle;

[0197] Constraint (13) represents the continuity of the path, ensuring that the dispatched vehicle will leave the station after entering the station and completing the dispatch task;

[0198] Constraint (14) means that the dispatched vehicle arrives within the time window of the station;

[0199] Constraint (15) indicates that the time for the dispatched vehicle to arrive at the next station is greater than or equal to the sum of the arrival time at the previous station, the service time and the travel time between the two stations;

[0200] Constraint (16) indicates that the number of shared bicycles loaded by the dispatch vehicle when it leaves the station is equal to the sum of the number of shared bicycles loaded by the dispatch vehicle when it arrives at the station and the number of shared bicycles serving the station;

[0201] Constraint (17) indicates that the number of bicycles that the dispatching vehicle needs to dispatch at the station is equal to the expected demand of the station minus the bicycle inventory of the station before dispatch minus the number of vehicles dispatched to the station by users through red envelope vehicles;

[0202] Constraint (18) indicates that the number of vehicles dispatched at the station must not be greater than the maximum load of the dispatched vehicles;

[0203] Constraint (19) indicates that the number of shared bicycles loaded by the dispatch vehicle when it leaves the station after completing the dispatch task at the station shall not be greater than the maximum loading capacity of the dispatch vehicle;

[0204] Constraint (20) indicates that the station service time is determined by the number of shared bikes served;

[0205] Constraint (21) represents constraints on decision variables;

[0206] S4.3: Input the relevant parameters of S4.2 into the greedy algorithm, define the shared bicycle scheduling problem and initialize the vehicles and time windows;

[0207] At each step, the station i closest to the current distribution point is selected under the conditions of time window and capacity constraints; when a vehicle arrives at a distribution point, the available time window (a i ,b i), whose available time window is adjusted according to actual traffic conditions or delays, and the real-time inventory and future demand of each shared bicycle station are updated at the same time, and the delivery order is adjusted according to the urgency or demand priority of different stations; if the vehicle arrives at a delivery point earlier than the scheduled time window, it can choose to wait; if it is late, it needs to consider possible fines or costs;

[0208] Each time the optimal next delivery point is selected, the path is added to the current vehicle's route, and it is iterated until all deliveries are completed to obtain the optimal scheduling path.

[0209] In summary, the dynamic scheduling model of shared bicycles based on demand forecasting and user reward mechanism has been built. After obtaining the scheduling requirements of the shared bicycle scheduling station from S3, the station-related parameters and scheduling vehicle parameters are substituted into the mathematical model to obtain the corresponding scheduling route planning scheme and cost;

[0210] like Figure 5 The figure shows the dispatch vehicle scheduling strategy based on demand forecasting and user reward mechanism based on the above example. In the parameter setting, the carrying capacity of each dispatch vehicle is 50 vehicles, the red envelope reward coefficient is 0.004, the reward constant is 0.184, the fixed cost of enabling the dispatch vehicle is 50 yuan / vehicle, and the driving cost generated by the dispatch is 1 yuan per kilometer;

[0211] The greedy algorithm is used to solve the objective function to obtain the optimal dispatch path for the shared bicycle dispatch vehicle. Figure 5 As shown in the figure, the results show that a total of 9 dispatch vehicles were dispatched from the dispatch center. Since there is only one dispatch center and the dispatch range is large, the total mileage of the dispatch vehicles is 506.76km. The dispatch vehicles meet the needs of the stations within the given time window, and there are no unserved vehicles and stations. Dispatch vehicle 1 serves the most stations, serving a total of 10 stations; dispatch vehicle 9 serves the least stations, serving only one station. By zooming in on a specific dispatch area, it can be seen that users also participate in the dispatch process for demand stations, which improves the overall dispatch efficiency. Based on the station demand prediction and user reward mechanism, this paper constructs a dynamic dispatch model for shared bicycles, which can effectively solve the road planning problem of dispatch vehicles.

[0212] Obviously, it should be noted that the above are only preferred embodiments of the present invention, and the patent protection scope of the present invention is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism, characterized in that: The following steps are involved: S1: Extract the OD data of shared bicycle users’ travel; The shared bicycle travel OD data includes: bicycle number, start time, start position horizontal coordinate, start position vertical coordinate, end time, end position horizontal coordinate and end position vertical coordinate; S2: Combine the DBSCAN clustering algorithm and the K-Means clustering algorithm to evaluate the shared bicycle travel OD data. After determining the optimal number of clusters based on the evaluation result indicators, clustering is performed to divide the shared bicycle dispatching stations. S3: Use the constructed CNN-LSTM neural network model to predict the future demand for different shared bicycle dispatching stations; S4: A dynamic scheduling model for shared bicycles is constructed based on demand forecasting and user reward mechanism. The objective function is solved using a greedy algorithm, and the optimal scheduling path is updated in real time. The optimal scheduling path is used to guide the scheduling vehicles to dynamically schedule shared bicycles in different areas.

2. The method for dynamic scheduling of shared bicycles based on site demand prediction and user reward mechanism according to claim 1 is characterized in that: In S2, the DBSCAN clustering algorithm and the K-Means clustering algorithm are combined to cluster the shared bicycle travel OD data, including: S2.1: Preprocess the shared bicycle travel OD data and remove abnormal data and null value data; S2.2: Use the DBSCAN clustering algorithm to cluster the shared bicycle travel OD data, adjust the parameters of the DBSCAN clustering algorithm according to the evaluation index of the silhouette coefficient S(i), determine the parameter radius parameter ε and the minimum sample parameter minPts, and estimate the approximate cluster number interval of the shared bicycle OD points; S2.3: Calculate the silhouette coefficient S(i) and the average distortion Evaluate the clustering effect of the K-Means clustering algorithm; The calculation formula of the silhouette coefficient S(i) is as follows: Where a(i) represents the closeness between sample i and other samples in its cluster, which is calculated as the average distance from sample i to other samples; b(v) represents the separation between sample i and its nearest cluster, which is calculated as the average distance from sample v to all samples in its nearest cluster; Average distortion The calculation formula is as follows: where k is the number of clusters, C k is the set of all data points in the ith cluster, u i represents the cluster center of the i-th cluster, x i Represents the data point of the i-th cluster.

3. The method for dynamic scheduling of shared bicycles based on site demand prediction and user reward mechanism according to claim 1, characterized in that: In S2, the optimal number of clusters is determined according to the evaluation result indicators, and then clustering is performed to divide the shared bicycle dispatching stations, including: S2.4: The cluster number interval of the shared bicycle OD points determined by S2.2 is used as the reference cluster number range of S2.3, and the number of clusters corresponding to the maximum value of the silhouette coefficient S(i) and the average distortion degree are calculated. The optimal number of clusters k is determined by the "elbow point" that decreases rapidly and approaches a gentle level; S2.5: Use the K-Means clustering algorithm to cluster the shared bicycle travel OD data, and the obtained cluster center coordinates are used as the shared bicycle dispatch station coordinates.

4. The method for dynamic scheduling of shared bicycles based on site demand prediction and user reward mechanism according to claim 3 is characterized by: In S2.5, the K-Means clustering algorithm is used to cluster the shared bicycle travel OD data, including: S2.5.1: Randomly select K data points as the initial cluster centers μ1,μ2,…,μ K ; S2.5.2: For each shared bicycle trip OD data coordinate x j , calculate its difference with all cluster centers μ i The Euclidean distance of: Where: x j is the OD data coordinate of shared bicycle travel, μ i are the cluster center coordinates, D is the data dimension, in this problem D = 2; Point x j Assign to the nearest cluster center S2.5.3: For each cluster C i , recalculate the cluster centers Where: |C i | is cluster C i The number of midpoints; x j It is cluster C i The point in S2.5.4: Repeat S2.5.2 and S2.5.3 until the cluster center μ is satisfied. i No longer changes or the cluster assignment of data points no longer changes, output the cluster centers μ1,μ2,…,μ K .

5. The method for dynamic scheduling of shared bicycles based on site demand prediction and user reward mechanism according to claim 1, characterized in that: The constructed CNN-LSTM neural network model is used in S3 to predict the future demand for different shared bicycle dispatching stations, including: S3.1: Standardize the shared bicycle OD data to [0,1], divide the shared bicycle dispatch stations into a two-dimensional matrix, and construct a time series dataset, where the time series dataset includes a training set, a validation set, and a test set; S3.2: Input time series data, the shape is [N, T, H, W], where: N is the number of samples, T is the length of the time series, H, W are the spatial distribution; the predicted value shape for future OD data is [N, T′, H, W], where T′ is the predicted time step; For each time step of OD data X t Perform convolution operation in: is the output feature of the kth convolution kernel, W (k) is the convolution kernel parameter, * is the two-dimensional convolution operation, and σ is the activation function; Downsample the convolution output to reduce the dimension P of the feature map t = pooling(Z t ), and perform pooling operation P on the pooling layer i,j =max{Z m,n |(m,n)∈window(i,j)}, where window(i,j) is the pooling window; The pooled output P of each time step t Stacked by time dimension to form time series input P = [P1, P2, ..., P n ]; S3.3: Input LSTM to sequence P and update hidden state: input gate i t =σ(W i ·[h t-1 ,P t ]+b i ); forget gate f t =σ(W f ·[h t-1 ,P t ]+b f ); candidate memory unit Update memory unit Output gate: o t =σ(W o ·[h t-1 ,P t ]+b o ); hidden state h t =o t ⊙tanh(C t ); The final output of LSTM is the time series feature H = [h1,h2,…,h T ], used to predict future OD data; S3.4: Input the LSTM output H into the fully connected layer and map it to the target OD data in is the predicted value, W h ,b h are the weight and bias of the fully connected layer respectively; S3.5: Train the CNN-LSTM neural network model and use mean square error as the loss function Update parameters using Adam optimizer Where θ is the model parameter; η is the learning rate; Hyperparameters adjust the relevant parameters of the CNN layer and LSTM, as well as the time series length T and the prediction step length T′; S3.6: Input the test data set and predict future OD data The mean square error (MSE), mean absolute error (MAE) and coefficient of determination (R 2 ) to evaluate the model performance.

6. The shared bicycle dynamic scheduling method based on site demand prediction and user reward mechanism according to claim 1 is characterized by: In S4, a shared bicycle dispatching model is constructed based on demand forecasting and user reward mechanism, which includes: S4.1: In the shared bicycle dispatching with user participation, it is necessary to reward users who park the shared bicycle at the demand station and then walk to the destination. The variable considered is the user's walking distance. The user reward model y=0.184+0.004x is constructed, where y is the reward amount and x is the walking distance from the demand station to the user's destination; S4.2: Taking the operator's cost minimization as the optimization goal and considering the penalty cost of deviation from the expected inventory, the shared bicycle dynamic scheduling model based on demand forecasting and user reward mechanism is composed of the objective function expressed by the following formula (4) to formula (7) and the constraints expressed by formula (8) to formula (21): a i ≤t ik ≤b i ,i∈{1,2,…,n},k∈{1,2,…,m}#(14) t jk ≥t ik +S ik +t ij x ijk ,i∈{1,2,…,n},j∈{1,2,…,n},k∈{1,2,…,m}#(15) y’ i =y i -m i x ijk ,i∈{1,2,…,n},j∈{1,2,…,n},k∈{1,2,…,m}#(16) m i =E i -I i -U i ,i∈{1,2,…,n}#(17) m i ≤Q,i∈{1,2,…,n}#(18) and' i ≤Q,i∈{1,2,…,n}#(19) S ik =m i S i ,i∈{1,2,…,n},k∈{1,2,…,m}#(20) x ijk ∈{0,1},i∈{1,2,…,n},j∈{1,2,…,n},k∈{1,2,…,m}#(21) The meaning of each parameter is as follows: V: site set V = {1,…,n}; V0: the set of sites and dispatch centers V0 = {0, 1, ..., n}; K: dispatch vehicle set K = {1, 2…, m}; O: user departure set O = {1, 2, ..., q}; D: User purpose set D = {1, 2, ..., q}; i: dispatching site, i∈V; p: user OD site, p∈O,D; V i : the i-th scheduling site; d ij : The distance from site i to site j; x ijk : Whether vehicle k goes from node i to node j, if yes then x ijk =1, otherwise 0; α1: Transportation cost incurred by dispatching vehicles during transportation; α2: Fixed cost of enabling dispatch vehicles; c: constant; k': red envelope reward coefficient; r ip : Whether the user parks the shared bicycle at station i and walks to destination p. If yes, then r ip =1, otherwise 0; d ip : The walking distance of the user from station i to destination p; P i : The penalty coefficient for site i to deviate from the expectation; E i : Expected demand number of site i; I i : Inventory quantity before transfer at site i; m i : The number of shared bicycles dispatched to or from station i. If the vehicle is dispatched in, then m i >0, call out then m i <0; t ik : The time when vehicle k starts scheduling to station i; a i : left time window of station i; b i : right time window of station i; S ik : The service time of the dispatched vehicle at station i. If vehicle k does not serve station i, then S ik =0; t ij : The travel time of the dispatched vehicle from station i to station j; y i : The number of shared bicycles loaded when the dispatch vehicle arrives at station i; y′ i : The number of shared bicycles loaded when the dispatch vehicle leaves station i; U i : The number of red envelope vehicles transferred into station i; Q: The maximum number of bicycles that each dispatch vehicle can carry; S i : The time it takes to load and unload a shared bike; S4.3: Input the relevant parameters of S4.2 into the greedy algorithm, define the shared bicycle scheduling problem and initialize the vehicles and time windows; The calculation to obtain the best scheduling path is as follows: At each step, the station closest to the current distribution point is selected under the conditions of time window and capacity constraints; when a vehicle arrives at a distribution point, the available time window (a i ,b i ), whose available time window is adjusted according to actual traffic conditions or delays, while updating the real-time inventory and future demand of each shared bicycle station, and adjusting the delivery order according to the urgency or demand priority of different stations; If the vehicle arrives at a delivery point earlier than the scheduled time window, it can choose to wait; If a vehicle does not arrive at a delivery point earlier than the scheduled time window, there are potential fines or costs to consider; Each time the optimal next delivery point is selected, the path is added to the current vehicle's route, and it is iterated until all deliveries are completed to obtain the optimal scheduling path.

Citation Information

Patent Citations

  • Task scheduling method and device

    CN111738488A

  • Joint scheduling method based on urban public transport resources

    CN112417753A

  • End-edge-cloud vehicle road collaborative fusion sensing architecture and construction method thereof

    CN113743479A

  • Shared bicycle rebalancing method based on balance area division and reward mechanism guidance

    CN118365501A

Cited By

  • Multi-load AMR scheduling method based on heuristic algorithm

    CN120196128A