Short-term traffic jam prediction method fusing FCM clustering and GA-Bi-GRU

By fusing FCM clustering and GA-Bi-GRU, traffic flow parameters are extracted using monitoring video data, and the time attention mechanism and genetic algorithm optimization are added to the model, the problem of not taking into account timing characteristics in the existing technology is solved, and traffic congestion prediction with high accuracy is achieved.

CN120580844APending Publication Date: 2025-09-02SICHUAN POLICE COLLEGE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510730062.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing traffic congestion prediction methods do not fully consider the timing characteristics of traffic data, resulting in low prediction accuracy.

Method used

A short-term traffic congestion prediction method that integrates FCM clustering and GA-Bi-GRU, uses surveillance video data, extracts traffic flow parameters, and adds a time attention mechanism to the GA-Bi-GRU model, combines genetic algorithms to optimize model parameters, and uses FCM model to calculate membership to predict traffic congestion level.

Benefits of technology

The accurate prediction of traffic congestion status is achieved, with an accuracy rate of 82.6%, which can effectively distinguish the traffic flow status level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120580844A_ABST
    Figure CN120580844A_ABST
Patent Text Reader

Abstract

The invention discloses a short-time traffic jam prediction method fusing FCM clustering and GA-Bi-GRU, relates to the technical field of traffic safety, and aims to solve the problem of low traffic jam prediction accuracy due to the fact that time sequence characteristics of traffic data are not fully considered in the prior art. And then, establishing a traffic flow prediction model, and inputting predicted traffic flow parameters into an FCM model to realize traffic congestion level prediction. According to the prediction model, forward and backward GRU time recurrent neural networks are designed on the basis of a gating recurrent unit (GRU) so as to fully mine data features, and in order to further capture the influence of different time steps, a time attention mechanism is introduced into the model, the time features of data are deeply mined, and optimization is carried out in combination with a genetic algorithm (GA).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic safety technology, and in particular to a short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU. Background Art

[0002] Predicting traffic status helps traffic management departments implement appropriate traffic control measures in advance to address congestion, thereby improving traffic efficiency. To predict traffic status, congestion must first be identified. Zhang Keke et al. established a dynamic traffic status evaluation standard based on the fuzzy C-means clustering algorithm, using traffic flow, average speed, and time delay as discriminant factors. Traffic status prediction is essentially a prediction of traffic flow parameters. Gupta proposed an integrated spatiotemporal graph convolutional network (ISTGCN) model for traffic prediction to predict complex traffic flows and further predict traffic status. Traffic flows often have temporal repetitiveness, but existing traffic congestion detection methods do not fully consider the temporal characteristics of traffic data. This leads to low traffic congestion prediction accuracy. Summary of the Invention

[0003] The purpose of the present invention is to provide a short-term traffic congestion prediction method that integrates FCM clustering and GA-Bi-GRU to address the problem that the existing technology does not fully consider the temporal characteristics of traffic data, which leads to low traffic congestion prediction accuracy.

[0004] The technical solution adopted by the present invention to solve the above technical problems is: The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU includes the following steps: Step 1: Obtain surveillance video data; Step 2: Extracting traffic flow parameters based on the surveillance video data, wherein the traffic flow parameters include traffic flow, average vehicle speed, and average headway; Step 3: Input the obtained traffic flow parameters into the GA-Bi-GRU model to obtain the predicted traffic flow parameters. The GA-Bi-GRU model is based on the Bi-GRU model, adds a temporal attention mechanism, and optimizes the model parameters through a genetic algorithm. Step 4: Input the predicted traffic flow parameters into the FCM model, calculate the membership degree with each cluster center, and obtain the traffic congestion prediction level based on the maximum membership principle; The cluster centers are obtained by the following steps: Step A: Obtain historical surveillance video data and traffic flow parameters of the historical surveillance video data; Step B: Input the traffic flow parameters of historical surveillance video data into the FCM model to obtain all cluster centers.

[0005] Furthermore, the traffic flow parameters are obtained by the following steps: Step 1: Obtain surveillance video data and decompose the surveillance video to obtain multiple video segments with equal time intervals; Step 2: Extract continuous frame images based on each video segment; Step 3: Input the continuous frame images into the YOLO-v8 network to identify the vehicles in each frame of the video data; Step 4: Use DeepSORT to track the identified vehicles and obtain vehicle trajectory information, which includes vehicle ID, vehicle head direction, vehicle coordinates, and vehicle travel time difference; Step 5: Get traffic volume based on vehicle ID; Step 6: Obtain vehicle speed based on vehicle travel time difference; Step 7: Get the average vehicle speed based on all vehicle speeds; Step 8: Obtain the headway between adjacent vehicles based on the vehicle coordinates and head directions of the adjacent vehicles; Step 9: Obtain the headway distance between adjacent vehicles and the speed of the vehicle behind them, and divide the headway distance between adjacent vehicles by the speed of the vehicle behind them to obtain the headway time. Step 10: Repeat step 9 to obtain all the headway times and then obtain the average headway time.

[0006] Furthermore, the traffic flow parameters are obtained by the following steps: Step 1: Upload the surveillance video to the DataFromSkyAI video analysis platform. After successful processing, the platform returns a work log. Step 2: Open the work log and the corresponding surveillance video in DataFromSkyViewer, select the road section to be tested, add the entry line and exit line, count the time it takes for vehicles to pass through each, and add two lane lines in the middle two lanes to count the time it takes for vehicles to pass through each lane line. Step 3: Count the number of vehicles passing through the road section to be tested and obtain the traffic volume; Step 4: Obtain the travel time based on the time difference between the vehicle passing the entry line and the exit line, and obtain the vehicle speed based on the travel time and the length of the road section to be measured; Step 5: Repeat step 4 to get the speed of each vehicle and then the average vehicle speed; Step 6: Based on the time difference between each vehicle passing through the two middle lanes, the average time difference between the vehicles passing the lane lines is obtained, and based on the average time difference between the vehicles passing the lane lines, the average headway time is obtained.

[0007] Furthermore, the traffic flow parameters are traffic flow parameters after noise reduction, and the specific steps of noise reduction are: In Python, the Savitzky-Golay filter is used to denoise the traffic flow parameters. The Savitzky-Golay filter formula is: in, is the weight coefficient, is the filter output, is the original time series at time point The observed value at l is the half-width of the window, i To sum the index.

[0008] Furthermore, the cluster center and membership degree are expressed as: in, For the i data points, For the j Cluster centers, m is the fuzzy weight index, is the number of cluster centers, k =1,2,... .

[0009] Furthermore, the output of the attention layer of the GA-Bi-GRU model is expressed as: in, is the final output after weighting, For the The attention weight of time steps, is the total number of time steps, is the time step t input.

[0010] Furthermore, the Expressed as: in, Score for attention, is the final fully connected layer, and are the weights of the two fully connected layers.

[0011] Furthermore, the hidden state in the GA-Bi-GRU model is expressed as: in, The previous time step t The hidden state is -1, is a candidate hidden state, is the output of the update gate.

[0012] Furthermore, the Expressed as: in, is the sigmoid activation function, is the weight matrix of the update gate.

[0013] Furthermore, the Expressed as: in, is the weight matrix of the new cell state of the new memory cell, To reset the gate, is the weight matrix of the update gate.

[0014] The beneficial effects of the present invention are: This application uses traffic flow, average speed, and average headway as discriminant factors to identify traffic conditions. A traffic flow prediction model is then established, and congestion levels are predicted by inputting the predicted traffic flow parameters into the FCM model. Based on the gated recurrent unit (GRU), this prediction model designs a temporal recurrent neural network with forward and backward GRUs to fully exploit data features. To further capture the impact of different time steps, the model introduces a temporal attention mechanism to deeply explore the temporal characteristics of the data and combines it with a genetic algorithm (GA) for optimization.

[0015] The traffic congestion prediction performed by the technical solution of this application has an accuracy rate of 82.6%, which can effectively distinguish the levels of traffic flow status and realize accurate prediction of traffic congestion status. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a technical framework diagram for traffic status prediction based on deep learning; Figure 2 Schematic diagram for data extraction; Figure 3 Operate the page map for DataFromSkyViewer; Figure 4 Comparison of original data and denoised data Figure 1 ; Figure 5Comparison of original data and denoised data Figure 2 ; Figure 6 Comparison of original data and denoised data Figure 3 ; Figure 7 This is the FCM clustering result diagram; Figure 8 This is the internal structure diagram of the GRU model; Figure 9 This is the Bi-GRU model structure diagram; Figure 10 This is the GA-Bi-GRU structure diagram; Figure 11 Prediction results for GA-Bi-GRU Figure 1 ; Figure 12 Prediction results for GA-Bi-GRU Figure 2 ; Figure 13 Prediction results for GA-Bi-GRU Figure 3 . DETAILED DESCRIPTION

[0017] It should be noted that, unless there is any conflict, the various embodiments disclosed in this application can be combined with each other.

[0018] Specific embodiment 1: The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU described in this embodiment includes the following steps: Step 1: Obtain surveillance video data; Step 2: Extracting traffic flow parameters based on the surveillance video data, wherein the traffic flow parameters include traffic flow, average vehicle speed, and average headway; Step 3: Input the obtained traffic flow parameters into the GA-Bi-GRU model to obtain the predicted traffic flow parameters. The GA-Bi-GRU model is based on the Bi-GRU model, adds a temporal attention mechanism, and optimizes the model parameters through a genetic algorithm. Step 4: Input the predicted traffic flow parameters into the FCM model, calculate the membership degree with each cluster center, and obtain the traffic congestion prediction level based on the maximum membership principle; The cluster centers are obtained by the following steps: Step A: Obtain historical surveillance video data and traffic flow parameters of the historical surveillance video data; Step B: Input the traffic flow parameters of historical surveillance video data into the FCM model to obtain all cluster centers.

[0019] Acquiring surveillance video data specifically includes: deleting stuck and invalid videos, arranging surveillance videos of different lengths in chronological order, outputting surveillance videos from 7:00 to 19:00 within a day, and then cropping the videos into 5-minute time periods, cropping them into 144 time periods; The specific steps for extracting traffic flow parameters from surveillance videos include: Upload the video to the DataFromSkyAI video analysis platform. The platform will return a work log after successful processing. Open the work log and corresponding surveillance video in DataFromSkyViewer, select an 80m section as the road section to be tested, add an entry line and an exit line, and count the time it takes for vehicles to pass through the two lines. Add two lane lines in the middle lanes and count the time it takes for vehicles to pass through the lane lines. After the settings are completed, export the raw data in CSV format, and the data content is the time information of vehicles passing the entry line, exit line and lane lines. Data preprocessing: Traffic flow data can be obtained by clicking on the entry line in DataFromSkyViewer. The travel time is the time difference between the vehicle passing the entry line and the exit line. The average speed calculation formula is: in, s is the distance of the road section to be measured, in meters, t is the vehicle travel time in seconds.

[0020] The average headway is the average time difference between vehicles passing through lane lines, which is the original traffic flow data obtained by calculation.

[0021] The specific steps for data denoising and dataset construction include: applying the Savitzky-Golay filter for denoising in Python, using Pandas to read the original traffic flow data, setting the filter window length to 11 and the polynomial order to 3, and applying the SG filter column by column to achieve data smoothing. After denoising, a constructed traffic flow parameter dataset is obtained. The data time interval is 5 minutes, and each data contains traffic flow, average speed, and average headway information. The Savitzky-Golay filter formula is: Among them, the coefficient Determined by least squares polynomial fitting, m = (window length - 1) / 2 The traffic flow parameters are input into the FCM model to classify traffic congestion into five levels and obtain five cluster center values. The specific steps include: Determine parameters; Get cluster centers and membership matrix; Traffic status recognition.

[0022] The traffic operation status of the road section is divided into 5 levels, that is, the number of clusters is 5, and the fuzzy coefficient is m The threshold is set to 0.00001, the number of iterations is set to 1000, and the termination threshold is set to 2.5.

[0023] The FCM model is used to calculate the membership matrix and the objective function value and iterate until the difference between the objective function and the objective function of the previous iteration is less than the termination threshold. The iteration ends and the cluster center is obtained. The objective function expression is: In the formula: n is the number of data points, k is the number of clusters, m ( m ≥1) is the fuzzy index used to control the influence of membership, It is j Fuzzy clusters The cluster center, is a data point Cluster The membership degree ranges from [0,1].

[0024] The calculation formula of fuzzy cluster center is: The membership matrix function expression is: After FCM cluster analysis, the membership degree and cluster center obtained from the cluster analysis results are used to divide the traffic status into 1-5 according to the maximum membership degree, representing smooth, relatively smooth, light congestion, moderate congestion, and severe congestion, respectively.

[0025] Construct a GA-Bi-GRU traffic flow parameter prediction model, optimize the model hyperparameters using a genetic algorithm, and introduce a temporal attention mechanism. The specific steps include: The dataset is divided into training set and test set, divided by days, with a division ratio of 6:1; Define the input part of the model based on the traffic flow dataset; Add a temporal attention mechanism to the Bi-GRU model and use the GA genetic algorithm to search for optimal hyperparameters; Based on the traffic flow parameter dataset, traffic flow, average speed, and average headway are defined as model inputs and normalized.

[0026] The Bi-GRU layer processes temporal features, the temporal attention mechanism captures important time nodes, the Dropout layer prevents overfitting, the optimizer is the Adam optimizer, and the GA algorithm searches for the optimal hyperparameters including learning rate, Dropout, batch-size, number of GRU neurons, number of attention neurons, and number of time steps. The fully connected layer outputs data and denormalizes the output data. The temporal attention mechanism uses two independent weight matrices and Process input information, The layer enforces nonlinear dependencies between time steps, and then normalizes the scores to ensure weights and rationality. The expressions for each part are as follows: The Bi-GRU model is specifically set up with an update gate to filter out useless information and determine the degree of retention of previous information in the current prediction. Its expression is as follows: Represents the sigmoid activation function, the output value is between 0 and 1, Indicates the time step t The input matrix. is the previous time step t The hidden state is -1. is the weight matrix of the update gate.

[0027] The reset gate is used to filter useful information and control how much historical information should be ignored. It is described as: is the weight matrix of the update gate.

[0028] The candidate hidden states can be defined as: Where tanh represents the tanh activation function. is the weight matrix of the new cell state of the new memory cell, and * is the multiplication operation.

[0029] The final hidden state can be defined as: The attention layer is implemented as follows: Calculate the attention score: in, is the time step t Input, and are the weights of the two fully connected layers, is the final fully connected layer.

[0030] Calculate attention weights: in, It is The attention weight of time steps, is the total number of time steps.

[0031] Generate context vector: in, It is the final weighted output, which contains the important time step information in the sequence.

[0032] The core principle of using genetic algorithms to find the optimal hyperparameters is to simulate the process of biological evolution and find the global optimal solution through operations such as selection, cloning, crossover, and mutation. The specific process is as follows: Coding strategy: Real number encoding is used, that is, each individual is a list containing multiple real values, which correspond to the hyperparameters of the model.

[0033] Initialize the population: After the encoding is completed, a set of hyperparameter individuals are randomly generated. In this process, we set the number of individuals in the initial population to 10 and set a total of 5 iterations.

[0034] Evaluate fitness: Calculate the fitness value of each individual. In this study, the optimal goal is to minimize the error of the prediction model, so we use mean square error (MSE) as the evaluation indicator.

[0035] Genetic Process: Selection, crossover, and mutation are key components of genetic algorithms. Excellent individuals are selected as parents based on their fitness. Three individuals are randomly selected from the population each time, and the individual with the best fitness is chosen as the parent. The individual with the highest fitness is then copied to the next generation of the population. Using hybrid crossover, the hyperparameters of the two parent individuals are linearly combined to generate offspring individuals. Gaussian mutation is performed on the offspring individuals to produce the next generation of the population.

[0036] Iteration: The genetic process is repeated for 5 generations, and an optimized population is finally returned.

[0037] The predicted traffic flow parameters are input into the FCM model, and the membership with the cluster center obtained above is calculated. The congestion level is divided according to the maximum membership principle. The prediction accuracy of each variable is evaluated by calculating MAE, RMSE, MAPE, and R. The specific steps include: The mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), mean absolute percentage error (MAPE), coefficient of determination (R), and accuracy are used to evaluate the performance of the model. The calculation formula is as follows:

[0038] Example: The short-term traffic state prediction method integrating FCM clustering and GA-Bi-GRU includes the following steps: Step 1: Processing of original surveillance video data; The traffic flow data for traffic state identification and prediction in the first embodiment of the present invention is taken from the surveillance video of the intersection of Yingbin Avenue and Hongye Road in Dongguan City, Guangdong Province. The original surveillance video collected from January 30, 2023 to February 5, 2023 is processed to delete the stuck and invalid videos, and the surveillance videos of different lengths are arranged in chronological order. The surveillance videos from 7:00 to 19:00 every day from January 30, 2023 to February 5, 2023 are output, and then the video is cropped into 144 time periods with a time period of 5 minutes.

[0039] Step 2: Extract traffic flow parameters based on surveillance video; The data extraction steps are as follows Figure 2 As shown in the figure, the cropped videos are uploaded one by one to the DataFromSkyAI video analysis platform. After successful processing, the platform will return a work log. The work log and the corresponding time period monitoring video are opened in DataFromViewer. An 80m length is selected as the road section to be tested, and the entry line and exit line are added. The time when the vehicles pass through are counted. Two lane lines are added in the middle two lanes, and the time when the vehicles pass through the lane lines are counted respectively. After the settings are completed, the original data is exported, and the average headway, average speed, and traffic flow data are calculated. The extracted original data are shown in Table 1, totaling 1008 data.

[0040] Table 1 Traffic flow raw data Step 3: Data denoising and dataset construction; Input traffic flow, average speed, and average headway information, and smooth it through local polynomial fitting to retain the high-order moment characteristics of the data and suppress high-frequency noise data. The comparison between the denoised data and the original data before and after denoising is shown in the figure below. Figure 4 、 Figure 5 as well as Figure 6 shown.

[0041] Step 4: Build the FCM model to calculate the cluster center, perform membership calculation, and divide the traffic status; Build the FCM model in Python, input the traffic flow, average speed, and average headway information after noise reduction, and perform normalization. Set the number of clusters to 5 and the fuzzy coefficient to m Set it to 2.5, the number of iterations to 1000, the termination threshold to 0.00001, calculate the membership matrix and fuzzy cluster center, and perform denormalization on the output data. The clustering diagram is as follows Figure 7 As shown in Table 2, the cluster centers are shown. According to the cluster center data, traffic state values ​​1 to 5 are defined as smooth, relatively smooth, lightly congested, moderately congested, and severely congested, respectively.

[0042] Table 2 Cluster center coordinates Step 5: Build a GA-Bi-GRU traffic flow parameter prediction model, optimize the model hyperparameters through genetic algorithms, and introduce a temporal attention mechanism; The constructed GA-Bi-GRU model consists of three parts: Input, GA optimization layer, Backbone, and Output. Figure 10 As shown; For input, we first converted the time column stored in Excel into the datetime type to facilitate subsequent time window division. We then used PyTorch's MinMaxScaler to normalize traffic flow, average speed, and average headway, compressing the data range to [0, 1]. The dataset was divided by day, with the first six days' data serving as the training set, totaling 864 records, and the seventh day's data serving as the test set, totaling 144 records.

[0043] The GA optimization layer searches for the global optimal solution through operations such as selection, cloning, crossover, and mutation. The optimization parameters are learning rate, dropout rate, batch-size, number of GRU neurons, number of attention neurons, and number of time steps. The optimized hyperparameters are shown in Table 3.

[0044] Table 3 Comparison of hyperparameters before and after optimization In the Backbone part, a time window is constructed and sequence data of time steps (time_step=7) is generated through the create_dataset function. The input is 7 steps of historical data and the output is the predicted value of the next step. The model is built using tensorflow in PyTorch. The update gate in the bidirectional GRU layer controls how much historical information should be retained in the hidden state at the current moment and how much new input information should be introduced. The reset gate determines how much information in the hidden state of the previous moment needs to be forgotten in order to pay more attention to the features of the current input. The gradient disappearance problem is alleviated by the selectivity of the gating mechanism. The number of Bi-GRU units is set to 84, and the complete sequence is returned. The output of each time step is retained for use by the attention layer. The temporal attention layer calculates the attention score through two fully connected layers (W1, W2) to generate a context vector. The attention weight reveals the difference in importance of different time steps. The number of neurons in the attention layer is set to 75, the batch_size is set to 26, the Adam optimizer is selected, the learning rate is set to 0.003, and the dropout rate of the Dropout layer is set to 0.35 to prevent overfitting.

[0045] In the output part, the fully connected output layer (Dense) has an output dimension of 3, which corresponds to the predicted values ​​of traffic flow, average speed, and average headway. Denormalization is used to restore the predicted results to the original dimensions. Figure 11 、 Figure 12 as well as Figure 13 Comparison chart of predicted values ​​and true values.

[0046] Step 6: Calculate the membership of the predicted traffic flow parameters and cluster centers and divide the predicted traffic states. Test and evaluate the trained model by calculating MAE, RMSE, MAPE, and R, and evaluate the prediction accuracy of each variable. Table 4 shows the comparison of the predicted values, as well as the comparison between the cluster value and the predicted traffic congestion value.

[0047] Table 4 Comparison of predicted values Table 5 shows the evaluation metrics before and after model optimization. The GA-Bi-GRU model achieved the best prediction results. Compared with the GRU model, the Bi-GRU model achieved lower MAE, MSE, RMSE, and MAPE. The introduction of the temporal attention mechanism further improved the model's accuracy. Finally, when the model was optimized using a genetic algorithm, although MAPE and R decreased by 0.001 and 0.003, respectively, MAE, MSE, and RMSE all improved, resulting in a prediction accuracy of 82.6%, surpassing other models.

[0048] Table 5 GRU optimization evaluation index results A short-term traffic status prediction method that integrates FCM clustering and Bi-GRU processes surveillance videos, extracts traffic flow parameters through DataFromViewer, and performs noise reduction on the extracted raw data through Savitzky-Golay filter. While not changing the original change characteristics of the data, it eliminates the data noise generated during the data extraction process, making the traffic flow dataset more realistically reflect the road traffic operation status.

[0049] The short-term traffic status prediction method that integrates FCM clustering and Bi-GRU is constructed. The FCM model constructed by clustering analysis of parameters such as average speed, average headway, and flow can avoid the possibility that a single parameter (such as only flow) may mask the key features of other dimensions. The noise or outliers of a certain parameter can be corrected by other parameters. Different from traditional hard clustering, the FCM model allows data points to belong to multiple clusters at the same time in the form of membership. The FCM model realizes the discrimination of traffic status through multi-parameter clustering.

[0050] This short-term traffic status prediction method combines FCM clustering and Bi-GRU. In the GRU, the update gate controls how much historical information the hidden state at the current moment should retain and how much new input information should be introduced. The reset gate determines how much information in the hidden state at the previous moment should be forgotten, so as to focus more on the characteristics of the current input. The selectivity of the gating mechanism alleviates the gradient vanishing problem. The Bi-GRU-attention layer automatically learns the implicit relationship between indicators. The forward GRU captures historical trends, and the reverse GRU extracts future contextual features. The two jointly output time-sensitive features, and the temporal attention mechanism dynamically focuses on key time periods. The GA genetic algorithm optimizes model hyperparameters and structural design by simulating biological evolution mechanisms, significantly improving the performance of time series prediction tasks. The constructed model achieves an optimal balance between prediction accuracy, computational efficiency, and business interpretability, realizing short-term traffic status prediction.

[0051] The technical solution of this application performs noise reduction processing on a traffic flow parameter dataset extracted from surveillance video, removing noise from the data without significantly changing its characteristics. The FCM model, by clustering average speed, average headway, and traffic flow, can prevent a single parameter (such as traffic flow alone) from masking key features of other dimensions. Noise or outliers in a particular parameter can be corrected by other parameters. Unlike traditional hard clustering, the FCM model allows data points to belong to multiple clusters simultaneously in the form of membership. Through multi-parameter clustering, the FCM model achieves traffic state discrimination. The GA genetic algorithm searches for optimal hyperparameters and automatically learns the implicit relationship between indicators through the Bi-GRU. The forward GRU captures historical trends, the reverse GRU extracts future contextual features, and the combined output is time-sensitive. The temporal attention mechanism dynamically focuses on key time periods. By deeply integrating deep learning technology with traffic engineering characteristics, this model achieves an optimal balance between prediction accuracy, computational efficiency, and business interpretability, enabling short-term traffic state prediction.

[0052] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solutions of the present invention and cannot be used to limit the scope of protection. Any minor changes made based on the claims and description of the present invention shall still fall within the scope of protection of the present invention.

Claims

1. A short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU, characterized by The following steps are included: Step 1: Obtain surveillance video data; Step 2: Extracting traffic flow parameters based on the surveillance video data, wherein the traffic flow parameters include traffic flow, average vehicle speed, and average headway; Step 3: Input the obtained traffic flow parameters into the GA-Bi-GRU model to obtain the predicted traffic flow parameters. The GA-Bi-GRU model is based on the Bi-GRU model, adds a temporal attention mechanism, and optimizes the model parameters through a genetic algorithm. Step 4: Input the predicted traffic flow parameters into the FCM model, calculate the membership degree with each cluster center, and obtain the traffic congestion prediction level based on the maximum membership principle; The cluster centers are obtained by the following steps: Step A: Obtain historical surveillance video data and traffic flow parameters of the historical surveillance video data; Step B: Input the traffic flow parameters of historical surveillance video data into the FCM model to obtain all cluster centers.

2. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 1 is characterized in that The traffic flow parameters are obtained by the following steps: Step 1: Obtain surveillance video data and decompose the surveillance video to obtain multiple video segments with equal time intervals; Step 2: Extract continuous frame images based on each video segment; Step 3: Input the continuous frame images into the YOLO-v8 network to identify the vehicles in each frame of the video data; Step 4: Use DeepSORT to track the identified vehicles and obtain vehicle trajectory information, which includes vehicle ID, vehicle head direction, vehicle coordinates, and vehicle travel time difference; Step 5: Get traffic volume based on vehicle ID; Step 6: Obtain vehicle speed based on vehicle travel time difference; Step 7: Get the average vehicle speed based on all vehicle speeds; Step 8: Obtain the headway between adjacent vehicles based on the vehicle coordinates and head directions of the adjacent vehicles; Step 9: Obtain the headway distance between adjacent vehicles and the speed of the vehicle behind them, and divide the headway distance between adjacent vehicles by the speed of the vehicle behind them to obtain the headway time. Step 10: Repeat step 9 to obtain all the headway times and then obtain the average headway time.

3. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 1 is characterized in that The traffic flow parameters are obtained by the following steps: Step 1: Upload the surveillance video to the DataFromSkyAI video analysis platform. After successful processing, the platform returns a work log. Step 2: Open the work log and the corresponding surveillance video in DataFromSkyViewer, select the road section to be tested, add the entry line and exit line, count the time it takes for vehicles to pass through each, and add two lane lines in the middle two lanes to count the time it takes for vehicles to pass through each lane line. Step 3: Count the number of vehicles passing through the road section to be tested and obtain the traffic volume; Step 4: Obtain the travel time based on the time difference between the vehicle passing the entry line and the exit line, and obtain the vehicle speed based on the travel time and the length of the road section to be measured; Step 5: Repeat step 4 to get the speed of each vehicle and then the average vehicle speed; Step 6: Based on the time difference between each vehicle passing through the two middle lanes, the average time difference between the vehicles passing the lane lines is obtained, and based on the average time difference between the vehicles passing the lane lines, the average headway time is obtained.

4. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 1 is characterized in that The traffic flow parameters are the traffic flow parameters after noise reduction. The specific steps of noise reduction are: In Python, the Savitzky-Golay filter is applied to denoise the traffic flow parameters. The Savitzky-Golay filter formula is: in, is the weight coefficient, is the filter output, The original time series at time point The observed value at l is the half-width of the window, i Index for summation.

5. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 1 is characterized in that The cluster center and membership degree are expressed as: in, For the i data points, For the j Cluster centers, m is the fuzzy weight index, is the number of cluster centers, k =1,2,... .

6. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 1 is characterized in that The output of the attention layer of the GA-Bi-GRU model is expressed as: in, is the final output after weighting, For the The attention weight of time steps, is the total number of time steps, is the time step t input.

7. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 6 is characterized in that described Expressed as: in, Score for attention, is the final fully connected layer, and are the weights of the two fully connected layers.

8. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 7 is characterized in that The hidden state in the GA-Bi-GRU model is expressed as: in, The previous time step t The hidden state is -1, is a candidate hidden state, is the output of the update gate.

9. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 8 is characterized in that described Expressed as: in, is the sigmoid activation function, is the weight matrix of the update gate.

10. The short-term traffic congestion prediction method integrating FCM clustering and GA-Bi-GRU according to claim 9 is characterized in that described Expressed as: in, is the weight matrix of the new cell state of the new memory cell, To reset the gate, is the weight matrix of the update gate.

Citation Information

Cited By

  • Urban traffic intelligent cooperative monitoring method and system based on mechatronics

    CN121393134A