CN113094422A - Urban road traffic flow chart generation method, system and equipment - Google Patents
Urban road traffic flow chart generation method, system and equipment Download PDFInfo
- Publication number
- CN113094422A CN113094422A CN202110273734.7A CN202110273734A CN113094422A CN 113094422 A CN113094422 A CN 113094422A CN 202110273734 A CN202110273734 A CN 202110273734A CN 113094422 A CN113094422 A CN 113094422A
- Authority
- CN
- China
- Prior art keywords
- traffic flow
- graph
- traffic
- map
- grained
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000010586 diagram Methods 0.000 claims abstract description 86
- 230000008569 process Effects 0.000 claims description 23
- 239000013598 vector Substances 0.000 claims description 18
- 230000004927 fusion Effects 0.000 claims description 13
- 230000007613 environmental effect Effects 0.000 claims description 11
- 238000000605 extraction Methods 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 6
- 238000012544 monitoring process Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000011176 pooling Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 101001095088 Homo sapiens Melanoma antigen preferentially expressed in tumors Proteins 0.000 description 1
- 102100037020 Melanoma antigen preferentially expressed in tumors Human genes 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000003475 lamination Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/26—Visual data mining; Browsing structured data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/042—Knowledge-based neural networks; Logical representations of neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A30/00—Adapting or protecting infrastructure or their operation
- Y02A30/60—Planning or developing urban green infrastructure
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Tourism & Hospitality (AREA)
- Analytical Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Educational Administration (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Remote Sensing (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a method, a system and equipment for generating an urban road traffic flow chart. The invention generates a third traffic flow characteristic diagram by inputting the traffic network characteristic diagram generated by the first encoder and the second traffic flow characteristic diagram generated by the second encoder into a decoder for decoding, and generates a fine-grained traffic flow diagram based on the first traffic flow characteristic diagram and the third traffic flow characteristic diagram. The invention generates the traffic network characteristic graph by the first encoder as the prior knowledge for generating the fine-grained traffic flow graph, and explicitly encodes the prior knowledge in the decoder, thereby fully playing the guiding role of the prior knowledge in generating the fine-grained traffic flow graph, fully exploiting the urban traffic flow distribution mode, and obtaining excellent performance and accuracy on the task of generating the high-definition urban traffic flow graph.
Description
Technical Field
The invention relates to the field of traffic, in particular to a method, a system and equipment for generating an urban road traffic flow chart.
Background
Urban traffic flow monitoring is an important component in smart city construction, and can provide an important information basis for public safety, city planning and early warning of other tasks. In modern information society, vehicles and infrastructure (e.g., traffic monitoring, air quality monitoring stations) are constantly generating vast amounts of urban data in heterogeneous formats, such as GPS track points, weather data, and the like.
Deep learning and data mining make these data important in exploring city dynamics patterns and performance predictions. But often fine grained actual city data is difficult to collect. For example, monitoring of urban traffic requires deployment of sufficient sensor equipment throughout the city, thousands of probes, circuit sensors, surveillance cameras and other monitoring equipment must be deployed on the traffic segments to monitor traffic flow and collect traffic data in real time. Real-time road traffic monitoring systems are highly dependent on these monitoring devices, and long-term stable operation requires a large amount of power resources and reliable disaster recovery capability, which would bring about huge costs and higher maintenance costs.
Nowadays, the development of smart cities is increasing day by day on a global scale, and the corresponding traffic flow monitoring cost is also increasing exponentially, which may become a key factor limiting further development. To solve this problem and to promote better development of smart city applications, a new approach is needed to reduce monitoring costs while ensuring granularity and accuracy of traffic flow data. Therefore, it is a matter of issue how to infer the original fine-grained flow distribution from the easily-obtained coarse-grained data.
In recent years, deep neural networks have been widely used for urban traffic data refinement reasoning. Existing research has mainly modeled this problem as a mapping problem that maps data with low entropy to data with high entropy. These efforts typically divide the study area into grid maps based on longitude and latitude coordinates and organize the collected traffic data into tensors for direct input into a convolutional network for automatic representation learning of the mapping. Some strategies also propose building spatial constraints between coarse-grained flow data and fine-grained flow data in order to learn a representation of spatial correlation.
However, existing methods ignore the importance of a priori knowledge to this problem, such as urban road networks, which have little significant change over a long period of time. Roads are an important component of urban traffic systems, and urban road networks are originally designed for vehicle travel, which means that most of the traffic flow will be generated on the roads. For example, a vehicle such as a bus is generally driven only on a specific road and is not present in a residential area. In the prior art, the influence of prior knowledge in the process of generating the high-fine-grained urban traffic flow graph is not fully considered, so that the accuracy of the generated high-fine-grained urban traffic flow graph is relatively poor.
In summary, in the prior art, the influence of prior knowledge in the process of generating a high-fine-grained urban traffic flow map is not fully considered, so that the technical problem that the accuracy of the generated high-fine-grained urban traffic flow map is poor exists.
Disclosure of Invention
The invention provides a method, a system and equipment for generating an urban road traffic flow graph, which introduce a traffic network characteristic graph as prior knowledge for generating a fine-grained traffic flow graph, thereby improving the accuracy of the fine-grained traffic flow graph.
In order to solve the above technical problem, an embodiment of the present invention provides a method for generating an urban road traffic flow chart, including the following steps:
acquiring a coarse-grained traffic flow map of a target area, environment data of the target area and a traffic map of the target area;
inputting the coarse-grained traffic flow graph and the traffic map into a first encoder for encoding to generate a traffic network characteristic graph;
generating a first traffic flow characteristic diagram based on the traffic network characteristic diagram, the environment data and the coarse-grained traffic flow diagram;
inputting the first traffic flow characteristic diagram into a second encoder for encoding to generate a second traffic flow characteristic diagram;
inputting the second traffic flow characteristic diagram and the traffic network characteristic diagram into a decoder for decoding to generate a third traffic flow characteristic diagram;
and generating a fine-grained traffic flow map based on the first traffic flow characteristic map and the third traffic flow characteristic map.
Preferably, the coarse-grained traffic flow graph and the traffic map are input into a first encoder for encoding, and the specific process of generating the traffic network feature graph is as follows:
generating a traffic road network map based on the traffic map;
weighting the traffic network graph and the coarse-grained traffic flow graph to obtain a weighted first traffic network graph, and inputting the first traffic network graph into a first encoder so that the first encoder encodes road features in the first traffic network graph to obtain a traffic network feature graph.
Preferably, the first encoder performs feature extraction on the first traffic network map, and the specific process of obtaining the traffic network feature map is as follows:
and the first encoder respectively performs horizontal convolution, vertical convolution, positive angle convolution and negative angle convolution on the first traffic network graph to generate horizontal features, vertical features, positive angle features and negative angle features, and a traffic network feature graph is obtained based on the horizontal features, the vertical features, the positive angle features and the negative angle features.
Preferably, the specific process of generating the first traffic flow characteristic map based on the traffic network characteristic map, the environment data and the coarse-grained traffic flow map is as follows:
converting the environment data into an environment factor embedded vector;
carrying out feature extraction on the traffic network feature graph to generate a traffic network feature graph;
and performing feature fusion on the road network feature map, the external factor embedded vector and the coarse-grained traffic flow map to generate a first traffic flow feature map.
Preferably, the specific process of performing feature fusion on the road network feature map, the external factor embedded vector and the coarse-grained traffic flow map to generate the first traffic flow feature map is as follows:
performing characteristic cascade on the external factor embedded vector and the coarse-grained traffic flow graph to obtain first cascade characteristics, and fusing the first cascade characteristics to obtain a primary characteristic graph of the traffic flow;
and performing characteristic cascade on the road network characteristic graph and the traffic flow primary characteristic graph to obtain second cascade characteristics, and fusing the second cascade characteristics to obtain the first traffic flow characteristic graph.
Preferably, the specific process of inputting the first traffic flow characteristic diagram into a second encoder for encoding and generating a second traffic flow characteristic diagram is as follows:
inputting the first traffic flow characteristic diagram into a second encoder, so that the second encoder encodes the first traffic flow characteristic diagram based on a multi-head attention mechanism, and a second traffic flow characteristic diagram is generated.
Preferably, the specific process of inputting the second traffic flow characteristic map and the traffic network characteristic map into a decoder for decoding to generate a third traffic flow characteristic map is as follows:
and taking the traffic network characteristic graph as an embedded code, inputting the embedded code and the second traffic flow characteristic graph into a decoder, and decoding the decoder based on a multi-head attention mechanism to obtain a third traffic flow characteristic graph.
Preferably, the specific process of generating the fine-grained traffic flow graph based on the first traffic flow feature graph and the third traffic flow feature graph is as follows:
and performing feature fusion on the first traffic flow feature map and the third traffic flow feature map to generate a fine-grained traffic flow map.
The embodiment of the invention also provides an urban road traffic flow graph generating system, which comprises a data acquisition module, a traffic network characteristic graph generating module, a first traffic flow characteristic graph generating module, a second traffic flow characteristic graph generating module, a third traffic flow characteristic graph generating module and a fine-grained traffic flow graph generating module;
the data acquisition module is used for acquiring a coarse-grained traffic flow map of a target area, environmental data of the target area and a traffic map of the target area;
the traffic network characteristic graph generating module is used for inputting the coarse-grained traffic flow graph and the traffic map into a first encoder for encoding to generate a traffic network characteristic graph;
the first traffic flow characteristic diagram generating module is used for generating a first traffic flow characteristic diagram based on the traffic network characteristic diagram, the environment data and the coarse-grained traffic flow diagram;
the second traffic flow characteristic diagram generating module is used for inputting the first traffic flow characteristic diagram into a second encoder for encoding to generate a second traffic flow characteristic diagram;
the third traffic flow characteristic diagram generating module is used for inputting the second traffic flow characteristic diagram and the traffic network characteristic diagram into a decoder for decoding to generate a third traffic flow characteristic diagram;
the fine-grained traffic flow map generating module is used for generating a fine-grained traffic flow map based on the first traffic flow characteristic map and the third traffic flow characteristic map.
The embodiment of the invention also provides urban road traffic flow chart generation equipment, which comprises a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the urban road traffic flow map generation method according to the instructions in the program codes.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, the traffic network characteristic diagram generated by the first encoder and the second traffic flow characteristic diagram generated by the second encoder are input into the decoder for decoding to generate the third traffic flow characteristic diagram, and the fine-grained traffic flow diagram is generated based on the first traffic flow characteristic diagram and the third traffic flow characteristic diagram. The embodiment of the invention fully exerts the guiding function of the prior knowledge in generating the fine-grained traffic flow graph by using the traffic network characteristic graph generated by the first encoder as the prior knowledge for generating the fine-grained traffic flow graph and explicitly encoding the prior knowledge in the decoder, fully explores the urban traffic flow distribution mode and can obtain excellent performance and accuracy on the task of generating the high-definition urban traffic flow graph.
Drawings
FIG. 1: the embodiment of the invention provides a flow chart of a method for generating an urban road traffic flow chart.
FIG. 2: the embodiment of the invention provides a schematic structural diagram of an urban road traffic flow chart generation model (RAFM).
FIG. 3: the embodiment of the invention provides a structural schematic diagram of a one-dimensional convolution layer in an urban road traffic flow chart generation model.
FIG. 4: the embodiment of the invention provides a schematic structural diagram of a one-dimensional residual module layer in an urban road traffic flow chart generation model.
FIG. 5: the embodiment of the invention provides a schematic structural diagram of an urban road traffic flow chart generation system.
FIG. 6: the embodiment of the invention provides a schematic structural diagram of urban road traffic flow chart generation equipment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flow chart of a method for generating an urban road traffic flow chart according to an embodiment of the present invention includes the following steps:
s101, acquiring a coarse-grained traffic flow map of a target area, environment data of the target area and a traffic map of the target area.
It should be further explained that, because environmental data such as weather, wind speed, temperature, time, etc. may have complex and important influence on urban traffic flow distribution, in this embodiment, the influence of the environmental data of the target area in the fine-grained traffic flow map generation process needs to be considered.
And S102, inputting the coarse-grained traffic flow graph and the traffic map into a first encoder for encoding to generate a traffic network characteristic graph, and using the traffic network characteristic graph as prior knowledge for generating a fine-grained traffic flow graph.
And S103, generating a first traffic flow characteristic diagram based on the traffic network characteristic diagram, the environment data and the coarse-grained traffic flow diagram.
The feature of the traffic network feature map, the environmental data, and the feature of the coarse-grained traffic flow map are fused to generate a first traffic flow feature map.
And S104, inputting the first traffic flow characteristic diagram into a second encoder for encoding to generate a second traffic flow characteristic diagram.
And S105, inputting the second traffic flow characteristic graph and the traffic network characteristic graph into a decoder for decoding, and explicitly coding the prior knowledge so as to generate a third traffic flow characteristic graph.
And S106, performing feature fusion on the first traffic flow feature map and the third traffic flow feature map to generate a fine-grained traffic flow map, namely the high-definition urban road traffic flow map.
The embodiment of the invention fully exerts the guiding function of the prior knowledge in generating the fine-grained traffic flow graph by using the traffic network characteristic graph generated by the first encoder as the prior knowledge for generating the fine-grained traffic flow graph and explicitly encoding the prior knowledge in the decoder, fully explores the urban traffic flow distribution mode and can obtain excellent performance and accuracy on the task of generating the high-definition urban traffic flow graph.
Example two
Before describing the method of the present embodiment in detail, some symbolic representations related to the present embodiment are first defined.
In this embodiment, the target area (e.g., city) is divided into I × J grid maps according to geographic longitude and latitude coordinates. The data granularity of the traffic flow graph is related to the area division, and a larger-size grid graph (each grid has a smaller actual size) can obtain a finer-granularity flow graph.
Representing the traffic flow data of grid (i, j) within t time interval as Is a binary real number set and represents the number of vehicles flowing in/out. Therefore, at a certain time interval, the traffic flow map of the whole study area can be expressed as
In the present embodiment, the coarse-grained indicates the granularity of data that can be obtained on the smallest-scale monitoring sensor, and the coarse-grained traffic flow map can be obtained by dividing the target area into an I × J grid map. In the same area, an NI multiplied by NJ grid diagram is adopted, and N is used as a scale factor, so that a corresponding fine-grained traffic flow diagram with high definition can be obtained. Each grid in the coarse-grained traffic flow graph is composed of corresponding NxN grids in the high-definition fine-grained traffic flow graph.
Let x(i,j)Value of a grid, y, as a coarse-grained traffic flow map(i′,j′) Representing that the grid corresponds to the NxN small grids on the high-definition fine-grained traffic flow chart, the following constraints exist:
wherein I belongs to [1, I ], J belongs to [1, J ]; i' is the number of incoming vehicles and the number of outgoing vehicles, respectively.
For a given coarse grain traffic flow mapAnd the scale factor N ∈ Z +, the goal of this embodiment is to deduce a fine-grained traffic flow chart with high definitionIt should be further noted that, in the present embodiment, an urban road traffic flow graph generation model (RAFM) is provided, and a structure of the model is shown in fig. 2, where the model is composed of four components, including a main reasoning branch, a Road Network Branch (RNB), a converter architecture (TR E-D), and an external factor fusion module (EM). Outputting high-definition fine-grained traffic flow graph by using trained RAFM modelThe process is as follows:
in this embodiment, a coarse-grained traffic flow map of a target area, environment data of the target area, and a traffic map of the target area are first obtained. It should be further explained that, in this embodiment, a real world traffic map of a target area (e.g., a city) is first obtained, and according to the urban traffic road labels, detailed classification of each road in the target area can be obtained. According to the actual driving scene of the researched vehicle (such as a taxi), roads which are most consistent with the driving conditions of the researched vehicle, such as expressways, trunks, secondary roads and the like, are reserved, and roads which are not frequently driven or are impossible to drive, such as small paths, railways, bicycle lanes and the like, are abandoned. Since the traffic map contains much information which is not related to tasks and needs to be further processed, a traffic network map is constructed by using geographic information software (such as Arcmap) as an auxiliary tool and rendering the shape of roads, wherein the roads are represented by different straight lines or curves. The width and shape of the lines may vary in the generated traffic network graph. For example, a road with a high traffic level will typically be rendered as a wide line, and a large circular road may be rendered as a circle.
For the convenience of subsequent processing, the coarse-grained traffic flow graph obtained when the target area is divided is regarded as a square (for example, a 16 × 16 grid graph), but a certain distortion exists when the coarse-grained traffic flow graph is matched with a real map, in order to make the traffic flow graph coincide with the coarse-grained traffic flow graph, the traffic flow graph needs to be subjected to size adjustment to eliminate the proportional distortion in longitude and latitude, and in order to further process, the rendered and adjusted traffic flow graph is converted into an inverted gray image of one channel, wherein a value on each pixel represents the existence degree of the road, so that a value of a pixel including the road is not zero, and a value of a pixel not including the road is zero.
In this embodiment, a traffic network feature map is generated by using a Road Network Branch (RNB) in a RAFM model, wherein the Road Network Branch (RNB) includes a first encoder and a residual network, and the process is as follows:
order toRepresenting a traffic network diagram, in order to eliminate trafficThe distribution difference between the road network graph and the actual traffic flow is weighted by using a coarse-grained traffic flow graph X, the average value of the coarse-grained traffic flow graph X on the 0 th dimension is firstly calculated, and then the coarse-grained traffic flow graph X is adjusted to be G-dimension by using a nearest neighbor interpolation methodoSame size:
Wherein,the characteristic point multiplication, inflow and outflow respectively represent the number of vehicles flowing in and the number of vehicles flowing out.
After the first traffic network graph is obtained, the road features in the first traffic network graph are fully encoded as a priori knowledge by a first encoder. The first encoder is composed of a one-dimensional convolution layer and two one-dimensional residual module layers, and a corresponding traffic network characteristic graph F is constructed by taking a first traffic network graph G as inputG。
In most cases, the convolution architecture uses a square filter kernel (e.g., 3 x 3) that has a square field of view, fitting into natural objects with well-defined boundaries and shapes. However, since urban roads are very different from natural objects, most roads are thin and long, if a conventional square kernel is continuously used, a large-sized filter kernel is required to cover a long road, which results in many pixels irrelevant to the road being extracted. And the one-dimensional filter is more accordant with the road shape, and can more effectively realize road feature extraction compared with the traditional convolution.
As shown in FIG. 3, a one-dimensional volumeThe lamination layer is composed of four groups of one-dimensional filters in four different directions connected together, so thatRepresenting a one-dimensional convolution filter of size 2r +1 with an input ofThe one-dimensional filter has four different direction identification vectors I ═ I (I)h,Iw) Kappa ofThe formula is as follows:
the direction identification vectors are respectively (0,1), (1,0), (1,1) and (1-1) used for horizontal convolution, vertical convolution, positive angle convolution and negative angle convolution. When r is 4, each one-dimensional filter has 9 parameters, which are the same as the 3 × 3 convolution filter. Therefore, 3 × 3 convolution can be replaced in the feature extraction process, the number of parameters of each group of one-dimensional filters is 1/4 of the number of parameters of the 3 × 3 filter, and the number of parameters and the calculation overhead are kept the same. After the horizontal feature, the vertical feature, the positive angle feature and the negative angle feature are generated, the four features are added and input into a one-dimensional residual module layer, as shown in fig. 4, the one-dimensional residual module layer comprises two convolution layers, each convolution layer is respectively followed by batch normalization, nonlinearity is introduced between the two convolution layers by using a ReLU function, and the output of the one-dimensional residual module is obtained to obtain a traffic network feature map FG。
After obtaining the environmental data of the target area, the RAFM model converts the external factor fusion module (EM) into an environmental factor embedded vector using the external factor fusion module (EM), specifically as follows:
the classifiable factors such as weather, day of week and time are respectively converted into low-dimensional vectors, and the low-dimensional vectors are respectively sent into different embedding layers and combined into a vectorMerging non-classifiable factors into a vectorAnd will beAndand connecting to obtain an environmental factor embedded vector:
wherein the external factor fusion module (EM) consists of two dense layers followed by dropout and ReLU functions. Inputting e into an external factor fusion module to obtain a characteristic diagram with the same size as the coarse-grained traffic flow diagram
Then, the RAFM model inputs the traffic network characteristic diagram, the environmental factor embedded vector and the coarse-grained traffic flow diagram into the main reasoning branch to generate a first traffic flow characteristic diagram, which is specifically as follows:
the coarse-grained traffic flow graph X is subjected to up-sampling by using bilinear interpolation and a scale factor N to obtain a coarse-grained traffic flow graph with the adjusted sizeThen X is put inupAnd FeAnd inputting the data after cascading into a main reasoning branch. In the main reasoning branch, one convolution layer is used for extracting low-level features, and then 16 residual modules with the same structure are used for constructing a first traffic flow feature map F. The method specifically comprises the following steps: embedding external factors into vectors and carrying out characteristic cascade on the coarse-grained traffic flow graph to obtain first cascade characteristics, and fusing the first cascade characteristics to obtain a primary characteristic graph of the traffic flow; characterizing road networksAnd performing characteristic cascade on the graph and the traffic flow primary characteristic graph to obtain second cascade characteristics, and fusing the second cascade characteristics to obtain a first traffic flow characteristic graph F.
After obtaining the first traffic flow characteristic graph F, the first traffic flow characteristic graph F and the traffic network characteristic graph F are combinedGThe input converter architecture (TR E-D), wherein it is further explained that the converter architecture (TR E-D) is a converter-based encoder-decoder architecture, comprising a converter encoder (TRE) and a converter decoder (TRD). The converter architecture (TR E-D) infers a high-definition fine-grained traffic flow graph from a priori knowledge and models the relationship between them. The converter architecture can use the entire fine-grained traffic flow graph as context to globally infer features in pairwise relationships by using a self-attention mechanism and a codec attention mechanism.
First traffic flow characteristic diagramIt is required to first become to have a proper resolution size by averaging the pooling layersTraffic network characteristic diagram FGIt is necessary to obtain F 'by the same conversion through the maximum pooling layer'G。
Each encoder layer in TRE is arranged as a standard structure consisting of one multi-headed self-attention module, according to the definition of the transducer structure. First, a 1 × 1 convolution reduces the channel dimension of F' from C to d, generating a new feature mapConstituting the input of TRE. Since TRE requires a sequence as input, F is takentThe two-dimensional space dimension of (1) is folded into the horizontal dimension for input flattening, thereby obtaining a feature map with the shape of d × HW. Since the TRE structure is not aligned, which means that the original two-dimensional input information is lost, in order to keep the relative position information of each pixel,spatial position coding is added at each multi-headed self-attention layer of the TRE. TRE encodes F' to obtain a second traffic flow characteristic diagram, and the second traffic flow characteristic diagram is transmitted to TRD.
The TRD also follows the standard architecture of the converter, but in this embodiment, the TRD uses a parallel architecture, decoding features in parallel at each decoder level, while the original transformer uses an autoregressive model, passing only once the spatial position code and once the output code at the input, so as to predict the output sequence one element at a time.
TRD receives the second traffic flow characteristic map transmitted by TRE and uses the traffic network characteristic map F'GAs embedded coding and added to the input of the attention layer of each decoder for perceptual learning, the coded result of TRE is passed into the TRD as context. And (4) carrying out TRD conversion on the third traffic flow characteristic diagram, namely the traffic flow characteristic diagram under the guidance of the urban road network.
And finally, inputting the first traffic flow characteristic diagram and the third traffic flow characteristic diagram into a convolution layer by the RAFM model for characteristic fusion to generate a fine-grained traffic flow diagram, namely a high-definition urban road traffic flow diagram.
It should be further noted that, in this embodiment, the RAFM model is implemented based on Python and PyTorch deep learning frameworks, the training of the RAFM model employs a random gradient descent optimizer, the momentum is 0.9, the initial learning rate is 3e-4, the filter weights of all layers are initialized by Xavier, and the RAFM model is optimized end-to-end by minimizing the mean absolute error (MAPE) between the inference result and the corresponding true value.
EXAMPLE III
As shown in fig. 5, an embodiment of the present invention further provides an urban road traffic flow graph generating system, where the system is configured to execute the above urban road traffic flow graph generating method, and includes a data obtaining module 201, a traffic network feature graph generating module 202, a first traffic flow feature graph generating module 203, a second traffic flow feature graph generating module 204, a third traffic flow feature graph generating module 205, and a fine-grained traffic flow graph generating module 206;
the data acquisition module 201 is configured to acquire a coarse-grained traffic flow map of a target area, environmental data of the target area, and a traffic map of the target area;
the traffic network feature map generation module 202 is configured to input the coarse-grained traffic flow map and the traffic map into a first encoder for encoding, so as to generate a traffic network feature map;
the first traffic flow characteristic map generating module 203 is configured to generate a first traffic flow characteristic map based on the traffic network characteristic map, the environment data, and the coarse-grained traffic flow map;
the second traffic flow characteristic map generating module 204 is configured to input the first traffic flow characteristic map into a second encoder for encoding, so as to generate a second traffic flow characteristic map;
the third traffic flow characteristic map generating module 205 is configured to input the second traffic flow characteristic map and the traffic network characteristic map into a decoder for decoding, so as to generate a third traffic flow characteristic map;
the fine-grained traffic flow map generation module 206 is configured to generate a fine-grained traffic flow map based on the first traffic flow feature map and the third traffic flow feature map.
As shown in fig. 6, the present embodiment further provides an urban road traffic flow map generating device 30, which includes a processor 300 and a memory 301;
the memory 301 is used for storing a program code 302 and transmitting the program code 302 to the processor;
the processor 300 is configured to execute the steps of one of the above-described embodiments of the urban road traffic flow map generation method according to the instructions in the program code 302.
Illustratively, the computer program 302 may be partitioned into one or more modules/units that are stored in the memory 301 and executed by the processor 300 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 302 in the terminal device 30.
The terminal device 30 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 300, a memory 301. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 30, and does not constitute a limitation of terminal device 30, and may include more or fewer components than shown, or some components in combination, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 300 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 301 may be an internal storage unit of the terminal device 30, such as a hard disk or a memory of the terminal device 30. The memory 301 may also be an external storage device of the terminal device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 30. Further, the memory 301 may also include both an internal storage unit and an external storage device of the terminal device 30. The memory 301 is used for storing the computer program and other programs and data required by the terminal device. The memory 301 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.
Claims (10)
1. A method for generating an urban road traffic flow chart is characterized by comprising the following steps:
acquiring a coarse-grained traffic flow map of a target area, environment data of the target area and a traffic map of the target area;
inputting the coarse-grained traffic flow graph and the traffic map into a first encoder for encoding to generate a traffic network characteristic graph;
generating a first traffic flow characteristic diagram based on the traffic network characteristic diagram, the environment data and the coarse-grained traffic flow diagram;
inputting the first traffic flow characteristic diagram into a second encoder for encoding to generate a second traffic flow characteristic diagram;
inputting the second traffic flow characteristic diagram and the traffic network characteristic diagram into a decoder for decoding to generate a third traffic flow characteristic diagram;
and generating a fine-grained traffic flow map based on the first traffic flow characteristic map and the third traffic flow characteristic map.
2. The method as claimed in claim 1, wherein the coarse-grained traffic flow map and the traffic map are inputted into a first encoder for encoding, and the specific process of generating the traffic network feature map is as follows:
generating a traffic road network map based on the traffic map;
weighting the traffic network graph and the coarse-grained traffic flow graph to obtain a weighted first traffic network graph, and inputting the first traffic network graph into a first encoder so that the first encoder encodes road features in the first traffic network graph to obtain a traffic network feature graph.
3. The method for generating an urban road traffic flow graph according to claim 2, wherein the first encoder performs feature extraction on the first traffic network graph, and the specific process of obtaining the traffic network feature graph is as follows:
and the first encoder respectively performs horizontal convolution, vertical convolution, positive angle convolution and negative angle convolution on the first traffic network graph to generate horizontal features, vertical features, positive angle features and negative angle features, and a traffic network feature graph is obtained based on the horizontal features, the vertical features, the positive angle features and the negative angle features.
4. The method for generating an urban road traffic flow graph according to claim 1, wherein the specific process of generating the first traffic flow feature graph based on the traffic network feature graph, the environmental data and the coarse-grained traffic flow graph is as follows:
converting the environment data into an environment factor embedded vector;
carrying out feature extraction on the traffic network feature graph to generate a traffic network feature graph;
and performing feature fusion on the road network feature map, the external factor embedded vector and the coarse-grained traffic flow map to generate a first traffic flow feature map.
5. The method for generating the urban road traffic flow graph according to claim 4, wherein the specific process of generating the first traffic flow feature graph by performing feature fusion on the road network feature graph, the external factor embedded vector and the coarse-grained traffic flow graph comprises the following steps:
performing characteristic cascade on the external factor embedded vector and the coarse-grained traffic flow graph to obtain first cascade characteristics, and fusing the first cascade characteristics to obtain a primary characteristic graph of the traffic flow;
and performing characteristic cascade on the road network characteristic graph and the traffic flow primary characteristic graph to obtain second cascade characteristics, and fusing the second cascade characteristics to obtain the first traffic flow characteristic graph.
6. The method for generating the urban road traffic flow graph according to claim 1, wherein the first traffic flow characteristic graph is input into a second encoder for encoding, and the specific process for generating the second traffic flow characteristic graph comprises the following steps:
inputting the first traffic flow characteristic diagram into a second encoder, so that the second encoder encodes the first traffic flow characteristic diagram based on a multi-head attention mechanism, and a second traffic flow characteristic diagram is generated.
7. The method for generating an urban road traffic flow graph according to claim 1, wherein the specific process of inputting the second traffic flow feature graph and the traffic network feature graph into a decoder for decoding to generate a third traffic flow feature graph comprises:
and taking the traffic network characteristic graph as an embedded code, inputting the embedded code and the second traffic flow characteristic graph into a decoder, and decoding the decoder based on a multi-head attention mechanism to obtain a third traffic flow characteristic graph.
8. The method for generating the urban road traffic flow graph according to claim 1, wherein a specific process of generating a fine-grained traffic flow graph based on the first traffic flow feature graph and the third traffic flow feature graph is as follows:
and performing feature fusion on the first traffic flow feature map and the third traffic flow feature map to generate a fine-grained traffic flow map.
9. An urban road traffic flow graph generation system, which is used for executing the urban road traffic flow graph generation method according to any one of claims 1 to 8, and comprises a data acquisition module, a traffic network feature graph generation module, a first traffic flow feature graph generation module, a second traffic flow feature graph generation module, a third traffic flow feature graph generation module and a fine-grained traffic flow graph generation module;
the data acquisition module is used for acquiring a coarse-grained traffic flow map of a target area, environmental data of the target area and a traffic map of the target area;
the traffic network characteristic graph generating module is used for inputting the coarse-grained traffic flow graph and the traffic map into a first encoder for encoding to generate a traffic network characteristic graph;
the first traffic flow characteristic diagram generating module is used for generating a first traffic flow characteristic diagram based on the traffic network characteristic diagram, the environment data and the coarse-grained traffic flow diagram;
the second traffic flow characteristic diagram generating module is used for inputting the first traffic flow characteristic diagram into a second encoder for encoding to generate a second traffic flow characteristic diagram;
the third traffic flow characteristic diagram generating module is used for inputting the second traffic flow characteristic diagram and the traffic network characteristic diagram into a decoder for decoding to generate a third traffic flow characteristic diagram;
the fine-grained traffic flow map generating module is used for generating a fine-grained traffic flow map based on the first traffic flow characteristic map and the third traffic flow characteristic map.
10. An urban road traffic flow chart generation device is characterized by comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the urban road traffic flow map generation method of any one of claims 1 to 8 according to instructions in the program code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110273734.7A CN113094422B (en) | 2021-03-12 | 2021-03-12 | Urban road traffic flow map generation method, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110273734.7A CN113094422B (en) | 2021-03-12 | 2021-03-12 | Urban road traffic flow map generation method, system and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113094422A true CN113094422A (en) | 2021-07-09 |
CN113094422B CN113094422B (en) | 2023-07-07 |
Family
ID=76667160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110273734.7A Active CN113094422B (en) | 2021-03-12 | 2021-03-12 | Urban road traffic flow map generation method, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113094422B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116206443A (en) * | 2023-02-03 | 2023-06-02 | 重庆邮电大学 | Traffic flow data interpolation method based on time-space road network pixelized representation |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020082767A1 (en) * | 1999-03-08 | 2002-06-27 | Telquest, Ltd. | Method and system for mapping traffic congestion |
CN107170236A (en) * | 2017-06-14 | 2017-09-15 | 中山大学 | A kind of important intersection extracting method of road network based on floating car data |
CN107958246A (en) * | 2018-01-17 | 2018-04-24 | 深圳市唯特视科技有限公司 | A kind of image alignment method based on new end-to-end human face super-resolution network |
CN112288701A (en) * | 2020-10-23 | 2021-01-29 | 西安科锐盛创新科技有限公司 | Intelligent traffic image detection method |
-
2021
- 2021-03-12 CN CN202110273734.7A patent/CN113094422B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020082767A1 (en) * | 1999-03-08 | 2002-06-27 | Telquest, Ltd. | Method and system for mapping traffic congestion |
CN107170236A (en) * | 2017-06-14 | 2017-09-15 | 中山大学 | A kind of important intersection extracting method of road network based on floating car data |
CN107958246A (en) * | 2018-01-17 | 2018-04-24 | 深圳市唯特视科技有限公司 | A kind of image alignment method based on new end-to-end human face super-resolution network |
CN112288701A (en) * | 2020-10-23 | 2021-01-29 | 西安科锐盛创新科技有限公司 | Intelligent traffic image detection method |
Non-Patent Citations (1)
Title |
---|
GUANBIN LI ETC: "Deep Contrast Learning for Salient Object Detection", COMPUTER VISION FOUNATION, pages 478 - 487 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116206443A (en) * | 2023-02-03 | 2023-06-02 | 重庆邮电大学 | Traffic flow data interpolation method based on time-space road network pixelized representation |
CN116206443B (en) * | 2023-02-03 | 2023-12-15 | 重庆邮电大学 | Traffic flow data interpolation method based on time-space road network pixelized representation |
Also Published As
Publication number | Publication date |
---|---|
CN113094422B (en) | 2023-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ali et al. | Leveraging spatio-temporal patterns for predicting citywide traffic crowd flows using deep hybrid neural networks | |
Yang et al. | MF-CNN: traffic flow prediction using convolutional neural network and multi-features fusion | |
Zissis et al. | A cloud based architecture capable of perceiving and predicting multiple vessel behaviour | |
Awan et al. | Modeling dynamic spatio-temporal correlations for urban traffic flows prediction | |
CN115578702B (en) | Road element extraction method and device, electronic equipment, storage medium and vehicle | |
Zou et al. | Long-term origin-destination demand prediction with graph deep learning | |
CN115424059B (en) | Remote sensing land utilization classification method based on pixel level contrast learning | |
WO2017200889A1 (en) | Classifying entities in digital maps using discrete non-trace positioning data | |
CN112954399A (en) | Image processing method and device and computer equipment | |
Zang et al. | Traffic flow data prediction using residual deconvolution based deep generative network | |
CN115965970A (en) | Method and system for realizing bird's-eye view semantic segmentation based on implicit set prediction | |
CN117079148A (en) | Urban functional area identification method, device, equipment and medium | |
CN113962460B (en) | Urban fine granularity flow prediction method and system based on space-time comparison self-supervision | |
CN116258859A (en) | Semantic segmentation method, semantic segmentation device, electronic equipment and storage medium | |
Rahman et al. | Attention based deep hybrid networks for traffic flow prediction using google maps data | |
CN113094422B (en) | Urban road traffic flow map generation method, system and equipment | |
Liu et al. | Road network-guided fine-grained urban traffic flow inference | |
CN114445624A (en) | Fine-grained traffic accident risk identification method in urban geographic space | |
Kim et al. | Resolution reconstruction of climate data with pixel recursive model | |
Du et al. | IMG2HEIGHT: height estimation from single remote sensing image using a deep convolutional encoder-decoder network | |
Xu et al. | High-resolution urban flows forecasting with coarse-grained spatiotemporal data | |
Yao et al. | TL-detector: Lightweight based real-time traffic light detection model for intelligent vehicles | |
CN115773744A (en) | Model training and road network processing method, device, equipment, medium and product | |
Zhao et al. | Effective recognition of word-wheel water meter readings for smart urban infrastructure | |
CN114429524A (en) | Construction method and detection method of three-dimensional target detection model under monocular vision |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |