Traffic data analysis early warning method
By combining weighted K-means clustering and Holt exponential smoothing model with radial basis function neural network, the shortcomings of existing technologies in traffic data processing and real-time identification are addressed. This enables real-time anomaly warning and data completion for road segment traffic flow speed, providing accurate traffic warning data support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies cannot effectively utilize historical and real-time traffic data for intelligent judgment, resulting in the inability to obtain accurate traffic warning data in real time, and thus failing to prevent and alleviate traffic congestion.
We employ a weighted K-means clustering algorithm combined with the Holt exponential smoothing model and radial basis function neural network. By preprocessing, clustering, and predicting historical traffic data, we use support vector clustering and fuzzy rough set to complete the data. Finally, we use a genetic algorithm to optimize the parameters and perform real-time traffic status identification and early warning.
It enables real-time anomaly warnings for traffic flow speed on road segments, can identify historical operating patterns and make real-time predictions of data flow, solves the problems of data loss and noise in traffic data processing, and provides accurate traffic warning data support.
Smart Images

Figure CN121838445A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data analysis, and particularly relates to a traffic data analysis and early warning method. BACKGROUND
[0002] The large number of installations of urban road section sensor devices and the increasing maturity of big data technology make it possible to collect and store massive urban traffic data. After effective processing and analysis, the collected and stored big data can reveal some potential laws, provide effective data information, and realize the true value of big data. In the development of the current related technology, there are still some problems in the intelligent judgment of road congestion and the real-time traffic state recognition in data processing.
[0003] When the traffic flow and the passenger flow of a road section reach or exceed the specified traffic capacity of the road section, traffic congestion occurs on the road section. Traffic congestion increases the travel time and cost of residents and increases the management difficulty of the traffic management department, and easily causes traffic accidents. In the background of increasingly congested urban traffic, the existing technology cannot well utilize the historical traffic flow data and real-time traffic flow data, cannot obtain accurate traffic early warning data in real time, and cannot meet the needs of preventing and alleviating traffic congestion. SUMMARY
[0004] In view of the above defects, the technical problem solved by the present application is to provide a traffic data analysis and early warning method to solve the problems that the existing technology cannot meet the needs of preventing and alleviating traffic congestion, cannot make intelligent judgments of road congestion, and cannot recognize real-time traffic states in data processing and real-time traffic state recognition.
[0005] The present application provides a traffic data analysis and early warning method, comprising:
[0006] Step 1, preprocessing historical traffic data to obtain a preprocessed historical time series data set;
[0007] Step 2, clustering the preprocessed data based on a weighted K-means clustering method to obtain the clustering center and clustering parameters of each sample point in the data set;
[0008] Step 3, obtaining real-time sample data at the current time, and using a Holt exponential smoothing model to obtain early warning state prediction data values after a period of time from the current time;
[0009] Step 4, obtaining congestion state data prediction values within a period of time after the current time based on a radial basis function neural network model;
[0010] Step 5, constructing a prediction sample set based on the congestion state data prediction value, obtaining a cluster center with the shortest Euclidean distance from each sample point in the prediction sample set, comparing the early warning state prediction data value with the obtained cluster center, and obtaining early warning information under the current traffic state.
[0011] Preferably, the specific steps of step 1 include:
[0012] Step 1.1, based on support vector clustering and fuzzy rough set, the traffic data is completed and repaired to obtain a complete data set containing each time point;
[0013] Step 1.2, using a two-standard-deviation decomposition method to process the abnormal values of the completed data;
[0014] Step 1.3, grouping and data adding processing the data after abnormal value processing;
[0015] Step 1.4, using a wavelet transform method to perform noise reduction processing on the added data;
[0016] Step 1.5, linearly mapping the data after noise reduction processing to the [0, 1] interval to obtain a preprocessed historical time series data set.
[0017] Preferably, the specific steps of step 2 include:
[0018] Step 2.1, taking each time point sample point X i =(x i1 , x i2 ) in the preprocessed data set as sample data, wherein x i1 and x i2 represent historical traffic volume and time occupancy rate data, respectively, and the set of sample data is represented as D={X1, X2,..., X N}, and the silhouette coefficient CV m of the sample data set is calculated.
[0019] Step 2.2, setting the maximum number of clusters K0 and initializing the number of samples K;
[0020] Step 2.3, randomly selecting K samples from the sample data set as initial cluster centers, repeating the data clustering operation until the silhouette coefficient value is calculated when the cluster centers stop moving, and K=K+1, iterating the number of samples until K>K0, obtaining the best cluster number K, the corresponding cluster centers and the membership degrees of each sample point with respect to the cluster centers.
[0021] Preferably, the specific steps of step 3 include:
[0022] Step 3.1, taking the pretreated data set as a Holt exponential smoothing model training set, obtaining the horizontal smoothing parameter a and the trend smoothing parameter β value with the minimum prediction error based on a prediction equation and a smoothing equation;
[0023] Step 3.2, obtaining real-time sample data at the current m moment Step 3.2, obtaining real-time sample data at the current m moment is an m-dimensional sample data, n is the number of observation days, and m is the current sampling number.
[0024] Preferably, the specific steps of step 4 include:
[0025] Step 4.1, reconstructing the phase space for the original sequence H = {h1, h2,..., h n in the neural network model, mapping the reconstructed results to a high-dimensional space, and obtaining a multi-dimensional time sequence G = {g1, g2,..., g n-(γ-1)τ}, wherein the expansion formula of g i is g i = (h i , h i+1 ,..., h i+(γ-1)τ ) T , γ represents the embedding dimension of the phase space reconstruction, and τ represents the time delay of the phase space reconstruction.
[0026] Step 4.2, obtaining the optimal embedding dimension according to the given time delay value according to the chaos theory, taking the optimal embedding dimension and the time delay as the input layer and the output layer number of the neural network respectively, and obtaining an optimized radial basis function neural network model;
[0027] Step 4.3, based on the real-time sample data at the current m moment, using the optimized radial basis function neural network model, obtaining the congestion state data prediction value within a period of time after the current moment.
[0028] Preferably, the specific steps of step 5 include:
[0029] Step 5.1, constructing a feature index matrix of a prediction sample set based on the congestion state data prediction value;
[0030] Step 5.2, obtaining the Euclidean distance between each sample point in the prediction sample set and the obtained clustering center based on the feature index matrix, and obtaining the clustering center with the shortest Euclidean distance from the sample point;
[0031] Step 5.3, comparing the prediction data value with the clustering center data value , and obtaining the relationship between the prediction data value and the historical mode value;
[0032] Step 5.4, numerical anomaly early warning is carried out by using double standard deviation decomposition method, when the numerical value is normal, the relationship between the predicted data value and the historical mode value is represented as When the numerical value is abnormal, the relationship between the predicted data value and the historical mode value is represented as Or At this time, an alarm is given, wherein is the sample standard deviation.
[0033] Step 5.5, updating real-time data and updating the prediction warning information in real time.
[0034] Preferably, the specific steps of step 1.1 include:
[0035] Step 1.1.1, fuzzy neural network training is completed based on a complete data set in historical traffic data, and a missing data prediction result is obtained by using the trained fuzzy neural network to process a missing data set in the historical traffic data;
[0036] Step 1.1.2, based on the rough support vector clustering method, the centers of the upper and lower approximate spheres in the high-dimensional space are used as the centers of each cluster, and based on the weight of each center, the missing data is obtained by using the weighted factor method to obtain the filling value, and the result after filling the missing data set is obtained;
[0037] Step 1.1.3, comparing the filled data with the missing data prediction result;
[0038] Step 1.1.4, based on the comparison result, the optimal parameters are obtained by using the genetic algorithm to optimize the parameters;
[0039] Step 1.1.5, based on the optimal parameters, the errors and missing data in the historical traffic data are repaired and completed to obtain a complete data set containing each time.
[0040] Preferably, the specific steps of data clustering in step 2.3 include:
[0041] Step 2.3.1, all sample data is assigned by minimizing the total weighted deviation to the clustering center, wherein the function of the total weighted deviation is represented as: represents time series data with M sampling points in a day, M is the dimension of the time series data, is an M-dimensional vector, representing the weighted clustering center of the kth class;
[0042] Step 2.3.2, the average value of the samples in each class is recalculated, and the new position of the clustering center is updated, wherein the function of the average value is represented as: is the clustering center data value, Ck represents the kth group after unsupervised division of a given set.
[0043] Preferably, the specific steps of step 1.1.1 include:
[0044] Step 1.1.1.1, obtaining the value of the membership function of the input signal to obtain the fuzzy input signal of each node;
[0045] Step 1.1.1.2, obtaining the information intensity of each node of the neural network based on the fuzzy rule;
[0046] Step 1.1.1.3, obtaining the normalized confidence value at each node of the neural network according to the fuzzy rule;
[0047] Step 1.1.1.4, obtaining the output signal of each node under the fuzzy rule based on the normalized confidence;
[0048] Step 1.1.1.5, obtaining the total output of all signals to obtain the data prediction result based on the fuzzy neural network.
[0049] Preferably, the prediction equation and the smoothing equation in step 3.1 are:
[0050]
[0051]
[0052]
[0053] wherein, represents the prediction value of the m+h period; h represents the number of prediction periods; represents the horizontal smoothing equation, which is the first exponential smoothing value of the m period; θ m represents the trend smoothing equation, which is the second exponential smoothing value of the m period; represents the damping coefficient, α represents the horizontal smoothing parameter, α∈[0, 1]; β represents the trend smoothing parameter, β∈[0, 1].
[0054] From the above scheme, the traffic data analysis and early warning method provided by the application can identify the characteristics of the historical operation mode of the time series data by using the weighted K-means clustering algorithm, and can perform real-time prediction and abnormal early warning of data flow by combining the weighted K-means clustering algorithm with the Holt prediction algorithm. The method is applied to pattern recognition and real-time prediction and early warning of urban road flow rate, comprehensively utilizes historical traffic flow rate data and real-time traffic flow rate data, drives pattern analysis and real-time prediction of road section traffic flow rate, and realizes real-time abnormal early warning of road section traffic flow rate. By combining support vector clustering with fuzzy rough set to optimize support vector clustering parameters, clustering size and weighting factor, classifying traffic flow data, and combining fuzzy neural network and genetic algorithm to estimate missing values and perform data completion, the problem of traffic flow data loss caused by weather influence, detector failure and human error and the like is solved. The application solves the problems of intelligent judgment of road congestion, real-time traffic state recognition, inability to meet the needs of preventing and relieving traffic congestion, and inability to obtain accurate traffic early warning data in real time in the prior art, has remarkable effects, and is suitable for wide promotion. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only represent some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0056] Figure 1 The process block diagram of the traffic data analysis and early warning method provided by the embodiment of the present application. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments only represent some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0058] Please refer to Figure 1 , a specific embodiment of the traffic data analysis and early warning method provided by the present application will be described. The specific steps of the traffic data analysis and early warning method include:
[0059] S1, pre-processing historical traffic data to obtain a pre-processed historical time series data set;
[0060] Firstly, the traffic flow data is classified by combining rough set and support vector clustering, and the missing data is filled by using the weighted factor method. Then, the data is predicted by using fuzzy neural network, and the obtained data is compared with the previous data. Then, the genetic algorithm is used to optimize the parameters, reduce the repair error, and obtain the optimal parameters. The specific steps of S1 include:
[0061] S1.1, complete traffic data repair based on support vector clustering and fuzzy rough set to obtain a complete data set containing each time;
[0062] The specific steps of S1.1 include:
[0063] S1.1.1, complete fuzzy neural network training based on the complete data set in the historical traffic data, and obtain the missing data prediction result by using the trained fuzzy neural network to process the missing data set in the historical traffic data;
[0064] The fuzzy reasoning model and the neural network system are combined to form a fuzzy neural network, that is, the input signals and weights of the conventional neural network model are fuzzy. The combination of the fuzzy reasoning system and the adaptive neural network can better play the advantages of the two models and make up for the shortcomings of the two models. The specific steps of S1.1.1 include:
[0065] S1.1.1.1, obtain the value of the membership function of the input signal to obtain the fuzzy input signal of each node;
[0066] The membership function value of the input signal is calculated to fuzz the input information. The membership function used in the general model is a Gaussian function, and its calculation formula is where x a is the input of node a, and the shape of the Gaussian function is determined by parameters c and b. c and b are respectively the center value and width of the membership function shape, which are called antecedent parameters.
[0067] S1.1.1.2, obtain the information intensity of each node of the neural network based on the fuzzy rule;
[0068] The membership degree of variable x to fuzzy set A is defined as
[0069] where r is the fuzzy rule.
[0070] S1.1.1.3, obtain the normalized confidence value at each node of the neural network according to the fuzzy rule;
[0071] The normalized confidence function is represented as: where R is the rule base.
[0072] S1.1.1.4, based on the normalized confidence, obtaining the output signal of each node under the fuzzy rule;
[0073] Each output signal is a node with adaptive property, and the output result is
[0074] f(r)(X) = g(r)(X) y(r)(X)
[0075] y(r)(X) = p T ·[1, X] T = [p0(r), p1(r), …, p A (r)]·[1, x1, …, x A ] T , wherein g(r)(X) is the output of the normalized confidence, and p is the parameter set of each node, referred to as the post parameter.
[0076] S1.1.1.5, obtaining the total output of all signals to obtain the data prediction result based on the fuzzy neural network. The function representation of the total output of all signals is
[0077]
[0078] S1.1.2, based on the rough support vector clustering method, taking the center of the upper approximate sphere and the lower approximate sphere in the high-dimensional space as the cluster center, based on the weight value of each center, obtaining the filling value of the missing data by using the weighted factor method, to obtain the result after filling the missing data set;
[0079] Based on the support vector model, following the concept of rough set, the rough sphere is a sphere with inner radius (R) of lower approximation and outer radius (T) of upper approximation, and T>R. Rough support vector clustering realizes the mapping of plane data to high-dimensional space by using kernel function. In the high-dimensional space, the rough sphere with the minimum inner and outer radii is found to close all points in the data set. Those points located in the lower approximation range are the points definitely belonging to a cluster (core of the cluster), and the points located in the boundary area (those points located in the higher approximation range but not in the lower approximation range) are called shared by multiple clusters (soft core of the cluster). Certain points are allowed to be located outside the sphere, which are called outliers.
[0080] Using nonlinear transformation method, the data is mapped from plane to certain high-dimensional space, and the minimum closed rough sphere of inner approximation radius (R) and outer approximation radius (T) is found. Based on the concept of rough sphere, data clustering is carried out to obtain the center of the upper approximate sphere and the lower approximate sphere in the high-dimensional space.
[0081] S1.1.3, comparing the filled data with the missing data prediction result;
[0082] S1.1.4, based on the comparison result, the optimal parameters are obtained by using genetic algorithm to optimize the parameters, minimizing the difference between the outputs of the rough support vector and the fuzzy neural network;
[0083] S1.1.5, based on the optimal parameters, the missing data in the historical traffic data is completed and repaired, and a complete data set containing each time is obtained.
[0084] S1.2, the two standard deviation decomposition method is used to process the abnormal values of the completed data;
[0085] First, the abnormal values in the sample data of each time point of each road segment in the data set after missing treatment are screened, which are greater than twice the standard deviation of the sample data from the mean value of the sample data, and are adjusted to the sum of the mean value of the sample data and twice the standard deviation of the sample data; Then, the abnormal values in the sample data of each time point of each road segment in the data set after missing treatment are screened, which are less than twice the standard deviation of the sample data from the mean value of the sample data, and are adjusted to the difference between the mean value of the sample data and twice the standard deviation of the sample data.
[0086] S1.3, the data after abnormal value processing is grouped and data addition processing is performed;
[0087] The original data is recorded at equal interval time period and cannot be directly used for analyzing traffic congestion state. In order to accurately extract traffic flow data characteristics, 5 min is taken as data period division interval, that is, the original data is grouped every 10 and data addition is performed, and 288 groups of data are obtained per day.
[0088] S1.4, wavelet transform method is used to perform noise reduction processing on the added data;
[0089] The actual traffic flow data is a non-stationary low-frequency signal, and the noise is mostly high-frequency signal. By wavelet decomposition of the original signal, the wavelet coefficients corresponding to the high-frequency noise signal are removed, and the wavelet coefficients corresponding to the original signal are retained. Then, the processed high-frequency coefficients and low-frequency coefficients are subjected to wavelet reconstruction to obtain the noise-reduced traffic flow signal data. After wavelet noise reduction processing, the data change trend is more stable, and the change trend of the traffic flow data before and after noise reduction does not change, which is more suitable for studying traffic congestion problem.
[0090] S1.5, the data after noise reduction processing is linearly mapped to the interval [0, 1], which is convenient for analyzing the difference of different dimension data under the same standard, and shortens the model operation time, and obtains the preprocessed historical time series data set.
[0091] S2, based on the weighted K-means clustering method, the preprocessed data is clustered to obtain the clustering center and clustering parameters of each sample point in the data set;
[0092] The historical time series data set is clustered by using a weighted K-means clustering algorithm to obtain the historical change trend of the data under different date characteristics, i.e., historical mode values. The specific steps of S2 include:
[0093] S2.1, taking each time sample point X i = (x i1 , x i2 ) in the preprocessed data set as sample data, where x i1 and x i2 represent historical traffic volume and time occupancy rate data respectively, and the set of sample data is represented as D = {X1, X2,..., X N}, and the silhouette coefficient CV m of the sample data set is calculated.
[0094] S2.2, setting the maximum number of clusters K0 and initializing the number of samples K = 2;
[0095] S2.3, randomly selecting K samples from the sample data set D as initial cluster centers, repeating the data clustering operation until the cluster centers stop moving, calculating the value of the silhouette coefficient, and setting K = K + 1, iterating the number of samples until K > K0, obtaining the optimal number of clusters K, the corresponding cluster centers U k , k = 1, 2,..., K and the membership degree of each sample point with respect to the cluster center, and summarizing the date characteristics of the clustering results.
[0096] The specific steps of data clustering in S2.3 include:
[0097] S2.3.1, assigning all sample data by minimizing the total weighted deviation to the cluster center, where the function of the total weighted deviation is represented as: X represents the time series data with M sampling points in a day, M is the dimension of the time series data, is an M-dimensional vector representing the weighted cluster center of the kth class;
[0098] S2.3.2, recalculating the average value of the samples in each class and updating the new position of the cluster center, where the function of the average value is represented as: is the cluster center data value, and C k represents the kth group after unsupervised division of the given set.
[0099] A set containing N time series data is represented as D = {X1, X2,..., X N}, and the goal of time series clustering is to unsupervisedly divide the given set into K different types of groups C = {C1, C2,..., CK}.K},C k referred to as the kth group and
[0100] S3, acquiring real-time sample data at the current time, and acquiring early warning state prediction data values after a period of time at the current time by using a Holt exponential smoothing model;
[0101] Using time series real-time data, a Holt exponential smoothing prediction model is used to predict prediction data values in a future period of time. The specific steps of S3 include:
[0102] S3.1, taking the preprocessed data set D = {X1, X2,..., X N} as a Holt exponential smoothing model training set, and obtaining the level smoothing parameter a and the trend smoothing parameter β values with the minimum prediction error based on a prediction equation and a smoothing equation;
[0103] The Holt exponential smoothing in S3.1 is a linear exponential smoothing algorithm. The advantage of this method is that it can smooth the two factors of the original sample data using various smoothing parameters, and has high sensitivity. Holt exponential smoothing prediction is a weighted average of historical data, which is used as a trend prediction for a future period of time. The prediction equation and the smoothing equation are: wherein, represents the prediction value of the m+h period; h represents the prediction period; l m represents the level smoothing equation, which is the first exponential smoothing value of the m period; θ n represents the trend smoothing equation, which is the second exponential smoothing value of the m period; represents the damping coefficient, which is used to prevent the prediction from increasing or decreasing indefinitely in the future, a represents the level smoothing parameter, a ∈ [0, 1]; β represents the trend smoothing parameter, β ∈ [0, 1].
[0104] S3.2, acquiring real-time sample data at the current m time Using the prediction equation and the smoothing equation to predict the data value at m+h time, the early warning state prediction data value at m+h time is obtained, wherein is an m-dimensional sample data, n is the number of observations, and m is the current sampling quantity.
[0105] S4, based on a radial basis function neural network model, acquiring congestion state data prediction values in a period of time after the current time;
[0106] A neural network model is trained using historical traffic volume and time occupancy data reconstructed from phase space, establishing a mapping relationship between input and output. Short-term traffic flow parameters are predicted using current real-time data. The specific steps of S4 include:
[0107] S4.1. For the original sequence H = {h1, h2, ..., h...} in the neural network model n The phase space is reconstructed, and the reconstructed result is mapped to a higher-dimensional space to obtain a multidimensional time series G = {g1, g2, ..., g...}. n-(γ-1)τ}, where g i The expansion of is represented as g i =(h i h i+1 , ..., h i+(γ-1)τ ) T γ represents the embedding dimension of the phase space reconstruction, and τ represents the time delay of the phase space reconstruction;
[0108] S4.2. Based on the chaos theory, the time delay value is given and the optimal embedding dimension is obtained. The optimal embedding dimension and time delay are used as the number of input layers and output layers of the neural network, respectively, to obtain the optimized radial basis function neural network model.
[0109] S4.3 Based on the real-time sample data at the current time m, the optimized radial basis function neural network model is used to obtain the predicted value of the congestion status data for a period of time after the current time.
[0110] Radial basis function neural networks are a type of three-layer forward feedback neural network that uses local approximation and has a strong ability to fit nonlinear data.
[0111] x = (x1, x2, ..., x) l ) T o = (o1, o2, ..., o q ) T y = (y1, y2, ..., y p ) T ω represents the network input, hidden layer node output, and network output, respectively. fg This represents the connection weight from the f-th hidden layer node to the g-th output node. A Gaussian kernel function is chosen as the radial basis function, and the hidden layer node outputs o. f The calculation formula is as follows: f = 1, 2, ..., q, where z f Let f represent the center of the f-th radial basis function, which is determined by randomly selecting q samples from the input samples as the center of the radial basis function, i.e., the hidden layer node; σ represents the standard deviation of the radial basis function, i.e., the region in which the function produces a significant output signal, and the standard deviation function is expressed as: Where, d maxMaximum distance of the selected radial basis function center.
[0112] The tth output y of the neural network t The calculation formula is: The objective function is selected as the mean square error function: Wherein, y g The actual value of the network output; The predicted value of the network output. According to the multi-dimensional information of traffic flow extracted by chaos theory, the number of nodes of the input layer and the output layer of the neural network is determined.
[0113] S5, based on the congestion state data prediction value, a prediction sample set is constructed, the clustering center with the shortest Euclidean distance of each sample point in the prediction sample set is obtained, the early warning state prediction data value is compared with the obtained clustering center, and the early warning information under the current traffic state is obtained.
[0114] Based on the current date characteristics, the prediction data value is matched with the historical mode value, the lower half deviation between the data prediction result and the historical mode is calculated, and when the lower half deviation is greater than a certain threshold, the early warning is carried out. The specific steps of S5 include:
[0115] S5.1, based on the congestion state data prediction value, a feature index matrix of the prediction sample set is constructed;
[0116] S5.2, based on the feature index matrix, the Euclidean distance between each sample point in the prediction sample set and the obtained clustering center is obtained, and the clustering center with the shortest Euclidean distance of the sample point is obtained;
[0117] S5.3, the prediction data value is compared with the historical mode value, that is, the clustering center data value , to obtain the relationship between the prediction data value and the historical mode value;
[0118] S5.4, numerical anomaly early warning is carried out by using the double standard deviation decomposition method, when the value is normal, the relationship between the prediction data value and the historical mode value is represented as When the value is abnormal, the relationship between the prediction data value and the historical mode value is represented as Or At this time, the alarm is carried out, wherein The sample standard deviation.
[0119] The sample standard deviation σ m is represented by the square root of , m=1, 2, …, M, N represents the number of observation days, and the vector of traffic congestion index data is represented as The intraday trend between these observation days(representing the average value of traffic congestion index under each time period) can be represented as: The remaining fluctuation on the nth day can be expressed as
[0120] S5.5, updating real-time data And update the prediction warning information in real time, realize the automatic prediction warning.
[0121] Compared with the prior art, the traffic data analysis and warning method can identify the characteristics of the historical operation mode of the time series data by using the weighted K-means clustering algorithm, and can perform real-time prediction and abnormal warning of the data stream by combining the weighted K-means clustering algorithm with the Holt prediction algorithm. The method is applied to mode recognition and real-time prediction and warning of urban road flow rate, comprehensively utilizes historical traffic flow rate data and real-time traffic flow rate data, drives mode analysis and real-time prediction of road section traffic flow rate, realizes real-time abnormal warning of road section traffic flow rate, and provides decision basis for preventing and relieving traffic congestion. By combining support vector clustering with fuzzy rough set to optimize support vector clustering parameters, clustering size and weighting factor, classifying traffic flow data, and combining fuzzy neural network and genetic algorithm to estimate missing values and perform data completion, the method solves the problem of traffic flow data loss caused by weather influence, detector failure and human error, and has sufficient and reasonable data repair performance.
[0122] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the various embodiments can be referred to each other. The contents not described in detail in the embodiments of the present application are the prior art known to those skilled in the art.
[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A traffic data analysis and early warning method, characterized in that, include: Step 1: Preprocess the historical traffic data to obtain the preprocessed historical time series dataset; Step 2: Cluster the preprocessed data using the weighted K-means clustering method to obtain the cluster centers and clustering parameters of each sample point in the dataset; Step 3: Obtain real-time sample data at the current moment, and use the Holt exponential smoothing model to obtain the predicted data value of the warning status after a period of time at the current moment; Step 4: Based on the radial basis function neural network model, obtain the predicted value of congestion status data for a period of time after the current moment; Step 5: Construct a prediction sample set based on the predicted values of congestion status data, obtain the cluster center with the shortest Euclidean distance to each sample point in the prediction sample set, compare the predicted data values of the warning status with the obtained cluster centers, and obtain the warning information of the current traffic status.
2. The traffic data analysis and early warning method according to claim 1, characterized in that, The specific steps of step 1 include: Step 1.1: Complete and repair the traffic data based on support vector clustering and fuzzy rough set to obtain a complete dataset containing each time point; Step 1.2: Use the double standard deviation decomposition method to handle outliers in the completed data; Step 1.3: Group the data after outlier processing and perform data summation; Step 1.4: Use wavelet transform to denoise the summed data; Step 1.5: Linearly map the noise-reduced data to the interval [0, 1] to obtain the preprocessed historical time series dataset.
3. The traffic data analysis and early warning method according to claim 2, characterized in that, The specific steps of step 2 include: Step 2.1: Extract the sample points X from each time point in the preprocessed dataset. i =(x i1 x i2 ) as sample data, where x i1 and x i2 Let X1, X2, ..., X3 represent historical traffic volume and time occupancy data, respectively. The set of sample data is represented as D = {X1, X2, ..., X3}. N } Calculate the silhouette coefficient CV of the sample dataset. m ; Step 2.2: Set the maximum number of clusters K0 and initialize the number of samples K; Step 2.3: Randomly select K samples from the sample dataset as initial cluster centers, repeat the data clustering operation until the cluster centers stop moving, calculate the silhouette coefficient value, and set K = K + 1. Iterate the number of samples until K > K0, and obtain the optimal number of clusters K, the corresponding cluster centers, and the membership degree of each sample point relative to the cluster centers.
4. The traffic data analysis and early warning method according to claim 3, characterized in that, The specific steps of step 3 include: Step 3.1: Use the preprocessed dataset as the training set for the Holt exponential smoothing model. Based on the prediction equation and the smoothing equation, obtain the values of the horizontal smoothing parameter α and the trend smoothing parameter β that minimize the prediction error. Step 3.2: Obtain real-time sample data at time m. The prediction equation and the smoothing equation are used to predict the data value at time m+h, resulting in the predicted data value of the warning state at time m+h. Given an m-dimensional sample dataset, where n is the number of observation days and m is the current number of samples.
5. A traffic data analysis and early warning method according to claim 4, characterized in that, The specific steps of step 4 include: Step 4.1: For the original sequence H = {h1, h2, ..., h...} in the neural network model... n The phase space is reconstructed, and the reconstructed result is mapped to a higher-dimensional space to obtain a multidimensional time series G = {g1, g2, ..., g...}. n-(γ-1)τ }, where g i The expansion of is represented as g i =(h i h i+1 , ..., h i+(γ-1)τ ) T γ represents the embedding dimension of the phase space reconstruction, and τ represents the time delay of the phase space reconstruction; Step 4.2: Based on the chaos theory, the time delay value is given and the optimal embedding dimension is obtained. The optimal embedding dimension and time delay are used as the number of input layers and output layers of the neural network, respectively, to obtain the optimized radial basis function neural network model. Step 4.3: Based on the real-time sample data at the current time m, use the optimized radial basis function neural network model to obtain the predicted value of the congestion status data for a period of time after the current time.
6. A traffic data analysis and early warning method according to claim 5, characterized in that, The specific steps of step 5 include: Step 5.1: Based on the predicted values of congestion status data, construct the feature index matrix of the prediction sample set; Step 5.2: Based on the feature index matrix, obtain the Euclidean distance between each sample point in the prediction sample set and the obtained cluster centers, and obtain the cluster center with the shortest Euclidean distance to the sample point; Step 5.3: Calculate the predicted data values. Cluster center data values By comparing the predicted data values with historical pattern values, the relationship between the predicted data values and the historical pattern values can be obtained. Step 5.4: Use the double standard deviation decomposition method for numerical anomaly early warning. When the values are normal, the relationship between the predicted data values and the historical model values is expressed as follows: When numerical anomalies occur, the relationship between predicted data values and historical pattern values is expressed as follows: or An alarm will be triggered at this time, among which... This represents the sample standard deviation. Step 5.5: Update real-time data And it updates forecast and early warning information in real time.
7. A traffic data analysis and early warning method according to claim 2, characterized in that, The specific steps of step 1.1 include: Step 1.1.1: Train the fuzzy neural network based on the complete dataset of historical traffic data, and use the trained fuzzy neural network to process the missing dataset in the historical traffic data to obtain the missing data prediction results; Step 1.1.2: Based on the coarse support vector clustering method, the centers of the upper and lower approximate spheres in the high-dimensional space are taken as the centers of each cluster. Based on the weight of each center, the imputation value of the missing data is obtained by using the weighted factor method, and the result of the missing dataset is obtained. Step 1.1.3: Compare the completed data with the prediction results of the missing data; Step 1.1.4: Based on the comparison results, use a genetic algorithm to optimize the parameters and obtain the optimal parameters; Step 1.1.5: Based on the optimal parameters, complete and repair the erroneous and missing data in the historical traffic data to obtain a complete dataset containing data from each time point.
8. A traffic data analysis and early warning method according to claim 6, characterized in that, The specific steps of data clustering in step 2.3 include: Step 2.3.1: Allocate all sample data by minimizing the total weighted bias to the cluster centers, where the function of the total weighted bias is expressed as: This represents time-series data with M sampling points in a single day, where M is the dimension of the time-series data. It is an M-dimensional vector representing the weighted cluster center of the k-th class; Step 2.3.2: Recalculate the mean of the samples in each class and update the new positions of the cluster centers, where the function of the mean is expressed as: C represents the cluster center data value. k This represents the k-th group after an unsupervised partitioning of a given set.
9. A traffic data analysis and early warning method according to claim 7, characterized in that, The specific steps of step 1.1.1 include: Step 1.1.1.1: Obtain the value of the membership function of the input signal to obtain the fuzzy input signal of each node; Step 1.1.1.2: Based on fuzzy rules, obtain the information intensity of each node in the neural network; Step 1.1.1.3: Obtain the normalized confidence value at each node of the neural network according to the fuzzy rules; Step 1.1.1.4: Based on the normalized confidence level, obtain the output signal of each node under the fuzzy rules; Step 1.1.1.5: Obtain the total output of all signals to get the data prediction results based on the fuzzy neural network.
10. A traffic data analysis and early warning method according to claim 4, characterized in that, The prediction equation and smoothing equation in step 3.1 are as follows: in, This represents the predicted value for period m+h; h represents the prediction period number; l m Let θ represent the horizontal smoothing equation, and θ be the exponentially smoothed value in the m-th period; m The trend smoothing equation is represented by the quadratic exponential smoothing value for the m-th period. Indicates the damping coefficient. α represents the horizontal smoothing parameter, α∈[0,1]; β represents the trend smoothing parameter, β∈[0,1].