Traffic flow clustering method and device suitable for unstructured road and storage medium

Through the two-stage clustering method, the vehicle orientation and position relationship is used to solve the problems of large amount of calculation and difficulty in dynamic adjustment of traffic flow data processing in the non-structured roads in the existing technology, and efficient and real-time traffic clustering is achieved, and it provides Convenient engineering implementation and traceability analysis.

CN119167191APending Publication Date: 2024-12-20COWA TECHNOLOGY CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411183628.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing clustering method is computationally expensive and time-consuming in the processing of traffic flow data on unstructured roads, making it difficult to dynamically adjust the number of clusters, and the impact of feature engineering is difficult to evaluate, which limits its applicability.

Method used

A two-stage clustering method is adopted: the first stage is clustered according to the vehicle's orientation angle, and the second stage is clustered based on depth-first traversal and horizontal and vertical adjacent range definition to ensure that vehicles in the same direction and adjacent positions form clustering.

Benefits of technology

It reduces the computational complexity, improves real-timeness, realizes convenient engineering implementation, and has traceability, which facilitates the analysis and application of clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167191A_ABST
    Figure CN119167191A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow clustering method and device suitable for an unstructured road and a storage medium. The method comprises the following steps: S1, direction clustering: clustering vehicles with consistent directions into one class according to vehicle orientation angles; and S2, adjacent position clustering: based on a clustering result in the S1 direction, classifying the vehicles in the same direction again according to an adjacent rule so as to obtain a final vehicle flow cluster which is in the same direction and is adjacent in position. According to the technical scheme, engineering implementation is convenient, and the calculated amount is relatively small; and the classification mode of the invention has traceability, so that the clustering result can be traced and analyzed conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of clustering technology, and in particular to a vehicle flow clustering method, device and storage medium suitable for unstructured roads. Background Art

[0002] With the continuous development of urban traffic and the increase in the number of vehicles, accurate and efficient clustering of traffic on unstructured roads has become an urgent need to optimize traffic management and improve road resource utilization. In modern transportation systems, the correlation and driving patterns between different vehicles are diverse. Therefore, the development of clustering technology is of great significance for understanding and optimizing traffic flow.

[0003] The two main categories of clustering methods are rule-based and learning-based. Rule-based clustering methods are simple and computationally inefficient, but they face the challenge of specific problems requiring specific analysis. Learning-based clustering methods are mainly based on unsupervised learning, of which K-means is a common representative. K-Means divides data by iteratively optimizing cluster centers. However, in unstructured road scenarios, its computational complexity is large, time-consuming, and the selection of the number of clusters is relatively static, making it difficult to adapt to changes in dynamic traffic conditions.

[0004] like Figure 1 As shown in the figure, the learning clustering methods represented by K-Means mainly include:

[0005] (1) Obtaining vehicle driving data on unstructured roads: Obtaining data such as the location and speed of vehicles through sensors, satellite positioning, etc.;

[0006] (2) Data cleaning and feature engineering: Clean the collected data, remove outliers, and perform feature engineering to construct features suitable for clustering;

[0007] (3) Clustering using K-Means: Apply the K-Means algorithm to perform cluster analysis on the processed data;

[0008] (4) Clustering result evaluation: The clustering results are evaluated, usually using various indicators such as silhouette coefficient, compactness, etc.

[0009] The above-mentioned prior art method has the following disadvantages:

[0010] (1) Feature engineering is required, and it is difficult to determine the impact of each feature on the clustering results: Traditional methods require a lot of manual work to construct features, and the impact of features on clustering results is difficult to accurately evaluate.

[0011] (2) K-Means clustering is computationally intensive and time-consuming: Applying K-Means on large-scale unstructured road datasets will result in a large computational burden and reduce real-time performance.

[0012] (3) When the number of vehicles is uncertain, it is difficult to dynamically adjust the number of clusters selected by K-Means: As road traffic conditions fluctuate, the number of clusters selected by traditional methods is relatively fixed and cannot flexibly respond to changes in traffic flow.

[0013] These shortcomings limit the applicability of traditional clustering methods in processing unstructured road traffic data. Summary of the invention

[0014] The technical solution provided by the present invention aims to make up for the deficiencies of the existing technical methods and provide a more adaptable and efficient traffic clustering method.

[0015] In order to solve the above technical problems, the technical solution of the present invention proposes a traffic clustering method suitable for unstructured roads, which includes the following steps: S1 directional clustering: vehicles with the same direction are clustered into one category according to the vehicle orientation angle; S2 adjacent position clustering: based on the result of S1 directional clustering, vehicles in the same direction are classified and classified again according to the proximity rule, so as to obtain the final traffic clustering with the same direction and adjacent positions.

[0016] Furthermore, in S1 direction clustering, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles.

[0017] Furthermore, in the S2 neighboring position clustering, the definition of horizontal and vertical neighboring ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

[0018] Furthermore, S1 directional clustering specifically includes the following steps: S11: obtaining the absolute coordinates of the center of mass of all vehicles; S12: sorting the coordinates of the center of mass of all vehicles to establish the spatiotemporal order of the traffic flow; S13: using the coordinates of the center of mass of the vehicles to calculate the angle difference between the movement directions of two adjacent vehicles; S14: truncating two vehicles whose angle difference is greater than a threshold, setting a threshold, and identifying two vehicles whose angle difference is greater than the threshold as having inconsistent directions, thereby forming the first level of classification.

[0019] Furthermore, in step S11, the absolute coordinates of all vehicles in the traffic flow are obtained through sensors or a satellite positioning system to ensure the accuracy of the position data.

[0020] Furthermore, S2 neighboring position clustering specifically includes the following steps: S21: define the neighboring criteria, determine the lateral and longitudinal neighboring ranges of each vehicle, and use this as a benchmark to determine whether the vehicles belong to the same cluster; S22: select the initial vehicle with depth priority, and in the same direction, adopt the depth-first idea to arbitrarily select a vehicle as the initial point; S23: judge and classify neighboring vehicles. If there are other vehicles in the lateral and longitudinal ranges, these two vehicles are classified into the same category, and the focus is shifted to the selected vehicle. Otherwise, another new vehicle in the same direction is selected as a new starting point; S24: repeat the depth-first traversal, repeat step S23, and continue the depth-first traversal until all vehicles are classified.

[0021] The technical solution of the present invention also provides a traffic clustering device suitable for unstructured roads, which includes the following modules: a direction clustering module, which is used to cluster vehicles with the same direction into one category according to the vehicle heading angle; a neighboring position clustering module, which is used to classify vehicles in the same direction based on the results of the direction clustering module, and classify them again according to the neighboring rules, so as to finally obtain the traffic clusters with the same direction and neighboring positions.

[0022] Furthermore, in the direction clustering module, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles.

[0023] Furthermore, in the neighboring position clustering module, the definition of horizontal and vertical neighboring ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

[0024] The technical solution of the present invention also provides a computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the vehicle flow clustering method applicable to unstructured roads as described above is executed.

[0025] The technical solution of the present invention is relatively convenient in engineering implementation and has a relatively small amount of calculation: through a carefully designed two-stage method, the calculation complexity is reduced and the real-time performance is improved, making the method easier to implement in engineering practice; and the classification method of the present invention is traceable, which is convenient for tracing and analyzing the clustering results: through clearly defined clustering steps, the classification process of each vehicle can be easily traced, which is conducive to further analysis and application of the clustering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 It is a flowchart of the learning clustering method represented by K-Means;

[0028] Figure 2 It is a schematic diagram of traffic flow classification of the present invention;

[0029] Figure 3 is an overall flow chart of the vehicle flow clustering method of the present invention;

[0030] Figure 4 It is a schematic diagram of the process of the first stage directional clustering of the present invention;

[0031] Figure 5 It is a schematic diagram of the process of the second stage of neighboring location clustering of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] The present invention aims to solve the problem of clustering traffic on unstructured roads. According to the purpose of traffic clustering, we hope to group vehicles with similar directions and close distances together to form a group of traffic. Therefore, a two-stage method can be used to cluster all vehicles in the area. In the first stage, vehicles with the same direction are clustered into one category according to the vehicle's direction angle, that is, all vehicles are classified according to their directions. In the second stage, based on the results of the first stage, the vehicles in the same direction are classified again according to the proximity rule to obtain the final cluster of traffic with the same direction and adjacent positions.

[0034] Figure 2 The schematic diagram of vehicle flow classification of the present invention is shown. Figure 3 The overall flow chart of the vehicle flow clustering method of the present invention is shown, wherein the vehicle flow clustering method of the present invention mainly includes two stages:

[0035] 1. The first stage, direction clustering:

[0036] a. Obtain the absolute coordinates of the center of mass of all vehicles: Obtain the absolute coordinates of all vehicles in the traffic flow through sensors or satellite positioning systems to ensure the accuracy of location data.

[0037] b. Sort by coordinates: Sort the coordinates of the center of mass of all vehicles to establish the spatiotemporal order of the traffic flow.

[0038] c. Calculate the angular difference between the directions of two adjacent vehicles: Use the coordinates of the center of mass of the vehicles to calculate the angular difference between the directions of movement of two adjacent vehicles.

[0039] d. Cut off two vehicles with an angle difference greater than a threshold: Set a threshold and identify two vehicles with an angle difference greater than the threshold as having inconsistent directions, forming the first level of classification. This ensures that sequential vehicles in the same category have consistent directions.

[0040] In this way, the direction consistency of sequential vehicles in the same category can be guaranteed. The flowchart of the first stage is as follows: Figure 4 shown.

[0041] 2. The second stage, clustering of neighboring locations:

[0042] a. Define proximity criteria: Determine the lateral and longitudinal proximity ranges of each vehicle, and use this as a benchmark to determine whether the vehicles belong to the same cluster.

[0043] b. Depth-first selection of the initial vehicle: In the same direction, use the depth-first idea and arbitrarily select a vehicle as the initial point.

[0044] c. Judgment and classification of neighboring vehicles: If there are other vehicles in the lateral and longitudinal range, classify the two vehicles into the same category and shift the focus to the selected vehicle. Otherwise, select another new vehicle in the same direction as the new starting point.

[0045] d. Repeat depth-first traversal: Repeat step c, and continue depth-first traversal until all vehicles are classified. This step takes into account the spatial relationship of vehicles in the traffic flow and forms the final clustering result.

[0046] The flowchart of the second stage is as follows Figure 5 shown.

[0047] The key points of the present invention are:

[0048] (1) Two-stage clustering method: An innovative two-stage clustering method is adopted. First, the vehicles are clustered according to their directions. Then, based on the direction clustering, the clustering is further refined through neighboring location clustering, thereby achieving effective clustering of traffic on unstructured roads.

[0049] (2) Direction consistency guarantee: In the first stage of directional clustering, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles, thereby improving the accuracy of the clustering results.

[0050] (3) Definition of horizontal and vertical proximity relationships: In the second stage of proximity clustering, the definition of horizontal and vertical proximity ranges is introduced. The vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

[0051] The above key technical points together constitute the innovation and uniqueness of this patent, providing a comprehensive and effective solution to the problem of traffic clustering on unstructured roads.

[0052] Beneficial technical effects of the present invention:

[0053] (1) It is relatively convenient to implement in engineering and the amount of calculation is relatively small: Through the carefully designed two-stage method, the calculation complexity is reduced and the real-time performance is improved, making this method easier to implement in engineering practice.

[0054] (2) The classification method is traceable, which facilitates the tracing and analysis of clustering results: Through clearly defined clustering steps, the classification process of each vehicle can be easily traced, which helps to further analyze and apply the clustering results.

[0055] In an embodiment of the present invention, a traffic clustering method suitable for unstructured roads is provided, which includes the following steps: S1 directional clustering: vehicles with the same direction are clustered into one category according to the vehicle heading angle; S2 adjacent position clustering: based on the result of S1 directional clustering, vehicles in the same direction are classified and classified again according to the proximity rule, so as to obtain the final traffic clusters with the same direction and adjacent positions.

[0056] Furthermore, in S1 direction clustering, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles.

[0057] Furthermore, in the S2 neighboring position clustering, the definition of horizontal and vertical neighboring ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

[0058] Furthermore, S1 directional clustering specifically includes the following steps: S11: obtaining the absolute coordinates of the center of mass of all vehicles; S12: sorting the coordinates of the center of mass of all vehicles to establish the spatiotemporal order of the traffic flow; S13: using the coordinates of the center of mass of the vehicles to calculate the angle difference between the movement directions of two adjacent vehicles; S14: truncating two vehicles whose angle difference is greater than a threshold, setting a threshold, and identifying two vehicles whose angle difference is greater than the threshold as having inconsistent directions, thereby forming the first level of classification.

[0059] Furthermore, in step S11, the absolute coordinates of all vehicles in the traffic flow are obtained through sensors or a satellite positioning system to ensure the accuracy of the position data.

[0060] Furthermore, S2 neighboring position clustering specifically includes the following steps: S21: define the neighboring criteria, determine the lateral and longitudinal neighboring ranges of each vehicle, and use this as a benchmark to determine whether the vehicles belong to the same cluster; S22: select the initial vehicle with depth priority, and in the same direction, adopt the depth-first idea to arbitrarily select a vehicle as the initial point; S23: judge and classify neighboring vehicles. If there are other vehicles in the lateral and longitudinal ranges, these two vehicles are classified into the same category, and the focus is shifted to the selected vehicle. Otherwise, another new vehicle in the same direction is selected as a new starting point; S24: repeat the depth-first traversal, repeat step S23, and continue the depth-first traversal until all vehicles are classified.

[0061] In another embodiment of the present invention, a traffic clustering device suitable for unstructured roads is provided, which includes the following modules: a direction clustering module, which is used to cluster vehicles with the same direction into one category according to the vehicle heading angle; a neighboring position clustering module, which is used to classify vehicles in the same direction based on the results of the direction clustering module, and classify them again according to the neighboring rules, so as to finally obtain traffic clusters with the same direction and neighboring positions.

[0062] Furthermore, in the direction clustering module, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles.

[0063] Furthermore, in the neighboring position clustering module, the definition of horizontal and vertical neighboring ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

[0064] In other embodiments of the present invention, a computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the vehicle flow clustering method applicable to unstructured roads as described above is executed.

[0065] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it. They cannot be used to limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A traffic flow clustering method suitable for unstructured roads, characterized in that: The steps include: S1 Direction Clustering: Group vehicles with the same direction into one category according to their orientation angles; S2 Proximity Clustering: Based on the results of S1 direction clustering, the vehicles in the same direction are classified again according to the proximity rule, so as to obtain the final clustering of vehicles in the same direction and in adjacent locations.

2. The method according to claim 1, characterized in that In S1 direction clustering, the direction consistency of sequential vehicles in the same category is ensured by calculating the direction angle difference between two adjacent vehicles.

3. The method according to claim 2, characterized in that In the S2 neighboring position clustering, the definition of horizontal and vertical neighboring ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

4. The method according to any one of claims 1 to 3, characterized in that S1 direction clustering specifically includes the following steps: S11: Obtain the absolute coordinates of the center of mass of all vehicles; S12: sorting the coordinates of the centroids of all vehicles to establish the spatiotemporal order of the traffic flow; S13: Calculate the angle difference between the moving directions of two adjacent vehicles using the coordinates of the center of mass of the vehicle; S14: Cut off two vehicles whose angle difference is greater than a threshold, set a threshold, and identify the two vehicles whose angle difference is greater than the threshold as having inconsistent directions, thereby forming a first-level classification.

5. The method according to claim 4, characterized in that In step S11, the absolute coordinates of all vehicles in the traffic flow are obtained through sensors or a satellite positioning system to ensure the accuracy of the position data.

6. The method according to claim 4, characterized in that S2 neighboring location clustering specifically includes the following steps: S21: define the proximity criteria, determine the lateral and longitudinal proximity ranges of each vehicle, and use this as a benchmark to determine whether the vehicles belong to the same cluster; S22: Depth-first selection of the initial vehicle. In the same direction, a vehicle is randomly selected as the initial point using the depth-first idea. S23: judging and classifying neighboring vehicles. If there are other vehicles in the lateral and longitudinal ranges, the two vehicles are classified into the same category and the focus is shifted to the selected vehicle. Otherwise, another new vehicle in the same direction is selected as a new starting point. S24: Repeat the depth-first traversal, repeat step S23, and continue the depth-first traversal until all vehicles are classified.

7. A vehicle flow clustering device suitable for unstructured roads, characterized in that: Includes the following modules: Direction clustering module, used to cluster vehicles with the same direction into one category according to their orientation angles; The proximity clustering module is used to classify vehicles in the same direction based on the results of the direction clustering module, and reclassify them according to the proximity rule, so as to obtain the final clustering of vehicles in the same direction and in adjacent locations.

8. The device according to claim 7, characterized in that In the direction clustering module, the direction consistency of sequential vehicles in the same category is ensured by calculating the difference in orientation angles between two adjacent vehicles.

9. The device according to claim 8, characterized in that In the proximity clustering module, the definition of horizontal and vertical proximity ranges is introduced, and the vehicles are traversed in a depth-first manner to determine whether there are other vehicles in the horizontal and vertical ranges, thereby forming the final clustering result.

10. A computer-readable storage medium containing a computer program, characterized in that: When the computer program is executed by one or more processors, the vehicle flow clustering method applicable to unstructured roads as described in any one of claims 1 to 6 is performed.

Citation Information

Patent Citations

  • Identification method for behaviors of high-speed vehicle based on secondary spectrum clustering and HMM (Hidden Markov Model)-RF (Random Forest) hybrid model

    CN104951764A

  • Estimation method for home-work location based on bayonet data

    CN108122186A

  • lane flow analysis method based on K-Means clustering

    CN109871412A

  • Lane-level urban road extraction method based on track position and direction information of floating car

    CN113538482A

  • Cache content updating algorithm based on vehicle clustering

    CN114900870A