Construction method and device of intelligent traffic cognition model and storage medium

By training the modeling model as a graph model and combined with graphic neural networks and door control cycle units to train the intelligent traffic cognitive model, it is difficult to accurately analyze traffic flow and predict congestion in existing technologies, and achieve more accurate accurate accuracy Traffic flow analysis and congestion prediction.

CN119337097APending Publication Date: 2025-01-21BOSHI FENGYUN (HUNAN) INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411421268.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

It is difficult for prior art to accurately analyze traffic flows or predict congestion conditions.

Method used

By modeling the road network in the traffic scene as a graph model, and using graph convolutional neural network and gated recurrent unit to train the intelligent traffic cognitive model, combined with external attribute data for training, to capture the spatiotemporal characteristics of traffic data.

Benefits of technology

A more accurate and more accurate analysis of traffic flow and predicting congestion, especially in terms of accurate predicting traffic speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337097A_ABST
    Figure CN119337097A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method and device of an intelligent traffic cognition model and a storage medium, and belongs to the technical field of traffic flow space-time network model prediction. The construction method of the intelligent traffic cognition model comprises the following steps: simulating a dynamic traffic scene with time-space characteristics; classifying attributes related to traffic into external attributes and traffic cognition related attributes by using an intelligent traffic scene cognition deep learning network model; and inputting data corresponding to the external attributes and the traffic cognition related attributes into a graph convolutional neural network and a gating circulation unit in the model for training to obtain an intelligent traffic cognition model. The device comprises a simulation unit, a classification unit and a training unit. In addition, the invention further provides a storage medium, a computer program is stored on the storage medium, and when the program is executed by a processor, the construction method of the intelligent traffic cognition model is implemented. The model constructed by the invention can more accurately and reliably analyze the traffic flow or predict the congestion condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic flow spatiotemporal network model prediction, and in particular to a method, device and storage medium for constructing an intelligent traffic cognitive model. Background Art

[0002] As cities around the world become increasingly urbanized, one of the most pressing issues in today's society is traffic management and safety. Traffic congestion, frequent traffic accidents, and environmental pollution are becoming increasingly prominent, and traditional traffic management methods can no longer effectively address these challenges. Therefore, the application of intelligent transportation systems in practice has become increasingly important.

[0003] The intelligent transportation system is a new traffic management model based on advanced information technology and communication technology, which aims to improve the efficiency and intelligence level of traffic management. As an important part of the intelligent transportation system, traffic scene recognition can help the system perceive and understand the traffic environment more accurately, thereby achieving more efficient traffic management and control. By combining traffic scene recognition technology with intelligent traffic lights, intelligent traffic monitoring cameras and other equipment, the intelligent transportation system can realize real-time traffic flow monitoring, road condition analysis, traffic signal optimization and other functions, thereby providing a more intelligent and efficient solution for urban traffic management.

[0004] Intelligent driving technology is an important development direction in the future transportation field, and traffic scene recognition, as one of the foundations for the realization of these technologies, plays a vital role in achieving safe and efficient intelligent driving. Intelligent driving systems can perceive and analyze various information in traffic scenes in real time, such as road conditions, vehicle trajectories, obstacles, etc., and use sensor technology and artificial intelligence algorithms to make appropriate driving decisions to achieve autonomous or semi-autonomous driving mechanisms. How to more accurately analyze traffic flow and predict congestion conditions is a problem that existing technologies need to solve. Summary of the invention

[0005] The purpose of the present invention is to overcome the above technical deficiencies, provide a method, device and storage medium for constructing an intelligent traffic cognitive model, and solve the technical problem of how to accurately analyze traffic flow or predict congestion conditions in the prior art.

[0006] In order to achieve the above technical objectives, the technical solution of the present invention provides a method for constructing an intelligent traffic cognitive model, comprising the following steps:

[0007] S1. Model the road network in the traffic scene as nodes in the graph model, and model the connection relationship between roads as edges in the graph model to simulate a dynamic traffic scene with spatiotemporal characteristics;

[0008] S2. The data in semantic format were digitized, and different types of external factor data were normalized into a specific data range using fuzzy classification methods. The intelligent traffic scene cognition deep learning network model was used to classify traffic-related attributes into external attributes and traffic cognition-related attributes.

[0009] S3. The data corresponding to the external attributes and the traffic cognition related attributes are input into the graph convolutional neural network and gated recurrent unit in the model for training to obtain the intelligent traffic cognition model.

[0010] In any implementation, in step S2, the feature matrix of the external attribute is expressed as:

[0011] X feature ∈{X TTI , X time , X holiday , X weather , X flowchange}

[0012] in, is the traffic congestion degree matrix, τ is the time step, and N is the number of roads in the traffic scene;

[0013] The calculation formula for traffic congestion is:

[0014] Among them, v free is the speed at which cars can freely pass on the road, usually the maximum speed limit on the road, v current is the average speed of cars on the current road; when the current speed of the car is higher, the TTI is smaller, indicating that there is relatively no congestion; when the current speed of the car is lower, the TTI is larger, indicating that there is relatively congestion;

[0015] and is a time period matrix, which divides the twenty-four hours of a day into n time periods;

[0016] X holiday is the holiday matrix, X holiday is a binary value. When the day is a holiday (including weekends and statutory holidays), X holiday The value is 1, otherwise it is 0; holidays include weekends and statutory holidays;

[0017] X weather is the weather matrix. When the weather is sunny, X weather is 1; when the weather is cloudy, X weathre =2; when it is raining, according to the principle of fuzzy mathematics, the amount of rainfall is fuzzily defined as light rain, moderate rain and heavy rain, corresponding to X weather is 3, 4, 5; when the weather is haze, X weatheris 6;

[0018] Establishing a representation of a characteristic matrix of external attribute factors, wherein the external attribute factors include special traffic congestion conditions, time period information, holiday information, weather conditions, and traffic flow changes;

[0019] is the traffic flow change matrix. Similarly, according to the fuzzy mathematics principle, the change of traffic flow is fuzzily defined into several levels, namely, very fast, fast, medium, slow, and very slow, corresponding to X flowchange It is 3, 1, 0, -1, -3.

[0020] In any implementation manner, in step S3, the data corresponding to the external attributes and the traffic cognition related attributes are input together into the graph convolutional neural network and the gated recurrent unit in the model for training to obtain an intelligent traffic cognition model, including:

[0021] Use gated recurrent units to capture the temporal characteristics of traffic data and learn and remember long-term temporal dependencies through their gating mechanism;

[0022] Then, we use graph convolutional neural networks to capture its spatial features and represent the traffic network as a graph structure. The node features include the temporal features output from the gated recurrent unit. The graph convolutional neural network learns the relationship and spatial dependency between nodes by performing convolution operations on the graph structure.

[0023] The temporal features extracted by gated recurrent units and the spatial features extracted by graph convolutional neural networks are combined to build a model that can capture both temporal and spatial dependencies.

[0024] In any embodiment, after step S3, the method further includes introducing Gaussian noise and Poisson noise into the data set.

[0025] In any implementation manner, after step S3, the method further includes using a determination coefficient as an indicator of the prediction accuracy of the intelligent traffic cognitive model.

[0026] In any embodiment, the coefficient of determination is expressed as follows:

[0027]

[0028] Where V pred [i][j] represents the predicted speed data of the i-th road at time j, and Y true [i][j] represents the actual speed data of the i-th road at time j; represents the average value of the predicted speed, N is all roads, and τ is the current time step, that is, the predicted time length.

[0029] In any implementation manner, in step S3, the parameters that need to be adjusted and set for the established intelligent traffic cognition model include key hyperparameters and remaining parameters; the key hyperparameters include the number of training cycles, learning rate, number of GRU hidden units, training batch size and input data duration; the remaining parameters include weights and biases associated with each layer of nodes in the deep neural network.

[0030] In any embodiment, it also includes using an Adam optimizer to optimize the remaining parameters. Specifically, new gradients are generated using training samples in combination with previous training knowledge, and then the obtained gradients are used to calculate the first-order moment estimate of the deviation and the second-order moment estimate of the offset. Finally, the first-order moment estimate and the second-order moment estimate are used to correct the deviation and update the model parameters.

[0031] In any implementation, the first-order moment estimate is a weighted average of the gradient, which is used to record the direction and magnitude of the gradient. The formula for the first-order moment estimate is:

[0032] m t =β 1 m t-1 +(1-β 1 ) t

[0033] Among them, m t is the first-order moment estimate of the current time step t, β 1 is the decay rate of momentum, g t is the gradient of the current time step;

[0034] The second-order moment estimation is a weighted average of the square of the gradient, which is used to record the magnitude of the gradient change. The formula for the second-order moment estimation is:

[0035]

[0036] Among them, v t is the second-order moment estimate of the current time step t, β 2 is the decay rate of the second-order moment estimate, g t is the gradient at the current time step.

[0037] In addition, the present invention also proposes a device for constructing an intelligent traffic cognitive model, comprising:

[0038] A simulation unit, the simulation unit is used to model the road network in the traffic scene as nodes in a graph model, and model the connection relationship between the roads as edges in the graph model, so as to simulate a dynamic traffic scene with spatiotemporal characteristics;

[0039] A classification unit, wherein the classification unit is used to digitally process the data in a semantic format, normalize different types of external factor data into a specific data range using a fuzzy classification method, and classify traffic-related attributes into external attributes and traffic cognition-related attributes using an intelligent traffic scene cognition deep learning network model;

[0040] A training unit is used to input data corresponding to external attributes and traffic cognition related attributes into the graph convolutional neural network and gated recurrent unit in the model for training to obtain an intelligent traffic cognition model.

[0041] In addition, the present invention also proposes a storage medium on which a computer program is stored, and when the program is executed by a processor, the method for constructing the intelligent traffic cognitive model is implemented.

[0042] Compared with the prior art, the beneficial effects of the present invention include: the present invention models the road network in the traffic scene as a node in the graph model, and models the connection relationship between the roads as an edge in the graph model, simulating a dynamic traffic scene with spatiotemporal characteristics; the data in the semantic format is digitized, and different types of external factor data are normalized into a specific data range using a fuzzy classification method, and the traffic-related attributes are classified into external attributes and traffic cognition-related attributes using an intelligent traffic scene cognition deep learning network model; the data corresponding to the external attributes and the traffic cognition-related attributes are input into the graph convolutional neural network and gated recurrent unit in the model for training to obtain an intelligent traffic cognition model; the present invention focuses on intelligent traffic cognition affected by external attributes, while considering the interaction relationship between attributes and the interpretability of the model. The intelligent traffic cognition model proposed by the present invention covers all situations in which different attributes interact with each other. In order to capture the spatiotemporal characteristics of traffic data, the present technology inputs the data on the impact of external attributes on traffic cognition and traffic data into the graph convolutional neural network and gated recurrent unit in the model together, and the trained intelligent traffic cognition model can more accurately and reliably analyze traffic flow or predict congestion conditions, especially accurately predict traffic speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 3 is a graph showing the change in the root mean square error during the model training process of Example 1 of the present invention. DETAILED DESCRIPTION

[0044] If not specifically stated, in this application, the term "or" is inclusive. For example, the phrase "A or B" means "A, B, or both A and B". More specifically, any of the following conditions satisfies the condition "A or B": A is true (or exists) and B is false (or does not exist); A is false (or does not exist) and B is true (or exists); or both A and B are true (or exist).

[0045] This specific implementation provides a method for constructing an intelligent traffic cognitive model, comprising the following steps:

[0046] S1. Model the road network in the traffic scene as nodes in the graph model, and model the connection relationship between roads as edges in the graph model to simulate a dynamic traffic scene with spatiotemporal characteristics;

[0047] S2. The data in semantic format is digitized, and different types of external factor data are normalized into a specific data range using a fuzzy classification method. The intelligent traffic scene cognition deep learning network model is used to classify traffic-related attributes into external attributes and traffic cognition-related attributes; the characteristic matrix of the external attributes is expressed as:

[0048] X feature ∈{X TTI , X time , X holiday , X weather , X flowchange}

[0049] in is the traffic congestion degree matrix, τ is the time step, and N is the number of roads in the traffic scene;

[0050] The calculation formula for traffic congestion is:

[0051] Among them, v free is the speed at which cars can freely pass on the road, usually the maximum speed limit on the road, v current is the average speed of cars on the current road. Obviously, when the current speed of the car is higher, the TTI is smaller, indicating that there is relatively no congestion, and when the current speed of the car is lower, the TTI is larger, indicating that there is relatively congestion;

[0052] and is a time period matrix, which divides the twenty-four hours of a day into n time periods;

[0053] X holiday is the holiday matrix, X holiday is a binary value. When the day is a holiday (including weekends and statutory holidays), X holiday The value is 1, otherwise it is 0; holidays include weekends and statutory holidays;

[0054] X weather is the weather matrix. When the weather is sunny, X weather is 1; when the weather is cloudy, X weather =2; when it is raining, according to the principle of fuzzy mathematics, the amount of rainfall is fuzzily defined as light rain, moderate rain and heavy rain, corresponding to Xweather is 3, 4, 5; when the weather is haze, X weather is 6;

[0055] Establishing a representation of a characteristic matrix of external attribute factors, wherein the external attribute factors include special traffic congestion conditions, time period information, holiday information, weather conditions, and traffic flow changes;

[0056] is the traffic flow change matrix. Similarly, according to the fuzzy mathematics principle, the change of traffic flow is fuzzily defined into several levels, namely, very fast, fast, medium, slow, and very slow, corresponding to X flowchange is 3, 1, 0, -1, -3;

[0057] S3, inputting the data corresponding to the external attributes and the traffic cognition related attributes into the graph convolutional neural network and the gated recurrent unit in the model for training to obtain an intelligent traffic cognition model, including: using the gated recurrent unit to capture the temporal characteristics of the traffic data, and learning and remembering the temporal dependency of a long time span through its gating mechanism;

[0058] Then, we use graph convolutional neural networks to capture its spatial features and represent the traffic network as a graph structure. The node features include the temporal features output from the gated recurrent unit. The graph convolutional neural network learns the relationship and spatial dependency between nodes by performing convolution operations on the graph structure.

[0059] The temporal features extracted by gated recurrent units and the spatial features extracted by graph convolutional neural networks are combined to build a model that can capture both temporal and spatial dependencies.

[0060] In some embodiments, after step S3, it further includes introducing Gaussian noise and Poisson noise into the data set; by introducing Gaussian noise and Poisson noise into the data set, the diversity of the data set can be increased, so that the model can not only capture the potential patterns of the data during the training phase, but also consider the noise present in the data. This can enhance the model's ability to adapt to different types of noise and changes in the real world, thereby improving the model's generalization ability and improving its performance when encountering unknown data.

[0061] In some embodiments, after step S3, the method further includes using a determination coefficient as an indicator of the prediction accuracy of the intelligent traffic cognitive model; the determination coefficient is expressed as follows:

[0062]

[0063] where Y pred [i][j] represents the predicted speed data of the i-th road at time j, and Y true [i][j] represents the actual speed data of the i-th road at time j; represents the average value of the predicted speed, N is all roads, and τ is the current time step, that is, the predicted time length.

[0064] In some embodiments, in step S3, the parameters that need to be adjusted and set for the established intelligent traffic cognition model include key hyperparameters and remaining parameters; the key hyperparameters include the number of training cycles, learning rate, number of GRU hidden units, training batch size and input data duration; the remaining parameters include weights and biases associated with each layer of nodes in the deep neural network.

[0065] In some embodiments, the method further includes optimizing the remaining parameters using an Adam optimizer, specifically, using training samples and combining previously trained knowledge to generate new gradients, then using the obtained gradients to calculate first-order moment estimates of the deviation and second-order moment estimates of the offset, and finally using the first-order moment estimates and the second-order moment estimates to correct the deviation and update the model parameters;

[0066] The first-order moment estimation is a weighted average of the gradient, which is used to record the direction and magnitude of the gradient. The formula for the first-order moment estimation is:

[0067] m t =β 1 m t-1 +(1-β 1 ) t

[0068] Among them, m t is the first-order moment estimate of the current time step t, β 1 is the decay rate of momentum, g t is the gradient of the current time step;

[0069] The second-order moment estimation is a weighted average of the square of the gradient, which is used to record the magnitude of the gradient change. The formula for the second-order moment estimation is:

[0070]

[0071] Among them, v t is the second-order moment estimate of the current time step t, β 2 is the decay rate of the second-order moment estimate, g t is the gradient at the current time step.

[0072] In addition, this specific implementation also proposes a device for constructing an intelligent traffic cognitive model, including:

[0073] A simulation unit, the simulation unit is used to model the road network in the traffic scene as nodes in a graph model, and model the connection relationship between the roads as edges in the graph model, so as to simulate a dynamic traffic scene with spatiotemporal characteristics;

[0074] A classification unit, wherein the classification unit is used to digitally process the data in a semantic format, normalize different types of external factor data into a specific data range using a fuzzy classification method, and classify traffic-related attributes into external attributes and traffic cognition-related attributes using an intelligent traffic scene cognition deep learning network model;

[0075] A training unit is used to input data corresponding to external attributes and traffic cognition related attributes into the graph convolutional neural network and gated recurrent unit in the model for training to obtain an intelligent traffic cognition model.

[0076] In addition, this specific implementation also proposes a storage medium on which a computer program is stored. When the program is executed by a processor, the method for constructing the intelligent traffic cognitive model is implemented.

[0077] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0078] The following are examples of the present application. The examples described below are exemplary and are only used to explain the present application, and should not be construed as limiting the present application. If no specific techniques or conditions are specified in the examples, the techniques or conditions described in the literature in the art or in the product specifications shall be followed.

[0079] Example 1

[0080] This embodiment proposes a method for constructing an intelligent traffic cognitive model, comprising the following steps:

[0081] S1. Establish simulated traffic scenarios and process traffic data:

[0082] First, the road network in the traffic scene is modeled as nodes in the graph model, and the connection relationship between roads is modeled as edges in the graph model. This modeling method effectively explores the spatial interaction between roads and combines the time dimension of traffic-related data to simulate dynamic traffic scenes with spatiotemporal characteristics.

[0083] S2. To address the problem of inconsistent external attribute data formats, the semantic format data was digitized and the fuzzy classification method was used to normalize different types of external factor data into a specific data range, such as classifying rain within a certain range as light rain. In response to the problem of intelligent traffic scene cognition in the complex urban road network environment, a new type of intelligent traffic scene cognition deep learning network model was proposed. The model classifies traffic-related attributes into external attributes and traffic cognition-related attributes, and then processes them separately, which can greatly improve the cognitive performance of the model;

[0084] In addition to being affected by traffic scenarios (such as road types, traffic signals and traffic signs, etc.) and traffic data (such as real-time traffic flow, speed and vehicle location, etc.), the biggest influencing factor of traffic cognition is external attribute factors. Among them, the external factors with greater influence include traffic congestion, time period information, holiday information, weather conditions, and traffic flow changes. In the traffic flow model prediction, by constructing an input matrix containing historical traffic, time characteristics, weather information, etc., using machine learning or deep learning models for training, and using pre-processed feature data for prediction, accurate prediction of future traffic flow can be achieved. In this embodiment, the feature matrix of external attributes is represented as:

[0085] X feature ∈{X TTI , X time , X holiday , X weather , X flowchange}

[0086] in is the traffic congestion degree matrix, τ is the time step, and N is the number of roads in the traffic scene;

[0087] The calculation formula for traffic congestion is:

[0088] Among them, v free is the speed at which cars can freely pass on the road, usually the maximum speed limit on the road, v current is the average speed of cars on the current road. Obviously, when the current speed of the car is higher, the TTI is smaller, indicating that there is relatively no congestion, and when the current speed of the car is lower, the TTI is larger, indicating that there is relatively congestion;

[0089] and is a time period matrix, which divides the twenty-four hours of a day into n time periods;

[0090] X holiday is the holiday matrix, X holiday is a binary value. When the day is a holiday (including weekends and statutory holidays), Xholiday The value is 1, otherwise it is 0; holidays include weekends and statutory holidays;

[0091] X weather is the weather matrix. When the weather is sunny, X weather is 1; when the weather is cloudy, X weather =2; when it is raining, according to the principle of fuzzy mathematics, the amount of rainfall is fuzzily defined as light rain, moderate rain and heavy rain, corresponding to X weather is 3, 4, 5; when the weather is haze, X weather is 6;

[0092] Establishing a representation of a characteristic matrix of external attribute factors, wherein the external attribute factors include special traffic congestion conditions, time period information, holiday information, weather conditions, and traffic flow changes;

[0093] is the traffic flow change matrix. Similarly, according to the fuzzy mathematics principle, the change of traffic flow is fuzzily defined into several levels, namely, very fast, fast, medium, slow, and very slow, corresponding to X flowchange is 3, 1, 0, -1, -3;

[0094] After completing the feature matrix representation of the attribute, the determination coefficient R is then used 2 To measure the impact of external attributes on the accuracy of traffic data prediction. It is a statistic used to evaluate the degree of fit of statistical models to data. It reflects the proportion of the variation of the dependent variable (predicted value) that can be explained by the independent variable (explanatory variable). The coefficient of determination is defined as:

[0095]

[0096] where y i is the real traffic data, and The data predicted by the model, is the average value of the real data, and n is the total number of data. It is easy to find that the larger the determination coefficient, the better the model's fitting ability.

[0097] S3, inputting the data corresponding to the external attributes and the traffic cognition related attributes into the graph convolutional neural network and the gated recurrent unit in the model for training to obtain an intelligent traffic cognition model, including: using the gated recurrent unit to capture the temporal characteristics of the traffic data, and learning and remembering the temporal dependency of a long time span through its gating mechanism;

[0098] Then, we use graph convolutional neural networks to capture its spatial properties and represent the traffic network as a graph structure. The node features include the temporal features output from the gated recurrent unit. The graph convolutional neural network learns the relationship and spatial dependency between nodes by performing convolution operations on the graph structure.

[0099] By combining the temporal features extracted by the gated recurrent unit and the spatial features extracted by the graph convolutional neural network, a model that can capture both temporal and spatial dependencies is constructed to accurately predict traffic flow. This comprehensive approach effectively utilizes the advantages of time series data and graph structured data to improve prediction accuracy. Doing so can capture the influence characteristics between external attributes and the influence characteristics of external attributes on traffic cognition.

[0100] This example evaluates the proposed method on two available datasets: the Los-loop speed dataset and the Shenzhen North Station Taxi dataset (SZBZ). The SZBZ dataset is acquired from around an important transportation hub in Shenzhen. The performance of taxi services arriving at Shenzhen North Station is directly affected by the traffic conditions in the area. The Los-loop dataset is acquired in real time from a loop detector on a road in Los Angeles, USA. In this example, traffic speed is used as a traffic awareness indicator during the experiment.

[0101] Gradient explosion problems are often encountered during experiments, so the input data is normalized before the experiment. The training dataset accounts for 80% of the total dataset, while the test dataset accounts for the remaining 20%. Since the SZBZ dataset is richer, it is used for hyperparameter tuning, input sensitivity validation studies, and comparative experiments with other models. In contrast, the Los-loop dataset is only used for prediction experiments at different time steps.

[0102] In addition, in order to improve the generalization ability of the model, Gaussian noise and Poisson noise are introduced. By introducing Gaussian noise and Poisson noise to the data set, the diversity of the data set can be increased, so that the model can not only capture the potential patterns of the data during the training phase, but also consider the noise present in the data. This can enhance the model's ability to adapt to different types of noise and changes in the real world, thereby improving the model's generalization ability and improving its performance when encountering unknown data.

[0103] This embodiment uses five evaluation indicators to evaluate the traffic scene recognition performance of the model by comparing the expected data with the actual data. These indicators include root mean square error RMSE, mean absolute error MAE, accuracy, determination coefficient R 2 (Coefficient of Determination), explained variance score VAR (Explained Variance Score).

[0104] Among them, the calculation method of RMSE is:

[0105]

[0106] The calculation method of MAE is:

[0107]

[0108] The precision is calculated as:

[0109]

[0110] R 2 The calculation method is:

[0111]

[0112] VAR is calculated as:

[0113]

[0114] In the above formula, n is the total number of predicted data output, y i and are the real label and the predicted result at time t, respectively. Usually, the model needs to set and adjust parameters, which can be divided into two parts: hyperparameters and the rest of the model parameters. The hyperparameters of this embodiment include hyperparameters related to the graph convolutional neural network and the gated recurrent network. The rest of the model parameters are fine-tuned using the Adam optimizer.

[0115] The key hyperparameters of graph convolutional neural networks and gated recurrent networks include the number of training epochs, learning rate, number of GRU hidden units, training batch size, and input data duration. Figure 1 It shows that once the training cycle reaches 3000 iterations, the root mean square error curves of the training set and the test set begin to level off, indicating that the performance of the model becomes quite stable thereafter. In order to optimize the training efficiency, this study standardized the training duration of subsequent experiments to 3000 units, and adjusted the learning rate to 0.001 based on empirical knowledge. In addition, we conducted experimental comparisons and analyzed the effects of the remaining three parameters under different experimental conditions. It was ultimately determined that configuring the number of GRU hidden units to 64 would produce better results; setting the data batch size to 32 would produce the most favorable results; and the model with a time step of 12 exhibited better cognitive functions.

[0116] The remaining parameters of the model mainly include the weights and biases associated with each layer of the deep neural network. These parameters are optimized using the Adam optimizer. The optimization process includes the following steps: using the training samples and combining the knowledge of the previous training to generate new gradients, and then using the obtained gradients to calculate the first-order moment estimate of the deviation and the second-order moment estimate of the offset. Finally, these estimates are used to correct the deviation and update the model parameters.

[0117] The first-order moment estimate is a weighted average of the gradient, which is used to record the direction and magnitude of the gradient;

[0118] The first-order moment estimation formula is:

[0119] m t =β 1 m t-1 +(1-β 1 ) t .

[0120] Among them, m t is the first-order moment estimate of the current time step t, β 1 is the decay rate of momentum (usually taken as 0.9), g t is the gradient at the current time step.

[0121] The second-order moment estimate is a weighted average of the squared gradient, which is used to record the magnitude of the gradient change;

[0122] The second-order moment estimation formula is:

[0123]

[0124] Among them, v t is the second-order moment estimate of the current time step t, β 2 is the decay rate of the second-order moment estimate (usually taken as 0.999), g t is the gradient at the current time step.

[0125] Analyze the impact of external attributes on the transportation system

[0126] In order to thoroughly study the impact of external factors on traffic perception, this embodiment conducted four sets of experiments to test the sensitivity of the input. The findings of these experiments are shown in Table 1. For convenience, the table contains abbreviated input data. "P" represents the influence POI (point of interest) of surrounding buildings, "W" represents weather data, and "F" represents traffic flow change data. The initial set of experiments only incorporated historical speed data and the road network adjacency matrix into the model. The second set of experiments expanded and added weather data. The third set of experiments expanded the data of surrounding buildings on the basis of the first set, and the fourth set also added weather data on the basis of the third set.

[0127] Table 1 Traffic scene cognitive sensitivity experiment

[0128]

[0129] Observing the experimental results presented in Table 1, it is obvious that the test using only historical speed and adjacency matrix as input shows the worst prediction performance. On the contrary, as more attributes are included, the prediction performance improves. Among them, the prediction performance of only incorporating information about surrounding buildings is slightly better than that of only incorporating information about weather data. This is because the weather has a relatively large change cycle, and surrounding locations such as schools and companies have relatively large traffic flows during peak hours in the morning, middle and evening, while traffic flows are very small in other time periods. Therefore, the information about surrounding buildings has a more significant impact on traffic prediction than weather data information. In the process of gradually introducing external attribute data, the performance difference between the first and fourth groups of experiments is the most significant, indicating that periodic data and traffic changes have a significant impact on prediction accuracy. Compared with the first group of tests, the strategy adopted in this embodiment improves the prediction accuracy by 17.99%. This shows that the external factors selected in this embodiment have made a significant contribution to improving the performance of traffic cognition.

[0130] Interpretable methods for intelligent traffic scene recognition applications

[0131] This embodiment also applies an interpretable fuzzy theory-based algorithm for traffic cognition applications. The traffic cognition application discussed in this technology is external attribute impact analysis. By reducing the possibility of traffic congestion, the analysis of external attribute impacts can improve the accuracy of traffic cognition, better assist the decision-making process of the intelligent transportation system, and further improve the operating efficiency of the system. Traditional traffic cognition models pay more attention to the characteristics of the traffic data itself, such as traffic flow, speed, etc. However, in various traffic scenarios, different external attributes may have an impact on traffic cognition, and the interaction between these external attributes cannot be ignored. Therefore, instead of directly using deep learning models to identify attribute impact correlations, the most effective and interpretable method is to incorporate expert experience into the feature extraction and decision reasoning process. Based on this concept, combined with the traffic cognition results generated by the above model, the description of the characteristics of external attribute impacts is realized, and a more in-depth analysis of external attribute impacts is conducted.

[0132] Given that different external factors have different impacts on traffic scene cognition results, this technology uses the results under different external factors to conduct further analysis. By using the determination coefficient to measure the impact of different external factors on traffic scene cognition, and using relevant knowledge to analyze the impact, we can further study traffic cognition work.

[0133] This embodiment establishes the relationship between external attributes and predicted traffic speed, that is, the influence of external attributes is indirectly reflected through the accuracy of speed prediction, considering that the input external attribute type will directly affect the accuracy of traffic speed prediction. 2 ) is used as an indicator to evaluate the accuracy of prediction. It is defined as follows:

[0134]

[0135] where Y pred [i][j] represents the predicted speed data of the i-th road at time j, and Y true [i][j] represents the actual speed data of the i-th road at time j. represents the average value of the predicted speed. N is all roads, and τ is the current time step, that is, the predicted time length. It can be found that when the predicted value is close to the true value, the numerator approaches 0, and the determination coefficient (R 2 ) approaches 1, which means that R 2 The larger it is, the better the predictive performance of the model in this application and the more appropriate the regression fit.

[0136] Therefore, by varying the input of external attributes and tracking the changes in the coefficient of determination, the impact of external attributes on traffic perception can be determined without understanding the decision-making process of the model. Reasonable fuzzy rules are essential to this process and provide a basis for understanding the application of traffic perception algorithms. This study uses three categories—small, medium, and large impact on traffic perception—to describe the three ways in which external attributes affect traffic perception. These categories are represented by fuzzy rules as tiny, medium, and large, respectively. The fuzzy classification threshold λ 1 and λ 2 It is established using a heuristic method. The fuzzy rule for intelligent traffic scene recognition is: when the coefficient of determination (R 2 ) is greater than or equal to 0 and less than or equal to λ 1 When the determination coefficient (R 2 ) is greater than or equal to λ 1 and is less than or equal to λ 2 When the determination coefficient (R 2 ) is greater than or equal to λ 2 And when it is less than or equal to 1, we believe that this external factor has a huge impact on the perception of traffic scenes.

[0137] This embodiment uses the growth rate to measure the impact of external factors on traffic cognition. Taking the traffic scene cognition model as an example, assume that when no external attributes are input, its determination coefficient is 0.5; when some external attributes are input, its determination coefficient is 0.7; in this case, the growth rate is GR = 0.4. The impact of external attributes on traffic cognition increases with the increase of growth rate. The definition of GR is as follows:

[0138]

[0139] in is the coefficient of determination of the model after adding a certain attribute, and is the coefficient of determination of the model when no attributes are added. effect When it is greater than 0, it means that the addition of attributes has a positive impact on the cognitive performance of the model, and as GR effect The larger the GR is, the greater the cognitive performance of the model will be. effect When it is less than 0, it means that the addition of the attribute has a negative impact on the cognitive ability of the model. It may be some kind of noise to the model, or there may be a problem with the attribute data set.

[0140] During the experiment, it was found that GR effect Generally, they are small, which is not conducive to subsequent analysis. Therefore, it is decided to effect Normalize them to make them more evenly distributed and more intuitive to see the difference. effect The normalized formula is:

[0141]

[0142] Among them, GR n is the original growth rate, and GR min Is the smallest growth rate among all growth rates, GR max It is the largest growth rate of all growth rates.

[0143] This embodiment uses five evaluation indicators to evaluate the traffic scene recognition performance of the model by comparing the expected data with the actual data. These indicators include root mean square error RMSE, mean absolute error MAE, accuracy, determination coefficient R 2 (Coefficient of Determination), explained variance score VAR (Explained Variance Score).

[0144] Experimental Results

[0145] Table 2 Results of the model under different external factors

[0146]

[0147] Next, we can use fuzzy rules to analyze the impact of traffic cognition. According to expert experience, we can set λ 1 is 0.3, λ 2 is 0.6, then according to the fuzzy rule:

[0148] if 0≤GR n ≤λ 1 ,then the effect is small.

[0149] if λ 1 ≤ GR n ≤λ 2 ,then the effect is middle.

[0150] if λ 2 ≤GR n ≤1, then the effect is big.

[0151] It can be concluded that when the external factor only adds time period, the impact is middle; when the external factor only adds weather, the impact is negligible and small; when the external factor only adds poi, the impact is small; when the external factor adds weather&poi, the impact is big; when the external factor adds weather&poi&time, the impact is also big, and it is the largest impact.

[0152] Since people's travel patterns are strongly related to their daily lives and rest, for example, people have a greater chance of traveling during the day, so the traffic volume during the day may be correspondingly larger, while most people are resting at night, so the traffic volume at night may be correspondingly smaller. Therefore, Table 2 shows that time information has the greatest impact on traffic cognition. Moreover, different cities experience different degrees of the impact of time period information on traffic cognition. For example, Changsha's nightlife is richer than Hangzhou, so the traffic volume in Changsha at night is larger than that in Hangzhou, so Changsha's impact on traffic cognition for time period is lower than that in Hangzhou. Since the weather does not have obvious periodic changes and the days in the data set are often not very long, the weather tends not to change significantly in a short period of time, making it the information with the least impact on traffic cognition. In addition, it is obvious that the sum of several external features may have different degrees of positive effects. When all factors are added at the same time, the impact on traffic cognition is superimposed, so that the cognitive model obtains the maximum performance growth.

[0153] This embodiment will demonstrate the performance of the spatiotemporal network technology through inter-model comparison experiments. The inter-model comparison experiment is to compare the spatiotemporal network model proposed by this technology with other non-spatial network traffic speed prediction models. This embodiment selects five representative models for comparison with this model. These five models are:

[0154] 1) Historical Average Model (HA): This model uses the average value of historical traffic speed as the predicted value of future traffic speed.

[0155] 2) Autoregressive Integrated Moving Average Model (ARIMA): This model fits the observed time server data into a parametric model to predict future traffic speeds.

[0156] 3) Support Vector Regression Model (SVR): This model uses historical traffic speed to train the model and obtain the relationship between input and output. The future traffic speed data is input into the model to predict the future traffic speed. This paper uses a linear kernel with a penalty term of 0.001.

[0157] 4) Temporal Graph Convolutional Network (T-GCN): This model combines the gated recurrent unit (GRU) and the graph convolutional neural network (GCN) to capture the spatiotemporal attributes in traffic speed data.

[0158] 5) Attribute-augmented Spatiotemporal Graph Convolutional Neural Network model (AST-GCN): This model uses convolutional neural networks and gated recurrent units to capture the spatiotemporal characteristics in speed data and some external attribute data, and predict future traffic speeds.

[0159] All codes of the above models are open source. In order to compare the prediction performance of these models at different prediction times, this embodiment compares the prediction performance of different models at 10 minutes, 30 minutes, and 60 minutes respectively. The hyperparameter settings of all models are the same, and the data set used in the experiment is the Shenzhen North Station online car-hailing data set. Comparing the experimental results, it is found that under the prediction time of 10 minutes, the prediction performance of this model is roughly the same as that of SVR, T-GCN and AST-GCN, and the performance of SVR is slightly better. At the prediction times of 30 minutes and 60 minutes, the prediction accuracy of this model is higher than that of other models. In addition, as the prediction time becomes longer, the prediction performance of other models decreases significantly, but this model also maintains a prediction accuracy of more than 90% at a prediction time of 60 minutes.

[0160] In addition, this embodiment also proposes a device for constructing an intelligent traffic cognitive model, including:

[0161] A simulation unit, the simulation unit is used to model the road network in the traffic scene as nodes in a graph model, and model the connection relationship between the roads as edges in the graph model, so as to simulate a dynamic traffic scene with spatiotemporal characteristics;

[0162] A classification unit, wherein the classification unit is used to digitally process the data in a semantic format, normalize different types of external factor data into a specific data range using a fuzzy classification method, and classify traffic-related attributes into external attributes and traffic cognition-related attributes using an intelligent traffic scene cognition deep learning network model;

[0163] A training unit is used to input data corresponding to external attributes and traffic cognition related attributes into the graph convolutional neural network and gated recurrent unit in the model for training to obtain an intelligent traffic cognition model.

[0164] In addition, this embodiment further proposes a storage medium on which a computer program is stored. When the program is executed by a processor, the method for constructing the intelligent traffic cognitive model is implemented.

[0165] Other beneficial effects of the present invention:

[0166] It solves how to obtain the spatiotemporal characteristics in traffic scene data; how to capture the impact of external attributes on traffic scene cognition; and how to improve the interpretability of the traffic cognition model as a whole. In traffic scenes, the status of vehicles on the road, the impact of external factors on traffic cognition, and the mutual influence relationship between external attributes will change all the time. This technology will obtain the impact value of external attributes on traffic cognition and capture the interaction relationship between different attributes. Then generate a traffic cognition feature matrix tensor from historical traffic cognition data. The spatial feature attributes of traffic data are captured using the graph convolutional neural network cognitive traffic data feature matrix tensor, adjacency matrix tensor and attribute influence feature matrix tensor, while the temporal features in traffic cognition data are captured using gated recurrent units. In fact, the model proposed by this technical invention can be applied to all data scene cognitions with spatiotemporal characteristics, such as traffic speed prediction, traffic flow prediction, geological detection, address selection, etc., so it has good practical application feasibility.

[0167] In the present invention, reference is made to “some embodiments”, “this embodiment”, examples, etc., which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0168] In this embodiment, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, object A and / or object B may represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0169] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for constructing an intelligent traffic cognitive model, characterized in that: The following steps are involved: S1. Model the road network in the traffic scene as nodes in the graph model, and model the connection relationship between roads as edges in the graph model to simulate a dynamic traffic scene with spatiotemporal characteristics; S2. The data in semantic format were digitized, and different types of external factor data were normalized into a specific data range using fuzzy classification methods. The intelligent traffic scene cognition deep learning network model was used to classify traffic-related attributes into external attributes and traffic cognition-related attributes. S3. Input the data corresponding to the external attributes and the traffic cognition related attributes into the graph convolutional neural network and the gated recurrent unit in the model for training to obtain an intelligent traffic cognition model, including: Use gated recurrent units to capture the temporal characteristics of traffic data and learn and remember long-term temporal dependencies through their gating mechanism; Then, we use graph convolutional neural networks to capture its spatial features and represent the traffic network as a graph structure. The node features include the temporal features output from the gated recurrent unit. The graph convolutional neural network learns the relationship and spatial dependency between nodes by performing convolution operations on the graph structure. The temporal features extracted by gated recurrent units and the spatial features extracted by graph convolutional neural networks are combined to build a model that can capture both temporal and spatial dependencies.

2. The method for constructing an intelligent traffic cognitive model according to claim 1, characterized in that: In step S2, the feature matrix of the external attributes is expressed as: X feature ∈{X TTI ,X time ,X holiday ,X weather ,X flowchange } in, is the traffic congestion degree matrix, τ is the time step, and N is the number of roads in the traffic scene; The calculation formula for traffic congestion is: Among them, v free is the speed at which cars can freely pass on the road, usually the maximum speed limit on the road, v current is the average speed of cars on the current road; is a time period matrix, which divides the twenty-four hours of a day into n time periods; X holiday is the holiday matrix, X holiday is a binary value. When the day is a holiday (including weekends and statutory holidays), X holiday The value is 1, otherwise it is 0; holidays include weekends and statutory holidays; X weather is the weather matrix. When the weather is sunny, X weather is 1; when the weather is cloudy, X weather =2; when it is raining, according to the principle of fuzzy mathematics, the amount of rainfall is fuzzily defined as light rain, moderate rain and heavy rain, corresponding to X weather is 3, 4, 5; when the weather is haze, X weather is 6; Establishing a representation of a characteristic matrix of external attribute factors, wherein the external attribute factors include a particular traffic congestion situation, time period information, holiday information, weather conditions, and traffic flow changes; is the traffic flow change matrix. According to the fuzzy mathematics principle, the traffic flow change is fuzzily defined into several levels: very fast, fast, medium, slow, and very slow, corresponding to X flowchange It is 3, 1, 0, -1, -3.

3. The method for constructing an intelligent traffic cognitive model according to claim 1, characterized in that: After step S3, the method further includes using a determination coefficient as an indicator of the prediction accuracy of the intelligent traffic cognitive model.

4. The method for constructing an intelligent traffic cognitive model according to claim 3, characterized in that: The coefficient of determination is expressed as follows: where Y pred [i][j] represents the predicted speed data of the i-th road at time j, and Y true [i][j] represents the actual speed data of the i-th road at time j; represents the average value of the predicted speed, N is all roads, and τ is the current time step, that is, the predicted time length.

5. The method for constructing an intelligent traffic cognitive model according to claim 1, characterized in that: In step S3, the parameters that need to be adjusted and set for the established intelligent traffic cognition model include key hyperparameters and remaining parameters; the key hyperparameters include the number of training cycles, learning rate, number of GRU hidden units, training batch size and input data duration; the remaining parameters include weights and biases related to nodes in each layer of the deep neural network.

6. The method for constructing an intelligent traffic cognitive model according to claim 5, characterized in that: It also includes using an Adam optimizer to optimize the remaining parameters. Specifically, new gradients are generated using training samples in combination with previous training knowledge, and then the obtained gradients are used to calculate the first-order moment estimate of the deviation and the second-order moment estimate of the offset. Finally, the first-order moment estimate and the second-order moment estimate are used to correct the deviation and update the model parameters.

7. The method for constructing an intelligent traffic cognitive model according to claim 6, characterized in that: The first-order moment estimation is a weighted average of the gradient, which is used to record the direction and magnitude of the gradient. The formula for the first-order moment estimation is: m t =β1m t-1 +·(1-β1)g t Among them, m t is the first-order moment estimate of the current time step t, β1 is the decay rate of momentum, g t is the gradient of the current time step; The second-order moment estimation is a weighted average of the square of the gradient, which is used to record the magnitude of the gradient change. The formula for the second-order moment estimation is: Among them, v t is the second-order moment estimate of the current time step t, β2 is the decay rate of the second-order moment estimate, and g t is the gradient at the current time step.

8. A device for constructing an intelligent traffic cognitive model, characterized in that: include: A simulation unit, the simulation unit is used to model the road network in the traffic scene as nodes in a graph model, and model the connection relationship between the roads as edges in the graph model, so as to simulate a dynamic traffic scene with spatiotemporal characteristics; A classification unit, wherein the classification unit is used to digitally process the data in a semantic format, normalize different types of external factor data into a specific data range using a fuzzy classification method, and classify traffic-related attributes into external attributes and traffic cognition-related attributes using an intelligent traffic scene cognition deep learning network model; A training unit is used to input data corresponding to external attributes and traffic cognition related attributes into the graph convolutional neural network and gated recurrent unit in the model for training to obtain an intelligent traffic cognition model.

9. A storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for constructing an intelligent traffic cognitive model as described in any one of claims 1 to 7 is implemented.