CN111507762A - Urban taxi demand prediction method based on multi-task co-prediction neural network - Google Patents

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

Info

Publication number
CN111507762A
CN111507762A CN202010294002.1A CN202010294002A CN111507762A CN 111507762 A CN111507762 A CN 111507762A CN 202010294002 A CN202010294002 A CN 202010294002A CN 111507762 A CN111507762 A CN 111507762A
Authority
CN
China
Prior art keywords
taxi
demand
getting
prediction
neural network
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.)
Granted
Application number
CN202010294002.1A
Other languages
Chinese (zh)
Other versions
CN111507762B (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

Images

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)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Molecular Biology (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (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 invention belongs to the field of intelligent traffic systems, and particularly relates to a urban taxi demand prediction method based on a multitask joint prediction neural network, aiming at solving the problem that the prediction precision of taxi demands cannot be expected due to the fact that getting-off demands are not considered in the prior art. The invention comprises the following steps: the method comprises the steps of dividing a city into grids, continuously dispersing time into time blocks, classifying real-time data of taxi passengers in the city in a period of time into the time blocks of the grids, counting the quantity of required getting-on and getting-off of the city to train a multi-task co-prediction neural network capable of predicting two requirements at the same time, wherein the neural network can be used for predicting the quantity of required getting-on and getting-off of the taxi in a future time period. The method models the taxi demand prediction problem as the time sequence prediction problem of the getting-on and getting-off demands, simultaneously captures the difference and the connection between the getting-on and getting-off demands, has high prediction precision and good generalization performance, and is beneficial to taxi management departments to reasonably allocate taxi resources so as to solve the problem of unbalanced supply and demand of taxis in different areas of cities.

Description

Urban taxi demand prediction method based on multi-task co-prediction neural network
Technical Field
The invention belongs to the field of intelligent traffic systems, and particularly relates to a method for predicting urban taxi demand based on a multitask joint prediction neural network.
Background
With the rise of the network car booking platform such as dripping, the online taxi taking service brings convenience to the life of people, and passengers can call taxies or carry themselves to the destination by using a mobile phone APP. However, in different areas of a large city, taxi drivers may not receive orders due to the problem of unbalanced supply and demand, and passengers may face the problem of long waiting time. The taxi taking and getting-off demand of each area is predicted in advance, and taxi resources are reasonably allocated in advance, so that 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.
The method is simple to implement, but cannot capture the nonlinear relation of the change of the demand quantity along with the time, the statistical machine learning model such as Support Vector Regression (SVR) and the decision tree method learn on small data samples based on statistical machine learning theory, and can fit the nonlinear relation of the large-scale nonlinear relation, but the fitting effect on a data set is not good, and the intelligent recognition method is also applied to a large-scale learning field of speech recognition, and is also applied to a large-scale learning field of speech recognition, and a large-scale learning field of traffic Neural Network recognition (Ttllearning), and a large-scale learning field of speech recognition is realized by using a model of a Neural Network model (Ttlword recognition), so that the method breaks through a large-scale learning field of speech recognition, and a traffic Neural Network recognition model (Ttlv) is developed gradually.
In recent years, some scholars put forward different deep learning models for predicting urban taxi demands in sequence, and the prediction accuracy of the models is continuously improved. However, most of these models use only taxi-in data to predict the taxi-in demand, but taxi-in and taxi-out demands are of intrinsic relevance. On one hand, passengers get on a certain area at the present moment and get off the vehicle in the certain area in the future, which indicates that the getting-on demand influences the getting-off demand; on the other hand, the passengers getting off in a certain area at the present moment may return to the original area in the future, which indicates that the getting-off demand also affects the getting-on demand. Therefore, when the taxi getting-on demand of a certain region of a city is predicted, the two demands are jointly predicted by integrating the information of the taxi getting-on demand and the taxi getting-off demand of the region in consideration.
Disclosure of Invention
In order to solve the problems in the prior art, namely the problem that the prediction precision of the taxi demand cannot be expected due to the fact that getting-off demand is not considered in the prior art, the invention provides an urban taxi demand prediction method based on a multitask joint prediction neural network, which comprises the following steps:
step S10, collecting passenger carrying data of taxis in a set historical time period of a set city through a traffic data collecting device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
step S20, counting taxi getting-on demands and getting-off demands of taxies in the set historical time period based on the taxi passenger carrying data in the set historical time period;
step S30, normalizing the taxi getting-on demand and the taxi getting-off demand and adding Gaussian random noise processing to obtain preprocessed data;
step S40, acquiring a normalized getting-on demand predicted value and a normalized getting-off demand predicted value corresponding to the preprocessed data through the trained multi-task co-prediction neural network;
and step S50, performing inverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain the getting-on demand and the getting-off demand of the taxi in the next time period of the set city.
In some preferred embodiments, the training method of the multitask co-prediction neural network is as follows:
step B10, acquiring taxi passenger carrying data for setting a historical time period in a 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 getting-on demand and a getting-off demand, and carrying out classified summary statistics on the taxi passenger carrying data aiming at each time block of each rectangular grid area to obtain the taxi getting-on demand and the taxi getting-off demand corresponding to each time block of each grid area as a sample set;
b30, carrying out normalization and Gaussian random noise addition processing on each sample in the sample set to obtain a preprocessed sample data set;
step B40, dividing the preprocessed sample data set into a training set and a test set according to a preset proportion;
step B50, constructing initial multi-task co-prediction neural networks of various categories based on the feedforward neural network and the deep neural network of the set category, and for each network in the initial multi-task co-prediction neural networks of various categories, training and adjusting the structure and the hyper-parameters of the network through a training set to obtain the multi-task co-prediction neural networks of various categories;
step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of each category to obtain the average prediction error of the multi-task co-prediction neural network of any category 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 getting-on demand and the taxi getting-off demand", the method includes:
Figure BDA0002451493620000041
wherein v isnRepresenting the value of the normalized variable, v representing the value of the variable to be normalized within the range, [ v [ [ v ] ofmin,vmax]Is the value range of the variable v.
In some preferred embodiments, the "gaussian random noise adding process" in step S30 is performed by:
Figure BDA0002451493620000042
wherein, x represents the original data,
Figure BDA0002451493620000043
represents the original data added with Gaussian random noise, lambda ∈ (0, 1)]For the noise scale factor, N (0, 1) is a random number that is distributed over the standard positive range.
In some preferred embodiments, in step S50, "inverse normalization is performed on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value", and the method includes:
vcalculate=vcalculate-n*(vmax-vmin)+vmin
wherein v iscalculate-nRepresenting normalized variable predictors, vcalculateRepresents the value of the variable after denormalization, [ vmin,vmax]Is a variable vcalculateA range of values of (c).
In some preferred embodiments, step B20 "divide the set city into rectangular grids of set size" is performed by:
step B201, the minimum and maximum values of the set city longitude are set as aminAnd amaxThe maximum value of latitude is bminAnd bmaxThe size of the rectangular grid is in the longitude direction m and the latitude direction n;
step B202, dividing the GPS coordinates (a, B) of the taxi carrying passengers to get on or off the taxi into rectangular grids of the ith row and the jth column:
Figure BDA0002451493620000051
in some preferred embodiments, in step B60, "the average prediction error of any one of the classes of multitask co-prediction neural networks over the test set" is calculated by:
Figure BDA0002451493620000052
wherein N represents the number of predicted values obtained by the multitask co-prediction neural network of the current category on the test set,
Figure BDA0002451493620000053
and xiAnd obtaining a predicted value and a corresponding real value on the test set by the multi-task co-prediction neural network representing the current category.
On the other hand, the invention provides an urban taxi demand prediction system based on a multitask joint 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 collect passenger carrying data of taxis in a set historical time period of a set city through the traffic data collection device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
the data statistics module is configured to count taxi getting-on demands and taxi getting-off demands of taxies 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 getting-on demand and the taxi getting-off demand to obtain a normalized taxi getting-on demand and a normalized taxi getting-off demand;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi getting-on demand and the normalized taxi getting-off demand to obtain preprocessed data;
the demand prediction module is configured to obtain a normalized getting-on demand prediction value and a normalized getting-off demand prediction value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
the reverse normalization module is configured to perform reverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain a taxi getting-on demand and a taxi getting-off demand of a set city in the next time period;
and the output module is configured to output the obtained taxi getting-on demand and taxi getting-off demand of the taxi in the next time period of the set city.
In a third aspect of the present invention, a storage device is provided, in which a plurality of programs are stored, the programs being suitable for being loaded and executed by a processor to implement the above-mentioned urban taxi demand prediction method based on a multitask co-prediction neural network.
In a fourth aspect of the present invention, a processing apparatus is provided, which includes a processor, a storage device; the processor is suitable for executing various programs; 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 multitask co-prediction neural network.
The invention has the beneficial effects that:
the urban taxi demand forecasting method based on the multitask co-forecasting neural network divides taxi demand forecasting into boarding demand forecasting and getting-off demand forecasting, utilizes a multitask co-forecasting deep learning model to mine the change rule of demand data along with time, captures the difference and the connection between boarding and getting-off demands, can deeply mine the nonlinear relation between the taxi demands and other factors such as time, is simple to realize, has high forecasting precision and good generalization performance, and can be easily deployed in different forecasting places.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a schematic flow chart of a city taxi demand prediction method based on a multitask co-prediction neural network;
FIG. 2 is a schematic diagram of a taxi demand data classifier according to an embodiment of the urban taxi demand prediction method based on a multitask co-prediction neural network;
FIG. 3 is a schematic structural diagram of a multi-demand co-prediction neural network of an embodiment of the urban taxi demand prediction method based on a multi-task co-prediction neural network of the present invention;
fig. 4 is a schematic diagram of a training process 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 present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The invention provides a city taxi demand prediction method based on a multitask common prediction neural network, which aims at the prediction problem of the getting-on and getting-off demands of city taxis, models the prediction problem into the common prediction problem of two demands, and provides the multi-demand common prediction neural network by utilizing a deep learning technology, can deeply dig out the change rule of the taxi demands along with time, simultaneously captures the difference and the connection between the two demands, is simple to realize, has high prediction precision and has good generalization performance.
The invention discloses a city taxi demand prediction method based on a multitask joint prediction neural network, which comprises the following steps of:
step S10, collecting passenger carrying data of taxis in a set historical time period of a set city through a traffic data collecting device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
step S20, counting taxi getting-on demands and getting-off demands of taxies in the set historical time period based on the taxi passenger carrying data in the set historical time period;
step S30, normalizing the taxi getting-on demand and the taxi getting-off demand and adding Gaussian random noise processing to obtain preprocessed data;
step S40, acquiring a normalized getting-on demand predicted value and a normalized getting-off demand predicted value corresponding to the preprocessed data through the trained multi-task co-prediction neural network;
and step S50, performing inverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain the getting-on demand and the getting-off demand of the taxi in the next time period of the set city.
In order to more clearly describe the urban taxi demand prediction method based on the multitask co-prediction neural network, the following describes each step in the embodiment of the method in detail with reference to fig. 1.
The urban taxi demand prediction method based on the multitask co-prediction neural network comprises the following steps of S10-S50, wherein the steps are described in detail as follows:
step S10, collecting passenger carrying data of taxis in a set historical time period of a set city through a traffic data collecting device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi carrying passengers.
The traffic data acquisition device comprises but is not limited to a global positioning system device, a video detector, an induction type annular coil detector, an automatic vehicle positioning device, online taxi taking software and the like; the data storage mechanism can be a taxi operation company, a network taxi appointment platform or a government management department and the like.
The taxi as referred to herein includes taxis, net appointments, and the like.
The region where the model predicts is consistent with the region where the model training data is acquired.
And step S20, counting the taxi getting-on demand and the taxi getting-off demand in the set historical time period based on the taxi passenger carrying data in the set historical time period.
And step S30, normalizing the taxi getting-on demand and the taxi getting-off demand and adding Gaussian random noise to obtain preprocessed data.
The method for normalizing the getting-on demand and the getting-off demand of the taxi is shown as the formula (1):
Figure BDA0002451493620000091
wherein v isnRepresenting the value of the normalized variable, v representing the value of the variable to be normalized within the range, [ v [ [ v ] ofmin,vmax]Is the value range of the variable v.
The method of adding Gaussian random noise processing is shown as the formula (2):
Figure BDA0002451493620000092
wherein, x represents the original data,
Figure BDA0002451493620000093
represents the original data added with Gaussian random noise, lambda ∈ (0, 1)]For the noise scale factor, N (0, 1) is a random number that is distributed over the standard positive range.
And step S40, acquiring a normalized getting-on demand predicted value and a normalized getting-off demand predicted value corresponding to the preprocessed data through the trained multi-task co-prediction neural network.
As shown in fig. 2, a schematic diagram of a multi-demand co-prediction neural network training process of an embodiment of the urban taxi demand prediction method based on a multi-task co-prediction neural network of the present invention is shown, and the specific process includes:
and step B10, acquiring taxi passenger carrying data for setting a historical time period in the city. After the research area is determined, a batch of samples of taxi operation needs to be collected as a historical data set in order to train the model. The data required to be collected comprises the longitude, latitude, date and time of getting on and off of all normally running taxis in a given area by each passenger-carrying transaction passenger.
Step B20, dividing the set city into rectangular grids with set sizes, dividing the set historical time period into time blocks with set lengths, dividing the taxi passenger carrying data into a taxi getting-on demand and a taxi getting-off demand, and carrying out classified summary statistics on the taxi passenger carrying data aiming at each time block of each rectangular grid area to obtain taxi getting-on demands and taxi getting-off demands corresponding to each time block of each grid area as sample sets.
"divide the set city into rectangular grids of set size", its method is:
step B201, the minimum and maximum values of the set city longitude are set as aminAnd amaxThe maximum value of latitude is bminAnd bmaxThe size of the rectangular grid is the longitude direction m and the latitude direction n.
Step B202, dividing the GPS coordinates (a, B) of the taxi carrying passengers to get on or off the taxi into the rectangular grids of the ith row and the jth column, as shown in formula (3):
Figure BDA0002451493620000101
according to the formula (3), the GPS coordinates of each taxi passenger getting-on/off place can be divided into a unique rectangular grid.
Selecting T as the time length of a time block, dividing the time block into certain time blocks according to the time of getting on or off the taxi recorded by carrying passengers once, and setting the starting time of historical data as T0And for the getting-on or getting-off time t of a taxi carrying passengers, the sequence number of the time period to which the taxi belongs is as follows:
Figure BDA0002451493620000102
and counting the total getting-on and getting-off of each rectangular grid in each small time period to serve as the taxi getting-on demand and the taxi getting-off demand of the grid region in each small time period.
For a transaction of carrying passengers in a taxi, the serial numbers of the rectangular grids and the time blocks to which the passengers get on and off the taxi belong can be calculated according to the time and longitude and latitude of the passengers getting on and off the taxi. And counting the number of passenger-carrying transactions of getting on or off the taxi in each rectangular grid area in each time block, so as to calculate the taxi getting-on demand and the taxi getting-off demand of each rectangular grid area in each time block.
And step B30, carrying out normalization and Gaussian random noise addition processing on each sample in the sample set to obtain a preprocessed sample data set.
The data is processed into a form satisfying the input of the multitask co-prediction model by performing the normalization of the data and the gaussian random noise addition processing in the same manner as in step S30.
And B40, dividing the preprocessed sample data set into a training set and a test set according to a preset proportion.
The raw data is sorted into a sample set according to a certain prediction step size, for example, historical 8 time steps are used for predicting a future time step. The sample set is then divided into a training set and a test set.
And according to the scale of the sample set, dividing the sample set into a training set and a testing set according to a certain proportion. If the data size is large, 80% of samples can be selected as a training set, and the rest 20% can be used as a testing set; if the data volume is small, the training set and the test set can be divided in a K-fold cross validation mode so as to fully utilize all data.
And step B50, constructing initial multi-task co-prediction neural networks of various types based on the feedforward neural network and the deep neural network of the set type, and for each network in the initial multi-task co-prediction neural networks of various types, training and adjusting the structure and the hyper-parameters of the network through a training set to obtain the multi-task co-prediction neural networks of various types.
Step B51, building a taxi demand data classifier by using a feedforward neural network, as shown in fig. 3, which is a schematic diagram of the taxi demand data classifier according to an embodiment of the urban taxi demand prediction method based on the multitask joint prediction neural network, wherein the input is the getting-on and getting-off demand amount, and the output is the sequence of the time period corresponding to the demand in one day, and the neural network is trained and optimized.
The time of day is divided into P shares, and for the taxi demand of each time period, the taxi demand corresponds to one of the P shares, which can be modeled as a classification problem, and a full-connection layer neural network is used for fitting the corresponding relation. The data are processed into a sample set which takes taxi demands as input and takes the sequence of the taxi demands in one day as output, and a classifier of the taxi demand data corresponding to the time sequence number in one day can be trained. The neural network can be used for extracting different change rules of the car renting requirements at different times in one day.
After the training of the classifier is finished, the front layers can be used as a feature encoder, and the relation features between the required data and the time sequence can be extracted.
And step B52, building a multi-task co-prediction neural network by using the L STM, 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 getting-on demand prediction and taxi getting-off demand prediction, taxi demand data in a history period of time is used as input, and a real demand value is used as a prediction label to train the neural network.
As shown in FIG. 4, the schematic diagram of the multi-demand co-prediction neural network structure of the urban taxi demand prediction method based on the multi-task co-prediction neural network is divided into 3 parts, the first part is a single demand prediction L STM network located at the upper end and the lower end, the input of the single demand prediction L STM network is the getting-on or getting-off demand with a certain historical step length, and the output of the single demand prediction L STM network is the demand corresponding to the next time step.
Let xtFor the input vector at the t-th time step, L STM is calculated as shown in equation (4) to equation (9):
ft=σ(Wf·[ht-1,xt]+bf) Formula (4)
it=σ(Wi·[ht-1,xt]+bi) Formula (5)
ot=σ(Wo·[ht-1,xt]+bo) Formula (6)
Figure BDA0002451493620000121
Figure BDA0002451493620000122
ht=ot*tanh(Ct) Formula (9)
The loss function of the multitask co-prediction neural network is divided into three parts, wherein the first part is the Mean Square Error (MSE) between the single-demand predicted value and the real value, the second part is the Mean Square Error between the two-demand co-predicted value and the real value, and the third part is the Mean Square Error between the single-demand predicted value and the co-predicted value. The MSE is calculated as shown in equation (10):
Figure BDA0002451493620000123
wherein N is the total number of samples,
Figure BDA0002451493620000124
is the predicted value, x, of the taxi demand vector output by the modeliIs the corresponding true value. When the deep neural network is trained, forward propagation is firstly carried out, then the MSE loss is calculated according to a loss function, and then a Back Propagation (BP) algorithm is used for adjusting the parameters of the network until the MSE loss converges.
The number of layers, the learning rate, the prediction step length and the like of the depth model can be adjusted slightly, and the performance of the depth model can be trained and tested to find the optimal structure and the optimal hyper-parameters of the depth model.
The network structure shown in fig. 4 is only one example of a multitask joint prediction neural network model, and the L STM structure can be replaced by other deep learning units, such as a Convolutional Neural Network (CNN), a Gated Recurrent Unit (GRU), and the like.
And step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of all classes, and acquiring the average prediction error of the multi-task co-prediction neural network of any class on the test set.
And when the prediction accuracy of the model is tested, the test set is used as input, only forward propagation is carried out, and the predicted value given by the model is obtained. And then, according to the comparison between the predicted value and the actual value, calculating the average absolute error (MAE) as the measure of the prediction accuracy of the model. The calculation method of MAE is shown in formula (11):
Figure BDA0002451493620000131
wherein N represents the number of predicted values obtained by the multitask co-prediction neural network of the current category on the test set,
Figure BDA0002451493620000132
and xiAnd obtaining a predicted value and a corresponding real value on the test set by the multi-task co-prediction neural network representing the current category.
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, and the network with the minimum average prediction error in the multi-task co-prediction neural networks of all classes is the optimal model structure and parameters, so that the trained multi-task co-prediction neural network is obtained.
And step S50, performing inverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain the getting-on demand and the getting-off demand of the taxi in the next time period of the set city.
"inverse normalization is performed on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value", and the method is as shown in formula (12):
vcalculate=vcalculate-n*(vmax-vmin)+vminformula (12)
Wherein v iscalculate-nRepresenting normalized variable predictors, vcalculateRepresents the value of the variable after denormalization, [ vmin,vmax]Is a variable vcalculateA range of values of (c).
The urban taxi demand prediction system based on the multitask 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 collect passenger carrying data of taxis in a set historical time period of a set city through the traffic data collection device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
the data statistics module is configured to count taxi getting-on demands and taxi getting-off demands of taxies 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 getting-on demand and the taxi getting-off demand to obtain a normalized taxi getting-on demand and a normalized taxi getting-off demand;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi getting-on demand and the normalized taxi getting-off demand to obtain preprocessed data;
the demand prediction module is configured to obtain a normalized getting-on demand prediction value and a normalized getting-off demand prediction value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
the reverse normalization module is configured to perform reverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain a taxi getting-on demand and a taxi getting-off demand of a set city in the next time period;
and the output module is configured to output the obtained taxi getting-on demand and taxi getting-off demand of the taxi in the next time period of the set city.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
It should be noted that, the urban taxi demand prediction system based on the multitask co-prediction neural network provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical applications, the above function allocation may be completed by different functional modules according to needs, that is, the modules or steps in the embodiment of the present invention are further decomposed or combined, for example, the modules in the above embodiment may be combined into one module, or may be further split into multiple sub-modules, so as to complete all or part of the above described functions. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not to be construed as unduly limiting the present invention.
A storage device according to a third embodiment of the present invention stores a plurality of programs, and the programs are suitable for being loaded and executed by a processor to realize the above-mentioned urban taxi demand prediction method based on the multitask co-prediction neural network.
A processing apparatus according to a fourth embodiment of the present invention includes a processor, a storage device; a processor adapted to execute various programs; 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 multitask co-prediction neural network.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Those of skill in the art would appreciate that the various illustrative modules, method steps, and modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the software modules, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a 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. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing or implying a particular order or sequence.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or 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.
So far, the technical solutions of the present invention have 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 the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. A city taxi demand prediction method based on a multitask joint prediction neural network is characterized by comprising the following steps:
step S10, collecting passenger carrying data of taxis in a set historical time period of a set city through a traffic data collecting device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
step S20, counting taxi getting-on demands and getting-off demands of taxies in the set historical time period based on the taxi passenger carrying data in the set historical time period;
step S30, normalizing the taxi getting-on demand and the taxi getting-off demand and adding Gaussian random noise processing to obtain preprocessed data;
step S40, acquiring a normalized getting-on demand predicted value and a normalized getting-off demand predicted value corresponding to the preprocessed data through the trained multi-task co-prediction neural network;
and step S50, performing inverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain the getting-on demand and the getting-off demand of the taxi in the next time period of the set city.
2. The urban taxi demand prediction method based on the multitask co-prediction neural network as claimed in claim 1, wherein the training method of the multitask co-prediction neural network is as follows:
step B10, acquiring taxi passenger carrying data for setting a historical time period in a 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 getting-on demand and a getting-off demand, and carrying out classified summary statistics on the taxi passenger carrying data aiming at each time block of each rectangular grid area to obtain the taxi getting-on demand and the taxi getting-off demand corresponding to each time block of each grid area as a sample set;
b30, carrying out normalization and Gaussian random noise addition processing on each sample in the sample set to obtain a preprocessed sample data set;
step B40, dividing the preprocessed sample data set into a training set and a test set according to a preset proportion;
step B50, constructing initial multi-task co-prediction neural networks of various categories based on the feedforward neural network and the deep neural network of the set category, and for each network in the initial multi-task co-prediction neural networks of various categories, training and adjusting the structure and the hyper-parameters of the network through a training set to obtain the multi-task co-prediction neural networks of various categories;
step B60, respectively carrying out forward calculation on the test set through each network in the multi-task co-prediction neural networks of each category to obtain the average prediction error of the multi-task co-prediction neural network of any category 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.
3. The urban taxi demand prediction method based on the multitask co-prediction neural network as claimed in claim 1, wherein in step S30, "normalization of taxi-in demand and taxi-out demand of the taxi" is performed, and the method is as follows:
Figure FDA0002451493610000021
wherein v isnRepresenting the value of the normalized variable, v representing the value of the variable to be normalized within the range, [ v [ [ v ] ofmin,vmax]Is the value range of the variable v.
4. The urban taxi demand prediction method based on the multitask co-prediction neural network as claimed in claim 1, wherein in step S30, "gaussian random noise addition processing" is performed, and the method is as follows:
Figure FDA0002451493610000022
wherein, x represents the original data,
Figure FDA0002451493610000023
represents the original data added with Gaussian random noise, lambda ∈ (0, 1)]For the noise scale factor, N (0, 1) is a random number that is distributed over the standard positive range.
5. The urban taxi demand prediction method based on the multitask co-prediction neural network as claimed in claim 1, wherein in step S50, "inverse normalization is performed on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value", and the method is as follows:
vcalculate=vcalculate-n*(vmax-vmin)+vmin
wherein v iscalculate-nRepresenting normalized variable predictors, vcalculateRepresents the value of the variable after denormalization, [ vmin,vmax]Is a variable vcalculateA range of values of (c).
6. The method for predicting the demand of the urban taxi based on the multitask co-prediction neural network as claimed in claim 2, wherein in the step B20, "the set city is divided into rectangular grids with set sizes", and the method comprises the following steps:
step B201, the minimum and maximum values of the set city longitude are set as aminAnd amaxThe maximum value of latitude is bminAnd bmaxThe size of the rectangular grid is in the longitude direction m and the latitude direction n;
step B202, dividing the GPS coordinates (a, B) of the taxi carrying passengers to get on or off the taxi into rectangular grids of the ith row and the jth column:
Figure FDA0002451493610000031
7. the method for predicting the demand of the urban taxi based on the multitask co-prediction neural network according to the claim 2, wherein in the step B60, the average prediction error of the multitask co-prediction neural network in any category on the test set is calculated by the following steps:
Figure FDA0002451493610000032
wherein N represents the number of predicted values obtained by the multitask co-prediction neural network of the current category on the test set,
Figure FDA0002451493610000033
and xiAnd obtaining a predicted value and a corresponding real value on the test set by the multi-task co-prediction neural network representing the current category.
8. A city taxi demand prediction system based on a multitask 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 collect passenger carrying data of taxis in a set historical time period of a set city through the traffic data collection device; the taxi passenger carrying data comprises longitude, latitude, time and date of getting on and off the taxi when the taxi carries passengers;
the data statistics module is configured to count taxi getting-on demands and taxi getting-off demands of taxies 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 getting-on demand and the taxi getting-off demand to obtain a normalized taxi getting-on demand and a normalized taxi getting-off demand;
the Gaussian random noise module is configured to add Gaussian random noise to the normalized taxi getting-on demand and the normalized taxi getting-off demand to obtain preprocessed data;
the demand prediction module is configured to obtain a normalized getting-on demand prediction value and a normalized getting-off demand prediction value corresponding to the preprocessed data through a trained multi-task co-prediction neural network;
the reverse normalization module is configured to perform reverse normalization on the normalized getting-on demand predicted value and the normalized getting-off demand predicted value to obtain a taxi getting-on demand and a taxi getting-off demand of a set city in the next time period;
and the output module is configured to output the obtained taxi getting-on demand and taxi getting-off demand of the taxi in the next time period of the set city.
9. A storage device having stored therein a plurality of programs, wherein the programs are adapted to be loaded and executed by a processor to implement the method for urban taxi demand prediction based on a multitasking co-prediction neural network according to any one of claims 1-7.
10. A treatment apparatus comprises
A processor adapted to execute various programs; 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 perform:
the urban taxi demand prediction method based on the multitask co-prediction neural network according to any one of claims 1-7.
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 true CN111507762A (en) 2020-08-07
CN111507762B 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)

Cited By (6)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180197071A1 (en) * 2017-01-12 2018-07-12 International Business Machines Corporation Neural network computing systems for predicting vehicle requests
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180197071A1 (en) * 2017-01-12 2018-07-12 International Business Machines Corporation Neural network computing systems for predicting vehicle requests
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

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330215A (en) * 2020-11-26 2021-02-05 长沙理工大学 Urban vehicle demand prediction method, equipment and storage medium
CN112330215B (en) * 2020-11-26 2024-02-02 长沙理工大学 Urban vehicle demand prediction method, equipment and storage medium
CN113807758A (en) * 2020-12-02 2021-12-17 北京京东振世信息技术有限公司 Data generation method and device
CN113807758B (en) * 2020-12-02 2023-11-03 北京京东振世信息技术有限公司 Data generation method and device
CN112488422A (en) * 2020-12-16 2021-03-12 东南大学 Multi-mode travel demand prediction method based on multi-task learning
CN112861925A (en) * 2021-01-18 2021-05-28 中国科学院自动化研究所 Deep learning network-based multi-region vehicle demand prediction method and system
CN112861925B (en) * 2021-01-18 2023-04-07 中国科学院自动化研究所 Deep learning network-based multi-region vehicle demand prediction method and system
CN114239929A (en) * 2021-11-30 2022-03-25 东南大学 Taxi traffic demand characteristic prediction method based on random forest
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

Also Published As

Publication number Publication date
CN111507762B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
CN111507762A (en) Urban taxi demand prediction method based on multi-task co-prediction neural network
CN110599767A (en) Long-term and short-term prediction method based on network taxi appointment travel demands
CN103632212B (en) System and method for predicating time-varying user dynamic equilibrium network-evolved passenger flow
CN110555990B (en) Effective parking space-time resource prediction method based on LSTM neural network
Chen et al. Uncertainty in urban mobility: Predicting waiting times for shared bicycles and parking lots
CN113077090A (en) Passenger flow prediction method, system and computer readable storage medium
CN109376906B (en) Travel time prediction method and system based on multi-dimensional trajectory and electronic equipment
CN106022541A (en) Arrival time prediction method
CN111753910A (en) Method and device for predicting drip order demand based on LSTM
Li et al. Deep learning based parking prediction on cloud platform
CN111160622A (en) Scenic spot passenger flow prediction method and device based on hybrid neural network model
CN113362637B (en) Regional multi-field-point vacant parking space prediction method and system
CN110796317A (en) Urban taxi scheduling method based on demand prediction
CN115830848A (en) Shared parking space intelligent distribution system and method based on LSTM model
CN116432806A (en) Rolling prediction method and system for flight ground guarantee node time
Wu et al. A novel dynamically adjusted regressor chain for taxi demand prediction
CN114418606A (en) Network taxi appointment order demand prediction method based on space-time convolutional network
CN113593217A (en) Traffic police force commanding and dispatching method, equipment and readable storage medium
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
CN112669595A (en) Online taxi booking flow prediction method based on deep learning
CN116935643A (en) Traffic management method, device, equipment and storage medium
CN114254250B (en) Network vehicle travel demand prediction method considering space-time non-stationarity
CN113792945B (en) Dispatching method, device, equipment and readable storage medium of commercial vehicle
CN115456238A (en) Urban trip demand prediction method based on dynamic multi-view coupling graph convolution

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