A traffic condition perception method and system based on big data
By constructing a Spark framework and attention-weighted NAW-DBLSTM algorithm in a big data environment, the traditional DBLSTM algorithm is optimized, solving the problem of low traffic flow prediction accuracy and achieving more efficient and accurate traffic flow prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 胡文岗
- Filing Date
- 2023-11-23
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies for traffic flow prediction have low accuracy and struggle to handle complex nonlinear features and high-dimensional data, resulting in poor prediction performance.
A traffic condition perception method based on big data is constructed. The parallel NAW-DBLSTM algorithm with attention mechanism weighting is used in conjunction with the Spark framework. The parallel NAW-DBLSTM algorithm is executed by combining RDD and optimizing the traditional DBLSTM algorithm. The spatial correlation and nonlinear characteristics between road segments are considered. The influence weight values are calculated by normal distribution and a time window is constructed for training.
It improves the effectiveness, accuracy, and scalability of traffic flow forecasting, enhances forecast precision, and reduces errors.
Smart Images

Figure CN122135548A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of traffic flow prediction technology, and more specifically, it relates to a traffic condition perception method and system based on big data. Background Technology
[0002] Traffic flow prediction, as a research area in intelligent transportation systems, advanced traffic management systems, and the Internet of Vehicles, aims to solve the problem of how to predict traffic flow in the future by using traffic conditions over a past period and the current traffic conditions. Accurate traffic flow prediction is of great significance for alleviating road congestion, improving the urban environment, and providing travel routes.
[0003] Existing technologies include numerous models and algorithms for traffic flow prediction. These can be broadly categorized into parametric and non-parametric methods. Non-parametric methods are computationally simple and convenient, suitable for stationary and linear time series. However, they struggle to overcome the limitations of parametric methods when faced with the complexity and dynamic nature of traffic flow. Parametric methods, on the other hand, offer better predictive performance and computational efficiency but are ill-suited for handling high-dimensional data and cannot adequately describe the complex nonlinear characteristics of real-world traffic flow data, leading to low traffic flow prediction accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a traffic condition perception method and system based on big data, aiming to solve the technical problem of low traffic flow prediction accuracy in the prior art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is: to provide a traffic condition perception method based on big data, comprising:
[0006] Step 1: Obtain historical traffic movement trajectory data;
[0007] Step 2: Preprocess the historical traffic movement trajectory data to obtain training data;
[0008] Step 3: Build a traffic flow prediction model. Train the traffic flow prediction model based on the training data to obtain the trained traffic flow prediction model.
[0009] Step 4: Input the current movement trajectory data into the trained traffic flow prediction model and output the traffic flow prediction results.
[0010] Preferably, step 2 includes:
[0011] The process involves reading, sorting, statistically analyzing, and integrating historical traffic movement trajectory data.
[0012] Reading historical traffic movement trajectory data includes: uploading historical traffic movement trajectory data to the Spark framework, reading the historical traffic movement trajectory data uploaded to the Spark framework, and converting the historical traffic movement trajectory data into multiple elastic distribution datasets;
[0013] Preferably, the historical traffic movement trajectory data is sorted by:
[0014] The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs: key1 = time and vehicle ID, value1 = target road segment number. ;
[0015] Based on key-value pairs Remove historical traffic movement trajectory data other than the target road segment;
[0016] The traffic movement trajectory data of the target road segment is sorted based on the sortByKey operator and key1;
[0017] Delete duplicate traffic movement trajectory data with the same vehicle ID within a preset time interval, and obtain the vehicle movement trajectory within time interval t of the target road segment.
[0018] Preferably, statistical analysis of historical traffic movement trajectory data includes:
[0019] Based on the Map operator, the vehicle movement trajectory within the preset road segment time interval t is converted into a key-value pair where key2 = time and region number, and value2 increments the count by 1. ;
[0020] The reduceByKey operator is used to statistically analyze the vehicle movement trajectories within a preset road segment at time interval t according to time and region number, and obtain the number of vehicles in the target road segment within each time interval t.
[0021] Preferably, the data integration of historical traffic movement trajectory data includes:
[0022] The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs where key3 = preset time interval and value3 = total number of vehicles in each target road segment. ;
[0023] The number of vehicles in the target road segment at each time interval t is sorted and integrated based on the sortByKey operator and key3 to obtain training data.
[0024] Preferably, step 3 includes:
[0025] Step 3.1: Calculate the influence weight values of the target road segment and adjacent road segments based on the normal distribution;
[0026] Step 3.2: Introduce an attention mechanism, and obtain the attention weight with the highest impact value on the target road segment based on the softmax function;
[0027] Step 3.3: Construct a time window, use the time window to train the traffic flow prediction model with training data and attention weights, and obtain the traffic flow prediction results based on the trained traffic flow prediction model;
[0028] The formula for calculating the attention weight, which has the highest impact on the target road segment, is:
[0029]
[0030] in, The attention weight is the one that has the highest impact on the target road segment, where N is a constant and P is the impact weight between the target road segment and its adjacent segments.
[0031] Preferably, step 3.1 includes:
[0032] The influence weight values between the target road segment and adjacent road segments are obtained based on the influence weight value calculation formula;
[0033] The formula for calculating the influence weight between the target road segment and adjacent road segments is as follows:
[0034]
[0035] Where P is the influence weight value between the target road segment and adjacent road segments. It is an empirical constant. Let x be the traffic flow of the target road segment, and d be the discrete value of the traffic flow of each road segment. i For the traffic flow of each road segment, d m The traffic volume for the target road segment.
[0036] Preferably, step 3.3 includes:
[0037] Step 3.3.1: Obtain the traffic flow at the current time interval t based on the target road segment;
[0038] Step 3.3.2: Based on the normal distribution, the traffic flow with the influence weight between the target road segment and adjacent road segments is used as training data to train the traffic flow prediction model according to the time series composed of time intervals t-7, t-6, t-5, t-4, t-3, t-2, t-1, t, and obtain the prediction results at the t+1 interval.
[0039] The training formula for the traffic flow prediction model is:
[0040]
[0041] Among them, i t f is the input gate for the current time step output. t For the Gate of Oblivion, c t In cellular state, o t For output gate, h t The hidden layer output is represented by σ(·), where σ(·) denotes the sigmoid activation function, h is the hidden vector sequence, H is the activation function, P represents the weight matrix, and b is the bias vector. This is the bias vector for the input gate. Let be the bias vector of the forget gate. This is the bias vector for the cell state. This is the bias vector for the output gate. This is the bias vector for the output vector. Let be the bias vector of the forward BiLSTM hidden sequence in the nth layer. Let be the bias vector of the inverse BiLSTM hidden sequence of the nth layer. The output of the forward BiLSTM hidden sequence in the nth layer at time interval t. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t. The output of the forward BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the forward BiLSTM hidden sequence at the (n-1)th layer during time interval t. The output of the inverse BiLSTM hidden sequence at time interval t in the (n-1)th layer. For the (n-1)th layer of the forward BiLSTM state at time interval t, Let y be the inverse BiLSTM state of the (n-1)th layer at time interval t. t The output gate outputs a vector. This represents the positive hidden state of the Nth layer. This represents the reverse hidden state of the Nth layer. The output of the forward BiLSTM hidden sequence of the Nth layer at time interval t. Let N be the output of the reverse BiLSTM hidden sequence of the Nth layer at time interval t, where N is a constant.
[0042] Preferably, step 4 includes:
[0043] Calculate the mean absolute error, mean square error, root mean square error, and mean absolute percentage error between the traffic flow prediction result and the actual result. If the values of the mean absolute error, mean square error, root mean square error, and mean absolute percentage error are within the preset range, then output the traffic flow prediction result.
[0044] The formulas for calculating mean absolute error, mean square error, root mean square error, and mean absolute percentage error are as follows:
[0045]
[0046] Where MAE is the mean absolute error, MSE is the mean square error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, and x i For traffic flow prediction results, y i This represents the actual traffic flow results.
[0047] A traffic flow prediction method based on big data includes:
[0048] The data acquisition module is used to acquire historical traffic movement trajectory data;
[0049] The data preprocessing module is used to preprocess historical traffic movement trajectory data to obtain training data;
[0050] The traffic flow prediction model module is used to build and train traffic flow prediction models.
[0051] The output module is used to output traffic flow prediction results.
[0052] The beneficial effects of the traffic condition perception method and system based on big data provided by this invention are as follows: Compared with the existing technology, this invention constructs a parallel NAW-DBLSTM algorithm based on normal distribution and attention mechanism weighting under the Spark framework, and then combines RDD to execute the parallel NAW-DBLSTM algorithm, and optimizes the traditional DBLSTM algorithm, thereby improving the effectiveness, accuracy and scalability of traffic flow prediction. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A structural framework diagram of a traffic condition perception method based on big data provided in an embodiment of the present invention;
[0055] Figure 2 A flowchart of a traffic flow prediction system based on big data provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0057] Please see Figure 2 The present invention will now describe a traffic condition perception method based on big data.
[0058] A traffic condition perception method based on big data includes the following steps:
[0059] Step 1: Obtain historical traffic movement trajectory data;
[0060] Step 2: Preprocess historical traffic movement trajectory data to obtain training data;
[0061] Further, step 2 includes:
[0062] The process involves reading, sorting, statistically analyzing, and integrating historical traffic movement trajectory data.
[0063] First, the data is partitioned based on traffic movement trajectory data for different road segments. The `partitionBy` operator in SparkContext is used to establish the relationship between the data partitions and the corresponding RDD partitions. Then, the data for each road segment within the RDD partitions is read and converted into different key-value pairs.<key,value> Next, the spatial correlation between each road segment is calculated using the normal distribution in S201. Then, the attention weight value with high influence on the target road segment is calculated using the attention mechanism to obtain the weighted traffic flow sequence RDD partition.
[0064] Reading historical traffic movement trajectory data includes: uploading historical traffic movement trajectory data to the Spark framework, reading the historical traffic movement trajectory data uploaded to the Spark framework, and converting the historical traffic movement trajectory data into multiple elastic distribution datasets;
[0065] Data storage for historical traffic movement trajectory data includes: smoothing the sorted historical traffic trajectory data to obtain training data, and storing the training data to HDFS using saveAsTextFile.
[0066] HDFS is a distributed file system. HDFS is fault-tolerant and designed to be deployed on low-cost hardware. It also provides high throughput access to application data, making it suitable for applications with very large datasets. HDFS relaxes POSIX requirements, enabling streaming access to data within the file system. HDFS was initially created as the infrastructure for the open-source Apache Nutch project. HDFS is part of the Hadoop project, which in turn is part of Lucene.
[0067] By adjusting the extreme values of the parameters and weights of the Karl von Neumann filter, and using the linear unbiased mean square error, the deviation between the input and output is calculated. The parameters of the prediction algorithm are calculated iteratively, using the unbiased mean square error as the error transfer function, and continuously adjusted and optimized to smooth the data region.
[0068] Furthermore, sorting the historical traffic movement trajectory data includes:
[0069] The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs: key1 = time and vehicle ID, value1 = target road segment number. ;
[0070] Based on key-value pairs Remove historical traffic movement trajectory data other than the target road segment;
[0071] The traffic movement trajectory data of the target road segment is sorted based on the sortByKey operator and key1;
[0072] Delete duplicate traffic movement trajectory data with the same vehicle ID within a preset time interval, and obtain the vehicle movement trajectory within time interval t of the target road segment.
[0073] Furthermore, statistical analysis of historical traffic movement data includes:
[0074] Based on the Map operator, the vehicle movement trajectory within the preset road segment time interval t is converted into a key-value pair where key2 = time and region number, and value2 increments the count by 1. ;
[0075] The reduceByKey operator is used to statistically analyze the vehicle movement trajectories within a preset road segment at time interval t according to time and region number, and obtain the number of vehicles in the target road segment within each time interval t.
[0076] Furthermore, data integration of historical traffic movement trajectory data includes:
[0077] The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs where key3 = preset time interval and value3 = total number of vehicles in each target road segment. ;
[0078] The number of vehicles in the target road segment at each time interval t is sorted and integrated based on the sortByKey operator and key3 to obtain training data.
[0079] Step 3: Build a traffic flow prediction model. Train the traffic flow prediction model based on the training data to obtain the trained traffic flow prediction model.
[0080] The traffic flow prediction model in this invention is constructed based on the SE-BiLSTM algorithm, which optimizes the traditional BiLSTM.
[0081] Furthermore, step 3 includes:
[0082] Step 3.1: Calculate the influence weight values of the target road segment and adjacent road segments based on the normal distribution;
[0083] The spatial correlation between road segments is calculated using a normal distribution to obtain the influence weight of each road segment on the target road segment. Then, the attention weight with the highest influence on the target road segment is calculated using an attention mechanism. Finally, traffic flow and its attention weight values are added to DBLSTM for training using a time window to improve the accuracy of short-term traffic flow prediction. This solves the technical problem that existing traffic flow prediction methods do not consider the influence weight of spatial correlation between road segments and are difficult to capture the nonlinear characteristics of traffic flow, resulting in low traffic flow prediction accuracy.
[0084] Further, step 3.1 includes:
[0085] The influence weight values between the target road segment and adjacent road segments are obtained based on the influence weight value calculation formula;
[0086] The formula for calculating the influence weight between the target road segment and adjacent road segments is as follows:
[0087]
[0088] Where P is the influence weight value between the target road segment and adjacent road segments. It is an empirical constant. Let x be the traffic flow of the target road segment, and d be the discrete value of the traffic flow of each road segment. i For the traffic flow of each road segment, dm The traffic volume for the target road segment.
[0089] Step 3.2: Introduce an attention mechanism, and obtain the attention weight with the highest impact value on the target road segment based on the softmax function;
[0090] The formula for calculating the attention weight, which has the highest impact on the target road segment, is:
[0091]
[0092] in, The attention weight is the one that has the highest impact on the target road segment, where N is a constant and P is the impact weight between the target road segment and its adjacent segments.
[0093] Step 3.3: Construct a time window, use the time window to train the traffic flow prediction model with training data and attention weights, and obtain the traffic flow prediction results based on the trained traffic flow prediction model;
[0094] Further, step 3.3 includes:
[0095] Step 3.3.1: Obtain the traffic flow at the current time interval t based on the target road segment;
[0096] Step 3.3.2: Based on the normal distribution, the traffic flow with the influence weight between the target road segment and adjacent road segments is used as training data to train the traffic flow prediction model according to the time series composed of time intervals t-7, t-6, t-5, t-4, t-3, t-2, t-1, t, and obtain the prediction results at the t+1 interval.
[0097] Based on the traffic flow of target road segment i at the current time interval t Extract the traffic flow of target road segment i in the adjacent historical time intervals within the current time interval t. , , , The time windows are composed of a size of 5, as shown below:
[0098]
[0099] The training formula for the traffic flow prediction model is:
[0100]
[0101] Among them, i t f is the input gate for the current time step output. t For the Gate of Oblivion, c t In cellular state, o t For output gate, ht The hidden layer output is represented by σ(·), where σ(·) denotes the sigmoid activation function, h is the hidden vector sequence, H is the activation function, P represents the weight matrix, and b is the bias vector. This is the bias vector for the input gate. Let be the bias vector of the forget gate. This is the bias vector for the cell state. This is the bias vector for the output gate. This is the bias vector for the output vector. Let be the bias vector of the forward BiLSTM hidden sequence in the nth layer. Let be the bias vector of the inverse BiLSTM hidden sequence of the nth layer. The output of the forward BiLSTM hidden sequence in the nth layer at time interval t. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t. The output of the forward BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the forward BiLSTM hidden sequence at the (n-1)th layer during time interval t. The output of the inverse BiLSTM hidden sequence at time interval t in the (n-1)th layer. For the (n-1)th layer of the forward BiLSTM state at time interval t, Let y be the inverse BiLSTM state of the (n-1)th layer at time interval t. t The output gate outputs a vector. This represents the positive hidden state of the Nth layer. This represents the reverse hidden state of the Nth layer. The output of the forward BiLSTM hidden sequence of the Nth layer at time interval t. Let N be the output of the reverse BiLSTM hidden sequence of the Nth layer at time interval t, where N is a constant.
[0102] Step 4: Input the current movement trajectory data into the trained traffic flow prediction model and output the traffic flow prediction results.
[0103] Furthermore, step 4 includes:
[0104] Calculate the mean absolute error, mean square error, root mean square error, and mean absolute percentage error between the traffic flow prediction result and the actual result. If the values of the mean absolute error, mean square error, root mean square error, and mean absolute percentage error are within the preset range, then output the traffic flow prediction result.
[0105] The formulas for calculating mean absolute error, mean square error, root mean square error, and mean absolute percentage error are as follows:
[0106]
[0107] Where MAE is the mean absolute error, MSE is the mean square error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, and x i For traffic flow prediction results, y i This represents the actual traffic flow results.
[0108] To verify the performance of the optimized traffic flow model (SW-BiLSTM) of this invention, it was first compared with the traditional BiLSTM model. First, we used KF to process the data for model training, and the results are shown in Table 1:
[0109]
[0110] Table 1
[0111] As shown in Table 1, after data smoothing using KF, the predicted values of the SW-BiLSTM model are closer to the actual values. It can be found that the MAPE values of the SW-BiLSTM model are reduced by 29.73%, 10%, 16.67%, and 6.9% respectively compared to the BiLSTM model. The average MAPE value of the SW-BiLSTM model is 15.83% lower than that of the BiLSTM model. This indicates that when simultaneously capturing traffic flow information from past to future times, and considering the normal distribution to capture the mutual influence between road segments and the variation of traffic flow, the traffic flow prediction values of the SW-BiLSTM model fit the actual traffic flow better.
[0112] This invention constructs a parallel NAW-DBLSTM algorithm based on normal distribution and attention mechanism weighting under the Spark framework, and then combines RDD to execute the parallel NAW-DBLSTM algorithm. It also optimizes the traditional DBLSTM algorithm, thereby improving the effectiveness, accuracy and scalability of traffic flow prediction.
[0113] The above is an introduction to the traffic flow prediction method provided in this application. To facilitate better implementation of the traffic flow prediction method provided in this application, this application also provides a traffic flow prediction system based on big data from the perspective of functional modules.
[0114] according to Figure 1 As shown, a traffic flow prediction system based on big data includes:
[0115] The data acquisition module is used to acquire historical traffic movement trajectory data;
[0116] The data preprocessing module is used to preprocess historical traffic movement trajectory data to obtain training data;
[0117] The traffic flow prediction model module is used to build and train traffic flow prediction models.
[0118] The output module is used to output traffic flow prediction results.
[0119] Compared with the prior art, the beneficial effects of the traffic flow prediction system based on big data provided by the present invention are the same as those of the traffic condition perception method based on big data described in the above technical solution, and will not be repeated here.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A traffic condition perception method based on big data, characterized in that, include: Step 1: Obtain historical traffic movement trajectory data; Step 2: Preprocess the historical traffic movement trajectory data to obtain training data; Step 3: Build a traffic flow prediction model. Train the traffic flow prediction model based on the training data to obtain the trained traffic flow prediction model. Step 4: Input the current movement trajectory data into the trained traffic flow prediction model and output the traffic flow prediction results.
2. The traffic condition perception method based on big data according to claim 1, characterized in that, Step 2 includes: The historical traffic movement trajectory data is read, sorted, statistically analyzed, and integrated. The reading of historical traffic movement trajectory data includes: uploading historical traffic movement trajectory data to the Spark framework, reading the historical traffic movement trajectory data uploaded to the Spark framework, and converting the historical traffic movement trajectory data into multiple elastic distribution datasets.
3. The traffic condition perception method based on big data according to claim 2, characterized in that, The historical traffic movement trajectory data is sorted as follows: The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs: key1 = time and vehicle ID, value1 = target road segment number.<key1,value1> ; Based on key-value pairs<key1,value1> Remove historical traffic movement trajectory data other than the target road segment; The traffic movement trajectory data of the target road segment is sorted based on the sortByKey operator and key1; Delete duplicate traffic movement trajectory data with the same vehicle ID within a preset time interval, and obtain the vehicle movement trajectory within time interval t of the target road segment.
4. The traffic condition perception method based on big data according to claim 2, characterized in that, The statistical analysis of historical traffic movement trajectory data includes: Based on the Map operator, the vehicle movement trajectory within the time interval t of the preset road segment is converted into a key-value pair where key2 = time and region number, and value2 is incremented by 1.<key2,value2> ; The reduceByKey operator is used to statistically analyze the vehicle movement trajectories within a preset road segment at time interval t according to time and region number, and obtain the number of vehicles in the target road segment within each time interval t.
5. The traffic condition perception method based on big data according to claim 2, characterized in that, The data integration of historical traffic movement trajectory data includes: The Map operator is used to transform the data in each elastic distribution dataset into key-value pairs where key3 = preset time interval and value3 = total number of vehicles in each target road segment.<key3,value3> ; The number of vehicles in the target road segment at each time interval t is sorted and integrated based on the sortByKey operator and key3 to obtain training data.
6. The traffic condition perception method based on big data according to claim 1, characterized in that, Step 3 includes: Step 3.1: Calculate the influence weight values of the target road segment and adjacent road segments based on the normal distribution; Step 3.2: Introduce an attention mechanism, and obtain the attention weight with the highest impact value on the target road segment based on the softmax function; Step 3.3: Construct a time window, use the time window to train the traffic flow prediction model with the training data and attention weights, and obtain the traffic flow prediction result based on the trained traffic flow prediction model; The formula for calculating the attention weight, which has the highest impact on the target road segment, is: in, The attention weight is the one that has the highest impact on the target road segment, where N is a constant and P is the impact weight between the target road segment and its adjacent segments.
7. The traffic condition perception method based on big data according to claim 6, characterized in that, Step 3.1 includes: Step 3.1.1: Obtain the influence weight value between the target road segment and adjacent road segments based on the influence weight value calculation formula; Step 3.1.2: The formula for calculating the influence weight value between the target road segment and adjacent road segments is as follows: Where P is the influence weight between the target road segment and adjacent road segments, σ is an empirical constant, μ is the traffic flow of the target road segment, x is the discrete value of the traffic flow of each road segment, and d i For the traffic flow of each road segment, d m The traffic volume for the target road segment.
8. A traffic condition perception method based on big data according to claim 6, characterized in that, Step 3.3 includes: Step 3.3.1: Obtain the traffic flow at the current time interval t based on the target road segment; Step 3.3.2: Based on the normal distribution, the traffic flow with the influence weight between the target road segment and adjacent road segments is used as training data to train the traffic flow prediction model according to the time series composed of time intervals t-7, t-6, t-5, t-4, t-3, t-2, t-1, t, and obtain the prediction results at the t+1 interval. The training formula for the traffic flow prediction model is: h t =o t h(c t ); Among them, i t f is the input gate for the current time step output. t For the Gate of Oblivion, c t In cellular state, o t For output gate, h t For the hidden layer output, σ(·) represents the sigmoid activation function, h is the hidden vector sequence, H is the activation function, P represents the weight matrix, and b is the bias vector. i Let b be the bias vector of the input gate. f Let b be the bias vector of the forget gate. c Let b be the bias vector of the cell state. o b is the bias vector of the output gate. y This is the bias vector for the output vector. Let be the bias vector of the forward BiLSTM hidden sequence in the nth layer. Let be the bias vector of the inverse BiLSTM hidden sequence of the nth layer. The output of the forward BiLSTM hidden sequence in the nth layer at time interval t. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t. The output of the forward BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the reverse-direction BiLSTM hidden sequence of the nth layer at time interval t-1. The output of the forward BiLSTM hidden sequence at the (n-1)th layer during time interval t. The output of the inverse BiLSTM hidden sequence at time interval (n-1) is... For the (n-1)th layer of the forward BiLSTM state at time interval t, Let y be the inverse BiLSTM state of the (n-1)th layer at time interval t. t The output gate outputs a vector. This represents the positive hidden state of the Nth layer. This represents the reverse hidden state of the Nth layer. The output of the forward BiLSTM hidden sequence of the Nth layer at time interval t. Let N be the output of the reverse BiLSTM hidden sequence of the Nth layer at time interval t, where N is a constant.
9. A traffic condition perception method based on big data according to claim 1, characterized in that, Step 4 includes: Calculate the mean absolute error, mean square error, root mean square error, and mean absolute percentage error between the traffic flow prediction result and the actual result. If the values of the mean absolute error, mean square error, root mean square error, and mean absolute percentage error are within the preset range, then output the traffic flow prediction result. The formulas for calculating mean absolute error, mean square error, root mean square error, and mean absolute percentage error are as follows: Where MAE is the mean absolute error, MSE is the mean square error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, and x i For traffic flow prediction results, y i This represents the actual traffic flow results.
10. A traffic flow prediction system based on big data, characterized in that, include: The data acquisition module is used to acquire the historical traffic movement trajectory data; The data preprocessing module is used to preprocess the historical traffic movement trajectory data to obtain training data; The traffic flow prediction model module is used to construct the traffic flow prediction model and train the traffic flow prediction model. The output module is used to output traffic flow prediction results.