CN111507762B - Urban taxi demand prediction method based on multitasking co-prediction neural network - Google Patents

Urban taxi demand prediction method based on multitasking co-prediction neural network Download PDF

Info

Publication number
CN111507762B
CN111507762B CN202010294002.1A CN202010294002A CN111507762B CN 111507762 B CN111507762 B CN 111507762B CN 202010294002 A CN202010294002 A CN 202010294002A CN 111507762 B CN111507762 B CN 111507762B
Authority
CN
China
Prior art keywords
taxi
prediction
demand
neural network
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010294002.1A
Other languages
Chinese (zh)
Other versions
CN111507762A (en
Inventor
朱凤华
张驰展
叶佩军
李镇江
董西松
熊刚
王飞跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202010294002.1A priority Critical patent/CN111507762B/en
Publication of CN111507762A publication Critical patent/CN111507762A/en
Application granted granted Critical
Publication of CN111507762B publication Critical patent/CN111507762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A30/00Adapting or protecting infrastructure or their operation
    • Y02A30/60Planning or developing urban green infrastructure

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Accounting & Taxation (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application belongs to the field of intelligent traffic systems, in particular relates to a city taxi demand prediction method based on a multi-task co-prediction neural network, and aims to solve the problem that in the prior art, the taxi demand prediction precision cannot reach expectations due to the fact that the taxi demand is not considered. The application comprises the following steps: dividing the city into grids, dispersing continuous time into time blocks, classifying real-time data of taxi passenger in a period into each time block of each grid, and counting the on-off demand to train a multi-task co-prediction neural network capable of simultaneously predicting two demands, wherein the neural network can be used for predicting the on-off demand of taxis in a future period. According to the method, the taxi demand prediction problem is modeled as the time sequence prediction problem of the taxi loading and unloading demands, meanwhile, the difference and the connection between the taxi loading and unloading demands are captured, the prediction accuracy is high, the generalization performance is good, and taxi management departments can reasonably allocate taxi resources to solve the problem of unbalanced supply and demand of taxis in different areas of a city.

Description

Urban taxi demand prediction method based on multitasking co-prediction neural network
Technical Field
The application belongs to the field of intelligent traffic systems, and particularly relates to a city taxi demand prediction method based on a multi-task co-prediction neural network.
Background
With the rise of a network taxi-restraining platform such as a drip, on-line taxi-taking service brings much convenience to the life of people, and passengers can call taxis or go forward to the windmill by utilizing the mobile phone APP to carry themselves to arrive at a destination. However, in different areas of a metropolitan area, taxi drivers may not receive orders due to unbalanced supply and demand, and passengers may face a long waiting time. The taxi taking and discharging demand of each area is predicted in advance, taxi resources are reasonably allocated in advance, the problem can be effectively relieved, the quality and efficiency of urban taxi taking service are improved, and the method has important significance for taxi companies, vehicle management departments and the like.
Urban taxi demands are defined as the total number of passengers getting on and off a region of a city over a period of time, the former being referred to as get-on demand and the latter as get-off demand. The main method of taxi demand prediction is to model as a time sequence prediction problem, namely, predicting future taxi demands by using historical taxi demands. The traditional taxi demand prediction method mainly comprises three types, namely a linear statistical model, a statistical machine learning model and a deep learning model. Linear statistical models such as a historical average and differential integrated moving average autoregressive model (Autoregressive Integrated Moving Average model, or ARIMA) fit the variation of taxi demand over time to a linear function; this method is simple to implement, but cannot capture the non-linear relationship of demand over time. Statistical machine learning models such as support vector regression (Support Vector Regression, or SVR) and decision tree methods learn on small data samples based on statistical machine learning theory, which can fit non-linear relationships, but do not work well for large-scale data sets. Big data and deep learning have made breakthrough progress in pattern recognition fields such as image recognition, speech recognition, natural language processing, etc., and are also gradually applied to the field of intelligent transportation. With the advent of big data in traffic fields and the development of deep learning, many students have tried to use convolutional neural networks (CNN, convolution Neural Network) and Long Short-Term Memory (LSTM) to build a deep learning model to predict taxi demands.
In recent years, some students put forward different deep learning models for predicting urban taxi demands, and prediction accuracy of the models is continuously improved. However, most of these models only use taxi boarding data to predict the boarding demand, but the boarding and alighting demands of taxis are of inherent relevance. On one hand, passengers can get off in a certain area in the future of getting on the vehicle in a certain area at the current moment, which means that the getting-on requirement can influence the getting-off requirement; on the other hand, the passengers may return to the original area in the future of getting off in a certain area at the current moment, which means that the getting-off requirement also affects the getting-on requirement. Therefore, when predicting the taxi getting-on demand of a certain area of the city, the getting-off demand of the area should also be considered, and the two demands are predicted together by combining the information of the getting-on and getting-off demands.
Disclosure of Invention
In order to solve the problems in the prior art, namely the problem that the prediction accuracy of the taxi demand cannot be expected because the prior art does not consider the taxi demand, the application provides a city taxi demand prediction method based on a multi-task co-prediction neural network, which comprises the following steps:
step S10, acquiring passenger carrying data of taxis in a set historical time period of a set city through a traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
step S20, based on the taxi passenger carrying data in the set historical time period, calculating taxi loading demands and taxi unloading demands in the set historical time period;
step S30, normalizing the taxi loading requirement and the taxi unloading requirement, and adding Gaussian random noise for processing to obtain preprocessing data;
step S40, obtaining a normalized loading demand predicted value and a loading demand predicted value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
and S50, inversely normalizing the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city.
In some preferred embodiments, the multi-task co-predictive neural network is trained by:
step B10, obtaining taxi passenger carrying data of a set historical time period in a set city;
step B20, dividing the set city into rectangular grids with set size, dividing the set historical time period into time blocks with set length, dividing the taxi passenger carrying data into a taxi loading requirement and a taxi unloading requirement, and carrying out classified summarization statistics on the taxi passenger carrying data for each time block of each rectangular grid area to obtain taxi loading requirements and taxi unloading requirements corresponding to each time block of each grid area as a sample set;
step B30, normalizing each sample in the sample set and adding Gaussian random noise to obtain a preprocessed sample data set;
step B40, dividing the preprocessed sample data set into training sets and test sets according to a preset proportion;
step B50, constructing initial multi-task co-prediction neural networks of all types based on the feedforward neural network and the depth neural network of the set type, and training and adjusting the structure and super parameters of the network through a training set for each network of all types of the initial multi-task co-prediction neural networks to obtain multi-task co-prediction neural networks of all types;
step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of each class, and obtaining the average prediction error of the multi-task co-prediction neural network of any class on the test set;
and step B70, the multi-task co-prediction neural network corresponding to the minimum value in the average prediction error is a trained multi-task co-prediction neural network.
In some preferred embodiments, in step S30, "normalize the taxi entering and exiting requirements", the method is as follows:
wherein v is n Represents the normalized variable value, v represents the value of the variable to be normalized in the range of values, [ v ] min ,v max ]Is the value range of the variable v.
In some preferred embodiments, the method of adding gaussian random noise processing in step S30 is:
wherein x represents the original data,represents data of original data added with Gaussian random noise, lambda epsilon (0, 1)]epsilon-N (0, 1) is a random number that obeys a standard normal distribution, which is a noise scale factor.
In some preferred embodiments, in step S50, "inverse normalization of the normalized on-demand predicted value and the normalized off-demand predicted value" is performed by:
v calculate =v calculate-n *(v max -v min )+v min
wherein v is calculate-n Representing normalized variable predictors, v calculate Representing the value of the variable after inverse normalization, [ v ] min ,v max ]As variable v calculate Is a range of values for (a).
In some preferred embodiments, in step B20, "divide the set city into rectangular grids of set size" is performed by:
step B201, setting the minimum and maximum values of the set city longitude to be a min And a max The maximum value of latitude is b min And b max The size of the rectangular grid is in the longitudinal direction m and the latitudinal direction n;
step B202, dividing GPS coordinates (a, B) of loading or unloading the taxi into rectangular grids of an ith row and a jth column:
in some preferred embodiments, in step B60, "average prediction error of any class of the multiplexed co-predictive neural network over the test set" is calculated by:
where N represents the number of predictors obtained by the current class of the multi-tasking co-predictive neural network on the test set,and x i The predicted values and corresponding actual values obtained on the test set for the current class of the multi-tasking co-predictive neural network.
The application further provides a city taxi demand prediction system based on a multi-task co-prediction neural network, which comprises an input module, a data statistics module, a normalization module, a Gaussian random noise module, a demand prediction module, an inverse normalization module and an output module;
the input module is configured to acquire taxi passenger carrying data in a set historical time period of a set city through the traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
the data statistics module is configured to count taxi loading demands and unloading demands in the set historical time period based on the taxi passenger carrying data in the set historical time period;
the normalization module is configured to normalize the taxi loading requirement and the taxi unloading requirement to obtain normalized taxi loading requirement and taxi unloading requirement;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi loading and unloading demands to obtain preprocessing data;
the demand prediction module is configured to acquire a normalized on-board demand prediction value and an off-board demand prediction value corresponding to the preprocessed data through a trained multitask co-prediction neural network;
the inverse normalization module is configured to inversely normalize the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city;
the output module is configured to output the acquired taxi boarding demand and alighting demand of the next time period of the set city.
In a third aspect of the present application, a storage device is provided, in which a plurality of programs are stored, the programs being adapted to be loaded and executed by a processor to implement the above-mentioned urban taxi demand prediction method based on a multitasking co-prediction neural network.
In a fourth aspect of the present application, a processing device is provided, including a processor and a storage device; the processor is suitable for executing each program; the storage device is suitable for storing a plurality of programs; the program is suitable for being loaded and executed by a processor to realize the urban taxi demand prediction method based on the multi-task co-prediction neural network.
The application has the beneficial effects that:
according to the urban taxi demand prediction method based on the multi-task co-prediction neural network, taxi demand prediction is divided into taxi demand prediction and taxi demand prediction, a change rule of demand data along with time is mined by utilizing a multi-task co-prediction deep learning model, meanwhile, differences and relations between two demands of getting on and off the taxi are captured, nonlinear relations between other factors such as taxi demand and time can be deeply mined, the realization is simple, the prediction accuracy is high, the generalization performance is good, and the method can be easily deployed at different prediction sites.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of a method for urban taxi demand prediction based on a multi-task co-prediction neural network;
FIG. 2 is a schematic diagram of a taxi demand data classifier according to one embodiment of the urban taxi demand prediction method based on a multi-task co-prediction neural network of the present application;
FIG. 3 is a schematic diagram of a multi-demand co-prediction neural network according to an embodiment of the urban taxi demand prediction method based on the multi-task co-prediction neural network;
fig. 4 is a schematic diagram of a training flow of a multi-demand co-prediction neural network according to an embodiment of the urban taxi demand prediction method based on the multi-task co-prediction neural network.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
The application provides a city taxi demand prediction method based on a multi-task co-prediction neural network, which aims at the prediction problem of the on-off demand of a city taxi, models the city taxi as the co-prediction problem of two demands, utilizes a deep learning technology to provide a multi-demand co-prediction neural network, can deeply excavate the change rule of the taxi demand along with time, captures the difference and the connection between the two demands, has simple realization, high prediction precision and good generalization performance.
The application discloses a city taxi demand prediction method based on a multi-task co-prediction neural network, which comprises the following steps:
step S10, acquiring passenger carrying data of taxis in a set historical time period of a set city through a traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
step S20, based on the taxi passenger carrying data in the set historical time period, calculating taxi loading demands and taxi unloading demands in the set historical time period;
step S30, normalizing the taxi loading requirement and the taxi unloading requirement, and adding Gaussian random noise for processing to obtain preprocessing data;
step S40, obtaining a normalized loading demand predicted value and a loading demand predicted value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
and S50, inversely normalizing the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city.
In order to more clearly describe the urban taxi demand prediction method based on the multi-task co-prediction neural network, the following details of each step in the method embodiment of the present application are described in connection with fig. 1.
The urban taxi demand prediction method based on the multi-task co-prediction neural network, provided by the embodiment of the application, comprises the following steps of S10-S50, wherein the detailed description of each step is as follows:
step S10, acquiring passenger carrying data of taxis in a set historical time period of a set city through a traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading of the taxi passenger carrying.
Traffic data acquisition devices include, but are not limited to, global positioning system devices, video detectors, inductive loop detectors, automatic vehicle positioning devices, online taxi taking software, and the like; the data storage mechanism can be a taxi operation company, a network taxi platform or a government management department.
The taxis referred to herein include taxis, net check taxis, and the like.
The area where the model predicts is consistent with the area where the model training data is collected.
And step S20, based on the taxi passenger carrying data in the set historical time period, counting taxi loading demands and taxi unloading demands in the set historical time period.
And step S30, normalizing the taxi loading requirement and the taxi unloading requirement, and adding Gaussian random noise for processing to obtain preprocessing data.
The method for normalizing the taxi getting-on demand and getting-off demand is shown as the formula (1):
wherein v is n Represents the normalized variable value, v represents the value of the variable to be normalized in the range of values, [ v ] min ,v max ]Is the value range of the variable v.
"adding gaussian random noise processing", the method is as shown in formula (2):
wherein x represents the original data,represents data of original data added with Gaussian random noise, lambda epsilon (0, 1)]As a noise scale factor, the noise is a proportion of the noise,epsilon-N (0, 1) is a random number subject to standard normal distribution.
And S40, acquiring a normalized on-board demand predicted value and an off-board demand predicted value corresponding to the preprocessed data through the trained multi-task co-prediction neural network.
Referring to fig. 2, a schematic diagram of a training flow of a multi-demand co-prediction neural network according to an embodiment of the method for predicting urban taxi demand based on the multi-task co-prediction neural network according to the present application is shown, where the specific flow includes:
and step B10, obtaining taxi passenger carrying data of a set historical time period in the set city. After the study area is determined, a collection of samples of taxi operating conditions is collected as a historical dataset in order to train the model. The data to be collected includes the longitude, latitude and date of getting on and off the passenger in each passenger carrying transaction of all taxis operating normally in a given area.
And B20, dividing the set city into rectangular grids with set size, dividing the set historical time period into time blocks with set length, dividing the taxi passenger carrying data into a taxi loading requirement and a taxi unloading requirement, and carrying out classified summarization statistics on the taxi passenger carrying data for each time block of each rectangular grid area to obtain taxi loading requirements and taxi unloading requirements corresponding to each time block of each grid area as a sample set.
"divide the set city into rectangular grids of set size" the method is:
step B201, setting the minimum and maximum values of the set city longitude to be a min And a max The maximum value of latitude is b min And b max The size of the rectangular grid is longitude direction m and latitude direction n.
Step B202, dividing GPS coordinates (a, B) of loading or unloading the taxi into rectangular grids of an ith row and a jth column, wherein the rectangular grids are shown in a formula (3):
according to equation (3), the GPS coordinates of each taxi passenger pick-up and pick-off location can be divided into a unique rectangular grid.
T is selected as the time length of a time block, the taxi is divided into a certain time block according to the boarding and alighting time recorded by one-time passenger carrying of the taxi, and the starting time of the historical data is set as T 0 For the time t of getting on or off the taxi for carrying passengers once, the sequence number of the time period to which the taxi belongs is as follows:
and counting the total boarding and alighting of each rectangular grid in each small time period, and taking the total boarding and alighting of each rectangular grid as the taxi boarding and alighting requirements of the grid area in each small time period.
For one taxi carrying transaction, according to the time and longitude and latitude of getting on and off the passenger, the rectangular grid serial number and the time block serial number of the getting on and off can be calculated. And counting the passenger carrying transaction times of all boarding and alighting of each rectangular grid area in each time block, and calculating the taxi boarding requirement and alighting requirement corresponding to each rectangular grid area in each time block.
And step B30, normalizing each sample in the sample set and adding Gaussian random noise for processing to obtain a preprocessed sample data set.
And (3) carrying out normalization of data and Gaussian random noise addition processing by the same method in the step (S30), and processing the data into a form meeting the input of the multi-task co-prediction model.
And step B40, dividing the preprocessed sample data set into training sets and testing sets according to a preset proportion.
The raw data is sorted into sample sets according to a certain prediction step, e.g. 8 time steps are used historically to predict a time step in the future. The sample set is then divided into a training set and a test set.
According to the scale of the sample set, the sample set is divided into a training set and a testing set according to a certain proportion. If the data volume is large, 80% of samples can be selected as a training set, and the remaining 20% can be used as a test set; if the data volume is small, the training set and the test set can be divided by adopting a K-fold cross validation mode so as to fully utilize all the data.
And B50, constructing initial multi-task co-prediction neural networks of all types based on the feedforward neural network and the depth neural network of the set type, and training and adjusting the structure and super parameters of the network through a training set for each network of all types of the initial multi-task co-prediction neural networks to obtain the multi-task co-prediction neural networks of all types.
Step B51, a taxi demand data classifier is built by utilizing a feedforward neural network, as shown in FIG. 3, and is a schematic diagram of the taxi demand data classifier in an embodiment of the urban taxi demand prediction method based on the multi-task co-prediction neural network, wherein the input is the on-off demand, the output is the sequence of time periods corresponding to the demand in one day, and the neural network is trained and optimized.
The time of day is divided into P shares, which for each time slot's taxi demand corresponds to one of the P shares, which can be modeled as a classification problem, and the full connected layer neural network is used to fit this correspondence. The data is processed into a sample set which takes taxi demands as input and takes the sequence of the taxi demands in a day as output, and a classifier of taxi demand data corresponding to the time sequence number in the day can be trained. The neural network can be used for extracting different change rules of taxi demands at different moments in the day.
After the classifier is trained, the front layers of the classifier can be used as a feature encoder, and the relation features between the required data and the time sequence can be extracted.
And B52, constructing a multi-task co-prediction neural network by utilizing the LSTM, CNN or other deep learning network structures and the classifier trained in the step B51, wherein the multi-task co-prediction neural network comprises two parts of taxi boarding demand prediction and taxi alighting demand prediction, taking taxi demand data in a period of history as input, and training the neural network by taking a real demand value as a prediction label.
Referring to fig. 4, a schematic diagram of a multi-demand co-prediction neural network structure according to an embodiment of the present application is shown, wherein the multi-demand co-prediction neural network structure is divided into 3 parts, the first part is a single demand prediction LSTM network located at an upper end and a lower end, the input is a get-on or get-off demand with a certain step length in history, and the output is a demand corresponding to a next time step. The second part is a time feature encoder, which is obtained by removing the neural network of the next few layers from the classifier pre-trained in step B51, and can extract the correlation feature between the input data and the time sequence in the day. The third part is a centrally located co-predictive neural network that inputs the original get-on and get-off demand data and the feature fusion extracted with the temporal feature encoder into the LSTM network, while predicting both demands.
Let x be t For the input vector of the t-th time step, the calculation of LSTM is shown in the following formula (4) -formula (9):
f t =σ(W f ·[h t-1 ,x t ]+b f ) (4)
i t =σ(W i ·[h t-1 ,x t ]+b i ) (5)
o t =σ(W o ·[h t-1 ,x t ]+b o ) (6)
h t =o t *tanh(C t ) (9)
The loss function of the multi-tasking co-prediction neural network is divided into three parts, the first part being the mean square error (MSE, mean Square Error) between the single demand predicted value and the real value, the second part being the mean square error between the two demand co-predicted values and the real value, and the third part being the mean square error between the single demand predicted value and the co-predicted value. The MSE calculation method is shown in formula (10):
where N is the total number of samples,is the predicted value of taxi demand vector output by the model, x i Is the corresponding true value. When training the deep neural network, forward propagation is performed first, then MSE loss is calculated according to a loss function, and then a Back Propagation (BP) algorithm is used to adjust parameters of the network until MSE loss converges.
The number of layers, learning rate, prediction step length and the like of the depth model can be adjusted in a small scale, and the performance of the depth model can be trained and tested to find the optimal structure and super parameters of the depth model.
The network structure shown in fig. 4 is only one example of a multi-task co-predictive neural network model, and the LSTM structure may be replaced by other deep learning units, such as convolutional neural networks (CNN, convolutional Neural Network), gate control loop units (GRU, gated Recurrent Unit), and the like.
And step B60, performing forward calculation on the test set through each network in the multi-task co-prediction neural networks of each class respectively to obtain the average prediction error of the multi-task co-prediction neural network of any class on the test set.
When the prediction accuracy of the model is tested, the test set is used as input, and only forward propagation is carried out, so that a predicted value given by the model is obtained. And then, according to the comparison of the predicted value and the true value, calculating the mean absolute error (MAE, mean Absolute Error) as a measure of the model prediction accuracy. The MAE calculation method is shown in the formula (11):
where N represents the number of predictors obtained by the current class of the multi-tasking co-predictive neural network on the test set,and x i The predicted values and corresponding actual values obtained on the test set for the current class of the multi-tasking co-predictive neural network.
And step B70, the multi-task co-prediction neural network corresponding to the minimum value in the average prediction error is a trained multi-task co-prediction neural network.
The smaller the average prediction error value is, the higher the model prediction precision is, the network with the minimum average prediction error in the multi-task co-prediction neural networks is the optimal model structure and parameters, and the trained multi-task co-prediction neural network is obtained.
And S50, inversely normalizing the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city.
"inversely normalizing the normalized on-coming demand predicted value and off-coming demand predicted value", the method is as shown in formula (12):
v calculate =v calculate-n *(v max -v min )+v min (12)
Wherein v is calculate-n Representing normalized variable predictors, v calculate Representing the value of the variable after inverse normalization, [ v ] min ,v max ]As variable v calculate Is a range of values for (a).
The urban taxi demand prediction system based on the multitasking co-prediction neural network comprises an input module, a data statistics module, a normalization module, a Gaussian random noise module, a demand prediction module, an inverse normalization module and an output module;
the input module is configured to acquire taxi passenger carrying data in a set historical time period of a set city through the traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
the data statistics module is configured to count taxi loading demands and unloading demands in the set historical time period based on the taxi passenger carrying data in the set historical time period;
the normalization module is configured to normalize the taxi loading requirement and the taxi unloading requirement to obtain normalized taxi loading requirement and taxi unloading requirement;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi loading and unloading demands to obtain preprocessing data;
the demand prediction module is configured to acquire a normalized on-board demand prediction value and an off-board demand prediction value corresponding to the preprocessed data through a trained multitask co-prediction neural network;
the inverse normalization module is configured to inversely normalize the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city;
the output module is configured to output the acquired taxi boarding demand and alighting demand of the next time period of the set city.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the system described above and the related description may refer to the corresponding process in the foregoing method embodiment, which is not repeated here.
It should be noted that, in the urban taxi demand prediction system based on the multi-task co-prediction neural network provided in the foregoing embodiment, only the division of the foregoing functional modules is illustrated, in practical application, the foregoing functional allocation may be completed by different functional modules according to needs, that is, the modules or steps in the foregoing embodiment of the present application are further decomposed or combined, for example, the modules in the foregoing embodiment may be combined into one module, or may be further split into a plurality of sub-modules, so as to complete all or part of the functions described above. The names of the modules and steps related to the embodiments of the present application are merely for distinguishing the respective modules or steps, and are not to be construed as unduly limiting the present application.
A storage device according to a third embodiment of the present application stores therein a plurality of programs adapted to be loaded and executed by a processor to implement the above-described urban taxi demand prediction method based on a multitasking co-prediction neural network.
A processing device according to a fourth embodiment of the present application includes a processor, a storage device; a processor adapted to execute each program; a storage device adapted to store a plurality of programs; the program is suitable for being loaded and executed by a processor to realize the urban taxi demand prediction method based on the multi-task co-prediction neural network.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the storage device and the processing device described above and the related description may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Those of skill in the art will appreciate that the various illustrative modules, method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the program(s) corresponding to the software modules, method steps, may be embodied in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not intended to be limiting.
The terms "first," "second," and the like, are used for distinguishing between similar objects and not for describing a particular sequential or chronological order.
The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus/apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus/apparatus.
Thus far, the technical solution of the present application has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present application is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present application, and such modifications and substitutions will fall within the scope of the present application.

Claims (8)

1. A city taxi demand prediction method based on a multitasking co-prediction neural network is characterized by comprising the following steps:
step S10, acquiring passenger carrying data of taxis in a set historical time period of a set city through a traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
step S20, based on the taxi passenger carrying data in the set historical time period, calculating taxi loading demands and taxi unloading demands in the set historical time period;
step S30, normalizing the taxi loading requirement and the taxi unloading requirement, and adding Gaussian random noise for processing to obtain preprocessing data;
step S40, obtaining a normalized loading demand predicted value and a loading demand predicted value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
step S50, inversely normalizing the normalized loading demand predicted value and the unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city;
the training method of the multi-task co-prediction neural network comprises the following steps:
step B10, obtaining taxi passenger carrying data of a set historical time period in a set city;
step B20, dividing the set city into rectangular grids with set sizes:
step B201, setting the minimum and maximum values of the set city longitude to be a min And a max The maximum value of latitude is b min And b max The size of the rectangular grid is in the longitudinal direction m and the latitudinal direction n;
step B202, dividing GPS coordinates (a, B) of loading or unloading the taxi into rectangular grids of an ith row and a jth column:
dividing the set historical time period into time blocks with set length, dividing the taxi passenger carrying data into a loading requirement and a unloading requirement, and carrying out classified summarization statistics on the taxi passenger carrying data for each time block of each rectangular grid area to obtain the taxi loading requirement and the unloading requirement corresponding to each time block of each grid area as a sample set;
step B30, normalizing each sample in the sample set and adding Gaussian random noise to obtain a preprocessed sample data set;
step B40, dividing the preprocessed sample data set into training sets and test sets according to a preset proportion;
step B50, constructing initial multi-task co-prediction neural networks of all types based on the feedforward neural network and the depth neural network of the set type, and training and adjusting the structure and super parameters of the network through a training set for each network of all types of the initial multi-task co-prediction neural networks to obtain multi-task co-prediction neural networks of all types;
step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of each class, and obtaining the average prediction error of the multi-task co-prediction neural network of any class on the test set;
and step B70, the multi-task co-prediction neural network corresponding to the minimum value in the average prediction error is a trained multi-task co-prediction neural network.
2. The urban taxi demand prediction method based on the multi-task co-prediction neural network according to claim 1, wherein in step S30, "normalize the taxi on-demand and off-demand", the method is as follows:
wherein v is n Represents the normalized variable value, v represents the value of the variable to be normalized in the range of values, [ v ] min ,v max ]Is the value range of the variable v.
3. The urban taxi demand prediction method based on the multitasking co-prediction neural network according to claim 1, wherein the method of adding gaussian random noise processing in step S30 is as follows:
wherein x represents the original data,represents data of original data added with Gaussian random noise, lambda epsilon (0, 1)]epsilon-N (0, 1) is a random number that obeys a standard normal distribution, which is a noise scale factor.
4. The urban taxi demand prediction method based on the multitasking co-prediction neural network according to claim 1, wherein in step S50, "inverse normalization of the normalized taxi demand prediction value and the normalized taxi demand prediction value" is performed by:
v calculate =v calculate-n *(v max -v min )+v min
wherein v is calculate-n Representing normalized variable predictors, v calculate Representing the value of the variable after inverse normalization, [ v ] min ,v max ]As variable v calculate Is a range of values for (a).
5. The urban taxi demand prediction method based on the multi-task co-prediction neural network according to claim 1, wherein in the step B60, "average prediction error of any kind of multi-task co-prediction neural network on the test set" is calculated by:
where N represents the number of predictors obtained by the current class of the multi-tasking co-predictive neural network on the test set,and x i The predicted values and corresponding actual values obtained on the test set for the current class of the multi-tasking co-predictive neural network.
6. The urban taxi demand prediction system based on the multi-task co-prediction neural network is characterized by comprising an input module, a data statistics module, a normalization module, a Gaussian random noise module, a demand prediction module, an inverse normalization module and an output module;
the input module is configured to acquire taxi passenger carrying data in a set historical time period of a set city through the traffic data acquisition device; the taxi passenger carrying data comprise longitude, latitude, time and date of loading and unloading the taxi passenger carrying data;
the data statistics module is configured to count taxi loading demands and unloading demands in the set historical time period based on the taxi passenger carrying data in the set historical time period;
the normalization module is configured to normalize the taxi loading requirement and the taxi unloading requirement to obtain normalized taxi loading requirement and taxi unloading requirement;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi loading and unloading demands to obtain preprocessing data;
the demand prediction module is configured to acquire a normalized on-board demand prediction value and an off-board demand prediction value corresponding to the preprocessed data through a trained multitask co-prediction neural network;
the inverse normalization module is configured to inversely normalize the normalized loading demand predicted value and the normalized unloading demand predicted value to obtain the loading demand and the unloading demand of the taxies in the next time period of the set city;
the output module is configured to output the acquired taxi loading demand and unloading demand of the set city in the next time period;
the training method of the multi-task co-prediction neural network comprises the following steps:
step B10, obtaining taxi passenger carrying data of a set historical time period in a set city;
step B20, dividing the set city into rectangular grids with set sizes:
step B201, setting the minimum and maximum values of the set city longitude to be a min And a max The maximum value of latitude is b min And b max The size of the rectangular grid is in the longitudinal direction m and the latitudinal direction n;
step B202, dividing GPS coordinates (a, B) of loading or unloading the taxi into rectangular grids of an ith row and a jth column:
dividing the set historical time period into time blocks with set length, dividing the taxi passenger carrying data into a loading requirement and a unloading requirement, and carrying out classified summarization statistics on the taxi passenger carrying data for each time block of each rectangular grid area to obtain the taxi loading requirement and the unloading requirement corresponding to each time block of each grid area as a sample set;
step B30, normalizing each sample in the sample set and adding Gaussian random noise to obtain a preprocessed sample data set;
step B40, dividing the preprocessed sample data set into training sets and test sets according to a preset proportion;
step B50, constructing initial multi-task co-prediction neural networks of all types based on the feedforward neural network and the depth neural network of the set type, and training and adjusting the structure and super parameters of the network through a training set for each network of all types of the initial multi-task co-prediction neural networks to obtain multi-task co-prediction neural networks of all types;
step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of each class, and obtaining the average prediction error of the multi-task co-prediction neural network of any class on the test set;
and step B70, the multi-task co-prediction neural network corresponding to the minimum value in the average prediction error is a trained multi-task co-prediction neural network.
7. A storage device having a plurality of programs stored therein, wherein the programs are adapted to be loaded and executed by a processor to implement the urban taxi demand prediction method based on a multi-tasking co-prediction neural network according to any of claims 1 to 5.
8. A processing apparatus includes
A processor adapted to execute each program; and
a storage device adapted to store a plurality of programs;
wherein the program is adapted to be loaded and executed by a processor to implement:
the method for predicting urban taxi demand based on a multi-task co-predictive neural network according to any one of claims 1 to 5.
CN202010294002.1A 2020-04-15 2020-04-15 Urban taxi demand prediction method based on multitasking co-prediction neural network Active CN111507762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010294002.1A CN111507762B (en) 2020-04-15 2020-04-15 Urban taxi demand prediction method based on multitasking co-prediction neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010294002.1A CN111507762B (en) 2020-04-15 2020-04-15 Urban taxi demand prediction method based on multitasking co-prediction neural network

Publications (2)

Publication Number Publication Date
CN111507762A CN111507762A (en) 2020-08-07
CN111507762B true CN111507762B (en) 2023-10-31

Family

ID=71869243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010294002.1A Active CN111507762B (en) 2020-04-15 2020-04-15 Urban taxi demand prediction method based on multitasking co-prediction neural network

Country Status (1)

Country Link
CN (1) CN111507762B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330215B (en) * 2020-11-26 2024-02-02 长沙理工大学 Urban vehicle demand prediction method, equipment and storage medium
CN113807758B (en) * 2020-12-02 2023-11-03 北京京东振世信息技术有限公司 Data generation method and device
CN112488422B (en) * 2020-12-16 2022-11-18 东南大学 Multi-mode travel demand prediction method based on multi-task learning
CN112861925B (en) * 2021-01-18 2023-04-07 中国科学院自动化研究所 Deep learning network-based multi-region vehicle demand prediction method and system
CN114239929B (en) * 2021-11-30 2024-06-14 东南大学 Taxi traffic demand feature prediction method based on random forest
CN116029407A (en) * 2022-07-29 2023-04-28 大连海事大学 Taxi travel demand prediction method based on ConvLSTM

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629503A (en) * 2018-04-28 2018-10-09 南通大学 A kind of taxi based on deep learning is got on the bus the prediction technique of demand
CN108985475A (en) * 2018-06-13 2018-12-11 厦门大学 Net based on deep neural network about vehicle car service needing forecasting method
CN110084197A (en) * 2019-04-28 2019-08-02 苏州清研微视电子科技有限公司 Bus passenger flow volume statistical method and system based on deep learning
CN110210644A (en) * 2019-04-17 2019-09-06 浙江大学 The traffic flow forecasting method integrated based on deep neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10817775B2 (en) * 2017-01-12 2020-10-27 International Business Machines Corporation Neural network computing systems for predicting vehicle requests

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629503A (en) * 2018-04-28 2018-10-09 南通大学 A kind of taxi based on deep learning is got on the bus the prediction technique of demand
CN108985475A (en) * 2018-06-13 2018-12-11 厦门大学 Net based on deep neural network about vehicle car service needing forecasting method
CN110210644A (en) * 2019-04-17 2019-09-06 浙江大学 The traffic flow forecasting method integrated based on deep neural network
CN110084197A (en) * 2019-04-28 2019-08-02 苏州清研微视电子科技有限公司 Bus passenger flow volume statistical method and system based on deep learning

Also Published As

Publication number Publication date
CN111507762A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN111507762B (en) Urban taxi demand prediction method based on multitasking co-prediction neural network
Li et al. Real-time crash risk prediction on arterials based on LSTM-CNN
Pak et al. A hybrid model based on convolutional neural networks and long short-term memory for ozone concentration prediction
Giot et al. Predicting bikeshare system usage up to one day ahead
CN110599767A (en) Long-term and short-term prediction method based on network taxi appointment travel demands
CN111275962B (en) Vehicle track data aggregation effect prediction method and device
CN111753910A (en) Method and device for predicting drip order demand based on LSTM
CN111160622A (en) Scenic spot passenger flow prediction method and device based on hybrid neural network model
DE112019002896T5 (en) INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD AND PROGRAM
CN113408561B (en) Model generation method, target detection method, device, equipment and storage medium
CN113505537A (en) Building energy consumption detection method and device, computer equipment and storage medium
CN113570867A (en) Urban traffic state prediction method, device, equipment and readable storage medium
CN111815098A (en) Traffic information processing method and device based on extreme weather, storage medium and electronic equipment
CN112069635B (en) Method and device for deploying battery changing cabinet, medium and electronic equipment
CN111985731B (en) Method and system for predicting number of people at urban public transport station
CN117436653A (en) Prediction model construction method and prediction method for travel demands of network about vehicles
Rodríguez-Rueda et al. Origin–Destination matrix estimation and prediction from socioeconomic variables using automatic feature selection procedure-based machine learning model
CN112580951A (en) Urban ground bus operation monitoring key index screening method based on passenger trip
CN113792945B (en) Dispatching method, device, equipment and readable storage medium of commercial vehicle
Sharma et al. Deep Learning Based Prediction Of Weather Using Hybrid_stacked Bi-Long Short Term Memory
Bouyahia et al. Real-time traffic data smoothing from GPS sparse measures using fuzzy switching linear models
Rezazada et al. What influences passenger’s arrival rate at stops in Melbourne: Wasea-Lstm, a novel deep learning model leveraging multi-source data fusion
CN113537607A (en) Power failure prediction method
Heghedus PhD forum: Forecasting public transit using neural network models
CN117975178B (en) Taxi track data analysis method based on big data analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant