A bus data processing method, device and electronic equipment
By comparing the directional vector differences between bus stops and station markers, and binding bus stops to station markers, the problem of inconsistent stop locations in bus data is solved, enabling fast and easy data maintenance and efficient station binding.
Patent Information
- Application Number
- CN202310746446.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-06-21
AI Technical Summary
In existing technologies, the difference in the accuracy of bus stop location coordinate collection leads to inconsistent locations of the same stop on different bus routes, and frequent clustering processing is required when updating bus data, resulting in high maintenance costs.
By comparing the differences in the direction vectors of bus stops and station markers, bus stops are bound to station markers, reducing clustering processing and binding only occurring when stations are updated.
It enables quick and easy maintenance of public transport data, improving binding accuracy and maintenance efficiency.
Smart Images

Figure CN116932674B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of map data technology, and more particularly to a public transportation data processing method, apparatus, and electronic device. Background Technology
[0002] Maps are increasingly used in daily life. For example, we can use maps to find public transportation routes from our starting point to our destination, or to find driving directions, or to search for restaurants or tourist attractions. To better provide public transportation route information services, it's necessary to regularly organize and maintain public transportation data. For instance, one aspect of public transportation data is bus stops; standardizing the management of bus stop locations will facilitate more accurate and faster calculations related to public transportation routes.
[0003] In related technologies, multiple bus routes may share the same stops. For example, bus route 111 has a "Forest Park" stop, and bus route 122 also has a "Forest Park" stop. However, due to factors such as data collection accuracy, the location coordinates of the same bus stop on different bus routes may differ in the collected bus stop data. For instance, the location coordinates of the "Forest Park" stop on bus route 111 and bus route 122 may differ. In such cases, clustering can be used to group multiple stops with the same name together, obtaining a cluster point that serves as the location coordinates of the "Forest Park" stop, thus unifying the location coordinates of the same stop across different bus routes.
[0004] However, this approach has a problem: public transport data is subject to updates. For example, a new bus stop may be added to a bus route, or the stops on a bus route may change. Therefore, to ensure the "freshness" of the public transport data and to standardize its organization, bus stops need to be clustered periodically. This periodic clustering process is very time-consuming and results in high maintenance costs for the public transport data. Summary of the Invention
[0005] In view of this, one or more embodiments of this specification provide a bus data processing method, apparatus, and electronic device to more quickly and easily maintain bus data.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of the embodiments of this specification, a public transportation data processing method is provided, the method comprising:
[0008] Obtain bus data to be processed, the bus data including: target bus stops to be processed, and a set of candidate bus stops, the set of candidate bus stops including: at least one bus stop; each bus stop is bound to at least one bus stop, and the at least one bound bus stop has the same stop name; the stop name is the same as the stop name of the bus stop, and the stop name of the bus stop is also the same as the stop name of the target bus stop;
[0009] A target trajectory segment is determined from the bus route trajectory passing through the target bus stop, and is used as the station direction vector of the target bus stop. The direction of the station direction vector is related to the travel direction of the target trajectory segment.
[0010] For each bus stop bollard, a bollard trajectory segment is determined from the bus route trajectory passing through the bus stop bollard, which serves as the bollard direction vector of the bus stop bollard. The direction of the bollard direction vector is related to the travel direction of the bollard trajectory segment.
[0011] If the directional difference between the direction vector of the bus stop and the direction vector of the bus station meets the directional difference condition, then the bus stop corresponding to the direction vector of the bus stop is taken as the target bus stop, so as to bind the target bus station to the target bus stop.
[0012] According to a second aspect of the embodiments of this specification, a public transportation data processing apparatus is provided, the apparatus comprising:
[0013] The data acquisition module is used to acquire bus data to be processed. The bus data includes: the target bus stop to be processed and a set of candidate bus stops. The set of candidate bus stops includes: at least one bus stop; each bus stop is bound to at least one bus stop, and the at least one bound bus stop has the same stop name; the stop name is the same as the stop name of the bus stop, and the stop name of the bus stop is also the same as the stop name of the target bus stop.
[0014] The station vector determination module is used to determine a target trajectory segment from the bus route trajectory passing through the target bus station, as the station direction vector of the target bus station, wherein the direction of the station direction vector is related to the travel direction of the target trajectory segment;
[0015] The bus stop vector determination module is used to determine a bus stop trajectory segment from the bus route trajectory passing through the bus stop for each bus stop, as the bus stop direction vector of the bus stop, and the direction of the bus stop direction vector is related to the driving direction of the bus stop trajectory segment;
[0016] The bus stop selection module is used to select the bus stop corresponding to the direction vector of the bus stop as the target bus stop if the directional difference between the direction vector of the bus stop and the direction vector of the station meets the directional difference condition, so as to bind the target bus stop to the target bus stop.
[0017] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising:
[0018] processor;
[0019] Memory used to store processor-executable instructions;
[0020] The processor implements the method of any embodiment of this specification by running the executable instructions.
[0021] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the method as described in any embodiment of this specification.
[0022] The bus data processing method, apparatus, and electronic device described in this specification compare the station direction vector and the station marker direction vector. When the directional difference between the station marker direction vector and the station direction vector meets the directional difference condition, the bus marker corresponding to the station marker direction vector is taken as the target bus marker to be bound. This allows the updated bus station to be bound to the bus marker simply by executing this method when a bus station is updated, which is fast and simple and improves the efficiency of organizing and maintaining bus data. Furthermore, because this method compares the directional difference between the station marker direction vector and the station direction vector, it can obtain station markers with the same direction as the target bus station to be bound, making the determined bus markers to be bound more accurate and improving the accuracy of station binding to station markers. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in one or more embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in one or more embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of a bus stop provided in an exemplary embodiment.
[0025] Figure 2 This is a schematic diagram of a bus stop bollard provided in an exemplary embodiment.
[0026] Figure 3 This is a schematic diagram of a bus route trajectory provided in an exemplary embodiment.
[0027] Figure 4 This is a flowchart illustrating a public transportation data processing method provided in an exemplary embodiment.
[0028] Figure 5 This is a schematic diagram of a bus route trajectory provided in an exemplary embodiment.
[0029] Figure 6 This is a flowchart illustrating a public transportation data processing method provided in an exemplary embodiment.
[0030] Figure 7 yes Figure 6 A diagram illustrating the corresponding application scenarios.
[0031] Figure 8A This is a schematic diagram of a bus route trajectory provided in an exemplary embodiment.
[0032] Figure 8B This is a schematic diagram of trajectory capture provided in an exemplary embodiment.
[0033] Figure 9 This is a flowchart illustrating a public transportation data processing method provided in an exemplary embodiment.
[0034] Figure 10 yes Figure 9 A diagram illustrating the corresponding application scenarios.
[0035] Figure 11 This is a schematic diagram of a public transportation data processing method provided in an exemplary embodiment.
[0036] Figure 12 This is a schematic diagram of the structure of a public transport data processing device provided in an exemplary embodiment.
[0037] Figure 13 This is a hardware structure diagram of an electronic device containing a public transportation data processing device, provided as an exemplary embodiment. Detailed Implementation
[0038] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0039] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0040] This specification provides a method for processing public transportation data. In this method, when organizing public transportation data, the original clustering method is no longer used. Instead, public transportation stops are bound to public transportation station markers.
[0041] Before describing this method, let's clarify a few concepts involved:
[0042] 1) Bus stops:
[0043] The bus stops mentioned above refer to the stops along the bus route.
[0044] For example, the first and last stops of bus route 111 are "Juyuan West Station" and "Forest Park" respectively, and the stops along the way include "Shangdi South Road", "Sanhe Bridge West", and "Linyu Station". Among them, "Juyuan West Station", "Sanhe Bridge West", and "Linyu Station" are all called bus stops, that is, bus route 111 has 5 bus stops.
[0045] Each bus stop can have corresponding station attributes, and these attributes can be at least one, such as: the bus stop name, the bus stop location, and the bus route to which the bus stop belongs. Different bus stops have different station attributes. If there are multiple bus attributes, and two bus stops have at least one different bus attribute, then these two bus stops are considered different bus stops. For example, if the bus attributes include three attributes: station name, station location, and the bus route to which the bus stop belongs, then for two bus stops, if at least one of these attributes is different, they are considered different bus stops.
[0046] For example, the aforementioned "Linyu Station" is indeed named Linyu Station.
[0047] The location of the bus stop, i.e. the location coordinates of the bus stop, is not limited in this embodiment to the method of collecting the location of the bus stop, including but not limited to: manually collecting the location of the bus stop, or collecting the location of the bus stop through the public transportation department.
[0048] For a single bus route, bus stops with the same name in different directions are considered two different bus stops. Please see below. Figure 1For example, Route 111, traveling from "Juyuan West Station" to "Forest Park", passes through "Sanheqiao West" Station 11; Route 111, traveling from "Forest Park" to "Juyuan West Station", passes through "Sanheqiao West" Station 12. Although both stations are named "Sanheqiao West", their locations are different. Therefore, "Sanheqiao West" Station 11 and "Sanheqiao West" Station 12 are two different bus stops.
[0049] Even if two bus stops have the same location and name, they are considered different bus stops if they belong to different bus routes. For example, both bus routes 111 and 122 pass by the "Sanheqiao West" stop, but they are two different bus stops because they belong to different bus routes.
[0050] 2) Bus stop bollards:
[0051] This specification's embodiments introduce the concept of a bus stop bollard. The bus stop bollard can be understood as a bus stop sign in the real world. A single bus stop sign can have multiple bus routes listed, but these different bus routes share the same stop name at the location of the bus stop sign. That is, a bus stop bollard can be linked to at least one bus stop, and these linked bus stops belong to different bus routes, and these linked bus stops share the same stop name.
[0052] Each bus stop bollard can also have corresponding bollard attributes, which may include, but are not limited to, the bollard name and the bollard location.
[0053] Please see Figure 2 The indication, Figure 2 The illustration shows a bus stop bollard. The attributes of the bus stop bollard may include: the name of the bus stop bollard and the location of the bus stop bollard. Figure 2 In the example, the bus stop marker is named "Sanhe Bridge West." Bus routes 111, 122, and 133 all pass through the "Sanhe Bridge West" bus stop, so these bus routes are all displayed on the bus stop marker. However, the bus stops belonging to different bus routes are different bus stops: "Sanhe Bridge West" for route 111, route 122, and route 133. In this example, the bus stop marker "Sanhe Bridge West" can be said to be bound to three bus stops, namely the "Sanhe Bridge West" bus stops included by routes 111, 122, and 133. Furthermore, these three bound bus stops share the same name, "Sanhe Bridge West," which is also the same as the marker's name.
[0054] 3) Bus route trajectory:
[0055] The bus route trajectory mentioned above refers to the travel trajectory of a bus route. For example, in the embodiments of this specification, the bus route trajectory can be the trajectory of a bus from the first stop to the last stop, or it can be the trajectory from the last stop to the first stop, or it can be a segment of the travel trajectory between the first and last stops.
[0056] In one example, see Figure 3 The indication, Figure 3 The diagram illustrates the route of bus line 111, which runs from its first stop, "Juyuan West Station," to "Forest Park," stopping at "Shangdi South Road," "Sanhe Bridge West," and "Linyu Station." Furthermore, if line 111 runs from its first stop, "Forest Park," to "Juyuan West Station," it follows a completely different route. This demonstrates that even for the same bus line, the routes differ depending on the direction.
[0057] The bus route trajectory is directional, and its direction is the direction in which the bus travels. For example, in Figure 3 The arrows in the diagram indicate the direction of travel for bus route 111.
[0058] 4) Direction vector:
[0059] In this embodiment, the direction vector can be understood as a vector used to represent direction, equivalent to a directed line segment. The direction vector can include two features: length and direction. In this embodiment, the direction vector can be a segment of the trajectory determined from the bus route trajectory mentioned above. For example, it can be a segment of the trajectory that is cut off from the bus route trajectory. Then, the length of the direction vector is the length of the segmented trajectory. The specific position of the bus route trajectory from which the segment is cut off will be described in detail in subsequent embodiments.
[0060] The direction of the aforementioned direction vector can be related to the direction of travel of the intercepted trajectory segment. For example, suppose the target bus stop is... Figure 1 The "Sanheqiao West" station is number 12, and it is assumed that the intercepted direction vector is... Figure 1 The trajectory shown in the image, then the direction of that direction vector is... Figure 1 The direction indicated by arrow 13, running from south to north (from bottom to top), is also the direction of travel on this route. That is, when bus route 111 reaches the "Sanheqiao West" stop (position 12), it travels in the direction indicated by arrow 13. Furthermore, it is assumed that the route of bus route 111 is not as shown... Figure 1 It doesn't appear as straight from bottom to top as it does, but rather slightly tilted, for example... Figure 1The direction indicated by the dashed line 14 in the diagram represents a segment of the trajectory used as the station direction vector. In this case, even if the actual trajectory is slightly inclined, its direction can be determined as the direction of arrow 13 from south to north. That is, the direction of the direction vector described in this embodiment is related to the travel direction of the segmented trajectory. Considering that the trajectory of a bus in practice is not strictly straight, as long as the deviation in the travel direction of the trajectory is not too large, for example... Figure 1 If the trajectory tilts within a certain angular deviation range as shown, the direction vector can be considered to be from south to north as indicated by arrow 13. This embodiment does not impose strict limitations on this.
[0061] Furthermore, the direction of the direction vector in the embodiments of this specification is only related to the direction of travel of the captured trajectory segment and is independent of other uncaptured bus route trajectories. For example, as Figure 1 As shown, for bus route 111 traveling from "Juyuan West Station" to "Forest Park," the entire route trajectory between its starting point "Juyuan West Station" and its destination "Forest Park" is non-linear and its direction changes; for example, one section runs from east to west, and another from south to north. However, the direction vector mentioned above in this embodiment corresponds to the direction of travel of the captured segment of the trajectory and is unrelated to the other uncaptured portions of the entire bus route trajectory.
[0062] Based on the above conceptual explanation, the bus data processing method of the embodiments in this specification will be further described. The bus data processing method of this embodiment aims to bind bus stops to bus stop markers, thus eliminating the need for frequent clustering of bus stops. New or changed bus stops can simply be bound to the corresponding bus stop markers, thereby enabling faster organization and maintenance of bus data.
[0063] Figure 4 This is a schematic flowchart illustrating a public transportation data processing method provided in an exemplary embodiment. The method can be executed by a processing device, which may be, for example, a server or a computer. Figure 4 As shown, the method may include the following processing:
[0064] In step 400, bus data to be processed is obtained, including: target bus stops to be processed and a set of candidate bus stops, the set of candidate bus stops including: at least one bus stop.
[0065] The target bus stop to be processed, for example, if a bus stop is to be bound to a bus stop, then the bus stop to be bound can be called the target bus stop.
[0066] The set of candidate bus stop markers may include at least one bus stop marker. In this embodiment, a bus stop marker will be selected from the set of candidate bus stop markers for binding to the target bus stop.
[0067] In this set of candidate bus stop markers, each bus stop marker is already bound to at least one bus stop, and the bound at least one bus stop has the same stop name. For example, the one mentioned above... Figure 2 As shown, a single bus stop marker is linked to multiple bus stops, all of which share the name "Sanheqiao West". Furthermore, the names of these linked bus stops are identical to the name of the bus stop marker itself. For example, if the bus stop marker's name is "Sanheqiao West", then all the bus stops linked to it also share the name "Sanheqiao West".
[0068] Furthermore, the names of all bus stop markers in the candidate marker set are identical to the name of the target bus stop to be bound. For example, if the target bus stop is named "Sanheqiao West," then all bus stop markers in the candidate marker set will also be named "Sanheqiao West," meaning the target bus stop will be bound to a bus stop marker with the same name. However, when there are multiple bus stop markers with the same name in the candidate marker set, this embodiment can select one bus stop marker to bind.
[0069] This embodiment does not limit the specific method of obtaining the bus data to be processed. For example, the server may select a set of candidate bus stops from the set of bus stops according to certain rules, or the server may directly receive the bus data to be processed, which may be calculated by other devices.
[0070] To better understand the aforementioned public transportation data, the following is an example of an application scenario:
[0071] For example, in this scenario, a new bus stop has been added for bus route 38. The name of this new bus stop is "Sanheqiao West," and the location of this new bus stop—"Sanheqiao West" for route 38—has also been obtained. Currently, there are two existing bus stop markers with the name "Sanheqiao West" in the bus database. However, it was found that the locations of these two bus stop markers do not overlap with the location of the newly added "Sanheqiao West" bus stop for route 38. The bus data processing method in this embodiment aims to bind the newly added "Sanheqiao West" bus stop for route 38 to one of the existing "Sanheqiao West" bus stop markers. In this scenario, the newly added "Sanheqiao West" bus stop for route 38 is the target bus stop to be processed, and the two bus stop markers with the name "Sanheqiao West" constitute the candidate bus stop set.
[0072] In step 402, a target trajectory segment is determined from the bus route trajectory passing through the target bus stop, and is used as the station direction vector of the target bus stop. The direction of the station direction vector is related to the travel direction of the target trajectory segment.
[0073] In this embodiment, when determining the station direction vector of the target bus stop, it can be obtained from the bus route trajectory of the bus line to which the target bus stop belongs. For example, assuming the target bus stop to be bound is bus stop 51 of bus route 111, the corresponding direction vector can be extracted from the bus route trajectory of bus route "111" to which the target bus stop 51 belongs. For example, based on the station location of the target bus stop 51, a segment of trajectory near the station location in the bus route trajectory of bus route 111 can be extracted as the station direction vector.
[0074] However, in practice, this can be expanded beyond simply extracting data from the route of bus line 111. For example, see... Figure 5 As shown, there may be multiple bus routes passing through the target bus stop. For example, there may be four bus routes that pass through the target bus stop. However, even if different bus routes have different routes, the routes of the buses near the target bus stop are still the same.
[0075] Please see Figure 5 The diagram illustrates the routes of three bus lines that pass through target bus stop 51. For example, bus route 521 (turning from east to north) is the route of bus line 111, bus route 522 (from south to north) is the route of bus line 122, and bus route 523 (from west to north) is the route of bus line 133. All of these routes pass through target bus stop 51. Although these routes are different, they all pass through target bus stop 51. Figure 5 In the interval Q, these trajectories can be considered to be the same, all moving from south to north.
[0076] Therefore, the purpose of this step is to obtain the station direction vector of the target bus stop. The direction of this station direction vector is related to the travel direction of the trajectory at the location of the target bus stop. As mentioned above, although the target bus stop to be bound is bus stop 51 of bus route 111, it is based on bus routes 122 and 133. Figure 5 The direction of travel of the trajectory in segment Q can also be obtained by deriving the direction vector from south to north, which is consistent with the direction obtained based on the trajectory of bus route 111 in segment Q. Therefore, the "bus route trajectory passing through the target bus stop" mentioned in this step can also be... Figure 5You can choose any bus route trajectory within the interval Q in the code. In practice, it can be done as follows: the location of the target bus stop to be bound is available. Based on this location, you can select a bus route trajectory that passes through the location from the database, such as the bus routes 122 and 133 mentioned above. Alternatively, you can directly retrieve the stored bus route trajectory of bus route 111 from the database. Or, if the database is not updated in time, you can retrieve bus route trajectories that have passed through the target bus stop collected in other ways. All of these are acceptable.
[0077] Furthermore, although bus stops in the real world are located on the side of the road, in order to facilitate the acquisition of direction vectors in the trajectory, the locations of bus stops have been adaptively processed in this embodiment, assuming that the locations of bus stops are on the bus route trajectory. For example... Figure 5 As shown, the target bus stop 51 is located on bus route trajectory 523 (assuming a bus route trajectory 523 within interval Q is selected). A segment of the trajectory is extracted from this bus route trajectory 523, and this segment is used as the station direction vector of the target bus stop. See [link / reference]. Figure 5 The station direction vector 53 is extracted from the data. The direction of this station direction vector 53 is the direction of travel of the bus route trajectory 523.
[0078] The step of determining the target trajectory segment from the bus route trajectory passing through the target bus stop in this step can be to extract a segment of the trajectory from the bus route trajectory, which is referred to as the target trajectory segment in this embodiment. This target trajectory segment can be used as the station direction vector of the target bus stop. For example, when extracting the target trajectory segment, it can be based on the station location of the target bus stop, such as extracting the target trajectory segment near the station location.
[0079] Furthermore, the direction of the station direction vector is related to the travel direction of the target trajectory segment. As mentioned earlier, this relationship with the travel direction of the target trajectory segment can be based on the direction of the bus's travel on the target trajectory segment. For example, for a bus traveling on a road from south to north, regardless of whether its actual trajectory is a straight line from due south to due north or slightly inclined, the direction of the direction vector can be determined to be from south to north. Alternatively, it can be understood as follows: in some cases, the direction of the road on which the bus is traveling can be referenced to a certain extent. If the bus's trajectory is on that road, then the direction of the direction vector obtained by extracting the target trajectory segment from the trajectory on that road is the direction of that road. For example... Figure 1As shown, the road is a north-south road, and the bus is traveling from south to north on the road. Therefore, when the target trajectory segment is located on this road, the direction vector determined based on the travel direction of the target trajectory segment is from south to north.
[0080] In step 404, for each bus stop bollard, a bollard trajectory segment is determined from the bus route trajectory passing through the bus stop bollard, which serves as the bollard direction vector of the bus stop bollard. The direction of the bollard direction vector is related to the travel direction of the bollard trajectory segment.
[0081] In this embodiment, at least one bus stop can be bound to a bus stop marker. The "bus route trajectory passing through the bus stop marker" mentioned here can be the trajectory of the bus route corresponding to one of the bus stops already bound to the bus stop marker. One bus stop corresponds to one bus route trajectory, and the bus route trajectory is the trajectory of the bus route corresponding to that bus stop. For example, in... Figure 2 In the example shown, a bus stop is bound to three bus stops, all named "Sanheqiao West," but belonging to bus routes 111, 122, and 133 respectively. For instance, the bus stop "Sanheqiao West" for route 122 can be selected, and the route trajectory of bus 122 can be considered the "bus route trajectory passing through the bus stop." Similarly, the bus stops "Sanheqiao West" for both route 111 and route 133 also correspond to a separate bus route trajectory—either route 111 or route 133.
[0082] The process of extracting the direction vector of the bus stop bollard is similar to that of extracting the direction vector of the target bus stop in step 402, and will not be described in detail here. It can be done by extracting a segment of the trajectory from the bus route passing through the bus stop bollard; in this embodiment, this is referred to as the bollard trajectory segment, and this bollard trajectory segment is used as the bollard direction vector. Furthermore, it should be noted that when determining the bollard trajectory segment from the bus route trajectory passing through the bus stop bollard as the bollard direction vector, since a bus stop bollard can be bound to at least one bus stop, and each bus stop can correspond to the trajectory of the bus route to which that bus stop belongs, specifically, a bus route trajectory can be determined from the trajectory of the bus route corresponding to the at least one bus stop bound to the bus stop bollard, and the bollard trajectory segment can be determined from this trajectory as the bollard direction vector corresponding to the bus stop bollard. The process of determining the station trajectory segment from the bus route trajectory can be either by obtaining a segment of trajectory from the bus route trajectory corresponding to any bus stop bound to the bus station, or by comparing and filtering the segments of trajectory obtained from the bus route trajectories corresponding to each bus stop bound to the bus station. The specific process will be detailed in subsequent embodiments.
[0083] For example, in one approach, a segment of the route trajectory of bus route 122 corresponding to the bus stop bound to the bus stop can be extracted as the bus stop trajectory segment, which serves as the bus stop direction vector. The direction of this bus stop direction vector is related to the travel direction of the bus stop trajectory segment. The reasoning behind this relationship between the direction of the bus stop direction vector and the travel direction of the bus stop trajectory segment is similar to the aforementioned relationship between the direction of the station direction vector and the travel direction of the target trajectory segment, and will not be elaborated further.
[0084] In step 406, if the directional difference between the direction vector of the bollard and the direction vector of the station meets the directional difference condition, then the bus stop bollard corresponding to the direction vector of the bollard is taken as the target bus stop bollard, so as to bind the target bus stop to the target bus stop bollard.
[0085] In this step, after determining the direction vector of the bus stop and the direction vector of the bus station, the directional difference between these two direction vectors is compared. If the directional difference between the direction vector of the bus stop and the direction vector of the bus station meets the directional difference condition, then the bus stop corresponding to the direction vector of the bus stop can be used as the target bus stop to be bound to the target bus station.
[0086] The determination of the directional difference between the pile direction vector and the site direction vector can be achieved using various methods, and this embodiment does not impose any limitations. For example, it may include, but is not limited to, the following determination methods:
[0087] In one example, the angle between the direction vector of the stake and the direction vector of the station can be calculated, and the magnitude of the directional difference between the two can be determined by the size of this angle. For instance, if the angle between the two direction vectors is less than a preset angle threshold, the directional difference can be considered to meet the directional difference condition.
[0088] In another example, cosine similarity can also be used to measure the directional difference between two direction vectors. The magnitude of the cosine similarity value measures the magnitude of the directional difference between the stake direction vector and the site direction vector.
[0089] In another example, the directional difference between two direction vectors can be determined by comparing the difference in the angles between each vector and a reference vector. For instance, the angles between the stake direction vector and the station direction vector and the positive x-axis in the two-dimensional coordinate system can be calculated separately, and the difference between these angles can be calculated. If the difference is less than a corresponding threshold, then the directional difference between the stake direction vector and the station direction vector can be considered to meet the directional difference condition.
[0090] In another example, when there are multiple bus stop markers in the candidate marker set, the marker direction vector of each bus stop can be compared with the station direction vector of the target bus stop. For example, the angle between the marker direction vector of each bus stop and the station direction vector of the target bus stop can be calculated, and the direction difference between the marker direction vector with the smallest angle and the station direction vector is considered to meet the direction difference condition.
[0091] After identifying the target bus stop marker, the target bus stop can be bound to it. Binding the target bus stop to the target bus stop marker can be understood as adding the target bus stop to the bus stop sign. For example, if a bus stop marker named "Sanheqiao West" is selected as the target bus stop marker, and bus routes 111, 122, and 133 are already bound to it, then by executing the method in this embodiment, bus route 38 can be added to the target bus stop marker, because bus route 38 also adds a "Sanheqiao West" stop.
[0092] After binding the target bus stop to the target bus stop marker, when using bus data to provide related services, the location of the target bus stop will be updated to the location of the target bus stop marker. This location can be used to provide services such as bus route station queries and bus transfer route calculations.
[0093] The bus data processing method in this embodiment compares the station direction vector and the station marker direction vector. When the directional difference between the station marker direction vector and the station direction vector meets the directional difference condition, the bus marker corresponding to the station marker direction vector is taken as the target bus marker to be bound. This allows the updated bus station to be bound to the bus marker simply by executing this method when a bus station is updated, making it fast and simple and improving the efficiency of organizing and maintaining bus data. Furthermore, because this method compares the directional difference between the station marker direction vector and the station direction vector, it can obtain station markers with the same direction as the target bus station to be bound, making the determined bus markers to be bound more accurate and improving the accuracy of station binding to station markers.
[0094] Figure 6 This is a flowchart illustrating a public transportation data processing method provided in an exemplary embodiment. Figure 7 yes Figure 6 The corresponding application scenario diagrams are shown below. Figure 6 and Figure 7 , described in Figure 7 This example demonstrates how to use the public transport data processing method to bind bus stops in an exemplary scenario. In this embodiment, during the process of determining the direction vector of the bus stop marker, one stop can be randomly selected from the bus stops bound to the bus stop marker, and the direction vector of the bus stop marker can be determined from the bus route trajectory corresponding to that stop. Detailed procedures are described below:
[0095] In step 600, the bus data to be processed is obtained.
[0096] For example, a new bus stop, "Sanheqiao West," has been added to bus route 38. In this embodiment, the newly added stop needs to be bound to an existing bus stop marker. In this example, the newly added bus stop "Sanheqiao West" can be considered the target bus stop to be processed. The name of this target bus stop is "Sanheqiao West," and its location can also be obtained, such as... Figure 7 The target bus stop 71 is shown in the image.
[0097] In this step, the geographical area of the target bus stop 71 can be determined based on its location. For example, this geographical area could be the city where the target bus stop is located. Alternatively, it could be a specific administrative district within the city where the target bus stop is located, and the target bus stop could be situated within that administrative district.
[0098] Taking the aforementioned area as the city where the target bus stop is located as an example, based on the name of the target bus stop 71, a search can be conducted within the city for bus stop names that match the name of the target bus stop 71, "Sanheqiao West". In this embodiment, two bus stop names may be found, such as... Figure 7 The bus stop bollards 72 and 73 shown in the diagram both have the name "Sanhe Bridge West" and can be used as alternative bollard sets.
[0099] In the subsequent steps, one bus stop will be selected from the above-mentioned set of alternative bus stop stops 72 and 73 as the target bus stop to be bound.
[0100] In step 602, a target trajectory segment is determined from the bus route trajectory passing through the target bus stop, and used as the station direction vector of the target bus stop.
[0101] Please see Figure 7 As illustrated, based on the location of the target bus stop 71, the trajectory of bus routes passing through that stop can be obtained, and any bus route passing through the target bus stop 71 can be selected, for example... Figure 7 The bus route trajectory S1 shown is used as an example. A target trajectory segment is determined from the obtained bus route trajectory, and this target trajectory segment is used as the station direction vector of the target bus stop.
[0102] In this embodiment, as described above, the extraction of the target trajectory segment can be based on the location of the target bus stop. For example, a segment can be extracted near the location of the target bus stop. This extracted trajectory may or may not include the location of the target bus stop.
[0103] Combination Figure 7 Here's an example of how to extract a target trajectory segment: A straight-line trajectory interval containing the location of the target bus stop 71 can be determined; this interval can be called the initial route trajectory. For example, Figure 7 The bus route trajectory S1 shown in the figure can be called the initial route trajectory.
[0104] In some cases, the trajectory of any bus route 71 that passes the target bus stop is not always a straight line. For example, please refer to [link to relevant documentation]. Figure 8A As shown, the bus route S2 that passes through the target bus stop 81 is a trajectory that turns from east to north, not like... Figure 7That would be a straight line. In this case, an initial route trajectory is determined from the bus route trajectory S2. This initial route trajectory is the straight-line trajectory interval where the target bus stop 81 is located. As you can see, that initial route trajectory interval includes the target bus stop 81, and the trajectory direction remains unchanged. However, the trajectory interval S3 is not considered as the initial route trajectory because the direction of this segment (east-west) has changed compared to the direction (north-south) of the trajectory where the target bus stop 81 is located.
[0105] Then, still return to Figure 7 After determining that the bus route trajectory S1 can be used as the initial route trajectory, a segment can be extracted from the initial route trajectory as the target trajectory segment. This target trajectory segment serves as the station direction vector for the target bus stop. For example, Figure 7 The station direction vectors are shown in the diagram. It is understood that the location where the target trajectory segment is intercepted is not limited to... Figure 7 The location shown can be any segment of the initial route trajectory described above. For example, a segment of the trajectory 20 meters to the left of the target bus stop 71 can also be used as the station direction vector.
[0106] As mentioned above, when extracting the station direction vector from the trajectory, the reason for extracting a segment of the initial route trajectory is that this initial route trajectory is a straight-line trajectory interval that includes the target bus stop, and its direction remains unchanged. The direction of this segment of trajectory can reflect the trajectory direction at the location of the target bus stop. Of course, it can be understood that the straight-line trajectory interval with unchanged direction mentioned here includes the previously mentioned situation where the direction of the actual driving trajectory is allowed to move within a certain angular deviation range. For example... Figure 8A The trajectory interval S3 shown in the figure has a different direction from the trajectory direction at the location of the target bus stop. If the trajectory is cut off from this section, it will not accurately reflect the trajectory direction at the location of the target bus stop.
[0107] In addition, Figure 7 In the example, the station direction vector of the target bus stop 71 can be a segment of the target trajectory containing the location of the target bus stop 71. The target trajectory segment can be obtained in the following way: for example, based on the station location of the target bus stop 71, it can be extended to the left and right sides of the station location along the bus driving trajectory of the target bus stop until the length of the extended trajectory reaches a preset length threshold.
[0108] For details, please see Figure 8BAs shown, assuming the length threshold is 20m, we can first extend 2m to the left and 2m to the right based on the station location, for a total length of 4m, which is less than the 20m length threshold. Then, we continue to extend to the left and right, checking whether the length threshold has been reached as we extend. If the length threshold has not been reached, we continue to extend gradually until the length threshold is reached, at which point we stop extending and obtain the intercepted target trajectory segment, which serves as the station direction vector.
[0109] The above method of trajectory extraction is relatively simple to implement and can ensure that the extracted trajectory is the shortest segment closest to the target bus stop, thus more accurately reflecting the trajectory direction at the target bus stop's location. This is understandable. Figure 8B The 20m length threshold shown is just an example; in actual implementation, it is not limited to this and can be set to other values. Furthermore, this method of gradually expanding to both sides is also an exemplary approach; other interception methods can also be adopted. For example, the trajectory of the target bus stop can be intercepted for 10m to the left or right. The specific interception method or the interception length threshold can be determined based on the actual road conditions.
[0110] Similarly, the directional vectors shown in the embodiments of this specification are merely illustrative and not restrictive.
[0111] In step 604, for each bus stop bollard, one bus stop is randomly selected from at least one bus stop bound to the bus stop bollard, the bus route corresponding to the randomly selected bus stop is obtained, and based on the location of the randomly selected bus stop, a bus route trajectory is determined from the trajectory corresponding to the bus route, and the corresponding target trajectory segment is determined from the trajectory as the bollard trajectory segment of the bus stop bollard, and the bollard trajectory segment is used as the bollard direction vector of the bus stop bollard.
[0112] For example, with Figure 7 Taking bus stop 72 as an example, the name of the bus stop is "Sanheqiao West". Assuming that bus stop 72 has been bound to the "Sanheqiao West" stop of bus routes 721, 722 and 723, you can choose any one of the bus stops. For example, you can choose the "Sanheqiao West" stop of bus route 722.
[0113] Please continue reading Figure 7 As shown, based on the selected bus stops mentioned above, the corresponding bus route, namely Route 722, can be obtained, and the route trajectory of Route 722 can be retrieved. Figure 7 The bus route trajectory S1 in the diagram is the bus route trajectory that passes through bus stop 72.
[0114] In this embodiment, a bus route trajectory can be determined from the bus route trajectory S1 of bus route 722 based on the location of the "Sanheqiao West" stop. For example, since the "Sanheqiao West" stop of bus route 722 is attached to bus stop 72, the location of the "Sanheqiao West" stop of bus route 722 is the same as the location of the bus stop 72. Based on the location of the bus stop 72, a section of trajectory near the bus stop 72 can be determined first, for example, see [reference needed]. Figure 7 The example shown illustrates a defined trajectory that includes bus stop bollards 72. A further segment of the target trajectory can be extracted from this trajectory, for example... Figure 7 The target trajectory segment 74 in the diagram can be referred to as the bus stop trajectory segment, serving as the direction vector corresponding to the bus stop 72. The position of this bus stop trajectory segment is within the straight-line trajectory interval where the bus stop 72 is located, i.e., as described above. Figure 7 The example shown is a defined trajectory whose direction remains unchanged. Figure 7 This only illustrates one interception location; the location of the bus stop trajectory segment can also be intercepted at other locations, and this embodiment does not impose any restrictions on this. The direction of the bus stop direction vector of the bus stop 72 is the travel direction of the bus route trajectory S1 "from east to west".
[0115] Following the same method described above, any bus stop can be selected from those bound to the bus stop 73. Based on the location of the selected bus stop, the corresponding bus stop trajectory segment is determined from the trajectory of the bus route to which the stop belongs. This segment serves as the bus stop direction vector for the bus stop 73. The direction of this bus stop direction vector is the travel direction of the bus route trajectory, "from west to east". The method for determining the bus stop direction vector for the bus stop 73 is described in the aforementioned embodiment and will not be repeated here.
[0116] In step 606, the azimuth angle of the pile direction vector and the azimuth angle of the station direction vector are calculated respectively.
[0117] After determining the direction vector of the bollard and the direction vector of the station in the above steps, the next step is to compare the direction difference between the direction vector of the target bus station and the direction vector of the bollard.
[0118] In this step, the station direction vector and the azimuth angle of each station pile direction vector can be calculated separately.
[0119] For example, the positive X-axis in a Cartesian coordinate system can be used as a reference vector, and the angle between the station direction vector and the reference vector can be calculated as the station azimuth angle corresponding to the station direction vector. Similarly, the angle between the station direction vector and the reference vector can be calculated as the station azimuth angle corresponding to the station direction vector.
[0120] exist Figure 7 For an example that illustrates this, please refer to Figure 7 As illustrated in the diagram, the angle between the direction vector of target bus stop 71 and the reference vector is 180 degrees. Similarly, the angle between the direction vector of bus stop 72 and the reference vector is also 180 degrees. However, the angle between the direction vector of bus stop 73 and the reference vector is 0 degrees.
[0121] In step 608, the azimuth difference between the azimuth of any bus stop bollard and the azimuth of the station is calculated to obtain the azimuth difference corresponding to each bus stop bollard.
[0122] As calculated above, the azimuth angle of the target bus stop 71 is 180 degrees, and the azimuth angle of the bus stop 72 is also 180 degrees. Therefore, the azimuth angle difference between the azimuth angle of the bus stop 72 and the azimuth angle of the target bus stop 71 is 0 degrees.
[0123] Similarly, if the azimuth angle of bus stop 73 is 0 degrees, then the azimuth angle difference between the azimuth angle of bus stop 73 and the azimuth angle of the target bus stop 71 is 180 degrees.
[0124] In step 610, the bus stop with the smallest azimuth difference is selected from the multiple bus stop piles included in the candidate bus stop set as the target bus stop pile.
[0125] In this step, the bus stop stake with the smallest azimuth difference can be selected as the target bus stop stake.
[0126] For example, the azimuth difference between bus stop 72 and the target bus stop 71 is 0 degrees, and the azimuth difference between bus stop 73 and the target bus stop 71 is 180 degrees. Since 0 degrees is less than 180 degrees, bus stop 72 is taken as the target bus stop.
[0127] Once the target bus stop is identified, it can be bound to that bus stop. For example, in this embodiment, the target bus stop 71 can be bound to the bus stop 72. This can be understood as adding a new bus stop to the bus stop 72, namely the bus stop "Sanheqiao West" for bus route 38.
[0128] Furthermore, as mentioned above, when there are multiple bus stop stakes in the candidate stakes set, the bus stop stake with the smallest azimuth difference can be selected as the target bus stop stake from among the multiple bus stop stakes included in the candidate stakes set.
[0129] If there is only one bus stop in the candidate set, the same method is used to calculate the azimuth of that bus stop and compare it with the azimuth of the target bus stop. However, in this case, a threshold value can be set for the azimuth difference. If the azimuth difference between the bus stop and the target bus stop is within this threshold, the directional difference is considered to meet the directional difference condition, and the bus stop is confirmed as a target bus stop that can be bound. If the azimuth difference is greater than the threshold value, for example, greater than 50 degrees, the two cannot be bound or the process should proceed to manual verification.
[0130] The public transport data processing method in this embodiment compares the station direction vector and the bus stop direction vector, and binds the target bus station to the target bus stop. This allows for quick and simple processing when bus station updates occur; simply executing this method binds the updated bus station to the bus stop, improving the efficiency of organizing and maintaining public transport data. Furthermore, this method can select a station from those already bound to the bus stop, and obtain the bus stop direction vector by extracting the trajectory of the bus route to that station, resulting in a simple and efficient implementation.
[0131] As described in the previous embodiment, determining the direction vector of each bus stop bollard involves obtaining the bus routes corresponding to at least one bus stop bound to the bus stop bollard, determining a bus route trajectory from the trajectories of these bus routes, and then determining the bollard trajectory segment from the determined bus route trajectory as the direction vector corresponding to the bus stop bollard. For example, in Figure 6 In the illustrated embodiment, when extracting the trajectory segment of the bus stop as the direction vector, it is within the straight-line trajectory interval where the bus stop position is located. That is, it is a trajectory segment determined based on the position of the bus stop, such as extracting a segment of the bus stop trajectory near the position of the bus stop. Figure 7 As shown, based on the position of bus stop 73, a segment of the bus stop trajectory including the position of bus stop 73 is extracted as the direction vector of the bus stop; or based on the position of bus stop 72, a segment of the bus stop trajectory near the position of bus stop 72 is extracted as the direction vector of the bus stop.
[0132] This specification also provides a solution through its embodiments. Figure 9 This is a flowchart illustrating a public transportation data processing method provided in an exemplary embodiment. In this example, it is related to... Figure 6The difference between this example and the previous one lies in the method of determining the direction vector of the bus stop; the location of the intercepted bus stop trajectory segment is different. In this embodiment, the direction vector of the bus stop is no longer determined based on the trajectory of any randomly selected bus stop corresponding to a route. Instead, it involves comparing the trajectories of different routes corresponding to different stops, ultimately selecting the most suitable trajectory to determine the direction vector. This method will be described below; steps identical to those in the previous embodiment will not be detailed again. Figure 9 As shown, the method may include the following processing:
[0133] In step 900, the bus data to be processed is obtained.
[0134] Please see Figure 10 The indication, Figure 10 yes Figure 9 Corresponding application scenarios.
[0135] In this embodiment, a new target bus stop 91 for bus route 48 is added, and the set of candidate bus stops includes two bus stops: bus stop 92 and bus stop 93.
[0136] In the subsequent steps, one bus stop will be selected from the above-mentioned set of alternative bus stop stops 92 and 93 as the target bus stop to be bound.
[0137] In step 902, a target trajectory segment is extracted from the bus route trajectory passing through the target bus stop and used as the station direction vector of the target bus stop.
[0138] Please see Figure 9 As illustrated, any bus route trajectory that passes through the target bus stop 91 can be selected, and based on the location of the target bus stop 91, a segment of the trajectory is extracted from the straight line trajectory interval where the location of the target bus stop 91 is located, to obtain the station direction vector.
[0139] In step 904, for each bus stop bollard, for any bus stop bound to that bollard, the bus route corresponding to that stop is obtained. Based on the location of the target bus stop, a bus route trajectory is determined from the bus route trajectories as a candidate bus route trajectory. Candidate trajectory segments corresponding to each candidate bus route trajectory are obtained. Based on the direction of the candidate direction vector corresponding to each candidate trajectory segment, the candidate trajectory segment whose direction is closest to the station direction vector is selected as the target trajectory segment. This target trajectory segment is used as the bollard trajectory segment corresponding to the target bollard. The direction of this candidate direction vector is related to the travel direction of the candidate trajectory segment.
[0140] In this embodiment, the direction vector of the bus stop bollard can be determined as follows:
[0141] First, a bus stop marker is bound to multiple bus stops. For each bus stop, the trajectory of the corresponding bus route can be obtained. Taking any one of the bus route trajectories as an example, in this embodiment, a bus route trajectory can be determined from the trajectory based on the location of the target bus stop as a candidate bus route trajectory. For instance, a trajectory that is relatively close to the location of the target bus stop can be determined from the bus route trajectory as a candidate bus route trajectory.
[0142] Can be combined Figure 10 To understand: Figure 10 The diagram illustrates the trajectory S4 of one of the bus routes passing through bus stop 92. This bus route trajectory S4 can be the trajectory of a bus route corresponding to one of the bus stops already bound to bus stop 92. In this embodiment, unlike... Figure 6 In the illustrated embodiment, a trajectory for capturing the target trajectory segment is determined based on the location of bus stop markers. In this embodiment, a bus route trajectory is determined based on the location of the target bus stop 91 for subsequent capture of the target trajectory segment. This can be understood as selecting a trajectory that is closer to the target bus stop 91.
[0143] like Figure 10 As shown, based on the location of the target bus stop 91, a trajectory can be determined from the bus route trajectory S4. (See...) Figure 10 The example shown depicts a trajectory to the left of the target bus stop 91. Compared to the original bus stop marker 92, this trajectory is closer to the target bus stop 91 and can be referred to as the alternative bus route trajectory. Next, a segment of this alternative trajectory can be extracted, with the travel direction from south to north. It can be seen that the travel direction of this alternative trajectory segment is quite close to the direction vector of the target bus stop 91, which also travels from south to north.
[0144] However, if according to Figure 6 The example shown will be in the way that... Figure 10 The bus route trajectory S4 shown is included in the trajectory interval S5. The trajectory interval S5 is the straight trajectory interval where the bus stop 92 is located. However, the travel direction of this trajectory interval (from east to west) is quite different from the direction of the station direction vector of the target bus stop 91 (from south to north). In some cases, the selection of the target bus stop may be incorrect. Therefore, this embodiment is changed to select an alternative trajectory segment based on the station location of the target bus stop.
[0145] As described above, for each bus stop bound to a bus stop marker, alternative bus route trajectories and alternative trajectory segments can be determined from the trajectory of the bus route corresponding to that bus stop in the manner described above.
[0146] After determining the candidate trajectory segments corresponding to each bus stop, the candidate trajectory segment whose direction is closest to the station direction vector can be selected as the target trajectory segment based on the direction of the candidate direction vector corresponding to each candidate trajectory segment. The target trajectory segment is then used as the station trajectory segment corresponding to the target bus stop, and the station trajectory segment is used as the station direction vector corresponding to the bus stop. The direction of the candidate direction vector is related to the driving direction of the candidate trajectory segment.
[0147] For example, taking bus stop 92 as an example, suppose it is bound to three bus stops: bus stop Z1, bus stop Z2, and bus stop Z3. For bus stop Z1, a candidate trajectory segment is determined from the trajectory of the bus route corresponding to Z1. The candidate direction vector corresponding to this candidate trajectory segment is Q1. The direction of the candidate direction vector Q1 is related to the travel direction of the candidate trajectory segment. The explanation of this direction relationship can be found in the embodiments described earlier in this specification, and will not be elaborated further. Similarly, a candidate trajectory segment can be determined from the trajectory of the bus route corresponding to bus stop Z2, resulting in a candidate direction vector Q2. Likewise, a candidate trajectory segment can be determined from the trajectory of the bus route corresponding to bus stop Z3, resulting in a candidate direction vector Q3. Then, based on the directions of these three candidate direction vectors, it can be determined which candidate direction vector is closest to the direction of the target bus stop's station direction vector. The candidate trajectory segment closest to the station direction vector is then taken as the target trajectory segment, and this target trajectory segment is taken as the station trajectory segment corresponding to the target bus stop.
[0148] One comparison method is as follows: For example, the angle between each candidate direction vector and the reference vector can be calculated separately, the angle between the target bus stop's direction vector and the reference vector can be calculated, and the difference in azimuth angle between each candidate direction vector and the target bus stop's direction vector can be calculated. The candidate trajectory segment corresponding to the candidate direction vector with the smallest azimuth angle difference is determined as the target trajectory segment, and this target trajectory segment is used as the bus stop trajectory segment. The bus stop trajectory segment is used as the bus stop direction vector corresponding to the target bus stop. For example, in this example, the finally determined bus stop direction vector of bus stop 92 is... Figure 10 The alternative trajectory segments determined from bus route trajectory S4 are shown in the figure.
[0149] In the same way, the direction vector of bus stop bollard 93 can be obtained, such as... Figure 10As shown, a trajectory was obtained on the right side of bus stop 93. This trajectory can be the trajectory segment of the bus stop obtained from the bus route trajectory corresponding to each bus stop bound to bus stop 93, and used as the direction vector of bus stop 93. For the specific method, please refer to the aforementioned process of determining the direction vector of bus stop 92, which will not be described in detail here.
[0150] In step 906, the azimuth angle of the pile direction vector and the azimuth angle of the station direction vector are calculated respectively.
[0151] After determining the direction vector of the bollard and the direction vector of the station in the above steps, the next step is to compare the direction difference between the direction vector of the target bus station and the direction vector of the bollard.
[0152] In this step, the station direction vector and the azimuth angle of each station pile direction vector can be calculated separately.
[0153] For example, the positive X-axis in a Cartesian coordinate system can be used as a reference vector, and the angle between the station direction vector and the reference vector can be calculated as the station azimuth angle corresponding to the station direction vector. Similarly, the angle between the station direction vector and the reference vector can be calculated as the station azimuth angle corresponding to the station direction vector.
[0154] exist Figure 10 For an example that illustrates this, please refer to Figure 10 As illustrated, the angle between the direction vector of target bus stop 91 and the reference vector is 90 degrees. Similarly, the angle between the direction vector of bus stop 92 and the reference vector is also 90 degrees. However, the angle between the direction vector of bus stop 93 and the reference vector is 0 degrees.
[0155] In step 908, the azimuth difference between the azimuth angle of any bus stop bollard and the azimuth angle of the station is calculated.
[0156] As calculated above, the azimuth of the target bus stop 91 is 90 degrees, and the azimuth of the bus stop stake 92 is also 90 degrees. Therefore, the azimuth difference between the azimuth of the bus stop stake 92 and the azimuth of the target bus stop 91 is 0 degrees.
[0157] Similarly, if the azimuth angle of bus stop 93 is 0 degrees, then the azimuth angle difference between bus stop 93 and the target bus stop 91 is 90 degrees. Since 0 degrees is less than 90 degrees, bus stop 92 is taken as the target bus stop. It can be assumed that the direction vector of bus stop 92 is in the same direction as the direction vector of target bus stop 91.
[0158] Once the target bus stop is identified, it can be bound to that bus stop. For example, in this embodiment, the target bus stop 91 can be bound to bus stop 92.
[0159] The public transport data processing method in this embodiment compares the station direction vector and the bus stop direction vector, and binds the target bus station to the target bus stop. This allows for quick and simple processing when bus stations are updated, simply binding the updated bus station to the bus stop by executing this method, thus improving the efficiency of organizing and maintaining public transport data. Furthermore, when determining the bus stop direction vector, this embodiment selects the candidate trajectory segment whose direction vector is closest to the station direction vector from the trajectories of the bus routes corresponding to each bound bus station. This method makes the selection of the target bus stop more accurate.
[0160] Combined as follows Figure 11 Describe another application scenario, Figure 11 This is a schematic diagram illustrating a scenario of a public transportation data processing method provided in an exemplary embodiment. In this example, the method can still be implemented using... Figure 9 The method shown is used to determine the direction vector of the stake.
[0161] like Figure 11 As shown, the target bus stop 1101 is located on the south side of the intersection. The candidate bus stop set includes two bus stop stakes, namely bus stop stake 1102 and bus stop stake 1103. According to the aforementioned method, the target trajectory segment can be determined from the bus route trajectory passing through the target bus stop 1101, and then the station direction vector corresponding to the target bus stop 1101 can be obtained.
[0162] Furthermore, in one example, according to the method of the aforementioned embodiment, corresponding candidate trajectory segments can be obtained from the trajectories of each bus route passing through bus stop 1102. Then, based on the direction of the candidate direction vector corresponding to each candidate trajectory segment, the direction of the candidate direction vector is compared to the direction of the station direction vector corresponding to the target bus stop 1101. The candidate trajectory segment corresponding to the candidate direction vector is then confirmed as the target trajectory segment, and this target trajectory segment is used as the bus stop trajectory segment, thereby obtaining the bus stop direction vector. Thus, Figure 11 The system obtains candidate trajectory segments that are closest to the target bus stop 1101 from the bus route trajectories passing through bus stop 1102. After comparison using the aforementioned method, the station direction vector corresponding to bus stop 1102 is obtained. Similarly, from the bus route trajectories passing through bus stop 1103, the candidate trajectory segment whose direction is closest to the station direction vector of the target bus stop 1101 is selected, thus obtaining the station direction vector corresponding to bus stop 1103.
[0163] like Figure 11 As shown, the angles between each direction vector and the reference vector are calculated separately to obtain the azimuth angles. The azimuth angle of the direction vector corresponding to the target bus stop 1101 is 90 degrees, the azimuth angle of the direction vector of the bus stop 1102 is also 90 degrees, and the azimuth angle of the direction vector corresponding to the bus stop 1103 is 30 degrees. Therefore, the azimuth angle difference between bus stop 1102 and the target bus stop 1101 is 0 degrees, and the azimuth angle difference between bus stop 1103 and the target bus stop 1101 is 55 degrees. Since 0 degrees is less than 55 degrees, bus stop 1102 is selected as the target bus stop.
[0164] Furthermore, as mentioned above, Figure 6 The example method (tentatively referred to as the first method) and Figure 9 The example method (tentatively referred to as the second method) differs in that the method of determining the direction vector of the bus stop is different. However, compared to the first method, the efficiency and accuracy are both higher. The second method further improves the accuracy based on the first method, that is, the selected target bus stop is more accurate and more in line with the actual situation, but the efficiency is lower than that of the first method.
[0165] In practical implementation, to balance efficiency and accuracy, the first method can be used to select and determine the target bus stop. When using the first method, the direction vectors of the target bus stop and the target bus stop marker are compared. Specifically, this involves obtaining the azimuth difference between the azimuth of the station direction vector and the azimuth of the marker (this azimuth difference is the difference in direction between the two vectors). If this azimuth difference reaches a preset threshold, for example, if the azimuth difference between the target bus stop direction vector and the target bus stop marker is 50 degrees, even though the azimuth difference of the target bus stop marker is the smallest among the multiple candidate bus stop markers, it still reaches the threshold. Therefore, the second method can be used to calculate again to obtain a more reliable and accurate target bus stop marker.
[0166] In this way, since the first method is used first, which can accurately solve the problem of pile selection in most application scenarios, it ensures high calculation efficiency. At the same time, when the calculation result of the first method reaches the difference threshold, the second method is used to continue the calculation, which can ensure a high accuracy rate, thus balancing efficiency and accuracy.
[0167] Furthermore, the bus data processing method provided in the embodiments of this specification can also be applied to other scenarios such as determining the direction of travel. For example, suppose that for a certain bus route, data from two different data sources are obtained, and the trajectory data from these two data sources differ. By comparing the direction vectors at the same position on the two bus routes, if the difference in the direction vectors is small, they can be considered to be the same trajectory.
[0168] Figure 12 This is a schematic diagram of the structure of a public transportation data processing device provided in an exemplary embodiment, which can be applied to perform the method of any embodiment of this specification. Figure 12 As shown, the device may include: a data acquisition module 1201, a site vector determination module 1202, a site stake vector determination module 1203, and a site stake selection module 1204.
[0169] The data acquisition module 1201 is used to acquire bus data to be processed. The bus data includes: the target bus stop to be processed and a set of alternative bus stops. The set of alternative bus stops includes: at least one bus stop; each bus stop is bound to at least one bus stop, and the at least one bound bus stop has the same stop name; the stop name is the same as the stop name of the bus stop, and the stop name of the bus stop is also the same as the stop name of the target bus stop.
[0170] The station vector determination module 1202 is used to determine a target trajectory segment from the bus route trajectory passing through the target bus station, as the station direction vector of the target bus station, wherein the direction of the station direction vector is related to the travel direction of the target trajectory segment.
[0171] The bus stop vector determination module 1203 is used to determine a bus stop trajectory segment from the bus route trajectory passing through the bus stop for each bus stop, as the bus stop direction vector of the bus stop, and the direction of the bus stop direction vector is related to the driving direction of the bus stop trajectory segment.
[0172] The bus stop selection module 1204 is used to select the bus stop corresponding to the direction vector of the bus stop as the target bus stop if the directional difference between the direction vector of the bus stop and the direction vector of the station meets the directional difference condition, so as to bind the target bus stop to the target bus stop.
[0173] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0174] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0175] like Figure 13 As shown, Figure 13 This diagram illustrates a hardware structure of an electronic device containing a public transport data processing device according to an embodiment of this specification. The device may include a processor 1310, a memory 1320, an input / output interface 1330, a communication interface 1340, and a bus 1350. The processor 1310, memory 1320, input / output interface 1330, and communication interface 1340 are internally connected to each other via the bus 1350.
[0176] The processor 1310 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification. The processor implements the above-described methods by running executable instructions.
[0177] The memory 1320 for storing processor-executable instructions can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1320 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1320.
[0178] The input / output interface 1330 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0179] The communication interface 1340 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0180] Bus 1350 includes a pathway for transmitting information between various components of the device, such as processor 1310, memory 1320, input / output interface 1330, and communication interface 1340.
[0181] It should be noted that although the above-described device only shows the processor 1310, memory 1320, input / output interface 1330, communication interface 1340, and bus 1350, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0182] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described bus data processing method.
[0183] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0184] This specification also provides a computer program that, when run, is used to implement the above-described bus data processing method.
[0185] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0186] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0187] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0188] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.
Claims
1. A method for processing public transportation data, characterized in that, The method includes: Obtain bus data to be processed, the bus data including: target bus stops to be processed, and a set of alternative bus stops, the set of alternative bus stops including: at least one bus stop; each bus stop is bound to at least one bus stop, and the at least one bound bus stop has the same stop name, the stop name is the same as the stop name of the bus stop, and the stop name of the bus stop is also the same as the stop name of the target bus stop; A target trajectory segment is determined from the bus route trajectory passing through the target bus stop, and is used as the station direction vector of the target bus stop. The direction of the station direction vector is related to the travel direction of the target trajectory segment. For each bus stop bollard, a bollard trajectory segment is determined from the bus route trajectory passing through the bus stop bollard, which serves as the bollard direction vector of the bus stop bollard. The direction of the bollard direction vector is related to the travel direction of the bollard trajectory segment. If the directional difference between the direction vector of the bus stop and the direction vector of the bus station meets the directional difference condition, then the bus stop corresponding to the direction vector of the bus stop is taken as the target bus stop, so as to bind the target bus station to the target bus stop.
2. The method according to claim 1, characterized in that, The acquisition of the bus data to be processed includes: Based on the location of the target bus stop, the area where the target bus stop is located is determined; Based on the name of the target bus stop, at least one bus stop with the same name as the target bus stop is searched within the area and selected as the candidate bus stop set.
3. The method according to claim 1, characterized in that, The step of determining the target trajectory segment from the bus route trajectory passing through the target bus stop, as the station direction vector of the target bus stop, includes: Based on the location of the target bus stop, the trajectory of the bus route passing through the location of the bus stop is obtained, and the target trajectory segment is determined in the obtained bus route trajectory. The target trajectory segment is used as the station direction vector of the target bus stop.
4. The method according to claim 1, characterized in that, The step of determining the bus stop trajectory segment from the bus route trajectory passing through the bus stop as the bus stop direction vector includes: Obtain the bus route corresponding to at least one bus stop bound to the bus stop bollard, and determine a bus route trajectory from the trajectory corresponding to the bus route. The trajectory segment of the bus stop is determined from the trajectory of the bus route and used as the direction vector of the bus stop.
5. The method according to claim 4, characterized in that, The step of obtaining the bus route corresponding to at least one bus stop bound to the bus stop bollard, and determining a bus route trajectory from the trajectories corresponding to the bus routes, includes: Select any bus stop from the bus stops bound to the bus stop markers and obtain the bus route corresponding to the selected bus stop. Based on the location of the selected bus stops, a bus route trajectory is determined from the trajectories corresponding to the bus routes. Determining the station trajectory segment from the trajectory of the bus route includes: Based on the location of the selected bus stop, a corresponding target trajectory segment is determined from the trajectory of the bus route, which is used as the trajectory segment of the bus stop.
6. The method according to claim 4, characterized in that, The number of bus stops bound to the bus stop marker is multiple. The step of obtaining the bus route corresponding to at least one bus stop bound to the bus stop marker, and determining a bus route trajectory from the trajectories corresponding to the bus routes, includes: For any bus stop bound to the bus stop marker, obtain the bus route corresponding to that bus stop. Based on the location of the target bus stop, a bus route trajectory is determined from the trajectories corresponding to the bus route and used as a candidate bus route trajectory. Determining the station trajectory segment from the trajectory of the bus route includes: Obtain the alternative trajectory segment corresponding to each alternative bus route trajectory; Based on the direction of the candidate direction vector corresponding to each candidate trajectory segment, the candidate trajectory segment that is closest to the direction of the station direction vector is selected from the candidate trajectory segments and determined as the target trajectory segment. The target trajectory segment is used as the station trajectory segment corresponding to the target station. The direction of the candidate direction vector is related to the driving direction of the candidate trajectory segment.
7. The method according to any one of claims 1-6, characterized in that, If the directional difference between the direction vector of the bus stop and the direction vector of the bus station meets the directional difference condition, then the bus stop corresponding to the direction vector of the bus stop is taken as the target bus stop, including: When the set of candidate bus stops includes multiple bus stops, for each bus stop, calculate the azimuth angle of the direction vector of the bus stop, where the azimuth angle is the angle between the direction vector of the bus stop and the reference vector. Obtain the station azimuth angle of the station direction vector of the target bus stop, where the station azimuth angle is the angle between the station direction vector and the reference vector; Calculate the azimuth difference between the azimuth of any bus stop bollard and the azimuth of the station, and obtain the azimuth difference corresponding to each bus stop bollard. From the multiple bus stop stakes included in the candidate stake set, the bus stop stake with the smallest azimuth angle difference is selected as the target bus stop stake.
8. A public transportation data processing device, characterized in that, The device includes: The data acquisition module is used to acquire bus data to be processed. The bus data includes: the target bus stop to be processed and a set of alternative bus stops. The set of alternative bus stops includes: at least one bus stop; each bus stop is bound to at least one bus stop, and the at least one bound bus stop has the same stop name. The stop name is the same as the stop name of the bus stop, and the stop name of the bus stop is also the same as the stop name of the target bus stop. The station vector determination module is used to determine a target trajectory segment from the bus route trajectory passing through the target bus station, as the station direction vector of the target bus station, wherein the direction of the station direction vector is related to the travel direction of the target trajectory segment; The bus stop vector determination module is used to determine a bus stop trajectory segment from the bus route trajectory passing through the bus stop for each bus stop, as the bus stop direction vector of the bus stop, and the direction of the bus stop direction vector is related to the driving direction of the bus stop trajectory segment; The bus stop selection module is used to select the bus stop corresponding to the direction vector of the bus stop as the target bus stop if the directional difference between the direction vector of the bus stop and the direction vector of the station meets the directional difference condition, so as to bind the target bus stop to the target bus stop.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-7 by executing the executable instructions.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method for inquiring stop boards and bus routes
CN103514244A
Bus station pairing method, getting-on point recommendation method, device, equipment and medium
CN114969538A