A spatiotemporal traffic prediction method based on multi-dimensional features of visual sampling
Through visual sampling and multi-dimensional feature spatiotemporal traffic prediction methods, heterogeneous traffic flows are quantified and road anomalies are detected, and a scalable model is constructed. This solves the shortcomings of existing methods in dealing with heterogeneous traffic flows and non-periodic anomalies and achieves more efficient traffic flow prediction.
Patent Information
- Application Number
- CN202411099798.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing traffic flow prediction methods cannot accurately predict when dealing with heterogeneous traffic flows and non-periodic anomalies, especially due to the large increase in computational complexity and the inability to effectively handle complex network topologies and high node connectivity.
A multi-dimensional feature spatiotemporal traffic flow prediction method based on visual sampling is adopted. Heterogeneous traffic flow is quantified through visual sampling. Combined with road anomaly characteristics, a scalable multi-dimensional prediction model is constructed, including a time series module, a spatial module and a multi-dimensional feature module. A deep learning network is used to integrate traffic information, detect and quantify anomalies, and improve prediction accuracy.
It achieves accurate prediction of heterogeneous traffic flows and non-periodic anomalies, improves the accuracy of traffic flow prediction, maintains computational efficiency in complex networks, and can be expanded to more dimensional features to enhance prediction accuracy.
Smart Images

Figure CN119068671B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a multi-dimensional feature spatiotemporal flow prediction method based on visual sampling. Background Art
[0002] Accurate traffic flow forecasting is a key component of the development of modern intelligent transportation systems. Traffic flow forecasting typically relies on current and historical traffic data to predict future traffic volumes. Most existing traffic flow forecasting methods assume uniform traffic conditions and infer future traffic flows based on spatiotemporal data. In real-world environments, road traffic systems are complex dynamic networks composed of heterogeneous traffic participants, including different types of motor vehicles, non-motor vehicles, and pedestrians. Especially under conditions of road congestion, the microscopic characteristics of these heterogeneous participants influence the dynamics of the overall traffic flow. Furthermore, traffic flow data can be viewed as a collection of both periodic and aperiodic (abnormal) data. Periodicity is primarily manifested in the regular repetitive patterns of traffic flow data on timescales such as daily, weekly, and seasonal. Aperiodicity, on the other hand, manifests in the randomness and irreproducibility caused by unexpected conditions such as congestion, accidents, and road construction. Currently, most research focuses on the temporal periodicity of traffic flow data, employing sequence models to model spatial dependencies. However, such models often fail to handle heterogeneous traffic flows and aperiodic anomalies, resulting in inaccurate traffic flow forecasts.
[0003] Furthermore, most previous spatiotemporal prediction methods use a combination of recurrent neural networks and graph convolution. Learning graph structures based on GNNs requires aggregating and updating all nodes at each layer. This significantly increases computational complexity as the number of road nodes increases, especially when the network topology is complex or node connectivity is high. This is extremely unfavorable for incorporating multidimensional features. Summary of the Invention
[0004] To overcome the shortcomings of existing traffic flow prediction methods in handling heterogeneous traffic flows and non-periodic anomalies, this paper proposes a multi-dimensional spatiotemporal traffic flow prediction method based on visual sampling. This method quantifies heterogeneous traffic flows through visual sampling and combines road anomaly characteristics to achieve accurate traffic flow prediction.
[0005] In order to solve the above technical problems, the technical solution of the present invention is:
[0006] A multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling includes the following steps:
[0007] Step 1: Obtain the traffic flow information matrix F and the spatial matrix G based on historical traffic flow data;
[0008] Step 2: Obtain visual data and estimate the mixing rate M of different vehicle types in traffic flow based on the visual data to obtain the mixing rate feature matrix
[0009] Step 3: Detect and quantify traffic anomalies to obtain traffic anomaly feature matrix
[0010] Step 4: constructing an extensible multidimensional prediction model, wherein the extensible multidimensional prediction model includes a time series module, a spatial module, and an extensible multidimensional feature module;
[0011] Step 5: Integrate traffic flow information, traffic anomaly characteristics, and mixing rate characteristics into a comprehensive traffic information matrix X = [F, M, U], and define the traffic flow prediction problem as learning a mapping function f, using the historical traffic information and road network structure of the past P steps to predict the traffic flow in the next Q steps through a scalable multidimensional prediction model.
[0012] Preferably, the space matrix is expressed as in, Represents a set of road intersections, and each road intersection is regarded as a node. N represents the number of nodes, ε is the set of all roads; the traffic flow information matrix is expressed as Where T represents the number of time steps.
[0013] Preferably, the specific method of step 2 is:
[0014] set up Indicates that at time t, at node v n At position, the number of vehicle types is k, then at time t, the node position v n The mixing rate of vehicle type k at The calculation is as follows:
[0015]
[0016] Where K is the total number of vehicle types, Represents the node v at time t n The above formula calculates the proportion of type k vehicles relative to the total number of vehicles observed at time t;
[0017] The mixing rate data It is expressed as follows:
[0018]
[0019] M n =[M n,1 , M n,2 ,...,Mn,T ]
[0020] M=[M1,M2,…,M N ] T
[0021] Among them, M n,t Indicates that at time t, at node v n The proportion of various types of vehicles, M n Indicates that during the time period of time series length T, node v n is the mixing rate of various vehicle types, and N is the number of nodes.
[0022] Preferably, the step 2 further includes embedding the node traffic information into the matrix Mix-in rate feature embedding matrix and graph embedding matrix Splicing, input to the mixing rate fusion module composed of multi-layer MLP, and obtain the node mixing rate hidden representation Represented as, where D represents the embedding dimension:
[0023] H M =MLPs(F emb ||M emb ||G0)
[0024] Preferably, the method for detecting traffic anomalies is:
[0025] Obtain continuous monitoring footage of vehicles on the road, use YOLOv8 for instance segmentation to obtain the vehicles in the image, and extract the features of the vehicles by using OSNet as a feature extractor;
[0026] Let A and B represent feature vectors capturing the same vehicle from consecutive frames. The cosine distance is used to measure the similarity between these feature vectors, which is defined as:
[0027]
[0028] Based on the similarity metric, the cosine distance dist(A, B) = 1-cos(A, B) is calculated. If dist(A, B) ≤ κ, that is, the cosine distance is lower than the predefined threshold κ = 0.3, it is inferred that the two feature vectors represent the same vehicle, indicating that a traffic anomaly has occurred. From this, we construct the anomaly indication matrix
[0029]
[0030] Preferably, the traffic anomaly quantification method is:
[0031] First, define the standard time interval T required for vehicles to pass a specific road section under normal traffic flow conditions. norm ;
[0032] Then, record the time interval T required for the vehicle to pass the same road section under actual traffic conditions. act , the calculation formula is T act =t i+n -t i , where t i and T i+n They represent the detection time points of the vehicle in consecutive frames respectively;
[0033] Based on the above definition, the delay time Δ is further calculated t , and its calculation formula is:
[0034] Δ t =T act -T norm
[0035] Introduced the delay severity index S delay ;
[0036] According to the abnormal indicator matrix and the degree of delay caused by abnormalities (S delay The node where the exception occurs is represented as Where i represents the degree of delay caused by the anomaly, and j-hop represents the propagation range of the anomaly in the network, thus constructing an anomaly matrix based on severity N represents the number of nodes, and T represents the length of the time series.
[0037] Preferably, the delay severity index S delay It is defined as a piecewise function, where p is a positive integer representing the level of delay:
[0038]
[0039] Among them, Fib (p) is the pth value of the Fibonacci sequence. p∈(3,q), q is the number of levels of delay. (max) Represents a larger value in the Fibonacci sequence, where max is greater than q.
[0040] As a preference, in step 3, when quantifying traffic anomalies, an anomaly embedding matrix is learned according to different anomaly degrees and different propagation ranges. To represent the severity and spatial range of the anomaly, where I represents the severity of the anomaly and J represents the number of hop connections. Then, the information of the anomaly embedding matrix is used to update the traffic anomaly feature matrix U, which is expressed as follows:
[0041]
[0042] As an advantage, the step 3 further includes embedding the node traffic information into the matrix F emb , abnormal feature embedding matrix It is concatenated with the graph embedding matrix G0 and input into the abnormal fusion module composed of multi-layer MLP to obtain the abnormal hidden representation of the node. Where D represents the embedding dimension, the expression is:
[0043] H U =MLPs(F emb ||U′ emb || G0) As a preference, in step 5, the method for predicting traffic flow using a scalable multidimensional prediction model is:
[0044] The time series module uses historical traffic data to embed F emb Time information is embedded in T emb , through the time fusion process T fus =Fusion(F emb ||T emb ) Fusing historical traffic information with time information to ensure temporal continuity and relevance of feature representation;
[0045] The spatial module obtains a graph embedding matrix G0 using a predefined graph;
[0046] The scalable multi-dimensional feature module sets different embedding layers corresponding to traffic anomaly features and mixing rate features, such as mixing rate and abnormal traffic conditions. These embeddings are then fused in their respective streams (anomaly fusion and mixing rate fusion) to form their respective hidden representations, such as the mixing rate hidden representation H M , abnormal hidden representation H U Finally, multiple hidden features are concatenated to form a comprehensive feature H features =concat(H M , H U ,...,H other ).
[0047] The final prediction output is generated by a mapping function trained by a deep learning network. The structure of the deep learning network consists of an encoder module and a regression layer R. The encoder module and the regression layer integrate the data from all three model parts and are expressed as:
[0048]
[0049] Among them, || represents the connection of feature sets, Encoder represents multi-layer residual MLP, and R represents the regression function.
[0050] The present invention has the following characteristics and beneficial effects:
[0051] (1) Quantify heterogeneous traffic flows through visual sampling methods and analyze the mutual influence between different vehicle types from a micro perspective, thereby improving the accuracy of traffic flow prediction.
[0052] (2) A road anomaly detection and modeling method is proposed. This method not only detects whether an anomaly occurs on the road and its severity, but also incorporates these anomaly features into the model and analyzes their impact on traffic flow to improve the performance of non-periodic traffic flow prediction.
[0053] (3) We propose a scalable multi-dimensional feature prediction model that integrates heterogeneous traffic information and non-periodic anomalies without adding additional computational burden. This design enables the model to be extended to more dimensional features, further improving the accuracy of predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 Schematic diagram of the end-to-end network structure of the multi-dimensional prediction model of the present invention. DETAILED DESCRIPTION
[0056] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings.
[0058] On the contrary, the present invention covers any alternatives, modifications, equivalents, and solutions that fall within the spirit and scope of the present invention as defined by the claims. Furthermore, to facilitate a better understanding of the present invention, certain specific details are described in detail below in the detailed description of the present invention. Those skilled in the art will be able to fully understand the present invention without these details.
[0059] The present invention provides a multi-dimensional feature spatiotemporal flow prediction method based on visual sampling, such as Figure 1 As shown, the following steps are included:
[0060] Step 1: Based on historical traffic flow data, obtain the traffic flow information matrix F and the spatial matrix G
[0061] Specifically, the space matrix is expressed as G represents a directed graph of a road network, where v represents a set of road intersections. Furthermore, each road intersection is considered as a node. N represents the number of nodes, and ε is the set of all roads. The traffic flow information matrix is expressed as Where T represents the number of time steps. The mixing rate information matrix is expressed as K is the total number of vehicle types, and the road anomaly information matrix is expressed as Assume that C represents the number of feature dimensions, the comprehensive traffic information matrix It can be expressed as:
[0062] X = [F, M, U]
[0063] It can be understood that the traffic flow prediction problem is defined as learning a mapping function f, using the historical traffic information and road network structure of the past P steps to predict the traffic flow in the future Q steps, which can be expressed as:
[0064] f([X (t-P):t , G])→X (t+1):(t+Q)
[0065] Step 2: Obtain visual data and estimate the mixing rate M of different vehicle types in traffic flow based on the visual data to obtain the mixing rate feature matrix
[0066] Quantifying heterogeneous traffic flow differs from homogeneous traffic flow in that it requires identifying the specific type of each vehicle to determine the impact of different vehicle types on traffic flow.
[0067] Specifically, we first collect visual data of traffic scenes, such as images or video footage captured by surveillance cameras. This visual data contains information about the different types and numbers of vehicles in the traffic flow. We then use an object detection model to detect and classify the types and numbers of vehicles in this visual data, thereby quantifying the composition of the traffic flow in terms of different vehicle types.
[0068] set up Indicates that at time t, at node v n At the position, the number of vehicles is k. Then at time t, the node position v n The mixing rate of vehicle type i at The calculation is as follows:
[0069]
[0070] Where K is the total number of vehicle types, Represents the node v at time t n The sum of the number of vehicles of various types at time t is calculated by the above formula to calculate the proportion of type k vehicles relative to the total number of vehicles observed at time t. It is expressed as follows:
[0071]
[0072] M n =[M n,1 ,M n,2 ,...,M n,T ]
[0073] M=[M1,M2,...,M N ] T
[0074] Among them, M n,t Indicates that at time t, at node v n The proportion of various types of vehicles, M n Indicates that during the time period of time series length T, node v n is the mixing rate of various vehicle types, and N is the number of nodes.
[0075] This embodiment incorporates the calculated mixing rates into a scalable multi-dimensional prediction model, so that their impact on traffic congestion, flow patterns and overall system performance can be analyzed. Mix-in rate feature embedding matrix and graph embedding matrix Splicing, input into the mixing rate fusion module composed of multiple layers of MLP, and obtain the hidden representation of node mixing rate Where D represents the embedding dimension, the expression is:
[0076] H M =MLPs(F emb ||M emb ||G0)
[0077] In the above technical solution, the method of this embodiment provides a more accurate and adaptive representation of traffic flow dynamics by dynamically estimating the blending rate through visual data analysis. This enables a better understanding and prediction of traffic behavior, thereby promoting more effective traffic management and optimization strategies.
[0078] It is understandable that different types of vehicles have different impacts on traffic flow. Generally, large vehicles are longer and wider than small vehicles, and have a greater impact on road traffic flow. The mixing rate of large vehicles is one of the important parameters for evaluating road safety and traffic congestion. The uneven distribution of traffic flow states in different areas of the road network reflects the changes in traffic flow composition, which is an important feature that cannot be ignored. Therefore, this embodiment proposes a method for estimating the mixing rate in traffic flow through visual data analysis. Due to sensor limitations, traditional methods often ignore the mixing characteristics of different types of vehicles, which may not accurately capture the dynamic characteristics of traffic flow. This method solves this limitation by utilizing visual data analysis technology to dynamically calculate the mixing rate, taking into account the real-time changes in vehicle composition.
[0079] Step 3: Detect and quantify traffic anomalies to obtain traffic anomaly feature matrix
[0080] In this embodiment, the traffic anomaly detection task is framed as a vehicle re-identification problem. When a traffic anomaly occurs, such as a vehicle suddenly coming to a complete stop, it can be detected by identifying the same vehicle in consecutive surveillance images. YOLOv8 is used for instance segmentation to obtain the vehicles in the image, and OSNet is used as a feature extractor to extract the features of the vehicles to obtain a robust representation of individual vehicles in the surveillance image. Let A and B represent the feature vectors that capture the same vehicle from consecutive frames. We use the cosine distance to measure the similarity between these feature vectors, which is defined as:
[0081]
[0082] Based on this similarity measure, the cosine distance dist(A, B) = 1-cos(A, B) is calculated. If dist(A, B) ≤ κ, that is, the cosine distance is lower than the predefined threshold κ = 0.3, it is inferred that the two feature vectors represent the same vehicle, indicating that a traffic anomaly has occurred. From this, we construct the anomaly indication matrix The expression is:
[0083]
[0084] Furthermore, in order to quantify the impact of traffic anomalies on vehicle travel time, a delay time quantification method based on vehicle travel time differences is proposed. This method evaluates the degree of delay caused by traffic anomalies by comparing the appearance time of vehicles in consecutive monitoring frames. First, the standard time interval T required for vehicles to pass a specific road section under normal traffic flow conditions is defined. norm Then, record the time interval T required for the vehicle to pass the same road section under actual traffic conditions. act , the calculation formula is T act =t i+n-t i , where t i and t i+n Represent the detection time points of the vehicle in consecutive frames. Based on the above definition, the delay time Δ is further calculated t , and its calculation formula is:
[0085] Δ t =T act -T norm
[0086] Understandably, the delay time Δ t The value of reflects the change in the vehicle's travel time under abnormal conditions relative to normal conditions. In order to quantify this change into an evaluable indicator, this embodiment introduces the delay severity index S delay This indicator is based on the delay time Δ t With normal time interval T norm The ratio of the delay severity to the expected delay is used to classify the delay severity into multiple levels. Since the logarithmic growth pattern of the Fibonacci sequence is closely related to the nonlinear increase in the effect of traffic congestion, the threshold is defined as the Fibonacci sequence value normalized by the maximum expected delay to create a scalable severity measure.
[0087] Specifically, define S delay is a piecewise function, where p is a positive integer representing the level of delay:
[0088]
[0089] Among them, Fib (p) is the pth value of the Fibonacci sequence. p∈(3,q), q is the number of levels of delay. (max) Represents a larger value in the Fibonacci sequence, where max is greater than q. It is used to normalize the Fibonacci number to define the delay severity threshold.
[0090] On this basis, according to the abnormal indication matrix U id The node where the abnormality occurs is represented by Where i represents the degree of delay caused by the anomaly, and j-hop represents the propagation range of the anomaly in the network, thus constructing an anomaly matrix based on severity According to different degrees of heterogeneity and different propagation ranges, an abnormal embedding matrix is learned to represent the severity and spatial range of the anomaly, where I represents the anomaly severity number (number of delay levels) and J represents the number of hop connections.
[0091]
[0092] The information of the anomaly embedding matrix is used to update the severity-based anomaly matrix U to obtain the anomaly feature matrix U′, allowing the model to self-learn the severity and diffusion range of the anomaly, thereby more accurately modeling the anomaly dependency and its impact on traffic flow.
[0093] Embed node traffic information into matrix F emb , abnormal feature embedding matrix It is concatenated with the graph embedding matrix G0 and input into the abnormal fusion module composed of multi-layer MLP to obtain the abnormal hidden representation of the node. Where D represents the embedding dimension, the expression is:
[0094] H U =MLPs(F emb ||U′ emb ||G0)
[0095] By combining vehicle re-identification technology with severity-based anomaly embedding, our approach achieves more accurate and fine-grained traffic anomaly detection, facilitates proactive traffic management, and supports effective congestion resolution.
[0096] It should be noted that this example proposes a novel approach to detecting traffic anomalies and modeling their severity. Traditional anomaly detection methods often rely on simple heuristics or predefined thresholds, which may not accurately capture the complexity of traffic anomalies. Our approach addresses this issue by leveraging vehicle re-identification techniques and severity-based anomaly embedding, achieving more accurate and fine-grained anomaly detection.
[0097] Step 4: Construct an extensible multidimensional prediction model, wherein the extensible multidimensional prediction model includes a time series module, a space module, and an extensible multidimensional feature module.
[0098] Specifically, such as Figure 1 As shown in the figure, it includes three parts: time series module, space module and extensible multi-dimensional feature module.
[0099] Understandably, most previous spatiotemporal prediction methods employ a combination of recurrent neural networks and graph convolution. Learning graph structures based on GNNs requires aggregating and updating all nodes at each layer. This significantly increases computational complexity as the number of road nodes increases, especially when the network topology is complex or node connectivity is high. This is extremely detrimental to the inclusion of multidimensional features. Therefore, this embodiment employs a graph-like embedding approach to address this issue.
[0100] It's important to note that the time series module fuses traffic flow information with time information, the spatial module embeds predefined graphs, and the scalable multidimensional feature module fuses other features, such as mixing rate and anomalies, with traffic flow and spatial information within their respective flows to form their own signatures. All three modules are composed of multi-layer MLPs.
[0101] Step 5: Integrate traffic flow information, mixing rate characteristics, and traffic anomaly characteristics into a comprehensive traffic information matrix X = [F, M, U], and define the traffic flow prediction problem as learning a mapping function f, using the historical traffic information and road network structure of the past P steps to predict the traffic flow in the next Q steps through a scalable multidimensional prediction model.
[0102] The time series module uses historical traffic data to embed the matrix F emb Time information embedding matrix T emb , through the time fusion process T fus =Fusion(F emb ||T emb ) fuses historical traffic information with time information to ensure the temporal continuity and relevance of feature representation.
[0103] The spatial module is central to handling spatial dependencies. It uses a predefined graph to generate a graph embedding matrix, G0. Graph adaptability is crucial to maintaining computational feasibility and accuracy, especially as the number of nodes representing road intersections or segments increases. This graph embedding is used to encode spatial relationships, thereby supporting subsequent prediction tasks.
[0104] The scalable multi-dimensional feature module is used to seamlessly integrate multiple feature dimensions. It includes different embedding layers for each feature type, which in this example includes mixing rate and traffic anomaly. These embeddings are then fused in their respective streams (anomaly fusion and mixing rate fusion) to form their respective hidden representations, such as the mixing rate hidden representation H M , abnormal hidden representation H U Finally, multiple hidden features are concatenated to form a comprehensive feature H features =concat(H M , H U ,...,H other ), which enhances the model's predictive capabilities in various scenarios.
[0105] The final prediction output is generated by a mapping function trained by a deep learning network. The structure of the deep learning network consists of an encoder module and a regression layer R. The encoder module and the regression layer integrate the data from all three model parts and are expressed as:
[0106]
[0107] Among them, || represents the connection of feature sets, Encoder represents multi-layer residual MLP, and R represents the regression function.
[0108] By integrating these parts, the proposed model not only solves the problem of exponentially growing computational complexity brought by the increase in the number of nodes, but also enhances the model's ability to integrate and analyze multi-dimensional feature sets, thus setting a new standard for spatiotemporal prediction models in complex environments.
[0109] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It will be apparent to those skilled in the art that various changes, modifications, substitutions, and variations of these embodiments, including components, without departing from the principles and spirit of the present invention are still within the scope of protection of the present invention.
Claims
1. A multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling, characterized in that: The steps include: Step 1: Obtain the traffic flow information matrix F and the spatial matrix G based on historical traffic flow data; Step 2: Obtain visual data and estimate the mixing rate M of different vehicle types in traffic flow based on the visual data to obtain the mixing rate feature matrix Step 3: Detect and quantify traffic anomalies to obtain traffic anomaly feature matrix Step 4: constructing an extensible multidimensional prediction model, wherein the extensible multidimensional prediction model includes a time series module, a spatial module, and an extensible multidimensional feature module; Step 5: Integrate traffic flow information, mixing rate characteristics, and traffic anomaly characteristics into a comprehensive traffic information matrix X = [F, M, U], and define the traffic flow prediction problem as learning a mapping function f, using the historical traffic information and road network structure of the past P steps to predict the traffic flow in the next Q steps through a scalable multidimensional prediction model. The method for predicting traffic flow using the scalable multidimensional prediction model is as follows: The time series module uses historical traffic data to embed F emb Time information is embedded in T emb , through the time fusion process T fus =Fusion(F emb ||T emb ) Fusing historical traffic information with time information to ensure temporal continuity and relevance of feature representation; The spatial module obtains a graph embedding matrix G0 using a predefined graph; The scalable multi-dimensional feature module sets different embedding layers corresponding to traffic anomaly features and mixing rate features. For mixing rate and abnormal traffic conditions, the mixing rate fusion and anomaly fusion are then fused in their respective flows to form their respective hidden representations. The mixing rate hidden representation H M , abnormal hidden representation H U , and finally concatenate multiple feature hidden representations to form a comprehensive feature: H features =concat(H M ,H U ,…,H other ) The final prediction output is generated by a mapping function, where the mapping function is trained by a deep learning network.
2. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 1 is characterized in that: The space matrix is expressed as in, Represents a set of road intersections, and each road intersection is regarded as a node. N represents the number of nodes, ε is the set of all roads; the traffic flow information matrix is expressed as Where T represents the number of time steps.
3. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 2 is characterized in that: The specific method of step 2 is: set up Indicates that at time t, at node v n At position, the number of vehicle types is k, then at time t, the node position v n The mixing rate of vehicle type k at The calculation is as follows: Where K is the total number of vehicle types, Represents the node v at time t n The above formula calculates the proportion of type k vehicles relative to the total number of vehicles observed at time t; The mixing rate data It is expressed as follows: M n =[M n,1 ,M n,2 ,…,M n,T ] M=[M1,M2,…,M N ] T Among them, M n,t Indicates that at time t, at node v n The proportion of various types of vehicles, M n Indicates that during the time period of time series length T, node v n is the mixing rate of various vehicle types, and N is the number of nodes.
4. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 3 is characterized in that: The step 2 also includes embedding the node traffic information into the matrix Mix-in rate feature embedding matrix and graph embedding matrix Splicing, input to the mixing rate fusion module composed of multi-layer MLP, and obtain the node mixing rate hidden representation Represented as, where D represents the embedding dimension: H M =MLPs(F emb ||M emb ||G0)。 5. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 1 is characterized in that: The method for traffic anomaly detection is: Obtain continuous monitoring footage of vehicles on the road, use YOLOv8 for instance segmentation to obtain the vehicles in the image, and extract the features of the vehicles by using OSNet as a feature extractor; Let A and B represent feature vectors capturing the same vehicle from consecutive frames. The cosine distance is used to measure the similarity between these feature vectors, which is defined as: Based on the similarity metric, the cosine distance dist(A, B) = 1-cos(A, B) is calculated. If dist(A, B) ≤ κ, that is, the cosine distance is lower than the predefined threshold κ = 0.3, it is inferred that the two feature vectors represent the same vehicle, indicating that a traffic anomaly has occurred. From this, we construct the anomaly indication matrix 6. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 5 is characterized in that: The traffic anomaly quantification method is: First, define the standard time interval T required for vehicles to pass a specific road section under normal traffic flow conditions. norm ; Then, record the time interval T required for the vehicle to pass the same road section under actual traffic conditions. act , the calculation formula is T act =t i+n -t i , where t i and t i+n They represent the detection time points of the vehicle in consecutive frames respectively; Based on the above definition, the delay time Δ is further calculated t , and its calculation formula is: Δ t =T act -T norm Introduced the delay severity index S delay ; According to the abnormal indicator matrix U id and the degree of delay caused by the abnormality S delay The size of the node where the exception occurs is represented as Where i represents the degree of delay caused by the anomaly, and j-hop represents the propagation range of the anomaly in the network, thus constructing an anomaly matrix based on severity N represents the number of nodes, and T represents the length of the time series.
7. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 6 is characterized in that: The delay severity index S delay It is defined as a piecewise function, where p is a positive integer representing the level of delay: Among them, Fib (p) is the pth value of the Fibonacci sequence, p∈(3,q), q is the number of levels of delay, Fib (max) Represents a larger value in the Fibonacci sequence, where max is greater than q.
8. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 6 is characterized in that: In step 3, when quantifying traffic anomalies, an anomaly embedding matrix is learned according to different anomaly degrees and different propagation ranges. To represent the severity and spatial range of the anomaly, where I represents the severity of the anomaly and J represents the number of hop connections. Then, the information of the anomaly embedding matrix is used to update the traffic anomaly feature matrix U, which is expressed as follows:
9. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 8 is characterized in that: The step 3 also includes embedding the node traffic information into the matrix F emb , abnormal feature embedding matrix It is concatenated with the graph embedding matrix G0 and input into the abnormal fusion module composed of multi-layer MLP to obtain the abnormal hidden representation of the node. Where D represents the embedding dimension, and the expression is as follows: H U =MLPs(F emb ||U′ emb ||G0)。 10. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 1 is characterized in that: The structure of the deep learning network consists of an encoding module Encoder and a regression layer R, which integrate the data from all three model parts and are expressed as: Among them, || represents the connection of feature sets, Encoder is composed of multiple layers of residual MLP, and R is composed of regression functions.
Citation Information
Patent Citations
Traffic flow prediction method and device, readable storage medium and electronic device
CN111968375A
Method and system for predicting future traffic flow based on heterogeneous graph
CN118247968A