Summary of the invention
The present invention provides a kind of traffic trip method for predicting to solve the deficiency of above-mentioned technology.
In order to solve the above-mentioned technical problem, a kind of traffic trip method for predicting, it is characterised in that: the construction method
Include the following steps: step 1, external traffic data on flows and ambient weather data are obtained and obtained initial data, benefit
The ambient weather parameter after quantifying is respectively obtained with initial data and the corresponding magnitude of traffic flow is joined in real time with ambient weather parameter
Ambient weather parameter and traffic flow parameter are handled and are stored to database, step 3, according to number by number, step 2
The biggish parameter of relevance is analyzed and obtains using different being associated property of analysis method according to the difference of the data type in library,
Step 4 carries out Method Modeling using the biggish parameter combination algorithm of relevance, predicts following magnitude of traffic flow.
After the above method, a kind of core concept of traffic trip method for predicting is obtained based on big data
Under background, establish Database Systems, then the data in Database Systems carry out analysis comparison, obtain relevance it is biggish because
Element, then these factors are modeled, prediction chart is made, road where future can be thus speculated according to previous data
The traffic trip flow of mouth, and data acquiring mode mainly includes business investigation, related system combing and dependency number in step 1
According to acquisition three parts content.Business investigation is mainly unfolded in a manner of interview, forms investigation scheme by discussion, and determining finally needs
It asks.Related system combing is mainly based upon road traffic flow real current situation, lists needed for prediction road traffic flow analysis
Related data detail combs out road traffic flow related data information system.Related data obtains mainly from road traffic
Road traffic flow related data is obtained in flow relevant information system, and is arranged and formed road traffic flow data acquisition system.Step
Database is established in rapid two mainly based on computer hardware, is divided into data acquisition, database design and Database three
Big step.Data acquisition: data are exported based on road traffic flow related system, database is imported in the form of Excel, realize system
System is docked with the artificial of library.Database design: using data derived from system as substrate, in conjunction with corresponding professional knowledge, to data
Library carries out corresponding Table Design.Database: data and designed table are combined, and data is made to can be realized increasing
It revises and looks into, realize the foundation of database.
As a further improvement of the present invention, the external traffic data on flows includes capturing place, and bayonet title is captured
Time, the ambient weather data include the highest temperature, lowest temperature, weather, wind direction, wind-force.
After the above method, above-mentioned data are possible be with the data class that influences the relevant property of road traffic travel amount
Type, by obtaining the modeling datas such as external traffic data on flows and ambient weather data from channels such as traffic department, weather sites.
As a further improvement of the present invention, by external traffic data on flows and ambient weather data respectively with obtain ring
Corresponding Real-Time Traffic Volume carries out pearson correlation analysis when the weather data of border, obtains correlation coefficient r related with the degree of association,
The value range of correlation coefficient r are as follows: -1≤r≤1, it is stronger closer to ± 1 relevance, it is weaker closer to 0 relevance, it is positive and negative
Indicate related direction, positive to indicate to be positively correlated, bearing indicates negatively correlated.
After the above method, since the embodiment mode of relevance is varied, the status based on data, this item number
It also include numeric type variable according to both including classification type variable, therefore, with pearson correlation analysis and Spearman correlation analysis two
Kind method can be adapted to different types of variable format comprehensively, it is possible thereby to seek out the Main Factors for influencing the magnitude of traffic flow, realize
Information characteristics identification provides data basis for traffic trip prediction.
After the above method, the Pearson correlation coefficients r in pearson correlation analysis quantifies to measure gap scale
Two spacing variables degree of correlation, be to establish that the relevance that a related coefficient both is embodied is strong and weak, and the coefficient is exhausted
To value closer to 1, show that the relevance of the two is stronger, closer to 0, indicates weaker, related coefficient is based on product moment method
It calculates, is equally to be multiplied by two deviations based on the deviation of two variables and respective average value to reflect phase between two variables
Pass degree generally represents related coefficient with r.
As a further improvement of the present invention, the relevance obtained after the analysis of pearson correlation analytic approach is analyzed,
The weaker parameter of relevance is subjected to secondary analysis using Spearman analytic approach.
After the above method, for the variable using different scale, the index for measuring its degree of correlation is different,
For the degree of correlation between two spacing variables being quantified with gap scale, Pearson correlation coefficients measurement is generallyd use, and it is right
Degree of correlation between two ordinal datas quantified with order scale, generallys use Spearman rank correlation coefficient to survey
Amount.So carrying out secondary analysis after the relevance result obtained after the analysis of pearson correlation analytic approach is to guarantee variable
Relationship between variable can be excavated thoroughly.
As a further improvement of the present invention, correlation coefficient r is provided in the pearson correlation analysis method, setting becomes
Measuring x indicates the external environment factor, and setting variable y indicates the average value of corresponding traffic trip amount and variableAndRoot
According to pearson correlation analysis method calculation formula it can be concluded thatThe Spearman phase
It closes in analysis method and is provided with ordinal data degree of association parameter, and it is R that ordinal data degree of association parameter, which is arranged, and variable x is arranged
Indicate the external environment factor, setting variable y indicate corresponding traffic trip amount and variable x incremental arrangement grade with it is corresponding
The difference Di and number of samples n of variable y incremental arrangement grade, according to the calculation formula of Spearman correlation analysis method it can be concluded that
It, can be to some using the degree of association that the analysis method calculation formula of Spearman obtains after the above method
Ordinal data is analyzed.
As a further improvement of the present invention, the model in the step 4 is multiple linear regression model, and with polynary
Regression parameter fitting is carried out using least squares estimate based on linear regression model (LRM), forms traffic trip volume forecasting mould
Type, wherein regression coefficient βiAnd regression constant β0Parameter fitting target component y=β is obtained by least square method0+β1x1+ei,xiIndicate the sample data of factor X, yiIndicate factor Y's
Sample data, ξ are random error.
After the above method, least square method is a kind of mathematical optimization techniques.It passes through square for minimizing error
With the optimal function matching for finding data.Unknown data can be easily acquired using least square method, and these are asked
The quadratic sum of error is minimum between the data and real data obtained.Pass through model and substitutes into external environment weather data come to friendship
Through-current capacity is predicted.
Specific embodiment
The construction method includes the following steps: step 1, and external traffic data on flows and ambient weather data are carried out
Initial data is obtained and obtains, initial data is handled and stored to database by step 2, step 3, according to data
The biggish parameter of relevance is analyzed and obtained to the difference of data type in library using different being associated property of analysis method, walks
Rapid four, Method Modeling is carried out using the biggish parameter combination algorithm of relevance, following magnitude of traffic flow is predicted.
A kind of core concept of traffic trip method for predicting is to establish database under the background obtained based on big data
System, then data in Database Systems carry out analysis comparison, obtain the biggish factor of relevance, then carry out to these factors
Modeling, is made prediction chart, the traffic trip flow at crossing where future can be thus speculated according to previous data, and
Data acquiring mode mainly includes that business investigation, related system combing and related data obtain three parts content in step 1.Industry
Business investigation is mainly unfolded in a manner of interview, is formed investigation scheme by discussion, is determined final demand.Related system combing is main
It is based on road traffic flow real current situation, related data detail needed for listing prediction road traffic flow analysis combs out
Road traffic flow related data information system.Related data, which obtains, mainly to be obtained from road traffic flow relevant information system
Road traffic flow related data is taken, and arranges and forms road traffic flow data acquisition system.It is main that database is established in step 2
Based on computer hardware, it is divided into data acquisition, database design and the big step of Database three.Data acquisition: it is based on
Road traffic flow related system exports data, and database is imported in the form of Excel, and the system of realization is docked with the artificial of library.Number
It is designed according to library: using data derived from system as substrate, in conjunction with corresponding professional knowledge, corresponding table being carried out to database and is set
Meter.Database: data and designed table are combined, and so that data is can be realized additions and deletions and is changed and are looked into, and realize database
Foundation.
The external traffic data on flows includes capturing place, and bayonet title captures time, the ambient weather data packet
Include the highest temperature, lowest temperature, weather, wind direction, wind-force.Above-mentioned data are possible property relevant with road traffic travel amount is influenced
Data type is built by obtaining external traffic data on flows and ambient weather data etc. from channels such as traffic department, weather sites
Modulus evidence.
By external traffic data on flows and ambient weather data respectively with obtain ambient weather data when it is corresponding in real time
The magnitude of traffic flow carries out pearson correlation analysis, obtains correlation coefficient r related with the degree of association, the value range of correlation coefficient r
Are as follows: -1≤r≤1, closer to 0 relevance weaker, positive and negative expression related direction stronger closer to ± 1 relevance are positive to indicate
It is positively correlated, bearing indicates negatively correlated.Since the embodiment mode of relevance is varied, the status based on data, this project data was both
It also include numeric type variable comprising classification type variable, therefore, with pearson correlation analysis and two kinds of sides of Spearman correlation analysis
Method can be adapted to different types of variable format comprehensively, it is possible thereby to seek out the Main Factors for influencing the magnitude of traffic flow, realize information
Feature identification provides data basis for traffic trip prediction.Pearson correlation coefficients r in pearson correlation analysis measures difference
The degree of correlation of two spacing variables of carpenters square metrization is that establish the relevance that a related coefficient both is embodied strong
Weak, for the absolute coefficient closer to 1, the relevance both shown is stronger, closer to 0, indicates weaker, related coefficient be by
Product moment method calculates, and is equally to be multiplied by two deviations based on the deviation of two variables and respective average value to reflect two
Degree of correlation between variable generally represents related coefficient with r.
The relevance obtained after the analysis of pearson correlation analytic approach is analyzed, the weaker parameter of relevance is used this
Joseph Pearman analytic approach carries out secondary analysis.For the variable using different scale, the index for measuring its degree of correlation is different,
For the degree of correlation between two spacing variables being quantified with gap scale, Pearson correlation coefficients measurement is generallyd use, and it is right
Degree of correlation between two ordinal datas quantified with order scale, generallys use Spearman rank correlation coefficient to survey
Amount.So carrying out secondary analysis after the relevance result obtained after the analysis of pearson correlation analytic approach is to guarantee variable
Relationship between variable can be excavated thoroughly.
It is provided with ordinal data degree of association parameter in the Spearman correlation analysis method, and ordinal data pass is set
Connection degree parameter is R, and setting variable x indicates the external environment factor, and setting variable y indicates corresponding traffic trip amount and variable x
The difference Di and number of samples n of incremental arrangement grade and corresponding variable y incremental arrangement grade, according to Spearman correlation analysis side
The calculation formula of method it can be concluded thatIt is obtained using the analysis method calculation formula of Spearman
The degree of association some ordinal datas can be analyzed.Model in the step 4 is multiple linear regression model, and with
Regression parameter fitting is carried out using least squares estimate based on multiple linear regression model, forms traffic trip volume forecasting
Model, wherein regression coefficient βiAnd regression constant β0Parameter fitting target component y=β is obtained by least square method0+β1x1+
ei,xiIndicate the sample data of factor X, yiIndicate factor Y's
Sample data, ξ are random error.Least square method is a kind of mathematical optimization techniques.It is sought by minimizing the quadratic sum of error
The optimal function of data is looked for match.Unknown data can be easily acquired using least square method, and these are acquired
The quadratic sum of error is minimum between data and real data.Pass through model and substitutes into external environment weather data come to traffic flow
Amount is predicted.