CN111653087A - Construction method of urban traffic anomaly detection model - Google Patents

Construction method of urban traffic anomaly detection model Download PDF

Info

Publication number
CN111653087A
CN111653087A CN202010189746.7A CN202010189746A CN111653087A CN 111653087 A CN111653087 A CN 111653087A CN 202010189746 A CN202010189746 A CN 202010189746A CN 111653087 A CN111653087 A CN 111653087A
Authority
CN
China
Prior art keywords
road
data
urban
traffic
gcn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010189746.7A
Other languages
Chinese (zh)
Inventor
关庆锋
梁哲玮
岳汉秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Geosciences
Original Assignee
China University of Geosciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Geosciences filed Critical China University of Geosciences
Priority to CN202010189746.7A priority Critical patent/CN111653087A/en
Publication of CN111653087A publication Critical patent/CN111653087A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a construction method of an urban traffic anomaly detection model considering both a road network topological structure and road attributes, which comprises the following steps: and (3) predicting speed data by using a GRU-GCN model, combining the predicted speed data with real speed data, outputting the time range of the traffic abnormal event on the road by adopting an HTM-Detector algorithm, and calculating the accuracy. The method further improves the accuracy of the traffic prediction speed, and has the beneficial effect of providing more reliable data support for urban traffic anomaly detection.

Description

Construction method of urban traffic anomaly detection model
Technical Field
The invention relates to the field of urban traffic. More specifically, the invention relates to a method for constructing an urban traffic anomaly detection model.
Background
Urban road traffic systems are one of the most important components of urban infrastructure. In order to better manage increasingly complex road traffic systems, intelligent traffic systems have been introduced. Accurate and timely road traffic information is particularly important for government decision making, personal trip and normal operation of related enterprises and public institutions. The road traffic information is accurate and timely, government departments can be helped to master real-time road conditions, decisions can be made in time, traffic problems can be solved, traffic jams can be relieved, carbon emission is reduced, the operation efficiency of a traffic system is improved, and people are assisted to make daily travel decisions.
The method has the advantages that the road traffic abnormity is found in time by analyzing the historical data and the road traffic information acquired by the traffic monitoring system in real time, and the decision is made as soon as possible through a traffic control system and the like, so that the method is one of important functions of the intelligent traffic system. However, the high spatial and temporal resolution data collected by the traffic monitoring system results in a large amount of historical data, the time consumption for training a model for predicting the future speed of the road traffic flow is very long, and the detection and discovery of sudden road traffic abnormal events based on the historical data and the predicted data of the traffic monitoring system are difficult. In recent years, with the rapid development of deep learning technology, the gradual maturity of deep learning framework and the exponential improvement of GPU computing capability, the capability of processing big data becomes stronger and stronger, and the accurate prediction of road traffic future speed and the timely detection of road traffic abnormal events in practical application become new directions for the study of students. Most of the existing researches do not consider urban traffic network structures and influence of the attributes of roads on traffic, so that the method for detecting the urban traffic abnormity by combining the attributes of the roads has certain practical value and practical significance.
Disclosure of Invention
An object of the present invention is to solve at least the above problems and to provide at least the advantages described later.
The invention also aims to provide a construction method of the urban traffic anomaly detection model considering both the road network topological structure and the road attributes, which further improves the accuracy of traffic prediction speed by utilizing the traffic network structure and combining the attributes of the roads, thereby providing more reliable data support for urban traffic anomaly detection.
To achieve these objects and other advantages and in accordance with the purpose of the invention, there is provided a method for constructing an urban traffic anomaly detection model considering both a road network topology and road attributes, comprising: predicting speed data by utilizing a GRU-GCN model; combining the predicted speed data and the real speed data, outputting the time range of the traffic abnormal event on the road by adopting an HTM-Detector algorithm, and calculating the accuracy;
the GRU-GCN model formula is as follows:
ut=σ(Wu[f(A,Xt),ht-1]+bu)
rt=σ(Wr[f(A,Xt),ht-1]+br)
ct=tanh(Wc[f(A,Xt),(rt*ht-1]+bc)
ht=ut*ht-1+(1-ut)*ct
wherein u istAnd rtRepresenting the refresh and reset gates at time t, respectively, ctCandidate set output for hidden layer at time t, htThe output of the hidden layer at time t;
the GCN captures the spatial dependence of complex topologies mainly by way of graph learning, and is represented as follows:
Figure BDA0002415446250000021
wherein X represents an attribute matrix, A represents a road network topology matrix,
Figure BDA0002415446250000022
represents the process of preprocessing the matrix A, W0、W1Representing the weight matrices of the first and second layers, respectively, in a two-layer GCN model.
Preferably, the specific method for constructing the GRU-GCN model comprises the following steps:
acquiring a data set required by urban traffic anomaly detection and preprocessing the data set, wherein the data set comprises urban road network data, urban road traffic anomaly data and urban road traffic flow data;
and respectively constructing a road network topology matrix and an attribute matrix, and learning and verifying by combining the GCN and the GRU network to obtain a GRU-GCN model.
Preferably, the data set preprocessing method specifically comprises:
extracting speed data in a certain time range from urban road traffic flow data, extracting urban road traffic abnormal data in the time range, and performing duplication removal and null removal;
matching urban road traffic flow data with urban road network data to obtain a road network traffic flow data set;
and repeating the urban road traffic abnormal event data and the road network traffic flow data set after the elimination and the emptying to obtain an abnormal road data set.
Preferably, each element of the attribute matrix includes speed data extracted from the urban road traffic flow data and road width data in the urban road network data.
Preferably, the attribute matrix is divided into a training set and a test set according to a time sequence, the training set is input into the GRU-GCN to learn to obtain the parameters of the model, and the test set is used for detecting the accuracy of abnormal detection of the GRU-GCN model.
Preferably, the HTM-Detector algorithm specifically includes:
calculating an abnormal score by combining the predicted data and the real data of the GRU-GCN model;
constructing two rolling Gaussian distributions based on the long and short windows;
the likelihood of an anomaly is derived by the Q-function.
The invention at least comprises the following beneficial effects:
by utilizing a graph learning method and a deep learning method, not only can the topological structure information of the urban traffic network be learned, but also the influence of the road property on the abnormal detection can be captured;
the influence of the road attribute and the road network topological structure on the traffic is considered, the accuracy of abnormal detection is improved, and the road traffic abnormality can be found in time, so that the decision can be made in time and the traffic problem can be solved.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
Fig. 1 is a schematic flow chart of a method for constructing an urban traffic anomaly detection model according to one embodiment of the present invention;
fig. 2 is road network data used in a research area in the method for constructing an urban traffic anomaly detection model according to one embodiment of the present invention.
Detailed Description
The present invention is further described in detail below with reference to the drawings and examples so that those skilled in the art can practice the invention with reference to the description.
The invention provides a method for constructing an urban traffic anomaly detection model considering both a road network topological structure and road attributes, which specifically comprises the following processing steps as shown in figure 1:
step 1, acquiring a data set required by urban traffic anomaly detection. The method comprises the steps of collecting relevant data sets of vehicle running conditions on roads in a city, wherein the relevant data sets specifically comprise city road network data, city road traffic abnormal data and city road traffic flow data.
And 2, preprocessing the data set. The method comprises the steps of processing abnormal traffic data of urban roads, and then matching to obtain an abnormal road data set.
The method comprises the following specific steps:
and 2.1, extracting speed data in a certain time range in the urban road traffic flow data, extracting urban road traffic abnormal data in the time range, and performing operations of removing repeated records and removing empty records.
Step 2.2, matching urban road traffic flow data with urban road network data to obtain a road network traffic flow data set; and matching the processed abnormal urban road traffic data with the road network traffic flow data set to obtain an abnormal road data set.
And 3, constructing a matrix, and constructing a road network topology matrix and an attribute matrix for training.
The method specifically comprises the following steps:
and 3.1, respectively extracting the speed data and the road width of the road from the urban road traffic flow data and the urban road network data according to the road ID of the abnormal road data set.
And 3.2, screening the urban road network data according to the road ID of the abnormal road data set, comparing the starting node and the ending node of the roads in the screened urban road network data, and when the starting node and the ending node of the two roads are the same or the starting node and the ending node are the same, judging that the two roads are adjacent and marking as 1, and marking as 0 in other cases, thereby constructing a road network topology matrix. And (5) carrying out visualization results on the screened road network data by using GIS software, as shown in figure 2.
And 3.3, constructing an attribute matrix by combining the extracted road width data and the extracted road speed data according to the road number on the basis of the time sequence and the road number, wherein each element of the attribute matrix comprises the speed data and the road width.
And 4, constructing a model and predicting the speed.
The method comprises the following specific steps:
step 4.1, the GCN model constructs a filter in the fourier domain, which acts on the nodes of the graph and its first-order neighborhood to capture the spatial features between the nodes. GCN (graph relational network) is selected in the model to process the space dependency of the road network topological structure and capture the road network topological structure information.
And 4.2, GRU is a deformation of LSTM (Long-Short Term Memory), and the network optimizes a gating structure, so that the network structure is simpler, and the network can be trained at a higher speed. GRU (gateway Recurrent Unit) is selected to process time dependence, and the problem of long-term dependence is solved.
And 4.3, constructing a GRU-GCN model, capturing time and space dependence and considering both the road network topological structure and the road attributes. A basic GRU-GCN unit structure is learned by combining GCN and GRU network, and a GRU-GCN model formula is as follows, utAnd rtRepresenting the refresh and reset gates at time t, respectively, ctCandidate set output for hidden layer at time t, htFor the output of the hidden layer at time t:
ut=σ(Wu[f(A,Xt),ht-1]+bu)
rt=σ(Wr[f(A,xt),ht-1]+br)
ct=tanh(Wc[f(A,Xt),(rt*ht-1]+bc)
ht=ut*ht-1+(1-ut)*ct
the GCN captures the spatial dependence of complex topologies mainly by way of graph learning, which can be expressed as follows:
Figure BDA0002415446250000051
wherein X represents an attribute matrix, A represents a road network topology matrix,
Figure BDA0002415446250000052
represents the process of preprocessing the matrix A, W0、W1Representing the weight matrices of the first and second layers, respectively, in a two-layer GCN model.
And 4.4, dividing the attribute matrix constructed in the step 3 into a training set and a testing set according to a time sequence in a ratio of 3:1, then training the model by taking the training set and the road network topology matrix as input, and obtaining a speed prediction result of each road through a GRU-GCN model.
And 5, verifying the detection accuracy of the traffic abnormal event.
The method comprises the following specific steps:
and 5.1, calculating an abnormal score by combining the speed predicted by the model and the real speed. Let x betRepresenting the state at time t, the system continuously generating time-series state data x from time 0 to time t1,x2,…,xtMeanwhile, the state prediction result of the model to the time t is assumed to be atThen, the time t exception is divided into:
Figure BDA0002415446250000053
and 5.2, detecting the abnormal event by using a long and short window mode. Firstly, taking abnormal scores of W moments before t moment, establishing rolling Gaussian distribution according to the abnormal scores of the W moments, and obtaining a mean value mu corresponding to the t momenttAnd standard deviation sigmat
Figure BDA0002415446250000054
Figure BDA0002415446250000055
Taking the previous shorter window W at time t1And (3) obtaining the abnormal score of each moment, and obtaining the average value corresponding to the t moment:
Figure BDA0002415446250000056
step 5.3, combining the Q-Function with the mu obtained in the step 5.2t1,μt、σtAnd calculating the abnormal likelihood of the time t. Let LtFor the abnormal likelihood at time t, then:
Figure BDA0002415446250000057
step 5.4, when LtWhen greater than a certain threshold, L is presenttVery close to 1. Judging the occurrence of abnormal event at time t, which is generally 10-6
anomalydetected=Lt≥1-
And 5.5, outputting the time range of the traffic abnormal event on the road, comparing the real road with the road traffic abnormal time range obtained by detection, and calculating to obtain the accuracy of abnormal detection.
While embodiments of the invention have been described above, it is not limited to the applications set forth in the description and the embodiments, which are fully applicable to various fields of endeavor for which the invention may be embodied with additional modifications as would be readily apparent to those skilled in the art, and the invention is therefore not limited to the details shown and described herein without departing from the generic concept as defined by the claims and their equivalents.

Claims (6)

1. A method for constructing an urban traffic anomaly detection model considering both a road network topological structure and road attributes is characterized by comprising the following steps of: predicting speed data by utilizing a GRU-GCN model, combining the predicted speed data with real speed data, outputting a time range of traffic abnormal events on a road by adopting an HTM-Detector algorithm, and calculating accuracy;
the GRU-GCN model formula is as follows:
ut=σ(Wu[f(A,Xt),ht-1]+bu)
rt=σ(Wr[f(A,Xt),ht-1]+br)
ct=tan h(Wc[f(A,Xt),(rt*ht-1]+bc)
ht=ut*ht-1+(1-ut)*ct
wherein u istAnd rtRepresenting the refresh and reset gates at time t, respectively, ctCandidate set output for hidden layer at time t, htThe output of the hidden layer at time t;
the GCN captures the spatial dependence of complex topologies mainly by way of graph learning, and is represented as follows:
Figure FDA0002415446240000011
wherein X represents an attribute matrix, A represents a road network topology matrix,
Figure FDA0002415446240000012
represents the process of preprocessing the matrix A, W0、W1Respectively representing the weight moments of the first and second layers in a two-layer GCN modelAnd (5) arraying.
2. The method for constructing the urban traffic anomaly detection model considering both the road network topology and the road attributes as recited in claim 1, wherein the specific method for constructing the GRU-GCN model is as follows:
acquiring a data set required by urban traffic anomaly detection and preprocessing the data set, wherein the data set comprises urban road network data, urban road traffic anomaly data and urban road traffic flow data;
and respectively constructing a road network topology matrix and an attribute matrix, and learning and verifying by combining the GCN and the GRU network to obtain a GRU-GCN model.
3. The method for constructing the urban traffic anomaly detection model considering both the road network topology and the road attributes as claimed in claim 2, wherein the data set preprocessing method specifically comprises:
extracting speed data in a certain time range from urban road traffic flow data, extracting urban road traffic abnormal data in the time range, and performing duplication removal and null removal;
matching urban road traffic flow data with urban road network data to obtain a road network traffic flow data set;
and repeating the urban road traffic abnormal event data and the road network traffic flow data set after the elimination and the emptying to obtain an abnormal road data set.
4. The method as claimed in claim 2, wherein each element of the attribute matrix comprises speed data extracted from traffic flow data of urban roads and road width data in the traffic network data of urban roads.
5. The method as claimed in claim 2, wherein the attribute matrix is divided into a training set and a testing set according to time sequence, the training set is combined with the network topology matrix and input into the GRU-GCN for learning to obtain the model parameters, and the testing set is used for detecting the accuracy of the GRU-GCN model anomaly detection.
6. The method for constructing the urban traffic anomaly detection model considering both the road network topology and the road attributes according to claim 1, wherein the HTM-Detector algorithm specifically comprises:
calculating an abnormal score by combining the predicted data and the real data of the GRU-GCN model;
constructing two rolling Gaussian distributions based on the long and short windows;
the likelihood of an anomaly is derived by the Q-function.
CN202010189746.7A 2020-03-18 2020-03-18 Construction method of urban traffic anomaly detection model Pending CN111653087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010189746.7A CN111653087A (en) 2020-03-18 2020-03-18 Construction method of urban traffic anomaly detection model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010189746.7A CN111653087A (en) 2020-03-18 2020-03-18 Construction method of urban traffic anomaly detection model

Publications (1)

Publication Number Publication Date
CN111653087A true CN111653087A (en) 2020-09-11

Family

ID=72348411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010189746.7A Pending CN111653087A (en) 2020-03-18 2020-03-18 Construction method of urban traffic anomaly detection model

Country Status (1)

Country Link
CN (1) CN111653087A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419710A (en) * 2020-10-22 2021-02-26 深圳云天励飞技术股份有限公司 Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A kind of traffic forecast method based on attention temporal diagram convolutional network
CN110224852A (en) * 2019-04-28 2019-09-10 中电长城网际安全技术研究院(北京)有限公司 Network security monitoring method and device based on HTM algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A kind of traffic forecast method based on attention temporal diagram convolutional network
CN110224852A (en) * 2019-04-28 2019-09-10 中电长城网际安全技术研究院(北京)有限公司 Network security monitoring method and device based on HTM algorithm

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419710A (en) * 2020-10-22 2021-02-26 深圳云天励飞技术股份有限公司 Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium
CN112419710B (en) * 2020-10-22 2022-07-26 深圳云天励飞技术股份有限公司 Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114220271B (en) Traffic flow prediction method, equipment and storage medium based on dynamic space-time diagram convolution circulation network
CN109145516B (en) Analog circuit fault identification method based on improved extreme learning machine
CN116010885A (en) Method and system for detecting abnormal space-time data of vehicle under long-sequence condition
CN105279964A (en) Road network traffic data completion method based on low-order algorithm
CN112766283B (en) Two-phase flow pattern identification method based on multi-scale convolution network
CN115273466B (en) Monitoring method and system based on flexible lane management and control algorithm
Son et al. Deep learning-based anomaly detection to classify inaccurate data and damaged condition of a cable-stayed bridge
CN110263944A (en) A kind of multivariable failure prediction method and device
CN115565369A (en) Hypergraph-based time-space hypergraph convolution traffic flow prediction method and system
CN117494871A (en) Ship track prediction method considering ship interaction influence
CN114882069A (en) Taxi track abnormity detection method based on LSTM network and attention mechanism
CN115146842A (en) Multivariate time series trend prediction method and system based on deep learning
CN114500004A (en) Anomaly detection method based on conditional diffusion probability generation model
WO2022188425A1 (en) Deep learning fault diagnosis method integrating prior knowledge
CN112488171A (en) Variable mode decomposition SRU fault prediction method
CN116756825A (en) Group structural performance prediction system for middle-small span bridge
CN116259172A (en) Urban road speed prediction method considering space-time characteristics of traffic network
CN114596726B (en) Parking berth prediction method based on interpretable space-time attention mechanism
CN111653087A (en) Construction method of urban traffic anomaly detection model
CN117689693A (en) Abnormal local track detection method and device based on graph comparison self-supervision learning
CN116400168A (en) Power grid fault diagnosis method and system based on depth feature clustering
Liyanage et al. Quickest freeway accident detection under unknown post-accident conditions
CN117675230A (en) Knowledge-graph-based oil well data integrity identification method
CN114611764A (en) Monitoring and early warning method for enterprise industrial water abnormity in specific area
Yao et al. Identification of Driving Heterogeneity using Action-chains

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200911

RJ01 Rejection of invention patent application after publication