A station type shared bicycle system uses demand prediction method
By generating demand-topology matrix, demand-spatiotemporal correlation matrix and demand decomposition matrix, and combining them with neural network to predict the demand of shared bicycle systems, the problem of poor predictive adaptability in existing technologies is solved, and more accurate demand prediction and bicycle rebalancing allocation are achieved, thereby improving traffic management efficiency.
Patent Information
- Application Number
- CN202310710641.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-06-15
AI Technical Summary
The existing demand forecasting methods for shared bicycle systems are not very adaptable, resulting in an imbalance in the number of bicycles at different stations and at different times, which affects the accuracy of traffic management.
By collecting users' travel history data and related feature data, a demand-topology matrix, a demand-spatiotemporal correlation matrix, and a demand decomposition matrix are generated. Demand prediction is then performed by combining RNN or GCN neural networks, and information from multiple matrices is integrated to improve prediction accuracy.
It improves the accuracy of predicting the demand for shared bicycles, enabling better rebalancing and allocation of bicycles, alleviating traffic congestion, and increasing road network accessibility.
Smart Images

Figure CN116993391B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for predicting the usage demand of a station-based shared bicycle system, belonging to the field of intelligent transportation system technology. Background Technology
[0002] As an economical and environmentally friendly mode of transportation, shared bicycles not only contribute to the optimization and adjustment of the transportation structure but also hold promise for solving the "last mile" problem in urban transportation. Shared bicycles also play an irreplaceable role in slow-moving traffic; users can freely rent bicycles at designated stations and return them to another station near their destination. This process not only helps alleviate urban traffic congestion but also increases road network accessibility.
[0003] However, the tidal phenomenon in bike-sharing systems often leads to local imbalances in the number of bicycles at different stations and time periods, i.e., supply and demand. Therefore, demand forecasting for bike-sharing systems is a fundamental research problem, playing a crucial role in the rebalancing and allocation of bicycles at the station level. Accurate demand forecasting can provide reliable information for traffic management. Currently, classic demand forecasting methods for bike-sharing systems are not very adaptable and perform poorly in practical applications. Summary of the Invention
[0004] Technical Problem: To address the aforementioned shortcomings and defects, this invention proposes a method for predicting the usage demand of a station-based shared bicycle system. This method can improve the accuracy of predicting the usage demand of the shared bicycle system.
[0005] Technical Solution: To solve the above-mentioned technical problems, this invention proposes a method for predicting the usage demand of a station-based shared bicycle system. This method includes the following steps:
[0006] Step 1) Collect historical travel data and related feature data of users in the shared bicycle system and perform data preprocessing;
[0007] Step 2), extract the network topology information of shared bicycle stations and generate a demand-topology matrix;
[0008] Step 3) Extract spatiotemporal information related to shared bicycle usage demand and generate a demand-spatiotemporal correlation matrix;
[0009] Step 4) Generate the shared bicycle system usage demand decomposition matrix;
[0010] Step 5) Integrate the demand-topology matrix, demand-spatiotemporal correlation matrix, and demand decomposition matrix to complete demand forecasting.
[0011] Furthermore, in step 1), the collected user travel history data of the shared bicycle system includes the following fields: start station ID, start time, end station ID, end time, user ID, and bicycle ID; the collected relevant feature data includes weather type data and holiday data, and the following data preprocessing is performed:
[0012] Step 1.1) Abnormal data removal: Calculate the usage duration of each record in the user travel history data of the shared bicycle system. Usage duration = end time - start time, and remove records with usage duration less than σ.
[0013] Step 1.2): Aggregate demand data, set a time step τ, and calculate the vehicle demand matrix sequence Y for each time step according to the start station ID and end station ID. t Specifically:
[0014]
[0015] in, This represents the number of shared bicycles used from station i to station j within the t-th time step, and n represents the number of shared bicycle stations in the study area.
[0016] Step 1.3), Feature data encoding, encoding weather type data and holiday data into the following form:
[0017]
[0018]
[0019] in, This represents the weather type between station i and station j within the t-th time step. This indicates the type of holiday within the t-th time step, and the specific value is determined as follows:
[0020]
[0021]
[0022] Where, θ1, θ2, As parameters, and we have 1 > θ1 > θ2 > 0.
[0023] Furthermore, in step 2), the extracted shared bicycle station network topology information includes the adjacency structure of the non-motorized vehicle road network and the length of each non-motorized vehicle road segment within the study area, and generates a demand-spatiotemporal correlation matrix, specifically including the following steps:
[0024] Step 2.1), calculate the average length a of the shortest path for non-motorized vehicles from station i to station j. ijThe specific calculation formula is as follows:
[0025]
[0026] Where k is the number of shortest paths, m u Let l be the number of road segments contained in the u-th shortest path. uv Let v be the length of the non-motorized vehicle segment included in the u-th shortest path;
[0027] Step 2.2), the average length a of the shortest path for non-motorized vehicles from station i to station j. ij The sequence is normalized using the following formula:
[0028]
[0029] Where max({a ij}) and min({a ij}) respectively represent a ij The maximum and minimum values in the sequence;
[0030] Step 2.3) Generate the demand-spatiotemporal correlation matrix Y 1t The specific calculation formula is as follows:
[0031]
[0032] Y 1t =A⊙Y t
[0033] Here, ⊙ represents the Hadamard multiplier.
[0034] Furthermore, in step 2.1), the shortest path for non-motorized vehicles from station i to station j is obtained using the K-shortest path algorithm.
[0035] Furthermore, step 3) extracts spatiotemporal information related to shared bicycle usage demand and generates a demand-spatiotemporal correlation matrix, specifically including the following steps:
[0036] Step 3.1): Calculate the spatiotemporal correlation matrix B using the Pearson correlation coefficient or Spearman correlation coefficient function. The specific calculation formula is as follows:
[0037]
[0038] Where f(·) is the Pearson correlation coefficient or Spearman correlation coefficient function;
[0039] Step 3.2), generate the demand-spatiotemporal correlation matrix Y. 2t The specific calculation formula is as follows:
[0040] Y2t =B⊙Y t .
[0041] Furthermore, step 4) generates the shared bicycle system usage demand decomposition matrix, which specifically includes the following steps:
[0042] Step 3.1), for sequence Y t The rearranged matrix Y is obtained as follows:
[0043]
[0044] in, λ represents the number of vehicles used from station i to station j within the λth time step; T represents the total time step within the study period.
[0045] Step 3.2) Decompose the Y sequence using the two-dimensional discrete wavelet transform algorithm, specifically as follows:
[0046]
[0047]
[0048]
[0049]
[0050]
[0051] Where g(·) represents the two-dimensional discrete wavelet transform function or algorithm; C, D, E, F are decomposition sequences, representing different trends, periods or error fluctuations of the original sequence Y;
[0052] Step 3.3), process matrices C, D, E, F according to sequence Y t The decomposition matrix of the shared bicycle system's usage demand is obtained by rearranging the components in the following form:
[0053]
[0054]
[0055]
[0056]
[0057] Furthermore, step 5) integrates the demand-topology matrix, the demand-spatiotemporal correlation matrix, and the demand decomposition matrix to complete demand forecasting, specifically including the following steps:
[0058] Step 5.1), matrix fusion, specifically:
[0059] X t =β1·Y 1t +β2·Y 2t +β3·C t +β4·D t +β5·E t +β6·F t
[0060] Where β1, β2, β3, β4, β5, and β6 are parameters;
[0061] Step 5.2), model training, using sequences P t-1 and Q t-1 As the training input, X t To train the output, the regression prediction model is trained as follows:
[0062]
[0063] Step 5.3), demand forecasting, specifically:
[0064]
[0065] Where h(·) represents the completed regression prediction model. ξ is the time delay step size, and ξ is the pre-step size.
[0066] Furthermore, the regression prediction model in step 5.2) is an RNN or GCN neural network.
[0067] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0068] The technical solution of this invention takes into account the realities of the shared bicycle station network, such as topology, spatiotemporal correlation, and external characteristics, thereby improving the predictive effect of shared bicycle system usage demand and providing a reference for relevant urban and transportation engineering practices. Attached Figure Description
[0069] Figure 1 This is a flowchart of the present invention;
[0070] Figure 2 This is a network diagram of shared bicycle stations for an example.
[0071] Figure 3 Example: Demand sequence between shared bicycle stations 1 and 2;
[0072] Figure 4 Example: Demand decomposition sequence diagram between shared bicycle station 1 and station 2;
[0073] Figure 5 Example: Prediction comparison chart between shared bicycle stations 1 and 2. Detailed Implementation
[0074] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0075] This embodiment collected publicly available datasets of shared bicycle systems operating in a certain city, including fields such as start station ID, start time, end station ID, end time, user ID, and bicycle ID; and collected weather type data and holiday data for the research period from the city government's public information. Some data are shown in Table 1.
[0076] Table 1 Dataset of Shared Bicycle System
[0077]
[0078]
[0079] Following step 1), outlier data is removed and an aggregation requirement sequence is generated. Some results are shown below. Figure 3 As shown.
[0080] Following step 2), the network topology information of shared bicycle stations is extracted and a demand-topology matrix is generated. Some results are shown in Table 2.
[0081] Table 2 Demand-Topology Matrix, t=1
[0082]
[0083] Following step 3), extract spatiotemporal information related to shared bicycle usage demand and generate a demand-spatiotemporal correlation matrix. Some results are shown in Table 3.
[0084] Table 3 Demand-Spatiotemporal Correlation Matrix, t=1, Pearson Correlation Coefficient
[0085]
[0086]
[0087] Following step 4), a demand decomposition matrix for the shared bicycle system is generated. Some results are shown below. Figure 4 As shown.
[0088] Following step 5), matrix fusion and demand forecasting were completed. To verify the forecasting effect, ARIMA and LSTM models were compared, and some results are shown below. Figure 5 As shown.
[0089] It should be understood that the above embodiments are only for illustrating the technical ideas of the present invention. For those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for predicting the usage demand of a station-based shared bicycle system, characterized in that, The method includes the following steps: Step 1) Collect historical travel data and related feature data of users in the shared bicycle system and perform data preprocessing; Step 2), extract the network topology information of shared bicycle stations and generate a demand-topology matrix; Step 3) Extract spatiotemporal information related to shared bicycle usage demand and generate a demand-spatiotemporal correlation matrix; Step 4) Generate the shared bicycle system usage demand decomposition matrix; Step 5) Integrate the demand-topology matrix, demand-spatiotemporal correlation matrix, and demand decomposition matrix to complete demand forecasting; In step 1), the collected user travel history data of the shared bicycle system includes the following fields: start station ID, start time, end station ID, end time, user ID, and bicycle ID; the collected relevant feature data includes weather type data and holiday data, and the following data preprocessing is performed: Step 1.1): Remove abnormal data. Calculate the usage duration for each record in the shared bicycle system's user travel history data. Usage duration = end time - start time. Then, remove records with usage durations less than [a certain value]. Records removed; Step 1.2): Aggregate demand data and set the time step. Calculate the vehicle demand matrix sequence for each time step according to the start station ID and end station ID. Specifically: ; in, Indicates the first Within a time step from the site To the station Vehicle usage This indicates the number of shared bicycle stations within the study area; Step 1.3), Feature data encoding, encoding weather type data and holiday data into the following form: ; ; in, Indicates the first Sites within a time step and sites The weather types between, Indicates the first The types of holidays within each time step are determined as follows: ; ; in, , , , As a parameter, and have, ; In step 2), the extracted shared bicycle station network topology information includes the adjacency structure of the non-motorized vehicle road network and the length of each non-motorized vehicle road segment within the study area, and a demand-spatiotemporal correlation matrix is generated, specifically including the following steps: Step 2.1), calculate the site To the station Average length of the shortest path for non-motorized vehicles The specific calculation formula is as follows: ; in, The number of shortest paths, For the first The number of road segments contained in the shortest path. For the first The shortest path contains the first The length of each non-motorized vehicle section; Step 2.2), for the site To the station Average length of the shortest path for non-motorized vehicles The sequence is normalized using the following formula: ; in, and They represent The maximum and minimum values in the sequence; Step 2.3) Generate the demand-spatiotemporal correlation matrix The specific calculation formula is as follows: ; ; in, For Hadamard multipliers; In step 2.1), the site To the station The shortest path for non-motorized vehicles is obtained using the K-shortest path algorithm; Step 3) extracts spatiotemporal information related to shared bicycle usage demand and generates a demand-spatiotemporal correlation matrix, which specifically includes the following steps: Step 3.1): Calculate the spatiotemporal correlation matrix using the Pearson correlation coefficient or Spearman correlation coefficient function. The specific calculation formula is as follows: ; in, This is the Pearson correlation coefficient or Spearman correlation coefficient function; Step 3.2) Generate the demand-spatiotemporal correlation matrix The specific calculation formula is as follows: ; Step 4) generates the shared bicycle system usage demand decomposition matrix, which specifically includes the following steps: Step 4.1), for the sequence Rearrange to obtain a two-dimensional matrix Specifically: ; in, Indicates the first Within a time step from the site To the station Vehicle usage; Indicates the total time step within the research period; Step 4.2), use the two-dimensional discrete wavelet transform algorithm to... Sequence decomposition, specifically: ; ; ; ; ; in, Represents a two-dimensional discrete wavelet transform function or algorithm; For the decomposed sequence, represent the original sequence. Information on different trends, cycles, or error fluctuations; Step 4.3), for the matrix According to sequence The decomposition matrix of the shared bicycle system's usage demand is obtained by rearranging the components in the following form: ; ; ; ; Step 5) integrates the demand-topology matrix, the demand-spatiotemporal correlation matrix, and the demand decomposition matrix to complete demand forecasting. This specifically includes the following steps: Step 5.1), matrix fusion, specifically: ; in, For parameters; Step 5.2), model training, using sequences , and For training input, To train the output, the regression prediction model is trained as follows: ; Step 5.3), demand forecasting, specifically: ; in, This indicates a regression prediction model that has completed training. For time delay step size, This is the forward step size.
2. The method for predicting the usage demand of a station-based shared bicycle system according to claim 1, characterized in that, The regression prediction model in step 5.2) is an RNN or GCN neural network.
Citation Information
Patent Citations
Shared bicycle demand prediction system, method and device
CN110119838A
Shared bicycle demand prediction method and prediction system
CN115271833A
