Vehicle driving route classification method, device and equipment and readable storage medium
By analyzing the area from the vehicle positioning information and performing deduplication and clustering analysis, the problem of huge computing resources of the trajectory similarity algorithm in the prior art is solved, efficient vehicle driving route classification is achieved, and the reliability of classification is improved.
Patent Information
- Application Number
- CN202411683813.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, when trajectory similarity algorithm classifies vehicle driving routes, computing resources are consumed greatly, resulting in inefficiency.
By analyzing the first and second regions from the vehicle positioning information, global deduplication and adjacent deduplication are performed, combined with TF-IDF text vectorization and cluster analysis, the preliminary, intermediate and final categories of the vehicle's driving route are gradually divided.
The consumption of computing resources is reduced, the calculation efficiency of vehicle driving route classification is improved, and the trajectory similarity of vehicles with the same final category is high and the classification is reliable.
Smart Images

Figure CN119719826A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle performance analysis, and in particular to a vehicle driving route classification method, device, equipment and readable storage medium. Background Art
[0002] With the booming automobile industry and increasingly busy transportation, accurate evaluation of vehicle performance has become a matter of great concern to many automobile manufacturers, transportation companies, and car owners. Vehicle fuel consumption, water temperature, fan power consumption and other performance characteristics are key indicators for measuring vehicle performance. By tracking and comparing these indicators under different driving conditions, we can intuitively understand whether the vehicle is in good operating condition, whether there are potential performance problems, and how its performance compares with other similar vehicles.
[0003] In order to achieve the above goals, it is an important basic work to reasonably classify vehicle routes, so as to compare and analyze various vehicle performance indicators under the same category of routes. In the prior art, trajectory similarity algorithms are usually used to classify vehicle routes. However, trajectory similarity algorithms have significant defects in practical applications. The algorithm requires high-precision mathematical operations on a large amount of vehicle trajectory data, involving complex spatial coordinate calculations, curve fitting, and multi-dimensional data comparison operations, which consumes huge computing resources. Summary of the invention
[0004] The present application provides a vehicle driving route classification method, device, equipment and readable storage medium, which can solve the technical problem of huge consumption of computing resources of trajectory similarity algorithm existing in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a vehicle driving route classification method, the vehicle driving route classification method comprising:
[0006] Parse the first area and the second area from the positioning information of each vehicle at each time point during the statistical period, wherein the second area is the same as the first area, or the second area is a sub-area of the first area;
[0007] Performing global deduplication on the first regions involved in each vehicle to obtain a first region set, and for vehicles having a region number greater than 2 in the first region set, classifying the vehicle into at least one preliminary category according to the region number in the first region set;
[0008] In the same preliminary category, the first regions involved in each vehicle are subjected to adjacent deduplication to obtain a first region sequence, each first region sequence is subjected to TF-IDF text vectorization to obtain a corresponding first vector, and the vehicles are subjected to cluster analysis according to the first vectors to classify the vehicles into at least one intermediate category;
[0009] In the same intermediate category, adjacent second regions involved in each vehicle are deduplicated to obtain a second region sequence, TF-IDF text vectorization is performed on each second region sequence to obtain a corresponding second vector, and cluster analysis is performed on the vehicles according to the second vectors to divide the vehicles into at least one final category.
[0010] Furthermore, in one embodiment, the step of parsing the first area and the second area from the positioning information of each vehicle at each time point during the statistical period includes:
[0011] For each vehicle’s location information at each time point during the statistical period:
[0012] If the positioning information includes a first-level administrative division and a second-level administrative division, the first-level administrative division is recorded as the first area, and the second-level administrative division is recorded as the second area;
[0013] If the positioning information includes the first-level administrative division but does not include the second-level administrative division, the first-level administrative division is recorded as the first area and the second area.
[0014] Furthermore, in one embodiment, before the step of performing cluster analysis on the vehicles according to the first vector, the following steps are further included:
[0015] If the number of vehicles in the current preliminary category is greater than or equal to 100, the number of clusters for cluster analysis is set to 5;
[0016] If the number of vehicles in the current preliminary category is less than 100, the number of clusters for cluster analysis is set to 3.
[0017] Furthermore, in one embodiment, the step of performing cluster analysis on the vehicles according to the second vector includes:
[0018] Perform K-means clustering on the vehicles according to the second vector;
[0019] Before the step of performing cluster analysis on the vehicles according to the second vector, the method further includes:
[0020] Determine the optimal number of clusters for K-means clustering based on the elbow method.
[0021] Furthermore, in one embodiment, the vehicle driving route classification method further includes:
[0022] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0023] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0024] After clustering the vehicles according to the first vector, for clusters with a number of vehicles greater than or equal to a preset threshold, modifying the label value of the second label of the vehicles in the cluster to the label value of the cluster label;
[0025] After clustering analysis is performed on the vehicles according to the second vector, for clusters where the number of vehicles is greater than or equal to a preset threshold, the label value of the third label of the vehicles in the cluster is modified to the label value of the cluster label.
[0026] Furthermore, in one embodiment, after the step of globally removing duplicates from the first area involved in each vehicle to obtain the first area set, the step further includes:
[0027] For vehicles whose number of regions in the first region set is equal to 1 or 2, the second region involved in each vehicle is globally deduplicated to obtain a second region set, and vehicles with the same second region set are classified into the same final category.
[0028] Furthermore, in one embodiment, the vehicle driving route classification method further includes:
[0029] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0030] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0031] After obtaining the second area set, vehicles with equal label values of the first label are grouped according to whether the second area set is the same. For groups with the number of vehicles greater than or equal to the preset threshold, the groups are sorted according to the number of vehicles, and the label values of the third labels of the vehicles in the group are modified according to the sorting results of the groups.
[0032] In a second aspect, an embodiment of the present application further provides a vehicle driving route classification device, the vehicle driving route classification device comprising:
[0033] A region analysis module, used to analyze the positioning information of each vehicle at each time point during the statistical period to obtain a first region and a second region, wherein the second region is the same as the first region, or the second region is a sub-region of the first region;
[0034] A first classification module is used to globally remove duplicates from the first area involved in each vehicle to obtain a first area set, and for vehicles with a number of areas greater than 2 in the first area set, classify the vehicle into at least one preliminary category according to the number of areas in the first area set;
[0035] A second classification module is used to perform adjacent deduplication on the first regions involved in each vehicle in the same preliminary category to obtain a first region sequence, perform TF-IDF text vectorization on each first region sequence to obtain a corresponding first vector, and perform cluster analysis on the vehicles according to the first vectors to classify the vehicles into at least one intermediate category;
[0036] The third classification module is used to perform adjacent deduplication on the second areas involved in each vehicle in the same intermediate category to obtain a second area sequence, perform TF-IDF text vectorization on each second area sequence to obtain a corresponding second vector, and perform cluster analysis on the vehicles according to the second vectors to classify the vehicles into at least one final category.
[0037] In a third aspect, an embodiment of the present application also provides a vehicle driving route classification device, which includes a processor, a memory, and a vehicle driving route classification program stored in the memory and executable by the processor, wherein when the vehicle driving route classification program is executed by the processor, the steps of the above-mentioned vehicle driving route classification method are implemented.
[0038] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, on which a vehicle driving route classification program is stored, wherein when the vehicle driving route classification program is executed by a processor, the steps of the above-mentioned vehicle driving route classification method are implemented.
[0039] In this application, the first area and the second area are extracted from the vehicle positioning information, and the first area is globally deduplicated to obtain a first area set. For vehicles with more than 2 areas in the first area set, a step-by-step classification strategy is adopted. The preliminary categories are first divided according to the number of areas in the first area set, and then the first area is subjected to adjacent deduplication, TF-IDF text vectorization and cluster analysis to divide the intermediate categories. Finally, the second area is subjected to adjacent deduplication, TF-IDF text vectorization and cluster analysis to divide the final categories. Through this application, the vehicle driving routes are classified with the help of pure text calculations, with high computational efficiency and low computing resource consumption. It has been verified that the trajectories of vehicles with the same final category have high similarity and high classification reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a process flow of a vehicle driving route classification method in an embodiment of the present application;
[0041] Figure 2 This is a schematic diagram of determining the optimal number of clusters using the elbow method in one embodiment of the present application;
[0042] Figure 3 This is a schematic diagram of the functional modules of a vehicle driving route classification device in one embodiment of the present application;
[0043] Figure 4 This is a schematic diagram of the hardware structure of the vehicle route classification device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0046] In a first aspect, an embodiment of the present application provides a method for classifying vehicle driving routes.
[0047] Figure 1 A schematic flow chart of a vehicle driving route classification method in an embodiment of the present application is shown.
[0048] Reference Figure 1 In one embodiment, the vehicle driving route classification method includes the following steps:
[0049] S1. parse the positioning information of each vehicle at each time point during the statistical period to obtain a first area and a second area, wherein the second area is the same as the first area, or the second area is a sub-area of the first area.
[0050] Specifically, usually, the first area represents a larger positioning range, and the second area is a sub-area in the first area, representing a smaller positioning range. In special cases, the first area and the second area represent the same positioning range.
[0051] Furthermore, in one embodiment, the step of parsing the first area and the second area from the positioning information of each vehicle at each time point during the statistical period includes:
[0052] For each vehicle’s location information at each time point during the statistical period:
[0053] If the positioning information includes a first-level administrative division and a second-level administrative division, the first-level administrative division is recorded as the first area, and the second-level administrative division is recorded as the second area;
[0054] If the positioning information includes the first-level administrative division but does not include the second-level administrative division, the first-level administrative division is recorded as the first area and the second area.
[0055] Specifically, the first-level administrative division refers to the administrative area that is directly under the jurisdiction of the political power or government according to the management level. In China, the first-level administrative division is the provincial administrative division, including provinces, autonomous regions, municipalities directly under the central government, and special administrative regions. The second-level administrative division is the administrative division between the provincial administrative division and the county administrative division. In China, the second-level administrative division includes prefecture-level cities, regions, autonomous prefectures, and leagues.
[0056] For example, when the vehicle is located in Wuhan City, its positioning information is Wuhan City, Hubei Province, Hubei Province is recorded as the first area, and Wuhan City is recorded as the second area. When the vehicle is located in Beijing, its positioning information is Beijing City, and Beijing City is recorded as the first area and the second area.
[0057] S2. Perform global deduplication on the first regions involved in each vehicle to obtain a first region set. For vehicles whose number of regions in the first region set is greater than 2, classify the vehicles into at least one preliminary category according to the number of regions in the first region set.
[0058] Specifically, global deduplication refers to removing duplicate data elements in the entire data set or a given set of data, retaining only one copy to ensure the uniqueness of the data.
[0059] For example, the first areas parsed from the positioning information of a vehicle at multiple time points are, in chronological order, Shaanxi Province, Shaanxi Province, Inner Mongolia Autonomous Region, Inner Mongolia Autonomous Region, Shaanxi Province, Shaanxi Province, Hubei Province, Hubei Province, Shaanxi Province, Shaanxi Province, Shaanxi Province, Inner Mongolia Autonomous Region, Hubei Province, and Hubei Province. After global deduplication, the first area set of the vehicle is Shaanxi Province, Inner Mongolia Autonomous Region, and Hubei Province.
[0060] In this embodiment, for vehicles whose number of regions in the first region set is greater than 2, a step-by-step classification strategy is designed, considering that the number and frequency of the second regions they pass through during the statistical period are relatively complex and cannot be simply classified by text comparison.
[0061] Specifically, the preliminary categories are divided according to the number of regions in the first region set. For example, vehicles with the same number of regions in the first region set are divided into the same preliminary category: vehicles with 3 regions in the first region set are divided into preliminary category 1, and vehicles with 4 regions in the first region set are divided into preliminary category 2. For another example, vehicles with the number of regions in the first region set within a preset range are divided into the same preliminary category: vehicles with the number of regions in the first region set greater than or equal to 5 are divided into preliminary category 3.
[0062] S3. In the same preliminary category, adjacent first regions involved in each vehicle are deduplicated to obtain a first region sequence, TF-IDF text vectorization is performed on each first region sequence to obtain a corresponding first vector, and cluster analysis is performed on the vehicles according to the first vectors to classify the vehicles into at least one intermediate category.
[0063] Specifically, adjacent deduplication focuses on whether data elements in adjacent positions in the data are repeated. It only removes adjacent and identical data elements, and does not process duplicate elements in non-adjacent positions.
[0064] For example, the first areas parsed from the positioning information of a vehicle at multiple time points are, in chronological order: Shaanxi Province, Shaanxi Province, Inner Mongolia Autonomous Region, Inner Mongolia Autonomous Region, Inner Mongolia Autonomous Region, Shaanxi Province, Shaanxi Province, Shaanxi Province, Hubei Province, Hubei Province, Shaanxi Province, Shaanxi Province, Shaanxi Province, Inner Mongolia Autonomous Region, Hubei Province, and Hubei Province. After removing adjacent duplicates, the first area sequence of the vehicle is Shaanxi Province, Inner Mongolia Autonomous Region, Shaanxi Province, Hubei Province, Shaanxi Province, Inner Mongolia Autonomous Region, and Hubei Province.
[0065] TF-IDF (Term Frequency-Inverse Document Frequency) is a commonly used weighting technique for information retrieval and text mining. It is often used to evaluate the importance of a word to a document set or one of the documents in a corpus. Term frequency (TF) refers to the frequency of a word in a document. It is usually calculated by dividing the number of times the word appears in the document by the total number of words in the document. Inverse document frequency (IDF) is an indicator to measure the general importance of a word. It is used to reduce the weight of common words that appear frequently in many documents and highlight the importance of words that appear in specific documents but less frequently in the overall corpus. It is generally calculated by first counting the number of documents containing the word, then dividing the total number of documents by the number of documents containing the word (to avoid the denominator being zero, the denominator can be determined as the number of documents containing the word plus one), and then taking the logarithm (usually with the natural logarithm e as the base). The TF-IDF value is the product of TF and IDF.
[0066] TF-IDF text vectorization constructs a vector by calculating the TF-IDF value of each word in the text. Assuming that the corpus includes M documents and N different words appear, the result of TF-IDF text vectorization is M N-dimensional vectors. Each document corresponds to an N-dimensional vector, and each element in the N-dimensional vector is the TF-IDF value of N different words.
[0067] In this embodiment, the preliminary categories are used as a corpus and the first region sequences are used as documents, so that the first vector corresponding to each first region sequence can be calculated.
[0068] Vector clustering analysis is an unsupervised learning method that aims to divide multiple vectors into different clusters based on their similarity or distance metrics, so that the vectors in the same cluster are more similar to each other, while the vectors between different clusters are relatively different.
[0069] As an optional implementation, after clustering analysis is performed on the vehicles according to the first vector, each cluster is determined as an intermediate category.
[0070] As another optional implementation, after clustering the vehicles according to the first vector, each cluster with a number of vehicles greater than or equal to a preset threshold is determined as an intermediate category. This is because clusters with too few vehicles are not representative, and the performance indicators of the corresponding vehicles do not need to be classified, tracked, and compared.
[0071] For example, the clustering method adopts K-means clustering.
[0072] S4. In the same intermediate category, the second regions involved in each vehicle are subjected to adjacent deduplication to obtain a second region sequence, each second region sequence is subjected to TF-IDF text vectorization to obtain a corresponding second vector, and the vehicles are subjected to cluster analysis according to the second vectors to classify the vehicles into at least one final category.
[0073] Specifically, the division from the intermediate category to the final category refers to the division from the preliminary category to the intermediate category, and the main difference is that the processing for the first area becomes the processing for the second area.
[0074] As an optional implementation, after clustering analysis is performed on the vehicles according to the second vector, each cluster is determined as a final category.
[0075] As another optional implementation, after clustering the vehicles according to the second vector, each cluster with a number of vehicles greater than or equal to a preset threshold is determined as a final category. This is because clusters with too few vehicles are not representative, and the performance indicators of the corresponding vehicles do not need to be classified, tracked, and compared.
[0076] Therefore, in this embodiment, the first area and the second area are extracted from the vehicle positioning information, and the first area is globally deduplicated to obtain the first area set. For vehicles with more than 2 areas in the first area set, a step-by-step classification strategy is adopted. The preliminary categories are first divided according to the number of areas in the first area set, and then the first area is subjected to adjacent deduplication, TF-IDF text vectorization and cluster analysis to divide the intermediate categories. Finally, the second area is subjected to adjacent deduplication, TF-IDF text vectorization and cluster analysis to divide the final categories. Through this embodiment, the vehicle driving routes are classified with the help of pure text calculations, with high calculation efficiency and low consumption of calculation resources. It has been verified that the trajectories of vehicles with the same final category have high similarity and high classification reliability.
[0077] Furthermore, in one embodiment, before the step of performing cluster analysis on the vehicles according to the first vector, the following steps are further included:
[0078] If the number of vehicles in the current preliminary category is greater than or equal to 100, the number of clusters for cluster analysis is set to 5;
[0079] If the number of vehicles in the current preliminary category is less than 100, the number of clusters for cluster analysis is set to 3.
[0080] In this embodiment, in the implementation mode described above where the first area is a first-level administrative division and the second area is a second-level administrative division or a first-level administrative division, a recommended value for the number of clusters for cluster analysis is given based on the number of vehicles in the current preliminary category. This recommended value is determined based on a large amount of practical experience and helps to improve the effect of vehicle route classification.
[0081] Figure 2 A schematic diagram showing the use of the elbow method to determine the optimal number of clusters in an embodiment of the present application is shown.
[0082] Reference Figure 2 Further, in one embodiment, the step of performing cluster analysis on the vehicles according to the second vector includes:
[0083] Perform K-means clustering on the vehicles according to the second vector;
[0084] Before the step of performing cluster analysis on the vehicles according to the second vector, the method further includes:
[0085] Determine the optimal number of clusters for K-means clustering based on the elbow method.
[0086] In this embodiment, the clustering method of the second vector adopts K-means clustering, and the optimal number of clusters is determined according to the elbow method, which is helpful to improve the effect of vehicle driving route classification.
[0087] Furthermore, in one embodiment, the vehicle driving route classification method further includes:
[0088] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0089] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0090] After clustering the vehicles according to the first vector, for clusters with a number of vehicles greater than or equal to a preset threshold, modifying the label value of the second label of the vehicles in the cluster to the label value of the cluster label;
[0091] After clustering analysis is performed on the vehicles according to the second vector, for clusters where the number of vehicles is greater than or equal to a preset threshold, the label value of the third label of the vehicles in the cluster is modified to the label value of the cluster label.
[0092] For example, the global unique value is x, the preset threshold is 10, and the initial labels of vehicles A, B, and C are xxx. After obtaining the first area set, the number of areas in the first area set of vehicles A, B, and C are 3, 3, and 4, respectively, and the labels become 3-xx, 3-xx, and 4-xx, respectively. Based on the labels at this time, it can be determined that vehicles A, B, and other vehicles with labels 3-xx belong to one preliminary category, and vehicle C and other vehicles with labels 4-xx belong to another preliminary category.
[0093] After clustering the vehicles according to the first vector, vehicle A is in cluster0, the number of vehicles in cluster0 is 12, and the labels of vehicle A are changed to 3-0-x, vehicle B is in cluster2, the number of vehicles in cluster2 is 5, and the label of vehicle B remains unchanged, vehicle C is in cluster0, the number of vehicles in cluster0 is 30, and the labels of vehicle C are changed to 4-0-x. Based on the labels at this time, it can be determined that vehicle A and other vehicles with the label 3-0-x belong to an intermediate category, vehicle C and other vehicles with the label 4-0-x belong to another intermediate category, and vehicle B does not belong to any intermediate category.
[0094] After clustering the vehicles according to the second vector, vehicle A is in cluster3, the number of vehicles in cluster3 is 3, and the label of vehicle A remains unchanged. Vehicle C is in cluster2, the number of vehicles in cluster2 is 11, and the label of vehicle C is changed to 4-0-2. Based on the labels at this time, it can be determined that vehicles A and B do not belong to any final category, and vehicle C and other vehicles with the label 4-0-2 belong to one final category.
[0095] Through this embodiment, the categories of vehicles that have completed classification and vehicles that do not participate in classification tracking and comparison can be distinguished through labels at each stage of gradual classification.
[0096] Furthermore, in one embodiment, after the step of globally removing duplicates from the first area involved in each vehicle to obtain the first area set, the step further includes:
[0097] For vehicles whose number of regions in the first region set is equal to 1 or 2, the second region involved in each vehicle is globally deduplicated to obtain a second region set, and vehicles with the same second region set are classified into the same final category.
[0098] In this embodiment, for vehicles whose number of areas in the first area set is equal to 1 or 2, considering that the number and frequency of the second areas they pass through during the statistical period are relatively simple, the final category is determined directly by text comparison, which simplifies the classification operation while ensuring the effect of vehicle route classification and improves classification efficiency.
[0099] Optionally, vehicles with the same second area set and a number greater than or equal to a preset threshold are classified into the same final category. This is because clusters with too few vehicles are not representative and the performance indicators of the corresponding vehicles do not need to be classified, tracked, and compared.
[0100] Furthermore, in one embodiment, the vehicle driving route classification method further includes:
[0101] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0102] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0103] After obtaining the second area set, vehicles with equal label values of the first label are grouped according to whether the second area set is the same. For groups with the number of vehicles greater than or equal to the preset threshold, the groups are sorted according to the number of vehicles, and the label values of the third labels of the vehicles in the group are modified according to the sorting results of the groups.
[0104] For example, the global unique value is x, the preset threshold is 10, and the initial labels of vehicles D, E, and F are xxx. After obtaining the first area set, the number of areas in the first area set of vehicles D, E, and F are 1, 2, and 1, respectively, and the labels become 1-xx, 2-xx, and 1-xx, respectively. Based on the labels at this time, it can be determined that vehicles D, E, F and other vehicles with labels 1-xx or 2-xx can be directly divided into the final categories based on whether the second area set is the same.
[0105] After obtaining the second area set, among the vehicles whose first label value is 1, there are 5 different second area sets corresponding to 5 groups. The number of vehicles in the group where vehicle D is located is 30, the number of vehicles in the group where vehicle F is located is 5, the group where vehicle A is located participates in the sorting, and the group where vehicle F is located does not participate in the sorting. The label of vehicle F remains unchanged, the number of vehicles in the group where vehicle D is located is ranked third, and the labels are changed to 1-x-2. Among the vehicles whose first label value is 2, there are 10 different second area sets corresponding to 10 groups. The number of vehicles in the group where vehicle E is located is 15, the group where vehicle E is located participates in the sorting, the number of vehicles in the group where vehicle E is located is also ranked third, and the labels are changed to 2-x-2. Based on the labels at this time, it can be determined that vehicle F does not belong to any final category, vehicle D and other vehicles with labels 1-x-2 belong to one final category, and vehicle E and other vehicles with labels 2-x-2 belong to another final category.
[0106] Through this embodiment, during the classification process, it is possible to distinguish through labels which vehicles need to be gradually classified and which vehicles are directly classified into the final category. After the classification is completed, it is possible to distinguish through labels the categories of the classified vehicles and the vehicles that do not participate in the classification tracking and comparison.
[0107] In a second aspect, an embodiment of the present application also provides a vehicle driving route classification device.
[0108] Figure 3 A schematic diagram of the functional modules of a vehicle driving route classification device in one embodiment of the present application is shown.
[0109] Reference Figure 3 In one embodiment, the vehicle driving route classification device includes:
[0110] The area analysis module 10 is used to analyze the positioning information of each vehicle at each time point during the statistical period to obtain a first area and a second area, wherein the second area is the same as the first area, or the second area is a sub-area of the first area;
[0111] A first classification module 20 is used to globally remove duplicates from the first area involved in each vehicle to obtain a first area set, and for vehicles with a number of areas greater than 2 in the first area set, classify the vehicle into at least one preliminary category according to the number of areas in the first area set;
[0112] The second classification module 30 is used to perform adjacent deduplication on the first regions involved in each vehicle in the same preliminary category to obtain a first region sequence, perform TF-IDF text vectorization on each first region sequence to obtain a corresponding first vector, and perform cluster analysis on the vehicles according to the first vectors to classify the vehicles into at least one intermediate category;
[0113] The third classification module 40 is used to perform adjacent deduplication on the second areas involved in each vehicle in the same intermediate category to obtain a second area sequence, perform TF-IDF text vectorization on each second area sequence to obtain a corresponding second vector, and perform cluster analysis on the vehicles according to the second vectors to classify the vehicles into at least one final category.
[0114] Furthermore, in one embodiment, the region analysis module 10 is used to:
[0115] For each vehicle’s location information at each time point during the statistical period:
[0116] If the positioning information includes a first-level administrative division and a second-level administrative division, the first-level administrative division is recorded as the first area, and the second-level administrative division is recorded as the second area;
[0117] If the positioning information includes the first-level administrative division but does not include the second-level administrative division, the first-level administrative division is recorded as the first area and the second area.
[0118] Furthermore, in one embodiment, the second classification module 30 is used to:
[0119] If the number of vehicles in the current preliminary category is greater than or equal to 100, the number of clusters for cluster analysis is set to 5;
[0120] If the number of vehicles in the current preliminary category is less than 100, the number of clusters for cluster analysis is set to 3.
[0121] Furthermore, in one embodiment, the third classification module 40 is used to:
[0122] Perform K-means clustering on the vehicles according to the second vector;
[0123] Before the step of performing cluster analysis on the vehicles according to the second vector, the method further includes:
[0124] Determine the optimal number of clusters for K-means clustering based on the elbow method.
[0125] Furthermore, in one embodiment, the vehicle driving route classification device further includes a label setting module, which is used to:
[0126] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0127] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0128] After clustering the vehicles according to the first vector, for clusters with a number of vehicles greater than or equal to a preset threshold, modifying the label value of the second label of the vehicles in the cluster to the label value of the cluster label;
[0129] After clustering analysis is performed on the vehicles according to the second vector, for clusters where the number of vehicles is greater than or equal to a preset threshold, the label value of the third label of the vehicles in the cluster is modified to the label value of the cluster label.
[0130] Furthermore, in one embodiment, the vehicle driving route classification device further includes a fourth classification module, which is used to:
[0131] For vehicles whose number of regions in the first region set is equal to 1 or 2, the second region involved in each vehicle is globally deduplicated to obtain a second region set, and vehicles with the same second region set are classified into the same final category.
[0132] Furthermore, in one embodiment, the vehicle driving route classification device further includes a label setting module, which is used to:
[0133] Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value;
[0134] After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set;
[0135] After obtaining the second area set, vehicles with equal label values of the first label are grouped according to whether the second area set is the same. For groups with the number of vehicles greater than or equal to the preset threshold, the groups are sorted according to the number of vehicles, and the label values of the third labels of the vehicles in the group are modified according to the sorting results of the groups.
[0136] Among them, the functional implementation of each module in the above-mentioned vehicle driving route classification device corresponds to the various steps in the above-mentioned vehicle driving route classification method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0137] In a third aspect, an embodiment of the present application provides a vehicle driving route classification device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0138] Figure 4 A schematic diagram of the hardware structure of a vehicle route classification device involved in an embodiment of the present application is shown.
[0139] Reference Figure 4 In an embodiment of the present application, the vehicle route classification device may include a processor, a memory, a communication interface, and a communication bus.
[0140] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0141] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to interconnect the devices inside the vehicle route classification device, and an interface used to interconnect the vehicle route classification device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0142] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0143] The processor may be a general-purpose processor, which may call the vehicle route classification program stored in the memory and execute the vehicle route classification method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the vehicle route classification program is called may refer to the various embodiments of the vehicle route classification method of the present application, which will not be described in detail here.
[0144] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0145] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.
[0146] A vehicle driving route classification program is stored on a readable storage medium of the present application, wherein when the vehicle driving route classification program is executed by a processor, the steps of the vehicle driving route classification method as described above are implemented.
[0147] Among them, the method implemented when the vehicle driving route classification program is executed can refer to the various embodiments of the vehicle driving route classification method of the present application, and will not be repeated here.
[0148] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0149] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0150] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0151] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0152] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0154] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A vehicle driving route classification method, characterized in that: The vehicle driving route classification method comprises: Parse the first area and the second area from the positioning information of each vehicle at each time point during the statistical period, wherein the second area is the same as the first area, or the second area is a sub-area of the first area; Performing global deduplication on the first regions involved in each vehicle to obtain a first region set, and for vehicles having a region number greater than 2 in the first region set, classifying the vehicle into at least one preliminary category according to the region number in the first region set; In the same preliminary category, the first regions involved in each vehicle are subjected to adjacent deduplication to obtain a first region sequence, each first region sequence is subjected to TF-IDF text vectorization to obtain a corresponding first vector, and the vehicles are subjected to cluster analysis according to the first vectors to classify the vehicles into at least one intermediate category; In the same intermediate category, adjacent second regions involved in each vehicle are deduplicated to obtain a second region sequence, TF-IDF text vectorization is performed on each second region sequence to obtain a corresponding second vector, and cluster analysis is performed on the vehicles according to the second vectors to divide the vehicles into at least one final category.
2. The vehicle driving route classification method according to claim 1, characterized in that: The step of parsing the first area and the second area from the positioning information of each vehicle at each time point during the statistical period includes: For each vehicle’s location information at each time point during the statistical period: If the positioning information includes a first-level administrative division and a second-level administrative division, the first-level administrative division is recorded as the first area, and the second-level administrative division is recorded as the second area; If the positioning information includes the first-level administrative division but does not include the second-level administrative division, the first-level administrative division is recorded as the first area and the second area.
3. The vehicle driving route classification method according to claim 2, characterized in that: Before the step of performing cluster analysis on the vehicles according to the first vector, the method further includes: If the number of vehicles in the current preliminary category is greater than or equal to 100, the number of clusters for cluster analysis is set to 5; If the number of vehicles in the current preliminary category is less than 100, the number of clusters for cluster analysis is set to 3.
4. The vehicle driving route classification method according to claim 1, characterized in that: The step of performing cluster analysis on the vehicles according to the second vector comprises: Perform K-means clustering on the vehicles according to the second vector; Before the step of performing cluster analysis on the vehicles according to the second vector, the method further includes: Determine the optimal number of clusters for K-means clustering based on the elbow method.
5. The vehicle driving route classification method according to claim 1, characterized in that: The vehicle driving route classification method further includes: Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value; After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set; After clustering the vehicles according to the first vector, for clusters with a number of vehicles greater than or equal to a preset threshold, modifying the label value of the second label of the vehicles in the cluster to the label value of the cluster label; After clustering analysis is performed on the vehicles according to the second vector, for clusters where the number of vehicles is greater than or equal to a preset threshold, the label value of the third label of the vehicles in the cluster is modified to the label value of the cluster label.
6. The vehicle driving route classification method according to claim 1, characterized in that: After the step of globally removing duplicates from the first area involved in each vehicle to obtain a first area set, the method further includes: For vehicles whose number of regions in the first region set is equal to 1 or 2, the second region involved in each vehicle is globally deduplicated to obtain a second region set, and vehicles with the same second region set are classified into the same final category.
7. The vehicle driving route classification method according to claim 6, characterized in that: The vehicle driving route classification method further includes: Define a first label, a second label and a third label for each vehicle, and initialize the label value to a globally unique value; After obtaining the first area set, modifying the label value of the first label of the vehicle to the number of areas in the first area set; After obtaining the second area set, vehicles with equal label values of the first label are grouped according to whether the second area set is the same. For groups with the number of vehicles greater than or equal to the preset threshold, the groups are sorted according to the number of vehicles, and the label values of the third labels of the vehicles in the group are modified according to the sorting results of the groups.
8. A vehicle route classification device, characterized in that: The vehicle driving route classification device comprises: A region analysis module, used to analyze the positioning information of each vehicle at each time point during the statistical period to obtain a first region and a second region, wherein the second region is the same as the first region, or the second region is a sub-region of the first region; A first classification module is used to globally remove duplicates from the first area involved in each vehicle to obtain a first area set, and for vehicles with a number of areas greater than 2 in the first area set, classify the vehicle into at least one preliminary category according to the number of areas in the first area set; A second classification module is used to perform adjacent deduplication on the first regions involved in each vehicle in the same preliminary category to obtain a first region sequence, perform TF-IDF text vectorization on each first region sequence to obtain a corresponding first vector, and perform cluster analysis on the vehicles according to the first vectors to classify the vehicles into at least one intermediate category; The third classification module is used to perform adjacent deduplication on the second areas involved in each vehicle in the same intermediate category to obtain a second area sequence, perform TF-IDF text vectorization on each second area sequence to obtain a corresponding second vector, and perform cluster analysis on the vehicles according to the second vectors to classify the vehicles into at least one final category.
9. A vehicle route classification device, characterized in that: The vehicle driving route classification device includes a processor, a memory, and a vehicle driving route classification program stored in the memory and executable by the processor, wherein when the vehicle driving route classification program is executed by the processor, the steps of the vehicle driving route classification method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a vehicle driving route classification program, wherein when the vehicle driving route classification program is executed by a processor, the steps of the vehicle driving route classification method as described in any one of claims 1 to 7 are implemented.