An urban traffic pattern recognition system based on trajectory clustering
By eliminating abnormal trajectories, semantic clustering based on spatial direction and dynamic stop discrimination, the accuracy and dynamic feature recognition of trajectory data processing in the existing system are solved, and efficient identification of urban traffic patterns and optimized resource allocation are achieved.
Patent Information
- Application Number
- CN202510433539.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-08
AI Technical Summary
The existing urban traffic pattern recognition system lacks an effective trajectory quality screening mechanism in trajectory data processing, resulting in the participation of anomaly point data in the analysis, affecting the accuracy of the identification results, and failing to fully consider the aggregation characteristics of the trajectory spatial direction, making it difficult to identify the dynamic characteristics and regional functions of traffic behavior, resulting in a high risk of misjudgment.
The trajectory credibility erasure module eliminates abnormal trajectories, the trajectory semantic clustering module clusters based on spatial direction distribution, the trajectory evolution stage identification module quantifies the trajectory coverage change, and the dynamic stop discrimination module combines spatial overlap and stop persistence to identify the dynamic stop state, and generates urban traffic pattern identification information.
It improves the credibility and accuracy of trajectory data processing, enhances the generalization and adaptability of traffic pattern recognition in interactive scenarios of various travel modes, promotes the fine portrayal and functional identification of urban traffic structures, and provides high-resolution data support for the optimal allocation of traffic resources.
Smart Images

Figure CN119939325B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic pattern recognition, and particularly to an urban traffic pattern recognition system based on trajectory clustering. Background Art
[0002] The technical field of traffic pattern recognition mainly focuses on the recognition, modeling, and analysis of the travel behaviors, travel rules, and travel structures of traffic participants based on traffic data. This field comprehensively applies methods such as trajectory data mining, spatio-temporal data analysis, machine learning, complex network modeling, and graph theory to extract traffic behavior patterns from both individual and group levels, and identify core elements such as travel modes, commuting routes, and transfer behaviors. Traffic pattern recognition has wide application value in aspects such as traffic demand prediction, congestion analysis, traffic scheduling optimization, public transport resource allocation, and travel behavior modeling. It can provide data-driven decision-making support means for urban traffic governance, traffic planning compilation, and operation efficiency improvement, and is one of the basic support technologies for realizing the refined management and intelligent operation of the traffic system.
[0003] Among them, an urban traffic pattern recognition system is a system used to identify the travel behavior rules of urban residents under various public transport modes. By processing and analyzing the trajectory data and passenger flow data of travel modes such as taxis, online car-hailing, buses, and subways, it mines the travel activity rules of residents, and identifies the behavioral characteristics of different travel modes and their competition and cooperation relationships. This system can identify the selection preferences and behavior patterns of residents among different traffic modes, analyze the competition and cooperation relationships between different traffic modes, and further quantify the influence mechanism of the urban built environment on traffic travel. Its uses include supporting the operation monitoring of the urban traffic system, travel structure optimization, public transport service capacity evaluation, and resource allocation scheduling.
[0004] Traditional recognition systems mainly rely on the overall shape and spatio-temporal distribution of trajectory data for traffic behavior modeling, lacking an effective screening mechanism for trajectory quality, resulting in data containing abnormal points such as drifts and breaks directly participating in the analysis, reducing the accuracy of recognition results. When performing trajectory clustering, it often based on distance similarity or morphological similarity indicators, without fully considering the aggregation characteristics of the spatial direction of trajectories, easily leading to mixed clustering of different travel modes and affecting the traffic mode discrimination effect. The trajectory change trend is mostly presented by static graph clustering, failing to depict the evolution process of traffic behavior and difficult to identify the dynamic characteristics of the traffic system. When determining the regional function, it only relies on the residence time as the basis, without integrating the joint judgment of spatial overlap and persistence, resulting in a large number of misidentifications of non-genuine stops. For example, in traffic hub areas, due to frequent short stops, it is easily misidentified as a stop area if only judged based on time, thus affecting the accurate description of the regional traffic function, the recognition stability and dynamic adaptability in a multi-source trajectory data environment, and is not conducive to constructing a high-resolution urban traffic behavior model. Summary of the Invention
[0005] The object of the present invention is to solve the deficiencies existing in the prior art, and a city traffic pattern recognition system based on trajectory clustering is proposed.
[0006] To achieve the above object, the present invention adopts the following technical solution: A city traffic pattern recognition system based on trajectory clustering, the system includes:
[0007] The trajectory credibility elimination module obtains the position points of traffic trajectory data, divides grid cells, calculates the boundary dispersion rate difference of the trajectory data, determines whether the continuous cross-grid difference exceeds the stability threshold, marks and eliminates abnormal trajectories with more than three unstable boundaries, and generates a credible trajectory data set;
[0008] The trajectory semantic clustering module, based on the credible trajectory data set, obtains the trajectory direction and spatial distribution characteristics, calculates the concentration degree of the spatial direction distribution, and semantically clusters the trajectory data according to the high and low of the spatial concentration degree, and generates a semantic trajectory clustering set;
[0009] The trajectory evolution stage recognition module calls the semantic trajectory clustering set, obtains the trajectory coverage rate of the clustering center, calculates the difference in the trajectory coverage rate between adjacent time periods, divides the change in the trajectory coverage rate into three types of stages: stable, diffusion, and contraction, and generates the trajectory evolution stage type;
[0010] The dynamic stop determination module, according to the trajectory evolution stage type, obtains the trajectory segments in the area, calculates the spatial overlap degree and the stop duration between adjacent trajectory segments, marks the trajectory segments that meet the conditions as the dynamic stop state, and generates a dynamic stop area set.
[0011] The improvement of the present invention is that the credible trajectory data set includes a trajectory number identifier, an eliminated trajectory index, and a valid trajectory range, the semantic trajectory clustering set includes a trajectory semantic label, a trajectory cluster boundary configuration, and a trajectory concentration direction, the trajectory evolution stage type is specifically a stable evolution stage type, a centripetal contraction stage type, and a trajectory diffusion stage type, and the dynamic stop area set includes an area number, a stop segment index, and a spatial overlap structure.
[0012] The improvement of the present invention is that the trajectory credibility elimination module includes:
[0013] The grid division sub-module obtains the position points of traffic trajectory data, collects the boundary coordinate group of the urban range and the set of trajectory point position coordinates, divides the entire region into equidistant grid cells according to the longitude and latitude scale ratio based on the boundary coordinate group of the urban range, calls the set of trajectory point position coordinates to determine the grid number where it is located, and establishes a mapping index relationship between the trajectory points and the grid cells, and generates a trajectory grid mapping structure;
[0014] The discrete rate difference calculation sub-module extracts the trajectory segments located in the edge grid cells in each trajectory based on the trajectory grid mapping structure, collects the direction vectors of each segment, calculates the concentration degree of the direction amplitude vector set of each segment in the corresponding grid, obtains the adjacent grid direction vector concentration value and constructs the direction difference term, using the formula:
[0015] ;
[0016] Performs operations to obtain the boundary discrete rate difference of adjacent trajectory segments, determines whether the difference exceeds the stability threshold and marks the stable state of the trajectory segments, and obtains the boundary direction discrete difference value;
[0017] Among them, represents the discrete rate difference between the , grids of the trajectory, , respectively represent the , th, , direction angles within the , grids of the trajectory, , are the number of trajectory segments in the corresponding grids respectively, , are the standard deviations of the direction vector amplitudes in the
[0018] The trajectory validity screening sub-module selects the trajectory segments with a discrete rate difference higher than the stability threshold and a direction offset angle greater than the direction change reference angle in the continuous trajectory segments according to the boundary direction discrete difference value, counts the number of unstable segments marked in the continuous trajectory segments within the same trajectory, and when the cumulative number exceeds three, determines that the trajectory is an invalid trajectory, removes the trajectory and updates the trajectory set to generate a credible trajectory data set.
[0019] The improvement of the present invention is that the trajectory semantic clustering module includes:
[0020] The trajectory category screening sub-module obtains the credible trajectory data set, parses the trajectory source label field, classifies the samples according to the service attribute information included in the trajectory data, and screens the trajectory records from bus lines, taxi services and online car-hailing dispatching to obtain a traffic service trajectory set;
[0021] The spatial direction feature extraction sub-module calls the traffic service trajectory set, collects the direction vectors and spatial coordinate positions of consecutive trajectory points in each trajectory segment, projects the direction vectors of each trajectory, using the formula:
[0022] ;
[0023] Calculate the direction concentration value of each trajectory, establish a direction distribution structure for each type of trajectory classification based on the trajectory direction concentration, and obtain a trajectory direction concentration index set;
[0024] Among them, represents the direction concentration of the trajectory, represents the total number of direction vectors included in the trajectory, represents the th angle of the direction vector in the trajectory, represents the average value of the angles of all direction vectors in the trajectory, represents the th spatial distance between the direction vector in the trajectory and the center point of the trajectory;
[0025] The clustering structure generation sub-module identifies the spatial distribution similarity and direction aggregation characteristics among trajectories according to the trajectory direction concentration index set, performs clustering division according to the relative distance of trajectories in the direction feature space, establishes a semantic aggregation relationship among trajectories, and generates a semantic trajectory clustering set.
[0026] The improvement of the present invention is that the trajectory evolution stage recognition module includes:
[0027] The coverage rate extraction sub-module calls the semantic trajectory clustering set, extracts the boundary position coordinates of the trajectory clustering center point in each time period, combines the coordinate distribution interval of the trajectory samples belonging to the time period, calculates the proportion of the trajectory samples falling into the closed polygonal area of the clustering center, and generates a trajectory center coverage rate value;
[0028] The change amplitude calculation sub-module obtains the coverage rate values in two adjacent time periods according to the trajectory center coverage rate value, collects the corresponding trajectory quantity and the moving distance of the clustering center, and uses the formula:
[0029] ;
[0030] Calculate to obtain the trajectory coverage rate change index;
[0031] Among them, represents the trajectory coverage rate change index, represents the trajectory coverage rate value of the clustering center in the first time period, represents the trajectory coverage rate value of the clustering center in the second time period, represents the number of trajectory samples in the first time period, represents the number of trajectory samples in the second time period, represents the spatial moving distance between the clustering centers in the two time periods.
[0032] The evolution type judgment sub-module compares the trajectory coverage rate change index with a set trajectory evolution difference threshold to judge the change direction and intensity corresponding to the coverage rate change. If the change index is lower than the upper limit of the threshold range, it is classified as stable evolution. If it is higher than the upper limit and the coverage rate increases, it is classified as centripetal contraction. If it is higher than the upper limit and the coverage rate decreases, it is classified as trajectory diffusion, and the trajectory evolution stage type is established.
[0033] The improvement of the present invention is that the dynamic stopping determination module includes:
[0034] The trajectory segment extraction sub-module filters the area numbers in the contraction and stable stages according to the trajectory evolution stage type, obtains all the trajectories in the area and cuts them into continuous trajectory segments according to the time period, establishes the relationship between the trajectory number and the segment index, and generates a set of trajectory time segments;
[0035] The residence degree calculation sub-module calls the set of trajectory time segments, extracts the set of trajectory point positions of the trajectory segments within a unit time, calculates the number of spatial overlapping points and the trajectory duration with the set of trajectory points of adjacent segments, and uses the formula:
[0036] ;
[0037] Through calculation, the spatial residence degree index of the trajectory segment in the local area is obtained, the spatial residence evaluation of each segment is established, and the trajectory segment residence degree value is obtained;
[0038] Among them, represents the trajectory segment residence degree value, represents the number of overlapping trajectory points between the trajectory segment and adjacent segments, represents the residence duration of the trajectory segment in the area, represents the average moving distance of the trajectory segment, represents the trajectory point distribution area of the trajectory segment, represents the trajectory point distribution area of adjacent trajectory segments;
[0039] The stopping state determination sub-module compares the trajectory segment residence degree value with the stopping state threshold, filters the trajectory segments that meet high overlap and low movement in the continuous trajectory segments, classifies them into the intensive stopping set, marks the area numbers to which they belong, and establishes a set of dynamic stopping areas.
[0040] The improvement of the present invention is that the system further includes:
[0041] The urban traffic pattern generation module calls the dynamic parking area set to identify dense parking areas, calls the trajectory data within the areas, extracts spatio-temporal distribution features, compares the trajectory parking features and travel features of the areas, divides the area trajectories according to feature similarity, defines the division results as commuting type, commercial active type, and transportation hub type, and generates urban traffic pattern recognition information;
[0042] The urban traffic pattern recognition information includes traffic type labels, regional traffic activity levels, and traffic behavior attribute indicators.
[0043] The improvement of the present invention is that the urban traffic pattern generation module includes:
[0044] The regional feature extraction sub-module calls the dynamic parking area set, extracts all trajectory point data within the area, calculates the trajectory density value for each time period according to the time label of the trajectory points, and statistically calculates the distribution interval of the trajectory points on the spatial coordinate axis according to the spatial label to obtain the regional trajectory spatio-temporal feature value;
[0045] The behavior feature matching sub-module extracts the residence duration, activity start and end times, and movement range of the trajectory segment according to the regional trajectory spatio-temporal feature value, and extracts the activity radius and path coincidence degree in the trajectory segment, and uses the formula:
[0046] ;
[0047] Calculates the pattern matching degree of the regional trajectory on the behavior index through operations, establishes a mapping relationship according to the similarity scoring rules between the matching degree value and each type of behavior template, and generates a traffic behavior similarity index;
[0048] Among them, represents the traffic behavior similarity index, represents the number of high-frequency occurrence times during the parking period in the trajectory segment, represents the path point coincidence ratio of the trajectory segment within the area, represents the spatial discrete value of the trajectory activity path, represents the trajectory activity radius, represents the average activity radius of all trajectories within the area;
[0049] Compared with the prior art, the advantages and positive effects of the present invention are:
[0050] In the present invention, by analyzing the difference in boundary discretization rate of traffic trajectory data and identifying continuous cross-grid anomalies, the unstable segments in the trajectory are effectively excluded to ensure the accuracy of subsequent data clustering and analysis. Based on the degree of concentration of spatial direction distribution, semantic clustering of the trajectory is performed to improve the accuracy and rationality of trajectory type discrimination. By calculating the difference in trajectory coverage rate of the clustering center in adjacent time periods, the spatial evolution trend of the trajectory is quantified to achieve the dynamic characterization of traffic patterns in the time dimension. Combining the dual indicators of spatial overlap degree and stop duration between trajectory segments, the dynamic stop state is accurately identified to avoid the misjudgment risk caused by single time or space indicators. The spatio-temporal characteristics of trajectory data in dense stop areas are extracted. Through the similarity matching between trajectory characteristics and travel characteristics, the efficient identification of travel function types in urban areas is realized, the credibility and accuracy of trajectory data processing are improved, the generalization and adaptation ability of traffic pattern recognition in scenarios of multiple travel modes interaction is enhanced, the fine characterization and function recognition of urban traffic structure are promoted, and high-resolution data support is provided for the optimal allocation of traffic resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is the system flow chart of the present invention;
[0052] Figure 2 is the flow chart of the trajectory credibility elimination module of the present invention;
[0053] Figure 3 is the flow chart of the trajectory semantic clustering module of the present invention;
[0054] Figure 4 is the flow chart of the trajectory evolution stage identification module of the present invention;
[0055] Figure 5 is the flow chart of the dynamic stop discrimination module of the present invention;
[0056] Figure 6 is the flow chart of the urban traffic pattern generation module of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0057] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0058] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by terms such as "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation on the present invention. In addition, in the description of the present invention, the meaning of "a plurality of" is two or more, unless otherwise specifically defined.
[0059] Please refer to Figure 1 , the present invention provides a technical solution: an urban traffic pattern recognition system based on trajectory clustering. The system includes:
[0060] The trajectory credibility elimination module obtains the position points of traffic trajectory data, divides grid cells, calculates the boundary discretization rate difference of the trajectory data, determines whether the continuous cross-grid difference exceeds the stability threshold, marks and eliminates abnormal trajectories with more than three unstable boundaries, and generates a credible trajectory data set;
[0061] The trajectory semantic clustering module, based on the credible trajectory data set, obtains the trajectory direction and spatial distribution characteristics, screens bus line trajectory, taxi operation trajectory, and online car-hailing driving trajectory data, calculates the spatial direction distribution concentration degree of the trajectory data, and performs semantic clustering on the trajectory data according to the high and low of the spatial concentration degree, generating a semantic trajectory clustering set;
[0062] The trajectory evolution stage recognition module calls the semantic trajectory clustering set, obtains the trajectory coverage rate of the clustering center, calculates the difference in trajectory coverage rate between adjacent time periods, determines whether the coverage rate difference exceeds the trajectory evolution difference threshold, divides the change in trajectory coverage rate into three types of stages: stable, diffusive, and contracting, and generates the trajectory evolution stage type;
[0063] The dynamic stop determination module, according to the trajectory evolution stage type, obtains the trajectory segments in the area, calculates the spatial overlap degree and stop duration between adjacent trajectory segments, determines whether the spatial overlap degree and stop duration of the trajectory segments simultaneously exceed the stop state threshold, marks the trajectory segments that meet the conditions as the dynamic stop state, and generates a dynamic stop area set;
[0064] The urban traffic pattern generation module calls the dynamic stop area set, identifies dense stop areas, calls the trajectory data in the area, extracts spatio-temporal distribution characteristics, compares the stop characteristics and travel characteristics of the area trajectories, divides the area trajectories into traffic patterns according to the feature similarity, defines the division results as commuting type, commercial active type, and transportation hub type, and generates urban traffic pattern recognition information;
[0065] The trustworthy trajectory dataset includes a trajectory number identifier, a trajectory rejection index, and a valid trajectory range. The semantic trajectory clustering set includes a trajectory semantic label, a trajectory cluster boundary configuration, and a trajectory concentration direction. The trajectory evolution stage types are specifically a steady evolution stage type, a centripetal contraction stage type, and a trajectory diffusion stage type. The dynamic stop area set includes an area number, a stop segment index, and a spatial overlap structure. The urban traffic pattern recognition information includes a traffic type label, a regional traffic activity level, and a traffic behavior attribute indicator item.
[0066] Please refer to Figure 2 , the trajectory credibility rejection module includes:
[0067] The grid division sub-module obtains the position points of traffic trajectory data, collects the urban range boundary coordinate group and the trajectory point position coordinate set, divides the whole region into equidistant grid cells according to the urban range boundary coordinate group at the longitude and latitude scales, calls the trajectory point position coordinate set to determine the grid number where it is located, establishes the mapping index relationship between the trajectory point and the grid cell, and generates the trajectory grid mapping structure;
[0068] The grid division sub-module obtains the position points of traffic trajectory data. First, it reads the original trajectory dataset containing vehicle or pedestrian positioning information. Each trajectory consists of longitude and latitude coordinates marked by multiple timestamps, and forms a sequence point set by sampling at intervals of every 10 seconds. The sampling time period is set from 7:00 am to 9:00 pm. Trajectories with a data density greater than 5 points / minute are selected for subsequent processing. At the same time, the urban range boundary coordinate group is collected. This boundary information is extracted from the basic urban map data, and the longitude and latitude range is set from 121.30° east longitude to 121.80° east longitude, and from 31.00° north latitude to 31.40° north latitude. According to this boundary range, it is divided into 50 segments longitudinally and horizontally respectively to form 2500 equidistant grid cells. The longitude span of each grid is 0.01°, and the latitude span is 0.008°. Subsequently, the numbering attribution calculation of the longitude and latitude of each trajectory point is carried out. For example, if the longitude of the trajectory point is 121.45° and the latitude is 31.16°, then the grid number where it is located is (15, 20). The system maps this trajectory point to the grid cell in the 15th row and 20th column, completes the index establishment between the trajectory point and the grid cell. By continuously performing this mapping operation on the full amount of trajectory data, the corresponding grid number is updated point by point, and an index set from the trajectory number to its corresponding multiple grid numbers is established. The data structure of the mapping structure is a one-to-many dictionary structure, where the key is the trajectory number, and the value is an array composed of multiple grid numbers corresponding to the trajectory, forming a unique mapping pair between the trajectory number and the grid path. For example, the mapping path of trajectory T001 is [(12, 15), (13, 15), (13, 16), (14, 16)]. In actual operation, a single trajectory usually corresponds to 20 - 50 grid cells, and the mapping structure is dynamically updated as the trajectory grows, and finally the trajectory grid mapping structure is generated.
[0069] Based on the trajectory grid mapping structure, the discrete rate difference calculation sub-module extracts the trajectory segments located in the edge grid cells in each trajectory, collects the direction vectors of each segment, calculates the concentration degree of the direction amplitude vectors of each segment in the corresponding grid, obtains the adjacent grid direction vector concentration values, constructs the direction difference terms, and uses the formula:
[0070] ;
[0071] Through calculation, obtain the boundary discrete rate difference between adjacent trajectory segments, determine whether the difference exceeds the stability threshold, and mark the stable state of the trajectory segments to obtain the boundary direction discrete difference value;
[0072] Among them, represents the discrete rate difference between the th and th grids of the trajectory, and respectively represent the th and th direction angles in the th and th grids of the trajectory, and are respectively the number of trajectory segments in the corresponding grids, and are the standard deviations of the direction vector amplitudes in the th and th grids;
[0073] Based on the trajectory grid mapping structure, the discrete rate difference calculation sub-module extracts the trajectory segments located in the edge grid cells in each trajectory. The determination criterion for the edge grid cells is: in the grid sequence corresponding to the trajectory, if there is a grid in the four neighbors of a certain grid that has not been passed by the trajectory, then this grid is marked as an edge grid. For example, if the trajectory passes through (12,15), (13,15), (14,15), (15,15), where (12,15) and (15,15) are the starting and ending boundaries, extract the corresponding trajectory points to form segments. Subsequently, collect the direction vectors of each segment. The direction vector is calculated through the coordinate differences between adjacent trajectory points. For example, for point A(121.4500, 31.1500) and point B(121.4510, 31.1515), then the direction angle is , and all angles are taken in degrees, with the range of [0°, 180°]. Calculate the average value and standard deviation according to all the direction angles in each segment. The standard deviation is used as the discrete degree of the direction amplitude vector. Suppose the 5 direction angles in grid i are [45°, 50°, 55°, 52°, 53°], the average value is 51.0°, and the standard deviation S i = 3.5 °, in adjacent grid j, the direction angles are [70°, 68°, 72°, 66°, 69°], the mean value is 69.0°, and the standard deviation S j = 2.2 ° , and the parameters substituted into the formula are as follows:
[0074] ;
[0075] Among them, represents the difference in the trajectory direction discreteness rate between grid i and grid j, , are the direction angle values of the trajectory in the corresponding grid, with the unit of degree, , are the number of trajectory segments in the two grids. In this example, both are 5, , are the standard deviations of the direction angles in grids i and j respectively, representing the fluctuation intensity of the local motion direction. The standard deviation value is obtained by taking the square root of the mean of the squared differences between the direction angle set and the mean. This result indicates that there is a large deviation in the trajectory motion direction between i and j.
[0076] The trajectory validity screening sub-module selects the trajectory segments with a discreteness rate difference higher than the stability threshold and a direction deviation angle greater than the direction change reference angle in the continuous trajectory segments according to the boundary direction discreteness difference value, counts the number of unstable segments marked in the continuous trajectory segments of the same trajectory, and when the cumulative number exceeds three, determines the trajectory as an invalid trajectory, deletes the trajectory and updates the trajectory set to generate a credible trajectory data set.
[0077] The trajectory validity screening sub-module screens the continuous trajectory segments in the trajectory according to the above boundary direction discreteness difference value. In the grid path of each trajectory, it retrieves the value corresponding to the grids between the continuous trajectory segments. If it is higher than the set stability threshold, it is marked as an unstable segment. The stability threshold is set to 20. According to the distribution of the trajectory direction continuity in the sample trajectory set, the upper bound of the value of 90% of the stable segments is selected as 20 as the judgment critical value, and it does not change with the urban area to ensure a consistent judgment benchmark. At the same time, the system judges whether the direction deviation angle between adjacent trajectory segments is greater than the direction change reference angle. This direction change reference angle is set to 30°, that is, if the mean difference of the corresponding direction angles between grid i and j is greater than 30°, the direction deviation angle meets the judgment condition. The setting basis is that the minimum significant deflection angle presented by the real driving trajectory when changing lanes or turning at intersections is about 28° to 35°, so 30° is selected as the unified judgment value. For example, if the continuous segments of a certain trajectory correspond to If they are 22.6, 25.1, 21.4, 17.8 and the direction angle offsets are 32°, 36°, 29°, 28°, then the first 3 segments meet the unstable marker condition. The system counts the number of consecutive unstable segments within the same trajectory. If the cumulative number exceeds 3 segments, it is determined as an invalid trajectory, and the trajectory removal action is executed. The trajectory number is removed from the trajectory set and the valid trajectory list is updated to obtain the final credible trajectory data set.
[0078] Please refer to Figure 3 , the trajectory semantic clustering module includes:
[0079] The trajectory category screening sub-module obtains the credible trajectory data set, parses the trajectory source label field, and classifies the samples according to the service attribute information included in the trajectory data. It screens the trajectory records from bus lines, taxi services, and online car-hailing dispatching to obtain the traffic service trajectory set;
[0080] The trajectory category screening sub-module obtains the credible trajectory data set and parses the source label field in each trajectory record. This field comes from the "service type" identifier preset in the original acquisition link of the trajectory data. This identifier field is of string type and is divided into four types of labels: "bus", "taxi", "online car-hailing", and "private car". During the screening process, first read the corresponding label field of each trajectory record and compare it item by item with the target value in the service trajectory category dictionary. If the value is "bus" or "taxi" or "online car-hailing", then retain the trajectory record. The screening steps are carried out in a loop according to the trajectory number, filtering out the records with the source of "private car" or "unlabeled". Subsequently, for the screened trajectory set, further call the service attribute field information included in the trajectory itself. This field structure includes auxiliary information such as the operation unit number, vehicle number, order number (for online car-hailing), and the affiliated time period mark, etc., to further verify the legality and integrity of its trajectory service attributes. For example, for the record with the trajectory ID of T_003, its service label is "taxi", the operation unit number is "TX001", the trajectory point time is distributed between 08:10 and 08:45, and the trajectory length is 12.5 kilometers. The data meets the urban taxi operation logic, and the system officially classifies this trajectory into the "taxi service" trajectory subset. In the classification and screening, the trajectory service attribute information needs to meet two conditions. The first is that the source label matches the service values of the three categories of bus, taxi, and online car-hailing. The second is that its vehicle number needs to have a matching item in the traffic bureau's registered operation number library. The system verifies through indexing the operation number to ensure that this trajectory record truly comes from an effective traffic service system. If the vehicle number is missing, abnormal, or not in the registry, then this trajectory is excluded. Finally, a traffic service trajectory set is established. This set only retains the trajectory data that passes the above two-layer screening and verification. The set data structure still uses the trajectory number as the key, and the value is composed of a structure with multiple contents such as trajectory points, timestamp sequences, service labels, etc. Finally, the traffic service trajectory set is obtained.
[0081] The spatial direction feature extraction sub-module calls the traffic service trajectory set, collects the direction vectors and spatial coordinate positions of consecutive trajectory points in each trajectory segment, projects the direction vectors of each trajectory, and uses the formula:
[0082] ;
[0083] Perform operations to obtain the direction concentration value of each trajectory, establish a direction distribution structure for each type of trajectory classification based on the trajectory direction concentration, and obtain the trajectory direction concentration index set;
[0084] Among them, represents the direction concentration of the trajectory, represents the total number of direction vectors included in the trajectory, represents the th angle of the direction vector in the trajectory, represents the average value of the angles of all direction vectors in the trajectory, represents the th spatial distance between the direction vector and the center point of the trajectory;
[0085] The spatial direction feature extraction sub-module calls the traffic service trajectory set, collects the direction vectors and spatial coordinate positions of consecutive trajectory points in each trajectory segment, performs direction angle calculations on all point pairs, and the direction angle is defined as the angle between the vector formed by two adjacent points and the due east direction. The value range of the direction angle is [0°, 180°]. For example, if the trajectory point P1 is (121.4550, 31.2450) and P2 is (121.4600, 31.2475), then the direction angle is , in the trajectory T_045, there are a total of F = 8 direction vectors, and the angle values are [63.4°, 64.0°, 62.1°, 63.8°, 63.5°, 62.9°, 64.2°, 63.7°], and the average direction angle is . Calculate the cosine value between the direction angle and the average direction angle to obtain the cosine value array , , , , , , , , and the spatial distance corresponding to each direction vector is calculated as follows: Extract the Euclidean distance between the midpoint of each direction vector and the center point of the trajectory, calculate it in meters, and assume the center point is (121.4575, 31.2460). After coordinate conversion calculation, the values are , , , , , , , , each item is substituted into the formula for calculation:
[0086]
[0087] After calculating each item separately:
[0088] ;
[0089] In the formula, is the direction concentration value, which measures the overall direction consistency of the trajectory. The value range is (0, 1). The closer the value is to 1, the more concentrated the direction is. is the number of direction vectors. is the th direction vector angle. is the average direction angle. is used to measure the degree of direction deviation. is the spatial distance between the direction vector and the center point. By adding to control the influence weight of the direction away from the center point. In this example, the direction concentration of the trajectory is 0.2380, and this value is recorded in the direction concentration index set corresponding to the current trajectory classification.
[0090] The clustering structure generation sub-module identifies the spatial distribution similarity and direction aggregation characteristics among trajectories according to the trajectory direction concentration index set, performs clustering division according to the relative distance of trajectories in the direction feature space, establishes the semantic aggregation relationship among trajectories, and generates the semantic trajectory clustering set.
[0091] The clustering structure generation sub-module identifies the differences in direction patterns among different trajectories according to the aforementioned direction concentration index set. The system first constructs the direction feature space matrix of all trajectories. Each row of the matrix corresponds to a trajectory, and the column is its direction concentration , average direction angle , and standard deviation of direction angle . The three-dimensional vector represents the trajectory direction feature. For example, the direction feature of trajectory T_045 is (0.2380, 63.45, 0.65). Subsequently, the Euclidean distance calculation between trajectories is performed on all trajectory feature vectors. The direction space distance between any two trajectories is defined as the square root of the sum of the squares of the differences of the three feature items. If the direction features of T_045 and T_121 are (0.2380, 63.45, 0.65) and (0.2420, 62.75, 0.70), then their direction space distance is:
[0092] ;
[0093] Pair all trajectories in pairs to calculate the direction space distance, and perform clustering according to the set distance threshold. The threshold value is set to 0.75. The setting basis is that in the historical samples of urban traffic trajectories, for more than 90% of the trajectory pairs with direction semantic consistency, the direction feature space distance is less than 0.75. Therefore, this value is selected as the upper limit of the distance for semantic trajectory clustering. If the distance between two trajectories is less than the threshold, they are grouped into the same cluster. Finally, all trajectories are combined according to the direction space proximity relationship to form multiple trajectory sets with consistent direction semantics. The system assigns a semantic number to each cluster and maps the original trajectory number to the cluster number to complete the generation of the semantic trajectory clustering set.
[0094] Please refer to Figure 4 , the trajectory evolution stage recognition module includes:
[0095] The coverage rate extraction sub-module calls the semantic trajectory clustering set, extracts the boundary position coordinates of the center points of the trajectory clusters in each time period, combines the coordinate distribution intervals of the trajectory samples in the time period, calculates the proportion of the trajectory samples falling into the closed polygonal area of the cluster center, and generates the trajectory center coverage rate value;
[0096] The coverage rate extraction sub-module calls the semantic trajectory clustering set. First, it divides the time window interval by hour-level time segmentation, with each hour as an independent analysis period. It extracts the position coordinates of the center points of the trajectory cluster structures in each time period. The center points of the trajectory clusters are obtained by calculating the longitude and latitude averages of the midpoint coordinates of all trajectories in the cluster. For example, a certain cluster contains trajectories T01~T08, and its center point coordinates are (121.4553, 31.2411). Subsequently, it calls all the trajectory points of all trajectories in the current time period in the cluster, obtains the minimum bounding rectangle boundary of the trajectory point set, calculates its boundary area, and divides the number of trajectory points included in the boundary area by the total number of trajectory points of the cluster in this time period to obtain the proportion of the trajectory points falling into the boundary area of the cluster center. Suppose this cluster contains 180 trajectory points in the time period from 8:00 to 9:00, and 150 of them are inside the circumscribed rectangle area. Then the coverage rate in this time period is 150 / 180 = 0.833. The value range of the coverage rate is defined between [0, 1]. The closer the value is to 1, the more concentrated the trajectory sample distribution is, and the higher the representativeness of the cluster center. The boundary area of the cluster center encloses the distribution boundary of the trajectory points in a convex hull manner. Those with non-closed shapes or point sets distributed outside the boundary line are not included in the number of internal trajectory points. The accuracy of the trajectory points used in the actual calculation needs to meet more than five decimal places (i.e., the coordinate accuracy is within 1 meter) to ensure the accuracy of the spatial boundary calculation. Finally, the trajectory center coverage rate values corresponding to each cluster in each time period are generated.
[0097] The change amplitude calculation sub-module obtains the coverage rate values within two adjacent time periods based on the trajectory center coverage rate value, collects the corresponding trajectory quantity and the moving distance of the clustering center, and uses the formula:
[0098] ;
[0099] Performs operations to obtain the trajectory coverage rate change index;
[0100] Among them, represents the trajectory coverage rate change index, represents the trajectory coverage rate value of the clustering center within the first time period, represents the trajectory coverage rate value of the clustering center within the second time period, represents the number of trajectory samples within the first time period, represents the number of trajectory samples within the second time period, represents the spatial moving distance between the clustering centers of the two time periods.
[0101] The change amplitude calculation sub-module extracts the coverage rate values of the same cluster within two adjacent time periods in sequence according to the above-mentioned coverage rate values, obtains the number of its trajectory samples and the spatial moving distance of the clustering center. Suppose the coverage rate within the first time period is 0.833, the corresponding trajectory quantity is 180, the coverage rate within the second time period is 0.785, the corresponding trajectory quantity is 200, and the coordinates of the clustering center points within the two time periods are (121.4553, 31.2411) and (121.4571, 31.2405) respectively. After coordinate conversion, its spatial distance is calculated as meters (note: the longitude and latitude coordinates are converted at 111 km per degree), and substitutes the parameters into the trajectory coverage rate change index calculation formula:
[0102] ;
[0103] In the formula, is the coverage rate change index, indicating the weighted change intensity of the coverage rate change amplitude within two time periods under the influence of the number of trajectory samples and the spatial movement, and are the coverage rate values, and are the sample quantities, is the moving distance of the clustering center, with the unit of meter. The moving distance is obtained through the conversion of longitude and latitude coordinates. The result value of the index is a numerical index with dimensional consistency and is not distorted by the change of the trajectory quantity scale. The result value of 0.2773 indicates that there is a deviation trend in the coverage rate change in the current time period.
[0104] The evolution type judgment sub-module compares the trajectory coverage rate change index with the set trajectory evolution difference threshold to judge the change direction and intensity corresponding to the coverage rate change. If the change index is lower than the upper limit of the threshold range, it is classified as stable evolution. If it is higher than the upper limit and the coverage rate increases, it is classified as centripetal contraction. If it is higher than the upper limit and the coverage rate decreases, it is classified as trajectory diffusion, and the trajectory evolution stage type is established.
[0105] The evolution type judgment sub-module performs trajectory evolution mode recognition based on the aforementioned coverage rate change index. The system sets the trajectory evolution difference threshold to 0.15. The basis for this threshold setting is the statistical analysis of the evolution of 10,000 traffic service trajectory samples in 10 cities within consecutive hourly periods. The average value of the change amplitude index within the 90% interval is about 0.15. This value is selected as the benchmark point for dividing the stable and changing states, and this value remains unchanged regardless of the trajectory source or urban structure changes. The judgment step first compares the current coverage rate change index with 0.15. If , the trajectory evolution is classified as "stable evolution". If and , that is, the coverage rate becomes larger, the trajectory is determined to be "centripetal contraction". If and , that is, the coverage rate decreases, it is determined to be "trajectory diffusion". In the calculation results, , at the same time , so it is judged that the evolution type is trajectory diffusion. The system generates a trajectory evolution stage type record with this clustering number and time period index as identifiers, and writes structured field information such as evolution type, start and end of time period, change of clustering center coordinates, and coverage rate change into the record for subsequent trajectory behavior trend modeling.
[0106] Please refer to Figure 5 , the dynamic stop determination module includes:
[0107] The trajectory segment extraction sub-module filters the area numbers in the contraction and stable stages according to the trajectory evolution stage type, obtains all the trajectories in the area and cuts them into continuous trajectory segments according to the time period, establishes the relationship between the trajectory number and the segment index, and generates a set of trajectory time segments;
[0108] The trajectory segment extraction sub-module filters the region numbers in the "centripetal contraction" or "stable evolution" stage according to the trajectory evolution stage type. The system reads the trajectory evolution type records generated in the previous stage, extracts the entries with the evolution type field value of "contraction" or "stable", and obtains the corresponding region numbers, such as region numbers A101, A102, B034, etc. Subsequently, it obtains the trajectory number sets corresponding to these region numbers and divides them into several segments according to the time series of each trajectory. The division unit time of each trajectory segment is 15 minutes. If the duration of trajectory T011 is from 07:00 to 08:00, it is divided into 4 trajectory segments T011-1 to T011-4. Each segment saves all the trajectory points within this time period, and at the same time establishes a mapping relationship between the trajectory number and its segment index. This mapping relationship is implemented using a two-dimensional array structure. Each primary key is the trajectory number, and the value is the corresponding time segment number sequence. For example, T011 corresponds to the segments [T011-1, T011-2, T011-3, T011-4]. Each segment object contains the trajectory point position coordinates, the time stamp sequence, the corresponding region number, and the belonging time period, which is convenient for subsequent spatial analysis operations. During the division process, the trajectory duration must be greater than the segment unit time and the number of trajectory points must be no less than 3 points / minute. If the number of trajectory points in any segment is less than 45, this segment is not included in the subsequent analysis to ensure that the data density meets the requirements of subsequent overlap and stay analysis. Finally, a trajectory time segment set is generated.
[0109] The stay degree calculation sub-module calls the trajectory time segment set, extracts the trajectory point position sets of the trajectory segments within the unit time, calculates the number of spatial overlap points and the trajectory duration with the trajectory point sets of adjacent segments, and uses the formula:
[0110] ;
[0111] Through calculation, the spatial stay degree index of the trajectory segment in the local area is obtained, and a spatial residence evaluation of each segment is established to obtain the trajectory segment stay degree value;
[0112] Among them, represents the trajectory segment stay degree value, represents the number of overlapping trajectory points between the trajectory segment and the adjacent segment, represents the residence duration of the trajectory segment in the region, represents the average moving distance of the trajectory segment, represents the trajectory point distribution area of the trajectory segment, represents the trajectory point distribution area of the adjacent trajectory segment;
[0113] The sojourn degree calculation sub-module calls the above-mentioned set of trajectory time segments, aggregates the segments by area number, and performs spatial overlap degree and sojourn situation operations region by region. First, it extracts the set of trajectory point positions within each segment, discretizes the trajectory point coordinates into integer grid points with a spatial accuracy of 2 meters. For example, the trajectory point coordinates in trajectory segment T011-2 are (121.45702, 31.24133), which are mapped to (121457, 312413) after coordinate conversion and discretization. Subsequently, it cross-compares adjacent segments within the same time period to determine the number of intersections between the discretized point sets of the two segments, denoted as , if the number of intersection trajectory points between T011-2 and T012-1 is 65 points, then , the trajectory duration is the time span of the segment. 15 minutes is converted to 900 seconds. The average moving distance of the trajectory segment is calculated by summing and averaging the Euclidean distances between trajectory points. Suppose the average distance between trajectory points in a certain segment is 4.2 meters and there are 60 segments in total, then the average moving distance is 252 meters. The distribution area of trajectory points and the distribution area of adjacent segments are estimated by the area of the minimum circumscribed polygon. Suppose , , substituting into the formula:
[0114] ;
[0115] In the formula, is the sojourn degree value of the trajectory segment, comprehensively evaluating whether the trajectory points have repeated occurrences in the same area. The higher the value, the more significant the spatial sojourn phenomenon of the segment. The first term of the formula is the standardized measure of the spatial overlap degree of trajectory points, and the second term is the normalized ratio difference of the area difference of point distributions. The combination of the two represents the spatial consistency and stagnation characteristics between this segment and adjacent segments. The calculated sojourn degree value in this example is 0.1635, and the system records this value into the segment attribute structure for status screening in the next stage.
[0116] The stop state determination sub-module compares the sojourn degree value of the trajectory segment with the stop state threshold, screens the trajectory segments that meet the conditions of high overlap and low movement in the continuous trajectory segments, classifies them into the intensive stop set, marks the area number to which they belong, and establishes a dynamic stop area set.
[0117] The stopping state determination sub-module compares the aforementioned trajectory segment stay degree value with the set stopping state threshold. The system sets the stopping state determination threshold to 0.15. This threshold is derived from the statistical distribution of the stay degree sample values of known parking behavior trajectory segments. It is selected that the stay degree of 95% of the segments determined as "stopping" is greater than 0.15. Therefore, this value is used as the determination boundary for identifying dense stopping segments. A judgment operation is performed on all segments. If a certain segment , then it is determined to meet the stopping state. At the same time, the system performs an aggregation judgment on consecutive segments with the same trajectory number. If there are 3 or more consecutive segments that meet the stopping state under a certain trajectory number, the spatial position area number will be recorded as a dense stopping area. For example, segments T011-1 to T011-3 of trajectory T011 are all determined as stopping segments, and the corresponding area number is A102. The system adds A102 to the current set of stopping areas. This set uses the area number as the primary key, and the value is the sequence of all stopping trajectory numbers and segment numbers including this area, and is continuously updated, finally establishing a dynamic set of stopping areas.
[0118] Please refer to Figure 6 , the urban traffic mode generation module includes:
[0119] The area feature extraction sub-module calls the dynamic set of stopping areas, extracts all the trajectory point data within the area, calculates the trajectory density value for each time period according to the time tags of the trajectory points, and statistically obtains the distribution interval of the trajectory points on the spatial coordinate axes according to the spatial tags, obtaining the spatio-temporal feature values of the regional trajectories;
[0120] The area feature extraction sub-module calls the dynamic set of stopping areas, sequentially reads the trajectory segment sets corresponding to each area number, extracts the longitude and latitude coordinates and timestamp information of all the trajectory points in the set, divides all the trajectory points into time periods according to the hour dimension based on the timestamps, and statistically calculates the number of trajectory points in each time period and divides it by the area of this area to obtain the trajectory density value. The density unit is "points per square kilometer". For example, the number of trajectory points in area number A204 during the period from 08:00 to 09:00 is 420, and the area of the area is 0.35 square kilometers. Then the density value for this time period is 1200 points / km 2, meanwhile, the system counts the distribution ranges of all trajectory points in this area on the spatial coordinate axes (longitude and latitude), extracts the maximum and minimum longitudes and the maximum and minimum latitudes respectively, and determines the horizontal and vertical distribution spans of the trajectory points. For example, if the longitude range of the trajectory points is [121.4520, 121.4605] and the latitude range is [31.2401, 31.2446], the horizontal span is 0.0085 degrees and the vertical span is 0.0045 degrees. Combining the change trend of the trajectory density and the spatial distribution boundary, the system constructs a trajectory spatio-temporal eigenvalue structure for this area, which contains fields such as the trajectory density of each time period, the maximum span of the trajectory on the spatial coordinate axes, and the regional boundary distribution range, as input parameters for subsequent behavior analysis.
[0121] According to the spatio-temporal eigenvalues of the regional trajectory, the behavior feature matching sub-module extracts the residence duration, activity start and end times, and movement range of the trajectory segment, and extracts the activity radius and path coincidence degree in the trajectory segment, using the formula:
[0122] ;
[0123] Performs operations to obtain the pattern matching degree of the regional trajectory in terms of behavior indicators, establishes a mapping relationship based on the matching degree value and the similarity scoring rules of each type of behavior template, and generates a traffic behavior similarity index;
[0124] Among them, represents the traffic behavior similarity index, represents the number of high-frequency occurrence times during the stop period in the trajectory segment, represents the path point coincidence ratio of the trajectory segment in the area, represents the spatial dispersion value of the trajectory activity path, represents the trajectory activity radius, represents the average activity radius of all trajectories in the area;
[0125] According to the above spatio-temporal eigenvalues of the trajectory, the behavior feature matching sub-module extracts the residence duration, activity start and end times, and activity range of each trajectory segment. The residence duration is defined as the time length during which the trajectory points continuously exist in the area. The activity start and end times are the time difference between the earliest and latest timestamps within this segment. The activity range is the length of the diagonal of the minimum circumscribed rectangle formed by the trajectory points. The path coincidence degree represents the ratio of the trajectory point path in this trajectory segment to the coincidence of the historical trajectory points in this area. The activity radius represents the maximum radius from the trajectory points in this segment to the center point of the segment. The average activity radius is the value average of all trajectory segments in the area. Suppose the analysis result of trajectory segment Z302 is as follows: the occurrence frequency during the stop period is 5 times, denoted as , the path overlap ratio is 0.72, denoted as , the trajectory path dispersion is calculated by the standard deviation of the Euclidean distance from the path points to the center point, denoted as meters, the trajectory activity radius is meters, the regional average activity radius is meters, substituting into the formula:
[0126] ;
[0127] In the formula, is the traffic behavior similarity index, which measures the degree of closeness between this trajectory segment and the regional typical behavior template. is the number of occurrences of the trajectory segment in the high-frequency time period within the target area, which can be obtained by statistical analysis of the concentrated distribution interval of timestamps. is the coincidence rate of the trajectory path and the regional historical path points, and the calculation method is the number of intersections of the trajectory path points and the regional historical trajectory points divided by the total number of trajectory path points. is the degree of dispersion of the trajectory segment path. , are the individual and regional average activity radii respectively. The result shows that the trajectory Z302 is weak in terms of spatial activity and behavior repeatability, and its behavior similarity value is 0.1074.
[0128] The mode label generation sub-module determines the mode label corresponding to the interval where the similarity index is located according to the traffic behavior similarity index, in combination with the preset standard interval of traffic function types, and matches the commuting type, commercial active type and transportation hub type labels to establish urban traffic mode recognition information.
[0129] The mode label generation sub-module classifies according to the above traffic behavior similarity index. The system presets three similarity threshold intervals for traffic function types: 0.08 to 0.18 for the commuting type, 0.18 to 0.30 for the commercial active type, and above 0.30 for the transportation hub type. This classification standard is obtained from large-scale trajectory clustering statistics. Based on the sample distribution extracted from the high-frequency trajectory areas in the urban central area, around subway stations and in business districts, the mean values of the similarity indices of their typical trajectory segments are calculated respectively to obtain the relative intervals of the three behavior patterns, and through manual verification and verification of alignment with traffic facilities, the classification boundaries are repeatable and representative. For the trajectory segment Z302, its behavior similarity value is 0.1074, which falls into the index interval of the commuting type. Therefore, the system determines it as the commuting type mode. The system outputs this judgment result in a structured form, and the structure includes the trajectory number, the number of the area it belongs to, the matching behavior label, the matching interval number, and the original value of the behavior similarity, and finally forms an urban traffic mode recognition information set, which is used as the input basis for subsequent traffic facility layout or traffic flow adjustment strategy formulation.
[0130] The above are only the preferred embodiments of the present invention and do not limit the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. An urban traffic pattern recognition system based on trajectory clustering, characterized in that, The system includes: A trajectory credibility elimination module obtains the position points of traffic trajectory data, divides grid cells, calculates the boundary discretization rate difference of the trajectory data, determines whether the continuous cross-grid difference exceeds the stability threshold, marks and eliminates abnormal trajectories with more than three unstable boundaries, and generates a credible trajectory dataset; A trajectory semantic clustering module, based on the credible trajectory dataset, obtains the trajectory direction and spatial distribution characteristics, calculates the concentration degree of the spatial direction distribution, and semantically clusters the trajectory data according to the high or low spatial concentration degree to generate a semantic trajectory clustering set; A trajectory evolution stage recognition module calls the semantic trajectory clustering set, obtains the trajectory coverage rate of the clustering center, calculates the difference in trajectory coverage rates in adjacent time periods, divides the change in trajectory coverage rates into three types of stages: stable, spreading, and shrinking, and generates the trajectory evolution stage type; A dynamic stop determination module, according to the trajectory evolution stage type, obtains the trajectory segments in the area, calculates the spatial overlap degree and stop duration between adjacent trajectory segments, marks the trajectory segments that meet the conditions as the dynamic stop state, and generates a dynamic stop area set; A urban traffic pattern generation module calls the dynamic stop area set, identifies dense stop areas, calls the trajectory data in the area, extracts spatio-temporal distribution characteristics, compares the stop characteristics and travel characteristics of the area trajectories, divides the area trajectories into traffic patterns according to the feature similarity, defines the division results as commuting type, commercial active type, and transportation hub type, and generates urban traffic pattern recognition information; The urban traffic pattern recognition information includes traffic type labels, regional traffic activity levels, and traffic behavior attribute indication items; The urban traffic pattern generation module includes: A regional feature extraction sub-module calls the dynamic stop area set, extracts all the trajectory point data in the area, calculates the trajectory density value for each time period according to the time label of the trajectory points, and statistically obtains the distribution interval of the trajectory points on the spatial coordinate axis according to the spatial label to obtain the spatio-temporal characteristic value of the regional trajectory; Call the dynamic stop area set, sequentially read the trajectory segment sets corresponding to each area number, extract the longitude and latitude coordinates and timestamp information of all the trajectory points in the set, divide all the trajectory points into time periods according to the hour dimension according to the timestamp, and statistically obtain the number of trajectory points in each time period and divide it by the area of the area to obtain the trajectory density value; A behavior feature matching sub-module, according to the spatio-temporal characteristic value of the regional trajectory, extracts the residence duration, activity start and end times, and movement range of the trajectory segment, and extracts the activity radius and path coincidence degree in the trajectory segment, and uses the formula: ; Calculate to obtain the pattern matching degree of the regional trajectory in terms of behavior indicators, establish a mapping relationship according to the matching degree value and the similarity scoring rules of each type of behavior template, and generate a traffic behavior similarity indicator; Among them, represents the traffic behavior similarity index, represents the number of frequently occurring times during the stop period in the trajectory segment, represents the coincidence ratio of path points of the trajectory segment within the area, represents the spatial dispersion value of the trajectory activity path, represents the trajectory activity radius, represents the average activity radius of all trajectories within the area; A pattern label generation sub-module, according to the traffic behavior similarity indicator, combines the preset traffic function type standard interval, determines the pattern label corresponding to the interval where the similarity indicator is located, and matches the commuting type, commercial active type, and transportation hub type labels to establish urban traffic pattern recognition information.
2. The urban traffic pattern recognition system based on trajectory clustering according to claim 1, characterized in that The trusted trajectory dataset includes a trajectory number identifier, a culled trajectory index, and a valid trajectory range. The semantic trajectory clustering set includes a trajectory semantic label, a trajectory cluster boundary configuration, and a trajectory concentration direction. The trajectory evolution stage types are specifically a steady evolution stage type, a centripetal contraction stage type, and a trajectory diffusion stage type. The dynamic stop area set includes an area number, a stop segment index, and a spatial overlap structure.
3. The urban traffic pattern recognition system based on trajectory clustering according to claim 1, characterized in that, The trajectory credibility culling module includes: The grid division sub-module obtains the position points of traffic trajectory data, collects the boundary coordinate groups of the urban range and the set of trajectory point position coordinates, divides the entire region into equidistant grid cells according to the longitude and latitude scale ratio based on the boundary coordinate groups of the urban range, calls the set of trajectory point position coordinates to determine the grid numbers they are in, establishes a mapping index relationship from trajectory points to grid cells, and generates a trajectory-grid mapping structure; The discrete rate difference calculation sub-module, based on the trajectory-grid mapping structure, extracts the trajectory segments located in the edge grid cells in each trajectory, collects the direction vectors of each segment, calculates the degree of concentration of the direction amplitude vectors of each segment in the corresponding grid, obtains the adjacent grid direction vector concentration value and constructs a direction difference term, using the formula: ; Performs operations to obtain the boundary discrete rate difference between adjacent trajectory segments, determines whether the difference exceeds the stability threshold and marks the stable state of the trajectory segments, and obtains the boundary direction discrete difference value; Among them, represents the difference in the discretization rate between the and grids of the trajectory, and respectively represent the and th and direction angles within the grids of the trajectory, and are respectively the number of trajectory segments within the corresponding grids, and are the standard deviations of the magnitude of the direction vectors within the and grids; The trajectory validity screening sub-module, according to the boundary direction discrete difference value, selects the trajectory segments in the continuous trajectory segments with a discrete rate difference higher than the stability threshold and a direction deviation angle greater than the direction change reference angle, counts the number of unstable ones marked in the continuous trajectory segments within the same trajectory, and when the cumulative number exceeds three, determines that the trajectory is an invalid trajectory, culls the trajectory and updates the trajectory set, generating a trusted trajectory dataset.
4. The urban traffic pattern recognition system based on trajectory clustering according to claim 1, characterized in that, The trajectory semantic clustering module includes: The trajectory category screening sub-module obtains the trusted trajectory dataset and parses the trajectory source label field, classifies the samples according to the service attribute information included in the trajectory data, and screens the trajectory records from bus lines, taxi services, and online car-hailing dispatching to obtain a traffic service trajectory set; The spatial direction feature extraction sub-module calls the traffic service trajectory set, collects the direction vectors and spatial coordinate positions of consecutive trajectory points in each trajectory segment, projects the direction vectors of each trajectory, using the formula: ; Performs operations to obtain the direction concentration value of each trajectory, and establishes a direction distribution structure for each trajectory classification based on the trajectory direction concentration, obtaining a trajectory direction concentration index set; Among them, represents the directional concentration of the trajectory, represents the total number of direction vectors included in the trajectory, represents the th angle of the direction vector in the trajectory, represents the average value of the angles of all direction vectors in the trajectory, represents the th spatial distance between the direction vector in the trajectory and the center point of the trajectory; The clustering structure generation sub-module, according to the trajectory direction concentration index set, identifies the spatial distribution similarity and direction aggregation characteristics among trajectories, performs clustering division according to the relative distance of trajectories in the direction feature space, establishes a semantic aggregation relationship among trajectories, and generates a semantic trajectory clustering set.
5. The urban traffic pattern recognition system based on trajectory clustering according to claim 1, characterized in that, The trajectory evolution stage recognition module includes: The coverage rate extraction sub-module calls the semantic trajectory clustering set, extracts the boundary position coordinates of the trajectory clustering center point in each time period, combines the coordinate distribution interval of the trajectory samples belonging to the time period, calculates the proportion of the trajectory samples falling into the closed polygon area of the clustering center, and generates the trajectory center coverage rate value; The change amplitude calculation sub-module obtains the coverage rate values in two adjacent time periods according to the trajectory center coverage rate value, collects the corresponding trajectory quantity and the moving distance of the clustering center, and uses the formula: ; Calculate to obtain the trajectory coverage rate change index; Among them, represents the trajectory coverage change index, represents the trajectory coverage value of the cluster center in the first time period, represents the trajectory coverage value of the cluster center in the second time period, represents the number of trajectory samples in the first time period, represents the number of trajectory samples in the second time period, represents the spatial movement distance between the cluster centers in the two time periods; The evolution type judgment sub-module compares the trajectory coverage rate change index with the set trajectory evolution difference threshold, judges the change direction and intensity corresponding to the coverage rate change. If the change index is lower than the upper limit of the threshold interval, it is classified as stable evolution. If it is higher than the upper limit and the coverage rate increases, it is classified as centripetal contraction. If it is higher than the upper limit and the coverage rate decreases, it is classified as trajectory diffusion, and the trajectory evolution stage type is established.
6. The urban traffic pattern recognition system based on trajectory clustering according to claim 1, characterized in that, The dynamic stop determination module includes: The trajectory segment extraction sub-module filters the area numbers in the contraction and stable stages according to the trajectory evolution stage type, obtains all the trajectories in the area and cuts them into continuous trajectory segments according to the time period, establishes the relationship between the trajectory number and the segment index, and generates the trajectory time segment set; The residence degree calculation sub-module calls the trajectory time segment set, extracts the trajectory point position set of the trajectory segment in unit time, calculates the number of spatial overlap points and the trajectory duration with the adjacent segment trajectory point set, and uses the formula: ; Calculate to obtain the spatial residence degree index of the trajectory segment in the local area, establish the spatial residence evaluation of each segment, and obtain the trajectory segment residence degree value; Among them, represents the dwell degree value of the trajectory segment, represents the number of overlapping trajectory points between the trajectory segment and adjacent segments, represents the dwell duration of the trajectory segment within the region, represents the average moving distance of the trajectory segment, represents the distribution area of the trajectory points of the trajectory segment, represents the distribution area of the trajectory points of adjacent trajectory segments; The stop state determination sub-module compares the trajectory segment residence degree value with the stop state threshold, filters the trajectory segments that meet the conditions of high overlap and low movement in the continuous trajectory segments, classifies them into the intensive stop set, marks the area number to which they belong, and establishes the dynamic stop area set.
Citation Information
Patent Citations
Urban semantic map construction method based on trajectory data mining
CN112765226A