Multi-dimensional feature space-time flow prediction method based on visual sampling
Through visual sampling and deep learning networks, heterogeneous traffic flows are quantified and road anomalies are detected, and a scalable multi-dimensional prediction model is built, which solves the problem of dealing with heterogeneous traffic flows and non-periodic anomalies in the prior art and improves traffic flow prediction accuracy and model scalability.
Patent Information
- Application Number
- CN202411099798.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing traffic flow prediction methods are difficult to deal with heterogeneous traffic flows and aperiodic anomalies, resulting in the inability to accurately predict traffic flows, especially when road congestion, where computational complexity increases and it is difficult to scale to multidimensional features.
Using multi-dimensional feature spatiotemporal flow prediction method based on visual sampling, quantify heterogeneous traffic flow through visual data, detect and model road abnormal features, build a scalable multi-dimensional prediction model, integrate timing, spatial and multi-dimensional feature modules, and use deep learning networks Conduct traffic flow forecasts.
It improves the accuracy of traffic flow prediction and the scalability of the model, can effectively deal with heterogeneous traffic flow and acyclic anomalies, reduces the computational complexity, and enhances the prediction accuracy.
Smart Images

Figure CN119068671A_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 prediction is a key component in the development of modern intelligent transportation systems. Traffic flow prediction usually relies on current and historical traffic data to predict future traffic volume. Most existing traffic flow prediction methods assume uniform traffic conditions and infer future traffic flow based on spatiotemporal data. In the actual environment, the road traffic system is a complex dynamic network composed of heterogeneous traffic participants such as different types of motor vehicles, non-motor vehicles, and pedestrians. Especially in the state of road congestion, the microscopic characteristics of heterogeneous participants affect the dynamic changes of the entire traffic flow. In addition, traffic flow data can be regarded as a collection of periodic data and non-periodic (abnormal) data. Periodicity is mainly manifested in the regular repetitive pattern of traffic flow data on time scales such as days, weeks, and seasons. Non-periodicity is reflected in the randomness and non-reproducibility caused by unexpected conditions such as congestion, accidents, and road construction. At present, most studies focus on the temporal periodic characteristics of traffic flow data and use sequence models to model spatial dependencies. Such models often cannot handle heterogeneous traffic flows and non-periodic abnormal conditions, resulting in the inability to accurately predict traffic flow.
[0003] In addition, most of the previous spatiotemporal prediction methods use a combination of recurrent neural networks and graph convolution. The learning of graph structures based on GNN requires the aggregation and update of all nodes in each layer. As the number of road nodes increases, the amount of calculation will increase significantly, especially when the network topology is complex or the node connectivity is high. This is extremely unfavorable for the addition of multi-dimensional features. Summary of the invention
[0004] In order to overcome the shortcomings of existing traffic flow prediction methods in dealing with heterogeneous traffic flows and non-periodic anomalies, this paper proposes a multi-dimensional feature 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, comprising the following steps:
[0007] Step 1: Obtain the traffic flow information matrix F and the space 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: 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;
[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 future 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 Here, 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 in the time period of time series length T, node v n where is the mixing rate of various vehicle types, and N represents the number of nodes.
[0022] Preferably, 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 hidden representation of node mixing rate 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, and use the cosine distance to measure the similarity between these feature vectors, 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 vehicles 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 indication 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] Preferably, 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. The expression is as follows:
[0041]
[0042] Preferably, step 3 further includes embedding the node traffic information into the matrix F emb , the 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 an extensible multidimensional prediction model is:
[0044] The timing 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 ) Fuse historical traffic information with time information to ensure the 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, where the mapping function is trained by a deep learning network. The structure of the deep learning network consists of an encoding module Encoder and a regression layer R. The encoding module and the regression layer integrate the data from all three model parts, 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) The heterogeneous traffic flow is quantified by visual sampling method, and the mutual influence between different vehicle types is analyzed 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, so as to improve the performance of non-periodic traffic flow prediction.
[0053] (3) A scalable multi-dimensional feature prediction model is proposed, which 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 prediction. 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.
[0055] Figure 1 It is a 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 substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of 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: Obtain traffic flow information matrix F and spatial matrix G based on historical traffic flow data
[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 regarded 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 abnormality 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, 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 because 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. These visual data contain information about the different types and numbers of vehicles in the traffic flow. We use an object detection model to detect and classify the types and numbers of vehicles in the visual data, so that we can quantify the composition of the traffic flow in the form of different vehicle types.
[0068] set up Indicates that at time t, at node v n At the position, the number of vehicles of type k 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 above formula calculates 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 in the time period of time series length T, node v n where is the mixing rate of various vehicle types, and N represents 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 blending rate is dynamically estimated through visual data analysis, and the method of this embodiment provides a more accurate and adaptive representation of traffic flow dynamics. This enables better understanding and prediction of traffic behavior, thereby promoting more effective traffic management and optimization strategies.
[0078] It is understandable that different vehicle types 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 the composition of traffic flow, 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 stops completely, it can be detected by identifying the same vehicle in consecutive monitoring images. Use YOLOv8 for instance segmentation to obtain the vehicles in the image, and extract the features of the vehicle by using OSNet as a feature extractor to obtain a robust representation of individual vehicles in the monitoring image. Let A and B represent feature vectors that capture the same vehicle from consecutive frames. We use cosine distance to measure the similarity between these feature vectors, 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 difference 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 the continuous frames respectively. 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 travel time of vehicles 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 is divided into multiple levels. Since the logarithmic growth pattern of the Fibonacci sequence is closely related to the nonlinear increase of the traffic congestion effect, 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, learn an anomaly embedding matrix to indicate the severity and spatial range of the anomaly, where I represents the severity of the anomaly (the 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 , the 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, which facilitates proactive traffic management and provides support for effectively resolving congestion.
[0096] It should be noted that this embodiment proposes a novel method to detect traffic anomalies and model their severity. Traditional anomaly detection methods usually rely on simple heuristic methods or predefined thresholds, which may not accurately capture the complexity of traffic anomalies. Our method solves this problem by leveraging vehicle re-identification technology and severity-based anomaly embedding to achieve 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, Figure 1 As shown, it includes three parts: timing module, spatial module and extensible multi-dimensional feature module.
[0099] It is understandable that most of the previous spatiotemporal prediction methods use a combination of recurrent neural network and graph convolution. The learning of the graph structure based on GNN requires the aggregation and update of all nodes in each layer. As the number of road nodes increases, the amount of calculation will increase significantly, especially when the network topology is complex or the node connectivity is high. This is extremely unfavorable for the addition of multidimensional features. Therefore, this embodiment adopts a class graph embedding method to solve the above problems.
[0100] It should be noted that the time series module fuses traffic information with time information, the spatial module embeds predefined graphs, and the scalable multi-dimensional feature module fuses other features such as mixing rate and anomaly with traffic information and spatial information in their respective flows to form their own features. All three modules are composed of multi-layer MLP.
[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 future Q steps through a scalable multidimensional prediction model.
[0102] The time series module uses historical traffic data to embed the matrix F emb Temporal 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 the core of handling spatial dependencies, using a predefined graph to obtain a graph embedding matrix G0. The adaptability of the graph is crucial to maintain computational feasibility and accuracy, especially when the number of nodes representing road intersections or segments increases. The embedding of the graph is used to encode spatial relationships to support 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 embodiment 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 power in various scenarios.
[0105] The final prediction output is generated by a mapping function, where the mapping function is trained by a deep learning network. The structure of the deep learning network consists of an encoding module Encoder and a regression layer R. The encoding module and the regression layer integrate the data from all three model parts, 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 exponential growth of 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. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments including components are made without departing from the principles and spirit of the present invention, and still fall 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 space 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: 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; 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 future Q steps through a scalable multidimensional prediction model.
2. According to claim 1, a multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling is characterized in that: The space matrix is expressed as Where v represents a set of road intersections. Each road intersection is regarded as a node, then V = {v1, v2, ..., v N }, N represents the number of nodes, ε is the set of all roads; the traffic flow information matrix is expressed as Here, T represents the number of time steps.
3. According to claim 2, a multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling 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 in the time period of time series length T, node v n where is the mixing rate of various vehicle types, and N represents the number of nodes.
4. According to claim 3, a multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling 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 hidden representation of node mixing rate Represented as, where D represents the embedding dimension: H M =MLPs(F emb ||M enb ||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, and use the cosine distance to measure the similarity between these feature vectors, 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 vehicles 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 indication matrix U id 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.
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. The expression is 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 , the 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 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: In step 5, the method for predicting traffic flow using an extensible multidimensional prediction model is: The timing 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 ) Fuse historical traffic information with time information to ensure the 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, such as mixing rate and abnormal traffic conditions, and then fuses the mixing rate fusion and the anomaly fusion 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.
11. The multi-dimensional feature spatiotemporal traffic prediction method based on visual sampling according to claim 10 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, 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
Time-space traffic flow prediction method based on hidden time-space feature mining
CN117496715A
Method and system for predicting future traffic flow based on heterogeneous graph
CN118247968A
Urban-region road network vehicle-passage flow prediction method and system based on hybrid deep learning model
US20240220686A1
