Urban governance data fusion analysis method and system
By integrating the movement trajectory data of pedestrians and vehicles in the city, and using the DTW algorithm and SVM model, the problems of data silos and security risks in urban governance have been solved, and more accurate traffic management and safety early warning have been achieved.
Patent Information
- Application Number
- CN202510114640.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-01-24
AI Technical Summary
Existing urban governance methods rely on manual intervention and cannot be dynamically adjusted in real time according to changes in traffic flow, resulting in data silos and serious safety hazards in pedestrian and vehicle interactions.
By acquiring the motion trajectory data of pedestrians and vehicles through sensors, the data is fused using the weighted average method and the dynamic time warping (DTW) algorithm, and combined with the support vector machine (SVM) model to perform spatiotemporal pattern modeling, road traffic anomalies are identified, taking into account the impact of traffic light waiting time and traffic flow.
It improves the temporal and spatial alignment accuracy of pedestrian and vehicle trajectories, enhances the accuracy of abnormal behavior identification, improves the efficiency and safety of urban traffic management, and enables rapid response to real-time traffic changes.
Smart Images

Figure CN119942797B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data fusion analysis, in particular to a city governance data fusion analysis method and system. BACKGROUND
[0002] With the growth of urban population and the increase of vehicle number, traffic congestion phenomenon is increasingly serious, leading to a large amount of time and resource waste, and also increasing the risk of traffic accidents. Especially in peak hours, traffic signal control, pedestrian crossing, vehicle driving speed, parking behavior, etc. may affect the traffic fluency; in the city road environment of people and vehicles sharing, the interaction between pedestrians and vehicles may cause accidents. Pedestrians running red lights, vehicles speeding, not parking according to regulations, etc. not only threaten the safety of pedestrians, but also affect the traffic order. Therefore, real-time monitoring and prediction of these behaviors, and taking appropriate management measures, become the key to improve urban traffic safety; the existing city governance method often relies on manual setting of traffic signal lights, manual patrol and fixed traffic rules, but this governance method has certain limitations, cannot dynamically adjust according to the change of traffic flow or sudden events, and the data collected by various city sensors (such as traffic monitoring cameras, GPS devices, mobile terminals, etc.) are often scattered in different systems, lack effective fusion analysis, leading to data island phenomenon, therefore, a city governance data fusion analysis method and system are provided. SUMMARY
[0003] The purpose of the present application is to provide a city governance data fusion analysis method and system to solve the problems of traditional city governance relying on manual intervention, information island and safety hazards between pedestrians and vehicles raised in the background.
[0004] To achieve the above purpose, the present application provides a city governance data fusion analysis method, comprising:
[0005] S1, acquiring the motion trajectory data of pedestrians in the city by using sensors, and acquiring the position information data of vehicles in the city by using GPS devices;
[0006] S2, fusing the motion trajectory data of pedestrians and the position information data of vehicles by using weighted average method;
[0007] S3, extracting the trajectories of pedestrians and vehicles from the fused data, and processing by using dynamic time warping algorithm;
[0008] S4, modeling the spatiotemporal pattern of pedestrian and vehicle trajectories based on support vector machine model, identifying road traffic anomalies, and introducing traffic congestion function in the modeling process for traffic congestion.
[0009] As a further improvement to this technical solution, in step S1, the pedestrian's motion trajectory data includes: position coordinates. timestamp .
[0010] As a further improvement to this technical solution, in step S2, the pedestrian trajectory data and vehicle location information data are fused using a weighted average method, including the following steps:
[0011] S2.1 Preprocess the pedestrian movement trajectory data and vehicle location information data;
[0012] S2.2, Convert all pedestrian movement trajectory data and vehicle location information data to a unified coordinate system;
[0013] S2.3. Use interpolation to align the pedestrian trajectory data and vehicle location information data in time.
[0014] S2.4. The coordinates of pedestrians and vehicles are fused using a weighted average to obtain the fused coordinates:
[0015] ;
[0016] ;
[0017] in, This represents the weighting coefficients of pedestrian movement trajectory data. This represents the weighting coefficient of the vehicle location information data. This represents the horizontal coordinates of the merged data. Represents the vertical coordinates of the merged data. Indicates the vehicle's position coordinates. This indicates the time point where interpolation is required.
[0018] As a further improvement to this technical solution, in step S3, the trajectories of pedestrians and vehicles are extracted from the fused data and processed using a dynamic time warping algorithm, including the following steps:
[0019] S3.1. Divide the fused continuous data stream into independent trajectory segments according to the time period t1 to be analyzed, and preprocess the trajectory segments.
[0020] S3.2 Calculate the distance between trajectory points using the Euclidean distance method. Optimize the Euclidean distance method for traffic light waiting times on urban roads, and further optimize the Euclidean distance method by considering the impact of traffic flow on traffic light waiting times.
[0021] S3.3 Calculate the cumulative cost matrix using a recursive method based on the distance between trajectory points;
[0022] S3.4 Starting from the bottom right corner of the cumulative cost matrix, find the optimal alignment path by tracing the path with the minimum cost;
[0023] S3.5. By tracing the optimal alignment path, align the corresponding points in the pedestrian trajectory and vehicle trajectory to obtain the reconstructed trajectories of the pedestrian trajectory and vehicle trajectory in time and space.
[0024] As a further improvement to this technical solution, in step S3.3, the distance between trajectory points is calculated using the Euclidean distance method as follows:
[0025] ;
[0026] in, Represents the pedestrian trajectory points, Indicates the vehicle trajectory points, This represents the distance between pedestrian trajectory points and vehicle trajectory points. This represents the first in the pedestrian trajectory data. The timestamps corresponding to each trajectory point; This indicates the first [item] in the vehicle trajectory data. The timestamps corresponding to each trajectory point;
[0027] To optimize the waiting time of traffic lights on urban roads, the Euclidean distance method is optimized as follows:
[0028] ;
[0029] in, This represents the distance between pedestrian and vehicle trajectory points after taking into account traffic light waiting times on urban roads. This indicates the degree to which pedestrian waiting time affects the total distance; This indicates the degree to which vehicle waiting time affects the total distance; Indicates the waiting time for pedestrians due to traffic lights; This indicates the waiting time for vehicles due to traffic lights;
[0030] Considering the impact of traffic flow on traffic light waiting time, the Euclidean distance method is further optimized:
[0031] ;
[0032] in, This indicates the distance between pedestrian and vehicle trajectory points after further optimization; This represents a function that reflects traffic flow. The weighting coefficient represents the traffic flow.
[0033] As a further improvement to this technical solution, in S3.3, the cumulative cost matrix is calculated recursively as follows:
[0034] ;
[0035] in, Indicates the minimum cumulative cost; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point.
[0036] As a further improvement to this technical solution, in step S4, road traffic anomalies are identified by modeling the spatiotemporal patterns of pedestrian and vehicle trajectories based on a support vector machine model, including the following steps:
[0037] S4.1 Extract and analyze the interaction features between pedestrians and vehicles, extract spatiotemporal features from the fused pedestrian and vehicle trajectory data, and preprocess the extracted spatiotemporal features and interaction features.
[0038] S4.2. Based on the preprocessed spatiotemporal features and interaction features, select and identify features related to abnormal behavior;
[0039] S4.3. Use the spatiotemporal features and interaction features of each trajectory segment as sample inputs to construct training and testing datasets;
[0040] S4.4 Select a kernel function for data fitting. For traffic congestion, optimize the kernel function and use a support vector machine model for abnormal behavior classification training.
[0041] S4.5. Use the trained support vector machine model to determine whether the new trajectory data is abnormal.
[0042] As a further improvement to this technical solution, in S4.4, the kernel function is:
[0043] ;
[0044] in, Indicates a given input point and The similarity calculated between them; This indicates the kernel width, which controls the smoothness of the kernel function; Feature vectors representing pedestrian trajectory data points; A feature vector representing vehicle trajectory data points;
[0045] To address traffic congestion, the kernel function is optimized:
[0046] ;
[0047] ;
[0048] in, This represents the similarity calculated after optimization for traffic congestion. This indicates the weight used to control for the impact of traffic congestion on similarity. A function representing traffic congestion; The weighting coefficients representing the differences in control speed; Weighting coefficients that control the state of traffic lights; This represents the weighting coefficient for controlling traffic flow; Indicates the speed difference between pedestrians and vehicles; A function representing the influence of traffic lights on similarity; This indicates differences in traffic flow.
[0049] As a further improvement to this technical solution, in S4.5, the support vector machine model is as follows:
[0050] ;
[0051] in, This represents the output of the decision function of the support vector machine model; Indicates the number of support vectors; Represents the Lagrange multipliers; Indicates the first The class labels of the training samples; Indicates the index of the training sample; This indicates the bias term.
[0052] On the other hand, the present invention provides an urban governance data fusion and analysis system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the urban governance data fusion and analysis method described above.
[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0054] 1. This urban governance data fusion analysis method and system, by introducing the Dynamic Time Warping (DTW) algorithm and optimizing the Euclidean distance calculation method, can better handle situations where pedestrians and vehicles are waiting at traffic lights, avoiding unnecessary distance penalties caused by stationary states. This not only improves the temporal and spatial alignment accuracy of pedestrian and vehicle trajectories but also enhances the accuracy of identifying abnormal behaviors, such as illegal red-light running and abnormal parking, thereby contributing to improving the efficiency and safety of urban traffic management.
[0055] 2. In this urban governance data fusion analysis method and system, by optimizing the kernel function of the Support Vector Machine (SVM) model to account for traffic congestion factors, this method can more accurately simulate the spatiotemporal patterns of pedestrians and vehicles under actual traffic conditions. This improvement enables the model to maintain high classification performance under different traffic flow conditions and to respond more quickly and accurately to real-time changes in traffic conditions, providing strong data support for urban governance and helping decision-makers formulate more scientific and reasonable traffic management policies. Attached Figure Description
[0056] Figure 1 This is a flowchart of the overall method of the present invention. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0058] Example 1: Please refer to Figure 1 As shown in the figure, this embodiment provides a method for urban governance data fusion and analysis, including the following steps:
[0059] S1. Use sensors to acquire the movement trajectory data of pedestrians in the city, and use GPS devices to acquire the location information data of vehicles in the city;
[0060] In this embodiment, the pedestrian's movement trajectory data includes: location coordinates. timestamp .
[0061] S2. The pedestrian trajectory data and vehicle location information data are fused using a weighted average method;
[0062] In this embodiment, the weighted average method is a calculation method that assigns different weights to different data points to calculate the average value, making some data points have a greater impact on the result than others. Pedestrians and vehicles exhibit different behavioral patterns in urban environments and are influenced by different factors. For example, pedestrians may be more agile and can change direction quickly, while vehicles are more constrained by traffic rules and road conditions. By fusing these two different types of data using the weighted average method, the advantages of both can be combined, reducing the errors or uncertainties that may arise from a single data source, thus obtaining more accurate and reliable comprehensive trajectory information. Pedestrian and vehicle data collection frequencies may differ, and their coordinate systems may also be inconsistent (e.g., geographic coordinate system versus Cartesian coordinate system). The weighted average method ensures that the timestamps of pedestrian trajectory data and vehicle location information data are consistent or synchronized, and transforms this data into a unified coordinate system. This helps to achieve precise alignment of pedestrian and vehicle trajectories in time and space, providing a solid foundation for subsequent analysis.
[0063] The weighted average method is used to fuse pedestrian trajectory data and vehicle location information data, including the following steps:
[0064] S2.1 Preprocess the pedestrian trajectory data and vehicle location information data to ensure that the timestamps of the pedestrian trajectory data (including location coordinates and timestamps) and vehicle location information data are consistent or synchronized.
[0065] S2.2. Convert all pedestrian movement trajectory data and vehicle location information data to a unified coordinate system, such as from a geographic coordinate system (latitude and longitude) to a Cartesian coordinate system (such as UTM). Since the movement trajectories of pedestrians and vehicles occur in the same geographic space, it is necessary to project these trajectories onto the same coordinate system for comparison and fusion.
[0066] S2.3 Use interpolation to align the pedestrian trajectory data and vehicle location information data in time. The data collection frequency of pedestrians and vehicles may be different, so it is necessary to ensure that the two data streams are aligned in time, that is, for each point in time, there is corresponding pedestrian and vehicle location information.
[0067] S2.4. The coordinates of pedestrians and vehicles are fused using a weighted average to obtain the fused coordinates:
[0068] ;
[0069] ;
[0070] in, This represents the weighting coefficients of pedestrian movement trajectory data. This represents the weighting coefficient of the vehicle location information data. This represents the horizontal coordinates of the merged data. Represents the vertical coordinates of the merged data. Indicates the vehicle's position coordinates. This indicates the time point where interpolation is required.
[0071] S3. Extract the trajectories of pedestrians and vehicles from the fused data and process them using the Dynamic Time Warping (DTW) algorithm;
[0072] In this embodiment, Dynamic Time Warping (DTW) is a technique for measuring the similarity between two time series. It aligns two series by non-linearly stretching or compressing the time axis, allowing comparisons even when they differ in length and speed. Pedestrians and vehicles typically move at different speeds, even if they follow similar paths. DTW can find the optimal time alignment between two series, even if their speeds are inconsistent, thus allowing for effective trajectory matching at different speeds. Since pedestrians and vehicles may not start or end their movements simultaneously, or may pause temporarily due to traffic lights, this can cause temporal shifts in trajectory data. DTW can eliminate these shifts by non-linearly stretching or compressing the time axis, ensuring that corresponding behavioral segments are compared. The number of trajectory points for pedestrians may not be equal to the number of trajectory points for vehicles, especially in data recorded over long time periods. DTW can find the optimal path to match trajectories of different lengths, ensuring correct comparison even when lengths differ.
[0073] Trajectories of pedestrians and vehicles are extracted from the fused data and processed using the Dynamic Time Warping (DTW) algorithm, including the following steps:
[0074] S3.1. Divide the fused continuous data stream into independent trajectory segments according to the time period t1 to be analyzed, ensure that all trajectory data use the same coordinate system, and normalize the data to eliminate the influence of scale differences. Preprocess the trajectory segments, including noise reduction and smoothing.
[0075] S3.2 Calculate the distance between trajectory points using the Euclidean distance method. Optimize the Euclidean distance method for traffic light waiting times on urban roads, and further optimize the Euclidean distance method by considering the impact of traffic flow on traffic light waiting times.
[0076] Furthermore, the distance between trajectory points is calculated using the Euclidean distance method as follows:
[0077] ;
[0078] in, Represents the pedestrian trajectory points, Indicates the vehicle trajectory points, This represents the distance between pedestrian trajectory points and vehicle trajectory points. This represents the first in the pedestrian trajectory data. The timestamps corresponding to each trajectory point; This indicates the first [item] in the vehicle trajectory data. The timestamps corresponding to each trajectory point;
[0079] On urban roads, traffic lights cause vehicles and pedestrians to stop and wait for certain periods. When a vehicle or pedestrian encounters a red light, their movement pauses instead of continuing. If the waiting time is ignored, the Dynamic Time Warping (DTW) algorithm will treat this waiting time as an unnecessary time difference, thus affecting trajectory alignment and similarity calculation, leading to incorrect trajectory matching results. Traditional Euclidean distance calculation only considers differences in spatial coordinates, ignoring temporal differences, especially waiting or stopping between different points in time. The presence of traffic lights keeps vehicles and pedestrians stationary at certain moments, and Euclidean distance calculation will impose unnecessary distance penalties on these stationary states. For example, two trajectory points (one belonging to a pedestrian and the other to a vehicle) may be stationary at the same time due to the traffic light waiting time. Traditional Euclidean distance calculation will incorrectly assume that there is a large difference between these two trajectory points, causing the DTW algorithm to fail to match the correct trajectory.
[0080] To optimize the waiting time of traffic lights on urban roads, the Euclidean distance method is optimized as follows:
[0081] ;
[0082] in, This represents the distance between pedestrian and vehicle trajectory points after taking into account traffic light waiting times on urban roads. This indicates the degree to which pedestrian waiting time affects the total distance; This indicates the degree to which vehicle waiting time affects the total distance; Indicates the waiting time for pedestrians due to traffic lights; This indicates the waiting time for vehicles due to traffic lights;
[0083] Traffic light waiting time is a common delay factor in urban traffic, and this delay is usually closely related to traffic flow. During high-flow periods, traffic light waiting times tend to be longer, while during low-flow periods they are shorter. Therefore, traffic light waiting time itself is a significant factor affecting trajectory analysis, and simply using traditional Euclidean distance calculations may overlook this reality. Considering the impact of traffic flow on traffic light waiting time allows for a more accurate simulation of the actual behavior of pedestrians and vehicles under different traffic conditions, making the trajectory reconstruction more consistent with real traffic situations. In real urban traffic, traffic flow fluctuates significantly at different times, thus affecting traffic light switching times and waiting durations. By incorporating the influence of traffic flow, the model can dynamically adjust to different traffic conditions, reflecting more accurate behavioral patterns. For example, during high-flow periods, the relative trajectories of pedestrians and vehicles may shift due to prolonged traffic light waiting times; this change is crucial for identifying traffic anomalies.
[0084] Considering the impact of traffic flow on traffic light waiting time, the Euclidean distance method is further optimized:
[0085] ;
[0086] ;
[0087] in, This indicates the distance between pedestrian and vehicle trajectory points after further optimization; This represents a function that reflects traffic flow. The weighting coefficient representing traffic flow; Weighting coefficients representing changes in velocity; Weighting coefficients representing traffic density; Indicates average speed; This indicates a reference speed, such as the average speed for the same period in history or the ideal driving speed for that section of road. Indicates the number of vehicles; Indicates the area of the region;
[0088] S3.3 Calculate the cumulative cost matrix recursively based on the distance between trajectory points. The main purpose of calculating the cumulative cost matrix recursively is to find the optimal alignment path between two time series, thereby minimizing the total distance or difference between them.
[0089] Furthermore, the cumulative cost matrix is calculated recursively as follows:
[0090] ;
[0091] in, Indicates the minimum cumulative cost; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point;
[0092] S3.4 Starting from the bottom right corner of the cumulative cost matrix, find the optimal alignment path by tracing the path with the minimum cost. The tracing rule is: from... Backtrack to the smallest neighbor: Until it traces back to the top left corner ;
[0093] S3.5. By tracing the optimal alignment path, align the corresponding points in the pedestrian trajectory and vehicle trajectory to obtain the reconstructed trajectories of the pedestrian trajectory and vehicle trajectory in time and space.
[0094] S4. Based on the support vector machine model, the spatiotemporal pattern of pedestrian and vehicle trajectories is modeled to identify road traffic anomalies, and a traffic congestion function is introduced in the modeling process to address traffic congestion.
[0095] In this embodiment, Support Vector Machine (SVM) is a supervised learning model used for classification and regression analysis. It achieves efficient data classification by finding an optimal hyperplane to maximize the margin between data points of different categories. By analyzing the spatiotemporal behavior patterns of pedestrians and vehicles, potential safety hazards can be detected in a timely manner, such as illegal red-light running, unauthorized lane changes, or speeding. This helps prevent traffic accidents and protects the lives and property of road users. The SVM model can automatically detect violations of traffic rules and provide reliable evidence for law enforcement officers. This not only improves enforcement efficiency but also serves as a deterrent, encouraging drivers and pedestrians to comply with traffic regulations.
[0096] Based on the support vector machine model, road traffic anomalies are identified by modeling the spatiotemporal patterns of pedestrian and vehicle trajectories, including the following steps:
[0097] S4.1 Extract and analyze the interaction features between pedestrians and vehicles. The interaction features include: interaction distance features (calculating the relative distance between pedestrians and vehicles at the same time point) and velocity and acceleration matching features (calculating the velocity difference between pedestrians and vehicles at the interaction point). Extract spatiotemporal features from the fused pedestrian and vehicle trajectory data. The spatiotemporal features include trajectory velocity features, trajectory acceleration features, trajectory curvature features, and trajectory temporal features. Preprocess the extracted spatiotemporal features and interaction features.
[0098] S4.2 Based on the preprocessed spatiotemporal features and interaction features, select features related to the identification of abnormal behavior, including trajectory velocity features and trajectory acceleration features, and convert the data into a format acceptable to the support vector machine model;
[0099] S4.3. Use the spatiotemporal features and interaction features of each trajectory segment as sample inputs to construct training and testing datasets;
[0100] S4.4 Select a kernel function (radial basis function (RBF)) for data fitting. For traffic congestion, optimize the kernel function and use a support vector machine model for abnormal behavior classification training. The goal of training is to build a classifier that can predict whether the behavior is normal or abnormal based on the input trajectory features.
[0101] Furthermore, the kernel function (Radial Basis Function (RBF)) measures the similarity of two data points in a high-dimensional space by calculating the exponential decay of the square of the distance between them. The primary purpose of choosing the RBF kernel for data fitting is to improve the performance and flexibility of the Support Vector Machine (SVM) model when handling nonlinear classification problems. The RBF kernel can map data from the original input space to a high-dimensional feature space, where even data that was originally linearly inseparable in the low-dimensional space may become linearly separable. This is particularly important for complex spatiotemporal patterns such as pedestrian and vehicle trajectories, as these patterns are usually not simple linear relationships. By introducing nonlinear transformations, the RBF kernel allows the SVM model to capture complex relationships between data. This helps improve the model's ability to distinguish between different traffic behavior patterns, especially when the boundary between abnormal and normal behavior is unclear or very complex.
[0102] The kernel function is:
[0103] ;
[0104] in, Indicates a given input point and The similarity calculated between them; This indicates the kernel width, which controls the smoothness of the kernel function; Feature vectors representing pedestrian trajectory data points; A feature vector representing vehicle trajectory data points;
[0105] When analyzing pedestrian and vehicle trajectories, traffic congestion significantly alters their movement patterns. Pedestrians and vehicles may remain stationary for extended periods on congested roads, but this does not mean they are no longer similar. Standard kernel functions (such as Gaussian kernels) only consider spatial distance, neglecting temporal stagnation or changes in traffic flow. Ignoring these factors in traffic congestion leads to inaccurate trajectory matching and incorrect similarity calculations. For example, two points (one a pedestrian, the other a vehicle) may be stuck in the same location due to traffic lights or congestion; traditional kernel functions might incorrectly assume significant differences between these points, resulting in incorrect trajectory alignment. Optimizing traffic congestion modeling allows for more accurate extraction of spatiotemporal patterns of traffic flow. Models like Support Vector Machines (SVMs) rely on similarity calculations of input data for pattern recognition, especially crucial for identifying anomalous behaviors such as traffic accidents. Optimizing kernel functions improves the accuracy of spatiotemporal pattern modeling, helping to identify anomalous behaviors caused by traffic congestion (e.g., traffic accidents, congestion), thus enabling more effective urban governance.
[0106] To address traffic congestion, the kernel function is optimized:
[0107] ;
[0108] In traffic management scenarios, the physical distance between two vehicles is indeed important, but factors such as vehicle speed, traffic signals, and traffic flow also affect their "similarity." For example, if two vehicles are both stopped at a traffic light, even though their distances are similar, their behaviors are not exactly the same. Therefore, it is necessary to consider behavioral differences and interaction features. Defined as a set of additional factors affecting similarity, it not only depends on physical distance but also includes other influencing factors (speed differences, traffic light status, traffic flow). By introducing these factors, the model can more accurately capture the interaction between people and vehicles (at traffic intersections, near schools, and commercial areas, pedestrian traffic is high, and vehicles may need to frequently avoid or slow down; on highways or dedicated lanes, vehicle traffic is high, while pedestrian traffic is usually zero). For example, differences in traffic flow may affect the behavior patterns between two vehicles. Even if they are physically similar, if the traffic flow difference is large, their driving patterns or behaviors may be very different, so their similarity should be different.
[0109] ;
[0110] ;
[0111] in, This represents the similarity calculated after optimization for traffic congestion. This indicates the weight used to control for the impact of traffic congestion on similarity. The traffic congestion function represents the distance of the interaction features; The weighting coefficients representing the differences in control speed; Weighting coefficients that control the state of traffic lights; This represents the weighting coefficient for controlling traffic flow; Indicates the speed difference between pedestrians and vehicles; A function representing the influence of traffic lights on similarity; Indicates differences in traffic flow;
[0112] S4.5. Use the trained support vector machine model to determine whether the new trajectory data is abnormal. By combining the trajectory features of these two, it can be determined whether there are abnormal interactions or behaviors in the environment where people and vehicles coexist, such as vehicles not driving according to rules or pedestrians walking on the wrong road.
[0113] Furthermore, the support vector machine model is as follows:
[0114] ;
[0115] in, This represents the output of the decision function of the support vector machine model, used to determine the input data. Make predictions to determine which category each data point belongs to; Indicates the number of support vectors; Represents the Lagrange multipliers; Indicates the first The class labels of the training samples; Indicates the index of the training sample; This indicates the bias term.
[0116] Example 2: This example provides an urban governance data fusion and analysis system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the urban governance data fusion and analysis method described in any one of the above examples.
[0117] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A method for data fusion and analysis in urban governance, characterized in that, Includes the following steps: S1. Use sensors to acquire the movement trajectory data of pedestrians in the city, and use GPS devices to acquire the location information data of vehicles in the city; S2. The pedestrian trajectory data and vehicle location information data are fused using a weighted average method; S3. Extract the trajectories of pedestrians and vehicles from the fused data and process them using a dynamic time warping algorithm; S3, extracting the trajectories of pedestrians and vehicles from the fused data and processing them using a dynamic time warping algorithm, includes the following steps: S3.
1. Divide the fused continuous data stream into independent trajectory segments according to the time period t1 to be analyzed, and preprocess the trajectory segments. S3.2 Calculate the distance between trajectory points using the Euclidean distance method. Optimize the Euclidean distance method for traffic light waiting times on urban roads, and further optimize the Euclidean distance method by considering the impact of traffic flow on traffic light waiting times. S3.3 Calculate the cumulative cost matrix using a recursive method based on the distance between trajectory points; S3.4 Starting from the bottom right corner of the cumulative cost matrix, find the optimal alignment path by tracing the path with the minimum cost; S3.
5. By tracing the optimal alignment path, align the corresponding points in the pedestrian trajectory and vehicle trajectory to obtain the reconstructed trajectories of the pedestrian trajectory and vehicle trajectory in time and space. S4. Based on the support vector machine model, the spatiotemporal pattern of pedestrian and vehicle trajectories is modeled to identify road traffic anomalies, and a traffic congestion function is introduced in the modeling process to address traffic congestion. In step S4, road traffic anomalies are identified by modeling the spatiotemporal patterns of pedestrian and vehicle trajectories based on a support vector machine model, including the following steps: S4.1 Extract and analyze the interaction features between pedestrians and vehicles, extract spatiotemporal features from the fused pedestrian and vehicle trajectory data, and preprocess the extracted spatiotemporal features and interaction features. S4.
2. Based on the preprocessed spatiotemporal features and interaction features, select and identify features related to abnormal behavior; S4.
3. Use the spatiotemporal features and interaction features of each trajectory segment as sample inputs to construct training and testing datasets; S4.4 Select a kernel function for data fitting. For traffic congestion, optimize the kernel function and use a support vector machine model for abnormal behavior classification training. S4.
5. Use the trained support vector machine model to determine whether the new trajectory data is abnormal; In S4.4, the kernel function is: ; in, Indicates a given input point and The similarity calculated between them; This indicates the kernel width, which controls the smoothness of the kernel function; Feature vectors representing pedestrian trajectory data points; The feature vector representing the vehicle trajectory data points; To address traffic congestion, the kernel function is optimized: ; ; in, This represents the similarity calculated after optimization for traffic congestion. This indicates the weight used to control for the impact of traffic congestion on similarity. A function representing traffic congestion; Weighting coefficients representing the differences in control speed; Weighting coefficients that control the status of traffic lights; This represents the weighting coefficient for controlling traffic flow; Indicates the speed difference between pedestrians and vehicles; A function representing the influence of traffic lights on similarity; This indicates differences in traffic flow.
2. The urban governance data fusion and analysis method according to claim 1, characterized in that: In S1, the pedestrian's motion trajectory data includes: position coordinates timestamp .
3. The urban governance data fusion and analysis method according to claim 2, characterized in that: In step S2, the pedestrian trajectory data and vehicle location information data are fused using a weighted average method, including the following steps: S2.1 Preprocess the pedestrian movement trajectory data and vehicle location information data; S2.2, Convert all pedestrian movement trajectory data and vehicle location information data to a unified coordinate system; S2.
3. Use interpolation to align the pedestrian trajectory data and vehicle location information data in time. S2.
4. The coordinates of pedestrians and vehicles are fused using a weighted average to obtain the fused coordinates: ; ; in, This represents the weighting coefficients of pedestrian movement trajectory data. This represents the weighting coefficient of the vehicle location information data. This represents the horizontal coordinates of the merged data. Represents the vertical coordinates of the merged data. Indicates the vehicle's position coordinates. This indicates the time point where interpolation is required.
4. The urban governance data fusion and analysis method according to claim 1, characterized in that: In step S3.3, the distance between trajectory points is calculated using the Euclidean distance method as follows: ; in, Represents the pedestrian trajectory points, Indicates the vehicle trajectory points, This represents the distance between pedestrian trajectory points and vehicle trajectory points. This represents the first in the pedestrian trajectory data. The timestamps corresponding to each trajectory point; This indicates the first [item] in the vehicle trajectory data. The timestamps corresponding to each trajectory point; To optimize the waiting time of traffic lights on urban roads, the Euclidean distance method is optimized as follows: ; in, This represents the distance between pedestrian and vehicle trajectory points after taking into account traffic light waiting times on urban roads. This indicates the degree to which pedestrian waiting time affects the total distance; This indicates the degree to which vehicle waiting time affects the total distance; Indicates the waiting time for pedestrians due to traffic lights; This indicates the waiting time for vehicles due to traffic lights; Considering the impact of traffic flow on traffic light waiting time, the Euclidean distance method is further optimized: ; in, This indicates the distance between pedestrian and vehicle trajectory points after further optimization; This represents a function that reflects traffic flow. The weighting coefficient represents the traffic flow.
5. The urban governance data fusion and analysis method according to claim 4, characterized in that: In S3.3, the cumulative cost matrix is calculated recursively as follows: ; in, Indicates the minimum cumulative cost; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point; Indicates the sequence from the first From the nth point to the nth sequence of another sequence The cumulative cost of each point.
6. The urban governance data fusion and analysis method according to claim 1, characterized in that: In S4.5, the support vector machine model is as follows: ; in, This represents the output of the decision function of the support vector machine model; Indicates the number of support vectors; Represents the Lagrange multipliers; Indicates the first The class labels of the training samples; Indicates the index of the training sample; This indicates the bias term.
7. A data fusion and analysis system for urban governance, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes a computer program to implement the urban governance data fusion and analysis method as described in any one of claims 1-6.
Citation Information
Patent Citations
Exception event detection method for expressway
CN114170580A
Method and system for automatically detecting anomalies at a traffic intersection
GB201307005D0