Abnormity detection method for intelligent traffic road operation safety state
By converting traffic data into a three-dimensional matrix and using multi-layer perceptron and space-time encoding modules, combining structured perception and frequency domain enhancement of time delay perception attention, the problem of poor results in existing traffic prediction technologies is solved and more efficient traffic abnormality detection and prediction ensure the safety and efficiency of smart transportation systems.
Patent Information
- Application Number
- CN202411402849.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
Existing traffic forecasting technologies have shortcomings in improving traffic forecasting effects, especially in complex urban traffic environments, which are difficult to accurately predict traffic flow and speed.
By converting traffic data into a three-dimensional matrix and using a multi-layer perceptron and K-layer spatiotemporal encoding module for processing, combining structured perception and frequency domain enhancement of time delay perception attention, periodic information and trend information in traffic data are extracted to carry out traffic Prediction of data.
It improves the quality, real-time and stability of traffic anomaly detection, reduces the error rate, performs better on traffic data sets than traditional methods, and ensures the safety and efficiency of smart transportation highways.
Smart Images

Figure CN119296316A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic prediction, and in particular to an abnormality detection method for the safe operation status of a smart traffic highway. Background Art
[0002] In recent years, Intelligent Transportation System (ITS) has become one of the key issues that many countries are concerned about in the process of urban development. However, with the rapid urbanization process and the sharp increase in population, the intelligent transportation system has become more and more complex. In this context, traffic forecasting, as a key element of ITS, is considered to be one of the key interventions for improving the efficiency of ITS in the early stage. Traffic forecasting aims to predict the future traffic conditions in the urban traffic network based on the traffic conditions observed in history. The traffic conditions involved generally include traffic flow and traffic speed. After years of continuous research and practice, traffic forecasting has achieved many gratifying results. However, traffic forecasting still faces problems such as poor prediction results.
[0003] Therefore, it is necessary to provide an anomaly detection method for the safe operation status of smart transportation highways to solve the above technical problems. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: first, the traffic data is read and converted into a matrix corresponding to three-dimensional traffic data including time dimension, space dimension and feature dimension;
[0007] Secondly, the three-dimensional matrix corresponding to the obtained traffic data is processed by a first multi-layer perceptron to obtain first traffic data;
[0008] Furthermore, the first traffic data is processed by a K-layer spatiotemporal coding module to obtain traffic data for a future time period to be predicted.
[0009] As a preferred solution of the traffic prediction method based on structured perception and frequency domain enhanced time delay perception attention described in the present invention, data is read from the traffic data set and converted into a three-dimensional matrix containing time dimension, space dimension and feature dimension; wherein the three-dimensional matrix is Where t is the current time, T1 is the historical time of traffic data, represents the traffic features captured by N sensors at time t, represents the traffic features captured by the nth sensor at time t, n∈[1,N].
[0010] As a preferred solution of the traffic prediction method based on structured perception and frequency domain enhanced time-delay perception attention of the present invention, the three-dimensional matrix corresponding to the obtained traffic data is processed by a first multi-layer perceptron to obtain the first traffic data. in represents the traffic features captured by N sensors at time t, represents the traffic features captured by the nth sensor at time t, n∈[1,N], and C is the feature dimension obtained after processing by the first multi-layer perceptron.
[0011] As a preferred solution of the traffic prediction method based on structured perception and frequency domain enhanced time-delay perception attention described in the present invention, the obtained first traffic data is processed by a K-layer spatiotemporal coding module to obtain predicted traffic data for the future time period.
[0012] As a preferred solution of the traffic prediction method based on structured perception and frequency domain enhanced time delay perception attention described in the present invention, each layer in the K-layer spatiotemporal coding module processing includes two parallel branches, the first branch is the structured perception attention module, and the second branch is the frequency domain enhanced time delay perception attention module; the k-th layer is taken as an example to illustrate the processing steps of each layer of the spatiotemporal coding module:
[0013] First, the traffic data X input to the kth layer k After processing with formula (1), we get Formula (1) is specifically expressed as follows:
[0014]
[0015] Among them, GNN (g) is a graph neural network model, W Q , W K and W V is a learnable parameter, softmax(g) is a normalized exponential function, and T is a matrix transpose operation;
[0016] Secondly, the traffic data X input to the kth layer k The period information implicit in the traffic data is obtained through formula (2): and trend informationX t k , formula (2) is specifically expressed as follows:
[0017]
[0018] Among them, AvgPool(g) is a moving average operation, and Padding(g) is a matrix filling operation;
[0019] Furthermore, the obtained periodic signal is passed through the time delay sensing module to obtain a new periodic signal The processing process is as follows:
[0020] (1) The present invention divides historical traffic data into a group of representative short-term traffic patterns; specifically, the historical traffic data is sliced using a sliding window of size S to obtain a group of traffic flow sequences, which are expressed as follows: The length of each segment is S,N p is the number of traffic data slices divided;
[0021] (2) Use the k-Shape clustering algorithm to divide the traffic flow sequence into N p Class, that is where p i It is also a time series of length S, i∈[1,N p ] is the i-th category;
[0022] (3) Based on the above N p time series and N p We use formula (3) to integrate them, namely:
[0023]
[0024] Among them, W t1 , W t2 , W1, W2, is a learnable parameter;
[0025] (4) The periodic signal Adding it to R gives a new periodic signal representation
[0026] Furthermore, the obtained Attention processing in the frequency domain yields Its expression is as follows:
[0027]
[0028] Among them, softmax(g) is the normalized exponential function, F(g) is the fast Fourier transform, and F -1 (g) is the fast inverse Fourier transform, W FQ , W FK and W FK is a learnable matrix;
[0029] Furthermore, and X t k Add traffic signal
[0030] Furthermore, the output of the k-th spatiotemporal coding module is obtained by using the following formula, and the specific expression is shown in formula (5):
[0031]
[0032] Where MLP(g) is a multi-layer perceptron, Swish(g) and ReLU(g) are activation functions;
[0033] Finally, the final traffic signal is obtained through the serial operation of K spatiotemporal coding modules.
[0034] As a preferred solution of the traffic prediction method based on structured perception and frequency domain enhanced time-delay perception attention described in the present invention, experiments show that the proposed anomaly detection method for the safe operation status of smart transportation highways has superior performance.
[0035] Beneficial effects of the present invention: The present invention improves the quality, real-time performance and stability of traffic anomaly detection and reduces the error rate by processing the matrix corresponding to the three-dimensional traffic data and the traffic data through a K-layer spatiotemporal coding module. Compared with ARIMA, SVR, LSTM, ASTGCN, and GW in the prior art for testing traffic data sets PEMS04, PEMS07, and PEMS08, the traffic prediction anomaly detection method of the present invention is better and ensures the safety and efficiency of the operation of smart traffic highways. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0037] in:
[0038] Figure 1 A schematic flow chart of an abnormality detection method for the safe operation status of a smart transportation highway according to an embodiment of the present invention;
[0039] Figure 2 An operation block diagram of a method and device for detecting anomalies in the operation safety state of a smart transportation highway according to an embodiment of the present invention;
[0040] Figure 3 A data effect comparison diagram of the anomaly detection method for the safe operation status of a smart transportation highway described in an embodiment of the present invention and other classical methods. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0043] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0044] Example 1
[0045] Reference Figure 1 The first embodiment of the present invention is a method for detecting abnormalities in the operation safety state of a smart transportation highway, comprising the following steps:
[0046] (1) Read the traffic data and convert it into a matrix corresponding to three-dimensional traffic data including time dimension, space dimension and feature dimension;
[0047] (2) processing the three-dimensional matrix corresponding to the obtained traffic data through a first multi-layer perceptron to obtain first traffic data;
[0048] (3) Processing the first traffic data through a K-layer spatiotemporal coding module to obtain traffic data for a future time period to be predicted;
[0049] Specifically, data is read from the traffic data set and converted into a three-dimensional matrix containing time dimension, space dimension and feature dimension; the three-dimensional matrix is
[0050] Where t is the current time, T1 is the historical time of traffic data, represents the traffic features captured by N sensors at time t, represents the traffic features captured by the nth sensor at time t, n∈[1,N].
[0051] The three-dimensional matrix corresponding to the obtained traffic data is processed by the first multi-layer perceptron to obtain the first traffic data
[0052] in represents the traffic features captured by N sensors at time t, represents the traffic features captured by the nth sensor at time t, n∈[1,N], and C is the feature dimension obtained after processing by the first multi-layer perceptron.
[0053] The first traffic data obtained is processed by a K-layer spatiotemporal coding module to obtain predicted traffic data for a future time period.
[0054] Each layer in the K-layer spatiotemporal coding module processing includes two parallel branches, the first branch is the structured perception attention module, and the second branch is the frequency domain enhanced time delay perception attention module; here the k-th layer is taken as an example to illustrate the processing flow of each layer of the spatiotemporal coding module.
[0055] First, the traffic data X input to the kth layer k After processing with formula (1), we get Formula (1) is specifically expressed as follows:
[0056]
[0057] Among them, GNN (g) is a graph neural network model, W Q , W K and W V is a learnable parameter, softmax(g) is a normalized exponential function, and T is a matrix transpose operation.
[0058] Secondly, the traffic data X input to the kth layer k The period information implicit in the traffic data is obtained through formula (2): and trend information Formula (2) is specifically expressed as follows:
[0059]
[0060] Among them, AvgPool(g) is a moving average operation, and Padding(g) is a matrix filling operation.
[0061] Furthermore, the obtained periodic signal is passed through the time delay sensing module to obtain a new periodic signal The processing process is as follows:
[0062] (1) The historical traffic data is divided into a set of representative short-term traffic patterns. Specifically, the historical traffic data is sliced using a sliding window of size S to obtain a set of traffic flow sequences, which are expressed as follows: The length of each segment is S,N p is the number of traffic data slices divided;
[0063] (2) Use the k-Shape clustering algorithm to divide the traffic flow sequence into N p Class, that is where p i It is also a time series of length S, i∈[1,N p ] is the i-th category.
[0064] (3) Based on the above N p time series and N p We use formula (3) to integrate them, namely:
[0065]
[0066] Among them, W t1 , W t2 , W1, W2, are learnable parameters.
[0067] (4) The periodic signal Adding it to R gives a new periodic signal representation
[0068] Furthermore, the obtained Attention processing in the frequency domain yields Its expression is as follows:
[0069]
[0070] Among them, softmax(g) is the normalized exponential function, F(g) is the fast Fourier transform, and F -1 (g) is the fast inverse Fourier transform, W FQ , W FK and W FK is a learnable matrix.
[0071] Will and X t k Add traffic signal
[0072] Furthermore, the output of the k-th spatiotemporal coding module is obtained by using the following formula, and the specific expression is shown in formula (5):
[0073]
[0074] Where MLP(g) is a multi-layer perceptron, Swish(g) and ReLU(g) are activation functions.
[0075] Finally, the final traffic signal is obtained through the serial operation of K spatiotemporal coding modules.
[0076] The traffic data obtained through the above steps can be passed through a variety of programmable controllers and then through the communication mode space-time coding module to obtain a traffic anomaly detection method.
[0077] Figure 2 This is a comparison chart of the effects of the present invention and other classic methods. In order to verify the superiority of the proposed anomaly detection method for the safe operation status of smart transportation highways, the present invention and the classic ARIMA, SVR, LSTM, ASTGCN, GW were used to test the traffic data sets PEMS04, PEMS07, and PEMS08, and MAE, MAPE, and RMSE were used to evaluate their effects. Figure 2 It can be seen that compared with other classical algorithms, the average traffic prediction effect of the present invention is better.
[0078] In summary, technical practice shows that the anomaly detection method for the safe operation status of smart transportation highways proposed in the present invention has superior performance.
[0079] It is important to note that the construction and arrangement of the present application shown in a number of different exemplary embodiments are illustrative only. Although only a few embodiments are described in detail in this disclosure, it should be readily understood by those who refer to this disclosure that many modifications are possible (e.g., the size, scale, structure, shape and proportion of various elements, and parameter values, etc.) without substantially departing from the novel teachings and advantages of the subject matter described in this application.
[0080] Additionally, in order to provide a concise description of exemplary embodiments, all features of an actual embodiment (ie, those features that are not relevant to the best mode presently contemplated for carrying out the invention or those that are not relevant to implementing the invention) may not be described.
[0081] It will be appreciated that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but will be a routine task of design, fabrication, and production for those of ordinary skill having the benefit of this disclosure without undue experimentation.
[0082] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. An abnormality detection method for the safe operation status of a smart transportation highway, characterized in that: include: 1) First, read the traffic data and convert it into a matrix corresponding to three-dimensional traffic data including time dimension, space dimension and feature dimension; 2) Secondly, the three-dimensional matrix corresponding to the obtained traffic data is processed by a first multi-layer perceptron to obtain first traffic data; 3) Furthermore, the first traffic data is processed by a K-layer spatiotemporal coding module to obtain traffic data for a future time period to be predicted.
2. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 1 is characterized in that: Read data from the traffic dataset and convert it into a three-dimensional matrix containing time dimension, space dimension and feature dimension; the three-dimensional matrix is Where t is the current time, T1 is the historical time of traffic data, represents the traffic features captured by N sensors at time t, x t ' n represents the traffic features captured by the nth sensor at time t, n∈[1,N].
3. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 1 is characterized in that: The three-dimensional matrix corresponding to the obtained traffic data is processed by the first multi-layer perceptron to obtain the first traffic data in represents the traffic features captured by N sensors at time t, represents the traffic features captured by the nth sensor at time t, n∈[1,N], and C is the feature dimension obtained after processing by the first multi-layer perceptron.
4. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 1 is characterized in that: The first traffic data obtained is processed by a K-layer spatiotemporal coding module to obtain predicted traffic data for a future time period.
5. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 3 is characterized in that: Each layer in the K-layer spatiotemporal coding module processing includes two parallel branches, the first branch is the structured perception attention module, and the second branch is the frequency domain enhanced time delay perception attention module; here we take the k-th layer as an example to illustrate the processing steps of each layer of the spatiotemporal coding module: First, the traffic data X input to the kth layer k After processing with formula (1), we get Formula (1) is specifically expressed as follows: Among them, GNN (g) is a graph neural network model, W Q , W K and W V is a learnable parameter, softmax(g) is a normalized exponential function, and T is a matrix transpose operation; Secondly, the traffic data X input to the kth layer k The period information implicit in the traffic data is obtained through formula (2): and trend information Formula (2) is specifically expressed as follows: Among them, AvgPool(g) is a moving average operation, and Padding(g) is a matrix filling operation.
6. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 5 is characterized in that: The obtained periodic signal is passed through the time delay perception module to obtain a new periodic signal The processing process is as follows: (1) The present invention divides historical traffic data into a group of representative short-term traffic patterns; slices the historical traffic data using a sliding window of size S to obtain a group of traffic flow sequences, which are expressed as follows: The length of each segment is S,N p is the number of traffic data slices divided; (2) Use the k-Shape clustering algorithm to divide the traffic flow sequence into N p Class, that is where p i It is also a time series of length S, i∈[1,N p ] is the i-th category; (3) Based on the above N p time series and N p We use formula (3) to integrate them, namely: Among them, W t1 , W t2 , W1, W2, is a learnable parameter; (4) The periodic signal Adding it to R gives a new periodic signal representation Furthermore, the obtained Attention processing in the frequency domain yields Its expression is as follows: Among them, softmax(g) is the normalized exponential function, F(g) is the fast Fourier transform, and F -1 (g) is the fast inverse Fourier transform, W FQ , W FK and W FK is a learnable matrix; Furthermore, and Add traffic signal Furthermore, the output of the k-th spatiotemporal coding module is obtained by using the following formula, and the specific expression is shown in formula (5): Where MLP(g) is a multi-layer perceptron, Swish(g) and ReLU(g) are activation functions; Finally, the final traffic signal is obtained through the serial operation of K spatiotemporal coding modules.
7. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 1 is characterized in that: The traffic data obtained through the above steps can be passed through a variety of programmable controllers and then through the communication mode spatiotemporal coding module to obtain a traffic prediction method.
8. The abnormality detection method for the safe operation status of a smart transportation highway according to claim 1 is characterized in that: This method can be applied to many fields such as traffic planning, traffic management, and traffic engineering.
9. A device, comprising the abnormality detection method for the safe operation state of a smart transportation highway according to any one of claims 1 to 8, characterized in that: as well as: one or more processors; A memory storing operable instructions, wherein when the instructions are executed by the one or more processors, the one or more processors perform operations, wherein the operations include the process of the abnormality detection method for the safe operation status of a smart transportation highway as described in any one of claims 1 to 7.