A method for cleaning bus station and route data
Through the DBSCAN and K-Means clustering methods, the bus stations are clustered multiple times and the verification and regrouping are carried out, which solves the accuracy and efficiency of data cleaning of bus stations and lines in the existing technology, and achieves a more efficient and accurate data cleaning effect.
Patent Information
- Application Number
- CN202411526023.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-10-30
AI Technical Summary
In the prior art, in the cleaning of bus stops and line data, it is difficult to accurately distinguish the stations on both sides of the road, resulting in low data processing efficiency and poor accuracy.
The DBSCAN and K-Means clustering methods are used to perform primary and secondary clustering of bus stations, and the accuracy of site attributes is ensured through the verification and regrouping steps.
It improves the accuracy and efficiency of data cleaning at bus stops and lines, can better adapt to complex scenarios, reduce manual intervention, and improve the degree of automation of data processing.
Smart Images

Figure CN119088795B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to a data cleaning method, and in particular relates to a cleaning processing method for bus stops and routes. Background Art
[0002] With the continuous development of big data application technology, timely acquisition of bus routes and stations has become a high-frequency task. Generally, all bus routes and stations in a city are obtained through the Internet map API. Although the station is actually a physical station, due to the limitations of network acquisition, the obtained city bus stations have multiple stations with the same name and close distances at the same physical station. Generally, the stations on each line are slightly different from each other. According to the traditional manual method, it is time-consuming and laborious to calibrate and unify the stations to the same coordinates.
[0003] A Chinese patent document with a publication date of January 19, 2021 and publication number CN111210612A discloses a method for extracting bus route trajectories based on bus GPS data and station information, including the following steps: obtaining station data for all bus routes in a city and preprocessing the station data; normalizing the station data, analyzing the longitude and latitude of all stations, and if there are more than two longitudes and latitudes of the stations, clustering the longitude and latitude of the stations using an improved K-Means clustering algorithm to obtain new longitude and latitude of the stations. This technical solution mainly analyzes bus GPS data and station information, which is difficult for ordinary personnel to obtain. Now, for ordinary engineering and technical personnel, the easiest thing to obtain is the bus station and route vector data on the Internet map.
[0004] A Chinese patent document with a publication date of September 6, 2022 and a publication number of CN115019538A proposes a method, device, equipment and storage medium for generating traffic route information; the method includes obtaining information of a collection point in a traffic route; obtaining a route point library according to the information of the collection point, wherein the route point library includes at least one target point, and adjacent target points meet preset conditions, and the preset conditions include at least a first distance condition; updating the information of at least one station in the traffic route into the route point library to generate traffic route information; through the traffic route information, when performing real-time forecasting of bus stops, the location of the bus in the traffic route is more accurately determined, so that the forecast of bus arrival information is more accurate. Since the station data processing in this method is mainly based on a simple one-time clustering, the result of one-time clustering is likely to cause the stations on both sides of the road to be clustered into one category, ignoring the difference in the actual station locations on both sides of the road; it may also form a clustering of station sets with the same station name on both sides of the road into two categories, but forming a cluster that includes stations on both sides of the road in a route at the same time.
[0005] The Chinese patent document with the publication date of January 16, 2024 and the publication number of CN117407387A discloses a bus stop data cleaning method based on route matching and word clustering. Based on the collected bus route basic data and combined with the urban road network basic data, the bus route basic data is matched with the road network basic data to obtain the association between the route, the station and the road network. The bus stops that are repeatedly collected are identified according to the road network matching results combined with word clustering. The bus stop locations are merged and corrected according to the grouped bus stop names. After the data is updated, the cleaned bus stop data is obtained. The present invention realizes the precise cleaning of redundant data of bus stops, effectively improves the accuracy of bus operation monitoring, and can be applied to the data processing of large-scale urban bus systems. The method adopts the combination of road network and word clustering to optimize the grouping of bus stops, but mainly considers the names of bus stops, and then performs DBSCAN clustering (Density-Based Spatial Clustering of Applications with Noise). This method is not very suitable for the processing of bus stops on Internet maps that are easier to obtain, and it is still easy to cause the stations on both sides of the road to be classified into one category. Summary of the invention
[0006] In view of the above-mentioned prior art, the present invention provides a method for cleaning bus stop and line data. The method of the present invention accurately clusters bus stops, and the bus stops on both sides of the road are respectively classified into two different categories, and the coordinates of the bus line stops are updated. The method of the present invention can greatly improve the processing efficiency and has good accuracy. It can basically meet the needs of rapid cleaning of urban bus stops and lines, and provide a good foundation for subsequent traffic modeling, data statistics, visualization and other work.
[0007] In order to solve the above technical problems, the present invention proposes a method for cleaning bus station and route data, the steps of which are as follows:
[0008] Step 1) Obtain original bus routes and original bus stop data through the API retrieval service provided by an Internet map service provider, wherein the original bus stop data includes the stop name, the stop coordinates, and the name of the bus route to which the stop belongs; the original bus route data includes the route name and the route coordinates;
[0009] Step 2) The DBSCAN clustering method is used to cluster the bus stops once. The selection factor of the clustering radius threshold is slightly larger than the distance between the stations with the same station name on both sides and the distance between the stations with the same station name on one side of the road. The clustering radius threshold is 30-60 meters. The result obtained after the clustering includes multiple groups of bus stops with the same station name and a distance of 0-60 meters, which are recorded as the clustering result Cluster1.
[0010] Step 3) Use K-Means clustering method to perform secondary clustering of bus stops, including: searching for the bus line name of each group of bus stops in the clustering result Cluster1 of step 2), if there is no identical bus line name in the group of bus stops, then keep the original clustering result of the group of bus stops, and record this part of clustering result as clustering result Cluster2.1; if there is an identical bus line name in the group of bus stops, then use K-Means clustering method to perform secondary clustering of the group of bus stops, and set the number of clusters to 2, and divide the group of bus stops into two groups according to the distance between each bus stop in the group and the two cluster centers, and keep the original clustering result of the group of bus stops as clustering result Cluster2.2;
[0011] Step 4) Retrieve the bus line names of all bus stops in each group of the clustering result Cluster2.2 obtained in step 3). If there are two bus stops with the same bus line name, check and regroup these stops, compare the distances between the coordinate positions of the two bus stops and the cluster center of the clustering result Cluster2.2 group to which they belong, and divide the bus stop with a large coordinate position and the cluster center of the clustering result Cluster2.2 group to which they belong into another Cluster2.2 group. The two Cluster2.2 groups belong to one group in the clustering result Cluster1. The clustering result of this group of bus stops after checking is recorded as the clustering result Cluster3.1. If there are no identical bus line names, keep the original clustering result Cluster2.2 of this group of bus stops, and record this part of the clustering result as the clustering result Cluster3.2. Combine the clustering results Cluster2.1, Cluster3.1 and Cluster3.2 into the final clustering result.
[0012] Step 5) Calculate the cluster center coordinates of the final clustering result corresponding to each bus stop by calculating the average longitude and latitude of all station coordinates belonging to the same group of the final clustering result, and obtain the corrected unified coordinates corresponding to each bus stop after cleaning, which are used as the updated station coordinates in turn;
[0013] Step 6) Use the corrected unified coordinates corresponding to each bus stop to update the original route coordinates to obtain the cleaned bus route data, the method is: use the Euclidean distance formula to extract the coordinates of the waypoints of the original bus route data one by one according to the route name, calculate the distance between the coordinates of each waypoint in the original bus route and the coordinates of the original bus stop of the route, for each original bus route, select the waypoint closest to the original bus stop of the route, replace the coordinates of the waypoint with the coordinates of the corrected bus stop corresponding to the original bus stop, and obtain the updated bus route coordinates;
[0014] Step 7) Store and output the updated bus routes and bus stop data for subsequent urban bus planning and management.
[0015] The functional modules for implementing the method include: a data acquisition module, a data cleaning and updating module, and a data output module; the data acquisition module provides the data cleaning and updating module with original bus routes and original bus stop data, and the data cleaning and updating module performs cleaning processing such as clustering, checking and regrouping on the original bus stop data to obtain updated bus stop data, and uses the updated bus stop data to update bus route coordinates; finally, the data output module stores and outputs the updated bus stop and bus route data so as to be applied to the subsequent city bus planning and management.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] 1) Strong adaptability, suitable for complex scenarios. The present invention fully considers the complexity of bus station and line data when designing, such as the repeatability of station names, the actual distance between stations, line names and other factors. The stations are initially distinguished by clustering once, the classification is further refined by clustering twice, and the accuracy of the clustering results is ensured by the final verification step. The present invention can adapt to the changing actual situation and provide reliable data cleaning results.
[0018] 2) Easy to implement and popularize. Since the method of the present invention relies on mature Internet map APIs and algorithms, the use of the method of the present invention does not require users to have highly professional technical knowledge, so that a wider range of engineering and technical personnel can implement and apply the method. This ease of use helps to promote the application of data cleaning technology in urban public transportation systems and improve the data processing level of the entire industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of the bus stop and route data cleaning method of the present invention;
[0020] Figure 2 It is a system framework for realizing the bus station and line data cleaning method of the present invention;
[0021] Figure 3 is the original bus route attribute in the embodiment;
[0022] Figure 4 is the original bus stop attribute in the embodiment;
[0023] Figure 5 It is a schematic diagram of local original bus routes and original bus station data;
[0024] Figure 6 This is a schematic diagram of clustering results;
[0025] Figure 7 This is a partial data diagram of Cluster2.2 in the clustering result after secondary clustering-1;
[0026] Figure 8 This is a partial data diagram of Cluster2.2, the clustering result in the secondary clustering-2;
[0027] Fig. 9 It is a schematic diagram of some bus stops with the names of the bus routes they belong to;
[0028] Fig.10 This is a schematic diagram of the final clustering results of bus stops;
[0029] Fig.11 This is the updated bus stop diagram;
[0030] Fig.12 It is a schematic diagram of the bus route after updating the coordinates of the passing stations. DETAILED DESCRIPTION
[0031] The design idea of a bus stop and line data cleaning method proposed in the present invention is to obtain the original bus line and original bus stop data through the API retrieval service provided by the Internet map service provider; use the DBSCAN clustering method to perform the first clustering of bus stops; use the K-Means clustering method to perform the second clustering of bus stops; search the bus line names of all bus stops in each group in the obtained clustering results to obtain the verified clustering results; calculate the cluster center coordinates of the final clustering results corresponding to each bus stop to obtain the corrected unified coordinates corresponding to each bus stop after cleaning; use the corrected unified coordinates corresponding to each bus stop to update the original bus line data to obtain the cleaned bus line data. The present invention can accurately cluster bus stops, and the bus stops on both sides of the road are respectively classified into two different categories, and the bus line station coordinates are updated, which can be applied to urban bus planning and management. Figure 1 As shown, the specific steps are as follows:
[0032] Step 1) Obtain original bus routes and original bus stop data through the API retrieval service provided by the Internet map service provider. The original bus stop data includes the stop name, stop coordinates, and the name of the bus route to which the stop belongs; the bus route data includes the route name and route coordinates.
[0033] Step 2) Use the DBSCAN method to cluster the bus stops once, where the selection of the clustering radius threshold takes into account the larger distance range of the distance between the stations with the same station name on both sides and the distance between the stations with the same station name on one side of the road. Usually, the clustering radius threshold is 30-60 meters. The result after the first clustering includes multiple groups of bus stops with the same station name and a distance of 0-60 meters. The result after the first clustering is recorded as the clustering result Cluster1.
[0034] Step 3) Use K-Means clustering method to perform secondary clustering of bus stops, including:
[0035] For the bus line names of each group of bus stops in the clustering result Cluster1 obtained after the first clustering in step 2), there are two situations:
[0036] If there is no identical bus line name in the group of bus stops, the original clustering result of the group of bus stops is retained, and this part of the clustering result is recorded as clustering result Cluster2.1.
[0037] If there are identical bus line names in this group of bus stops, the K-Means clustering method is used to perform secondary clustering on this group of bus stops. The number of clusters is set to 2. This group of bus stops is divided into two groups based on the distances from each bus stop in the group to the two cluster centers. This part of the secondary clustering result includes dividing the group of bus stops into two groups according to the distances. This secondary clustering result is recorded as clustering result Cluster2.2.
[0038] Step 4) Retrieve the bus line names of all bus stops in each group of the clustering result Cluster2.2 obtained in step 3). If there are two bus stops with the same bus line name, check and regroup based on the distance between the coordinate position of the bus stop with duplicate values and the center of the group cluster in the clustering result Cluster2.2 to which it belongs. Compare the distance between the coordinate position of the two bus stops and the cluster center of the group in the clustering result Cluster2.2 (i.e. the same group), and divide the bus stop whose coordinate position is far from the center of the cluster of the group in the clustering result Cluster2.2 to which it belongs into another Cluster2.2 group. The two Cluster2.2 groups belong to one group in the clustering result Cluster1. The clustering result of this group of bus stops after checking is recorded as the clustering result Cluster3.1. If there is no identical bus line name, keep the original clustering result Cluster2.2 of this group of bus stops, and this part of the clustering result is recorded as the clustering result Cluster3.2.
[0039] The clustering results Cluster2.1, Cluster3.1 and Cluster3.2 are merged into the final clustering result.
[0040] Step 5) Calculate the cluster center coordinates of the final clustering result corresponding to each bus stop by calculating the average longitude and latitude of all station coordinates belonging to the same group of the final clustering result, and obtain the corrected unified coordinates corresponding to each bus stop after cleaning, which are used as the updated station coordinates in turn;
[0041] Step 6) Use the corrected unified coordinates corresponding to each bus stop to update the original route coordinates to obtain the cleaned bus route data, the method is:
[0042] Extract the coordinates of the waypoints in the original bus route data one by one according to the route name, calculate the distance between the coordinates of each waypoint in the original bus route and the coordinates of the original bus stop of the route, and for each original bus route, select the waypoint closest to the original bus stop of the route, and replace the coordinates of the waypoint with the coordinates of the corrected bus stop corresponding to the original bus stop, so as to obtain the updated bus route coordinates;
[0043] Step 7) The updated bus routes and bus stop data are stored and output for subsequent use in the city’s bus planning and management.
[0044] Figure 2The system architecture for implementing the method of the present invention is shown, which mainly includes a data acquisition module, a data cleaning and updating module, and a data output module; the data acquisition module provides the original bus route and original bus stop data to the data cleaning and updating module, and the data cleaning and updating module performs cleaning processing such as clustering and correction on the original bus stop data to obtain updated bus stop data, and uses the updated bus stop data to update the bus route coordinates; finally, the data output module stores and outputs the updated bus stop and bus route data so as to be applied to the subsequent urban public transportation planning and management. Through this system architecture, rapid cleaning processing of urban bus stops and routes is achieved, the efficiency and accuracy of data processing are improved, and strong support is provided for urban public transportation planning and management. The specific contents of each functional module of the system architecture include:
[0045] 1) Data acquisition module: responsible for obtaining original bus routes and original bus stop data through the API retrieval service provided by the Internet map service provider. The original bus stop data includes the stop name, stop coordinates, and the name of the bus route to which the stop belongs; the bus route data includes the route name and route coordinates.
[0046] 2) Data cleaning and updating module: responsible for cleaning and updating the acquired bus station and route data, including:
[0047] a. Primary clustering: Use the DBSCAN method to cluster all bus stops and obtain the primary clustering result Cluster1.
[0048] b. Secondary clustering: Search the station line names of the preliminary clustering results. If there are duplicate values, perform secondary clustering and use the K-Means clustering method to divide them into 2 groups. The obtained clustering result is recorded as Cluster2.2; if there are no duplicate values, this part of the clustering results is recorded as the clustering result Cluster2.1.
[0049] c. Clustering result verification and regrouping: Search the bus line names of all bus stops in each group of clustering result Cluster2.2. If there are two bus stops with the same bus line name, verify and regroup these stops, compare the distance between the coordinate positions of the two bus stops and the cluster center of the group of clustering result Cluster2.2 (i.e. the same group), and divide the bus stops with a large distance between the coordinate position and the cluster center of the group of clustering result Cluster2.2 into another group of Cluster2.2. The two groups of Cluster2.2 belong to one group of clustering result Cluster1; the clustering result of this group of bus stops after verification is recorded as clustering result Cluster3.1; if there is no identical bus line name, keep the original clustering result Cluster2.2 of this group of bus stops, and record this part of the clustering result as clustering result Cluster3.2. The clustering results Cluster2.1, Cluster3.1 and Cluster3.2 are merged into the final clustering result.
[0050] d. Calculate the corrected unified coordinates: Calculate the cluster center coordinates of the group in the final clustering result corresponding to each station, and use it as the unified coordinates of each station after cleaning to obtain the updated bus station.
[0051] e. Use the unified coordinates of the stations to update the coordinates of the bus routes and obtain updated bus routes.
[0052] 4) Data output module: Store and output the updated bus stops and bus route data for application in subsequent bus planning and management of the city.
[0053] In summary, the present invention uses DBSCAN and K-Means (k-means) clustering methods to clean bus station and line data, effectively improving the accuracy and efficiency of data cleaning. It reduces the time and effort for manual processing of large amounts of data and improves the efficiency of data cleaning; traditional methods often only use one clustering and fail to fully consider the complex relationship between stations and lines, while the method of the present invention uses secondary clustering and clustering result correction to more accurately divide the station ownership, making data cleaning more accurate and avoiding misoperation during data cleaning. It provides a more reliable data foundation for subsequent bus planning and management; using advanced clustering algorithms, fully considering the complex relationship between stations and lines, and improving the adaptability and accuracy of data cleaning.
[0054] This invention makes full use of the API provided by Internet map service providers, combined with advanced clustering algorithms, to reduce manual intervention in the data cleaning process and improve the automation of data processing. The use of mature APIs and advanced clustering algorithms lowers the threshold for data cleaning and improves the automation level of data processing; reduces the reliance on professional skills, allowing more people to easily perform data cleaning and processing; improves the accuracy and reliability of data processing, and provides strong technical support for urban public transportation planning and management.
[0055] The method of the present invention fully considers various factors in actual application scenarios, such as repeated station names, station distances, line names, etc., and ensures the accuracy and reliability of data cleaning results through steps such as primary clustering, secondary clustering, and clustering result verification and regrouping. The adaptability of data cleaning is improved, so that the method can cope with various complex scenarios; through detailed clustering processes and verification steps, the accuracy and reliability of data cleaning results are ensured; and a more complete and reliable data cleaning solution is provided for urban public transportation planning and management.
[0056] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention in any way.
[0057] Embodiment: bus station and route data cleaning method, such as Figure 1 As shown, the following steps are included:
[0058] S1. Obtain the original bus station and original bus route data of a city. The original file is in shp format. The coordinates of the original stations obtained are inconsistent and clustered together in a scattered distribution; at the same time, the coordinate positions of the corresponding stations of the original bus routes passing through the station are also inconsistent.
[0059] Figure 3 The original bus line attribute data in this embodiment is shown, line_name is the bus line name, and line_dir is the bus line direction. Figure 4 The original bus stop attribute data in this embodiment is shown, where the field line_name is the name of the line to which the station belongs, line_dir is the direction of the line to which the station belongs, coord_x and coord_y are the coordinate longitude and latitude corresponding to the station respectively, station_na is the station name, and sequence is the station sequence number. Figure 5 It is shown that the same station in the original bus stops presents different positions, and the coordinates of the original bus routes passing through the station also present different position distributions.
[0060] S2. Use the DBSCAN clustering method to cluster the original bus stops and obtain a clustering result. Figure 6A partial schematic diagram of a clustering result in this embodiment is shown, and the marking numbers of the stations along the way are the grouping numbers of the clustering result Cluster1.
[0061] S3. Use K-Means clustering method to perform secondary clustering of bus stops and obtain secondary clustering results. Figure 7 A partial schematic diagram of the secondary clustering result in this embodiment is shown, which represents Cluster 2.2 that obtains a usable result, in which the same stations belonging to original bus routes with different routes are clustered into the same category. Figure 8 and Fig. 9 FIG. 4 shows a partial schematic diagram of the secondary clustering result in this embodiment, Fig. 9 The stations in the middle are marked with the group numbers of Cluster 2.2 to which they belong. Fig.10 The names of the bus routes to which the middle stations belong are marked respectively. It can be seen that the routes are all named 852, but the stations of 852 with different directions belong to the same group 3406-0 of Cluster 2.2. The 852 station at the top should belong to 3406-1.
[0062] S4. Search the clustering results of Cluster2.2. For stations with the same bus line name, divide the cluster group of the farther station into another Cluster2.2 group based on the distance between the two stations and the cluster center of the Cluter2.2 group to which they belong. This group belongs to the same Cluster1 group as the original group, and finally obtains the final clustering result. Fig.10 The schematic diagram of the final clustering result of bus stops in this embodiment is shown. The numbers marked on the stops are the grouping numbers of the final clustering result. It can be seen that the stops clustered with bus lines of different directions are respectively classified into the same group.
[0063] S5. Take the coordinates of all sites in each group of the final clustering result and calculate the average value to obtain the unified coordinates of the site. Fig.11 A schematic diagram of the updated bus stops in this embodiment is shown, wherein dots represent original bus stops and circles represent updated bus stops.
[0064] S6. Update the coordinates of the bus route stops. Fig.12 A schematic diagram of a bus route after updating the coordinates of the passing stations in this embodiment is shown, wherein the dotted line represents the route with updated coordinates of the passing stations, and the solid line represents the route with the original coordinates of the passing stations maintained.
[0065] S7. Store and output the updated bus routes and bus stop data for subsequent city bus planning and management.
[0066] Although the present invention has been described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many improvements and changes without departing from the purpose of the present invention, which are all within the protection of the present invention.
Claims
1. A method for cleaning bus stop and route data, characterized in that: The following steps are involved: Step 1) obtaining original bus routes and original bus stop data through an API search service provided by an Internet map service provider, wherein the original bus stop data includes a stop name, a stop coordinate, and a bus route name to which the stop belongs; the original bus route data includes a route name and a route coordinate; Step 2) The DBSCAN clustering method is used to cluster the bus stops once, wherein the selection factor of the clustering radius threshold is the larger distance range between the distances between the stations with the same station name on both sides and the distances between the stations with the same station name on one side of the road, and the clustering radius threshold is 30-60 meters. The result obtained after the clustering once includes multiple groups of bus stops with the same station name and a distance of 0 to 60 meters, which are recorded as the clustering result Cluster1; Step 3) Use K-Means clustering method to perform secondary clustering of bus stops, including: Retrieve the bus line name of each group of bus stops in the clustering result Cluster1 in step 2). If there is no identical bus line name in the group of bus stops, the original clustering result of the group of bus stops is kept, and the original clustering result of the group of bus stops is recorded as clustering result Cluster2.1; If there are identical bus line names in this group of bus stops, the K-Means clustering method is used to perform secondary clustering on this group of bus stops. The number of clusters is set to 2. This group of bus stops is divided into two groups based on the distances between each bus stop in the group and the centers of the two clusters. The result of this secondary clustering is recorded as clustering result Cluster2.
2. Step 4) Search the bus route names of all bus stops in each group in the clustering result Cluster2.2 obtained in step 3). If there are two bus stops with the same bus line name, these stops are checked and regrouped. The distances between the coordinate positions of the two bus stops and the cluster center of the cluster result Cluster2.2 group to which they belong are compared. The bus stop with the largest distance between the coordinate position and the cluster center of the cluster result Cluster2.2 group to which they belong is divided into another Cluster2.2 group. The two Cluster2.2 groups belong to the same group in the cluster result Cluster1. The cluster result of this group of bus stops after checking is recorded as the cluster result Cluster3.
1. If there is no identical bus line name, the original clustering result Cluster2.2 of the group of bus stops is retained and recorded as clustering result Cluster3.2; Merge the clustering results Cluster2.1, Cluster3.1 and Cluster3.2 into the final clustering result; Step 5) Calculate the cluster center coordinates of the final clustering result corresponding to each bus stop by calculating the average longitude and latitude of all station coordinates belonging to the same group of the final clustering result, and obtain the corrected unified coordinates corresponding to each bus stop after cleaning, which are used as the updated station coordinates in turn; Step 6) Use the corrected unified coordinates corresponding to each bus stop to update the original route coordinates to obtain the cleaned bus route data, the method is: Extract the coordinates of the waypoints in the original bus route data one by one according to the route name, and use the Euclidean distance formula to calculate the distance between the coordinates of each waypoint in the original bus route and the coordinates of the original bus stop of the route. For each original bus route, select the waypoint closest to the original bus stop of the route, and replace the coordinates of the waypoint with the coordinates of the corrected bus stop corresponding to the original bus stop to obtain the updated bus route coordinates; Step 7) The updated bus routes and bus stop data are stored and output for use in subsequent urban bus planning and management.
2. The bus stop and route data cleaning method according to claim 1 is characterized in that: The functional modules included in the implementation of the method include a data acquisition module, a data cleaning and updating module, and a data output module; the data acquisition module provides the original bus route and original bus stop data to the data cleaning and updating module, and the data cleaning and updating module performs clustering, verification, regrouping and cleaning processing on the original bus stop data to obtain updated bus stop data, and uses the updated bus stop data to update the bus route coordinates; finally, the data output module stores and outputs the updated bus stop and bus route data so as to be applied to the subsequent city bus planning and management.
Citation Information
Patent Citations
Method for extracting bus route track based on bus GPS data and station information
CN111210612A
Traffic route information generation method and device, equipment and storage medium
CN115019538A
Bus line station registration method and system, storage medium and intelligent terminal
CN117349393A
Bus stop data cleaning method based on route matching and word clustering
CN117407387A