# Design of Multiobjective Dynamic Software Development Based on Data Mining Algorithm

Authors: Zhaohui Cai; Hongbo Li; Wensheng Cui
Journal: Security and Communication Networks
 (2022)

---

## Abstract

A data mining method finds hidden patterns in massive datasets for study. It is commonly used in high-tech fields such as image processing and artificial intelligence, due to its ability to compute data statistics and pattern processing problems efficiently. This study investigates data mining in multiobjective dynamic software development based on dynamic traffic congestion prediction. Since traffic data can fluctuate at any time, it is typically challenging to develop more accurate mathematical and theoretical models. We integrate data mining techniques into the software for predicting traffic congestion and develop a new algorithm for discriminating traffic congestion. Using a combination of the 3 criteria and the SVM algorithm, along with massive amounts of data, our prediction accuracy is significantly enhanced.


---

## Body

## 1. Introduction

As automobile ownership increases and urban traffic congestion worsens, the question of how to rationally deploy existing traffic resources has become an urgent issue. Traffic congestion occurs more frequently, has the greatest impact, and lasts the longest of all traffic problems. Traffic congestion increases unnecessary fuel consumption and also causes more external costs, such as time wastage, environmental pollution, and traffic accidents; environmental pollution, in particular, is a pressing issue that must be addressed immediately [1].Frequent congestion and episodic congestion are the most prevalent forms of traffic congestion [2]. Because the current traffic volume exceeds the road’s normal carrying capacity, peak traffic hours are typically characterized by predictable congestion. Episodic congestion does not occur at a predetermined time and is typically caused by unexpected traffic accidents. Although the occurrence conditions and timing of the two types of congestion are distinct, if we are able to comprehend the characteristics of these two types of conditions and correctly identify them, we can assist traffic managers in taking timely control measures and enhancing the efficiency of traffic resources.There have been many domestic and international studies on traffic congestion, and many scholars have proposed various models, but there have been fewer studies on the algorithms for distinguishing between recurrent and episodic congestion using data mining techniques. In this paper, data mining technology is combined with practical techniques, such as statistics, learning, expert systems, pattern recognition, and others, in order to discover the law in highly complex, multidimensional, and high-volume data for the purpose of identification, control, and prediction. In recent years, both the development of the intelligent transportation system and the increase in the system’s data volume have provided a good platform and data resources for the application of data mining technology. Due to the fact that the characteristics of traffic data change over time, it is typically challenging to develop a more precise mathematical and theoretical model for distinguishing between recurrent and episodic congestion status [3]. The benefit of data mining technology is that it can extract implied laws from vast amounts of data without relying on a single model that relies on specific laws, thereby simplifying complex problems. Data mining models include nonlinear models, which are more accurate at simulating real-world scenarios than linear models. In addition, once the model of a data mining algorithm has been established, it does not need to be retrained for normal use, and the processing speed of a previously established mathematical model is very fast, ensuring real-time performance. Therefore, it is possible to design a discriminative algorithm for recurrent and episodic congestion using data mining technology.We design a combined client/server (C/S) and browser/server (B/S) architecture congestion prediction system in this paper. Officers have access to system and data mining management modules based on C/S architecture, while all road cameras can utilize the monitoring module based on B/S architecture. For the data mining module, we incorporate data mining technology into the software for predicting traffic congestion and develop a new algorithm for classifying traffic congestion. Using a combination of the 3 criteria, the SVM algorithm, and massive amounts of data, the accuracy of our predictions is significantly improved.


### 1.1. Our Contributions

(1)
A traffic congestion prediction software system is designed and embedded with data mining techniques to verify the feasibility of data mining techniques in multiobjective dynamic software development applications.(2)
The traffic congestion discrimination algorithm combines the 3σ criterion and the SVM algorithm. Experiments show that the 3σ criterion method is simple, fast, and accurate, and the SVM model is introduced to improve the fault tolerance of the model.(3)
The experiments demonstrate that our method has a strong application in traffic congestion prediction.


## 1.1. Our Contributions

(1)
A traffic congestion prediction software system is designed and embedded with data mining techniques to verify the feasibility of data mining techniques in multiobjective dynamic software development applications.(2)
The traffic congestion discrimination algorithm combines the 3σ criterion and the SVM algorithm. Experiments show that the 3σ criterion method is simple, fast, and accurate, and the SVM model is introduced to improve the fault tolerance of the model.(3)
The experiments demonstrate that our method has a strong application in traffic congestion prediction.


## 2. Related Work

### 2.1. Congestion

#### 2.1.1. Recurrent Congestion

Recurrent congestion is caused by the current traffic volume exceeding the road’s normal capacity. It typically occurs during rush hour and is characterized by predictability, temporal, and spatial recurrence. The condition of intermittent traffic congestion is inverse. Permanent bottlenecks in the flow of traffic can cause recurrent congestion. By fixed traffic bottlenecks, we refer to common bottlenecks such as intersections, a reduced number of lanes, nonstandard interchanges, poor visibility, and other bottlenecks with more fixed locations [4].Typically, recurrent traffic congestion refers to road segments where congestion occurs during peak hours, such as morning and evening rush hours. The recurrent congestion during peak hours is primarily caused by the concentration of people commuting to work, which dramatically increases the travel crowd and causes congestion on the road system [5]. People’s travel habits are relatively stable over time, so the road segments that will generate congestion are also, in theory, relatively stable. Due to the random nature of people’s travel, the congested sections are relatively dispersed during peak hours, but in general, there will be recurrent traffic congestion sections with slight variations from peak hours. The same applies to weekdays and weekends. According to the causes of congestion, traffic congestion can be divided into primary traffic congestion and secondary traffic congestion. The primary traffic congestion occurs here and spreads to neighboring road segments. When primary traffic congestion occurs on a road segment, the travel time of vehicles and the number of delays increase. When upstream drivers observe traffic congestion on this road segment, they frequently alter their driving routes and take alternative roads to complete their journeys [6]. This causes its traffic share to be distributed to other road segments, which directly results in an increase in the traffic volume of another road segment connected to the congested road segment, and causes the originally smooth road segment to also experience traffic congestion. This type of traffic congestion is known as secondary traffic congestion because of the increase in vehicle volume caused by vehicle movement. The reason for predictable and recurring traffic congestion is that the capacity at fixed bottlenecks (such as intersections) does not match the traffic demand. Important characteristic is that traffic congestion caused by fixed bottlenecks occurs repeatedly at fixed times and locations.


#### 2.1.2. Occasional Congestion

Episodic congestion is usually a traffic congestion phenomenon caused by unexpected traffic events such as vehicle breakdowns, traffic accidents, road accidents that are impassable, and special weather. The phenomenon is random in nature, and it is difficult to predict the occurrence time and place of occurrence [3]. There are five stages in the continuous process of episodic congestion: congestion identification, arrival of traffic police at the scene, formulation of diversion strategy, completion of accident treatment, and return of road operation to normal, as shown in Figure 1.Figure 1
Congestion impact phase.


### 2.2. Common Data Mining Algorithms

Data mining methods can be divided into 3 major categories: classification, association analysis, and clustering. The data mining algorithms used in this paper belong to classification algorithms. Commonly used classification methods are as follows: decision tree algorithm, support vector machine (SVM), Bayesian classifier, and artificial neural network algorithm [7]. These algorithms are characterized as follows (Figure 2):(1)
Decision tree: decision tree is a tree structure consisting of nodes and directed edges; the tree includes three kinds of nodes: root node, internal node, and leaf node or terminal node. In the decision tree, each leaf node represents a class and nonterminal node contains test conditions to separate the input values with different characteristics.In order to construct a decision tree, the probability of occurrence for each condition must be known, and classification criteria must be used to map different object input values to their corresponding object attributes. Decision tree learning is supervised. The advantage of the decision tree structure is that it is simple and straightforward to implement; the disadvantage is that it is not optimal for processing data with numerous attribute features and temporal order. Common algorithms include ID3, C4.5, and CART [8].(2)
Bayesian classifier: the theoretical basis of Bayesian classifier is Bayes’ theorem in statistics. Bayes’ theorem is that the prior probability of an event is known, and its posterior probability can be calculated according to Bayes’ formula. According to the Bayes’ theorem, the prior probability of a feature is known for each class, and the posterior probability of the feature belonging to each type is found in turn [9].Bayesian belief networks (BBN), or Bayesian networks in short, are essentially a directed acyclic graph, in which each nonroot node represents an event, and if two nodes are connected, it means that the events corresponding to these two nodes are related, and if they are not connected, it means that these two events are conditionally independent. Each node corresponds to a conditional probability table (CPT) of its own [10]. If a node has a parent node, the CPT represents the conditional probability of occurrence or nonoccurrence of an event in the child node under the condition that the event in the parent node occurs or does not occur. If the node does not have a parent, its CPT represents the prior probability distribution table of the events of the node. The Bayesian network used for classification is the Bayesian classifier commonly used in machine learning.(3)
Support vector machine (SVM): it is used to build classifier with maximal margin hyperplane, also known as maximal margin classifier, and belongs to supervised learning. SVM can be used not only as a linear classifier but also as a nonlinear classifier by introducing a kernel function for the linearly indistinguishable case. For the overfitting problem, SVM also introduces a slack variable. The disadvantage of SVM is that it is a binary classifier, and for multiclassification problems, a strategy must be adopted.Figure 2
Example of decision tree.


## 2.1. Congestion

### 2.1.1. Recurrent Congestion

Recurrent congestion is caused by the current traffic volume exceeding the road’s normal capacity. It typically occurs during rush hour and is characterized by predictability, temporal, and spatial recurrence. The condition of intermittent traffic congestion is inverse. Permanent bottlenecks in the flow of traffic can cause recurrent congestion. By fixed traffic bottlenecks, we refer to common bottlenecks such as intersections, a reduced number of lanes, nonstandard interchanges, poor visibility, and other bottlenecks with more fixed locations [4].Typically, recurrent traffic congestion refers to road segments where congestion occurs during peak hours, such as morning and evening rush hours. The recurrent congestion during peak hours is primarily caused by the concentration of people commuting to work, which dramatically increases the travel crowd and causes congestion on the road system [5]. People’s travel habits are relatively stable over time, so the road segments that will generate congestion are also, in theory, relatively stable. Due to the random nature of people’s travel, the congested sections are relatively dispersed during peak hours, but in general, there will be recurrent traffic congestion sections with slight variations from peak hours. The same applies to weekdays and weekends. According to the causes of congestion, traffic congestion can be divided into primary traffic congestion and secondary traffic congestion. The primary traffic congestion occurs here and spreads to neighboring road segments. When primary traffic congestion occurs on a road segment, the travel time of vehicles and the number of delays increase. When upstream drivers observe traffic congestion on this road segment, they frequently alter their driving routes and take alternative roads to complete their journeys [6]. This causes its traffic share to be distributed to other road segments, which directly results in an increase in the traffic volume of another road segment connected to the congested road segment, and causes the originally smooth road segment to also experience traffic congestion. This type of traffic congestion is known as secondary traffic congestion because of the increase in vehicle volume caused by vehicle movement. The reason for predictable and recurring traffic congestion is that the capacity at fixed bottlenecks (such as intersections) does not match the traffic demand. Important characteristic is that traffic congestion caused by fixed bottlenecks occurs repeatedly at fixed times and locations.


### 2.1.2. Occasional Congestion

Episodic congestion is usually a traffic congestion phenomenon caused by unexpected traffic events such as vehicle breakdowns, traffic accidents, road accidents that are impassable, and special weather. The phenomenon is random in nature, and it is difficult to predict the occurrence time and place of occurrence [3]. There are five stages in the continuous process of episodic congestion: congestion identification, arrival of traffic police at the scene, formulation of diversion strategy, completion of accident treatment, and return of road operation to normal, as shown in Figure 1.Figure 1
Congestion impact phase.


## 2.1.1. Recurrent Congestion

Recurrent congestion is caused by the current traffic volume exceeding the road’s normal capacity. It typically occurs during rush hour and is characterized by predictability, temporal, and spatial recurrence. The condition of intermittent traffic congestion is inverse. Permanent bottlenecks in the flow of traffic can cause recurrent congestion. By fixed traffic bottlenecks, we refer to common bottlenecks such as intersections, a reduced number of lanes, nonstandard interchanges, poor visibility, and other bottlenecks with more fixed locations [4].Typically, recurrent traffic congestion refers to road segments where congestion occurs during peak hours, such as morning and evening rush hours. The recurrent congestion during peak hours is primarily caused by the concentration of people commuting to work, which dramatically increases the travel crowd and causes congestion on the road system [5]. People’s travel habits are relatively stable over time, so the road segments that will generate congestion are also, in theory, relatively stable. Due to the random nature of people’s travel, the congested sections are relatively dispersed during peak hours, but in general, there will be recurrent traffic congestion sections with slight variations from peak hours. The same applies to weekdays and weekends. According to the causes of congestion, traffic congestion can be divided into primary traffic congestion and secondary traffic congestion. The primary traffic congestion occurs here and spreads to neighboring road segments. When primary traffic congestion occurs on a road segment, the travel time of vehicles and the number of delays increase. When upstream drivers observe traffic congestion on this road segment, they frequently alter their driving routes and take alternative roads to complete their journeys [6]. This causes its traffic share to be distributed to other road segments, which directly results in an increase in the traffic volume of another road segment connected to the congested road segment, and causes the originally smooth road segment to also experience traffic congestion. This type of traffic congestion is known as secondary traffic congestion because of the increase in vehicle volume caused by vehicle movement. The reason for predictable and recurring traffic congestion is that the capacity at fixed bottlenecks (such as intersections) does not match the traffic demand. Important characteristic is that traffic congestion caused by fixed bottlenecks occurs repeatedly at fixed times and locations.


## 2.1.2. Occasional Congestion

Episodic congestion is usually a traffic congestion phenomenon caused by unexpected traffic events such as vehicle breakdowns, traffic accidents, road accidents that are impassable, and special weather. The phenomenon is random in nature, and it is difficult to predict the occurrence time and place of occurrence [3]. There are five stages in the continuous process of episodic congestion: congestion identification, arrival of traffic police at the scene, formulation of diversion strategy, completion of accident treatment, and return of road operation to normal, as shown in Figure 1.Figure 1
Congestion impact phase.


## 2.2. Common Data Mining Algorithms

Data mining methods can be divided into 3 major categories: classification, association analysis, and clustering. The data mining algorithms used in this paper belong to classification algorithms. Commonly used classification methods are as follows: decision tree algorithm, support vector machine (SVM), Bayesian classifier, and artificial neural network algorithm [7]. These algorithms are characterized as follows (Figure 2):(1)
Decision tree: decision tree is a tree structure consisting of nodes and directed edges; the tree includes three kinds of nodes: root node, internal node, and leaf node or terminal node. In the decision tree, each leaf node represents a class and nonterminal node contains test conditions to separate the input values with different characteristics.In order to construct a decision tree, the probability of occurrence for each condition must be known, and classification criteria must be used to map different object input values to their corresponding object attributes. Decision tree learning is supervised. The advantage of the decision tree structure is that it is simple and straightforward to implement; the disadvantage is that it is not optimal for processing data with numerous attribute features and temporal order. Common algorithms include ID3, C4.5, and CART [8].(2)
Bayesian classifier: the theoretical basis of Bayesian classifier is Bayes’ theorem in statistics. Bayes’ theorem is that the prior probability of an event is known, and its posterior probability can be calculated according to Bayes’ formula. According to the Bayes’ theorem, the prior probability of a feature is known for each class, and the posterior probability of the feature belonging to each type is found in turn [9].Bayesian belief networks (BBN), or Bayesian networks in short, are essentially a directed acyclic graph, in which each nonroot node represents an event, and if two nodes are connected, it means that the events corresponding to these two nodes are related, and if they are not connected, it means that these two events are conditionally independent. Each node corresponds to a conditional probability table (CPT) of its own [10]. If a node has a parent node, the CPT represents the conditional probability of occurrence or nonoccurrence of an event in the child node under the condition that the event in the parent node occurs or does not occur. If the node does not have a parent, its CPT represents the prior probability distribution table of the events of the node. The Bayesian network used for classification is the Bayesian classifier commonly used in machine learning.(3)
Support vector machine (SVM): it is used to build classifier with maximal margin hyperplane, also known as maximal margin classifier, and belongs to supervised learning. SVM can be used not only as a linear classifier but also as a nonlinear classifier by introducing a kernel function for the linearly indistinguishable case. For the overfitting problem, SVM also introduces a slack variable. The disadvantage of SVM is that it is a binary classifier, and for multiclassification problems, a strategy must be adopted.Figure 2
Example of decision tree.


## 3. Method

### 3.1. Prediction System

The design information prediction system in this research blends client/server and browser/server architectures [11]. The C/S architecture management modules such as system management and data mining management are available to traffic police, whereas the B/S architecture monitoring module is available to all road cameras. Figure 3 shows the overall structure of the detection system of congestion prediction system.Figure 3
Congestion prediction system.


### 3.2. Comprehensive Functional Architecture of the Congestion Monitoring System

As shown in Figure4, the system function modules consist of the system management module and the information processing module. The system management module and the monitoring management module are responsible for the overall system and the management of traffic congestion, while the information processing module is the most important system function module. The information processing module is the most crucial component of the system. This paper focuses on the information processing module because the system is intended for information processing. The information processing module is composed primarily of two submodules: data preprocessing and association rule mining. The data preprocessing submodule collects data for cleaning, conversion, and integration, whereas the association rule mining submodule utilizes the data mining algorithm to mine strong association rules with support degree exceeding the minimum support degree threshold and confidence degree exceeding the minimum confidence degree threshold.Figure 4
Structure system.


### 3.3. Traffic Status Identification Method

Traffic states are classified into 3 categories: smooth, slow, and congested. Due to the increasing update of the collection equipment and the gradual increase of the collected data, the traditional traffic discrimination method seems to be complicated and cannot fully utilize the effective information, so the support vector machine (SVM) algorithm, which is more common in data mining, is used in this paper [12]. SVM is a supervised learning binary classifier, which is often used for sample classification, where the support vector refers to the edge samples of the two classes of samples in the training set. The physical meaning of the algorithm is to use a subset of the training set to represent the decision boundary and find a hyperplane in the middle of the decision boundary between the two classes. This hyperplane is also called the maximal margin hyperplane when it has the maximum “distance” from the support vector. The hyperplane can separate the two classes of samples because the “distance” is maximum, and all the planes have better generalization error than other classification hyperplanes as shown in Figure 5.Figure 5
Hyperplane.


#### 3.3.1. Linear Support Vector Machine (SVM)

Vapnik proposed the principle of maximal margin, which is also known as interval [13]. This means that the system randomly generates a hyperplane and moves it so that the sample points of different categories are on both sides of the hyperplane, and the interval between the two dashed lines is maximized, so that the resulting L-plane is the optimal hyperplane, which theoretically realizes the optimal classification problem for linearly divisible data. The specific algorithm of two-class linear separable is as follows.Let the training sample input bexi(i = 1, 2, ..... n), and the desired output yi ∈ {+1, −1}, assuming that the hyperplane wx + b = 0. In order for the hyperplane to classify the samples correctly and with classification interval, the constraints need to be satisfied:(1)yiw⋅xi+b−1≥0.This can be achieved by minimizingw2, and the problem of constructing an optimal hyperplane is transformed into a minimization function Ф(w) = 1/2 w2, which is a quadratic programming problem, the solution of which can be introduced into the Lagrange function:(2)L=12w2−∑i=1nαiyixi⋅w+b−1,where αi >0 is the Lagrange coefficient, i.e., solving for the L-optimal solutions for, wb.From the partial differentiation of equation (1) since the gradient of L in both w and b is zero, we have(3)∑i=1nαiyi=0.αi>0.i=1,2,…,n,(4)∑i=1nαiyixi=0.To find the optimal value ofL, substitute (2) and (3) into (1) to obtain(5)Lαi=∑i=1nαi−12∑i=1n∑j=1nαiαjyiyjxi⋅xj.This is a QP problem, and according to the optimality condition KKT condition, this optimization problem needs to be satisfied:(6)αiaixi⋅w+b−1=0,i=1,2,...,n.The support vector of the sample is thexi, for which αi is not zero and equation (5) holds.The optimal classification function is obtained by solving the above problem:(7)fx=signw⋅x+b=sign∑i=1naiyixi⋅x+b.When this idea is applied to linear indivisibility, some of the samples cannot satisfy the condition of equation (1), and it is necessary to introduce the relaxation variable ξi ≥ 0 to achieve this, which is the constraint:(8)yiw⋅wi+b≥1−ξ,i=1,2,...,n.The objective function becomes(9)Φw,ξ=12w⋅w+C∑i=1nξ1,where C > 0 is a specified constant, which controls the penalty for missplitting sample;, the larger the C the heavier the penalty.The generalized optimal classification surface is obtained by compromising the minimum misclassified samples and the maximum classification interval.(10)fx=signw⋅x+b.


#### 3.3.2. Nonlinear Support Vector Machine (SVM)

The basic idea of nonlinear support vector machine is to assume that there is a nonlinear mappingФ:Rn ⟶ H to map the input samples to a high-dimensional feature space H. Then, the optimal hyperplane is constructed in the high-dimensional space [14], and the kernel function satisfying Mercer’s condition is applied according to the relevant theory of generalized functions:(11)Kx⋅xi=ΦxΦxi.The objective function becomes(12)fx=∑i=1nαi−12∑in∑j=1naiajyiyjKxi⋅xi.The corresponding classification function is(13)fx=sign∑i=1naiyiKxi⋅x+b.The common kernel functions are linear kernel function, multiple kernel function, and radial basis kernel function:(1)
Linear kernel function:(14)Kx⋅xi=x⋅xi.(2)
Polynomial kernel function:(15)Kx⋅xi=αix⋅xi+bd.(3)
Radial basis kernel function:(16)Kx⋅xi=exp−x−xi22σ2.


### 3.4. Traffic Congestion Identification Method

A road segment’s daily simultaneous traffic flow data should fluctuate within a certain range under normal conditions. Due to the predictability of frequent congestion, the difference between current and previous data will not fluctuate excessively when it occurs. However, when episodic congestion occurs, the data will produce anomalies, and the occurrence of anomalous data can be considered a low-probability occurrence. In accordance with the theorem of large numbers in statistics, the difference between the current traffic flow data and the past traffic flow data at the same time is considered to be Gaussian distributed here. According to the theory of probability analysis, the farther a Gaussian distribution value is from, the lower the probability of occurrence; when the value is taken outside the range [−3, +3], the probability is less than 0.3%. Therefore, based on this theory, we can attribute traffic anomalies to a probability range of less than 0.3% [15].According to the above theory, let the statistical (release) period beT, and the traffic flow data (flow rate, speed, and occupancy) at monitoring moment t be Qt, Vt, and Ot. Then, after excluding the anomalous data, the average value of the historical data at the same moment on different dates is(17)QMt=∑i=1nQtin,VMt=∑i=1nVtin,OMt=∑i=1nOtin.Then, the variance of the historical data is(18)Qσt=1n−1∑i=1nQti−QMt2,Vσt=1n−1∑i=1nVti−VMt2,Oσt=1n−1∑i=1nOti−OMt2,where n is the number of days in the history of statistics. The three sigma criterion assumes that a set of test data contains only random errors before calculating and processing it to obtain the standard deviation and determining an interval with a particular probability. It is a random error, but a significant one, and the data containing it should be removed. After obtaining the above data, the traffic anomalous moments can be judged according to the 3σ theory. The judgment steps are as follows:(1)
If the data at this moment is abnormal, i.e.,(19)Qt−QMt>3×QσtVt−VMt>3×VσtOt−OMt>3×Oσt.(2)
And the data of its previous cycle (t-T) is also abnormal, i.e.,(20)Qt−T−QMt−T>3×Qσt−TVt−T−VMt−T>3×Vσt−TOt−T−OMt−T>3×Oσt−T.Then it is considered that an episodic congestion has occurred at timet. Otherwise, no episodic congestion has occurred.Normal congestion discrimination firstly requires knowing the current road state, and then to distinguish it from episodic congestion. The current traffic state can be obtained by the SVM method in Section3.2. The current traffic state is obtained by the SVM model, and then it needs to be distinguished from episodic congestion. If(21)Qt−QMt<3×QσtVt−VMt<3×VσtOt−OMt<3×Oσt,and its previous cycle (t-T) data are also abnormal, i.e.,(22)Qt−T−QMt−T<3×Qσt−TVt−T−VMt−T<3×Vσt−TOt−T−OMt−T<3×Oσt−T,then it is assumed that no episodic congestion has occurred at time t. If all the above conditions are satisfied, the congestion can be considered as normal congestion at that moment.


## 3.1. Prediction System

The design information prediction system in this research blends client/server and browser/server architectures [11]. The C/S architecture management modules such as system management and data mining management are available to traffic police, whereas the B/S architecture monitoring module is available to all road cameras. Figure 3 shows the overall structure of the detection system of congestion prediction system.Figure 3
Congestion prediction system.


## 3.2. Comprehensive Functional Architecture of the Congestion Monitoring System

As shown in Figure4, the system function modules consist of the system management module and the information processing module. The system management module and the monitoring management module are responsible for the overall system and the management of traffic congestion, while the information processing module is the most important system function module. The information processing module is the most crucial component of the system. This paper focuses on the information processing module because the system is intended for information processing. The information processing module is composed primarily of two submodules: data preprocessing and association rule mining. The data preprocessing submodule collects data for cleaning, conversion, and integration, whereas the association rule mining submodule utilizes the data mining algorithm to mine strong association rules with support degree exceeding the minimum support degree threshold and confidence degree exceeding the minimum confidence degree threshold.Figure 4
Structure system.


## 3.3. Traffic Status Identification Method

Traffic states are classified into 3 categories: smooth, slow, and congested. Due to the increasing update of the collection equipment and the gradual increase of the collected data, the traditional traffic discrimination method seems to be complicated and cannot fully utilize the effective information, so the support vector machine (SVM) algorithm, which is more common in data mining, is used in this paper [12]. SVM is a supervised learning binary classifier, which is often used for sample classification, where the support vector refers to the edge samples of the two classes of samples in the training set. The physical meaning of the algorithm is to use a subset of the training set to represent the decision boundary and find a hyperplane in the middle of the decision boundary between the two classes. This hyperplane is also called the maximal margin hyperplane when it has the maximum “distance” from the support vector. The hyperplane can separate the two classes of samples because the “distance” is maximum, and all the planes have better generalization error than other classification hyperplanes as shown in Figure 5.Figure 5
Hyperplane.


### 3.3.1. Linear Support Vector Machine (SVM)

Vapnik proposed the principle of maximal margin, which is also known as interval [13]. This means that the system randomly generates a hyperplane and moves it so that the sample points of different categories are on both sides of the hyperplane, and the interval between the two dashed lines is maximized, so that the resulting L-plane is the optimal hyperplane, which theoretically realizes the optimal classification problem for linearly divisible data. The specific algorithm of two-class linear separable is as follows.Let the training sample input bexi(i = 1, 2, ..... n), and the desired output yi ∈ {+1, −1}, assuming that the hyperplane wx + b = 0. In order for the hyperplane to classify the samples correctly and with classification interval, the constraints need to be satisfied:(1)yiw⋅xi+b−1≥0.This can be achieved by minimizingw2, and the problem of constructing an optimal hyperplane is transformed into a minimization function Ф(w) = 1/2 w2, which is a quadratic programming problem, the solution of which can be introduced into the Lagrange function:(2)L=12w2−∑i=1nαiyixi⋅w+b−1,where αi >0 is the Lagrange coefficient, i.e., solving for the L-optimal solutions for, wb.From the partial differentiation of equation (1) since the gradient of L in both w and b is zero, we have(3)∑i=1nαiyi=0.αi>0.i=1,2,…,n,(4)∑i=1nαiyixi=0.To find the optimal value ofL, substitute (2) and (3) into (1) to obtain(5)Lαi=∑i=1nαi−12∑i=1n∑j=1nαiαjyiyjxi⋅xj.This is a QP problem, and according to the optimality condition KKT condition, this optimization problem needs to be satisfied:(6)αiaixi⋅w+b−1=0,i=1,2,...,n.The support vector of the sample is thexi, for which αi is not zero and equation (5) holds.The optimal classification function is obtained by solving the above problem:(7)fx=signw⋅x+b=sign∑i=1naiyixi⋅x+b.When this idea is applied to linear indivisibility, some of the samples cannot satisfy the condition of equation (1), and it is necessary to introduce the relaxation variable ξi ≥ 0 to achieve this, which is the constraint:(8)yiw⋅wi+b≥1−ξ,i=1,2,...,n.The objective function becomes(9)Φw,ξ=12w⋅w+C∑i=1nξ1,where C > 0 is a specified constant, which controls the penalty for missplitting sample;, the larger the C the heavier the penalty.The generalized optimal classification surface is obtained by compromising the minimum misclassified samples and the maximum classification interval.(10)fx=signw⋅x+b.


### 3.3.2. Nonlinear Support Vector Machine (SVM)

The basic idea of nonlinear support vector machine is to assume that there is a nonlinear mappingФ:Rn ⟶ H to map the input samples to a high-dimensional feature space H. Then, the optimal hyperplane is constructed in the high-dimensional space [14], and the kernel function satisfying Mercer’s condition is applied according to the relevant theory of generalized functions:(11)Kx⋅xi=ΦxΦxi.The objective function becomes(12)fx=∑i=1nαi−12∑in∑j=1naiajyiyjKxi⋅xi.The corresponding classification function is(13)fx=sign∑i=1naiyiKxi⋅x+b.The common kernel functions are linear kernel function, multiple kernel function, and radial basis kernel function:(1)
Linear kernel function:(14)Kx⋅xi=x⋅xi.(2)
Polynomial kernel function:(15)Kx⋅xi=αix⋅xi+bd.(3)
Radial basis kernel function:(16)Kx⋅xi=exp−x−xi22σ2.


## 3.3.1. Linear Support Vector Machine (SVM)

Vapnik proposed the principle of maximal margin, which is also known as interval [13]. This means that the system randomly generates a hyperplane and moves it so that the sample points of different categories are on both sides of the hyperplane, and the interval between the two dashed lines is maximized, so that the resulting L-plane is the optimal hyperplane, which theoretically realizes the optimal classification problem for linearly divisible data. The specific algorithm of two-class linear separable is as follows.Let the training sample input bexi(i = 1, 2, ..... n), and the desired output yi ∈ {+1, −1}, assuming that the hyperplane wx + b = 0. In order for the hyperplane to classify the samples correctly and with classification interval, the constraints need to be satisfied:(1)yiw⋅xi+b−1≥0.This can be achieved by minimizingw2, and the problem of constructing an optimal hyperplane is transformed into a minimization function Ф(w) = 1/2 w2, which is a quadratic programming problem, the solution of which can be introduced into the Lagrange function:(2)L=12w2−∑i=1nαiyixi⋅w+b−1,where αi >0 is the Lagrange coefficient, i.e., solving for the L-optimal solutions for, wb.From the partial differentiation of equation (1) since the gradient of L in both w and b is zero, we have(3)∑i=1nαiyi=0.αi>0.i=1,2,…,n,(4)∑i=1nαiyixi=0.To find the optimal value ofL, substitute (2) and (3) into (1) to obtain(5)Lαi=∑i=1nαi−12∑i=1n∑j=1nαiαjyiyjxi⋅xj.This is a QP problem, and according to the optimality condition KKT condition, this optimization problem needs to be satisfied:(6)αiaixi⋅w+b−1=0,i=1,2,...,n.The support vector of the sample is thexi, for which αi is not zero and equation (5) holds.The optimal classification function is obtained by solving the above problem:(7)fx=signw⋅x+b=sign∑i=1naiyixi⋅x+b.When this idea is applied to linear indivisibility, some of the samples cannot satisfy the condition of equation (1), and it is necessary to introduce the relaxation variable ξi ≥ 0 to achieve this, which is the constraint:(8)yiw⋅wi+b≥1−ξ,i=1,2,...,n.The objective function becomes(9)Φw,ξ=12w⋅w+C∑i=1nξ1,where C > 0 is a specified constant, which controls the penalty for missplitting sample;, the larger the C the heavier the penalty.The generalized optimal classification surface is obtained by compromising the minimum misclassified samples and the maximum classification interval.(10)fx=signw⋅x+b.


## 3.3.2. Nonlinear Support Vector Machine (SVM)

The basic idea of nonlinear support vector machine is to assume that there is a nonlinear mappingФ:Rn ⟶ H to map the input samples to a high-dimensional feature space H. Then, the optimal hyperplane is constructed in the high-dimensional space [14], and the kernel function satisfying Mercer’s condition is applied according to the relevant theory of generalized functions:(11)Kx⋅xi=ΦxΦxi.The objective function becomes(12)fx=∑i=1nαi−12∑in∑j=1naiajyiyjKxi⋅xi.The corresponding classification function is(13)fx=sign∑i=1naiyiKxi⋅x+b.The common kernel functions are linear kernel function, multiple kernel function, and radial basis kernel function:(1)
Linear kernel function:(14)Kx⋅xi=x⋅xi.(2)
Polynomial kernel function:(15)Kx⋅xi=αix⋅xi+bd.(3)
Radial basis kernel function:(16)Kx⋅xi=exp−x−xi22σ2.


## 3.4. Traffic Congestion Identification Method

A road segment’s daily simultaneous traffic flow data should fluctuate within a certain range under normal conditions. Due to the predictability of frequent congestion, the difference between current and previous data will not fluctuate excessively when it occurs. However, when episodic congestion occurs, the data will produce anomalies, and the occurrence of anomalous data can be considered a low-probability occurrence. In accordance with the theorem of large numbers in statistics, the difference between the current traffic flow data and the past traffic flow data at the same time is considered to be Gaussian distributed here. According to the theory of probability analysis, the farther a Gaussian distribution value is from, the lower the probability of occurrence; when the value is taken outside the range [−3, +3], the probability is less than 0.3%. Therefore, based on this theory, we can attribute traffic anomalies to a probability range of less than 0.3% [15].According to the above theory, let the statistical (release) period beT, and the traffic flow data (flow rate, speed, and occupancy) at monitoring moment t be Qt, Vt, and Ot. Then, after excluding the anomalous data, the average value of the historical data at the same moment on different dates is(17)QMt=∑i=1nQtin,VMt=∑i=1nVtin,OMt=∑i=1nOtin.Then, the variance of the historical data is(18)Qσt=1n−1∑i=1nQti−QMt2,Vσt=1n−1∑i=1nVti−VMt2,Oσt=1n−1∑i=1nOti−OMt2,where n is the number of days in the history of statistics. The three sigma criterion assumes that a set of test data contains only random errors before calculating and processing it to obtain the standard deviation and determining an interval with a particular probability. It is a random error, but a significant one, and the data containing it should be removed. After obtaining the above data, the traffic anomalous moments can be judged according to the 3σ theory. The judgment steps are as follows:(1)
If the data at this moment is abnormal, i.e.,(19)Qt−QMt>3×QσtVt−VMt>3×VσtOt−OMt>3×Oσt.(2)
And the data of its previous cycle (t-T) is also abnormal, i.e.,(20)Qt−T−QMt−T>3×Qσt−TVt−T−VMt−T>3×Vσt−TOt−T−OMt−T>3×Oσt−T.Then it is considered that an episodic congestion has occurred at timet. Otherwise, no episodic congestion has occurred.Normal congestion discrimination firstly requires knowing the current road state, and then to distinguish it from episodic congestion. The current traffic state can be obtained by the SVM method in Section3.2. The current traffic state is obtained by the SVM model, and then it needs to be distinguished from episodic congestion. If(21)Qt−QMt<3×QσtVt−VMt<3×VσtOt−OMt<3×Oσt,and its previous cycle (t-T) data are also abnormal, i.e.,(22)Qt−T−QMt−T<3×Qσt−TVt−T−VMt−T<3×Vσt−TOt−T−OMt−T<3×Oσt−T,then it is assumed that no episodic congestion has occurred at time t. If all the above conditions are satisfied, the congestion can be considered as normal congestion at that moment.


## 4. Experimental Results and Analysis

### 4.1. Data Preprocessing

In this paper, the traffic flow data of a city’s main road and all its surrounding side roads are obtained, and the time range of this data is one week, i.e., 7∗24 hours. The main fields include collection time, volume, occupancy, speed, direction, point ID, section ID, and status. Some of these data are observed as shown in Table 1.Table 1
Sample data.
Collection timeTrafficOccupancySpeed (km/h)2/20 6 : 00–24 : 001200.02542/20 6 : 00–24 : 00600.02482/20 6 : 00–24 : 00600.08632/20 6 : 00–24 : 001200.02382/20 6 : 00–24 : 001200.03372/20 6 : 00–24 : 001200.03452/20 6 : 00–24 : 001200.02752/20 6 : 00–24 : 000002/20 6 : 00–24 : 000002/20 6 : 00–24 : 00600.02332/20 6 : 00–24 : 0000.01232/20 6 : 00–24 : 00600.0165As can be seen from the data in the table, some of the data in the table are 0.There are two cases where the data appears to be 0: no vehicle has appeared in that time period and the data detected by the detector is indeed 0; a vehicle has appeared in that time period, but the detector failed to upload data or uploaded incorrect data due to a malfunction of the detector. The first case is true and can be kept, while the second case is wrong data and needs to be rejected. Therefore, this paper proposes a rejection strategy:(1)
According to the long-term observation of the road traffic pattern, Ot = 0, Vt = 0, and Qt = 0, data in the time period from 00 : 00 : 00 to 04 : 59 : 59 (24-hour system) can be considered as correct data not detected because there is no traffic at this time. The Ot = 0, Vt = 0, and Qt = 0 data of other time periods are incorrect data and should be excluded.(2)
According to the characteristics of traffic flow, when one feature is 0, other features will not be 0. Therefore, if there are data containing 0 and not 0 at the same time, this paper considers that there is a problem with the data uploaded by the detector and needs to be rejected.After data preprocessing, the data is shown in Table2.Table 2
Preprocessed data.
Collection timeTrafficOccupancySpeed (km/h)2/20 6 : 190.050.020.432/20 6 : 200.050.020.42/20 6 : 230.10.080.622/20 6 : 250.10.020.322/20 6 : 280.050.030.312/20 6 : 290.10.030.322/20 6 : 300.10.020.3


### 4.2. Congestion Identification

In this paper, the 3 criteria and SVM are combined to distinguish between frequent and occasional congestions. The SVM model is trained before the algorithm is applied. Since there are three traffic states, “smooth,” “slow,” and “congested,” distinguishing the traffic state is essentially a multiclassification problem. This paper employs a one-to-one (one-versus-one) method for SVM multiclassification.The SVM [16] multiclassification method described in this paper is a one-to-one (one-versus-one) method. The data of a specific period of the main road is extracted from the data that has been preprocessed. The acquired characteristics include speed, traffic volume, occupancy rate, and the traffic status of the road at that time. The states included in this training set are manually identified in advance. There are three types of traffic conditions: smooth, slow, and congested. There are incorrect data in the one-way data collected from a major road for the traffic status data set, and a large portion of these data belong to the “smooth” status, which improves the accuracy of the model.Figure6 depicts the classification of all tens of thousands of data into a coordinate system with three features: speed, occupancy, and traffic flow. Finally, from the tens of thousands of data, we sampled 100 data from the road section in February for several consecutive evening peak hours.Figure 6
Classification of training samples.


### 4.3. Effect of SVM Kernel Function and Different Parameter Selection on the Correct Rate

In this experiment, we tried different kernel functions and related parameters mentioned in the method to find the best classification accuracy for a given sample [17].As can be seen from Table3, the classification accuracy of the RBF kernel function is still better than that of the linear kernel function on average, indicating that, in the selection of the SVM classification parameters, specific problems need to be analyzed, and the effects caused by the kernel function and parameter selection may have completely different results on different samples.Table 3
SVM kernel function and different parameter selection for different samples.
Kernel functionsParametersAccuracy (%)RBFC = 2385.17RBFDefault82.88LinearC = 2380.21LinearDefault77.14PolynomialD = 574.00


### 4.4. Comparison and Validation of Results

In order to verify the superiority of the intelligent evaluation method proposed in this paper, other methods are compared as shown in Table4.Table 4
Comparison test results of feature selection algorithm.
AlgorithmTrain time (s)Test time (s)Accuracy (%)Binary tree algorithm [17]29015.180.17Ours44518.885.17As shown in Table4, the classification time consumed by these two algorithms is nearly identical, primarily because the categories and numbers of experimental data are relatively small and the computation is less, making the difference in classification time between the two algorithms negligible; however, as the categories of experimental data increase and the depth of the biased algorithm tree increases at a faster rate, the classification time gap between the two algorithms increases. In addition, its classification accuracy is relatively high because the improved algorithm in this paper uses the relative distance between categories as the criterion for determining which categories should be segmented out first, thereby reducing the accumulation of errors caused by the binary tree structure. Therefore, applying the SVM algorithm described in this paper to the evaluation system is beneficial.


## 4.1. Data Preprocessing

In this paper, the traffic flow data of a city’s main road and all its surrounding side roads are obtained, and the time range of this data is one week, i.e., 7∗24 hours. The main fields include collection time, volume, occupancy, speed, direction, point ID, section ID, and status. Some of these data are observed as shown in Table 1.Table 1
Sample data.
Collection timeTrafficOccupancySpeed (km/h)2/20 6 : 00–24 : 001200.02542/20 6 : 00–24 : 00600.02482/20 6 : 00–24 : 00600.08632/20 6 : 00–24 : 001200.02382/20 6 : 00–24 : 001200.03372/20 6 : 00–24 : 001200.03452/20 6 : 00–24 : 001200.02752/20 6 : 00–24 : 000002/20 6 : 00–24 : 000002/20 6 : 00–24 : 00600.02332/20 6 : 00–24 : 0000.01232/20 6 : 00–24 : 00600.0165As can be seen from the data in the table, some of the data in the table are 0.There are two cases where the data appears to be 0: no vehicle has appeared in that time period and the data detected by the detector is indeed 0; a vehicle has appeared in that time period, but the detector failed to upload data or uploaded incorrect data due to a malfunction of the detector. The first case is true and can be kept, while the second case is wrong data and needs to be rejected. Therefore, this paper proposes a rejection strategy:(1)
According to the long-term observation of the road traffic pattern, Ot = 0, Vt = 0, and Qt = 0, data in the time period from 00 : 00 : 00 to 04 : 59 : 59 (24-hour system) can be considered as correct data not detected because there is no traffic at this time. The Ot = 0, Vt = 0, and Qt = 0 data of other time periods are incorrect data and should be excluded.(2)
According to the characteristics of traffic flow, when one feature is 0, other features will not be 0. Therefore, if there are data containing 0 and not 0 at the same time, this paper considers that there is a problem with the data uploaded by the detector and needs to be rejected.After data preprocessing, the data is shown in Table2.Table 2
Preprocessed data.
Collection timeTrafficOccupancySpeed (km/h)2/20 6 : 190.050.020.432/20 6 : 200.050.020.42/20 6 : 230.10.080.622/20 6 : 250.10.020.322/20 6 : 280.050.030.312/20 6 : 290.10.030.322/20 6 : 300.10.020.3


## 4.2. Congestion Identification

In this paper, the 3 criteria and SVM are combined to distinguish between frequent and occasional congestions. The SVM model is trained before the algorithm is applied. Since there are three traffic states, “smooth,” “slow,” and “congested,” distinguishing the traffic state is essentially a multiclassification problem. This paper employs a one-to-one (one-versus-one) method for SVM multiclassification.The SVM [16] multiclassification method described in this paper is a one-to-one (one-versus-one) method. The data of a specific period of the main road is extracted from the data that has been preprocessed. The acquired characteristics include speed, traffic volume, occupancy rate, and the traffic status of the road at that time. The states included in this training set are manually identified in advance. There are three types of traffic conditions: smooth, slow, and congested. There are incorrect data in the one-way data collected from a major road for the traffic status data set, and a large portion of these data belong to the “smooth” status, which improves the accuracy of the model.Figure6 depicts the classification of all tens of thousands of data into a coordinate system with three features: speed, occupancy, and traffic flow. Finally, from the tens of thousands of data, we sampled 100 data from the road section in February for several consecutive evening peak hours.Figure 6
Classification of training samples.


## 4.3. Effect of SVM Kernel Function and Different Parameter Selection on the Correct Rate

In this experiment, we tried different kernel functions and related parameters mentioned in the method to find the best classification accuracy for a given sample [17].As can be seen from Table3, the classification accuracy of the RBF kernel function is still better than that of the linear kernel function on average, indicating that, in the selection of the SVM classification parameters, specific problems need to be analyzed, and the effects caused by the kernel function and parameter selection may have completely different results on different samples.Table 3
SVM kernel function and different parameter selection for different samples.
Kernel functionsParametersAccuracy (%)RBFC = 2385.17RBFDefault82.88LinearC = 2380.21LinearDefault77.14PolynomialD = 574.00


## 4.4. Comparison and Validation of Results

In order to verify the superiority of the intelligent evaluation method proposed in this paper, other methods are compared as shown in Table4.Table 4
Comparison test results of feature selection algorithm.
AlgorithmTrain time (s)Test time (s)Accuracy (%)Binary tree algorithm [17]29015.180.17Ours44518.885.17As shown in Table4, the classification time consumed by these two algorithms is nearly identical, primarily because the categories and numbers of experimental data are relatively small and the computation is less, making the difference in classification time between the two algorithms negligible; however, as the categories of experimental data increase and the depth of the biased algorithm tree increases at a faster rate, the classification time gap between the two algorithms increases. In addition, its classification accuracy is relatively high because the improved algorithm in this paper uses the relative distance between categories as the criterion for determining which categories should be segmented out first, thereby reducing the accumulation of errors caused by the binary tree structure. Therefore, applying the SVM algorithm described in this paper to the evaluation system is beneficial.


## 5. Conclusion

In this paper, we design a combined client/server (C/S) and browser/server (B/S) architecture congestion prediction system. System and data mining management modules based on C/S architecture are provided to officers, whereas the monitoring module based on B/S architecture is accessible to all road cameras. For the data mining module, we integrate data mining technology into the traffic congestion prediction software and develop a new algorithm for discriminating traffic congestion. Using a combination of the 3 criteria and the SVM algorithm, along with massive amounts of data, our prediction accuracy is significantly enhanced.The following work will continue to be studied by the authors:(1)
Although the 3 criteria algorithm has achieved a high rate of accuracy in incidental congestion discrimination, there are still some flaws in the algorithm. For instance, the algorithm’s underlying principle is relatively straightforward, and the results for the same road on different days vary; for example, holidays and weekdays cannot be viewed together and must be viewed separately so that it can be categorized from a data perspective in order to examine which model should be used for the road on different days.(2)
The SVM + 3 criteria algorithm was able to achieve a high rate of accuracy for frequent congestion discriminations. The next task is to observe the different morning and evening peak hours of these roads in accordance with the time change, such as different seasons, holidays, and other special dates. For the public to travel and for the traffic police to develop key traffic diversion strategies, it is essential to graphically display the morning and evening rush hours.



---

*Source: 4444061-2022-07-04.xml*