Travel chain state machine and unsupervised clustering-based scenic spot vehicle behavior recognition method

By constructing a vehicle travel chain state machine and using unsupervised clustering methods, the problems of low vehicle recognition accuracy and insufficient versatility in scenic areas are solved. This achieves high-precision recognition and stable output of continuous vehicle behavior, making it suitable for scenic area management with different geographical structures and traffic scales.

CN121963494BActive Publication Date: 2026-06-09GUANGZHOU UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU UNIVERSITY
Filing Date
2026-04-03
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing vehicle recognition methods for scenic areas are ill-suited to the traffic management needs of smart scenic areas. They suffer from low accuracy in vehicle behavior recognition, weak semantic expression capabilities, and insufficient versatility. They are unable to depict the continuous traffic behavior of vehicles within scenic areas and are difficult to adapt to the analysis needs of different geographical structures, traffic scales, and data scales.

Method used

By constructing a vehicle travel chain state machine and combining it with unsupervised clustering methods, we acquire and process vehicle passage record data, construct a travel chain structure, perform feature optimization and weighted processing, and use the K-Means clustering algorithm to perform vehicle type clustering analysis, outputting the final vehicle behavior type.

Benefits of technology

It achieves a complete characterization of continuous vehicle behavior, improves recognition accuracy and temporal consistency, reduces reliance on manual rules, enhances the adaptability of the method and the stability of recognition results, provides reliable data support, and provides refined support for scenic area traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963494B_ABST
    Figure CN121963494B_ABST
Patent Text Reader

Abstract

This invention discloses a method for recognizing vehicle behavior in scenic areas based on travel chain state machines and unsupervised clustering, belonging to the field of intelligent transportation technology. The method first determines the entry and exit status of vehicles and groups and sorts them according to the passage data of scenic area checkpoints, constructing three types of travel chains. Vehicles are categorized into large, medium, and small vehicles, and the travel chain data for each vehicle type is aggregated and analyzed to construct vehicle behavior feature vectors. After feature optimization, standardization, and adaptive weighting, a weighted vehicle travel chain feature vector is obtained. After detecting and isolating abnormal travel chains, initial clustering results of vehicle behavior are obtained, and the optimal number of clusters is determined. Stable vehicle behavior clustering results are obtained through stability evaluation and parameter tuning. Finally, based on the distribution differences of cluster centers for different vehicle types, the final recognition result is output. This method improves recognition accuracy and adaptability, provides data support for refined traffic management in scenic areas, and can also be applied to traffic scenarios with clearly defined entry and exit boundaries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method for recognizing vehicle behavior in scenic areas based on travel chain state machines and unsupervised clustering. Background Technology

[0002] With the deep integration of smart scenic area construction and intelligent transportation systems, scenic area traffic management is gradually transforming from the traditional model of manual statistics and experience-based judgment to a model of refined analysis of multi-source data relying on equipment such as checkpoints and video monitoring. Various traffic sensing devices can continuously collect core information such as vehicle travel time, location, and frequency, providing a solid data foundation for analyzing vehicle behavior and assessing traffic conditions in scenic areas, and laying the data support for achieving intelligent and refined management and control of scenic area traffic.

[0003] Current methods for vehicle identification and classification in scenic areas are still insufficient to meet the traffic management needs of smart scenic areas, exhibiting significant technical shortcomings. Existing methods often rely solely on the time, location, or frequency of a vehicle's single passage through a checkpoint as a classification criterion, neglecting the complete travel chain characteristics formed by vehicles across multiple time periods and nodes. This fails to characterize the continuous travel behavior of vehicles within the scenic area, making it difficult to reflect real traffic behavior patterns and thus limiting the accuracy of vehicle behavior identification.

[0004] Meanwhile, existing technologies suffer from insufficient semantic representation of vehicle behavior and poor method versatility. On the one hand, rule-based discrimination methods, based on human experience, struggle to effectively distinguish between various behavior types such as tourist vehicles, passing vehicles, resident vehicles, and park work vehicles, exhibiting weak adaptability to complex scenarios. On the other hand, key steps such as travel chain construction, feature extraction, and behavior classification are fragmented, lacking a structured and reusable unified analysis process. This makes it difficult to apply these methods across scenic areas with different geographical structures and traffic volumes, and also fails to meet the analysis needs of varying data scales. Therefore, there is an urgent need for an automatic vehicle behavior recognition method in scenic areas that integrates temporal features of vehicle travel chains with unsupervised learning to address the pain points of existing technologies. Summary of the Invention

[0005] The purpose of this invention is to propose a scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering, which solves the problems of low accuracy, weak semantic expression ability and insufficient versatility of existing scenic area vehicle behavior recognition methods.

[0006] To achieve the above objectives, this invention proposes a method for identifying vehicle behavior in scenic areas based on a travel chain state machine and unsupervised clustering, with the following steps:

[0007] Step S1: Obtain vehicle passage record data collected from entrance and exit checkpoints within the scenic area during the statistical period, including checkpoint name, direction, license plate number, vehicle passage time and vehicle type; perform deduplication, missing value removal and outlier cleaning on the vehicle passage record data to form structured vehicle passage data.

[0008] Step S2: Based on the checkpoint name and direction data, determine whether the vehicle behavior status is entering or leaving the scenic area, and group the structured vehicle passage data according to the license plate number, and sort them according to the order of vehicle passage time.

[0009] Step S3: Based on the vehicle entry and exit status and temporal continuity rules, construct three types of travel chain structures for each vehicle, including complete travel chain, entry-only chain, and exit-only chain;

[0010] Step S4: Based on the vehicle type label data, the vehicles are initially classified into small cars, medium cars, and large cars; based on the travel chain state machine model, the travel chain data of small cars, medium cars, and large cars are aggregated and analyzed to construct nine behavioral feature vectors, forming vehicle behavioral feature vectors.

[0011] Step S5: Perform feature optimization processing on the behavioral feature vectors constructed for each vehicle model, and standardize the optimized behavioral feature vectors to transform the features of each dimension to a unified scale space.

[0012] Step S6: Evaluate the contribution of each behavioral feature in the standardized behavioral feature vector, and perform adaptive weighting on each feature to obtain the weighted vehicle travel chain feature vector.

[0013] Step S7: Before performing unsupervised clustering analysis, perform anomaly detection and isolation on the weighted vehicle travel chain feature vector;

[0014] Step S8: After completing the isolation of abnormal travel chains, K-Means clustering algorithm is used to perform vehicle-type clustering analysis for small car samples, medium car samples, and large car samples respectively to obtain the initial clustering results of vehicle behavior, and the optimal number of clusters for each vehicle type is determined based on the silhouette coefficient, CH index, or intra-cluster sum of squares.

[0015] Step S9: To address the reliability issue of the initial clustering results, conduct a stability assessment and parameter adjustment on the clustering results until a stable vehicle behavior clustering result is obtained.

[0016] Step S10: Based on the distribution differences of cluster centers of each vehicle type in terms of dwell characteristics, frequency characteristics, and time period characteristics, perform behavioral semantic interpretation on the clusters, map different clustering results to the corresponding vehicle behavior types, and output the final recognition results.

[0017] Preferably, in step S3, each vehicle travel chain is represented as follows:

[0018] ;

[0019] in, For the first i The vehicle travel chain in k Statistical values ​​over a time interval For the first j The next passage location. For the first j The passage time for each passage. , This represents the total number of passages.

[0020] No. j Passage time for the next passage satisfy:

[0021] ;

[0022] in, Set a threshold for the time interval;

[0023] When the time interval between two consecutive passage records exceeds a preset threshold At that time, the travel process will be disconnected, and a new vehicle travel chain will be generated.

[0024] Preferably, the first in the vehicle travel chain j The state representation corresponding to each passage action is as follows:

[0025] ;

[0026] ;

[0027] in, For the first in the vehicle travel chain j The state corresponding to each passage behavior. For state functions, To get into the state, In a stationary state, In the "out of state" state, It is in a cross-day state.

[0028] Preferably, in step S4, the nine behavioral characteristics include:

[0029] Dwell characteristics: mean dwell time, standard deviation of dwell time;

[0030] Frequency characteristics: number of travel chains, number of travel days, and whether there are cross-day chains;

[0031] Time period characteristics: average entry time, average exit time;

[0032] Behavioral pattern characteristics at the start and end points: total number of snapshots;

[0033] The vehicle behavior feature vector is represented as follows:

[0034] ;

[0035] in, For the first i A multi-dimensional behavioral feature vector of a vehicle travel chain For the first i The vehicle travel chain in the first m Numerical values ​​on each behavioral feature dimension ;

[0036] Multidimensional behavioral characteristics include vehicle dwell time characteristics, travel frequency characteristics, entry and exit time distribution characteristics, cross-day behavior characteristics, and checkpoint traffic intensity characteristics.

[0037] Preferably, in step S5, the behavioral feature vector is subjected to feature optimization processing, specifically: first, Spearman correlation analysis is performed to remove highly correlated features, and then feature ablation experiments are conducted to evaluate the influence of features on the clustering result structure, optimize the feature dimension combination, and obtain the optimized behavioral feature vector.

[0038] Preferably, in step S6, the weighted vehicle travel chain feature vector is represented as follows:

[0039] ;

[0040] in, For the first i The feature vector of a vehicle travel chain after adaptive weighting. For the first m Each feature weight;

[0041] Feature weights satisfy:

[0042] ;

[0043] in, For the feature contribution evaluation function, For the first m The contribution value of each feature.

[0044] Preferably, in step S7, the characteristic deviation of the vehicle travel chain is defined as:

[0045] ;

[0046] in, For the firsti The deviation of a vehicle travel chain in the feature space. Let be the reference center vector in the feature space. It is the vector norm;

[0047] When deviation satisfy:

[0048] ;

[0049] The vehicle's travel chain was determined to be an abnormal travel chain; among which, This is the threshold for anomaly detection.

[0050] Preferably, in step S8, R clustering analyses are performed on the same feature dataset, and the consistency of the clustering results is calculated using a consistency formula; the consistency formula is as follows:

[0051] ;

[0052] in, As a consistency indicator, For the first Clustering results under each round For the first Clustering results under each round The similarity function between the two clustering results. , R represents the round number of the clustering repeat experiment, where R is an integer;

[0053] When consistency index Less than the preset threshold If necessary, the clustering parameters are adjusted and the clustering analysis is re-executed until a stable clustering result of vehicle behavior is obtained.

[0054] Preferably, in step S10, the vehicle types include tourist private cars, taxis, resident vehicles, staff vehicles, transit vehicles, tourist buses, and scenic area shuttle buses.

[0055] Therefore, this invention proposes a scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering, which has the following advantages:

[0056] (1) This invention constructs a vehicle travel chain and combines it with a travel chain state machine to complete the state representation of the travel process, which fully depicts the continuous behavior process of vehicles in the scenic area from entering, staying, leaving to traveling across days. It avoids the problem of behavior fragmentation caused by relying solely on single passage information and greatly improves the accuracy and temporal consistency of vehicle behavior recognition.

[0057] (2) This invention relies on unsupervised clustering analysis to mine the inherent patterns of vehicle behavior. It does not require preset vehicle category labels and manual judgment rules. At the same time, through a unified behavior modeling and recognition process, it breaks through the limitations of scenic area geographical structure, traffic scale and data scale. It can be flexibly applied in different scenic areas and can also be applied to traffic scenarios with clear entry and exit boundaries such as airports and railway hubs.

[0058] (3) This invention uses feature adaptive weighting, abnormal travel chain isolation and multi-round clustering stability assessment to ensure that the vehicle behavior recognition results remain highly consistent across multiple time scales and batches of data updates. The output vehicle behavior types and related feature analysis results can provide reliable data support for the judgment of traffic congestion during peak hours in scenic areas, the assessment of operational status and the construction of congestion prediction models, thus helping to achieve refined and intelligent management of traffic in scenic areas.

[0059] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0060] Figure 1 This is a flowchart of a scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to the present invention;

[0061] Figure 2 This is a schematic diagram of the Spearman correlation matrix of a small car in an embodiment of the present invention;

[0062] Figure 3 This is a schematic diagram of the Spearman correlation matrix of a medium-sized vehicle in an embodiment of the present invention;

[0063] Figure 4 This is a schematic diagram of the Spearman correlation matrix of a large vehicle in an embodiment of the present invention;

[0064] Figure 5 This is a schematic diagram illustrating the relationship between the profile coefficient and the K value of a small vehicle in an embodiment of the present invention;

[0065] Figure 6 This is a schematic diagram illustrating the relationship between the profile coefficient and the K value of a medium-sized vehicle in an embodiment of the present invention;

[0066] Figure 7 This is a schematic diagram illustrating the relationship between the profile coefficient and the K value of a large vehicle in an embodiment of the present invention;

[0067] Figure 8 This is a PCA scatter plot of a small car in an embodiment of the present invention; wherein, principal component 1 is a combination of features reflecting the number of active days, dwell characteristics, travel frequency and differences in entry and exit times of the small car, and principal component 2 is a combination of features reflecting the time-period characteristics, dwell dispersion and cross-day characteristics of the small car.

[0068] Figure 9This is a PCA scatter plot of medium-sized vehicles in an embodiment of the present invention; wherein, principal component 1 is a feature combination reflecting the number of active days, dwell characteristics, travel frequency and differences in entry and exit times of medium-sized vehicles, and principal component 2 is a feature combination reflecting the time-period characteristics, dwell dispersion and cross-day characteristics of medium-sized vehicles;

[0069] Figure 10 This is a PCA scatter plot of large vehicles in an embodiment of the present invention; wherein, principal component 1 is a feature combination reflecting the number of active days, dwell characteristics, travel frequency and differences in entry and exit times of large vehicles, and principal component 2 is a feature combination reflecting the time-period characteristics, dwell dispersion and cross-day characteristics of large vehicles;

[0070] Figure 11 This is a schematic diagram illustrating the behavior of different vehicle models in embodiments of the present invention;

[0071] Figure 12 This is a schematic diagram of the overall vehicle behavior distribution in an embodiment of the present invention. Detailed Implementation

[0072] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0073] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0074] Example 1

[0075] This embodiment uses actual traffic operation data from a scenic area to illustrate the specific implementation process and effects of the scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering proposed in this invention.

[0076] like Figure 1 As shown, this invention provides a method for identifying vehicle behavior in scenic areas based on travel chain state machines and unsupervised clustering. The specific steps are as follows:

[0077] Step S1: Obtain vehicle passage record data collected from entrance and exit checkpoints within the scenic area during the statistical period, including checkpoint name, direction, license plate number, vehicle passage time and vehicle type; perform deduplication, missing value removal and outlier cleaning on the vehicle passage record data to form structured vehicle passage data.

[0078] In this embodiment, multiple fixed checkpoints deployed at the main road entrances and exits of a scenic area are selected as the source of vehicle traffic data collection. The checkpoint equipment automatically generates a passage record when a vehicle passes through. Each record includes at least the checkpoint name, direction, license plate number, vehicle passage time, and vehicle type.

[0079] This type of checkpoint data features continuous collection, stable coverage, and high temporal accuracy, providing a relatively complete picture of vehicle entry and exit behavior within the scenic area. To ensure the accuracy of subsequent analysis, the original traffic record data underwent deduplication, missing value removal, and cleaning of obvious anomalies to create structured vehicle traffic data.

[0080] In this embodiment, a total of 48,234 original vehicle passage records were captured within the time range of 00:00:20 on August 28, 2023 to 23:55:30 on September 1, 2023. The original data fields include: capture location, lane number, license plate number, license plate color, vehicle type, and passage time. The original vehicle passage record data is preprocessed to form structured vehicle passage data, specifically including:

[0081] 1. Field integrity check.

[0082] The original record's capture location, license plate number, vehicle type, and passage time fields undergo integrity checks. In this embodiment, none of the above key fields have missing values, therefore the record is not deleted due to missing values. If any of the capture location, license plate number, vehicle type, or passage time fields is empty, the record can be determined as invalid and deleted.

[0083] 2. Remove duplicate records.

[0084] Multiple records with identical "capture location, lane number, license plate number, and passage time" are identified as duplicate records, and only one of them is retained. In this embodiment, a total of 35 completely duplicate records were identified and deleted after deduplication.

[0085] 3. Standardize the time field.

[0086] The "Ever Time" field is uniformly converted to a standard timestamp format and parsed according to "year-month-day hour:minute:second"; records whose time formats cannot be parsed or are outside the statistical period range are removed. In this embodiment, the ever time of all records can be successfully parsed and all fall within the statistical period.

[0087] 4. Standardization of capture location and semantic mapping of direction.

[0088] The "Capture Location" field undergoes text standardization processing, mapping different expressions to standard checkpoint names and directional semantics. In this embodiment, capture locations include the following four categories:

[0089] From checkpoint A towards the scenic area;

[0090] B tunnel entrance towards the scenic area;

[0091] From checkpoint A to location C;

[0092] From tunnel B, heading towards point D;

[0093] Records containing "towards the scenic area" or "in the direction of the scenic area" are marked as entering the scenic area; records containing "towards location C" or "in the direction of location D" are marked as leaving the scenic area.

[0094] 5. Standardize the processing of license plate numbers.

[0095] The "License Plate Number" field is cleaned by removing leading and trailing spaces and abnormal separators, and the character format is standardized. In this embodiment, license plate numbers may be abbreviated or anonymized, and some license plates are 3, 4, 5, 6, or 7 digits long. Therefore, only records with empty license plate numbers, records consisting entirely of meaningless characters, or records that cannot be used as unique vehicle identifiers are deleted.

[0096] 6. Vehicle type cleaning and screening.

[0097] In this embodiment, vehicle types include: small cars, medium-sized cars, large cars, unknown, two-wheeled vehicles, and three-wheeled vehicles. Among them, small cars, medium-sized cars, and large cars are retained as valid motor vehicle samples for subsequent travel chain construction and behavior recognition; "unknown," "two-wheeled vehicles," and "three-wheeled vehicles" are excluded in this embodiment due to their significant differences from the behavior patterns of motor vehicles in scenic areas and will not participate in subsequent motor vehicle clustering analysis.

[0098] After the above data deduplication, missing value removal, and cleaning of obvious abnormal data, a total of 37,256 valid data records were retained, forming structured vehicle traffic data, and finally a structured vehicle traffic data table was obtained. The fields of the structured vehicle traffic data table include: standardized license plate number, standardized capture location (checkpoint name), traffic direction status (entering / leaving the scenic area), vehicle type, vehicle passage time, and vehicle passage date.

[0099] Step S2: Based on the checkpoint name and direction data, determine whether the vehicle behavior status is entering or leaving the scenic area, and group the structured vehicle passage data according to the license plate number, and sort them according to the order of vehicle passage time.

[0100] Step S3: Based on the vehicle entry and exit status and temporal continuity rules, construct three types of travel chain structures for each vehicle, including complete travel chain, entry-only chain, and exit-only chain;

[0101] Each vehicle travel chain is represented as follows:

[0102] ;

[0103] in, For the first i The vehicle travel chain in k Statistical values ​​over a time interval For the first j The next passage location. For the first j The passage time for each passage. , This represents the total number of passages.

[0104] No. j Passage time for the next passage satisfy:

[0105] ;

[0106] in, Set a threshold for the time interval;

[0107] When the time interval between two consecutive passage records exceeds a preset threshold At that time, the travel process will be disconnected, and a new vehicle travel chain will be generated.

[0108] The first in the vehicle travel chain j The state representation corresponding to each passage action is as follows:

[0109] ;

[0110] ;

[0111] in, For the first in the vehicle travel chain j The state corresponding to each passage behavior. For state functions, To get into the state, In a stationary state, In the "out of state" state, It is in a cross-day state.

[0112] Step S4: Based on the vehicle type label data, the vehicles are initially classified into small cars, medium cars, and large cars; based on the travel chain state machine model, the travel chain data of small cars, medium cars, and large cars are aggregated and analyzed to construct nine behavioral feature vectors, forming vehicle behavioral feature vectors.

[0113] The nine behavioral characteristics include:

[0114] Dwell characteristics: mean dwell time, standard deviation of dwell time;

[0115] Frequency characteristics: number of travel chains, number of travel days, and whether there are cross-day chains;

[0116] Time period characteristics: average entry time, average exit time;

[0117] Behavioral pattern characteristics at the start and end points: total number of snapshots;

[0118] The vehicle behavior feature vector is represented as follows:

[0119] ;

[0120] in, For the first i A multi-dimensional behavioral feature vector of a vehicle travel chain For the first i The vehicle travel chain in the first m Numerical values ​​on each behavioral feature dimension ;

[0121] Step S5: Perform feature optimization processing on the behavioral feature vectors constructed for each vehicle model, and standardize the optimized behavioral feature vectors to transform the features of each dimension to a unified scale space. Specifically, the feature optimization processing of the behavioral feature vectors involves: first performing Spearman correlation analysis to remove highly correlated features, and then evaluating the influence of features on the clustering result structure through feature ablation experiments to optimize the feature dimension combination and obtain the optimized behavioral feature vectors.

[0122] like Figure 2 As shown, some frequency-related indicators for small vehicles (such as the number of travel chains, the number of snapshots, and the average number of trips per day) exhibit a moderate positive correlation, indicating that these indicators collectively reflect vehicle activity intensity to some extent. Meanwhile, some time-related features show relatively low correlation with stay-related features, suggesting that they characterize vehicle behavior patterns from different dimensions. These results indicate that the overall data features do not suffer from severe collinearity, but some information overlap still exists, providing a statistical basis for subsequent feature selection or feature ablation, thus helping to improve the stability and interpretability of the clustering model.

[0123] like Figure 3 As shown, some activity frequency indicators exhibit strong positive correlations, indicating that vehicle activity level is an important dimension for describing the behavior of medium-sized vehicles. Conversely, the correlations between dwell time, time, and frequency characteristics are relatively weak, suggesting that these variables can supplement vehicle behavior from different perspectives. Overall, the features exhibit both some correlation and good independence, providing a reasonable feature basis for subsequent cluster analysis.

[0124] like Figure 4As shown, some activity intensity indicators exhibit strong positive correlations, while the correlation between time features and dwell time features is relatively moderate. This indicates that the behavior patterns of large vehicles are influenced by both activity frequency and time structure and dwell time behavior. Overall, the features maintain a certain correlation while also possessing good information complementarity. This demonstrates that the constructed behavioral feature system can effectively characterize the travel behavior of large vehicles from multiple dimensions, providing a solid data foundation for subsequent cluster analysis and behavioral pattern recognition.

[0125] Step S6: Evaluate the contribution of each behavioral feature in the standardized behavioral feature vector, and perform adaptive weighting on each feature to obtain the weighted vehicle travel chain feature vector.

[0126] The weighted vehicle travel chain feature vector is represented as follows:

[0127] ;

[0128] in, For the first i The feature vector of a vehicle travel chain after adaptive weighting. For the first m Each feature weight;

[0129] Feature weights satisfy:

[0130] ;

[0131] in, For the feature contribution evaluation function, For the first m The contribution value of each feature.

[0132] Step S7: Before performing unsupervised clustering analysis, perform anomaly detection and isolation on the weighted vehicle travel chain feature vector;

[0133] Define the characteristic deviation of the vehicle travel chain as:

[0134] ;

[0135] in, For the first i The deviation of a vehicle travel chain in the feature space. Let be the reference center vector in the feature space. It is the vector norm;

[0136] When deviation satisfy:

[0137] ;

[0138] The vehicle's travel chain was determined to be an abnormal travel chain; among which, This is the threshold for anomaly detection; in this embodiment, .

[0139] Step S8: After completing the isolation of abnormal travel chains, K-Means clustering algorithm is used to perform vehicle-type clustering analysis for small car samples, medium car samples, and large car samples respectively to obtain the initial clustering results of vehicle behavior, and the optimal number of clusters for each vehicle type is determined based on the silhouette coefficient, CH index, or intra-cluster sum of squares.

[0140] like Figure 5 As shown, the silhouette coefficient reaches its highest value when K=3, indicating that the intra-class sample similarity is the highest, the inter-class difference is the greatest, and the clustering structure is the clearest at this point. When K>3, the silhouette coefficient generally shows a downward trend, indicating that as the number of categories increases, the originally clear behavioral patterns are over-subdivided, leading to a gradual blurring of inter-class boundaries. Therefore, Figure 5 This demonstrates that the behavior patterns of small vehicles exhibit a relatively stable clustering structure. It also shows that using the silhouette coefficient for data-driven K-value selection can effectively avoid the problem of subjectively setting the number of clusters, thereby improving the objectivity and reliability of the clustering results.

[0141] like Figure 6 As shown, the silhouette coefficient reaches its maximum value when K=2, indicating that the mid-sized vehicle group mainly exhibits two relatively obvious structural divisions in terms of behavioral patterns. As K increases, the silhouette coefficient decreases significantly, indicating that further subdivision weakens inter-class differences and reduces cluster stability. This result shows that the behavioral structure of mid-sized vehicles is relatively simple and concentrated, and a small number of categories can well characterize their main behavioral patterns. It also shows that the constructed behavioral features have good clustering separability.

[0142] like Figure 7 As shown, the silhouette coefficient reaches its relative maximum when K=3, indicating that the large vehicle group can be well divided into three main structural categories in terms of behavior patterns. As K continues to increase, the silhouette coefficient gradually decreases, indicating that too many category divisions will reduce the clarity of the cluster structure. This result shows that large vehicles have a relatively stable behavior type structure in the scenic area transportation system, and also proves that parameter selection based on the silhouette coefficient can effectively improve the rationality of the clustering model.

[0143] Perform R clustering analyses on the same feature dataset and calculate the consistency of the clustering results using a consistency formula; the consistency formula is as follows:

[0144] ;

[0145] in, As a consistency indicator, For the first Clustering results under each round For the first Clustering results under each round The similarity function between the two clustering results. , R represents the round number of the clustering repeat experiment, where R is an integer;

[0146] When consistency index Less than the preset threshold If necessary, the clustering parameters are adjusted and the clustering analysis is re-executed until a stable clustering result of vehicle behavior is obtained.

[0147] like Figure 8 As shown, different clusters form multiple relatively independent point cloud regions in the principal component space, with some clusters exhibiting significant spatial separation, indicating that the constructed behavioral features can effectively distinguish different types of small vehicle travel patterns. Meanwhile, some clusters still have certain proximity or transitional regions, suggesting a certain degree of behavioral continuity or mixed characteristics within the small vehicle group. Overall, Figure 8 The clustering results were validated intuitively, demonstrating that the selected features have a good ability to distinguish differences in vehicle behavior.

[0148] like Figure 9 As shown, the three main point clusters exhibit clear spatial separation in the principal component space, and the points within each cluster are relatively concentrated, indicating that the behavioral patterns of medium-sized vehicles have relatively clear structural differences in the feature space. The large spatial distance between different clusters indicates that the constructed behavioral features can effectively capture the differences of medium-sized vehicles in terms of dwell characteristics, travel frequency, and temporal structure, thus forming stable and interpretable clustering results.

[0149] like Figure 10 As shown, different categories form three distinct regions in the principal component space, and the points within each cluster are relatively concentrated, indicating strong differences in the behavioral patterns of large vehicles. Compared to small vehicles, medium and large vehicles tend to have more clearly defined functional attributes and usage scenarios, making it easier for their behavioral characteristics to form clear structural divisions in the feature space. This further verifies that the clustering model has good stability and interpretability in identifying the behavioral patterns of large vehicles.

[0150] Step S9: To address the reliability issue of the initial clustering results, conduct a stability assessment and parameter adjustment on the clustering results until a stable vehicle behavior clustering result is obtained.

[0151] Step S10: Based on the distribution differences of cluster centers of each vehicle type in terms of dwell characteristics, frequency characteristics, and time period characteristics, perform behavioral semantic interpretation on the clusters, map different clustering results to the corresponding vehicle behavior types, and output the final recognition results.

[0152] Vehicle types include private cars for tourists, taxis, resident vehicles, staff vehicles, transit vehicles, tourist buses, and scenic area shuttle buses.

[0153] like Figure 11 As shown, different vehicle types exhibit significant differences in their behavioral composition. Large vehicles are almost entirely composed of tour buses, accounting for nearly 100%, indicating that large vehicles primarily serve as group tourist transport vehicles within the scenic area's transportation system, exhibiting a relatively simple and stable behavioral pattern. Medium-sized vehicles are almost entirely composed of scenic area shuttle buses, also showing a highly concentrated behavioral structure. This suggests that medium-sized vehicles mainly provide shuttle and connection services within the scenic area's internal transportation system, with a relatively fixed operating mode and distinct operational characteristics. In contrast, the behavioral composition of small vehicles is significantly more complex and diverse. Small vehicles mainly consist of tourist vehicles (approximately 87%), while also including a certain proportion of resident vehicles, staff vehicles, transit vehicles, and taxis. This structure indicates that small vehicles not only encompass tourist travel but also include local resident commuting, scenic area staff daily travel, and non-scenic area-related transit traffic. Therefore, the behavioral patterns of the small vehicle group exhibit significant diversity and complexity.

[0154] Depend on Figure 11 It can be seen that the behavioral patterns of large and medium-sized vehicles are highly concentrated, indicating that their traffic functions are relatively clear; while small vehicles exhibit mixed characteristics of multi-source behaviors, making them the most complex vehicle group in the scenic area's transportation system. Therefore, in subsequent behavior pattern recognition and cluster analysis, it is necessary to focus on the behavior classification of small vehicles to improve the accuracy and interpretability of the vehicle behavior recognition model.

[0155] like Figure 12 As shown, tourist vehicles dominate, accounting for approximately 80.1%, far exceeding other vehicle types. This result indicates that the main source of traffic flow in the scenic area's transportation system is tourist vehicles, whose travel demands constitute the core of the traffic flow. Therefore, tourist vehicle travel behavior should be a key research focus in the process of optimizing traffic management and organization in scenic areas.

[0156] Besides tourist vehicles, shuttle buses account for approximately 6.0%, resident vehicles for approximately 5.1%, staff vehicles for approximately 3.0%, transit vehicles for approximately 2.6%, tour buses for approximately 1.8%, and taxis for approximately 1.4%. Although these vehicle types represent a relatively small proportion, they still play an important role in the scenic area's transportation system. For example, shuttle buses serve as internal connections for tourists, resident and staff vehicles reflect local transportation needs around the scenic area, while transit vehicles indicate that some traffic flow is not related to travel within the scenic area but rather traverses the scenic area's road network.

[0157] By statistically analyzing the proportions of different vehicle behavior patterns, it can be clearly seen that the scenic area's transportation system is dominated by tourist travel, while also including a certain proportion of local traffic and commercial vehicles. This result provides an important data foundation for subsequent vehicle behavior identification, traffic demand analysis, and the formulation of scenic area traffic management strategies.

[0158] Practical application of the above embodiments demonstrates that the method proposed in this invention can effectively identify various behavior types, including tourist vehicles, passing vehicles, vehicles belonging to scenic area residents, and vehicles belonging to scenic area staff, relying solely on vehicle traffic data. Compared to existing methods that classify vehicles based on single passage records or simple statistical rules, this invention avoids fragmentation of cross-day behavior through travel chains; improves the stability of clustering results through adaptive feature weighting and isolation of abnormal travel chains; and maintains good consistency of vehicle behavior identification results across different time scales and data sizes through a multi-round clustering consistency evaluation mechanism, demonstrating higher engineering applicability and application value.

[0159] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.

[0160] Therefore, this invention provides a method for identifying vehicle behavior in scenic areas based on travel chain state machines and unsupervised clustering. By combining travel chain state machine modeling with unsupervised clustering, the method achieves vehicle behavior identification in scenic areas. This not only fully characterizes the continuous travel behavior of vehicles and improves the temporal consistency and accuracy of identification, but also reduces reliance on manual rules, enhances the adaptability of the method to different scenarios, and ensures the stability and reusability of the identification results. It provides reliable data support for the refined management of traffic in scenic areas and can be applied to various traffic scenarios with clear entry and exit boundaries, such as airports and railway hubs.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for recognizing vehicle behavior in scenic areas based on travel chain state machine and unsupervised clustering, characterized in that, The steps are as follows: Step S1: Obtain vehicle passage record data collected from entrance and exit checkpoints within the scenic area during the statistical period, including checkpoint name, direction, license plate number, vehicle passage time and vehicle type; perform deduplication, missing value removal and outlier cleaning on the vehicle passage record data to form structured vehicle passage data. Step S2: Based on the checkpoint name and direction data, determine whether the vehicle behavior status is entering or leaving the scenic area, and group the structured vehicle passage data according to the license plate number, and sort them according to the order of vehicle passage time. Step S3: Based on the vehicle entry and exit status and temporal continuity rules, construct three types of travel chain structures for each vehicle, including complete travel chain, entry-only chain, and exit-only chain; Step S4: Based on the vehicle type label data, perform preliminary stratification and classification of vehicles into small cars, medium-sized cars, and large cars; Based on the travel chain state machine model, the travel chain data of small cars, medium cars, and large cars are aggregated and analyzed to construct nine behavioral feature vectors, forming vehicle behavior feature vectors. Step S5: Perform feature optimization processing on the behavioral feature vectors constructed for each vehicle model, and standardize the optimized behavioral feature vectors to transform the features of each dimension to a unified scale space. Step S6: Evaluate the contribution of each behavioral feature in the standardized behavioral feature vector, and perform adaptive weighting on each feature to obtain the weighted vehicle travel chain feature vector. Step S7: Before performing unsupervised clustering analysis, perform anomaly detection and isolation on the weighted vehicle travel chain feature vector; Step S8: After completing the isolation of abnormal travel chains, K-Means clustering algorithm is used to perform vehicle-type clustering analysis for small car samples, medium car samples, and large car samples respectively to obtain the initial clustering results of vehicle behavior, and the optimal number of clusters for each vehicle type is determined based on the silhouette coefficient, CH index, or intra-cluster sum of squares. Step S9: To address the reliability issue of the initial clustering results, conduct a stability assessment and parameter adjustment on the clustering results until a stable vehicle behavior clustering result is obtained. Step S10: Based on the distribution differences of cluster centers of each vehicle type in terms of dwell characteristics, frequency characteristics and time period characteristics, perform behavioral semantic interpretation on the clusters, map different clustering results to the corresponding vehicle behavior types and output the final recognition results; In step S3, each vehicle travel chain is represented as follows: ; in, For the first i The vehicle travel chain in k Statistical values ​​over a time interval For the first j The next passage location. For the first j The passage time for each passage. , This represents the total number of passages. No. j Passage time for the next passage satisfy: ; in, Set a threshold for the time interval; When the time interval between two consecutive passage records exceeds a preset threshold At that time, the travel process will be disconnected, and a new vehicle travel chain will be generated; In step S4, the nine behavioral characteristics include: Dwell characteristics: mean dwell time, standard deviation of dwell time; Frequency characteristics: number of travel chains, number of travel days, and whether there are cross-day chains; Time period characteristics: average entry time, average exit time; Behavioral pattern characteristics at the start and end points: total number of snapshots; The vehicle behavior feature vector is represented as follows: ; in, For the first i A multi-dimensional behavioral feature vector of a vehicle travel chain For the first i The vehicle travel chain in the first m Numerical values ​​on each behavioral feature dimension ; Multidimensional behavioral characteristics include vehicle dwell time characteristics, travel frequency characteristics, entry and exit time distribution characteristics, cross-day behavior characteristics, and checkpoint traffic intensity characteristics.

2. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 1, characterized in that, The first in the vehicle travel chain j The state representation corresponding to each passage action is as follows: ; ; in, For the first in the vehicle travel chain j The state corresponding to each passage behavior. For state functions, To get into the state, In a stationary state, In the "out of state" state, It is in a cross-day state.

3. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 1, characterized in that, In step S5, the behavioral feature vector is subjected to feature optimization processing. Specifically, Spearman correlation analysis is first performed to remove highly correlated features. Then, feature ablation experiments are conducted to evaluate the influence of features on the clustering result structure, optimize the feature dimension combination, and obtain the optimized behavioral feature vector.

4. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 1, characterized in that, In step S6, the weighted vehicle travel chain feature vector is represented as follows: ; in, For the first i The feature vector of a vehicle travel chain after adaptive weighting. For the first m Each feature weight; Feature weights satisfy: ; in, For the feature contribution evaluation function, For the first m The contribution value of each feature.

5. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 4, characterized in that, In step S7, the characteristic deviation of the vehicle travel chain is defined as: ; in, For the first i The deviation of a vehicle travel chain in the feature space. Let be the reference center vector in the feature space. It is the vector norm; When deviation satisfy: ; The vehicle's travel chain was determined to be an abnormal travel chain; among which, This is the threshold for anomaly detection.

6. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 1, characterized in that, In step S8, R clustering analyses are performed on the same feature dataset, and the consistency of the clustering results is calculated using the consistency formula; the consistency formula is as follows: ; in, As a consistency indicator, For the first Clustering results under each round For the first Clustering results under each round The similarity function between the two clustering results. , R represents the round number of the clustering repeat experiment, where R is an integer; When consistency index Less than the preset threshold If necessary, the clustering parameters are adjusted and the clustering analysis is re-executed until a stable clustering result of vehicle behavior is obtained.

7. The scenic area vehicle behavior recognition method based on travel chain state machine and unsupervised clustering according to claim 1, characterized in that, In step S10, the vehicle types include tourist private cars, taxis, resident vehicles, staff vehicles, transit vehicles, tourist buses, and scenic area shuttle buses.