Traffic Pattern Recognition Method and System Based on Feature Fusion of Graph Convolutional Network
Through the graph convolution network feature fusion method, combining global and local spatial features, a traffic pattern recognition model is designed, which solves the robustness and recognition accuracy problems of the existing methods, and realizes fine-grained traffic pattern recognition.
Patent Information
- Application Number
- CN202310431863.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2043-04-21
AI Technical Summary
The existing traffic pattern recognition methods rely on human feature selection, are not robust and fail to effectively integrate global and local spatial features, resulting in poor recognition accuracy.
A feature fusion method based on graph convolution network is adopted, and a traffic pattern recognition model is designed through a bidirectional gating cyclic unit, an expanded convolutional network, a maximum mutual information coefficient and a graph convolutional network, combined with global and local spatial features, including data preprocessing, feature extraction and fusion, the model is trained using Adam optimizer, and the cross entropy loss function is optimized.
It realizes fine-grained recognition of traffic patterns, improves recognition accuracy and robustness, adapts to various environmental conditions, and improves the universality of traffic pattern recognition.
Smart Images

Figure CN116541745B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a traffic pattern recognition method and system for intelligent transportation, which can recognize the traffic pattern of a user according to the user's GPS trajectory. The present invention relates to the field of traffic pattern recognition and can be used for user behavior analysis and traffic management decision-making. Background Art
[0002] People's travel trajectories can reflect activity patterns and urban traffic problems. By recognizing traffic patterns, relevant traffic planning and management policies can be formulated. With the popularization and use of mobile devices, the Global Positioning System (GPS) records personal location information and movement trajectories. Mining users' traffic patterns from GPS is an effective method, which not only contains rich spatio-temporal information of human activities, but also the GPS sensor is installed in the mobile phone, facilitating data collection.
[0003] There are mainly three categories of methods for realizing user traffic pattern recognition based on GPS trajectories. The first category is based on classical machine learning methods, such as Decision Tree (DT), Random Forest (RF), and Support Vector Machine (SVM). Such methods are suitable for small data sets, and at the same time, features are selected manually, unable to cope with the actual traffic road environment. The second category is based on statistical methods, such as eXtreme Gradient Boosting (XGBoost) and Markov Model. Such methods have some requirements for the traffic road environment and do not have universality. The third category is based on deep learning methods, mainly Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN). Neural networks do not need to rely on domain knowledge. They can automatically extract relevant features from data for learning. Such methods are suitable for application on large data sets and have good fitting effects. However, in traffic pattern recognition applications, there are also many problems. Some neural network models only consider temporal features and do not consider spatial features; some neural network models consider spatial features, but only limit to local or global spatial features, without considering the fusion of global and local spatial features and without exploring the correlation between global and local spatial features. Due to these problems, the traffic pattern recognition effect of existing methods is not good.
[0004] At present, the existing traffic pattern recognition methods have the following main problems: 1) Most methods rely on manual feature selection, and some methods are restricted by the real environment, with poor robustness; 2) Most methods do not consider the fusion of global and local spatial features, nor the correlation between global and local spatial features, which affects the recognition accuracy of traffic patterns. Summary of the Invention
[0005] The present invention aims to overcome the above deficiencies of the prior art and provides a traffic pattern recognition method and system based on graph convolutional network feature fusion. By collecting GPS trajectory data generated during users' travel and inputting it into the model of the present invention, the traffic patterns of users can be finely recognized, with good universality and robustness.
[0006] Based on the GPS trajectory data of users, the present invention adopts a bidirectional gated recurrent unit, a dilated convolutional network, network in network, the maximum mutual information coefficient, and a graph convolutional network to design and implement a traffic pattern model for fine-grained recognition. First, the model extracts seven kinematic features from the original trajectory data and uses a bidirectional gated recurrent unit to extract temporal features. Then, the extracted temporal features are used to extract global spatial features and local spatial features through a dilated convolutional network and network in network respectively. Next, after fusing the global and local features, the maximum mutual information coefficient is used to generate an adjacency matrix and input it into the graph convolutional network. Finally, the output result of the graph convolutional network is output through a fully connected layer to obtain the traffic pattern recognition result. By applying the method of the present invention, the automatic recognition of seven traffic patterns can be realized, namely walking, cycling, bus, car, taxi, subway, and train. The present invention designs a graph convolutional network to achieve the fusion of global and local spatial features, which can finely recognize similar traffic patterns and is not restricted by environmental conditions, with good universality and robustness.
[0007] The present invention achieves the above object through the following technical solutions: A traffic pattern recognition method based on graph convolutional network feature fusion, and the specific implementation steps are as follows:
[0008] (1) Data preprocessing. Perform data preprocessing on the original GPS trajectory data, including operations such as abnormal data deletion, GPS trajectory segmentation, abnormal segment deletion, kinematic feature calculation, and data normalization. Abnormal data deletion means using speed and acceleration thresholds to compare and analyze GPS trajectory point data and delete abnormal GPS trajectory points; GPS trajectory segmentation means segmenting the GPS trajectory at a fixed length, with only one traffic mode within a segment. If the length is insufficient, fill it with zero values; delete abnormal segments, including deleting segments with fewer GPS trajectory points, deleting segments with a smaller sum of relative distances, deleting segments with a smaller sum of time intervals, etc.; kinematic feature calculation means calculating the kinematic features of each GPS trajectory point, including seven kinematic features: relative distance, timestamp, speed, relative speed, acceleration, jerk, and bearing change angle; data normalization means using the Min-Max method to normalize the data so that the kinematic feature values of GPS trajectory points are mapped between 0 and 1.
[0009] The calculation methods for the seven kinematic features of GPS trajectory points are as follows:
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016] Among them, x1 = (lat1, lon1, t1) and x2 = (lat2, lon2, t2) are adjacent GPS trajectory points, and the Vincenty formula is based on the ellipsoidal earth model and is used to calculate the relative distance RD of each GPS trajectory point x , Δt x is the time interval, V x is the speed. RV x is the relative speed. Acc x is the acceleration. J x is the jerk. Due to different traffic modes, the direction change rate also varies. For example, the direction change rate of walking and cycling is more frequent than that of buses and cars. Therefore, the bearing change angle BR x is also one of the kinematic features of GPS trajectory points, and its calculation method is as follows:
[0017] y = sin(x2[lon2] - x1[lon1]) * cos(x2[lat2]) (7)
[0018] x = cos(x1[lat1]) * sin(x2(lat2)) - sin(x1[lat1]) * cos(x2[lat2]) * cos(x2[lon2] - x1[lon1]) (8)
[0019]
[0020]
[0021] where arctan(.) is the arctangent trigonometric function, π is the pi, mod is the modulo operation, Bearing x is the azimuth angle, and the original GPS trajectory data can be represented by seven kinematic features, namely:
[0022] x i [RD i , Δt i , V i , RV i , Acc i , J i , BR i (11)
[0023] (2) Build a traffic pattern recognition model. The traffic pattern recognition model consists of a bidirectional gated recurrent unit, network in network, dilated convolutional network, maximum mutual information coefficient, graph convolutional network, and fully connected layer. Among them, the bidirectional gated recurrent unit can capture the temporal features in the GPS trajectory data, the network in network can capture the local spatial features, the dilated convolutional network can capture the global spatial features, the maximum mutual information coefficient can fuse the correlation between features and generate an adjacency matrix, the graph convolutional network can further realize the fusion of global and local spatial features, and the fully connected layer can output the final traffic pattern recognition result.
[0024] The input-output change process of the bidirectional gated recurrent unit is as follows:
[0025]
[0026]
[0027]
[0028] H = [H1, H2, …, H n (15)
[0029] where is the kinematic feature of the GPS trajectory point at time t after normalization processing, represent the hidden unit outputs at the previous and next moments of t, which are concatenated after passing through the gated recurrent unit, is and the hidden state at time t after connection, is the result of the bidirectional gated recurrent network extracting the temporal features within the current GPS segment, h is the number of hidden neurons, and n is the number of GPS trajectory points in the segment.
[0030] The input-output change process of the network-in-network is as follows:
[0031]
[0032]
[0033]
[0034] Among them, and are the local features extracted after passing through the first network-in-network block and the fifth network-in-network block respectively, and are convolutional kernels of sizes 3 and 1 respectively, ReLU(.) is the activation function, * s is the conventional convolution operation, GAP(.) is the global average pooling, represents the finally captured local feature, and class is the number of true classes.
[0035] The input-output change process of the dilated convolutional network is as follows:
[0036]
[0037]
[0038]
[0039]
[0040] Among them, and are the global features extracted through dilated convolution, p represents the padding parameter of the convolutional kernel, MP(.) is the max pooling, * d represents the dilated convolution, d represents the dilation coefficient, represents the finally captured global feature.
[0041] The maximum mutual information coefficient can fuse the correlation between features and obtain the adjacency matrix of different traffic patterns. The input-output change process of the maximum mutual information coefficient is as follows:
[0042]
[0043]
[0044] Among them, p(X i ,X j ) represents the probability of falling in the i-th column and j-th row, p(X i ) represents the probability of falling in the i-th column, p(X j ) represents the probability of falling in the j-th row, log2(.) is the logarithmic function with base 2, I[X i ; X j is the mutual information between X i and X j , max(.) and min(.) represent the maximum value function and the minimum value function respectively, MIC[X i ; X j represents the maximum mutual information result. The value range of MIC is [0,1], and the closer the value is to 1, the higher the correlation.
[0045] The input-output change process of the graph convolutional network is as follows:
[0046] F (l+1) =σ(AF (l) W (l) ) (25)
[0047] Among them, represents the merged features, represents the adjacency matrix learned through the maximum mutual information coefficient, σ is the Sigmoid activation function, l represents the number of layers of the graph convolutional network, and W (l) is the coefficient matrix.
[0048] The traffic pattern recognition model is trained using the Adam optimizer and updates the parameters using the gradient descent algorithm. The loss function of the model uses the cross-entropy loss function, which is specifically as follows:
[0049]
[0050] Among them, is the final recognition result of the model. is the recognition value of the model for the current class. is the cumulative value of the recognition values of the model for all traffic pattern categories.
[0051] (3) Generate the dataset and train the model. Split the data obtained in step (1) to generate a training dataset and a test dataset, and train the traffic pattern recognition model.
[0052] (4) Calculate the evaluation metrics. According to the traffic pattern recognition results in step (3), calculate the corresponding evaluation metrics such as precision, recall, accuracy, and F1-score to measure the recognition effect and performance of the model.
[0053] (5) Display the results. Visualize the traffic pattern recognition results obtained in step (3) and the evaluation metric results obtained in step (4) by means of line charts, bar charts, etc.
[0054] Preferably, in step (3), split in a ratio of 8:2 to generate a training dataset and a test dataset.
[0055] The system for implementing the traffic pattern recognition method based on graph convolutional network feature fusion of the present invention includes a data preprocessing module, a traffic pattern recognition model module, a dataset generation and model training module, an evaluation metric calculation module, and a result display module connected in sequence. Among them,
[0056] The data preprocessing module performs data preprocessing on the original GPS trajectory data, including deleting abnormal data, segmenting the GPS trajectory, deleting abnormal segments, calculating kinematic features, and data normalization;
[0057] The traffic pattern recognition model module. The traffic pattern recognition model consists of a bidirectional gated recurrent unit, network in network, dilated convolutional network, maximum mutual information coefficient, graph convolutional network, and fully connected layer. Among them, the bidirectional gated recurrent unit can capture the temporal features in the GPS trajectory data, network in network can capture local spatial features, the dilated convolutional network can capture global spatial features, the maximum mutual information coefficient can fuse the correlation between features and generate an adjacency matrix, the graph convolutional network can further realize the fusion of global and local spatial features, and the fully connected layer can output the final traffic pattern recognition result;
[0058] The dataset generation and model training module splits the data obtained from the data preprocessing module to generate a training dataset and a test dataset, and trains the traffic pattern recognition model;
[0059] The evaluation metric calculation module calculates the corresponding evaluation metrics such as precision, recall, accuracy, and F1-score according to the traffic pattern recognition results of the dataset generation and model training module to measure the recognition effect and performance of the model;
[0060] The result display module visually displays the traffic pattern recognition results obtained by the data set generation and model training module and the evaluation index results obtained by the evaluation index calculation module through methods such as line charts and bar charts.
[0061] The beneficial effects of the present invention are as follows: (1) The present invention not only considers temporal features, but also considers global and local spatial features, fully excavating the information in the original GPS trajectory data and improving the accuracy of traffic pattern recognition; (2) The present invention realizes the fusion of global and local spatial features through the maximum mutual information coefficient and the graph convolutional network, further finely granulating the recognition of traffic patterns and improving the traffic pattern recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is the structural diagram of the traffic pattern recognition model of the present invention.
[0063] Figure 2 It is the structural diagram of the bidirectional gated recurrent unit and the network in the network of the present invention.
[0064] Figure 3 It is the structural diagram of the bidirectional gated recurrent unit and the dilated convolutional network of the present invention.
[0065] Figure 4 It is the structural diagram of the graph convolutional network of the present invention.
[0066] Figure 5 It is the system function module diagram of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0067] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0068] The traffic pattern recognition method based on graph convolutional network feature fusion of the present invention specifically comprises the following implementation steps:
[0069] (1) Data preprocessing. Perform data preprocessing on the original GPS trajectory data, including operations such as abnormal data deletion, GPS trajectory segmentation, abnormal segment deletion, kinematic feature calculation, and data normalization. Abnormal data deletion means using speed and acceleration thresholds to compare and analyze GPS trajectory point data and delete abnormal GPS trajectory points; GPS trajectory segmentation means segmenting the GPS trajectory at a fixed length, with only one traffic mode within a segment. If the length is insufficient, zero values are used for filling; deleting abnormal segments includes deleting segments with fewer GPS trajectory points, deleting segments with a smaller sum of relative distances, deleting segments with a smaller sum of time intervals, etc.; kinematic feature calculation means calculating the kinematic features of each GPS trajectory point, including seven kinematic features: relative distance, timestamp, speed, relative speed, acceleration, jerk, and bearing change angle; data normalization means using the Min-Max method to normalize the data so that the kinematic feature values of GPS trajectory points are mapped between 0 and 1.
[0070] The calculation methods for the seven kinematic features of GPS trajectory points are as follows:
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077] Among them, x1 = (lat1, lon1, t1) and x2 = (lat2, lon2, t2) are adjacent GPS trajectory points, and the Vincenty formula is based on the ellipsoidal earth model and is used to calculate the relative distance RD of each GPS trajectory point x , Δt x is the time interval, V x is the speed. RV x is the relative speed. Acc x is the acceleration. J x is the jerk. Since the direction change rate also varies for different traffic modes. For example, the direction change rate of walking and cycling is more frequent than that of buses and cars. Therefore, the bearing change angle BR x is also one of the kinematic features of GPS trajectory points, and its calculation method is as follows:
[0078] y = sin(x2[lon2] - x1[lon1]) * cos(x2[lat2]) (7)
[0079] x = cos(x1[lat1]) * sin(x2(lat2)) - sin(x1[lat1]) * cos(x2[lat2]) * cos(x2[lon2] - x1[lon1]) (8)
[0080]
[0081]
[0082] where arctan(.) is the inverse tangent trigonometric function, π is the circumference ratio, mod is the remainder operation, Bearing x is the azimuth angle, and the original GPS trajectory data can be represented by seven kinematic features, namely:
[0083] x i [RD i , Δt i , V i , RV i , Acc i , J i , BR i (11)
[0084] (2) Construct a traffic pattern recognition model. The traffic pattern recognition model consists of a bidirectional gated recurrent unit, network in network, dilated convolutional network, maximum mutual information coefficient, graph convolutional network, and fully connected layer. Among them, the bidirectional gated recurrent unit can capture the temporal features in GPS trajectory data, the network in network can capture local spatial features, the dilated convolutional network can capture global spatial features, the maximum mutual information coefficient can fuse the correlation between features and generate an adjacency matrix, the graph convolutional network can further realize the fusion of global and local spatial features, and the fully connected layer can output the final traffic pattern recognition result.
[0085] The input-output change process of the bidirectional gated recurrent unit is as follows:
[0086]
[0087]
[0088]
[0089] H = [H1, H2, …, H n (15)
[0090] where is the kinematic feature of the GPS trajectory point at time t after normalization processing, represent the hidden unit outputs at the previous and next moments of t, which are concatenated after passing through the gated recurrent unit, is and the hidden state at time t after connection, is the result of the bidirectional gated recurrent network extracting the temporal features within the current GPS segment, h is the number of hidden neurons, and n is the number of GPS trajectory points in the segment.
[0091] The input-output change process of the network-in-network is as follows:
[0092]
[0093]
[0094]
[0095] Among them, and are the local features extracted after passing through the first network-in-network block and the fifth network-in-network block respectively, and are convolutional kernels of sizes 3 and 1 respectively, ReLU(.) is the activation function, * s is the conventional convolution operation, GAP(.) is the global average pooling, represents the finally captured local features, and class is the number of true classes.
[0096] The input-output change process of the dilated convolutional network is as follows:
[0097]
[0098]
[0099]
[0100]
[0101] Among them, and are the global features extracted through dilated convolution, p represents the padding parameter of the convolutional kernel, MP(.) is the max pooling, * d represents the dilated convolution, d represents the dilation coefficient, represents the finally captured global features.
[0102] The maximum mutual information coefficient can fuse the correlation between features and obtain the adjacency matrix of different traffic patterns. The input-output change process of the maximum mutual information coefficient is as follows:
[0103]
[0104]
[0105] Among them, p(X i , X j ) represents the probability of falling in the i-th column and j-th row, p(X i ) represents the probability of falling in the i-th column, p(X j ) represents the probability of falling in the j-th row, log2(.) is the logarithmic function with base 2, I[X i ; X j is the mutual information between X i and X j , max(.) and min(.) represent the maximum value function and the minimum value function respectively, MIC[X i ; X j represents the maximum mutual information result. The value range of MIC is [0, 1], and the closer the value is to 1, the higher the correlation.
[0106] The input-output change process of the graph convolutional network is as follows:
[0107] F (l+1) = σ(AF (l) W (l) ) (25)
[0108] Among them, represents the merged features, represents the adjacency matrix learned through the maximum mutual information coefficient, σ is the Sigmoid activation function, l represents the number of layers of the graph convolutional network, and W (l) is the coefficient matrix.
[0109] The traffic pattern recognition model is trained using the Adam optimizer and updates the parameters using the gradient descent algorithm. The loss function of the model uses the cross-entropy loss function, which is specifically as follows:
[0110]
[0111] Among them, is the final recognition result of the model. is the recognition value of the model for the current class. is the cumulative value of the recognition values of the model for all traffic pattern categories.
[0112] (3) Generate the dataset and train the model. Split the data obtained in step (1) according to a ratio of 8:2 to generate a training dataset and a test dataset, and train the traffic pattern recognition model.
[0113] (4) Calculate the evaluation metrics. According to the traffic pattern recognition results in step (3), calculate the corresponding evaluation metrics such as precision, recall, accuracy, and F1-score to measure the recognition effect and performance of the model.
[0114] (5) Display the results. Visualize the traffic pattern recognition results obtained in step (3) and the evaluation metric results obtained in step (4) through line charts, bar charts, etc.
[0115] As shown in the appendix Figure 1 , it is the structural diagram of the traffic pattern recognition model of the present invention. The model is divided into two parts. The first part is the data processing part. After dividing the original GPS trajectory data into GPS segments, data preprocessing is performed, and the corresponding kinematic features are calculated and normalized. The second part is the feature extraction and fusion part. The kinematic features are used to extract temporal features through a bidirectional gated recurrent unit, and global and local spatial features are extracted through a dilated convolutional network and Network In Network respectively. Finally, the correlation between features is fused through the maximum mutual information coefficient to generate an adjacency matrix, and the global and local spatial features are further fused through a graph convolutional network to achieve fine-grained recognition of traffic patterns.
[0116] As shown in the appendix Figure 2 , it is the structural diagram of the bidirectional gated recurrent unit and Network In Network of the present invention. The bidirectional gated recurrent unit is used to extract temporal features, and Network In Network (NIN) is used to extract local spatial features, including 5 NIN blocks.
[0117] As shown in the appendix Figure 3 , it is the structural diagram of the bidirectional gated recurrent unit and dilated convolutional network of the present invention. The bidirectional gated recurrent unit is used to extract temporal features, and the dilated convolutional network is used to extract global spatial features, including 3 dilated convolutional blocks.
[0118] As shown in the appendix Figure 4 , it is the structural diagram of the graph convolutional network of the present invention. The maximum mutual information coefficient can fuse and extract the correlation between global and local spatial features and generate an adjacency matrix. Different traffic patterns have different adjacency matrices. The graph convolutional network further fuses global and local spatial features and outputs the final traffic pattern recognition result through a fully connected layer.
[0119] As shown in the appendix Figure 5, The system functional module diagram of the present invention includes functional modules such as data preprocessing, traffic pattern recognition model, dataset generation and model training, evaluation index calculation, and result display. The data preprocessing module is used to perform data preprocessing on the original GPS trajectory data, including abnormal data deletion, GPS trajectory segmentation, abnormal segmentation deletion, kinematic feature calculation, and data normalization, etc. The traffic pattern recognition model module constructs a traffic pattern recognition model composed of bidirectional gated recurrent units, dilated convolutional networks, networks in networks, maximum mutual information coefficient, and graph convolutional networks, etc. The evaluation index calculation module calculates the corresponding indexes for the classification results of the model, so as to analyze and evaluate the recognition ability of the model. The result display module uses various visualization methods to display the traffic pattern recognition results.
[0120] The system implementing the traffic pattern recognition method based on graph convolutional network feature fusion of the present invention includes a data preprocessing module, a traffic pattern recognition model module, a dataset generation and model training module, an evaluation index calculation module, and a result display module that are connected in sequence. The data preprocessing module, the traffic pattern recognition model module, the dataset generation and model training module, the evaluation index calculation module, and the result display module respectively contain the technical contents of steps (1) to (5) of the method of the present invention.
[0121] The content described in the embodiments of this specification is only an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms stated in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art according to the inventive concept of the present invention.
Claims
1. A traffic pattern recognition method based on feature fusion of graph convolutional network, comprising the following steps: (1) Perform data preprocessing on the original GPS trajectory data, including operations of deleting abnormal data, segmenting the GPS trajectory, deleting abnormal segments, calculating kinematic features, and data normalization; deleting abnormal data, that is, using speed and acceleration thresholds to compare and analyze GPS trajectory point data and delete abnormal GPS trajectory points; segmenting the GPS trajectory, that is, segmenting the GPS trajectory with a fixed length, and there is only one traffic pattern within the segment. If the length is insufficient, zero values are used for filling; deleting abnormal segments, including deleting segments with fewer GPS trajectory points, deleting segments with a smaller sum of relative distances, deleting segments with a smaller sum of time intervals, etc.; calculating kinematic features, that is, calculating the kinematic features of each GPS trajectory point, including seven kinematic features of relative distance, timestamp, speed, relative speed, acceleration, jerk, and azimuth change angle; data normalization, that is, using the Min-Max method to perform data normalization processing to map the kinematic feature values of GPS trajectory points to between 0 and 1; (2) Build a traffic pattern recognition model; the traffic pattern recognition model consists of a bidirectional gated recurrent unit, network in network, dilated convolutional network, maximum mutual information coefficient, graph convolutional network, and fully connected layer, where The bidirectional gated recurrent unit can capture the temporal features in the GPS trajectory data, the network-in-network can capture local spatial features, the dilated convolutional network can capture global spatial features, the maximum mutual information coefficient can fuse the correlation between features and generate an adjacency matrix, the graph convolutional network can further realize the fusion of global and local spatial features, and the fully connected layer can realize the output of the final traffic pattern recognition result; (3) Generate a data set and train the model; split the data obtained in step (1) to generate a training data set and a test data set, and train the traffic pattern recognition model; (4) Calculate evaluation metrics; according to the traffic pattern recognition result in step (3), calculate evaluation metrics such as precision, recall, accuracy, and F1 score to measure the recognition effect and performance of the model; (5) Display the results; visually display the traffic pattern recognition result obtained in step (3) and the evaluation metric result obtained in step (4) through line charts, bar charts, etc.
2. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 1, characterized in that: In step (2), the input-output change process of the bidirectional gated recurrent unit is: H = [H1, H2, …, H n (15) Among them, is the kinematic feature of the GPS trajectory point at time t after normalization processing, represent the hidden unit outputs at the previous and next moments of t, which are concatenated after passing through the gated recurrent unit, is and the hidden state at time t after connection, is the result of the bidirectional gated recurrent network extracting the temporal features within the current GPS segment, h is the number of hidden neurons, and n is the number of GPS trajectory points in the segment.
3. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 2, wherein: In step (2), the input-output change process of the network-in-network is: Among them, and are the local features extracted after passing through the network blocks in the first network and the fifth network respectively, and are convolution kernels of sizes 3 and 1 respectively, ReLU(.) is the activation function, * s is the conventional convolution operation, GAP(.) is the global average pooling, represents the finally captured local features, and class is the number of true classes.
4. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 3, wherein: In step (2), the input-output change process of the dilated convolutional network is: Among them, and are the global features extracted after dilated convolution. p represents the padding parameter of the convolutional kernel, MP(.) is max pooling, * d represents dilated convolution, and d represents the dilation coefficient. represents the finally captured global feature.
5. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 4, characterized in that: In step (2), the input-output change process of the maximum mutual information coefficient is: where p(X i , X j ) represents the probability of falling in the \(i\)-th column and \(j\)-th row, p(X i ) represents the probability of falling in the \(i\)-th column, p(X j ) represents the probability of falling in the \(j\)-th row, log2(.) is the logarithmic function with base 2, I[X i ; X j is the mutual information between X i and X j , max(.) and min(.) represent the maximum value function and the minimum value function respectively, MIC[X i ; X j represents the maximum mutual information result, the value range of MIC is [0, 1], and the closer the value is to 1, the higher the correlation.
6. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 5, wherein: In step (2), the input-output change process of the graph convolutional network is: F (l+1) = σ(AF (l) W (l) )(25) Among them, represents the combined features, represents the adjacency matrix learned through the maximum mutual information coefficient, σ is the Sigmoid activation function, l represents the number of layers of the graph convolutional network, and W (l) is the coefficient matrix.
7. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 6, wherein: In step (2), the traffic pattern recognition model is trained using the Adam optimizer, and the gradient descent algorithm is used to update the parameters. The loss function of the model uses the cross-entropy loss function, specifically as follows: Among them, is the final recognition result of the model, is the recognition value of the model for the current class, is the cumulative value of the recognition values of the model for all traffic mode categories.
8. The traffic pattern recognition method based on graph convolutional network feature fusion according to claim 7, characterized in that: In step (3), split according to a ratio of 8:2 to generate a training data set and a test data set.
9. A system for implementing the traffic pattern recognition method based on graph convolutional network feature fusion according to claim 1, characterized in that: It includes a data preprocessing module, a traffic pattern recognition model module, a data set generation and model training module, an evaluation metric calculation module, and a result display module connected in sequence; among them, Data preprocessing module, which preprocesses the original GPS trajectory data, including deleting abnormal data, segmenting the GPS trajectory, deleting abnormal segments, calculating kinematic features, and data normalization; Traffic pattern recognition model module. The traffic pattern recognition model consists of a bidirectional gated recurrent unit, network in network, dilated convolutional network, maximum mutual information coefficient, graph convolutional network, and fully connected layer. Among them, the bidirectional gated recurrent unit can capture the temporal features in the GPS trajectory data, network in network can capture local spatial features, dilated convolutional network can capture global spatial features, maximum mutual information coefficient can fuse the correlation between features and generate an adjacency matrix, graph convolutional network can further realize the fusion of global and local spatial features, and the fully connected layer can output the final traffic pattern recognition result; Dataset generation and model training module, which splits the data obtained from the data preprocessing module to generate a training dataset and a test dataset, and trains the traffic pattern recognition model; Evaluation index calculation module, which calculates corresponding evaluation indexes such as precision, recall, accuracy, and F1 score according to the traffic pattern recognition result of the dataset generation and model training module, so as to measure the recognition effect and performance of the model; Result display module, which visually displays the traffic pattern recognition result obtained by the dataset generation and model training module and the evaluation index result obtained by the evaluation index calculation module through line charts, bar charts, etc.