Bus trajectory mining method and application based on clustering and deviation threshold correction screening
By using clustering algorithm and angle deviation threshold correction screening technology in the processing of bus trajectory data, the problem of abnormal trajectory points cannot be completely screened in the existing technology is solved, and high-precision and high-confidence trajectory data are achieved, and intelligent Traffic management.
Patent Information
- Application Number
- CN202411639734.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
When processing bus trajectory data, the prior art has the problem that abnormal trajectory points cannot be completely screened, which affects the accuracy of the trajectory, is too complex to calculate, and cannot completely avoid the connection of abnormal points.
Using the bus trajectory mining method based on clustering and deviation threshold correction screening, GPS data is processed through the clustering algorithm, data points that do not belong to any cluster are eliminated, angle deviation values are calculated, initial threshold values are set, and corrections are calculated based on the arrival distance. Factor, dynamically adjust the filter threshold to remove abnormal data points.
It effectively reduces the impact of abnormal points on trajectory analysis, improves the accuracy and credibility of trajectory data, reduces the computational complexity, provides high-precision and high-confidence trajectory data, and supports intelligent traffic management.
Smart Images

Figure CN119151163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a bus trajectory mining method based on clustering and deviation threshold correction screening and application. Background Art
[0002] Intelligent transportation is an important part of future urban management, and public transportation, such as subways and buses, has the advantages of large capacity, low cost, safety and environmental protection, and is the top priority of intelligent transportation management.
[0003] Processing and analyzing bus GPS data can accurately extract the specific trajectory of bus routes, which is the basis for calculating bus stop distances, drawing bus electronic fences, analyzing road conditions, and predicting bus arrival times. It is of great significance for bus companies to conduct real-time bus monitoring, bus report statistics, and bus big data analysis.
[0004] Although GPS is relatively accurate, it still has the problem of deviation due to factors such as signal interference, terrain, weather, and equipment stability. At present, using clustering algorithms to calculate the similarity of the trajectories of multiple vehicles is a common method of trajectory mining. However, due to the above problems, some abnormal trajectory points cannot be completely screened out. Even if the trajectories of multiple vehicles are used for similarity calculation and extraction, the calculation complexity will be too high and the connection of abnormal points cannot be completely avoided, resulting in the accuracy of the trajectory being affected. It can be seen that the existing technology still has certain limitations when processing trajectory data. Summary of the invention
[0005] In view of the deficiencies in the prior art, the object of the present invention is to provide a bus trajectory mining method and application based on clustering and deviation threshold correction screening.
[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention includes:
[0007] In a first aspect, the present invention provides a bus trajectory mining method based on clustering and deviation threshold correction screening, which comprises:
[0008] Get the raw GPS data of multiple buses on the same route;
[0009] Performing clustering processing on the GPS raw data to form several clusters, removing data points that do not belong to any cluster, and obtaining cluster screening data;
[0010] Segmenting the cluster screening data according to the station sequence to form multiple segments of data;
[0011] For any segment of the plurality of segments of data, a first azimuth angle from a target data point to a next data point and a second azimuth angle from a target data point to a segment end station are calculated, and an angular deviation value between the first azimuth angle and the second azimuth angle is calculated;
[0012] Counting the distribution of the angle deviation values, and setting an initial threshold value so that the proportion of angle deviation values higher than the initial threshold value is a preset proportion;
[0013] Calculate a correction factor based on the arrival distance between the target data point and the end station of the segment, wherein the correction factor has an inverse correlation trend with the arrival distance and is always a positive value;
[0014] Calculating a screening threshold based on the product of the correction factor and the initial threshold, and eliminating some target data points whose corresponding first azimuth angle is above the screening threshold, to obtain azimuth screening data;
[0015] Based on the azimuth filtering data, the bus track corresponding to the line is extracted.
[0016] In a second aspect, the present invention also provides an application of the above-mentioned bus trajectory mining method in bus operation management.
[0017] In a third aspect, the present invention further provides a bus trajectory mining system based on multi-target vehicle GPS data clustering, which comprises:
[0018] The data acquisition module is used to obtain the original GPS data of multiple buses on the same route;
[0019] A clustering and screening module is used to perform clustering processing on the raw GPS data to form a number of clusters, remove data points that do not belong to any cluster, and obtain clustering and screening data;
[0020] A segmentation module, used to segment the cluster screening data according to the station sequence to form multiple segments of data;
[0021] An angle deviation module, used for calculating, for any segment of the multiple segments of data, a first azimuth angle from a target data point to a next data point and a second azimuth angle from a target data point to a segment end station, and calculating an angle deviation value between the first azimuth angle and the second azimuth angle;
[0022] An initial threshold module, used for counting the distribution of the angle deviation values and setting an initial threshold so that the proportion of angle deviation values higher than the initial threshold is a preset proportion;
[0023] A correction factor module, used for calculating a correction factor based on the arrival distance between the target data point and the end station of the segment, wherein the correction factor is inversely correlated with the arrival distance and is always a positive value;
[0024] A threshold screening module, used to calculate a screening threshold based on the product of the correction factor and the initial threshold, and to remove some target data points whose corresponding first azimuth angle is above the screening threshold, so as to obtain azimuth screening data;
[0025] The trajectory extraction module is used to filter the data based on the azimuth angle and extract the bus trajectory corresponding to the line.
[0026] Based on the above technical solution, compared with the prior art, the beneficial effects of the present invention at least include:
[0027] The bus trajectory mining method provided by the present invention first aggregates the line trajectory based on the unsupervised clustering algorithm and the screening rule of azimuth difference, and uses the GPS data of multiple buses to complement each other, thereby reducing the influence of abnormal points on trajectory analysis; in addition, the present invention also proposes a correction algorithm based on the anti-correlation of the station distance for azimuth difference screening, and sets different angle difference screening strengths according to different station distances, so as to avoid overly strict or overly loose screening at different positions, and finally provides high-precision and high-reliability trajectory data, creating favorable conditions for intelligent traffic management.
[0028] The above description is only an overview of the technical solution of the present invention. In order to enable those skilled in the art to more clearly understand the technical means of the present application and implement them according to the contents of the specification, the following is a description of the preferred embodiments of the present invention in conjunction with detailed drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flowchart of a bus trajectory mining method provided by a typical implementation case of the present invention;
[0030] Figure 2 is a representative bus trajectory schematic diagram obtained by a bus trajectory mining method provided by a typical implementation case of the present invention;
[0031] Figure 3 It is a bus track point arrangement diagram obtained by a bus track mining method provided by a typical comparative case of the present invention;
[0032] Figure 4 It is a bus trajectory point arrangement diagram obtained by a bus trajectory mining method provided by another typical control case of the present invention. DETAILED DESCRIPTION
[0033] In view of the deficiencies in the prior art, the inventor of this case has proposed the technical solution of the present invention after long-term research and extensive practice. The technical solution, its implementation process and principle will be further explained as follows.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0035] Moreover, relational terms such as “first” and “second” are merely used to distinguish one component or method step from another with the same name, but do not necessarily require or imply any such actual relationship or order between these components or method steps.
[0036] See also Figure 1 As shown, an embodiment of the present invention provides a bus trajectory mining method based on clustering and deviation threshold correction screening, which includes the following steps:
[0037] Get the raw GPS data of multiple buses on the same route;
[0038] Performing clustering processing on the GPS raw data to form several clusters, removing data points that do not belong to any cluster, and obtaining cluster screening data;
[0039] Segmenting the cluster screening data according to the station sequence to form multiple segments of data;
[0040] For any segment of the plurality of segments of data, a first azimuth angle from a target data point to a next data point and a second azimuth angle from a target data point to a segment end station are calculated, and an angular deviation value between the first azimuth angle and the second azimuth angle is calculated;
[0041] Counting the distribution of the angle deviation values, and setting an initial threshold value so that the proportion of angle deviation values higher than the initial threshold value is a preset proportion;
[0042] Calculate a correction factor based on the arrival distance between the target data point and the end station of the segment, wherein the correction factor has an inverse correlation trend with the arrival distance and is always a positive value;
[0043] Calculating a screening threshold based on the product of the correction factor and the initial threshold, and eliminating some target data points whose corresponding first azimuth angle is above the screening threshold, to obtain azimuth screening data;
[0044] Based on the azimuth filtering data, the bus track corresponding to the line is extracted.
[0045] Generally, there will not be a large change in direction in a certain segment of a bus route. The present invention proposes a data screening strategy based on clustering and angle difference screening based on this rule, so as to extract bus trajectories. The azimuth strategy compares the azimuth difference between the current data point and the next data point and the azimuth difference between the current data point and the end station of the segment (i.e., the target station of this segment). Even if a bend is encountered, as long as the azimuth change between the current data point and the next data point is not greater than the screening threshold, it will not be filtered out. This strategy is effective in most cases, especially in bends or curved sections, and also shows excellent adaptability.
[0046] In most cases, the azimuth change between the current data point and the next data point is gradual, so it will not be misjudged as an abnormal point due to a single turn. However, if the path has a large turn, such as a sharp turn with a very small radius, the azimuth difference between the current data point and the next station may be large. At this time, the dynamic threshold adjustment strategy (inverse distance coefficient) adjusted previously can make up for this. In some preferred cases, the turning point in the path can also be defined as a new station, such as inserting the turning intersection in the line as a virtual station into the segment for re-segmentation calculation.
[0047] Based on the above scheme, the present invention effectively improves the accuracy and credibility of trajectory mining through unsupervised clustering algorithm and geographic information azimuth method. Compared with the existing technology, this method can more accurately identify and filter out abnormal trajectory points, and the generated trajectory data is more reliable, providing strong support for intelligent traffic management and decision-making.
[0048] The above shows the general process of the bus trajectory mining method proposed in the present invention. As for some specific and more critical specific steps, in some implementation schemes, the process of determining the initial threshold can be expressed as follows:
[0049] ;
[0050] in, represents the initial threshold; represents the average value of the angle deviation value; represents the standard deviation of the angle deviation value; It represents the proportionality coefficient, and its value range is 1-3, and its preferred range is between 1-2. In the specific implementation cases tested in the present invention, its value is usually 1.
[0051] The above preferred technical solution uses statistical analysis to calculate the initial threshold value. Generally, the value of k is 1, which is based on the distribution principle in statistics, and takes the mean value + standard deviation as the upper limit of the acceptable angle deviation value to form the initial threshold value. Of course, the feasible method of determining the initial threshold value is not limited to this, and it can also be determined by proportional screening, such as directly sorting the angle deviation values from high to low, and selecting the dividing value between the first 10% and the last 90% or the first 20% and the last 80% data as the initial threshold value.
[0052] The initial threshold reflects the overall deviation based on statistics. However, it is insufficient to filter directly based on the initial threshold. This is because, for a section of line, when its data point is far away from the section end station, even if the data point has a certain offset distance, the second azimuth between it and the section end station will not change significantly, and the corresponding angle deviation value will not change significantly; when the data point is very close to the section end station, a slight offset will cause a large change in the second azimuth between it and the section end station, and then the angle deviation value between it and the first azimuth will be greatly affected by it. If two data points with different distances are filtered based on the same initial threshold, it will lead to too loose filtering for data points with a longer distance, and too strict filtering for data points with a closer distance. In many cases, the first half of a segment is almost completely retained, and the proportion of the second half that is filtered out increases sharply as the distance to the station becomes smaller and smaller, which ultimately leads to uneven screening of the line, with more abnormal data points in the front section and insufficient available data points retained in the back section, and ultimately it is difficult to obtain accurate, stable and complete bus trajectories.
[0053] In view of the above problems, the technical solution proposed in the present invention provides a correction factor which is inversely correlated with the distance to the station and is always positive to correct the initial threshold. The threshold of the front section is lowered and the threshold of the back section is increased to compensate for the screening differences at different distances.
[0054] In some specific implementation schemes, the calculation method of the correction factor can be expressed as:
[0055] ;
[0056] in, represents the correction factor; Indicates the distance to the station, in meters; c is a constant, ranging from 30 to 100; Indicates the upper limit of the correction factor, ranging from 0.8 to 0.9; Indicates the lower limit of the correction factor, ranging from 0.1 to 0.3.
[0057] In the above technical scheme, the present invention mainly adjusts the threshold screening strategy of different positions through a nonlinear function. When the distance to the station is small, the calculation result of the correction factor (the calculated value when not limited by the upper limit value) is approximately equal to 1, allowing a larger azimuth angle change. When the distance to the station is large, the calculation result of the correction factor (the calculated value when not limited by the lower limit value) is not too close to 0, which leads to overly strict screening of long-distance target data points.
[0058] In addition, in the above implementation, in order to ensure that the sections with very long distances between some stations do not produce too small correction factors, a minimum threshold strategy is also set. In this way, it is ensured that the threshold is not lower than a reasonable lower limit. In practice, the lower limit of the screening threshold can basically be set at around 5°. In this way, even if the distance is significantly extended, overly strict screening will not be formed.
[0059] At the same time, the implementation method provided by the present invention can also flexibly adjust the upper limit value. Although the above function has determined the upper limit value to be 1, when it is found that the value is 1, it is still insufficient for screening close-range target data points. It can be adjusted to an upper limit lower than 1 to enhance the close-range screening intensity.
[0060] As for the constant c in the formula, in practice its value range is generally between 30 and 100 (corresponding to the case where the unit of d is m, when the unit of d changes, the value of c should change proportionally).
[0061] The larger the c value, the greater the azimuth change allowed, especially at closer distances, and the screening strategy can be flexibly adjusted at different distances. At shorter distances (for example, between 10 meters and 100 meters), the angular difference of the target data points may change greatly, so the Threshold needs to be close to 1, which can allow more angular changes. Selecting c in the range of 30 to 100 can ensure that within this distance range, the Threshold is maintained in a reasonable range of 0.5 to 1, allowing sufficient azimuth correction; when the distance increases (for example, from 100m to 1000m or more), it is reasonable to expect that the correction factor will gradually decrease, indicating that the azimuth change needs to be more stringent. Selecting c in the range of 30 to 100 ensures that in this case, the Threshold becomes smaller but does not approach 0 too quickly. If c is too small (for example, 10), the Threshold will be very small at long distances, and the screening may be too strict, causing normal azimuth changes to be misjudged as abnormal. In addition, if the value of c is set too large (for example, above 200), the correction factor will hardly change significantly with the change of the distance to the station, resulting in overly loose screening and inability to form a reasonable screening strategy.
[0062] Of course, the setting of c value is not fixed. For different bus routes or even different regions or cities, the average interval between stations is different. For example, some routes are long-distance routes, and some routes are short-distance routes with frequent stops. The c value can be adjusted according to the average station distance of the route. For example, if the average station distance is very far (such as more than 1500m), the c value can be considered to be 100, and more extreme cases can be more than 100; if the average station distance is close, such as 500m, the c value can be considered to be set to around 30. In general, the c value can be positively correlated with the average station distance of the route.
[0063] The above content is a complete introduction to the relevant technical means for threshold correction. As for other steps of the trajectory mining method provided by the present invention, in some embodiments, the calculation process of the angle deviation value can be expressed as:
[0064] , ;
[0065] ;
[0066] ;
[0067] ;
[0068] in, represents the first azimuth; represents the second azimuth; represents the angle deviation value; It represents the difference in longitude between two points; It indicates the longitude difference between the point stations; Indicates the longitude value; Indicates the latitude value; A sequence number representing the target data point; Indicates the end station of the segment.
[0069] Of course, the above exemplary method is one of the representative methods adopted by the present invention, and the feasible azimuth angle calculation and angle deviation value calculation method are not limited to the scope of the above examples.
[0070] In addition, regarding the cluster screening step, in some embodiments, the process of obtaining the cluster screening data may specifically include:
[0071] Set the radius parameters and minimum point parameters;
[0072] Traversing each of the data points, when the number of other data points within the radius parameter around any data point is greater than the minimum point parameter, define the data point as a core point, and the other data points within the radius parameter as neighborhood points corresponding to the core point;
[0073] After a complete traversal, data points that are neither core points nor neighborhood points are removed, and the remaining data points constitute the clustering screening data.
[0074] And in some embodiments, before performing the clustering process, the following steps may also be included:
[0075] The GPS raw data is preprocessed, wherein the data preprocessing includes screening for significant anomalies, and significant anomalies include non-positive values of instantaneous speed.
[0076] Specifically in some implementation schemes, the GPS raw data includes at least the latitude and longitude of the bus, the station sequence, the instantaneous speed, and the timestamp, but is not limited thereto.
[0077] The second aspect of the embodiments of the present invention further provides an application of the bus trajectory mining method provided by any of the above implementation schemes in bus operation management.
[0078] Correspondingly, the third aspect of the embodiment of the present invention further provides a bus trajectory mining system based on multi-target vehicle GPS data clustering, which includes:
[0079] The data acquisition module is used to obtain the original GPS data of multiple buses on the same route;
[0080] A clustering and screening module is used to perform clustering processing on the raw GPS data to form a number of clusters, remove data points that do not belong to any cluster, and obtain clustering and screening data;
[0081] A segmentation module, used to segment the cluster screening data according to the station sequence to form multiple segments of data;
[0082] An angle deviation module, used for calculating, for any segment of the multiple segments of data, a first azimuth angle from a target data point to a next data point and a second azimuth angle from a target data point to a segment end station, and calculating an angle deviation value between the first azimuth angle and the second azimuth angle;
[0083] An initial threshold module, used for counting the distribution of the angle deviation values and setting an initial threshold so that the proportion of angle deviation values higher than the initial threshold is a preset proportion;
[0084] A correction factor module, used for calculating a correction factor based on the arrival distance between the target data point and the end station of the segment, wherein the correction factor is inversely correlated with the arrival distance and is always a positive value;
[0085] A threshold screening module, used to calculate a screening threshold based on the product of the correction factor and the initial threshold, and to remove some target data points whose corresponding first azimuth angle is above the screening threshold, so as to obtain azimuth screening data;
[0086] The trajectory extraction module is used to filter the data based on the azimuth angle and extract the bus trajectory corresponding to the line.
[0087] Finally, an embodiment of the present invention further provides a readable storage medium, wherein the scale storage medium stores a computer program, and when the computer program is executed, the steps of the bus trajectory mining method provided in any of the above embodiments are executed.
[0088] The technical solution of the present invention is further described in detail below through several embodiments and in conjunction with the accompanying drawings. However, the selected embodiments are only used to illustrate the present invention, and do not limit the scope of the present invention.
[0089] Example 1
[0090] This embodiment illustrates a complete process of bus trajectory mining, which specifically includes the following steps:
[0091] 1. Data Preprocessing
[0092] Collect GPS operation data of multiple vehicles over multiple days, including latitude and longitude, station sequence, instantaneous speed, timestamp, etc. Preprocess the collected data, remove significant abnormal data, and limit the instantaneous speed to speed>0 to obtain trajectory data during normal operation.
[0093] 2. Unsupervised Clustering Algorithms
[0094] The unsupervised clustering algorithm DBSCAN is used to perform cluster analysis on all trajectory points, and the trajectory data points are divided into several clusters, where each cluster represents the driving trajectories of multiple vehicles on the same route. Through clustering, the common trajectories of multiple vehicles on the same route can be identified as regular trajectories. Trajectory points that do not belong to any cluster or are outside the cluster are regarded as abnormal trajectories and are thus screened out.
[0095] The steps of the DBSCAN algorithm are as follows:
[0096] a. Define the radius parameter epsilon = 0.5 and the minimum number of points parameter MinPts = 10.
[0097] b. For each point, calculate the number of its neighboring points within its radius epsilon. If the number of neighboring points is not less than MinPts, mark it as a core point.
[0098] c. Expand the core points to form clusters and mark all core points and their neighboring points.
[0099] 3. Trajectory segmentation processing
[0100] The clustered trajectories are segmented according to the station sequence of the line, and each trajectory subsequence is represented as (where i belongs to the length of the station sequence.) In each trajectory, the distance between the trajectory point and the next station is calculated based on the latitude and longitude of the trajectory point and the latitude and longitude of the next station and sorted in descending order of distance.
[0101] 4. Calculate geospatial azimuth
[0102] 4.1 Calculate the azimuth between adjacent GPS points and the next station
[0103] For each segment of trajectory data, calculate the azimuth between adjacent GPS points , and the azimuth between the current track point and the next station The specific calculation method is as follows:
[0104] ;
[0105] in, , , is the longitude difference between the two points.
[0106] 4.2 Determining the azimuth difference threshold
[0107] The variance analysis method is used to analyze all the azimuth difference values in each trajectory. , calculate its mean and standard deviation Then, the initial threshold of the azimuth difference value is determined according to formula (4):
[0108] (4);
[0109] where k = 1 based on 3 The principle is set to capture most of the normal points and strictly eliminate obvious abnormal points, so that precise trajectory tracking can be achieved in the case of extremely large data volumes.
[0110] The initial threshold is applied to the difference analysis of the first track point in each track segment. In the subsequent track points, a distance-based anti-correlation coefficient is set according to the distance to the next station. This coefficient is combined with the initial threshold of the azimuth angle. The formula is as follows:
[0111] * Threshold;
[0112] in, ;
[0113] =D t / D max ;
[0114] D t represents the straight-line distance between the target data point and the segment end station; Dmax It represents the straight-line distance between the farthest data point and the end station of the segment, and specifies the upper limit value of the correction factor during the calculation process. When the calculated value of the correction factor is higher than the upper limit value, the correction factor takes the upper limit value, and the value range of the upper limit value is 5.
[0115] Through this method, the azimuth angle threshold can be adjusted dynamically, and the screening intensity of trajectory data points can be finely adjusted according to the distance.
[0116] 4.3 Calculating the azimuth difference
[0117] Calculate the difference between the azimuth of adjacent GPS points and the azimuth from the current point to the next station :
[0118] (5)
[0119] 5. Trajectory reconstruction
[0120] The segments are connected in sequence, the original trajectory is reconstructed, and a complete trajectory path is generated. This method greatly improves the accuracy and reliability of trajectory mining by combining GPS data of multiple vehicles and clustering algorithms.
[0121] 6. Result Output
[0122] The final output of the typical bus trajectory extraction results can be found in Figure 2 As shown, Figure 2 The relevant map background is hidden, and only the extracted route shape is retained.
[0123] Comparative Example 1
[0124] This comparative example is substantially the same as Example 1, except that:
[0125] No correction factor Threshold is introduced, but the initial threshold is directly used Filter the data points in the trajectory.
[0126] In this comparison example, for data points far from the end station of the segment, the offset distance between the point and the station has little effect on the angle, which will result in a certain offset. The impact is also much smaller than that of data points closer to the end of the segment, which will lead to the problem of uneven screening at the beginning and end of a segment, and ultimately make the data difficult to use for trajectory mining.
[0127] The final trajectory diagram of the complete bus route is as follows Figure 3As shown in the figure, it can be found that in many sections, especially the sections with longer distances, the screening of data with longer distances is too loose, which eventually leads to the problem of obvious abnormal dispersion of individual sections, and it is impossible to reconstruct the trajectory based on the screened data to output as Figure 2 The trajectory line shown.
[0128] Comparative Example 2
[0129] This comparative example is substantially the same as Example 1, except that:
[0130] For the correction factor Threshold, upper and lower limits are no longer set.
[0131] In this case, the screening of data points near the two ends of a segment may also be polarized, resulting in abnormalities in some sections, especially near the turning position of the line with a certain curvature. The results are as follows: Figure 4 As shown, it is impossible to reconstruct the trajectory based on the filtered data to output Figure 2 The trajectory line shown.
[0132] Based on the above embodiments and control examples, it can be clearly seen that the embodiments of the present invention provide a trajectory mining method based on GPS data of multiple vehicles, which can effectively improve the accuracy and credibility of trajectory data, solve the problem of inaccurate trajectory data caused by equipment stability problems in the prior art, and has important practical significance for intelligent traffic management.
[0133] It should be understood that the above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A bus trajectory mining method based on clustering and deviation threshold correction screening, characterized in that: include: Get the raw GPS data of multiple buses on the same route; Performing clustering processing on the GPS raw data to form several clusters, removing data points that do not belong to any cluster, and obtaining cluster screening data; Segmenting the cluster screening data according to the station sequence to form multiple segments of data; For any segment of the multiple segments of data, a first azimuth from the target data point to the next data point and a second azimuth from the segment end point are calculated, and an angle deviation value between the first azimuth and the second azimuth is calculated; the calculation process of the angle deviation value is expressed as: in, represents the first azimuth; represents the second azimuth; represents the angle deviation value; It represents the difference in longitude between two points; It indicates the longitude difference between the point stations; Indicates the longitude value; Indicates the latitude value; A sequence number representing the target data point; represents the end station of the segment; Counting the distribution of the angle deviation values, and setting an initial threshold value so that the proportion of angle deviation values higher than the initial threshold value is a preset proportion; The correction factor is calculated based on the arrival distance between the target data point and the end station of the segment. The correction factor has an anti-correlated trend with the arrival distance and is always a positive value. The correction factor is a nonlinear function, and an upper limit and a lower limit are set. The calculation method is expressed as follows: ; in, represents the correction factor; Indicates the distance to the station, in meters; c is a constant, ranging from 30 to 100; Indicates the upper limit of the correction factor, ranging from 0.8 to 0.9; Indicates the lower limit of the correction factor, ranging from 0.1 to 0.3; Calculating a screening threshold based on the product of the correction factor and the initial threshold, and removing some target data points whose corresponding first azimuth angle is above the screening threshold, to obtain azimuth screening data; Based on the azimuth filtering data, the bus track corresponding to the line is extracted.
2. The bus trajectory mining method according to claim 1, characterized in that: The determination process of the initial threshold is expressed as: ; in, represents the initial threshold; represents the average value of the angle deviation value; represents the standard deviation of the angle deviation value; Indicates the proportional coefficient, the value range is 1-3.
3. The bus trajectory mining method according to claim 1, characterized in that: The process of obtaining the cluster screening data specifically includes: Set the radius parameters and minimum point parameters; Traversing each of the data points, when the number of other data points within the radius parameter around any data point is greater than the minimum point parameter, define the data point as a core point, and the other data points within the radius parameter as neighborhood points corresponding to the core point; After a complete traversal, data points that are neither core points nor neighborhood points are removed, and the remaining data points constitute the clustering screening data.
4. The bus trajectory mining method according to claim 1, characterized in that: Before performing the clustering process, the method further includes: The GPS raw data is preprocessed, wherein the data preprocessing includes screening for significant anomalies, and significant anomalies include non-positive values of instantaneous speed.
5. The bus trajectory mining method according to claim 1 or 4, characterized in that: The GPS raw data includes the latitude and longitude of the bus, the stop sequence, the instantaneous speed, and the timestamp.
6. Application of the bus trajectory mining method described in any one of claims 1 to 5 in bus operation management.
7. A bus trajectory mining system based on multi-target vehicle GPS data clustering, used to implement the bus trajectory mining method according to any one of claims 1 to 5, characterized in that: include: The data acquisition module is used to obtain the original GPS data of multiple buses on the same route; A clustering and screening module is used to perform clustering processing on the raw GPS data to form a number of clusters, remove data points that do not belong to any cluster, and obtain clustering and screening data; A segmentation module, used to segment the cluster screening data according to the station sequence to form multiple segments of data; An angle deviation module, used for calculating, for any segment of the multiple segments of data, a first azimuth angle from a target data point to a next data point and a second azimuth angle from a target data point to a segment end station, and calculating an angle deviation value between the first azimuth angle and the second azimuth angle; An initial threshold module, used for counting the distribution of the angle deviation values and setting an initial threshold so that the proportion of angle deviation values higher than the initial threshold is a preset proportion; A correction factor module, used for calculating a correction factor based on the arrival distance between the target data point and the end station of the segment, wherein the correction factor is inversely correlated with the arrival distance and is always a positive value; A threshold screening module, used to calculate a screening threshold based on the product of the correction factor and the initial threshold, and to remove some target data points whose corresponding first azimuth angle is above the screening threshold, so as to obtain azimuth screening data; The trajectory extraction module is used to filter the data based on the azimuth angle and extract the bus trajectory corresponding to the line.
Citation Information
Patent Citations
Bus station arriving and leaving precise time calculating method based on GPS trajectory big data
CN108154698A
Meta-learning-based vehicle trajectory clustering method and system
CN111539454A