Method, device, equipment and medium for predicting long-term travel demand of inter-city online car-hailing based on SRFE-BLP-Transformer

Through the SRFE-BLP-Transformer model, combined with Spearman correlation analysis and recursive feature elimination, and using the two-way long short-term memory network and Transformer, the existing technology solves the problem of intercity ride-hailing demand prediction dominated by short-term prediction, and achieves a better Accurate long-term travel demand forecasting and resource optimization.

CN118313638BActive Publication Date: 2024-09-10HUAQIAO UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410742809.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-10
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

Existing intercity ride-hailing demand forecasting methods mainly focus on short-term forecasting, which cannot effectively capture long-term travel demand trends, and fail to effectively handle redundant features in high-dimensional data, resulting in increased model complexity and reduced interpretability, making it impossible to Suitable for long-term forecasting.

Method used

A long-term travel demand prediction method for intercity ride-hailing based on SRFE-BLP-Transformer is adopted. Historical order data is obtained for preprocessing, and features are screened using Spearman correlation analysis and recursive feature elimination algorithm, combined with a two-way long short-term memory network and Transformer. The model captures time dependence and long-distance dependence for long-term travel demand forecasting.

Benefits of technology

It improves the accuracy of long-term travel demand prediction for intercity online ride-hailing, reduces the time overhead of model training, enables flexible dispatch of vehicles, alleviates potential imbalances in vehicle supply and demand, provides more ample dispatch time, optimizes vehicle resource allocation, and improves services. quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118313638B
    Figure CN118313638B
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for predicting long-term travel demand for intercity ride-hailing services based on SRFE-BLP-Transformer, relating to the field of intercity ride-hailing demand technology. The prediction method includes: S1, acquiring historical order data; S2, dividing orders into operating time slices as demand features based on time, and encoding the features of the operating time slices to obtain feature codes; S3, first using Spearman correlation analysis to analyze the correlation strength between each feature and the demand features, then using a recursive feature elimination algorithm to select features and obtain effective features; S4, sorting the effective features in chronological order and normalizing them, then segmenting the data according to a preset duration to obtain input data; S5, capturing the time dependence of the input data through a bidirectional long short-term memory network and adding location encoding, then using a Transformer to capture the long-distance dependencies between different locations in the input data and performing a linear transformation to obtain the prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of inter-city online car-hailing demand, and in particular to a method, device, equipment and medium for predicting long-term travel demand for inter-city online car-hailing based on SRFE-BLP-Transformer. Background Art

[0002] With the rapid development of modern technology and urban transportation networks, intercity online ride-hailing services have become increasingly important as a key link between cities. It not only supports the booming economy, but also promotes exchanges and cooperation between regions. However, with the rapid growth of demand, intercity online ride-hailing services also face many challenges, such as imbalance between supply and demand, congestion during peak hours, and fluctuations in service quality. Therefore, it is crucial for intercity operating platforms to be able to predict travel demand in advance and flexibly dispatch vehicles. This not only helps alleviate potential supply and demand contradictions, but also improves service quality.

[0003] Short-term forecasting is mainly applicable to immediate decision-making, responding to recent demand and supply conditions, and it is difficult to provide sufficient scheduling time during peak hours. Long-term travel demand forecasting methods are suitable for long-term planning, and can identify travel demand trends and patterns over a longer time frame in the future in advance, provide more ample scheduling time, and optimize the allocation of vehicle resources.

[0004] Among the existing inter-city online car-hailing demand forecasting methods, there are short-term travel demand forecasting for online car-hailing based on incremental training (patent number ZL202311132916.8) and multi-region demand forecasting method for inter-city round-trip passenger transport (patent number ZL202410229563.1). Both methods are limited to short-term forecasting, and neither performs feature selection on high-dimensional data. There are risks such as redundant features leading to dimensional disasters, increased model complexity, and reduced interpretability. The former uses the XGBoost model and incremental training method in machine learning to achieve short-term forecasting. This method cannot capture long-term dependencies in time series data and is not suitable for long-term forecasting. The latter uses a graph neural network model to achieve short-term forecasting for irregular street-level areas. Due to the irregularity of the region and the complex inter-city transportation network, data acquisition is difficult, and data integrity and accuracy are not high, so it is only suitable for short-term forecasting.

[0005] In actual operation, the complexity of inter-city online ride-hailing requires the consideration of many factors in the prediction of travel demand. Only by comprehensively analyzing these factors can an accurate prediction be made. At present, the existing travel demand prediction methods mainly focus on short-term predictions. By considering fewer influencing factors, simple models can meet the needs. However, compared with short-term predictions, long-term travel demand predictions have a longer prediction period and errors will accumulate over time. Therefore, more complex analysis methods and richer data are needed to use more complex models to capture long-term trends.

[0006] In view of the limitations of the existing technology, the applicant filed this application after in-depth research on the existing technology, aiming to address the shortcomings of the existing methods in order to improve the accuracy and efficiency of inter-city online car-hailing demand forecasting. Summary of the invention

[0007] The present invention provides a method, device, equipment and medium for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer to improve at least one of the above-mentioned technical problems.

[0008] In a first aspect, an embodiment of the present invention provides a method for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer, which comprises steps S1 to S5.

[0009] S1. Obtain the historical order data of intercity online taxis on a certain route and perform preprocessing.

[0010] S2. Divide the pre-processed orders into corresponding operation time slices according to the reservation time of the orders as demand features, and encode multiple features of the operation time slices to obtain multiple feature codes of each time slice. The features include time features, external features, and historical data features.

[0011] S3. According to the multiple feature codes of each time slice, the Spearman correlation analysis is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened. Then, a recursive feature elimination algorithm is used for feature selection, and the features that contribute the least to the model are gradually removed to obtain a valid feature set.

[0012] S4. Sort the valid features of the operation time slice in chronological order, normalize the sorted features, and then split the normalized feature data according to the preset time step to obtain the input data of the model.

[0013] S5. Capture the time dependency of the input data through a bidirectional long short-term memory network, add position encoding to enhance the understanding of absolute position, and then use Transformer to capture the long-distance dependency between different positions in the input data. Map the output of Transformer to the prediction space through linear transformation to obtain the prediction results of the long-term travel demand of intercity online car-hailing on this route.

[0014] In an optional embodiment, step S1 specifically includes step S11 to step S12.

[0015] S11. Obtain historical order data of inter-city online taxis.

[0016] S12, cleaning the interference data in the historical order data, wherein the interference data includes duplicate data, non-passenger riding data, and invalid data.

[0017] In an optional embodiment, step S2 specifically includes steps S21 to S23.

[0018] S21. Based on the pre-processed historical order data, between the start date and the end date of the order data, the operating time of the online car-hailing service is divided into multiple operating time slices according to a preset time window size.

[0019] S22. Divide the pre-processed order into corresponding operation time slices according to the reservation time of the order as demand features, wherein the demand features are used as predicted labels.

[0020] S23, read hot encoding of multiple features of the operation time slices to obtain multiple feature codes of each time slice, wherein the features include week features, holiday features, weather features, precipitation features, temperature features, wind features, and historical data features.

[0021] In an optional embodiment, step S3 specifically includes step S31 to step S32.

[0022] S31. Based on the multiple feature codes of each time slice, the Spearman correlation is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened. The calculation model of the Spearman coefficient is: In the formula, is the Spearman correlation coefficient, Representation sample The rank difference, is the sample size, Representation variables The rank of Representation variables rank.

[0023] S32 uses a recursive feature elimination algorithm to perform further feature selection on the initially screened input features, gradually removing the features that contribute the least to the model and obtaining a valid feature set.

[0024] In an optional embodiment, during training, step S4 is used to obtain a data set instead of input data of the model. The data set is divided into a training data set and a test data set in proportion. The training data set and the test data set respectively contain the input data of the model and the real output data.

[0025] In an optional embodiment, step S5 specifically includes steps S51 to S54.

[0026] S51. Capture the time dependency of input data through a bidirectional long short-term memory network. The dependency includes forward dependency and backward dependency. The model of the bidirectional long short-term memory network is: In the formula, is the concatenation of the bidirectional hidden states, It's time point The forward hidden state of It's time point The backward hidden state of Long short-term memory network, It's time point The forward hidden state of It's time point The forward hidden state of It's time point The input vector.

[0027] Preferably, long short-term memory network It includes the input gate that controls the inflow of information, the forget gate that controls the memory of information, and the output gate that controls the outflow of information.

[0028] Long Short-Term Memory Network The model is: In the formula, For time point The hidden state of For the output gate, is the cell state at the current time step combined with the forget gate and input gate information, is the activation function, The Gate of Forgetfulness is the cell state of the previous time step combined with the forget gate and input gate information, is the input gate, is the output of the candidate memory cell, It's time point The hidden state of It's time point The input vector, is the weight matrix of the output gate, is the bias term of the output gate, is the weight matrix of the forget gate, is the bias term of the forget gate, is the weight matrix of the input gate, is the bias term of the input gate, is the weight matrix of the candidate memory unit, Bias term for candidate memory cells.

[0029] S52, adding position coding to the input data processed by the bidirectional long short-term memory network. The position coding uses a combination of sine and cosine functions. Position coding adding model for: In the formula, is the position index of the element in the sequence, is the dimension index, is the dimension of the sample.

[0030] S53, Transformer is introduced into the data after position encoding, so as to consider the information of other positions in the sequence when calculating the encoding of each position, so as to capture long-distance dependencies. The Transformer model is: In the formula, is the input representation, For time point The hidden state of For time point Position coding, It is the self-attention mechanism. is the query matrix, is the key matrix, is the value matrix, For transposition, is the dimension of the key, and is the activation function, It is a feed-forward neural network. and is the weight matrix, and is the bias term.

[0031] S54, map the output of Transformer to the prediction space through linear transformation to obtain the prediction result of long-term travel demand of inter-city online car-hailing. The linear transformation model is: In the formula, The forecast results of long-term travel demand for inter-city online ride-hailing services, is a linear transformation, Processing for the encoder layer, including self-attention mechanism and feedforward neural network, is the input representation.

[0032] In the second aspect, an embodiment of the present invention provides a device for predicting long-term travel demand for inter-city online car-hailing services based on SRFE-BLP-Transformer, which includes a historical order acquisition module, an encoding module, a feature screening module, a data segmentation module and a prediction module.

[0033] The historical order acquisition module is used to obtain the historical order data of intercity online car-hailing services on a certain route and perform preprocessing.

[0034] The encoding module is used to divide the pre-processed orders into corresponding operation time slices according to the reservation time of the orders as demand features, and encode multiple features of the operation time slices to obtain multiple feature codes of each time slice. Among them, the features include time features, external features, and historical data features.

[0035] The feature screening module is used to first use Spearman correlation analysis to analyze the correlation strength between each feature and the demand feature according to the multiple feature codes of each time slice, preliminarily screen the input features of the model, and then use a recursive feature elimination algorithm to select features, gradually remove the features that contribute the least to the model, and obtain a valid feature set.

[0036] The data segmentation module is used to sort the effective features of the operation time slice in chronological order, normalize the sorted features, and then segment the normalized feature data according to the preset time step to obtain the input data of the model.

[0037] The prediction module is used to capture the time dependency of the input data through a bidirectional long short-term memory network and add position encoding to enhance the understanding of absolute position. The long-distance dependency between different positions in the input data is then captured through the Transformer. The output of the Transformer is mapped to the prediction space through a linear transformation to obtain the prediction results of the long-term travel demand of intercity online car-hailing vehicles on this route.

[0038] In the third aspect, an embodiment of the present invention provides a device for predicting long-term travel demand of inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer, which includes a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement a method for predicting long-term travel demand of inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer as described in any paragraph of the first aspect.

[0039] In the fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for predicting long-term travel demand for inter-city online car-hailing based on SRFE-BLP-Transformer as described in any paragraph of the first aspect.

[0040] By adopting the above technical solution, the present invention can achieve the following technical effects:

[0041] The SRFE-BLP-Transformer-based long-term travel demand forecasting method for inter-city online car-hailing vehicles in the embodiment of the present invention mines relevant influencing factors based on historical order data, extracts effective features through feature selection methods, can effectively capture time dependence and long-distance dependence, can effectively improve the accuracy of long-term travel demand forecasting for inter-city online car-hailing vehicles, and reduce the time overhead of model training, so that relevant transportation agencies can flexibly dispatch vehicles and alleviate potential vehicle supply and demand imbalances. By identifying travel demand trends and patterns within a longer time range in the future in advance, more ample dispatching time is provided for inter-city operators, optimizing vehicle resource allocation, improving service quality, and alleviating potential supply and demand imbalances. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a flowchart of the long-term travel demand forecasting method for inter-city online ride-hailing based on SRFE-BLP-Transformer.

[0044] Figure 2 This is a schematic diagram of the data preprocessing process of Example 1;

[0045] Figure 3 A schematic diagram of a feature selection process in Embodiment 1;

[0046] Figure 4 This is a schematic diagram of the prediction model structure of Example 1; DETAILED DESCRIPTION

[0047] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0048] Example 1, please refer to Figures 1 to 4 The first embodiment of the present invention provides a method for predicting long-term travel demand of inter-city online car-hailing vehicles based on SRFE-BLP-Transformer, which can be performed by a long-term travel demand prediction device for inter-city online car-hailing vehicles based on SRFE-BLP-Transformer (hereinafter referred to as: long-term travel demand prediction device). In particular, it is performed by one or more processors in the long-term travel demand prediction device to implement steps S1 to S5.

[0049] It should be noted that SRFE stands for Spearman correlation coefficient + recursive feature elimination (RFE) algorithm. BLP is the abbreviation of "Bidirectional Language Model Positional Encoding". In the field of natural language processing (NLP), it refers to a position encoding method for bidirectional language models. Position encoding is a technique used in deep learning models to capture the order information of words or tokens in sequence data.

[0050] S1. Obtain historical order data of intercity online car-hailing services on a certain route and perform preprocessing. Preferably, step S1 specifically includes steps S11 to S12.

[0051] S11. Obtain historical order data of inter-city online taxis.

[0052] S12, cleaning the interference data in the historical order data, wherein the interference data includes duplicate data, non-passenger riding data, and invalid data.

[0053] In this embodiment, the travel demand (ie, demand quantity) refers to the number of people who need to travel.

[0054] Specifically, valid data refers to carpooling order data and chartered car order data. The interference data in the historical order data includes duplicate data, non-passenger riding data, and missing data. Therefore, the historical order data needs to be cleaned. The cleaning process is as follows: Figure 2 shown.

[0055] Duplicate data refers to the situation where a passenger makes multiple travel requests on the same day but is only successfully served once or is not served at all. For this type of data, the duplicate data can be determined whether to be retained based on the uniqueness of the passenger ID. If the same passenger has multiple travel request orders on the same day and none of them are served, determine whether each order is in the same time slice. If there are two or more orders in the same time slice, retain the first order in that time slice; if the same passenger has multiple travel request orders on the same day and one order is served, delete the remaining failed travel request orders.

[0056] Non-passenger ride orders refer to freight orders, where users place orders and entrust inter-city operators to deliver goods across cities. Such orders have large time constraints and are generally considered to interfere with data and are deleted.

[0057] Missing data refers to orders for supplementary transportation, that is, orders in which intercity operators dispatch vehicles across cities to supplement the transportation capacity of neighboring cities. Such orders have no starting point and end point and have no actual travel demand significance. They are generally considered to interfere with the data and are deleted.

[0058] S2. Divide the pre-processed orders into corresponding operation time slices as demand features according to the reservation time of the orders, and encode multiple features of the operation time slices to obtain multiple feature codes of each time slice. Among them, the features include time features, external features, and historical data features. Preferably, step S2 specifically includes steps S21 to S23.

[0059] S21. Based on the pre-processed historical order data, between the start date and the end date of the order data, the operating time of the online car-hailing service is divided into multiple operating time slices according to a preset time window size.

[0060] Specifically, the time interval represented by each slice is , Indicates the time corresponding to the slice, Indicates the time window size.

[0061] S22. Divide the pre-processed order into corresponding operation time slices according to the reservation time of the order as demand features, wherein the demand features are used as predicted labels.

[0062] Specifically, each order is marked with the "Appointment Time" field. Divide into corresponding time slices Demand characteristics , the demand quantity feature is used as the predicted label, where .

[0063] S23, read hot encoding of multiple features of the operation time slices to obtain multiple feature codes of each time slice. The multi-source data features include week features, holiday features, weather features, precipitation features, temperature features, wind features, and historical data features.

[0064] Specifically, data from different sources are encoded to fuse multi-source data and construct the time features required for model training. , External features , Historical data characteristics Numerical encoding is used to process linear features, and read-hot encoding is used for nonlinear features where numerical encoding cannot correctly represent the relationship between categorical variables.

[0065] Weekly Features For time slice The feature of the day of the week to which the date belongs is encoded using read-hot encoding. ,in , the value is 0 or 1, 0 means it is not that day, 1 means it is that day. The variables are represented as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

[0066] Holiday Features , which represents time slice The holiday characteristics of the date are encoded using read-hot encoding. ,in , the value is 0 or 1, 0 means it is not a holiday of this type, and 1 means it is a holiday of this type. Each variable represents holidays and normal days respectively.

[0067] Weather characteristics For time slice The weather characteristics of the date are encoded using read-hot encoding. ,in , the value is 0 or 1, 0 represents not this type of weather, 1 represents this type of weather. Each variable is represented as sunny, cloudy, overcast, light rain, and other.

[0068] Precipitation characteristics For time slice The precipitation characteristics of the date are coded numerically. , the variables are represented as heavy precipitation, medium precipitation, and light precipitation.

[0069] Temperature characteristics For time slice The temperature characteristics of the date are coded numerically. , each variable is represented as maximum temperature, minimum temperature, and average temperature.

[0070] Wind characteristics For time slice The wind characteristics of the date are coded with numerical values ​​to indicate the wind strength.

[0071] Historical data characteristics For time slice The historical data characteristics of the date are coded with numerical values. , where the variables represent time slices The historical demand for the corresponding time interval, each variable is represented by the historical demand three weeks ago, two weeks ago, one week ago, six days ago, five days ago, four days ago, three days ago, two days ago, and one day ago respectively.

[0072] S3, according to the multiple feature codes of each time slice, first use Spearman correlation analysis to analyze the correlation strength between each feature and the demand feature, preliminarily screen the input features of the model, and then use a recursive feature elimination algorithm to perform feature selection, gradually remove the features that contribute the least to the model, and obtain a valid feature set. Preferably, step S3 specifically includes steps S31 to S32.

[0073] S31. Based on the multiple feature codes of each time slice, the Spearman correlation is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened. The calculation model of the Spearman coefficient is: In the formula, is the Spearman correlation coefficient, Representation sample The rank difference, is the sample size, Representation variables rank, Representation variables The rank reflects the relative position of the data in the sorting.

[0074] Specifically, the Spearman correlation coefficient can capture both linear and nonlinear relationships, and does not require the assumption that the data satisfies a certain distribution, and is applicable to a variety of data types. The value of the Spearman correlation coefficient ranges from -1 to 1, and the closer it is to 1, the stronger the correlation between the two variables.

[0075] S32 uses a recursive feature elimination algorithm to perform further feature selection on the initially screened input features, gradually removing the features that contribute the least to the model and obtaining a valid feature set.

[0076] Specifically, the recursive feature elimination method can comprehensively consider the interpretability of features, the degree of information retention, the ability to interact with special effects, and the ability to capture nonlinear relationships. Its advantage is that it can gradually reduce the number of features on the basis of considering the importance of features and find a more effective feature set, thereby improving the interpretability and generalization ability of the model.

[0077] The calculation steps of the recursive feature elimination method are as follows.

[0078] Initialization model: Select the random forest model as the initial model and as the estimator for feature selection.

[0079] Model training: Use all features to train the initial model.

[0080] Feature importance evaluation: Based on the trained model, the importance index of each feature is evaluated using the Gini index, which ranges from 0 to 1. The reduction in the Gini index is used to measure the importance of the feature. The greater the reduction, the higher the importance of the feature.

[0081] Remove features: Remove the features that contribute the least to the model based on the feature importance index.

[0082] Repeat the steps of model training, feature importance evaluation, and removing the least contributing feature until the stopping condition is met, and return the final feature selection result. The stopping condition can be that the number of features reaches the preset target number, or the model performance no longer improves.

[0083] S4, sort the valid features of the operation time slice in chronological order, normalize the sorted features, and then divide the normalized feature data according to the preset time step to obtain the input data of the model. Preferably, during training, step S4 is used to obtain the data set instead of the input data of the model. The data set is divided into a training data set and a test data set in proportion. The training data set and the test data set contain the input data of the model and the real output data, respectively.

[0084] Specifically, the multi-source data (i.e., effective features) processed by the feature selection method are assembled into a new data set by sorting the time slices from small to large. Then, the maximum and minimum normalization method is used to standardize the data set.

[0085] The maximum and minimum normalization method calculates the expression: In the formula, is the normalized eigenvector, is the eigenvector The minimum value in is the eigenvector The maximum value in .

[0086] Next, construct the model input according to the specified input step size and output step size and output , divide the model into training data set and test data set in proportion.

[0087] Model input: Moment History Time slice data . ,in represents the historical time step of the input, represents the number of features of the input sample, Indicates the time window size, Represents the data of a time slice, , is the time feature (including week and holiday features), are external characteristics (including weather, precipitation, temperature, wind characteristics), is the historical data feature, is the demand characteristic of the current time slice.

[0088]

[0089]

[0090] Model output: Moment of the future Time slice data . ,in For time slice The demand characteristics, Indicates the time step of the output.

[0091]

[0092] S5. Capture the time dependency of the input data through a bidirectional long short-term memory network, add position encoding to enhance the understanding of the absolute position, then capture the long-distance dependency between different positions in the input data through a Transformer, and map the output of the Transformer to the prediction space through a linear transformation to obtain the prediction result of the long-term travel demand of the intercity online car-hailing service on the route. Preferably, step S5 specifically includes steps S51 to S54.

[0093] S51. Capture the temporal dependency of input data through a bidirectional long short-term memory network, wherein the dependency includes forward dependency and backward dependency.

[0094] Specifically, the input data in the training data set captures the time dependency in the time series data, including forward dependency and backward dependency, through the bidirectional long short-term memory neural network. The bidirectional long short-term memory network can simultaneously consider the data before and after the current moment, enabling the model to more comprehensively understand all the information in the time series data, helping to improve the accuracy and stability of the model and better meet the needs of long-term prediction.

[0095] The model of the bidirectional long short-term memory network is: In the formula, is the concatenation of the bidirectional hidden states and is used to combine the bidirectional hidden states into the output. It's time point The forward hidden state of It's time point The backward hidden state of Long short-term memory network, It's time point The forward hidden state of It's time point The forward hidden state of It's time point The input vector.

[0096] Preferably, long short-term memory network It includes the input gate that controls the inflow of information, the forget gate that controls the memory of information, and the output gate that controls the outflow of information.

[0097] Long Short-Term Memory Network The model is: In the formula, For time point The hidden state of The output gate determines which parts of the cell state are output to the hidden state. , is the cell state at the current time step combined with the forget gate and input gate information, is the activation function, It is the forget gate, which is used to control the degree of information retention in the memory cells at the previous moment. is the cell state of the previous time step combined with the forget gate and input gate information, The input gate is used to control the amount of information entering the cell state. is the output of the candidate memory cell, used to update the cell state, It's time point The hidden state of It's time point The input vector, is the weight matrix of the output gate, is the bias term of the output gate, is the weight matrix of the forget gate, is the bias term of the forget gate, is the weight matrix of the input gate, is the bias term of the input gate, is the weight matrix of the candidate memory unit, The bias term of the candidate memory cell.

[0098] S52, adding position coding to the input data processed by the bidirectional long short-term memory network, wherein the position coding adopts a combination of sine and cosine functions.

[0099] Specifically, adding position encoding to the input data processed by the bidirectional long short-term memory network helps the model understand the absolute position in the sequence, so that the model can more accurately understand the distance and order relationship between different positions in the input sequence, improve the ability to capture long-term dependencies and the accuracy of long-term predictions. Position encoding uses a combination of sine and cosine functions, so that the model can receive a unique encoding signal at any position, while avoiding the linear growth problem of position encoding.

[0100] Positional encoding added model for: In the formula, is the position index of the element in the sequence, is the dimension index, is the dimension of the sample.

[0101] S53. For the data after position encoding, Transformer is introduced to consider the information of other positions in the sequence when calculating the encoding of each position, so as to capture long-distance dependencies.

[0102] Specifically, Transformer is a neural network model based on the self-attention mechanism, which allows the model to consider the information of other positions in the sequence while calculating the encoding of each position, thereby effectively capturing long-distance dependencies and improving the accuracy of long-term predictions.

[0103] The Transformer model is: In the formula, is the input representation, For time point The hidden state of For time point Position coding, It is a self-attention mechanism, which is used to calculate the importance of each element in the input sequence. is the query matrix, is the key matrix, is a value matrix used to calculate the weighted sum to obtain the encoding representation of each position, For transposition, is the dimension of the key, and is the activation function, It is a feed-forward neural network that performs nonlinear transformations on the representation at each position to better capture complex patterns in the sequence. and is the weight matrix, and is the bias term.

[0104] S54, map the output of Transformer to the final prediction space through linear transformation to obtain the prediction result of long-term travel demand of inter-city online car-hailing. The linear transformation model is: In the formula, The forecast results of long-term travel demand for inter-city online ride-hailing services, is a linear transformation, Processing for the encoder layer, including self-attention mechanism and feedforward neural network, is the input representation.

[0105] The SRFE-BLP-Transformer-based long-term travel demand forecasting method for inter-city online car-hailing vehicles in the embodiment of the present invention mines relevant influencing factors based on historical order data, extracts effective features through feature selection methods, can effectively capture time dependence and long-distance dependence, can effectively improve the accuracy of long-term travel demand forecasting for inter-city online car-hailing vehicles, and reduce the time overhead of model training, so that relevant transportation agencies can flexibly dispatch vehicles and alleviate potential vehicle supply and demand imbalances. By identifying travel demand trends and patterns within a longer time range in the future in advance, more ample dispatching time is provided for inter-city operators, optimizing vehicle resource allocation, improving service quality, and alleviating potential supply and demand imbalances.

[0106] The SRFE-BLP-Transformer-based inter-city online car-hailing long-term travel demand prediction method of the embodiment of the present invention adopts a grid search method for setting the model experimental parameters during training to obtain the optimal parameter combination.

[0107] The method further includes step S6. S6, inputting the test data set into the long-term travel demand prediction model to obtain a prediction output. Test time slice Output prediction results Contains the future The demand for a time slice ,……, .

[0108] The following is an explanation of a method for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer according to Embodiment 1 of the present invention using a specific case to verify the effectiveness of the method of the present invention.

[0109] The historical order data of intercity online taxis of an intercity operating company are selected as the research object, as shown in Table 1. The specific time is from January 1, 2023 to May 31, 2023. City A and City B are modeled separately, and the time window size is 30 minutes, divided into 32 time slices according to the operating hours of 06:00-22:00.

[0110] Table 1 Historical order data

[0111]

[0112] After cleaning the data, the operation time is divided into time windows of 30 minutes to construct the features required for model training. An example of model features is shown in Table 2.

[0113] Table 2 Model feature description

[0114]

[0115] Through the Spearman analysis method and recursive feature elimination method, an effective feature set is selected to reduce the model calculation cost. The feature selection parameter settings are shown in Table 3.

[0116] Table 3 Feature selection parameters

[0117]

[0118] The feature sets of the two cities after feature selection are shown in Table 4.

[0119] Table 4. Characteristic set of two cities

[0120]

[0121] The features after feature selection are assembled into a data set, and the training set and test set are divided into a ratio of 4:1. The input step size is 224 (a week of time slice data). ), the output step size is 32 (one day of time slice data ) constructs the input samples and output samples of the model. The prediction goal is to use one week of historical data to predict the demand for the next day. The number of time slices and samples constructed are shown in Table 5.

[0122] Table 5 Time slice quantity and sample number

[0123]

[0124] The parameter setting for model training uses the best parameter combination searched on the Internet, and the obtained model parameter combination is shown in Table 6.

[0125] Table 6 Model parameters

[0126]

[0127] After completing the training of the intercity online car-hailing long-distance travel demand prediction model, the test set is input into the model for testing, and all prediction results are evaluated. The evaluation indicators such as root mean square error (RMSE), mean absolute error (MAE), and symmetric mean absolute percentage error (SMAPE) are used to evaluate the prediction accuracy of the model. The lower the value, the better the prediction accuracy of the model.

[0128] The calculation formulas of the three evaluation indicators are as follows: in, It represents the true value, It represents the predicted value. is the total number of samples.

[0129] The present invention compares the current typical prediction model methods, such as the following 6 methods.

[0130] (1) Long Short-Term Memory (LSTM) is a recurrent neural network model used to process and predict time series data. It introduces memory units and gating mechanisms to enable it to better process long sequences and capture long-term dependencies.

[0131] (2) Bidirectional Long Short-Term Memory (BiLSTM) is a recurrent neural network model that introduces an additional reverse loop, allowing the network to simultaneously consider the forward and backward information of the sequence data.

[0132] (3) Autoformer, a Transformer model based on automatic feature learning and transformation, which automatically adapts to different time series patterns by learning the features and structures in the data and generates corresponding prediction results.

[0133] (4) Informer is a model that combines the self-attention mechanism and convolutional neural network. It can effectively capture long-distance dependencies in sequences and has strong generalization ability. It is suitable for various time series prediction tasks.

[0134] (5) Deep Linear Model (DLinear): A linear model-based method for predicting time series data, focusing on simplifying the model structure and improving prediction efficiency.

[0135] (6) PatchTST: A model that uses graph convolutional networks and self-attention mechanisms for the prediction and analysis of time series data, focusing on capturing spatial relationships and periodic features in the data.

[0136] The performance of different methods and the method of the present invention in predicting effect is shown in Table 7.

[0137] Table 7 Prediction results of different methods

[0138]

[0139] By comparing the MAE, RMSE, and SMAPE of different methods, it can be found that the three evaluation indicators of the inter-city online car-hailing long-term travel demand prediction method based on SRFE-BLP-Transformer provided by the present invention are lower than those of other typical prediction models, and show better accuracy in long-term prediction.

[0140] The embodiment of the present invention also compares the performance of the prediction model with and without the feature selection module, as shown in Table 8.

[0141] Table 8 Prediction effect with and without feature selection

[0142]

[0143] By comparing the prediction effects with and without the feature selection module, it is found that the model accuracy does not change significantly without the feature selection module, but the model training time increases significantly, indicating that the use of the feature selection module can greatly reduce the model training time while ensuring the model accuracy.

[0144] In summary, the long-term demand forecast for intercity online car-hailing provided by the present invention is based on mining relevant influencing factors from historical order data, and the feature selection method extracts effective features. The model effectively captures time dependence and long-distance dependence, predicts more accurate long-term travel demand, and identifies travel demand trends and patterns within a longer time range in the future in advance, providing intercity operators with more ample scheduling time, optimizing vehicle resource allocation, improving service quality, and alleviating potential supply and demand imbalances.

[0145] Embodiment 2: The embodiment of the present invention provides an inter-city online car-hailing long-term travel demand prediction device based on SRFE-BLP-Transformer, which includes a historical order acquisition module, an encoding module, a feature screening module, a data segmentation module and a prediction module.

[0146] The historical order acquisition module is used to obtain the historical order data of intercity online car-hailing services on a certain route and perform preprocessing.

[0147] The encoding module is used to divide the pre-processed orders into corresponding operation time slices according to the reservation time of the orders as demand features, and encode multiple features of the operation time slices to obtain multiple feature codes of each time slice. Among them, the features include time features, external features, and historical data features.

[0148] The feature screening module is used to first use Spearman correlation analysis to analyze the correlation strength between each feature and the demand feature according to the multiple feature codes of each time slice, preliminarily screen the input features of the model, and then use a recursive feature elimination algorithm to select features, gradually remove the features that contribute the least to the model, and obtain a valid feature set.

[0149] The data segmentation module is used to sort the effective features of the operation time slice in chronological order, normalize the sorted features, and then segment the normalized feature data according to the preset time step to obtain the input data of the model.

[0150] The prediction module is used to capture the time dependency of the input data through a bidirectional long short-term memory network and add position encoding to enhance the understanding of absolute position. The long-distance dependency between different positions in the input data is then captured through the Transformer. The output of the Transformer is mapped to the prediction space through a linear transformation to obtain the prediction results of the long-term travel demand of intercity online car-hailing vehicles on this route.

[0151] In an optional embodiment, the historical order acquisition module includes an order data acquisition unit and a data cleaning unit.

[0152] The order data acquisition unit is used to obtain the historical order data of inter-city online car-hailing services.

[0153] The data cleaning unit is used to clean the interference data in the historical order data, wherein the interference data includes duplicate data, non-passenger riding data, and invalid data.

[0154] In an optional embodiment, the encoding module includes a time slicing unit, an order division unit, and a feature encoding unit.

[0155] The time slicing unit is used to divide the operating time of the online car-hailing service into multiple operating time slices according to a preset time window size between the start date and the end date of the order data based on the preprocessed historical order data.

[0156] The order division unit is used to divide the pre-processed orders into corresponding operation time slices according to the order reservation time as demand features. The demand features are used as predicted labels.

[0157] The feature encoding unit is used to perform read-hot encoding on multiple features of the operation time slices to obtain multiple feature codes of each time slice. The features include week features, holiday features, weather features, precipitation features, temperature features, wind features, and historical data features.

[0158] In an optional embodiment, the feature screening module includes a Spearman correlation unit and a recursive feature elimination unit.

[0159] The Spearman correlation unit is used to first use the Spearman correlation to analyze the correlation strength between each feature and the demand feature according to the multiple feature codes of each time slice, and preliminarily screen the input features of the model. Among them, the calculation model of the Spearman coefficient is: In the formula, is the Spearman correlation coefficient, Representation sample The rank difference, is the sample size, Representation variables rank, Representation variables rank.

[0160] The recursive feature elimination unit is used to further select the input features that have been initially screened using a recursive feature elimination algorithm, gradually remove the features that contribute the least to the model, and obtain a valid feature set.

[0161] In an optional embodiment, during training, the data segmentation module is used to obtain a data set instead of the input data of the model. The data set is divided into a training data set and a test data set in proportion. The training data set and the test data set contain the input data of the model and the real output data respectively.

[0162] In an optional embodiment, the prediction module includes a time dependency capturing unit, a position coding adding unit, a Transformer unit, and a linear transformation unit.

[0163] The time dependency capturing unit is used to capture the time dependency of input data through a bidirectional long short-term memory network. The dependency includes forward dependency and backward dependency. The model of the bidirectional long short-term memory network is: In the formula, is the concatenation of the bidirectional hidden states, It's time point The forward hidden state of It's time point The backward hidden state of Long short-term memory network, It's time point The forward hidden state of It's time point The forward hidden state of It's time point The input vector.

[0164] Preferably, long short-term memory network It includes the input gate that controls the inflow of information, the forget gate that controls the memory of information, and the output gate that controls the outflow of information.

[0165] Long Short-Term Memory Network The model is: In the formula, For time point The hidden state of For the output gate, is the cell state at the current time step combined with the forget gate and input gate information, is the activation function, The Gate of Forgetfulness is the cell state of the previous time step combined with the forget gate and input gate information, is the input gate, is the output of the candidate memory cell, It's time point The hidden state of It's time point The input vector, is the weight matrix of the output gate, is the bias term of the output gate, is the weight matrix of the forget gate, is the bias term of the forget gate, is the weight matrix of the input gate, is the bias term of the input gate, is the weight matrix of the candidate memory unit, Bias term for candidate memory cells.

[0166] The position coding adding unit is used to add position coding to the input data processed by the bidirectional long short-term memory network. The position coding uses a combination of sine and cosine functions. Position coding adding model for: In the formula, is the position index of the element in the sequence, is the dimension index, is the dimension of the sample.

[0167] Transformer unit is used to process the data after position encoding. Transformer is introduced to consider the information of other positions in the sequence when calculating the encoding of each position, so as to capture long-distance dependencies. The Transformer model is: In the formula, is the input representation, For time point The hidden state of For time point Position coding, It is the self-attention mechanism. is the query matrix, is the key matrix, is the value matrix, For transposition, is the dimension of the key, and is the activation function, It is a feed-forward neural network. and is the weight matrix, and is the bias term.

[0168] The linear transformation unit is used to map the output of the Transformer to the prediction space through linear transformation to obtain the prediction results of the long-term travel demand of inter-city online car-hailing. The linear transformation model is: In the formula, The forecast results of long-term travel demand for inter-city online ride-hailing services, is a linear transformation, Processing for the encoder layer, including self-attention mechanism and feedforward neural network, is the input representation.

[0169] Embodiment 3: The embodiment of the present invention provides a device for predicting long-term travel demand of inter-city online car-hailing vehicles based on SRFE-BLP-Transformer, which includes a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement a method for predicting long-term travel demand of inter-city online car-hailing vehicles based on SRFE-BLP-Transformer as described in any paragraph of Embodiment 1.

[0170] Embodiment 4. An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for predicting long-term travel demand for inter-city online car-hailing based on SRFE-BLP-Transformer as described in any paragraph of Embodiment 1.

[0171] It is understandable that the long-term travel demand prediction device may be an electronic device with computing capabilities, such as a portable notebook computer, a desktop computer, a server, a smart phone or a tablet computer.

[0172] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0173] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0174] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code. It should be noted that in this article, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0175] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0176] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0177] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0178] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0179] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer, characterized in that: Include: Obtain historical order data of intercity online taxis on a certain route and perform preprocessing; According to the reservation time of the order, the pre-processed order is divided into the corresponding operation time slice as the demand feature, and multiple features of the operation time slice are encoded to obtain multiple feature codes of each time slice; wherein the features include time features, external features, and historical data features; According to the multiple feature codes of each time slice, the Spearman correlation analysis is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened. Then, a recursive feature elimination algorithm is used to select features, and the features that contribute the least to the model are gradually removed to obtain a valid feature set. The valid features of the operation time slice are sorted in chronological order, and the sorted features are normalized. Then, the normalized feature data is segmented according to the preset time step to obtain the input data of the model; wherein, the input data is History before the moment Time slice data ; ,in Represents the data of a time slice, Indicates the time window size, represents the historical time step of the input, Represents the number of features of the input sample; , is a time feature, which includes weekday and holiday features. are external characteristics, including weather, precipitation, temperature, and wind characteristics, is the historical data feature, is the demand characteristic of the current time slice; The time dependency of the input data is captured through a bidirectional long short-term memory network, and position encoding is added to enhance the understanding of the absolute position. Then, the long-distance dependency between different positions in the input data is captured through a Transformer, and the output of the Transformer is mapped to the prediction space through a linear transformation to obtain the prediction result of the long-term travel demand of the intercity online car-hailing service on this route; wherein, the prediction result is After the moment Time slice data ; ,in For time slice The demand characteristics of represents the time step of the output; Obtain historical order data of inter-city online ride-hailing services and perform preprocessing, including: Get historical order data of inter-city online ride-hailing services; Cleaning the interference data in the historical order data; wherein the interference data includes duplicate data, non-passenger riding data, and invalid data; the duplicate data refers to the situation where a passenger issues multiple travel requests on the same day but is only successfully served once or is not served at all; cleaning the duplicate data in the historical order data, specifically: judging whether to retain the duplicate data based on the uniqueness of the passenger ID, if the same passenger has multiple travel request orders on the same day and none of them are served, judging whether the orders are in the same time slice, if there are two or more orders in the same time slice, retaining the first order of the time slice; if the same passenger has multiple travel request orders on the same day and one order is served, deleting the remaining orders with failed travel requests; According to the reservation time of the order, the pre-processed order is divided into the corresponding operation time slice as the demand feature, and multiple features of the operation time slice are encoded to obtain multiple feature codes of each time slice; wherein the features include time features, external features, and historical data features, specifically including: Based on the pre-processed historical order data, between the start date and the end date of the order data, the operation time of the online car-hailing service is divided into multiple operation time slices according to the preset time window size; Divide the pre-processed orders into corresponding operation time slices according to the order reservation time as demand features; the demand features are used as predicted labels; Perform read-hot encoding on multiple features of the operation time slice to obtain multiple feature codes of each time slice; the features include week features, holiday features, weather features, precipitation features, temperature features, wind features, and historical data features; During training, the step "sorting the valid features of the operation time slices in chronological order, normalizing the sorted features, and then dividing the normalized feature data according to a preset time step to obtain the input data of the model" is used to obtain the data set, rather than the input data of the model; wherein the data set is divided into a training data set and a test data set in proportion; the training data set and the test data set contain the input data of the model and the real output data, respectively.

2. According to claim 1, a method for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer is characterized in that: The bidirectional long short-term memory network is used to capture the time dependency of the input data, and position encoding is added to enhance the understanding of the absolute position. Then, the Transformer is used to capture the long-distance dependency between different positions in the input data, and the output of the Transformer is mapped to the prediction space through linear transformation to obtain the prediction results of the long-term travel demand of the intercity online car-hailing service on this route, including: The time dependency of input data is captured by a bidirectional long short-term memory network, where the dependency includes forward dependency and backward dependency. The model of the bidirectional long short-term memory network is: In the formula, is the concatenation of the bidirectional hidden states, It's time point The forward hidden state of It's time point The backward hidden state of Long short-term memory network, It's time point The forward hidden state of It's time point The forward hidden state of It's time point The input vector of Add position coding to the input data processed by the bidirectional long short-term memory network; the position coding uses a combination of sine and cosine functions; the position coding adds a model for: In the formula, is the position index of the element in the sequence, is the dimension index, is the dimension of the sample; For the data after position encoding, Transformer is introduced to consider the information of other positions in the sequence when calculating the encoding of each position, so as to capture long-distance dependencies. The Transformer model is: In the formula, is the input representation, For time point The hidden state of For time point Position coding, It is the self-attention mechanism. is the query matrix, is the key matrix, is the value matrix, For transposition, is the dimension of the key, and is the activation function, It is a feed-forward neural network. and is the weight matrix, and is the bias term; The output of Transformer is mapped to the prediction space through linear transformation to obtain the prediction results of long-term travel demand of inter-city online car-hailing. The linear transformation model is: In the formula, The forecast results of long-term travel demand for inter-city online ride-hailing services, is a linear transformation, Processing for the encoder layer, including self-attention mechanism and feedforward neural network, is the input representation.

3. The method for predicting long-term travel demand of inter-city online car-hailing service based on SRFE-BLP-Transformer according to claim 2 is characterized in that: Long Short-Term Memory Network It includes an input gate that controls the inflow of information, a forget gate that controls the memory of information, and an output gate that controls the outflow of information; Long Short-Term Memory Network The model is: In the formula, For time point The hidden state of For the output gate, is the cell state at the current time step combined with the forget gate and input gate information, is the activation function, The Gate of Forgetfulness is the cell state of the previous time step combined with the forget gate and input gate information, is the input gate, is the output of the candidate memory cell, It's time point The hidden state of It's time point The input vector, is the weight matrix of the output gate, is the bias term of the output gate, is the weight matrix of the forget gate, is the bias term of the forget gate, is the weight matrix of the input gate, is the bias term of the input gate, is the weight matrix of the candidate memory unit, Bias term for candidate memory cells.

4. A method for predicting long-term travel demand for inter-city online ride-hailing vehicles based on SRFE-BLP-Transformer according to any one of claims 1 to 3, characterized in that: According to the multiple feature codes of each time slice, the Spearman correlation analysis is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened. Then, a recursive feature elimination algorithm is used to select features, and the features that contribute the least to the model are gradually removed to obtain a valid feature set, which specifically includes: According to the multiple feature codes of each time slice, the Spearman correlation is first used to analyze the correlation strength between each feature and the demand feature, and the input features of the model are preliminarily screened; wherein, the calculation model of the Spearman coefficient is: In the formula, is the Spearman correlation coefficient, Representation sample The rank difference, is the sample size, Representation variables rank, Representation variables rank; The recursive feature elimination algorithm is used to perform further feature selection on the initially screened input features, gradually removing the features that contribute the least to the model to obtain a valid feature set.

5. A device for predicting long-term travel demand of inter-city online car-hailing vehicles based on SRFE-BLP-Transformer, characterized in that: Include: The historical order acquisition module is used to obtain the historical order data of inter-city online taxis on a certain route and perform pre-processing; The encoding module is used to divide the pre-processed orders into corresponding operation time slices as demand features according to the reservation time of the orders, and encode multiple features of the operation time slices to obtain multiple feature codes of each time slice; wherein the features include time features, external features, and historical data features; A feature screening module is used to first use Spearman correlation analysis to analyze the correlation strength between each feature and the demand feature according to the multiple feature codes of each time slice, preliminarily screen the input features of the model, and then use a recursive feature elimination algorithm to perform feature selection, gradually remove the features that contribute the least to the model, and obtain a valid feature set; The data segmentation module is used to sort the effective features of the operation time slice in chronological order, normalize the sorted features, and then segment the normalized feature data according to the preset time step to obtain the input data of the model; wherein the input data is History before the moment Time slice data ; ,in Represents the data of a time slice, Indicates the time window size, represents the historical time step of the input, Represents the number of features of the input sample; , is a time feature, which includes weekday and holiday features. are external characteristics, including weather, precipitation, temperature, and wind characteristics, is the historical data feature, is the demand characteristic of the current time slice; The prediction module is used to capture the time dependency of the input data through a bidirectional long short-term memory network, add position encoding to enhance the understanding of the absolute position, and then capture the long-distance dependency between different positions in the input data through a Transformer, and map the output of the Transformer to the prediction space through a linear transformation to obtain the prediction result of the long-term travel demand of the intercity online car-hailing service on the route; wherein the prediction result is After the moment Time slice data ; ,in For time slice The demand characteristics of represents the time step of the output; The historical order acquisition module includes an order data acquisition unit and a data cleaning unit; An order data acquisition unit, used to acquire historical order data of inter-city online ride-hailing vehicles; A data cleaning unit is used to clean the interference data in the historical order data; wherein the interference data includes duplicate data, non-passenger riding data, and invalid data; the duplicate data refers to the situation where a passenger issues multiple travel requests on the same day but is only successfully served once or is not served at all; cleaning the duplicate data in the historical order data is specifically as follows: judging whether to retain the duplicate data based on the uniqueness of the passenger ID; if the same passenger has multiple travel request orders on the same day and none of them are served, judging whether the orders are in the same time slice; if there are two or more orders in the same time slice, retaining the first order in the time slice; if the same passenger has multiple travel request orders on the same day and one order is served, deleting the remaining orders with failed travel requests; The encoding module includes a time slicing unit, an order division unit, and a feature encoding unit; A time slicing unit is used to divide the operation time of the online car-hailing service into multiple operation time slices according to a preset time window size between the start date and the end date of the order data based on the preprocessed historical order data; An order partitioning unit is used to partition the pre-processed orders into corresponding operation time slices according to the reservation time of the orders as demand features; wherein the demand features are used as predicted labels; A feature encoding unit is used to perform read-hot encoding on multiple features of the operation time slice to obtain multiple feature codes of each time slice; wherein the features include week features, holiday features, weather features, precipitation features, temperature features, wind features, and historical data features; During training, the data segmentation module is used to obtain a data set instead of the input data of the model; the data set is divided into a training data set and a test data set in proportion; the training data set and the test data set contain the input data and the real output data of the model respectively.

6. A device for predicting long-term travel demand for inter-city online car-hailing vehicles based on SRFE-BLP-Transformer, characterized in that: It includes a processor, a memory, and a computer program stored in the memory; the computer program can be executed by the processor to implement a method for predicting long-term travel demand for inter-city online car-hailing services based on SRFE-BLP-Transformer as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for predicting long-term travel demand for inter-city online car-hailing services based on SRFE-BLP-Transformer as described in any one of claims 1 to 4.