Traffic flow statistical method and device based on trajectory data and storage medium

By grouping and deduplicating trajectory data based on a map grid and combining it with a distributed computing framework, the high computational complexity and data redundancy problems of trajectory data traffic flow statistics in the existing technology are solved, achieving efficient and accurate traffic flow statistics.

CN120673593APending Publication Date: 2025-09-19TSINGHUA UNIVERSITY

Patent Information

Application Number
CN202510820957.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

When existing technologies use vehicle trajectory data to perform traffic flow statistics, the computational complexity is high and the data redundancy is serious, making it difficult to achieve efficient and accurate traffic flow analysis.

Method used

A road matching method based on map grid is adopted to group and deduplicate trajectory data. Combined with the distributed computing framework, the map grid is used for road matching and deduplication, which narrows the matching range and improves statistical efficiency and accuracy.

Benefits of technology

It significantly reduces the computational complexity of road matching, improves the efficiency and accuracy of traffic flow statistics, and can process large-scale trajectory data to meet real-time traffic management needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673593A_ABST
    Figure CN120673593A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow statistical method based on trajectory data, electronic equipment and a storage medium. The method comprises the following steps: grouping track data collected by vehicles in a target statistical time period, and respectively obtaining a group of track data corresponding to each vehicle; executing the following steps aiming at each group of track data to respectively obtain path road sequence information of the corresponding vehicle: selecting to-be-matched track points from the group of track data; respectively determining a map grid associated with each to-be-matched track point, and performing road matching in a spatial range included by the map grid to obtain road information corresponding to each to-be-matched track point; after all the to-be-matched track points are sorted according to the collection time, road information de-duplication processing of adjacent collection time is carried out, and path road sequence information is obtained; and according to the path road sequence information of all vehicles, performing statistics to obtain corresponding road traffic flow. According to the method, the calculation complexity of road matching is remarkably reduced, and the flow statistics efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to but is not limited to the field of intelligent transportation and big data processing technology, and in particular to a traffic flow statistics method, electronic device and storage medium based on trajectory data. Background Art

[0002] In the field of intelligent transportation, efficient calculation and analysis of traffic flow is a critical task. Traditional methods typically rely on fixed sensors (such as ground loops and cameras) or fixed-point observations to count vehicle traffic. However, these methods have limited coverage and fail to fully reflect the dynamics of urban traffic flows. In recent years, with the massive acquisition of spatiotemporal data such as satellite positioning trajectory data and mobile phone signaling data, it has become possible to calculate traffic flow using vehicle trajectory data. This type of trajectory data has wide coverage and high spatiotemporal resolution, enabling detailed characterization of vehicle movement within road networks. However, directly calculating traffic flow based on large-scale trajectory data faces challenges such as computational complexity and data redundancy, and existing technologies have significant limitations in terms of efficiency and accuracy. Summary of the Invention

[0003] The embodiments of the present disclosure provide a traffic flow statistics method, electronic device, and storage medium based on trajectory data, which matches trajectory points to roads based on a map grid and deduplicates roads, significantly reducing the computational complexity of road matching and improving statistical efficiency and accuracy.

[0004] The present disclosure provides a method for counting traffic flow based on trajectory data, including: The trajectory data collected from the vehicles during the target statistical period are grouped to obtain a set of trajectory data corresponding to each vehicle; wherein each set of trajectory data includes trajectory data of at least one trajectory point; For each set of trajectory data, perform the following steps to obtain the road sequence information of the corresponding vehicle: Select all or part of the trajectory points from the set of trajectory data as trajectory points to be matched; Determine the map grid associated with each to-be-matched trajectory point, perform road matching within the spatial range of the map grid, and obtain road information corresponding to each to-be-matched trajectory point; After sorting all the to-be-matched trajectory points by acquisition time, duplicate road information of adjacent acquisition times is removed to obtain the route road sequence information; Obtaining the road traffic flow during the target statistical period based on the route sequence information of all the vehicles; The associated map grids include: the map grid to which the track point belongs; or the associated map grids include: the map grid to which the track point belongs, and adjacent map grids.

[0005] The present disclosure also provides a method for counting traffic flow based on trajectory data, including: Obtaining trajectory data collected by vehicles during a target statistical period, and dividing the trajectory data into a plurality of subsets to be counted according to a preset trajectory data division strategy; The plurality of subsets of data to be counted are distributed to at least two computing nodes to perform traffic flow statistics according to the method described in the above embodiment, and statistical results are obtained respectively.

[0006] The present disclosure also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the traffic flow statistics method based on trajectory data as described in any embodiment of the present disclosure.

[0007] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for counting traffic flow based on trajectory data as described in any embodiment of the present disclosure is implemented.

[0008] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. Other advantages of the present application can be realized and obtained by the solutions described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0010] Figure 1 This is a flow chart of a traffic flow statistics method based on trajectory data in an embodiment of the present disclosure; Figure 2 A schematic diagram of a grid and trajectory points in an embodiment of the present disclosure; Figure 3 This is a flowchart of another method for traffic flow statistics based on trajectory data in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0011] This application describes multiple embodiments, but this description is exemplary rather than restrictive, and it will be apparent to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described herein. Although many possible feature combinations are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0012] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be understood by those skilled in the art, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to performing their steps in the order written, and those skilled in the art can readily understand that these orders can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0013] Traffic flow statistics are a fundamental function of intelligent traffic management systems. With the increasing prevalence of various vehicles equipped with positioning capabilities, new traffic flow statistics solutions have emerged based on the real-time trajectory data reported by these vehicles. In some feasible solutions, vehicle-based positioning devices report raw trajectory data in real time. A server then performs map matching on this trajectory data, mapping it to roads or road segments, and then further calculates the traffic flow on these roads or road segments. For example, shortest path algorithms and hidden Markov models (HMMs) are used to map-match trajectory points to infer which roads a vehicle has traveled. These methods work well with small amounts of data but are inefficient when dealing with massive amounts of trajectory data. Each trajectory often contains hundreds or thousands of points with positioning data, while city-level trajectory data can contain hundreds of millions of points. Performing complex point-by-point map matching calculations consumes enormous computing resources and time. Furthermore, these map matching operations are performed on a vehicle-by-vehicle basis, lacking global optimization measures and failing to fully exploit the spatial repetitiveness of trajectory data, leading to serious duplicate calculations. With the explosive growth of traffic data, more efficient traffic flow statistics solutions are needed.

[0014] The present disclosure provides a method for traffic flow statistics based on trajectory data, such as Figure 1 Shown, including: Step 110: Grouping the trajectory data collected from the vehicles during the target statistical period to obtain a set of trajectory data corresponding to each vehicle; wherein each set of trajectory data includes trajectory data of at least one trajectory point; Step 120: For each set of trajectory data, perform the following steps to obtain the corresponding vehicle's route sequence information: Step 121 , selecting all or part of the trajectory points from the set of trajectory data as trajectory points to be matched; Step 122: Determine the map grid associated with each to-be-matched trajectory point, perform road matching within the spatial range of the map grid, and obtain road information corresponding to each to-be-matched trajectory point. Step 123, after sorting all the to-be-matched trajectory points by acquisition time, deduplication processing is performed on road information with adjacent acquisition times to obtain the route road sequence information; Step 130, obtaining the road traffic flow during the target statistical period based on the road sequence information of all the vehicles; The associated map grids include: the map grid to which the track point belongs; or the associated map grids include: the map grid to which the track point belongs, and adjacent map grids.

[0015] In some exemplary embodiments, the target statistical period includes one or more, and the above steps 110 - 130 are respectively performed for each target statistical period to perform traffic statistics and obtain corresponding statistical results.

[0016] The target statistical period represents the period during which traffic flow statistics need to be performed. In some exemplary embodiments, the duration of the target statistical period is a set duration, for example, 10 minutes, 30 minutes, 60 minutes, etc. For example, if it is necessary to count the traffic flow from 7 to 9 a.m. every day, it can be divided into four 30-minute target statistical time periods for statistics to obtain traffic flow statistics for four time periods. It can also be divided into two 60-minute target statistical time periods for statistics to obtain traffic flow statistics for two time periods. Alternatively, these two hours can be regarded as a whole target statistical time period for statistics to obtain traffic flow statistics for these two hours. It can be understood that the duration of the target statistical period, the corresponding time start and end points, and the number of target statistical time periods can be flexibly determined according to application needs and are not limited to specific aspects.

[0017] In some exemplary embodiments, the trajectory data includes geographic coordinate data, which includes longitude and latitude, or further includes altitude. Each trajectory point corresponds to a piece of trajectory data.

[0018] In some exemplary embodiments, the trajectory data further includes a collection time. It can be appreciated that arranging the trajectory points included in a set of trajectory data in order of collection time forms the vehicle's driving trajectory during the target statistical period, also referred to as the vehicle's travel distance during the target statistical period.

[0019] In some exemplary embodiments, the geographic coordinate data is determined based on one or more of the following sensor modules deployed in the vehicle: a satellite positioning module, a wireless communication module, a gyroscope, an accelerometer, etc. The wireless communication module includes one or more of the following: a 4G / 5G / LTE mobile communication module, a Wifi wireless communication module, etc. The satellite positioning module includes: a GPS positioning module or a Beidou satellite positioning module. Among them, the geographic coordinate data determined by the wireless communication module can be coordinate data determined based on relevant data in the wireless communication signaling. The trajectory data can be trajectory data collected and directly reported by the vehicle, or it can be trajectory data obtained by processing and converting other data collected and reported by the vehicle by an intermediate node. The above aspects are not limited to the content of the examples disclosed herein.

[0020] It should be noted that in the embodiments of the present disclosure, the vehicle collecting trajectory data and reporting it to a server or cloud system is equivalent to a terminal device deployed in the vehicle collecting trajectory data and reporting it to a server or cloud system. The terminal device may be an onboard terminal device integrated into the vehicle, or a separate user terminal device that can be used independently by the user, and is not limited to a specific aspect. The vehicle may be a dedicated trajectory data collection vehicle, or a private car, bus, etc. that participates in data collection. In the embodiments of the present disclosure, the road is a complete actual road or a portion of an actual road (also referred to as a road segment) that needs to be distinguished in traffic flow statistics.

[0021] In step 121, all or some of the trajectory points included in the set of trajectory data can be selected. Partial trajectory points are those that meet pre-set conditions. Selecting a subset of trajectory points for subsequent road matching and data statistics can appropriately reduce the amount of data to be calculated and improve statistical efficiency.

[0022] In step 122, for each trajectory point, road matching is performed within the spatial range of the associated map grid, effectively narrowing the scope of map data for road matching and improving matching efficiency. In step 123, the road information corresponding to the trajectory points of the same vehicle is deduplicated over time, resulting in a route road sequence that eliminates redundant road information. This overcomes the impact of duplicate road information on the accuracy of traffic statistics.

[0023] As can be seen, in some exemplary embodiments, road matching is performed within the spatial range of the map grid to which a track point belongs; in other exemplary embodiments, road matching is performed within the spatial range of the map grid to which a track point belongs and its neighboring map grids. This means that the spatial range for road matching is expanded, avoiding road matching failures caused by relying solely on the limited spatial range of the map grid in certain scenarios.

[0024] In some exemplary embodiments, the map grid to which the track point belongs is determined according to the following method: According to the trajectory data of the trajectory point, a set encoding algorithm is used to calculate the corresponding grid index; Among them, each grid index uniquely corresponds to a map grid.

[0025] The grid index corresponds one-to-one to each divided map grid. Track points that fall within the same map grid will receive the same grid index (value) calculated based on the set encoding algorithm. This allows you to quickly determine the map grid to which the track point belongs.

[0026] In some exemplary embodiments, the map grid (grid for short) is divided by any of the following methods: fixed grid division with a set shape under a set accuracy, spatial multi-branch tree division.

[0027] For example, if the accuracy is set to 100 meters and the shape is set to square, multiple map grids will be formed, each of which is a square area with a side length of 100 meters. Alternatively, the accuracy can be set to 200 meters, or the shape can be set to hexagonal.

[0028] In some exemplary embodiments, the spatial multitree includes a spatial quadtree or a spatial octree, and the spatial quadtree or the spatial octree is used to partition the map to obtain a map grid.

[0029] In some exemplary embodiments, the map grid is obtained by spatial quadtree partitioning, and the encoding algorithm is set to GeoHash algorithm. It is understood that the encoding algorithm can be set corresponding to the map grid partitioning method and is not limited to a specific encoding algorithm.

[0030] In some exemplary embodiments, the divided map grid data is indexed and stored using a grid index. In some exemplary embodiments, a fast search structure, such as a hash table or R-tree, is established based on the grid index. Thus, the corresponding map grid data can be quickly retrieved based on the grid index.

[0031] In some exemplary embodiments, the map grid data includes a grid index; or further includes a road set within the grid range. The road set includes road identifiers within the grid range. After gridding the map data, grid road mapping data is generated, which reflects the correspondence between the grid index and the road set. For example, a corresponding fast search structure—a hash table or R-tree—is established for the grid road mapping data. Thus, after calculating the grid index based on the trajectory data of a trajectory point or the coordinate data of any location, the corresponding road set can be quickly retrieved based on the grid index.

[0032] In some exemplary embodiments, the map grid data includes: a grid index; and road information within the grid range, wherein the road information includes: a road identifier and the geographic coordinate data corresponding to the road within the grid.

[0033] Optionally, the map grid data further includes geographic coordinate information corresponding to the grid range, which can be used to determine whether the track point is in the edge area of ​​the map grid to which it belongs.

[0034] It should be noted that a road sign uniquely indicates a complete road or road segment (a portion of a road) that needs to be distinguished in traffic flow statistics. The road information corresponding to multiple adjacent map grids can include the same road sign, indicating that a road (road segment) passes through multiple map grids.

[0035] It should be noted that the selected trajectory points in step 121 are based on pre-set conditions. Trajectory points that do not meet the pre-set conditions and are eliminated are those that have no impact on the vehicle's road sequence information. For example, due to a short collection time interval, a large number of trajectory points are generated on the same road. Any one or more of the multiple trajectory points generated in this short period of time can represent that the vehicle passed through the road during this short period of time, without requiring all of the multiple trajectory points. The pre-set conditions can be determined based on one or more factors such as the collection density of trajectory data, vehicle speed, and average road speed, and are not limited to specific factors.

[0036] In some exemplary embodiments, the partial trajectory points are trajectory points that satisfy at least one of the following conditions: The acquisition time difference between trajectory points at adjacent acquisition times is greater than the time threshold; The distance difference between trajectory points at adjacent acquisition times is greater than the distance threshold.

[0037] It can be seen that when the time difference between trajectory points collected at adjacent times is small, the vehicles are more likely to have been on the same road. Filtering out these trajectory points and retaining trajectory points with time differences greater than the time threshold has no significant impact on the road determination of the vehicle's path. When the distance difference between trajectory points collected at adjacent times is small, the vehicles are more likely to have been on the same road. Filtering out these trajectory points and retaining trajectory points with distance differences greater than the time threshold has no significant impact on the road determination of the vehicle's path. You can select trajectory points that meet either or both conditions, further reducing the number of trajectory points required for subsequent processing and improving overall computational efficiency.

[0038] In some exemplary embodiments, when the track point is located in an edge area of ​​the map grid to which it belongs, the associated map grids include: the map grid to which the track point belongs, and adjacent map grids; In a case where the track point is located in a non-edge area of ​​the map grid to which it belongs, the associated map grid includes: the map grid to which the track point belongs.

[0039] In some exemplary embodiments, the adjacent map grids include: all map grids adjacent to the map grid to which the track point belongs; or, map grids adjacent to the edge area where the track point is located; or, the adjacent map grid that is closest to the track point.

[0040] In some exemplary embodiments, the edge area is defined as an area within the map grid that is within X meters of the grid boundary, where X is a number greater than 0. Accordingly, the non-edge area is defined as an area within the map grid excluding the edge area. Alternatively, the edge area may be defined in other ways, not limited to the exemplary aspects.

[0041] In some exemplary embodiments, the range of included adjacent map grids is determined based on one or more of the following factors: accuracy of the trajectory data, accuracy of the map data, and the location of the trajectory point at the edge of the map grid to which it belongs.

[0042] For example, Figure 2 In the map grids 1-9 shown, vehicle A's track point 1 is located in a non-edge area of ​​grid 1, and its associated map grids include: its home grid, grid 1. Vehicle B's track point 2 is located in an edge area of ​​grid 5, and its associated map grids include: its home grid, grid 5, and its adjacent grids, grids 1, 2, and 4. Vehicle C's track point 2 is located in an edge area of ​​grid 6, and its associated map grids include: its home grid, grid 6, and its adjacent grid, grid 3.

[0043] Due to the accuracy of vehicle-reported trajectory data, the determination of the map grid to which a track point belongs based on its trajectory data may be inaccurate. Road matching within the spatial range corresponding to this potentially inaccurate map grid may result in matching failures or errors, which in turn affects the accuracy of traffic statistics. Therefore, appropriately expanding the spatial range for road matching can effectively improve matching success rate and accuracy.

[0044] In some exemplary embodiments, performing road matching within a spatial range included in the map grid includes: searching grid road mapping data according to a grid index of the map grid to determine roads included in the map grid; Road matching is performed within a spatial range corresponding to the roads included in the map grid according to the trajectory data of the trajectory points.

[0045] The grid road mapping data records the correspondence between each map grid and the road set included in that grid. In some exemplary embodiments, each piece of mapping data includes a grid index and a set of road identifiers. Grid data is pre-divided, and a corresponding quick search structure is established to store the grid road mapping data. This allows for quick retrieval of corresponding road identifiers based on the grid index before road matching, thereby obtaining the corresponding geographic coordinate data for each road, enabling road matching for trajectory points.

[0046] In some exemplary embodiments, performing road matching within a spatial range corresponding to the roads included in the map grid based on the trajectory data of the trajectory point includes: According to the trajectory data of the trajectory point, a nearest neighbor algorithm or a distance threshold algorithm is used to perform road matching in the geographic coordinate data corresponding to the roads included in the map grid.

[0047] It can be seen that compared to some feasible solutions that perform global map matching for each trajectory point, the road matching solution provided by the embodiment of the present disclosure performs road matching within the spatial range corresponding to a smaller map grid, greatly reducing the data matching range, reducing matching complexity, and improving matching efficiency. For example, if N trajectory points are each matched for a road, the road matching complexity is O(N×M) in the case of M roads globally, and O(N×K) in the case of K roads in a single grid. It can be seen that the number of roads K included in a single grid is much smaller than the number of roads M globally, which can significantly reduce the computational complexity of road matching, speed up road matching, and ensure the real-time performance of traffic flow statistics.

[0048] Execute step 122 to obtain the road information corresponding to each trajectory point to be matched. For the trajectory points selected by the vehicle during the target statistical period, sort them by time to form the road sequence information that the vehicle passed during the target statistical period. Before deduplication, this is recorded as the initial road sequence information. For example, for seven candidate trajectory points, the initial road sequence information is: Road 1, Road 2, Road 2, Road 2, Road 3, Road 4, Road 4.

[0049] For traffic flow statistics, each road traversal typically contributes to one traffic count. This means that for Road 2, the vehicle only passed through it once during the target statistical period. If a simple count is performed based on the initial road sequence information, it might be counted as passing through it three times, resulting in inaccurate statistics.

[0050] Therefore, the traffic flow statistics solution provided by the embodiment of the present disclosure performs road deduplication processing on the initial route road sequence information generated after road matching for each vehicle to avoid the impact of multiple route information of the same road on the accuracy of traffic flow statistics. This deduplication processing includes: Sort the road information determined by the completed road matching according to the collection time of the trajectory points; Clustering the road information at adjacent times to obtain a clustered road information sequence; The road information at adjacent times is clustered according to road signs, and in the clustered road information sequence, adjacent road signs are different.

[0051] For example, for the initial road sequence information: Road 1, Road 2, Road 2, Road 2, Road 3, Road 4, Road 4, after removing duplicates from adjacent collection times, the resulting clustered road sequence information is: Road 1, Road 2, Road 3, Road 4. Based on this, when counting traffic flow on Road 2, only the vehicle passing through Road 2 once is counted.

[0052] In some exemplary embodiments, the road traffic flow obtained by statistics includes: at least one flow record; the flow record includes: map grid information or road information, and the corresponding number of vehicles.

[0053] Based on the trajectory data of many vehicles, the solution provided by the embodiment of the present disclosure can be used to obtain the traffic flow within each map grid during the target statistical period, or the traffic flow on each road.

[0054] As can be seen, the road sequence information obtained after deduplication of road information collected at adjacent times does not include multiple counts of the same road section, thus avoiding the possibility of duplicate counting. This also effectively reduces the amount of data required to calculate traffic flow statistics based on the road sequence information of a large number of vehicles, thus achieving statistical data compression.

[0055] The traffic flow statistics method provided by the embodiment of the present disclosure divides the geographical space where the urban road network is located into grids and calculates the grid index of the trajectory points to achieve rapid matching of the trajectory points to the roads. The map grid is divided in advance, each corresponding to a unique grid index, and the road information falling into the grid is stored accordingly to form mapping data. A quick search structure is established based on the grid index to store the grid road mapping data. Based on this, during the traffic statistics process, for a large number of trajectory points, the grid index is first calculated, and the associated grids and the road information included are determined using the quick search results. Road matching is performed within the spatial range corresponding to the associated grids, which greatly reduces the amount of road matching calculations and improves the calculation speed.

[0056] To address the problem of duplicate counting and statistical bias caused by repeated track points within the same vehicle trajectory, this paper proposes a clustering deduplication algorithm within the vehicle's itinerary. This algorithm aggregates data within each vehicle's trajectory, ensuring that each vehicle passing through a particular road is counted only once in traffic statistics. This improves statistical accuracy and reduces the amount of statistical data required.

[0057] The traffic flow statistics solution provided by the disclosed embodiments optimizes one or more aspects, including road matching, trajectory point screening, and deduplication of en route road sequences. This reduces computational complexity, improves statistical efficiency, and ensures accurate traffic flow statistics. This solution is particularly effective for city-level traffic management systems that rely on trajectory data collected by a large number of vehicles (terminals) to perform traffic flow statistics, ensuring efficient statistical execution and meeting real-time requirements.

[0058] When data is massive and traffic conditions are changing rapidly, efficient computation is difficult to achieve with a single machine. Therefore, the disclosed embodiment combines the aforementioned trajectory data-based traffic flow statistics method with a distributed computing framework, fully utilizing parallel computing resources to rapidly process massive trajectory data.

[0059] The present disclosure also provides a method for traffic flow statistics based on trajectory data, such as Figure 3 Shown, including: Step 310: Acquire trajectory data collected by vehicles during a target statistical period, and divide the trajectory data into a plurality of subsets to be statistically analyzed according to a preset trajectory data division strategy; Step 320: distribute the plurality of subsets of data to be counted to at least two computing nodes to perform traffic flow statistics according to the method described in any of the aforementioned embodiments, and obtain statistical results respectively.

[0060] In some exemplary embodiments, the statistical result includes at least one traffic flow record within the target statistical period; the traffic flow record includes: map grid information and / or road information, and the corresponding number of vehicles.

[0061] In some exemplary embodiments, the method further comprises: Step 330 : Based on the statistical results of each computing node, a reduction operation is performed according to the map grids and / or roads to obtain a summarized traffic statistics result.

[0062] As you can understand, given the constraints of a single node's computing resources, the global massive data is partitioned into subsets and distributed to multiple computing nodes. After these nodes complete the statistical calculations for their respective subsets in parallel, the statistical results from each node are aggregated to produce the global data statistics. This overcomes the computational bottleneck of a single computing node, improves the parallelism of statistical operations, accelerates statistical execution efficiency, and fully meets the needs of real-time traffic flow statistics.

[0063] It should be noted that the number of subsets to be counted, obtained by dividing the entire trajectory data, is greater than or equal to the number of computing nodes involved in performing the statistics. In other words, each computing node can perform statistics on one or more subsets of the data to be counted. The number of data subsets and the number of computing nodes can be flexibly determined based on needs and are not limited to specific aspects.

[0064] In some exemplary embodiments, the preset trajectory data division strategy includes one or more of the following: Divide by geographical area of ​​track points and by vehicle batches.

[0065] Among them, one of the above two strategies can be used for division, or the two strategies can be combined for division. For example, the division can be carried out according to the geographical area of ​​the trajectory point, and the trajectory data within the target statistical period can be divided into multiple subsets of statistics according to the geographical area corresponding to the trajectory point, and the statistics can be performed separately on multiple computing nodes. For example, the division can be carried out according to the batch of vehicles, and the trajectory data within the target statistical period can be divided into multiple subsets of statistics according to the vehicle identification corresponding to the trajectory point, and the statistics can be performed separately on multiple computing nodes; wherein, the multiple vehicle batches are obtained according to the vehicle identification, for example, according to the first letter of the license plate number, each first letter corresponds to a vehicle batch, and in the subsets of statistics to be obtained thereby, the trajectory data in the same subset all come from vehicles with license plates with the same first letter.

[0066] For another example, the trajectory data within the target statistical period can be divided by the geographic region corresponding to the trajectory point and the vehicle batch. The division results corresponding to each geographic region are then further divided according to the vehicle batch to obtain the complete subset of statistical data to be counted. Alternatively, the data can be divided first by vehicle batch and then by geographic region.

[0067] In some exemplary embodiments, the division is performed by a geographic area of ​​the track points, where the geographic area is a map grid. One or more neighboring map grids correspond to a geographic area. Optionally, the geographic area is an area defined by geographic data and is not limited to a specific area.

[0068] In some exemplary embodiments, track points are divided by geographic region. This allows for identification of the geographic region based on wireless communication link information reported in the track data. This allows each computing node to focus on data from a local area, reducing cross-regional data communication. Dividing by vehicle batch ensures that track data for the same vehicle is processed by the same computing node, improving the accuracy of trip deduplication.

[0069] As you can understand, after each computing node performs distributed parallel statistics, it obtains local traffic flow statistics, such as the number of vehicles passing through a certain road section (without duplicate counts). Next, through the reduction operation of distributed computing, the statistical results of all settlement nodes are aggregated and merged.

[0070] It is understood that the process of performing a reduction operation in step 330 to obtain the summarized traffic statistics is similar to the reduce phase of MapReduce or the shuffle aggregation of Spark. In some exemplary embodiments, the reduction operation includes: performing a key-value aggregation on the statistical results output by each computing node by road segment identifier or grid index, summing the traffic counts with the same identifier or index, and ultimately obtaining complete global traffic flow statistics, i.e., the summarized traffic statistics.

[0071] In some exemplary embodiments, task scheduling and fault tolerance mechanisms are introduced to account for potential compute node failure or uneven data distribution. For example, the task retry and data backup features built into the MapReduce or Spark frameworks are employed to ensure computational robustness. To address data skew, grid partitioning algorithms and / or trajectory data partitioning strategies can be optimized to achieve a more balanced load across multiple compute nodes, preventing slow performance of certain nodes from hindering overall progress.

[0072] In some exemplary embodiments, the number of nodes participating in load sharing and performing parallel computations dynamically increases or decreases based on the amount of trajectory data or traffic time period, ensuring accurate and timely completion of traffic flow statistics for the target statistical period, meeting the needs of traffic management and travel. Even with billions of trajectory point data, calculations can be completed within a reasonable time. This enables this method to support city-level and even national-level trajectory data traffic flow analysis, providing opportunities for real-time traffic monitoring and big data traffic management.

[0073] The present disclosure also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the traffic flow statistics method based on trajectory data as described in any embodiment of the present disclosure.

[0074] In some exemplary embodiments, the electronic device is a server deployed in the cloud, including one or more computing nodes.

[0075] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for counting traffic flow based on trajectory data as described in any embodiment of the present disclosure is implemented.

[0076] The trajectory data-based traffic flow statistics method provided by the disclosed embodiments significantly reduces the computational effort required for road matching of trajectory points by narrowing the matching range through grid indexing. Compared to global data matching, the matching efficiency is improved by orders of magnitude. Combined with trajectory point screening and multi-node parallel computing, real-time traffic flow statistics are ensured. The intra-trip clustering deduplication algorithm ensures that each vehicle is counted only once on each road, significantly reducing statistical errors caused by duplicate counting and improving the accuracy of statistical data. The distributed parallel processing solution fully meets the statistical needs of various data sizes.

[0077] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the methods, systems, and devices disclosed above may be implemented as software, firmware, hardware, or any combination thereof. In hardware implementations, the division between functional modules / units described above does not necessarily correspond to the division between physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media encompasses both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. A traffic flow statistics method based on trajectory data, characterized in that: include: The trajectory data collected from the vehicles during the target statistical period are grouped to obtain a set of trajectory data corresponding to each vehicle; wherein each set of trajectory data includes trajectory data of at least one trajectory point; For each set of trajectory data, perform the following steps to obtain the road sequence information of the corresponding vehicle: Select all or part of the trajectory points from the set of trajectory data as trajectory points to be matched; Determine the map grid associated with each to-be-matched trajectory point, perform road matching within the spatial range of the map grid, and obtain road information corresponding to each to-be-matched trajectory point; After sorting all the to-be-matched trajectory points by acquisition time, duplicate road information of adjacent acquisition times is removed to obtain the route road sequence information; Obtaining the road traffic flow during the target statistical period based on the route sequence information of all the vehicles; The associated map grids include: the map grid to which the track point belongs; or the associated map grids include: the map grid to which the track point belongs, and adjacent map grids.

2. The method according to claim 1, characterized in that The map grid to which the track point belongs is determined according to the following method: According to the trajectory data of the trajectory point, a set encoding algorithm is used to calculate the corresponding grid index; Among them, each grid index uniquely corresponds to a map grid; The map grid is divided by any of the following methods: fixed grid division with a set shape under a set accuracy, spatial multi-branch tree division.

3. The method according to claim 2, characterized in that The map grid is obtained by using spatial quadtree partitioning, and the set encoding algorithm is the GeoHash algorithm.

4. The method according to claim 1, wherein The partial trajectory points are trajectory points that meet at least one of the following conditions: The acquisition time difference between trajectory points at adjacent acquisition times is greater than the time threshold; The distance difference between trajectory points at adjacent acquisition times is greater than the distance threshold.

5. The method according to any one of claims 1 to 4, characterized in that In the case where the track point is located in an edge area of ​​the map grid to which it belongs, the associated map grids include: the map grid to which the track point belongs, and adjacent map grids; In a case where the track point is located in a non-edge area of ​​the map grid to which it belongs, the associated map grid includes: the map grid to which the track point belongs.

6. The method according to claim 2, 3 or 4, characterized in that: The performing road matching within the spatial range included in the map grid includes: searching grid road mapping data according to a grid index of the map grid to determine roads included in the map grid; Road matching is performed within a spatial range corresponding to the roads included in the map grid according to the trajectory data of the trajectory points.

7. A traffic flow statistics method based on trajectory data, characterized in that: include: Obtaining trajectory data collected by vehicles during a target statistical period, and dividing the trajectory data into a plurality of subsets to be counted according to a preset trajectory data division strategy; The plurality of subsets of to-be-counted data are distributed to at least two computing nodes to perform traffic flow statistics according to the method described in any one of claims 1 to 6, and statistical results are obtained respectively.

8. The method according to claim 7, characterized in that The preset trajectory data division strategy includes one or more of the following: Divided by the geographical area of ​​the trajectory points; Divide by vehicle batches.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the traffic flow statistics method based on trajectory data as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the traffic flow statistics method based on trajectory data as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Road matching method and system based on grid partition, device, and storage medium

    CN109916413A

  • Vehicle moving direction judgment method, device and equipment and storage medium

    CN112147658A

  • Trajectory fitting method and device, electronic equipment and storage medium

    CN112270833A

  • Map matching method and device, electronic equipment and computer readable storage medium

    CN112344947A

  • GPS track data road section flow matching method based on network coding

    CN115662124A

Cited By

  • Main body flow determination method, electronic equipment, storage medium and program product

    CN121963500A