Intelligent Traffic Flow Prediction and Analysis Based on Internet of Things and Big Data

Nowadays, the problem of road traffic safety cannot be ignored. Almost all major cities have problems such as poor traffic environment and low road efficiency. Large-scale and long-term traffic congestion occurs almost every day. Transportation has developed rapidly, and more and more advanced means of transportation have emerged. However, automobile is one of the main means of transportation for people to travel. In the world, there are serious traffic jams in almost all cities. The excessive traffic flow every day leads to the paralysis of the urban transportation system, which brings great inconvenience and impact to people's travel. Various countries have also actively taken corresponding measures, i.e., traffic diversion, number restriction, or expanding the scale of the road network, but these measures can bring little effect. Traditional intelligent traffic flow forecasting has some problems, such as low accuracy and delay. Aiming at this problem, this paper uses the model of the combination of Internet of Things and big data to apply and analyze its social benefits in intelligent traffic flow forecasting and analyzes its three-tier network architecture model, namely, perception layer, network layer, and application layer. Research and analyze the mode of combining cloud computing and edge computing. From the multiperspective linear discriminant analysis algorithm of the combination method of combining the same points and differences between data and data into multiple atomic services, intelligent traffic flow prediction based on the combination of Internet of Things and big data is performed. Through the monitoring and extraction of relevant traffic flow data, data analysis, processing and storage, and visual display, improve the accuracy and effectiveness and make it easier to improve the prediction accuracy of overall traffic flow. The traffic flow prediction of the system of Internet of Things and big data is given through the case experiment. The method proposed in this paper can be applied in intelligent transportation services and can predict the stability of transportation and traffic flow in real time so as to optimize traffic congestion, reduce manual intervention, and achieve the goal of intelligent traffic management.


Introduction
At present, almost all major cities have problems such as poor traffic environment [1] and low road efficiency. Large area and long-term traffic congestion occurs almost every day. e extremely congested traffic every day leads to the increase of people's travel time and transportation costs and a great waste of time, energy, and money and increases the pressure of urban life [2]. In the development of urbanization [3], traffic congestion [4] is one of the main urbanization problems that need to be solved. e application of Internet of ings technology [5,6] and big data technology [7] in traditional industries has produced certain economic benefits. In the application of smart transportation and the construction of smart cities [8], traffic data can be quickly collected by using Internet of ings technology, and traffic flow prediction can be realized by using big data technology. Sensor technology [9], as an important data acquisition source in the Internet of ings, can realize fast and stable data transmission and fast storage and analysis [10]. Intelligent transportation can rely not only on the algorithm model [11], but also on the historical data of road traffic. Big data technology is used to process large-scale data and high-dimensional data [12] and capture the data in real time, quickly and effectively. Big data has four characteristics: magnanimity, diversity, efficiency, and variability. e combination of these four characteristics provides basic support for traffic flow data. Establish the corresponding intelligent traffic flow data analysis system based on big data analysis, extract the historical data of road traffic from the specific traffic system [13], analyze and process these data to form structured traffic flow data, and then store the analyzed structural data in the corresponding target server database [14]. Finally, real-time, effective, and accurate traffic flow data are obtained through Internet of ings technology. is system can quickly analyze the changes of various types of data, accurately predict these changes, and screen the information accordingly. In the intelligent traffic flow prediction model based on intelligent data analysis and application, intelligent technology integration is realized through Internet of ings technology and sensor application [15], such as fiber Bragg grating sensor [16], positioning technology [17], RFID application [18], and wireless sensor technology [19]. How to use big data technology and Internet of ings technology in the field of intelligent transportation has become an important technical means of transportation application in the future.
rough intelligent transportation technology, traffic accidents can be handled immediately, cost can be saved, and the system can respond quickly and be handled in time. Under the Internet of ings technology, wireless network information has a strong antiinterference and high positioning accuracy. erefore, the application of big data and Internet of ings technology in traffic flow forecasting can alleviate urban traffic pressure and is one of the important indicators in realizing smart cities. erefore, Internet of ings and big data can be widely used in modern cities, and the development of traditional industries can also be realized.

Traffic Flow
Characteristics. e transportation system is huge and complex, and there are many factors that can cause the poor operation state of traffic flow, such as the changeable weather and the occurrence of accidents. Small changes in the external environment can have a great impact on it, and the performance state of each face is complex, random, and irregular, with obvious dynamic characteristics. erefore, it becomes very difficult to accurately predict. Hence, it is necessary to comprehensively consider the prediction and analysis of traffic flow, generally from spatial and traffic timeliness. e spatial characteristics of traffic flow means that when observing traffic flow, the parameters of traffic flow at the observation site are inseparable and the traffic state at the observation site is generally directly affected by the overall traffic flow. When the distance of the predicted road section increases, the influence degree decreases; when the distance of the predicted road section decreases, the degree of impact becomes greater.
According to the traffic flow in the past, the change has periodicity, which exists every day, every week, every quarter, and even every year. Looking at the traffic flow every day, it is not in a balanced state as a whole, but obviously has great fluctuations, such as morning peak and evening peak. During these two peak periods, the traffic flow and road congestion are extremely serious compared with the normal time, which is unmatched by the traffic flow in general time. Similarly, if one year is used to analyze the periodicity of traffic flow, the periodicity of traffic flow in each quarter is also very different. erefore, the traffic flow will roughly show periodic changes due to external factors. erefore, it is precisely because the traffic flow shows periodic characteristics that the prediction of traffic flow becomes feasible. e randomness in the time characteristics of traffic flow is mainly reflected in the short-term traffic flow. In the whole transportation system, people mainly manipulate vehicles, whether drivers driving or pedestrians walking on the road, which will affect the whole transportation system. People's behavior cannot be predicted. Sometimes just because of a small action to run the red light, it may cause an irreparable situation; the diversity of vehicle types will also lead to the change of traffic flow. ese are unpredictable events, which makes the randomness of traffic flow stronger. Randomness is also a factor that must be considered in real traffic prediction, which increases the difficulty of traffic flow prediction.
Jiao tong traffic flow prediction will predict the traffic flow data of the road section in the past period, process and analyze the real-time dynamic data collected by wireless sensors and other devices, and use the characteristics of the data to predict the traffic flow of the current road section in the future, as shown in Figure 1.
To predict the circulation flow in the future, it must be based on historical data. Firstly, historical traffic data are collected for data preprocessing, the system starts training the data, calculates the prediction model through real-time data, obtains the prediction data, and finally converts the analysis results into charts and other visual results to respond to users.

Traffic Flow Prediction
Method. Now, there are generally three methods to realize traffic flow prediction, namely, parameter prediction method, nonparametric prediction method, and combined parameter prediction method, which are shown in Figure 2.
Traffic flow forecasting methods are divided into parametric methods, nonparametric methods, and combined forecasting methods. Among them, parametric methods can be divided into linear and nonlinear styles. e linear method can be subdivided into time series method, historical average algorithm, smoothing algorithm, and filtering algorithm; nonlinear methods can be divided into wavelet analysis, catastrophe theory, and chaos theory; nonparametric methods include support vector machine, nonparametric regression, neural network, and fuzzy logic; combined forecasting method is the combination of two or more forecasting methods to achieve the effect of joint forecasting. It adopts the clustering combination model, decomposition combination model, and prediction result fusion model technology.

Intelligent Transportation Technology in Internet of
ings and Big Data. e application of Internet of ings technology in intelligent transportation has become the main way to relieve traffic pressure. Integrating Internet of ings technology into intelligent traffic flow prediction can make traffic roads smarter and make cities develop faster and more harmoniously. e key technologies are shown in Figure 3.
In Figure 3, intelligent transportation technology in Internet of ings mainly includes data collection, data analysis, data processing, data storage, and data sharing. e problem to be solved in the road traffic flow data analysis service environment is how to timely analyze the diverse characteristics of traffic flow data, so as to provide accurate services. It should have the ability to enhance service value, mine data value, and reduce response time.
After big data analysis, it will analyze, process, and calculate the object data according to relevant algorithms and provide the service. e basic process of the big data analysis service mode is shown in Figure 4 (online mode) and Figure 5 (offline mode).
is mode has high real-time requirements and slightly small data throughput. e collected data will not be stored, and the results will be calculated directly in memory. Finally, the analysis results will be directly transformed into visual results to respond to the user. For the offline big data service mode, the biggest difference from the online mode is that it will store the collected historical data and real-time data in the disk. When the data needs to be processed, it will load, process, and calculate in the memory, and finally convert the analysis results to the user. is offline service mode is characterized by low real-time requirements and deep mining of data.  Computational Intelligence and Neuroscience same data from different angles or ways is the method of multiperspective data learning. Data have multiple feature sets. e data obtained from multiple feature sets have different attributes, and these attributes are revealed from different levels and different perspectives. Such data are called multiperspective data. In multiview data learning, there are various analysis technologies, among which the canonical correlation analysis (CCA) and collaborative training technology are the most representative.

Multiperspective-Based
CCA is a multivariate statistical method of the crosscovariance matrix, which reflects the overall correlation through the correlation between various variables. U 1 and V 1 represent two sets of variables and are linearly combined to reveal the dependence of the variables on the whole. According to relevant research, canonical correlation analysis acts on the data represented by two or more perspectives and finds two linear transformations for each perspective. Assuming that there are data sets (x 1 , y 1 ), · · ·, (x m , y m )} and X � [x 1 , · · ·x m ], Y � [y 1 , · · ·y m ], the formula is as follows: w x and w y are the two projection directions to maximize the linear correlation coefficient, and C xy is defined as follows: m x and m y are the average of the two perspectives, defined as follows: at is, the objective function of typical correlation analysis technology can be obtained: max w x , w y w T x C xy w y , s.t. w T x C yy w y � 1.

(4)
e corresponding Lagrange function is as follows: If for w x and w y , take the derivative respectively and make it 0, then the formulas are as follows: Using these two formulas, we can get λ y � λ x , If λ y − λ x � λ, C yy is reversible. en you can get w y :

Computational Intelligence and Neuroscience
Similarly, the generalized eigenvalue decomposition problem can be obtained as follows: Finally, in order to make λ 2 , if the relationship between the eigenvalue and the correlation coefficient is clearer, the rewriting objective function is defined as follows: You can get λ is a positive correlation solution which affects the correlation of the projection; therefore, the range of λ must vary between [−1, +1].
Finally, according to the calculation results, the biggest feature of using the canonical correlation analysis is that there will be an overfitting of relevant features, and the normalized useful mode will be used, i.e., the function is defined as follows:  Computational Intelligence and Neuroscience where τ x and τ y are in the change of [0, 1], and the latest statistical analysis believes that regularization is a reasonable standard method to control the projection direction, which will maximize the correlation between the two perspectives and minimize the difference in square loss in each perspective.

Prediction of Traffic
Flow. e so-called traffic flow prediction, through the use of information technology on historical data, finds the rules and predictions of traffic operation, thus effectively reducing communication, congestion, and accidents.
In this paper, the Markov model is used to effectively study and analyze the historical data of AC traffic.
In the Gaussian-Markov model, vectors show normal characteristics.
Mathematical expectations are as follows: e variance covariance matrix is as follows: By calculating the expected value of the random vector Y for formula (1): e variance covariance matrix is as follows: In formula (17), b i is B i of unbiased estimation.
In formula (18), R 2 i is the negative correlation coefficient. K-order multivariate linear regression is defined as follows: e regression model is defined as follows: e least squares method is defined as follows:

Kalman Filtering Algorithm.
e Kalman algorithm is realized by using a recursive method to deduce the previous state and the current state of the data. According to the existing prediction model, the Kalman algorithm shows the state and observation equation: W k is dynamic noise, V k is the observation noise sequence, and its statistical vector is defined as follows: where Q k is the variance matrix of dynamic noise,R k is the variance matrix of observation noise, and δ kj is the Kronecker function.
X 0 is the set initial value, and the relation between W k and V k denotes independence.
If set target initial state X 0 , P 0 is OK, then get X t Tminimum square difference. 6 Computational Intelligence and Neuroscience Calculated gain is as follows:

BP Neural Network Topology.
e BP model passes through a multilayer feedforward neural network. e BP network has multilayer hidden units. Most neural networks adopt the change form of the BP network. It is different from perceptron in the network structure. Signal forward transmission is the main feature of the BP network, which is shown in Figure 6. e realization steps of the BP network can be obtained from the topological structure diagram of the BP three-layer neural network. First, initialize the network, provide training samples, calculate the output layer by layer from the input layer, such as the hidden layer and the output layer, carry out the vehicle output, and then, correct the weight to judge whether the prediction error reaches the error accuracy.

Kalman-BP Neural Network Algorithm.
e neural network prediction method can play a great role in intelligent traffic flow prediction, and it is one of the most important methods. Similar to the neural network prediction method, our method combines the Kalman algorithm and the BP algorithm and gives full play to the advantages of the two algorithms. It mainly introduces the filtering idea into the BP network, and the performance is better after the algorithm is optimized. After the above analysis, we can get the basic flow of neural network prediction as shown in Figure 7. e prediction process of the neural network can be divided into data preprocessing, network construction, network training, and network prediction. Data preprocessing refers to the input and normalization of data (training data and test data).

Experimental Simulation
e experimental data will collect the traffic volume observation data of a certain section of the highway in one year, one week, and one day respectively. e observation scale is one hour traffic flow, a total of 336 total data, 312 training data and 24 test data were obtained. Combining these field collected traffic flow observation data, the experiment will carry out data preprocessing, network construction, network training, and network prediction, and analyze the role of the Kalman filter algorithm in intelligent traffic flow prediction and analysis system from these four aspects.

Data Analysis.
e experiment will start from one month. e changes of traffic flow from three angles of one day and one hour are analyzed. e first is the analysis of the monthly traffic flow change, as shown in Figure 8.
In Figure 8, the traffic flow increased rapidly from January to February, reaching 64000 vehicles in February. From February to August, the growth was relatively stable. It showed a downward trend from August to September and from October to November. e traffic flow from September to October and from November to December is large, and the traffic flow increases rapidly.
Next is the analysis of daily traffic flow change, as shown in Figure 9.
It can be seen from the change in Figure 10 that the traffic flow increases slowly from Monday to ursday, the traffic flow fluctuates greatly from ursday to Sunday, the traffic flow on Friday is the least, and the traffic flow on Saturday and Sunday increases sharply. e analysis of the hourly traffic flow change is shown in Figure 10.
In Figure 10, the hourly traffic flow in a day is less in early morning, gradually increases at 6:00, and reaches the peak from 16:00 to 19:00 with the fastest growth. It means that there is a peak period from 16:00 to 19:00 every day.
Using the traffic flow data of the above three periods as the historical reference data, traffic volume changes periodically in days. e volume first increases gradually, reaches the peak at a certain time, then decreases gradually, and oscillates before reaching the peak. In terms of peak traffic volume, it gradually increases from Monday, increases steadily and slowly on Tuesday, Wednesday, and ursday, increases sharply on Friday and Saturday, and decreases sharply on Sunday; moreover, the total traffic volume on Friday and Saturday is also larger than usual.

Comparison of Prediction Error Value.
To verify the efficiency of the proposed method, this paper compares the errors between the predicted values and the measured values of the Kalman algorithm, BP algorithm, and Kalman BP algorithm, as shown in Figure 11. e error value of monthly traffic flow is shown in Figure 12.
Under the monthly traffic flow prediction, the Kalman BP algorithm compared with the BP algorithm and the Kalman algorithm, the Kalman BP algorithm has the lowest error value.

Algorithm Operation Speed.
e operation speed of the algorithm is very important. It is the basis for the algorithm. Its purity means that the system can run correctly and stably, greatly reducing the number of system maintenance, and judging the quality of a system depends on the stability of the algorithm.
Finally, we also compared the operation speed of traffic flow prediction of the three algorithms in three time periods, calculated in milliseconds (MS), as shown in Figures 13-15.

Conclusion
In the field of intelligent transportation, it is predicted that the current processing research stage will realize the development of intelligent transportation in smart cities. e Kalman-BP combined algorithm proposed in this paper can improve the prediction accuracy of the overall traffic flow and lower the error value. It is pointed out in this paper that there are difficulties in predictive multivariate data fusion, and higher performance optimization algorithms are needed to solve such problems. Future research works, aiming at real-time data for effective prediction, can improve the accuracy of real-time traffic prediction and lower error rate. It also considers multitask and multiplatform data real-time prediction technology supported by Internet of ings, which can be better applied to urban traffic and intelligent optimization of traffic flow.

Data Availability
e experimental data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest. Computational Intelligence and Neuroscience 11