Traffic congestion analysis method and apparatus based on vector fields
By constructing a vector field-based traffic congestion analysis method, which generates a vector field using vehicle trajectory data, the problem that existing methods cannot assess traffic congestion trends is solved, enabling an intuitive and comprehensive assessment of traffic congestion conditions and trends.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2026-04-03
AI Technical Summary
Existing trajectory big data analysis methods cannot effectively assess traffic congestion trends; they can only describe past spatiotemporal phenomena and lack the ability to predict future changes.
By constructing a traffic congestion analysis method based on vector fields, road vehicle trajectory data of the target area is obtained, a spatial grid is established, the outbound momentum and speed vectors of vehicles are determined, and a vector field is generated to reflect the traffic congestion situation and trend.
It enables an intuitive and comprehensive assessment of traffic congestion and trends within the target area, improving the ability to predict future traffic conditions.
Smart Images

Figure CN115658754B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, electronic device and storage medium for traffic congestion analysis based on vector fields. Background Technology
[0002] As a crucial component of human mobility data, travel trajectory big data plays a vital indicative role in reflecting the spatiotemporal patterns of residents' travel. Therefore, effectively mining and visualizing this trajectory big data is essential, as the results can be applied to fields such as urban planning and intelligent transportation. Existing research on taxi trajectory big data often employs methods such as trajectory flow diagrams, spatiotemporal cubes, trajectory wall diagrams, and OD flow maps to visualize basic elements of transportation (such as origin-destination (OD) and travel trajectories) or other multidimensional attributes. Among these methods, OD flow maps are the most intuitive, but they only display the direction of flow, limiting their potential for mining trajectory big data.
[0003] Traditional research on traffic congestion assessment using big data analytics includes relatively mature studies on linear road congestion assessment and prediction, as well as studies based on taxi GPS trajectory data mining to identify specific location travel characteristics, OD (Original Departure) travel analysis, and changes in taxi hotspots in a given area. These studies are mostly used for planning purposes and are essentially descriptions and summaries of past spatiotemporal phenomena. In practical applications, however, people pay more attention to changes in congestion trends in order to make more informed travel decisions. Summary of the Invention
[0004] One object of the embodiments of the present invention is to solve at least the above-mentioned problems and / or defects, and to provide at least the advantages described below.
[0005] This invention provides a traffic congestion analysis method and apparatus based on vector fields, which can effectively mine trajectory data and more intuitively and comprehensively evaluate the traffic congestion situation of a target area within a target time interval.
[0006] Firstly, a traffic congestion analysis method based on vector fields is provided, including:
[0007] Acquire trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals;
[0008] Based on the target region, a spatial grid is constructed;
[0009] Based on the trajectory data of each vehicle, the travel volume of each vehicle in each time interval is determined. The travel volume of each vehicle includes at least the starting position and the speed vector, which is generated based on the travel speed and travel direction of each vehicle in each time interval.
[0010] Based on the starting position of each vehicle in each time interval, determine the target grid in the spatial grid that matches the travel momentum of each vehicle in each time interval.
[0011] Project the velocity vectors of all vehicles within the target time interval onto their respective matching target grids to obtain the velocity vector projection results of each grid in the spatial grid.
[0012] Based on the velocity vector projection results of all grids in the spatial grid, a vector field is generated, wherein the vector field is used to reflect the traffic congestion situation and traffic congestion trend of the target area in the target time interval.
[0013] Optionally, determining the target grid in the spatial grid to match the travel momentum of each vehicle in each time interval based on the starting position of each vehicle in each time interval includes:
[0014] Based on a preset size, a selection area is established with each grid in the spatial grid as the center;
[0015] The grid corresponding to the selected area where the starting position of each vehicle is located in each time interval is used as the target grid for matching the movement of each vehicle in the spatial grid in each time interval.
[0016] Optionally, the step of projecting the velocity vectors of all vehicles within the target time interval onto their respective matched target grids to obtain the velocity vector projection result of each grid in the spatial grid includes:
[0017] Based on the inverse distance weighting method, the velocity vectors of multiple vehicles matching the same target grid are projected onto the velocity vector of the target grid.
[0018] Optionally, the step of determining the velocity vector projection result of multiple vehicles matching the same target grid onto the target grid based on the inverse distance weighting method includes:
[0019] Determine the weights of the velocity vectors of multiple vehicles corresponding to the same target grid, wherein the weights of the velocity vectors of the multiple vehicles decrease as the distance from the starting position of the multiple vehicles to the center point of the target grid increases;
[0020] Based on the weights of the velocity vectors of the multiple vehicles, the velocity vectors of the multiple vehicles are weighted and summed to obtain the velocity vector projection result of the velocity vectors of the multiple vehicles onto the target grid.
[0021] Optionally, after determining the target grid in the spatial grid to which the travel volume of each vehicle matches in each time interval based on the starting position of each vehicle in each time interval, the method further includes:
[0022] The number of trips of vehicles that match each grid in the spatial grid is determined as the trip density of each grid in the spatial grid;
[0023] The generation of a vector field based on the velocity vector projection results of all grids in the spatial grid includes:
[0024] The vector field is generated based on the velocity vector projection results and travel density of all grids in the spatial grid.
[0025] Optionally, the method further includes:
[0026] Selecting part or all of the target area to form a target sub-region;
[0027] Determine the spatial subgrid corresponding to the target sub-region within the spatial grid;
[0028] The sum of the velocity vector projections of all grids in the spatial subgrid is taken as the velocity vector of the target sub-region.
[0029] The traffic congestion index of the target sub-region is determined based on the travel speed in the velocity vector of the target sub-region and the free-flow velocity of the target sub-region.
[0030] Optionally, determining the traffic congestion index of the target sub-region based on the travel speed in the velocity vector of the target sub-region and the free-flow velocity of the target sub-region includes:
[0031] The average actual travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the travel speed in the velocity vector of the target sub-region.
[0032] The average free-flow travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the free-flow velocity of the target sub-region.
[0033] The traffic congestion index of the target sub-region is determined based on the ratio of the average actual travel time to the average free-flow travel time.
[0034] Secondly, a traffic congestion analysis device based on vector fields is provided, including:
[0035] The trajectory data acquisition module is used to acquire trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals;
[0036] A spatial grid construction module is used to construct a spatial grid based on the target region;
[0037] The travel volume determination module is used to determine the travel volume of each vehicle in each time interval based on the trajectory data of each vehicle. The travel volume of each vehicle includes at least the starting position and the speed vector, and the speed vector is generated based on the travel speed and travel direction of each vehicle in each time interval.
[0038] The target grid determination module is used to determine the target grid in the spatial grid that matches the travel volume of each vehicle in each time interval, based on the starting position of each vehicle in each time interval.
[0039] The vector projection module is used to project the velocity vectors of all vehicles in the target time interval onto their respective matching target grids to obtain the velocity vector projection result of each grid in the spatial grid.
[0040] The vector field generation module is used to generate a vector field based on the velocity vector projection results of all grids in the spatial grid, wherein the vector field is used to reflect the traffic congestion situation and traffic congestion trend of the target area in the target time interval.
[0041] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method.
[0042] Fourthly, a storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the method described thereon.
[0043] The embodiments of the present invention include at least the following beneficial effects:
[0044] This invention provides a traffic congestion analysis method and apparatus based on a vector field. The method first acquires trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals. Based on the target area, a spatial grid is constructed. Then, based on the trajectory data of each vehicle, the travel volume of each vehicle within each time interval is determined. The travel volume of each vehicle includes at least its starting position and speed vector. The speed vector is generated based on the travel speed and travel direction of each vehicle within each time interval. Then, based on the starting position of each vehicle within each time interval, a target grid matching the travel volume of each vehicle within each time interval is determined in the spatial grid. The speed vectors of all vehicles within the target time interval are projected onto their respective matching target grids to obtain the speed vector projection result of each grid in the spatial grid. Finally, based on the speed vector projection results of all grids in the spatial grid, a vector field is generated. The vector field reflects the traffic congestion situation and traffic congestion trend of the target area within the target time interval. Based on this method and apparatus, a vector field can be generated from the trajectory data of road vehicles in a target area within a target time interval. The vector field reflects the traffic congestion situation in the target area within a target time interval, enabling effective mining of trajectory data and providing a more intuitive and comprehensive assessment of the traffic congestion situation and trend in the target area within a target time interval.
[0045] Other advantages, objectives, and features of the embodiments of the present invention will be apparent in part from the following description, and in part will be understood by those skilled in the art through study and practice of the embodiments of the present invention. Attached Figure Description
[0046] Figure 1 A flowchart of a traffic congestion analysis method based on vector fields provided in one embodiment of the present invention.
[0047] Figure 2 This is a flowchart of a vehicle trajectory data processing procedure provided in one embodiment of the present invention.
[0048] Figure 3 This is a schematic diagram of vehicle travel vectors within a time interval, provided as an embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of a distance-time model provided in one embodiment of the present invention.
[0050] Figure 5 This is a schematic diagram of vector projection based on the inverse distance weighting method provided in an embodiment of the present invention.
[0051] Figure 6 This is a schematic diagram of a target sub-region and a spatial subgrid provided in one embodiment of the present invention.
[0052] Figure 7 A flowchart of a traffic congestion analysis method based on vector fields provided in another embodiment of the present invention.
[0053] Figure 8A A heat map of a local area A in a certain urban area at time 0, provided as another embodiment of the present invention.
[0054] Figure 8B A heat map of a local area A in a certain urban area at 4 o'clock is provided as another embodiment of the present invention.
[0055] Figure 9A The vector field diagram of a local area A in a certain urban area at time 0 is provided for another embodiment of the present invention.
[0056] Figure 9B The vector field diagram of a local area A in a certain urban area at time 4 is provided as another embodiment of the present invention.
[0057] Figure 10 This is a comparative schematic diagram of the vector field map and heat map of a local area A in a certain urban area at 12 o'clock, provided as another embodiment of the present invention.
[0058] Figure 11 This is a schematic diagram of a traffic congestion analysis device based on a vector field, provided in one embodiment of the present invention.
[0059] Figure 12 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0060] The embodiments of the present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement them based on the description.
[0061] Figure 1 The flowchart of the vector field-based traffic congestion analysis method provided in this embodiment of the invention is executed by a system with processing capabilities, a server device, or a vector field-based traffic congestion analysis device. Figure 1 As shown, the method includes:
[0062] Step 110: Obtain trajectory data of road vehicles in the target area within a target time interval, wherein the target time interval consists of multiple equal time intervals.
[0063] Here, the target area can be a city or a specific area within a city. Since road traffic flows are interconnected between multiple areas of a city, and traffic flows between these areas tend to fluctuate, to fully and comprehensively assess traffic congestion, the target area can be a city or a larger area within a city that includes multiple specific areas.
[0064] Vehicle trajectory data can include information such as data ID, vehicle ID, time, longitude, latitude, instantaneous speed, and instantaneous direction. In some examples, the content of the trajectory data is shown in Table 1. Positioning devices and data acquisition devices can be pre-installed on the vehicle. The positioning device locates the vehicle's position, and the data acquisition device collects data such as the vehicle's instantaneous speed and instantaneous direction, uploading the vehicle's data to the road network traffic data acquisition system at preset time intervals. The positioning device can be a GPS positioning device.
[0065] Table 1 Trajectory Data Content
[0066]
[0067]
[0068] The raw data uploaded by vehicles can be processed to facilitate subsequent data analysis. Figure 2 A flowchart illustrating the vehicle trajectory data processing procedure provided in an embodiment of the present invention is shown. Figure 2 As shown, operations such as identifying abnormal data and removing erroneous data can be performed on the original data, and then the data can be converted into text data for use in constructing vector fields.
[0069] Step 120: Construct a spatial grid based on the target area.
[0070] In constructing a spatial grid, the grid scale needs to be defined. The basic principle for defining the grid scale is to ensure that, under normal driving conditions, the distance traveled within a given time interval can be traversed within one grid. Specifically, the grid scale can be determined in two ways. In one way, based on the speed limits of major urban roads, the average road speed can be calculated to be 60 km / h. Assuming a time interval of 5 minutes, the grid threshold is 5 km. In another way, taking taxis as an example, based on experimental data, the average daily vehicle speed is calculated to be 26.7 km / h. Assuming a time interval of 5 minutes, the grid threshold is 2.225 km. Based on the results of these two methods, the grid scale should be less than 2.225 km. Considering that a smaller grid scale results in higher computational accuracy but also increases the computational load, the final grid scale was determined to be 0.2 km.
[0071] Step 130: Based on the trajectory data of each vehicle, determine the travel volume of each vehicle in each time interval. The travel volume of each vehicle includes at least the starting position and the speed vector, which is generated based on the travel speed and travel direction of each vehicle in each time interval.
[0072] The travel chain of each vehicle at each time interval can be extracted based on trajectory data to generate the vehicle's travel volume. The vehicle's travel volume can be understood as an abstract representation of the vehicle's travel chain. To construct the vector field, in this embodiment of the invention, the vehicle's travel volume includes at least the vehicle's starting position and velocity vector, where the velocity vector is generated based on the travel direction and travel speed. Furthermore, the vehicle's travel volume may also include information such as the vehicle's ending position, the change in position relative to the starting position, and the travel distance. Table 2 shows the data model for vehicle travel volume, where the travel direction and travel distance can be determined using longitude, latitude, and changes in longitude and latitude.
[0073] Table 2 Data Model of Vehicle Traffic Volume
[0074]
[0075]
[0076] In some embodiments, the displacement of the vehicle between the starting position and the ending position can be described as a travel vector. This travel vector can be understood as a geometric vector pointing from the starting position to the ending position of the vehicle at the corresponding time interval. The magnitude of the travel vector is the distance between the starting position and the ending position, and the direction of the travel vector represents the travel direction of the vehicle. Figure 3 This diagram illustrates a vehicle travel vector over a time interval provided by an embodiment of the present invention. Figure 3 In the above, let Grid O and Grid D be t. o and t d Two spatial grids at different times, a certain taxi at time t o Time and t d Between two points, if a vector moves from point A in Grid O to point B1 in Grid D, then the vector... Let this be the travel vector of the taxi at the corresponding time interval. A vector projected onto a plane is represented as a vector.
[0077] When a vehicle's travel quantity includes parameters such as origin location, destination location, and travel direction, it can essentially also include the vehicle's travel vector. Therefore, the travel quantity of vehicle c can be expressed as... in, Let represent the travel vector of vehicle c. This represents the velocity vector of vehicle c.
[0078] In practical applications, the sampling time points for trajectory data are not uniformly distributed. Therefore, this embodiment of the invention determines the vehicle's travel speed over a time interval based on a distance-time model. The distance-time model calculates the vehicle's average speed using the ratio of distance to time. Figure 4 The distance-time model provided by an embodiment of the present invention is illustrated. Figure 4 In the diagram, there are four sets of trajectory data for vehicle c (GPS data), generated at times t0, t1, t2, and t3 respectively. The time spans between t0, t1, t2, and t3 are all unequal. The area of the polygon represents the travel distance L of the vehicle from time t0 to t3. c Using the vehicle's travel distance L c The ratio of the distance traveled by the vehicle to the time span between t0 and t3 can be used to calculate the vehicle's travel speed during that time interval. The distance traveled by the vehicle at any given time interval is L. c The calculation process is shown in formula (1), where the travel speed v of vehicle c is at any time interval. c The calculation process is shown in formula (2):
[0079]
[0080]
[0081] Wherein, t0~t n Let v be the sampling time series of vehicle c within any time interval, v be the velocity curve function of vehicle c within any time interval, and n be the number of trajectory data samples of vehicle c within any time interval. Let be the instantaneous velocity sequence of vehicle c at n sampling time points.
[0082] Step 140: Based on the starting position of each vehicle in each time interval, determine the target grid in the spatial grid that matches the travel momentum of each vehicle in each time interval.
[0083] In this step, the corresponding target grid is matched to the vehicle movement volume in the entire target time interval to achieve subsequent vector projection.
[0084] In some embodiments, determining the target grid in the spatial grid that matches the travel volume of each vehicle in each time interval based on the starting position of each vehicle in each time interval includes: establishing a selection area centered on each grid in the spatial grid based on a preset size; and using the grid corresponding to the selection area where the starting position of each vehicle is located as the target grid that matches the travel volume of each vehicle in the spatial grid.
[0085] For each grid cell in the spatial grid, a selection area is established centered on that cell. If the starting position of a vehicle's movement falls within the corresponding selection area, then that grid cell is used as the target grid cell for that vehicle's movement. Conversely, if the starting position of a vehicle's movement does not fall within the corresponding selection area, then that grid cell does not constitute the target grid cell for that vehicle's movement. Here, the preset size of the selection area needs to take into account the accuracy and visualization effect of the vector field. If the selection area is too small, the visualization effect of the vector field will be unsatisfactory; if the selection area is too large, the generated vector field model will be inaccurate. In this embodiment of the invention, the selection area size is set to 5×5, that is, the width of the selection area is the width of 5 grid cells. When the grid scale is 0.2 kilometers, the width of the selection area is 1 kilometer.
[0086] It should be understood that in a spatial grid, there may be some grids that do not match any vehicle movement, while there may also be cases where the same grid matches the movement of multiple vehicles.
[0087] Step 150: Project the velocity vectors of all vehicles within the target time interval onto their respective matching target grids to obtain the velocity vector projection results for each grid in the spatial grid.
[0088] In this step, based on the matching results between vehicle movement volume and the spatial grid, the velocity vectors of all vehicles within the target time interval are projected onto the spatial grid. Vector projection can be achieved using existing spatial interpolation methods. The inverse distance weighted method is a weighted spatial interpolation method that can more accurately reflect the impact of different velocity vectors projecting onto the same target grid, thereby improving the accuracy of the generated vector field for traffic flow simulation. Therefore, in some embodiments, the step of projecting the velocity vectors of all vehicles within the target time interval onto their respective matching target grids to obtain the velocity vector projection result for each grid in the spatial grid includes: determining the velocity vector projection results of multiple vehicles matching the same target grid onto the target grid based on the inverse distance weighted method.
[0089] Furthermore, the step of determining the velocity vector projection result of multiple vehicles matching the same target grid onto the target grid based on the inverse distance weighting method includes: determining the weights of the velocity vectors of multiple vehicles corresponding to the same target grid, wherein the weights of the velocity vectors of the multiple vehicles decrease as the distance from the starting position of the multiple vehicles to the center point of the target grid increases; and performing a weighted summation of the velocity vectors of the multiple vehicles based on the weights of the velocity vectors of the multiple vehicles to obtain the velocity vector projection result of the velocity vectors of the multiple vehicles onto the target grid.
[0090] In this embodiment of the invention, for the velocity vectors of multiple vehicles corresponding to the same target grid, it is considered that the farther the starting position is from the target grid, the smaller the contribution of the corresponding velocity vector to the traffic flow state in the target grid; conversely, the closer the starting position is to the target grid, the greater the contribution of the corresponding velocity vector to the traffic flow state. Therefore, velocity vectors with starting positions farther from the target grid are assigned smaller weights, while those with starting positions closer to the target grid are assigned smaller weights. Based on this, the velocity vectors of multiple vehicles corresponding to the same target grid are weighted and summed to obtain the projection result of the velocity vectors of multiple vehicles onto the target grid.
[0091] Here, for ease of calculation, the distance from the starting point to the target grid can be the distance from the starting point to the center point of the target grid.
[0092] Figure 5 A schematic diagram of vector projection based on the inverse distance weighting method provided in an embodiment of the present invention is shown. Figure 5 As shown, a selection range (the part outlined by the dashed line in the figure) is established for cell r in the spatial grid. The starting positions of velocity vectors A and B fall within this selection range. Therefore, velocity vectors A and B can be projected onto the target cell r. During the projection process, because velocity vector A is farther from the target cell r, it is assigned a smaller weight, while velocity vector B is closer to the target cell r, and is assigned a larger weight. The weighted sum of velocity vectors A and B is the velocity vector projection result of the target cell.
[0093] Specifically, the calculation process of the weights of the velocity vectors of the m vehicles corresponding to any grid cell r is shown in formula (3), and the calculation process of the vector projection of the velocity vectors of the m vehicles onto the grid cell r is shown in formula (4):
[0094]
[0095]
[0096] Where R is the farthest distance from the selection boundary to the grid center point, i.e., the distance from the selection vertex to the grid center point, i is the number of the outgoing motion within the selection area, and lng c and lat c The longitude and latitude of the grid center point. and Let be the longitude and latitude of the starting point of the i-th departure. The velocity vector in the i-th departure momentum The weights, Let be the velocity projection vector of grid cell r. Here, the projection vector of grid cell r... The modulus is the overall travel speed of vehicles in the grid, and the projection vector of grid cell r is... The direction indicates the overall travel direction of vehicles within that grid.
[0097] It should be understood that in some cases, for a given grid, there may only be one velocity vector that matches that grid. In such cases, the velocity vector can be directly projected onto that grid without using the inverse distance weighting method.
[0098] In some embodiments, vehicle travel volume may further include vehicle travel vectors, which can be projected onto the same target grid. Based on the projection results of multiple vehicle travel vectors corresponding to the same target grid onto the same target grid, the travel vector of each grid in the spatial grid can be obtained, and the overall travel distance of vehicles in that grid can be calculated based on the travel vector.
[0099] The travel vector weights of multiple vehicles corresponding to the same target grid are consistent with the weights used for the velocity vectors mentioned above, and the calculation process for the vector projection of the travel vectors of multiple vehicles is also the same as the calculation process for the vector projection of the velocity vector. For any grid cell r, the projection process of the travel vectors and velocity vectors contained in the travel actions of m vehicles onto that grid can be simplified using formula (5):
[0100]
[0101] in, This represents the number of trips made by the i-th vehicle. F represents the weight of the vector in the i-th departure action. r This represents the outgoing motion of the grid cell r.
[0102] Step 160: Based on the velocity vector projection results of all grids in the spatial grid, a vector field is generated, wherein the vector field is used to reflect the traffic congestion situation and traffic congestion trend of the target area in the target time interval.
[0103] In a spatial grid, the magnitude of the velocity projection vector of each grid represents the overall travel speed of vehicles within that grid, while the direction of the velocity projection vector represents the overall travel direction of vehicles within that grid. In other words, the velocity projection vector of each grid represents an overall flow pattern of vehicles within that grid. Based on the velocity vector projection results of all grids in the spatial grid, the generated vector field can fully demonstrate the macroscopic distribution attributes of road vehicles, such as flow rate and direction.
[0104] Vector field visualization is a dynamic visualization method that can dynamically simulate vehicle flow and provide a more intuitive visualization effect. Vector fields can use colors, arrows, and other methods to represent the overall travel direction and speed of vehicles, intuitively reflecting the traffic congestion situation in a target area within a target time interval. Users can intuitively assess the evolution of overall vehicle travel trends and understand the traffic congestion situation.
[0105] In some embodiments, after determining the target grid in the spatial grid that matches the travel volume of each vehicle in each time interval based on the starting position of each vehicle in each time interval, the method further includes: determining the number of travel volumes of vehicles that match each grid in the spatial grid, as the travel density of each grid in the spatial grid; generating a vector field based on the velocity vector projection results of all grids in the spatial grid includes: generating the vector field based on the velocity vector projection results and travel density of all grids in the spatial grid.
[0106] Trip density serves as an indicator of vehicle distribution. A higher trip density in a given grid cell suggests a greater likelihood of congestion. By incorporating this indicator into the vector field generation process, the vector field can visualize trip density using color and other methods, providing a more comprehensive picture of traffic congestion in the target area over a given time period and its future trends.
[0107] Furthermore, the travel trends of vehicles in the vector field can be classified, and descriptions and representations of different travel trends can be provided (see Table 4). Based on this classification, a more qualitative description and analysis of the travel trends of vehicles in the vector field can be achieved.
[0108] Table 4 Classification criteria for vehicle travel trends in vector fields
[0109]
[0110] In Table 4, Category 1 represents the normal flow trend, which is the main spatiotemporal flow mode in the vector field. Category 2 represents the regional congestion trend, which is prone to occur in passenger transport hubs, tourist attractions, commercial centers, and key intersections. Category 3 represents the road segment congestion trend, which is prone to occur in urban road segments that are prone to congestion, and the most frequent time is during the morning and evening rush hours.
[0111] In some embodiments, the method further includes: selecting part or all of the area in the target area to form a target sub-region; determining the spatial sub-grid corresponding to the target sub-region in the spatial grid; using the sum of the velocity vector projection results of all grids in the spatial sub-grid as the velocity vector of the target sub-region; and determining the traffic congestion index of the target sub-region based on the travel speed in the velocity vector of the target sub-region and the free flow speed of the target sub-region.
[0112] Figure 6 A schematic diagram of the target sub-region and spatial subgrid is shown. Based on the actual extent of the target sub-region ( Figure 6 The area within the dashed line (the area within the dashed line) can be used to determine the spatial sub-grid within the spatial grid based on the intersection principle (the area outlined by the bold black line in Figure 6). That is, the spatial sub-grid should be able to cover the target sub-region.
[0113] Specifically, assuming the spatial subgrid consists of k grids, the velocity vectors of the k grids in the spatial subgrid are summed to obtain the velocity vector of the spatial subgrid. See formula (6):
[0114]
[0115] in, Let be the velocity projection vector of the i-th grid in the spatial subgrid. The calculated velocity projection vector of the spatial subgrid can be used as the velocity vector of the target sub-region, and the magnitude of the velocity vector of the target sub-region is the travel speed of the target sub-region.
[0116] Free-flow speed refers to the speed of traffic flow unaffected by upstream and downstream conditions, representing a relatively ideal vehicle travel speed. The free-flow speed of each road in a city can be obtained from publicly available data from traffic management departments. When a target sub-region contains multiple roads, the free-flow speed of each road can be averaged, and the average of these speeds can be used as the free-flow speed of the target sub-region. In practical applications, when the target sub-region is relatively small, the traffic flow conditions of the multiple roads within it are usually quite similar. Therefore, averaging the free-flow speeds of multiple roads can provide a relatively accurate determination of the target sub-region's free-flow speed.
[0117] In some embodiments, vehicle travel volume may further include vehicle travel vectors. Based on the projection of travel vectors of multiple vehicles corresponding to the same target grid onto the same target grid, the travel vector of each grid in the spatial grid can be obtained. The overall travel distance of vehicles in that grid can be calculated based on this travel vector. The sum of the projection results of travel vectors of all grids in the spatial sub-grid can be used as the travel vector of the target sub-region. The travel distance of the target sub-region can also be determined based on the travel vector of the target sub-region.
[0118] For a spatial subgrid consisting of k grids, formula (7) can be used to simplify the calculation process of the travel vector and velocity vector contained in the travel motion of the spatial subgrid:
[0119]
[0120] in, Let F represent the movement quantity of the i-th grid. r This represents the outgoing motion of a spatial subgrid.
[0121] Furthermore, the congestion index is calculated for the travel speed and free-flow speed of the target sub-region. Based on the calculation results, the traffic congestion index of the target sub-region can be assessed.
[0122] In some embodiments, determining the traffic congestion index of the target sub-region based on the travel speed in the speed vector of the target sub-region and the free-flow speed of the target sub-region includes: determining the average actual travel time of the target sub-region based on the instantaneous travel distance of vehicles and the travel speed in the speed vector of the target sub-region; determining the average free-flow travel time of the target sub-region based on the instantaneous travel distance of vehicles and the free-flow speed of the target sub-region; and determining the traffic congestion index of the target sub-region based on the ratio of the average actual travel time to the average free-flow travel time of the target sub-region.
[0123] Specifically, the traffic congestion index ε of the target sub-region p It can be calculated using formula (8):
[0124]
[0125] Where l represents the instantaneous travel distance of the vehicle, and v p For the travel speed of the target sub-region, v zLet ε be the free-flow velocity of the target sub-region; the numerator of the formula calculates the average actual travel time for the target sub-region, and the denominator calculates the average free-flow travel time for the target sub-region. Therefore, ε p It can also be called the traffic congestion delay index.
[0126] Furthermore, in some examples, the average actual travel time of the target sub-region can be determined based on the travel distance and the travel speed in the speed vector of the target sub-region. The average free-flow travel time of the target sub-region can be determined based on the travel distance and the free-flow speed of the target sub-region. Finally, the traffic congestion index of the target sub-region can be determined based on the ratio of the average actual travel time to the average free-flow travel time. Specifically, the ratio between the travel distance and the travel speed in the speed vector of the target sub-region can be used as the average actual travel time of the target sub-region; and the ratio between the travel distance and the free-flow speed of the target sub-region can be used as the average free-flow travel time of the target sub-region.
[0127] In this example, since the travel speed in vehicle traffic is determined based on the travel distance of the vehicle in each time interval, using the travel distance of the target sub-region to calculate the average actual travel time and average free-flow travel time when calculating the traffic congestion index may lead to an increase in the calculation error of the traffic congestion index. Therefore, this embodiment of the invention preferably uses the instantaneous travel distance of the vehicle to calculate the traffic congestion index.
[0128] For traffic congestion indices, congestion rating standards can be set to achieve a qualitative description of traffic congestion. Different calculation methods for traffic congestion indices will result in different numerical values. Therefore, appropriate congestion rating standards can be set based on different calculation methods. Specifically, the following congestion level rating standards are provided for the aforementioned traffic congestion delay index (see Table 3).
[0129] Table 3 Congestion Level Rating Standards
[0130] Traffic congestion delay index Congestion Level Rating 1.00~1.50 Smooth 1.50~1.80 amble 1.80~2.00 Congestion 2.00 and above Severe congestion
[0131] In summary, this invention provides a traffic congestion analysis method based on a vector field. First, it acquires the trajectory data of road vehicles in a target area within a target time interval, where the target time interval consists of multiple equal time intervals. Based on the target area, a spatial grid is constructed. Then, based on the trajectory data of each vehicle, the travel volume of each vehicle within each time interval is determined. The travel volume of each vehicle includes at least its starting position and speed vector. The speed vector is generated based on the travel speed and travel direction of each vehicle within each time interval. Next, based on the starting position of each vehicle within each time interval, a target grid matching the travel volume of each vehicle within each time interval is determined in the spatial grid. The speed vectors of all vehicles within the target time interval are projected onto their respective matching target grids to obtain the speed vector projection result of each grid in the spatial grid. Finally, based on the speed vector projection results of all grids in the spatial grid, a vector field is generated. This vector field reflects the traffic congestion situation and trend of the target area within the target time interval. Based on this method, a vector field can be generated from the trajectory data of road vehicles in a target area within a target time interval. The vector field reflects the traffic congestion situation in the target area within a target time interval, enabling effective mining of trajectory data and providing a more intuitive and comprehensive assessment of the traffic congestion situation and trend in the target area within a target time interval.
[0132] The following provides a specific implementation scenario to further illustrate the traffic congestion analysis method based on vector fields provided in this embodiment of the invention.
[0133] Figure 7This document illustrates a flowchart of a vector field-based traffic congestion analysis method provided by an embodiment of the present invention. The goal of this experiment is to establish an operational platform (i.e., a vector field-based traffic congestion analysis system) that visualizes travel volume, detects congestion phenomena and trends in target areas, and rapidly calculates congestion evaluation indicators for any area, such as commercial districts, scenic spots, and hospitals, and provides feedback to the user. The vector field-based traffic congestion analysis system includes a vector field grid data preprocessing module, a data visualization module, and a regional congestion index query module. The vector field grid data preprocessing module divides the target urban area into grids and extracts OD (Original Distance) travel chains based on vector data and taxi GPS trajectory data, obtaining grid data and OD travel chain data for a specific urban area. It then calculates travel volume and projects it onto each grid to obtain vector field preprocessed data. This preprocessed data is then transmitted to the data visualization module and the regional congestion index query module. In the data visualization module, text data is decoded based on the vector field preprocessed data to obtain vector field JSON data, which is then visualized and rendered to display the vector field map. The regional congestion index query module and the vector field map constitute a human-computer interaction function. When the command to query the congestion index of the target area is input, the target boundary vector data and free flow velocity are retrieved using POI boundary vector data. Then, the regional congestion index is calculated by combining it with the vector field preprocessing data.
[0134] 1. Research Data and Experimental Design
[0135] 1.1 Acquisition of Trajectory Data
[0136] This invention embodiment acquires GPS trajectory data of 11,875 taxis in a certain urban area on January 31, 2018 (Thursday), totaling approximately 13.68 million records. The trajectory data is obtained through a road network traffic information collection system. Taxis are equipped with positioning devices and this system, enabling real-time data exchange with the dispatch management center. The content of the trajectory data is shown in Table 1. Trajectory data is transmitted back every 5 minutes. All trajectory data acquired in this invention embodiment is obtained through authorization.
[0137] The raw data uploaded by vehicles can be processed to facilitate subsequent data analysis. Figure 2 A flowchart illustrating the vehicle trajectory data processing procedure provided in an embodiment of the present invention is shown. Figure 2 As shown, operations such as identifying abnormal data and removing erroneous data can be performed on the original data, and then the data can be converted into text data for use in constructing vector fields.
[0138] 1.2 Spatial Grid Division
[0139] The spatial grid can be constructed based on the vector data of the urban area. The basic principle for defining the grid scale is to ensure that, under normal driving conditions, the distance traveled within a time interval can be traversed by one grid. The grid scale is determined in two ways. In one way, based on the speed limits of major roads in a certain urban area, the average road speed can be calculated to be 60 km / h. Assuming a time interval of 5 minutes, the grid threshold is 5 km. In another way, taking taxis as an example, based on experimental data, the average daily vehicle speed is calculated to be 26.7 km / h. Assuming a time interval of 5 minutes, the grid threshold is 2.225 km. Based on the results of the above two methods, the grid scale should be less than 2.225 km. Considering that a smaller grid scale results in higher computational accuracy but also increases the computational load, the final grid scale is determined to be 0.2 km.
[0140] 2. Vector Field Generation Method
[0141] 2.1 Vector Field Generation Based on Taxi GPS Trajectory Data
[0142] 2.1.1 Extraction of taxi usage data
[0143] Based on trajectory data, the travel chain of each vehicle at each time interval is extracted to generate the vehicle's travel momentum. To construct the vector field, in this embodiment of the invention, the vehicle's travel momentum includes the vehicle's starting position and speed vector, where the speed vector is generated based on the travel direction and travel speed. Table 2 shows the data model of the vehicle's travel momentum, where the travel direction can be determined by longitude, latitude, and changes in longitude and latitude.
[0144] This invention determines the travel speed of a vehicle over a time interval based on a distance-time model. The distance-time model is as follows: Figure 4 As shown. Based on formulas (1) and (2), the travel speed v of vehicle c for any time interval is realized. c The calculation.
[0145] 2.1.2 Vector Projection Based on Inverse Distance Weighting Method
[0146] For each grid cell in the spatial grid, a selection area is established centered on that cell. If the starting position of a vehicle's movement falls within the corresponding selection area, then that grid cell becomes the target grid cell for that vehicle's movement. Conversely, if the starting position of a vehicle's movement does not fall within the corresponding selection area, then that grid cell does not constitute the target grid cell for that vehicle's movement. In this embodiment of the invention, the selection area size is set to 5×5, that is, the width of the selection area is 5 times the width of the grid cells. When the grid scale is 0.2 kilometers, the width of the selection area is 1 kilometer.
[0147] Projecting velocity vectors onto a spatial grid is achieved using the inverse distance weighting method. Figure 5 A schematic diagram of vector projection based on the inverse distance weighting method provided in an embodiment of the present invention is shown. Vector projection is calculated based on formulas (3) and (4), yielding the velocity vector projection of each grid cell in the spatial grid.
[0148] A vector field is generated by projecting the velocity vectors of all grid cells in the spatial grid.
[0149] 2.2 Traffic Congestion Index Evaluation Based on Vector Field
[0150] Figure 6 A schematic diagram of the target sub-region and spatial subgrid is shown. First, the vector boundary range of a certain commercial area in the urban area is determined. Then, based on the intersection principle, a spatial subgrid that intersects with the vector boundary range of the commercial area is determined in the spatial grid.
[0151] Obtain the free-flow velocity of each road in the business district, calculate the average free-flow velocity of all roads, and use this average value as the free-flow velocity of the business district. Calculate the velocity vector of a specific business district in the city based on formula (6), and then determine the travel speed of that business district. Calculate the traffic congestion index ε of the business district based on formula (8). p The traffic congestion level of the business district was rated using Table 3.
[0152] 3 Results Analysis
[0153] 3.1 Comparative Analysis of Vector Field Visualization
[0154] Vector fields can dynamically simulate vehicle flow, providing a more intuitive visualization. In a vector field diagram, color represents the overall taxi travel density, vector flow direction represents the overall taxi travel direction, and vector flow velocity and transparency represent the overall taxi travel speed.
[0155] Heat maps were generated based on taxi GPS trajectory data from 0:00 and 4:00. Figure 8A This invention provides a heat map of a local area A in a certain urban area at time 0, according to an embodiment of the invention. Figure 8B This illustration shows a heat map of a local area A in a certain urban area at time 4, provided by an embodiment of the present invention. Local area A further comprises three sub-areas of the urban area: sub-area G, sub-area H, and sub-area I. All three sub-areas are located on the periphery of the urban center O. Figure 8A and Figure 8B The upper right portion is closer to the city center and faces the direction of the city center, while the left and lower right portions are relatively farther from the city center. (Comparison) Figure 8A and Figure 8BIt was found that the number of taxis in sub-region I increased slightly, but no other significant differences were observed. By comparing the heatmaps from the two time periods, changes could only be observed in areas with higher taxi density; changes in areas with lower taxi density were difficult to detect.
[0156] Figure 9A The following is a vector field diagram of a local area A in a certain urban area at time 0, provided by an embodiment of the present invention; Figure 9B This is a vector field diagram of a local area A in a certain urban area at time 4, provided in an embodiment of the present invention. (Comparison) Figure 9A and Figure 9B The changes in taxi travel patterns at 0:00 and 4:00 are clearly observable. At 0:00, the overall taxi flow rate in the three sub-regions is relatively fast, with high travel density and active vehicle movement, but there is no significant traffic congestion, and the overall travel trend is outward from the city center O. At 4:00, the overall taxi flow rate slows down, and the travel density decreases, due to the less active vehicle movement at night. Therefore, compared to heat maps, using vector fields to represent traffic congestion is closer to the actual situation.
[0157] Figure 10 This diagram illustrates a comparison between the vector field map and the heat map of a local area A in a certain urban area at time 0, as provided in an embodiment of the present invention. Figure 10 As shown, the vector field diagram on the left side of local region A reveals that at 12:00, the travel trend of taxis in local region A points towards sub-region I (the area within the box in the diagram), and the travel density is high, indicating that traffic congestion is likely to occur in sub-region I. Observation Figure 10 The heatmap of sub-region I at 12:00 on the upper right side shows that there is no traffic congestion in sub-region I at this time. Further observation... Figure 10 The heatmap of sub-region I at 12:15 on the lower right side shows that sub-region I has clearly experienced congestion. This demonstrates that, based on vector fields, users can intuitively assess the evolution of overall taxi travel trends over different time periods, thus enabling advance analysis of traffic congestion.
[0158] Furthermore, based on Table 4, the travel trends of different local areas in a certain city can be classified and qualitatively described using vector fields.
[0159] In summary, firstly, heatmap visualization methods only focus on the attributes and spatial location of traffic objects at a specific moment, essentially describing a snapshot of the research object—a summary of the past. However, users need more than just observation of the current situation; they also need to predict the future. Vector fields can intuitively display the travel trends of traffic objects, thereby enabling the analysis of future traffic congestion. Secondly, while heatmaps are more effective than vector field maps in displaying the travel density of a specific area, they cannot show the direction and speed of vehicle movement. Therefore, compared to heatmaps, users can gain a more intuitive and in-depth understanding of vehicle travel trends through vector fields, promptly identify traffic congestion trends, and take proactive measures.
[0160] 3.2 Traffic Congestion Index Analysis
[0161] This invention calculates the traffic congestion index ε of a certain business district based on formula (8). p The experiment used a traditional congestion index algorithm to calculate the traffic congestion coefficient of the commercial area, and also provided a passenger flow index for comparison. The passenger flow index data came from a public traffic big data platform on a search website. The experimental results from 8:00 to 20:00 are shown in Table 5.
[0162] Table 5. Congestion Index Results for Xidan Business District
[0163] time Congestion Index Based on Vector Field Traditional congestion index Passenger flow index Percentage of difference 08:00 1.529 1.497 9.20 -0.0213 09:00 1.521 1.482 9.24 -0.0263 10:00 1.470 1.507 8.65 +0.0245 11:00 1.438 1.477 8.58 +0.0264 12:00 1.292 1.265 7.14 -0.0213 13:00 1.379 1.356 7.67 -0.0169 14:00 1.510 1.507 9.14 -0.0019 15:00 1.527 1.488 8.02 -0.0262 16:00 1.636 1.634 10.1 -0.0012 17:00 1.732 1.731 11.8 -0.0005 18:00 1.982 1.953 12.48 -0.0148 19:00 1.582 1.621 10.6 +0.0241 20:00 1.387 1.398 8.48 +0.0078
[0164] The difference between the traditional congestion index and the traffic congestion index based on the vector field in this embodiment of the invention is divided by the traditional congestion index to calculate the percentage difference. Table 5 shows that the average error of the traffic congestion index based on the vector field in this embodiment of the invention relative to the traditional congestion index is 0.016. This small error indicates that the traffic congestion index based on the vector field in this embodiment of the invention can effectively reflect traffic congestion conditions.
[0165] Furthermore, as shown in Table 5, the traffic congestion level in this commercial area was smooth at 10:00, 11:00, 12:00, 13:00, and 20:00. The congestion level was slow at 08:00, 09:00, 14:00, 15:00, 16:00, 17:00, and 19:00, and congested at 18:00, with no severe congestion observed. The slow traffic at 08:00 and 09:00 was due to the morning rush hour. The commercial center in this area is open from 10:00 to 22:00, so the area experienced a short period of congestion at 10:00, but it was not significant. The peak period was from 15:00 to 19:00, reaching its highest point at 18:00, and the congestion eased at 20:00. For users traveling at a specific time, the traffic congestion index provided by this embodiment of the invention can quickly provide information about the congestion situation at their destination, thereby determining their travel mode or itinerary. For management departments, this evaluation result can be used to implement appropriate management measures for parking lots and surrounding traffic within the commercial area.
[0166] Compared to traditional congestion index algorithms, the vector field-based traffic congestion index algorithm improves query efficiency due to preprocessing and data simplification operations during vector field generation. This experiment used a computer configured with a 64-bit Windows operating system, a Core i5-9400F processor (2.90GHz), 16 GB of RAM, and a 1024 GB SSD. For 13.68 million trajectory points from 11,875 taxis, a single congestion index query took less than 2 seconds, achieving real-time performance. This represents a significant improvement in query efficiency compared to traditional GPS trajectory filtering algorithms performing the same index query.
[0167] In summary, the traffic congestion analysis method based on vector fields provided in this invention can generate a vector field based on the trajectory data of road vehicles in a target area within a target time interval. The vector field reflects the traffic congestion situation in the target area within a target time interval, enabling effective mining of trajectory data and providing a more intuitive and comprehensive assessment of the traffic congestion situation in the target area within a target time interval. It can also provide a timely and accurate traffic congestion index based on the travel purpose of users.
[0168] Figure 11 A schematic diagram of the structure of a traffic congestion analysis device based on a vector field provided in an embodiment of the present invention is shown. Figure 11As shown, the traffic congestion analysis device 1100 based on vector fields includes: a trajectory data acquisition module 1110, used to acquire trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals; a spatial grid construction module 1120, used to construct a spatial grid based on the target area; and a travel volume determination module 1130, used to determine the travel volume of each vehicle in each time interval based on the trajectory data of each vehicle, wherein the travel volume of each vehicle includes at least a starting position and a speed vector, and the speed vector is based on the travel speed and travel distance of each vehicle in each time interval. The system comprises: a target grid determination module 1140, used to determine the target grid in the spatial grid that matches the starting position of each vehicle in each time interval; a vector projection module 1150, used to project the velocity vectors of all vehicles in the target time interval onto their respective matching target grids to obtain the velocity vector projection result of each grid in the spatial grid; and a vector field generation module 1160, used to generate a vector field based on the velocity vector projection results of all grids in the spatial grid, wherein the vector field is used to reflect the traffic congestion situation of the target area in the target time interval.
[0169] In some embodiments, the target mesh determination module includes:
[0170] The selection area creation unit is used to create a selection area centered on each grid in the spatial grid, based on a preset size;
[0171] The target grid determination unit is used to determine the grid corresponding to the selected area where the starting position of each vehicle is located in each time interval as the target grid for matching the movement of each vehicle in the spatial grid in each time interval.
[0172] In some embodiments, the vector projection module is specifically used for:
[0173] Based on the inverse distance weighting method, the velocity vectors of multiple vehicles matching the same target grid are projected onto the velocity vector of the target grid.
[0174] In some embodiments, the vector projection module includes:
[0175] A weight determination unit is used to determine the weights of the velocity vectors of multiple vehicles corresponding to the same target grid, wherein the weights of the velocity vectors of the multiple vehicles decrease as the distance from the starting position of the multiple vehicles to the center point of the target grid increases;
[0176] The vector projection unit is used to perform a weighted summation of the velocity vectors of the multiple vehicles based on their weights, so as to obtain the velocity vector projection result of the multiple vehicles onto the target grid.
[0177] In some embodiments, the apparatus further includes:
[0178] The trip density determination module is used to determine the number of trips of vehicles that match each grid in the spatial grid, which is taken as the trip density of each grid in the spatial grid.
[0179] The vector field generation module is specifically used for:
[0180] The vector field is generated based on the velocity vector projection results and travel density of all grids in the spatial grid.
[0181] In some embodiments, the apparatus further includes:
[0182] The target sub-region determination module is used to select part or all of the region in the target region to form a target sub-region.
[0183] A spatial subgrid determination module is used to determine the spatial subgrid corresponding to the target sub-region in the spatial grid;
[0184] The vector determination module is used to sum the velocity vector projection results of all grids in the spatial subgrid as the velocity vector of the target sub-region;
[0185] The traffic congestion index determination module is used to determine the traffic congestion index of the target sub-region based on the travel speed in the speed vector of the target sub-region and the free flow speed of the target sub-region.
[0186] In some embodiments, the traffic congestion index determination module is specifically used for:
[0187] The average actual travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the travel speed in the velocity vector of the target sub-region.
[0188] The average free-flow travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the free-flow velocity of the target sub-region.
[0189] The traffic congestion index of the target sub-region is determined based on the ratio of the average actual travel time to the average free-flow travel time.
[0190] Figure 12 An electronic device according to an embodiment of the present invention is shown. For example... Figure 12As shown, the electronic device 1200 includes: at least one processor 1210, and a memory 1220 communicatively connected to the at least one processor 1210, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform a method.
[0191] Specifically, the aforementioned memory 1220 and processor 1210 are connected together via bus 1230. These can be general-purpose memory and processors, without specific limitations. When processor 1210 runs the computer program stored in memory 720, it can execute the functions described in this embodiment of the invention. Figures 1 to 11 The described operations and functions.
[0192] In this embodiment of the invention, the electronic device 1200 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile computing device, smartphone, tablet computer, personal digital assistant (PDA), handheld device, messaging device, wearable computing device, etc.
[0193] This invention also provides a storage medium storing a computer program that, when executed by a processor, implements a method. Specific implementation details can be found in the method embodiments and will not be repeated here. Specifically, a system or apparatus equipped with a storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute instructions stored in the storage medium. The program code read from the storage medium itself can implement the functions of any of the embodiments described above; therefore, machine-readable code and the storage medium storing machine-readable code constitute a part of this invention.
[0194] Storage media include, but are not limited to, floppy disks, hard disks, magneto-optical disks, optical disks, magnetic tapes, non-volatile memory cards, and ROMs. Program code can also be downloaded from server computers or the cloud via communication networks.
[0195] It should be noted that not all steps and modules in the above processes and system structures are necessary; some steps and units can be omitted as needed. The execution order of each step is not fixed and can be determined as required. The device structures described in the above embodiments can be physical structures or logical structures. A module or unit may be implemented by the same physical entity, a module or unit may be implemented by multiple physical entities respectively, or a module or unit may be jointly implemented by multiple components in multiple independent devices.
[0196] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. It can be applied to various fields suitable for embodiments of the present invention. Other modifications can be readily implemented by those skilled in the art. Therefore, without departing from the general concept defined by the claims and their equivalents, embodiments of the present invention are not limited to the specific details and illustrations shown and described herein.
Claims
1. A traffic congestion analysis method based on vector fields, characterized in that, include: Acquire trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals; Based on the target region, a spatial grid is constructed; Based on the trajectory data of each vehicle, the travel volume of each vehicle in each time interval is determined. The travel volume of each vehicle includes at least the starting position and the speed vector, which is generated based on the travel speed and travel direction of each vehicle in each time interval. Based on the starting position of each vehicle in each time interval, determine the target grid in the spatial grid that matches the travel momentum of each vehicle in each time interval. Project the velocity vectors of all vehicles within the target time interval onto their respective matching target grids to obtain the velocity vector projection result of each grid in the spatial grid. Based on the velocity vector projection results of all grids in the spatial grid, a vector field is generated, wherein the vector field is used to reflect the traffic congestion situation and traffic congestion trend of the target area in the target time interval; The step of projecting the velocity vectors of all vehicles within the target time interval onto their respective matched target grids to obtain the velocity vector projection result of each grid in the spatial grid includes: Based on the inverse distance weighting method, the velocity vectors of multiple vehicles matching the same target grid are projected onto the velocity vector of the target grid. The projection result of the velocity vectors of multiple vehicles matching the same target grid onto the velocity vector of the target grid, based on the inverse distance weighting method, includes: Determine the weights of the velocity vectors of multiple vehicles corresponding to the same target grid, wherein the weights of the velocity vectors of the multiple vehicles decrease as the distance from the starting position of the multiple vehicles to the center point of the target grid increases; Based on the weights of the velocity vectors of the multiple vehicles, the velocity vectors of the multiple vehicles are weighted and summed to obtain the velocity vector projection result of the velocity vectors of the multiple vehicles onto the target grid. The step of determining the target grid in the spatial grid to match the travel momentum of each vehicle in each time interval based on the starting position of each vehicle in each time interval includes: Based on a preset size, a selection area is established with each grid in the spatial grid as the center; The grid corresponding to the selected area where the starting position of each vehicle is located in each time interval is used as the target grid in the spatial grid to match the movement of each vehicle in each time interval. The selection area is 5 grid squares wide; After determining the target grid in the spatial grid that matches the travel momentum of each vehicle in each time interval based on the starting position of each vehicle in each time interval, the method further includes: The number of trips of vehicles that match each grid in the spatial grid is determined as the trip density of each grid in the spatial grid; The generation of a vector field based on the velocity vector projection results of all grids in the spatial grid includes: The vector field is generated based on the velocity vector projection results and travel density of all grids in the spatial grid.
2. The traffic congestion analysis method based on vector fields as described in claim 1, characterized in that, The method further includes: Selecting part or all of the target area to form a target sub-region; Determine the spatial subgrid corresponding to the target sub-region within the spatial grid; The sum of the velocity vector projections of all grids in the spatial subgrid is taken as the velocity vector of the target sub-region. The traffic congestion index of the target sub-region is determined based on the travel speed in the velocity vector of the target sub-region and the free-flow velocity of the target sub-region.
3. The traffic congestion analysis method based on vector fields as described in claim 2, characterized in that, The step of determining the traffic congestion index of the target sub-region based on the travel speed in the velocity vector of the target sub-region and the free-flow velocity of the target sub-region includes: The average actual travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the travel speed in the velocity vector of the target sub-region. The average free-flow travel time of the target sub-region is determined based on the instantaneous travel distance of the vehicle and the free-flow velocity of the target sub-region. The traffic congestion index of the target sub-region is determined based on the ratio of the average actual travel time to the average free-flow travel time.
4. A traffic congestion analysis device based on vector fields, characterized in that, include: The trajectory data acquisition module is used to acquire trajectory data of road vehicles in a target area within a target time interval, wherein the target time interval consists of multiple equal time intervals; A spatial grid construction module is used to construct a spatial grid based on the target region; The travel volume determination module is used to determine the travel volume of each vehicle in each time interval based on the trajectory data of each vehicle. The travel volume of each vehicle includes at least the starting position and the speed vector, and the speed vector is generated based on the travel speed and travel direction of each vehicle in each time interval. The target grid determination module is used to determine the target grid in the spatial grid that matches the travel volume of each vehicle in each time interval, based on the starting position of each vehicle in each time interval. The vector projection module is used to project the velocity vectors of all vehicles in the target time interval onto their respective matching target grids to obtain the velocity vector projection result of each grid in the spatial grid. The vector field generation module is used to generate a vector field based on the velocity vector projection results of all grids in the spatial grid, wherein the vector field is used to reflect the traffic congestion situation and traffic congestion trend of the target area in the target time interval. The vector projection module is specifically used for: Based on the inverse distance weighting method, the velocity vectors of multiple vehicles matching the same target grid are projected onto the velocity vector of the target grid. The vector projection module includes: A weight determination unit is used to determine the weights of the velocity vectors of multiple vehicles corresponding to the same target grid, wherein the weights of the velocity vectors of the multiple vehicles decrease as the distance from the starting position of the multiple vehicles to the center point of the target grid increases; The vector projection unit is used to perform a weighted summation of the velocity vectors of the multiple vehicles based on their weights, so as to obtain the velocity vector projection result of the multiple vehicles onto the target grid. The target mesh determination module includes: The selection area creation unit is used to create a selection area centered on each grid in the spatial grid, based on a preset size; The target grid determination unit is used to determine the grid corresponding to the selected area where the starting position of each vehicle is located in each time interval as the target grid for matching the movement of each vehicle in the spatial grid in each time interval. The selection area is 5 grid squares wide; The trip density determination module is used to determine the number of trips of vehicles that match each grid in the spatial grid, which is taken as the trip density of each grid in the spatial grid. The vector field generation module is specifically used for: The vector field is generated based on the velocity vector projection results and travel density of all grids in the spatial grid.
5. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of any one of claims 1-3.
6. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1-3.