A bus data processing method and device and a server device
Patent Information
- Application Number
- CN202110937859.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-16
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2041-08-16
AI Technical Summary
[0004]本发明实施例提供一种公交数据处理方法、装置及服务端设备,以解决现有公交站点采集方式采集工作量大且周期较长,数据的现势性较差的问题
[0070]在本发明实施例中,获取公交行车坐标数据,其中,所述公交行车坐标数据是在公交行车中对公交行驶路线进行坐标采集得到的;将所述公交行车坐标数据与预先建立的道路路段模型进行匹配,确定所述公交行车坐标数据中多个坐标点对应的路段信息;根据所述多个坐标点对应的路段信息和所述多个坐标点在路段上的分布特征,从所述公交行车坐标数据中筛选出公交站点坐标数据;基于所述公交站点坐标数据,确定公交站点坐标。这样,通过对公交行车坐标数据与道路路段模型匹配,来最终确定公交站点坐标数据,进而确定公交站点坐标,可极大简化人工采集公交站点坐标流程,缩短数据采集周期,进而提高数据的现势性。
Smart Images

Figure CN115907242B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer processing technology, and in particular to a method, apparatus, and server equipment for processing public transportation data. Background Technology
[0002] With the advancement of urbanization, urban public transportation construction is also developing rapidly. Every year, the number of newly planned bus routes in various regions is gradually increasing. Location-based bus query services face the problem of lagging bus data updates, leading to a decrease in query accuracy. Currently, the main method for collecting bus data is to collect bus stop data, including the names and coordinates of bus stops. The bus stop data collection method typically uses mobile terminal devices. Data collectors ride the bus in person, and upon arrival at each stop, they manually initiate the stop data collection process. First, the GPS coordinates of the stop are collected using the terminal device, and then the stop information is manually entered into the terminal device to complete the current stop data collection. Upon arriving at the next stop, the same process is repeated to complete the data collection for the next stop, until all stops on the bus route have been collected.
[0003] It is evident that the existing methods for collecting data at bus stops involve a large workload and a long cycle, resulting in poor data timeliness. Summary of the Invention
[0004] This invention provides a method, apparatus, and server-side equipment for processing public transportation data, in order to solve the problems of large workload, long cycle, and poor timeliness of data collection in existing public transportation station data collection methods.
[0005] In a first aspect, embodiments of the present invention provide a public transportation data processing method, including:
[0006] Obtain bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation;
[0007] The bus driving coordinate data is matched with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data;
[0008] Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment, bus stop coordinate data is filtered out from the bus driving coordinate data;
[0009] Based on the bus stop coordinate data, the bus stop coordinates are determined.
[0010] Optionally, the method further includes:
[0011] Obtain road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the public transport driving area;
[0012] Based on the road nodes, each road in the target area is divided into road segments, and the connection relationship between each road node and road segment is recorded. Each pair of adjacent road nodes is a road segment.
[0013] Determine the buffer zone for each road segment after division;
[0014] The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0015] Optionally, the process of establishing the road segment model based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment, includes:
[0016] Number each road segment;
[0017] Based on the driving direction and reference direction of each road segment, determine the direction angle of each road segment;
[0018] Record the coordinate sequence of each road segment, and record the coordinate sequence of the buffer zone of each road segment;
[0019] Establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer zone coordinate sequences;
[0020] Establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0021] Optionally, matching the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data includes:
[0022] The bus driving coordinate data is matched with a pre-established road segment model to remove coordinate points in the bus driving coordinate data that are not located within the road segment buffer, and the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located within the road segment buffer is determined.
[0023] The method further includes:
[0024] Based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route is determined;
[0025] By concatenating the coordinates of the bus routes, the bus routes can be obtained.
[0026] Optionally, the step of filtering bus stop coordinate data from the bus driving coordinate data based on the road segment information corresponding to the plurality of coordinate points and the distribution characteristics of the plurality of coordinate points on the road segments includes at least one of the following:
[0027] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0028] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0029] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0030] Optionally, after filtering out the bus stop coordinate data from the bus driving coordinate data, the method further includes:
[0031] Determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0032] Determining the bus stop coordinates based on the bus stop coordinate data includes:
[0033] For a first coordinate dataset whose interval distance is less than a preset distance threshold in the bus stop coordinate data, calculate the average distance along the line of the first coordinate dataset;
[0034] The coordinates of the bus stop are determined from the first coordinate dataset whose distance along the line is closest to the average distance along the line.
[0035] Optionally, after determining the bus stop coordinates based on the bus stop coordinate data, the method further includes:
[0036] Based on the collection time of the bus stop coordinate data and by referring to the pre-entered list of bus stops, determine the name of the bus stop corresponding to each bus stop coordinate.
[0037] Secondly, embodiments of the present invention also provide a public transportation data processing device, comprising:
[0038] The first acquisition module is used to acquire bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation.
[0039] The first determining module is used to match the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data;
[0040] The first processing module is used to filter out bus stop coordinate data from the bus driving coordinate data based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment.
[0041] The second determining module is used to determine the coordinates of the bus stops based on the bus stop coordinate data.
[0042] Optionally, the bus data processing device further includes:
[0043] The second acquisition module is used to acquire road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the bus driving area;
[0044] The second processing module is used to divide each road in the target area into road segments based on the road nodes, and record the connection relationship between each road node and road segment, wherein each pair of adjacent road nodes is a road segment.
[0045] The third determining module is used to determine the buffer zone for each road segment after division;
[0046] The third processing module is used to establish the road segment model based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0047] Optionally, the third processing module includes:
[0048] Numbering units are used to number each road segment;
[0049] The first determining unit is used to determine the direction angle of each road segment based on the driving direction and reference direction of each road segment;
[0050] The recording unit is used to record the coordinate sequence of each road segment and the coordinate sequence of the buffer zone of each road segment;
[0051] The first establishment unit is used to establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer coordinate sequences;
[0052] The second establishment unit is used to establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0053] Optionally, the first determining module is used to match the bus driving coordinate data with a pre-established road segment model, remove coordinate points in the bus driving coordinate data that are not located in the road segment buffer, and determine the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located in the road segment buffer.
[0054] The bus data processing device also includes:
[0055] The fourth determining module is used to determine the bus route based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point.
[0056] The fourth processing module is used to connect the coordinates of the bus route segments to obtain the bus route.
[0057] Optionally, the first processing module is configured to implement at least one of the following:
[0058] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0059] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0060] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0061] Optionally, the bus data processing device further includes:
[0062] The fifth processing module is used to determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0063] The second determining module includes:
[0064] The calculation unit is used to calculate the average distance along the line of the first coordinate dataset for the bus stop coordinate data in which the interval distance is less than a preset distance threshold;
[0065] The second determining unit is used to determine the coordinate data in the first coordinate dataset that is closest to the average distance along the line as the coordinates of the bus stop.
[0066] Optionally, the bus data processing device further includes:
[0067] The fifth determination module is used to determine the bus stop name corresponding to each bus stop coordinate according to the collection time of the bus stop coordinate data and by referring to the pre-entered bus stop list.
[0068] Thirdly, embodiments of the present invention also provide a server device, including: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the public transport data processing method described above.
[0069] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the public transport data processing method described above.
[0070] In this embodiment of the invention, bus driving coordinate data is acquired, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus route during bus operation; the bus driving coordinate data is matched with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data; based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment, bus stop coordinate data is filtered from the bus driving coordinate data; based on the bus stop coordinate data, the bus stop coordinates are determined. Thus, by matching bus driving coordinate data with a road segment model to ultimately determine bus stop coordinate data, and subsequently bus stop coordinates, the process of manually collecting bus stop coordinates can be greatly simplified, the data collection cycle shortened, and the timeliness of the data improved. Attached Figure Description
[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 This is a flowchart of the public transport data processing method provided in an embodiment of the present invention;
[0073] Figure 2 This is a flowchart of the bus data collection process of the terminal provided in this embodiment of the invention;
[0074] Figure 3 This is a schematic diagram of a real-world urban road scene provided in an embodiment of the present invention;
[0075] Figure 4This is a schematic diagram of the preliminary road segment model provided in this embodiment of the invention;
[0076] Figure 5 This is a schematic diagram of the final road segment model provided in the embodiments of the present invention;
[0077] Figure 6 This is a schematic diagram illustrating the calculation of the distance along the line between coordinate points within the buffer zone, provided in an embodiment of the present invention.
[0078] Figure 7 This is a schematic diagram of an invalid data area on a road segment provided in an embodiment of the present invention;
[0079] Figure 8 This is a flowchart of the bus route data processing process on the server side provided in an embodiment of the present invention;
[0080] Figure 9 This is a system architecture diagram of the public transportation data processing method provided in the embodiments of the present invention;
[0081] Figure 10 This is a structural diagram of the public transport data processing device provided in an embodiment of the present invention;
[0082] Figure 11 This is a structural diagram of the server device provided in an embodiment of the present invention. Detailed Implementation
[0083] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0084] See Figure 1 , Figure 1 This is a flowchart of a public transportation data processing method provided in an embodiment of the present invention, applied to server-side equipment, such as... Figure 1 As shown, the method includes the following steps:
[0085] Step 101: Obtain bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation.
[0086] The aforementioned bus driving coordinate data can refer to a set of coordinate data of a series of locations passed by the bus during its journey. The bus driving coordinate data can be a set of coordinate data obtained by real-time collection of the bus's location through a terminal on the bus during its journey or by timed collection at predetermined intervals.
[0087] The bus driving coordinate data mentioned above can be obtained from the bus driving coordinate data sent by the receiving terminal.
[0088] For example, the terminal can press Figure 2 The process shown is for collecting bus driving coordinate data:
[0089] Step 21: Enter bus route and stop information. Specifically, you can enter the bus route name, first and last bus times, fare, and a list of all stop names in the order of departure, according to the bus route information on the bus stop sign.
[0090] Step 22: Set a time threshold to periodically collect GPS coordinates. Specifically, the bus's driving coordinates can be periodically collected via the terminal's GPS according to the time threshold preset by the data collector.
[0091] Step 23: Save the data. Specifically, the input bus routes and station information, as well as the bus driving coordinates, can be saved to a relational database.
[0092] Step 24: Determine whether data collection has ended.
[0093] Step 25: Compress and upload the data file. Specifically, the stored data file can be compressed and then uploaded to the server via a communication network.
[0094] In step 21 above, the data collector can input bus route information by referring to the bus stop signs. This includes the bus route name, first and last bus times, fare, and the route stop names in the order from the origin to the destination. This information is then stored in the terminal's relational database. Each bus route only needs to be entered once during the initial data collection process; no further input is required during or after the data collection. For example, the bus route information entry table can be shown in Table 1 below, and the bus stop information entry table can be shown in Table 2 below. In Tables 1 and 2, the terminal ID and route ID are unique numbers automatically generated by the system.
[0095] In step 22 above, the terminal can automatically collect the GPS coordinates and timestamps of the bus's driving trajectory according to a set time threshold. For example, the collected GPS coordinate record table can be shown in Table 3 below.
[0096] Table 1 Bus Route Information Entry Form
[0097]
[0098] Table 2 Bus Stop Information Entry Form
[0099]
[0100] Table 3 GPS Coordinate Recording Table
[0101]
[0102] After receiving the data file sent by the terminal, the server device can decompress the file and check the decompressed data. Data that meets the check requirements can be processed in subsequent steps. Data with empty information or coordinates outside the target area will not be processed. The target area can refer to the area where bus stop data needs to be collected.
[0103] Step 102: Match the bus driving coordinate data with the pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data.
[0104] The aforementioned road segment model can be a pre-built road segment model based on road data provided by map providers. It is used to calculate bus routes and to estimate the road segments where bus stops are located, thereby estimating the location of bus stops. The road data provided by map providers may include a node table of road segments, road intersections, and road endpoints, containing information such as road name, road segment coordinates, road driving direction, and nodes (e.g., intersections, endpoints).
[0105] The above-mentioned matching of the bus driving coordinate data with the pre-established road segment model can be achieved by matching the coordinate points in the bus driving coordinate data with the road segment coordinates in the road segment model. After finding the matching coordinate points in the road segment model, the road segment where each coordinate point is located is queried to obtain information such as the name of the road segment, driving direction, connected road segments, and road intersections where each coordinate point is located.
[0106] Optionally, prior to step 102, the method further includes:
[0107] Obtain road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the public transport driving area;
[0108] Based on the road nodes, each road in the target area is divided into road segments, and the connection relationship between each road node and road segment is recorded. Each pair of adjacent road nodes is a road segment.
[0109] Determine the buffer zone for each road segment after division;
[0110] The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0111] In one implementation, roads can be subdivided based on road data provided by map providers to establish road segment models, which are then used to match the collected bus driving coordinate data to road segments.
[0112] Specifically, road data within the target area can be obtained first. This means obtaining road data within the target area from the road data provided by the map provider. The target area can be an area associated with the currently collected bus travel area. For example, if the current requirement is to collect bus route information for a target city, then the target area can be the area of that target city. The road data can include road names, road segment coordinates, road travel direction, and road nodes. The road nodes include intersections and road endpoints, such as road start points and road end points.
[0113] Then, based on the road node information in the acquired road data, each road within the target area can be divided into segments. Specifically, roads can be broken up using road nodes, so that each road can be divided into multiple segments according to the road nodes, that is, each pair of adjacent road nodes constitutes one segment. It should be noted that for two-way roads, the roads can also be divided according to the different directions of traffic. After dividing the roads, the connection relationship between each road node and the road segment can be recorded to facilitate the establishment of a complete road segment model.
[0114] In addition, a buffer zone can be established for each road segment after division. Specifically, each road segment can be widened to the left and right with the current coordinates as the center. This can avoid road segment matching failure due to the offset of driving coordinate data. In other words, a certain error range can be allowed when matching road segments.
[0115] Finally, a road segment model can be established based on the coordinates, driving direction, and buffer zone of each divided road segment, as well as the recorded connection relationship between each road node and the road segment. That is, the road segment model stores information such as the coordinates, driving direction, buffer zone, and connection relationship between each road segment and each road node. The road segment model can be a virtual road model diagram established based on this information, or a road segment relationship information table established using this information.
[0116] In this way, for any given driving coordinate point, it can be determined whether it falls within the buffer zone of a certain road segment based on the road segment model. If it does, the road segment where the coordinate point is located, the driving direction, and the intersection information with other road segments can be quickly retrieved.
[0117] Optionally, the process of establishing the road segment model based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment, includes:
[0118] Number each road segment;
[0119] Based on the driving direction and reference direction of each road segment, determine the direction angle of each road segment;
[0120] Record the coordinate sequence of each road segment, and record the coordinate sequence of the buffer zone of each road segment;
[0121] Establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer zone coordinate sequences;
[0122] Establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0123] After dividing the road into segments and establishing buffer zones for each segment, each segment can be numbered to give it a unique identifier. The directional angle of each segment can be determined based on its driving direction and reference direction. The reference direction can be a specific direction, and the directional angle can be the clockwise or counterclockwise angle between the driving direction and the reference direction. For example, using due north as the reference, if the driving direction of a segment is due south, the directional angle of that segment can be determined to be 180 degrees. If the driving direction of a segment is due east, the directional angle of that segment can be determined to be 90 degrees by the clockwise angle.
[0124] Based on the road segment coordinates in the road data, the coordinate sequence of each segment after division can be determined, that is, the coordinates of each point on the segment can be determined and recorded in a certain direction. Based on the established segment buffer, the coordinate sequence of the buffer of each segment can be determined, that is, the coordinates of each point in each segment buffer can be determined and recorded.
[0125] After obtaining the number, direction angle, road segment coordinate sequence, and buffer zone coordinate sequence of each road segment, a road segment information table can be established based on this information. The road segment information table stores the matching road segment numbers, direction angles, road segment coordinate sequences, and buffer zone coordinate sequences. In this way, the corresponding road segment number can be queried from the road segment information table using coordinate points, and the direction angle information of the corresponding road segment can be obtained.
[0126] In this embodiment, road nodes can also be numbered, and a node-road segment relationship table can be established based on the connection relationship between road nodes and road segments and the road segment number. The node-road segment relationship table stores the matching road node numbers and connected road segment numbers. In this way, after determining the road segment number, the node and connected road segment information on the road segment can be queried from the node-road segment relationship table.
[0127] In this way, by establishing the above-mentioned road segment information table and node-road segment relationship table, it is possible to quickly retrieve which road segment a given coordinate is located on and other related information by determining whether the coordinate is within the road segment buffer zone. It is also possible to quickly retrieve connected road segments based on a road segment number.
[0128] The following is combined with Figures 3 to 5 The following is an example illustrating the implementation method for establishing a road segment model in this embodiment of the invention:
[0129] like Figure 3 As shown, a certain urban area includes Road A (two-way), Road B (two-way), Road C (one-way), and Road D (two-way). Road A intersects Road B, Road A intersects Road C, and Road A intersects Road D. The intersections of two roads are called intersections. Arrows in the diagram indicate the direction of traffic. Each road can be numbered, creating a road numbering table as shown in Table 4 below.
[0130] Table 4 Road Numbering Table
[0131]
[0132] like Figure 4 As shown, a road segment model can be further abstracted. Two-way roads can be represented by two line segments, labeled T and F respectively. For example, the two line segments of road A are numbered AT and AF. For example, road D intersects with or connects to road A; the two line segments of road D can be represented as DT and DF. One-way roads can be represented by one line segment. For example, the line segment of road C can be represented as CT or CF. Following the above rules, a line segment record table as shown in Table 5 can be established.
[0133] Table 5 Line Segment Record Table
[0134]
[0135] like Figure 5 As shown, road nodes can be used to break road segments and assign new numbers to each segment, while maintaining the connection relationship between nodes and each segment. The specific processing steps are as follows:
[0136] 1) Use road nodes to break road segments and save the segment between two road nodes as a single segment.
[0137] 2) Assign a new unique number to each road segment, where road segments belonging to the same road have the same number prefix.
[0138] 3) Calculate the direction angle of each road segment, such as the clockwise angle between the line connecting the two nodes of each road segment and the due north direction.
[0139] 4) Record the latitude and longitude coordinate sequence of the road segment.
[0140] 5) Establish the buffer zone range for the road segment and record the coordinate sequence constituting the buffer zone. The radius of the buffer zone can be 1 / 3 of the road width corresponding to the road grade. The higher the road grade, the wider the road width. For example, the buffer zone creation function in Geographic Information System (GIS) software can be used to create the road segment buffer zone.
[0141] 6) Save the generated road segment records, as shown in Table 6 below, and save the connection relationships between nodes and road segments, as shown in Table 7 below.
[0142] Table 6 Road Section Information Table
[0143]
[0144] Table 7 Relationship between Nodes and Road Segments
[0145]
[0146] Based on Tables 6 and 7 above, the following functions can be achieved: quickly retrieve the line segments connected to a road segment number; given a coordinate, quickly retrieve which road segment the coordinate is located on and other related information by determining that the coordinate is within the road segment buffer zone.
[0147] Optionally, step 102 includes:
[0148] The bus driving coordinate data is matched with a pre-established road segment model to remove coordinate points in the bus driving coordinate data that are not located within the road segment buffer, and the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located within the road segment buffer is determined.
[0149] After step 102, the method further includes:
[0150] Based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route is determined;
[0151] By concatenating the coordinates of the bus routes, the bus routes can be obtained.
[0152] In one implementation, the bus route can be determined by identifying the road segment information corresponding to each valid coordinate point in the bus driving coordinate data and by determining the order in which the coordinate points were collected.
[0153] Specifically, the obtained bus driving coordinate data can be matched with the established road segment model to determine whether each coordinate point is within the road segment buffer zone. Coordinate points not within the road segment buffer zone can be considered invalid and removed, while coordinate points within the road segment buffer zone are considered valid. The road segment to which each coordinate point belongs can be determined based on which road segment buffer zone it is located in. In this way, the road segment information corresponding to each target coordinate point located within the road segment buffer zone can be obtained.
[0154] Specifically, GIS software can be used to sequentially calculate the range relationship between each coordinate point in the bus driving coordinate data and the road segment buffer zone, retaining the target coordinate points within the road segment buffer zone, and simultaneously obtaining a one-to-one correspondence between the target coordinate points and the road segments. In practice, due to factors such as GPS signal drift and signal interference, the collected coordinate points may deviate from the road segment and fall outside the buffer zone.
[0155] Next, after determining the road segment information corresponding to each target coordinate point, the target coordinate points can be sorted according to their acquisition time. Then, based on the road segments corresponding to each target coordinate point, the road segments that the bus will pass through in sequence can be obtained. The acquisition time of each target coordinate point can be obtained by recording the acquisition timestamp of each coordinate point when collecting the driving coordinate data. For example, if target coordinate points a, b, c, and d are acquired in sequence, and target coordinate point a is located in road segment E, target coordinate point b is located in road segment G, target coordinate point c is located in road segment F, and target coordinate point d is located in road segment H, then the road segment that the bus will pass through can be determined as EGFH. Finally, the coordinates of the road segments that the bus will pass through can be concatenated to obtain the bus route, thus obtaining the complete bus route trajectory.
[0156] In this way, by determining the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route information can be determined, making the bus route information more complete and making it easier for users to query the bus route.
[0157] Step 103: Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segments, filter out the bus stop coordinate data from the bus driving coordinate data.
[0158] After determining the road segment information corresponding to multiple coordinate points in the bus driving coordinate data, the attributes of the multiple coordinate points can be analyzed based on the road segments where the multiple coordinate points are distributed. This allows for the determination of which coordinate points belong to parking point coordinates and which belong to coordinate points during driving. Furthermore, based on various parking situations in traffic, the distribution of coordinate points generated by bus stop parking and other parking situations, such as waiting at traffic lights or parking due to traffic congestion, can be distinguished. For example, coordinate points collected when waiting at traffic lights will be distributed near road intersections, while bus stops are usually not located near intersections. This allows for the distinction between coordinate data when parking at bus stops and coordinate data when waiting at traffic lights. As another example, for parking point coordinates generated by traffic congestion, coordinate points generated by congested locations can be eliminated based on traffic conditions.
[0159] In this way, by performing the above analysis and filtering on the bus driving coordinate data, bus stop coordinate data can be selected from the bus driving coordinate data. For example, coordinate points that are densely distributed near non-intersections and where the traffic situation is not congested can be identified as bus stop coordinate data.
[0160] Step 104: Determine the bus stop coordinates based on the bus stop coordinate data.
[0161] After determining the bus stop coordinate data, the coordinates of each bus stop can be further determined based on the distribution of the bus stop coordinate data on the road segment. Usually, a bus stop corresponds to a range, and the coordinates of the stops generated by buses within that range can be used as the coordinate data of that stop. That is, the coordinate data of each stop may not be unique, and it is necessary to further determine the coordinates of each stop. Specifically, based on the distribution of the stop coordinate data on each road segment, the coordinate data of stops that are relatively close in location can be determined as the coordinate data of the same stop. In one way, for the coordinate data of the same stop, one of the coordinate points located in the center can be taken as the coordinates of the stop. In another way, the average value of the coordinate data of the stop can also be taken as the coordinates of the stop. Of course, other methods can also be used to determine the coordinates of each stop.
[0162] Optionally, after step 103, the method further includes:
[0163] Determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0164] Step 104 includes:
[0165] For a first coordinate dataset whose interval distance is less than a preset distance threshold in the bus stop coordinate data, calculate the average distance along the line of the first coordinate dataset;
[0166] The coordinates of the bus stop are determined from the first coordinate dataset whose distance along the line is closest to the average distance along the line.
[0167] In one embodiment, in order to accurately determine the coordinates of bus stops, the distance along the line from each coordinate point in the bus stop coordinate data to the nearest node on the corresponding road segment can be calculated, and then the coordinates of each bus stop can be determined based on the distance along the line of each coordinate point.
[0168] Specifically, the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment can be determined first. This can be done by drawing a perpendicular line from the coordinate point to the corresponding road segment, and the intersection of this perpendicular line and the road segment is the perpendicular point. Then, the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment can be calculated. This can be done by calculating the distance along the line from each perpendicular point to the two endpoint nodes on the corresponding road segment and retaining the minimum distance along the line.
[0169] For example, such as Figure 6 As shown, for coordinate point P1, we can determine the perpendicular point P1′ of coordinate point P1 on the corresponding road segment AF-L7, then calculate the distance l along the line from the perpendicular point P1′ to the nearest road node N1 on road segment AF-L7, and finally store the correspondence between coordinate point P1 and the distance l along the line.
[0170] After calculating the distance along the line corresponding to each coordinate point, the correspondence between each coordinate point and the distance along the line can be stored. Of course, in one embodiment, after determining the road segment information corresponding to the target coordinate point in the bus driving coordinate data, the distance along the line from each target coordinate point to the nearest node on the corresponding road segment can be calculated, and the correspondence between the target coordinate point, the road segment, and the distance along the line can be stored together, as shown in Table 8 below.
[0171] Table 8. Correspondence between coordinate points and road segments
[0172]
[0173] After determining the bus stop coordinate data, coordinate points whose coordinate positions are close to each other (e.g., the position interval is less than a preset distance threshold) can be identified as the coordinate data of the same bus stop. Then, based on the data in Table 8, for the coordinate data of the same bus stop, the average distance along the line corresponding to these coordinate data can be calculated, and the coordinate point whose distance along the line is closest to the average value can be taken as the coordinate of the stop.
[0174] In this way, the coordinates of each station can be determined more accurately based on the distance along the line of each coordinate point in the bus station coordinate data.
[0175] Optionally, step 103 includes at least one of the following:
[0176] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0177] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0178] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0179] This allows for the differentiation between stop point coordinates and non-stop point coordinates based on the actual bus driving characteristics in real-world scenarios. Furthermore, it allows for the differentiation of stop point coordinates based on different parking scenarios, such as buses arriving at stops, waiting at traffic lights, and stopping due to traffic congestion. This ensures that bus stop coordinate data that closely approximates actual stop conditions is selected from the bus driving coordinate data.
[0180] Specifically, bus parking scenarios can be categorized as follows:
[0181] 1) Bus fleet parking lot. Data collection is not required at this location, and no data will be collected.
[0182] 2) Stopping at an intersection while waiting for traffic lights. Buses stop according to the traffic light signals. This stopping location is close to the intersection, and there are no bus stops in the area close to the intersection. Based on this, the following can be set: Figure 7 As shown, a certain distance from the end point of the road segment towards the center point of the road segment is designated as the invalid data area 70. Data collected within this area is considered invalid. In other words, coordinate data in the bus driving coordinate data that are within a preset range from the road segment intersection can be removed.
[0183] 3) Traffic congestion parking. Due to road congestion, parking locations and durations are not fixed. If parking occurs near traffic intersections, it can be filtered out using point 2). Data collected during congested parking outside intersections will interfere with the data collected for parking at the station, and rules need to be set to clear this data.
[0184] For example, the data collection strategy could be: first, avoid collecting data during morning and evening rush hours; second, utilize real-time traffic information services (traffic status) available online, and simultaneously query the traffic status interface via the server backend to obtain the traffic status of each road segment at the same time, based on the road segment information in Table 8. For example, 0 represents unknown, 1 represents smooth traffic, 2 represents slow traffic, 3 represents congestion, and 4 represents severe congestion. By comparing the collection timestamps, data with unknown, slow, or congested traffic status can be removed, retaining only data with a smooth traffic status. This strategy filters out data collected during periods of traffic congestion and parking, ensuring the quality of the collected data.
[0185] 4) Abnormal Parking. This type of situation is highly random, with no fixed location or time of occurrence. Compared to parking at the station, the proportion of the former is inversely proportional to the data collection duration. Therefore, based on multiple sets of collected data, the distribution of parking points can be determined, and parking points that do not match the distribution of most collected data can be removed. Alternatively, based on the "distance along the line to the nearest node" attribute of the collection points in Table 8, the distance along the line when parking at the station will remain within a certain range. Those outside this range are considered abnormal situations and such data should be excluded.
[0186] 5) Bus arrival and stopping at the station. After excluding the data collected in the above situations, the remaining data are the data collected when the bus arrives at the station and the data collected during normal operation. Further filtering of the data collected during normal operation is required.
[0187] Specifically, this can be achieved by analyzing the characteristics of the data collection points during parking. For example, if coordinate points are continuously collected during parking with constant coordinate displacement, the displacement and time difference between two adjacent points can be calculated using the formula "moving speed = displacement / time" to obtain the moving speed of the data collection points. If the moving speed exceeds a preset speed threshold, the data can be identified as data collected during the bus's movement and excluded. The remaining data is the data collected when the bus pulls into the station.
[0188] The thresholds involved in the above analysis can be continuously adjusted based on the system's operating conditions to obtain the best data processing results.
[0189] Based on Table 8, the data collected in the above-mentioned cases were further filtered out, leaving only the valid data collected when buses entered and stopped at the station. The bus stop coordinate data is shown in Table 9 below.
[0190] Table 9. Bus Stop Coordinate Data Records
[0191]
[0192] By performing the above filtering process on the bus driving coordinate data, we can ensure that the final bus stop coordinate data is relatively accurate and reliable.
[0193] Optionally, after step 104, the method further includes:
[0194] Based on the collection time of the bus stop coordinate data and by referring to the pre-entered list of bus stops, determine the name of the bus stop corresponding to each bus stop coordinate.
[0195] Since the bus travel coordinate data is collected sequentially during the journey from the originating station to the terminal station, each coordinate point has its own collection time. Specifically, the collection timestamps of each coordinate point can be recorded synchronously during the bus travel coordinate data collection. Thus, after determining the bus stop coordinates, the station name corresponding to each bus stop coordinate can be further determined based on the collection time of the bus stop coordinate data.
[0196] Specifically, data collectors can pre-enter a list of bus stops on their terminals, as shown in Table 2 above. The terminals then upload this list to the server device. The server device can then determine the name of each bus stop based on its coordinates, according to the data collection time and the bus stop list. For example, the bus stop with the earliest collection time corresponds to the starting station in the list, the next bus stop with the second collection time corresponds to the second stop, and so on, with the bus stop with the latest collection time corresponding to the ending station.
[0197] It should be noted that when the number of collected station coordinates is less than or greater than the number of entered stations, the bus station coordinate data cannot be further processed. Data collection and processing must continue until the number of collected station coordinates matches the number of entered stations. When the number of collected station coordinates matches the number of entered stations, the station coordinates can be sorted according to the order of collection time and matched with the order of entered stations to obtain the correspondence between station names and coordinates from the originating station to the destination station, thus obtaining complete bus station information.
[0198] The processing flow of bus driving coordinate data by the server-side equipment can be as follows: Figure 8 As shown, it includes the following steps:
[0199] Step 81: Pre-establish a road segment model. Based on the road network data provided by the map provider, establish a road segment model to calculate the bus routes and estimate the road segments where bus stops are located, thereby estimating the location of the bus stops.
[0200] Step 82: Receive collected data. After receiving the data file from the terminal, decompress the file and check the data. Proceed to subsequent steps if the data meets the check requirements. Do not process data with empty information or coordinates outside the area range.
[0201] Step 83: Calculate the bus route segments. After sorting the GPS coordinate data collected along the same bus route by timestamp, fit and match it with the road segment model to obtain the correspondence between each GPS coordinate point and the road segment. Based on a certain sample size, finally select the road segments that match the collected data, i.e., the bus routes.
[0202] Step 84: Calculate bus stop locations. Based on the preliminary bus route segments obtained in the previous step, further filter out segments with a large number of data collection points. Use the input station name to query the map provider's Point of Interest (POI) database for further filtering. Keep the POI records that fit the route segment as the station location. If there are multiple POI records, take one (assuming the station segment length is 10 meters). Obtain the locations of all stations in this way.
[0203] Step 85: Generate bus route information. Organize the calculation results from the above steps to obtain the bus route trajectory, station locations, and other route attribute information, and save the results into the database.
[0204] The embodiments of the present invention can be applied to Figure 9 The public transport data processing system shown includes a terminal 91 and a server 92, which communicate via a mobile communication network. Terminal 91 includes an input module 911, a GPS acquisition module 912, a transmission module 913, a storage module 914, and a data acquisition database 915. Server 92 includes a receiving module 921, a bus stop query module 922, a bus route processing module 923, a bus stop processing module 924, a road segment connection relationship establishment module 925, a storage module 926, a road decomposition segment model establishment module 927, and a public transport database 928.
[0205] In this embodiment of the invention, it should also be noted that, in practical applications, to ensure the accuracy of bus stop and route data collection, multiple data collections can be performed on a specific bus route. For example, bus driving coordinate data can be collected multiple times at different times, or the same bus route can be collected multiple times using different terminals. Each set of collected data is processed separately, and bus stop and route information can be determined based on each set of collected data. Finally, the processing results of multiple sets of collected data are merged, and the final result data is obtained through verification and analysis. For example, the determined bus stops or routes can be checked by combining the processing results of multiple sets of data, eliminating some inaccurate data, or improving the stops or routes.
[0206] This invention utilizes existing road data to establish road segment models and sets data processing rules. It cleans, matches, and analyzes the collected bus GPS coordinate data to calculate the trajectory coordinates of bus routes and the location coordinates of bus stops. Combined with other attributes manually entered before data collection, it generates complete bus route data, including bus route names, fares, stop lists, bus route trajectory coordinates, and stop coordinates. This data can be used for bus query services on internet map services. The entire process is handled in the server-side backend, requiring no manual intervention. As the collected data samples accumulate, the calculation results become increasingly accurate. This invention fully utilizes existing resources to analyze and process collected data, simplifies the bus data collection and production process, reduces manual collection work, thereby minimizing the impact of human intervention on data results, improving data collection and processing efficiency, reducing collection costs, shortening the collection cycle, and enhancing the timeliness of bus data.
[0207] The public transport data processing method of this invention involves acquiring bus driving coordinate data, which is obtained by collecting coordinates of the bus route during operation. The method then matches the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data. Based on the road segment information and the distribution characteristics of the multiple coordinate points on the road segments, bus stop coordinate data is filtered from the bus driving coordinate data. Finally, based on the bus stop coordinate data, the bus stop coordinates are determined. This method, by matching bus driving coordinate data with a road segment model to ultimately determine bus stop coordinate data and thus bus stop coordinates, greatly simplifies the manual collection process of bus stop coordinates, shortens the data collection cycle, and improves the timeliness of the data.
[0208] This invention also provides a public transportation data processing device. See [link to related document]. Figure 10 , Figure 10This is a structural diagram of the public transport data processing device provided in an embodiment of the present invention. Since the principle by which the public transport data processing device solves the problem is similar to the public transport data processing method in this embodiment, the implementation of this public transport data processing device can refer to the implementation of the method; repeated details will not be elaborated further.
[0209] like Figure 10 As shown, the bus data processing device 1000 includes:
[0210] The first acquisition module 1001 is used to acquire bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus driving.
[0211] The first determining module 1002 is used to match the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data.
[0212] The first processing module 1003 is used to filter out bus stop coordinate data from the bus driving coordinate data based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment.
[0213] The second determining module 1004 is used to determine the coordinates of the bus stops based on the bus stop coordinate data.
[0214] Optionally, the bus data processing unit 1000 also includes:
[0215] The second acquisition module is used to acquire road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the bus driving area;
[0216] The second processing module is used to divide each road in the target area into road segments based on the road nodes, and record the connection relationship between each road node and road segment, wherein each pair of adjacent road nodes is a road segment.
[0217] The third determining module is used to determine the buffer zone for each road segment after division;
[0218] The third processing module is used to establish the road segment model based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0219] Optionally, the third processing module includes:
[0220] Numbering units are used to number each road segment;
[0221] The first determining unit is used to determine the direction angle of each road segment based on the driving direction and reference direction of each road segment;
[0222] The recording unit is used to record the coordinate sequence of each road segment and the coordinate sequence of the buffer zone of each road segment;
[0223] The first establishment unit is used to establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer coordinate sequences;
[0224] The second establishment unit is used to establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0225] Optionally, the first determining module 1002 is used to match the bus driving coordinate data with a pre-established road segment model, remove coordinate points in the bus driving coordinate data that are not located in the road segment buffer, and determine the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located in the road segment buffer.
[0226] The bus data processing unit 1000 also includes:
[0227] The fourth determining module is used to determine the bus route based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point.
[0228] The fourth processing module is used to connect the coordinates of the bus route segments to obtain the bus route.
[0229] Optionally, the first processing module 1003 is used to implement at least one of the following:
[0230] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0231] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0232] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0233] Optionally, the bus data processing unit 1000 also includes:
[0234] The fifth processing module is used to determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0235] The second determining module 1004 includes:
[0236] The calculation unit is used to calculate the average distance along the line of the first coordinate dataset for the bus stop coordinate data in which the interval distance is less than a preset distance threshold;
[0237] The second determining unit is used to determine the coordinate data in the first coordinate dataset that is closest to the average distance along the line as the coordinates of the bus stop.
[0238] Optionally, the bus data processing unit 1000 also includes:
[0239] The fifth determination module is used to determine the bus stop name corresponding to each bus stop coordinate according to the collection time of the bus stop coordinate data and by referring to the pre-entered bus stop list.
[0240] The public transport data processing device provided in this embodiment of the invention can execute the above-described method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0241] The public transport data processing device 1000 of this invention acquires bus driving coordinate data, which is obtained by collecting coordinates of the bus route during bus operation. The device matches the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data. Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segments, bus stop coordinate data is filtered from the bus driving coordinate data. Based on the bus stop coordinate data, the bus stop coordinates are determined. Thus, by matching the bus driving coordinate data with the road segment model to ultimately determine the bus stop coordinate data and subsequently the bus stop coordinates, the manual process of collecting bus stop coordinates can be greatly simplified, the data collection cycle shortened, and the timeliness of the data improved.
[0242] This invention also provides a server-side device. Since the principle by which the server-side device solves the problem is similar to the public transportation data processing method in this invention, the implementation of the server-side device can be found in the implementation of the method, and repeated details will not be elaborated further. Figure 11 As shown, the server-side device of this embodiment includes:
[0243] Processor 1100 is used to read the program from memory 1120 and execute the following procedures:
[0244] Obtain bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation;
[0245] The bus driving coordinate data is matched with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data;
[0246] Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment, bus stop coordinate data is filtered out from the bus driving coordinate data;
[0247] Based on the bus stop coordinate data, the bus stop coordinates are determined.
[0248] Transceiver 1110 is used to receive and send data under the control of processor 1100.
[0249] Among them, Figure 11 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1100) and memory (memory 1120). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1110 may be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. The processor 1100 is responsible for managing the bus architecture and general processing, and the memory 1120 may store data used by the processor 1100 during operation.
[0250] Optionally, the processor 1100 is also used to read the program from the memory 1120 and perform the following steps:
[0251] Obtain road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the public transport driving area;
[0252] Based on the road nodes, each road in the target area is divided into road segments, and the connection relationship between each road node and road segment is recorded. Each pair of adjacent road nodes is a road segment.
[0253] Determine the buffer zone for each road segment after division;
[0254] The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0255] Optionally, the processor 1100 is also used to read the program from the memory 1120 and perform the following steps:
[0256] Number each road segment;
[0257] Based on the driving direction and reference direction of each road segment, determine the direction angle of each road segment;
[0258] Record the coordinate sequence of each road segment, and record the coordinate sequence of the buffer zone of each road segment;
[0259] Establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer zone coordinate sequences;
[0260] Establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0261] Optionally, the processor 1100 is also used to read the program from the memory 1120 and perform the following steps:
[0262] The bus driving coordinate data is matched with a pre-established road segment model to remove coordinate points in the bus driving coordinate data that are not located within the road segment buffer, and the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located within the road segment buffer is determined.
[0263] Based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route is determined;
[0264] By concatenating the coordinates of the bus routes, the bus routes can be obtained.
[0265] Optionally, the processor 1100 is also used to read a program from the memory 1120 and execute at least one of the following:
[0266] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0267] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0268] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0269] Optionally, the processor 1100 is also used to read the program from the memory 1120 and perform the following steps:
[0270] Determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0271] For a first coordinate dataset whose interval distance is less than a preset distance threshold in the bus stop coordinate data, calculate the average distance along the line of the first coordinate dataset;
[0272] The coordinates of the bus stop are determined from the first coordinate dataset whose distance along the line is closest to the average distance along the line.
[0273] Optionally, the processor 1100 is also used to read the program from the memory 1120 and perform the following steps:
[0274] Based on the collection time of the bus stop coordinate data and by referring to the pre-entered list of bus stops, determine the name of the bus stop corresponding to each bus stop coordinate.
[0275] The server device provided in this embodiment of the invention can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0276] Furthermore, the computer-readable storage medium of this embodiment of the invention is used to store a computer program, which can be executed by a processor to implement the following steps:
[0277] Obtain bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation;
[0278] The bus driving coordinate data is matched with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data;
[0279] Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment, bus stop coordinate data is filtered out from the bus driving coordinate data;
[0280] Based on the bus stop coordinate data, the bus stop coordinates are determined.
[0281] Optionally, the computer program may also be executed by a processor to perform the following steps:
[0282] Obtain road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the public transport driving area;
[0283] Based on the road nodes, each road in the target area is divided into road segments, and the connection relationship between each road node and road segment is recorded. Each pair of adjacent road nodes is a road segment.
[0284] Determine the buffer zone for each road segment after division;
[0285] The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
[0286] Optionally, the computer program may also be executed by a processor to perform the following steps:
[0287] Number each road segment;
[0288] Based on the driving direction and reference direction of each road segment, determine the direction angle of each road segment;
[0289] Record the coordinate sequence of each road segment, and record the coordinate sequence of the buffer zone of each road segment;
[0290] Establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer zone coordinate sequences;
[0291] Establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
[0292] Optionally, the computer program may also be executed by a processor to perform the following steps:
[0293] The bus driving coordinate data is matched with a pre-established road segment model to remove coordinate points in the bus driving coordinate data that are not located within the road segment buffer, and the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located within the road segment buffer is determined.
[0294] Based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route is determined;
[0295] By concatenating the coordinates of the bus routes, the bus routes can be obtained.
[0296] Optionally, the computer program may also be executed by a processor to implement at least one of the following:
[0297] Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection;
[0298] Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status;
[0299] Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data with a moving speed greater than a preset speed threshold are removed.
[0300] Optionally, the computer program may also be executed by a processor to perform the following steps:
[0301] Determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line.
[0302] For a first coordinate dataset whose interval distance is less than a preset distance threshold in the bus stop coordinate data, calculate the average distance along the line of the first coordinate dataset;
[0303] The coordinates of the bus stop are determined from the first coordinate dataset whose distance along the line is closest to the average distance along the line.
[0304] Optionally, the computer program may also be executed by a processor to perform the following steps:
[0305] Based on the collection time of the bus stop coordinate data and by referring to the pre-entered list of bus stops, determine the name of the bus stop corresponding to each bus stop coordinate.
[0306] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0307] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.
[0308] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0309] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for processing public transportation data, characterized in that, include: Obtain bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation; The bus driving coordinate data is matched with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data; Based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment, bus stop coordinate data is filtered out from the bus driving coordinate data; Based on the bus stop coordinate data, determine the bus stop coordinates; The step of filtering bus stop coordinate data from the bus driving coordinate data based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment includes at least one of the following: Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection; Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status; Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data in the bus driving coordinate data whose moving speed is greater than a preset speed threshold is removed. After filtering out the bus stop coordinate data from the bus driving coordinate data, the method further includes: Determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line. Determining the bus stop coordinates based on the bus stop coordinate data includes: For a first coordinate dataset whose interval distance is less than a preset distance threshold in the bus stop coordinate data, calculate the average distance along the line of the first coordinate dataset; The coordinate data in the first coordinate dataset that is closest to the average distance along the line is determined as the coordinates of the bus stop; The method further includes: Obtain road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the public transport driving area; Based on the road nodes, each road in the target area is divided into road segments, and the connection relationship between each road node and road segment is recorded. Each pair of adjacent road nodes is a road segment. Determine the buffer zone for each road segment after division; The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
2. The method according to claim 1, characterized in that, The road segment model is established based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment, including: Number each road segment; Based on the driving direction and reference direction of each road segment, determine the direction angle of each road segment; Record the coordinate sequence of each road segment, and record the coordinate sequence of the buffer zone of each road segment; Establish a road segment information table, wherein the road segment information table stores mutually matching road segment numbers, direction angles, road segment coordinate sequences and buffer zone coordinate sequences; Establish a node-road segment relationship table, wherein the node-road segment relationship table stores mutually matching road nodes and connected road segment numbers.
3. The method according to claim 1, characterized in that, The step of matching the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data includes: The bus driving coordinate data is matched with a pre-established road segment model to remove coordinate points in the bus driving coordinate data that are not located within the road segment buffer, and the road segment information corresponding to the target coordinate points in the bus driving coordinate data that are located within the road segment buffer is determined. The method further includes: Based on the road segment information corresponding to the target coordinate point and according to the collection time of the target coordinate point, the bus route is determined; By concatenating the coordinates of the bus routes, the bus routes can be obtained.
4. The method according to claim 1, characterized in that, After determining the bus stop coordinates based on the bus stop coordinate data, the method further includes: Based on the collection time of the bus stop coordinate data and by referring to the pre-entered list of bus stops, determine the name of the bus stop corresponding to each bus stop coordinate.
5. A public transportation data processing device, characterized in that, include: The first acquisition module is used to acquire bus driving coordinate data, wherein the bus driving coordinate data is obtained by collecting coordinates of the bus driving route during bus operation. The first determining module is used to match the bus driving coordinate data with a pre-established road segment model to determine the road segment information corresponding to multiple coordinate points in the bus driving coordinate data; The first processing module is used to filter out bus stop coordinate data from the bus driving coordinate data based on the road segment information corresponding to the multiple coordinate points and the distribution characteristics of the multiple coordinate points on the road segment. The second determining module is used to determine the coordinates of the bus stops based on the bus stop coordinate data; The first processing module is used to implement at least one of the following: Remove coordinate data from the bus driving coordinate data that are within a preset range in distance from the road segment intersection; Based on the traffic information of the bus route, remove the coordinate data in the bus driving coordinate data that correspond to the traffic congestion status; Based on the displacement and acquisition time difference between every two adjacent coordinate data in the bus driving coordinate data, the moving speed of each coordinate data is calculated, and coordinate data in the bus driving coordinate data whose moving speed is greater than a preset speed threshold is removed. The bus data processing device also includes: The fifth processing module is used to determine the perpendicular point of each coordinate point in the bus stop coordinate data to the corresponding road segment, calculate the distance along the line from each perpendicular point to the nearest road node on the corresponding road segment, and store the correspondence between each coordinate point and the distance along the line. The second determining module includes: The calculation unit is used to calculate the average distance along the line of the first coordinate dataset for the bus stop coordinate data in which the interval distance is less than a preset distance threshold; The second determining unit is used to determine the coordinate data in the first coordinate dataset that is closest to the average distance along the line as the coordinates of the bus stop. The bus data processing device also includes: The second acquisition module is used to acquire road data within the target area, wherein the road data includes road name, road segment coordinates, road driving direction and road nodes, and the target area is associated with the bus driving area; The second processing module is used to divide each road in the target area into road segments based on the road nodes, and record the connection relationship between each road node and road segment, wherein each pair of adjacent road nodes is a road segment. The third determining module is used to determine the buffer zone for each road segment after division; The third processing module is used to establish the road segment model based on the coordinates, driving direction, and buffer zone of each road segment, as well as the connection relationship between each road node and the road segment.
6. A server-side device, comprising: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the public transport data processing method as described in any one of claims 1 to 4.
7. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps in the public transport data processing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Bus line station registration method and system, storage medium and intelligent terminal
CN117349393A
Indoor positioning method and device, electronic equipment, storage medium and program product
CN119110393A
Single-line bus operation dynamic optimization method based on multi-source data
CN119169799A
Urban cross-domain multi-mode network space modeling method
CN120087091A