A bus line generation method, device, equipment and medium

By generating bus route trajectory point sequences through automated algorithms and scene shaping strategies, the problems of high cost and low efficiency in traditional manual generation methods are solved, and efficient and accurate bus route data updates are achieved.

CN118779390BActive Publication Date: 2026-11-27BEIJING BAIDU MAPPING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410802686.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2026-11-27
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Traditional bus route generation relies on manual labor, resulting in high production costs, low efficiency, poor data timeliness, and difficulty in accurately matching changes in real-time bus routes.

Method used

An automated method is used to generate an initial sequence of trajectory points for bus routes based on a set route calculation algorithm and scene shaping strategy. The accurate sequence of target trajectory points is then obtained through correction and filtering, reducing the reliance on manual labor.

Benefits of technology

It improved the accuracy and efficiency of bus route generation, reduced costs, and enhanced the real-time nature and completeness of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779390B_ABST
    Figure CN118779390B_ABST
Patent Text Reader

Abstract

The present disclosure provides a bus route generation method, device, equipment and medium, relates to the technical field of computer data processing, and particularly relates to artificial intelligence, intelligent transportation and big data technology. The specific implementation scheme is: based on a set route calculation algorithm, determining an initial route track point sequence of a to-be-updated bus route; based on a scene modification strategy of at least one bus route, modifying the initial route track point sequence to obtain a modified route track point sequence; and if the modified route track point sequence meets a set update condition, determining a target route track point sequence of the to-be-updated bus route. The bus route can be automatically generated according to the present disclosure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer data processing technology, and in particular to artificial intelligence, intelligent transportation, and big data technology, specifically to a method, apparatus, equipment, and medium for generating bus routes. Background Technology

[0002] Bus route query and navigation planning services bring convenient public transportation experiences to hundreds of millions of users. For public transportation service products, the coordinate data of bus route trajectory points is a crucial infrastructure, determining the accuracy of depicting the real public transportation world and directly affecting the service experience. However, with the rapid development of urbanization and the economy in my country, the number of bus routes is increasing, and the frequency of changes is also accelerating. How to accurately and in real-time generate map data from the trajectory point sequences of real bus routes has become a key technical challenge.

[0003] Traditional bus route data production relies heavily on manual labor, with staff interpreting and analyzing trajectory information to create standardized route point coordinate data. This reliance on manual labor results in high production costs, low efficiency, poor data timeliness, and high maintenance costs. Summary of the Invention

[0004] This disclosure provides a method, apparatus, equipment, and medium for generating bus routes.

[0005] According to one aspect of this disclosure, a method for generating bus routes is provided, comprising:

[0006] Based on the established route calculation algorithm, the initial route trajectory point sequence of the bus route to be updated is determined;

[0007] Based on a scene shaping strategy for at least one bus route, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence.

[0008] If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence of the bus route to be updated.

[0009] According to another aspect of this disclosure, a bus route generation apparatus is provided, comprising:

[0010] The initial route trajectory point sequence acquisition module is used to determine the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm.

[0011] The bus route shaping module is used to correct the initial route trajectory point sequence based on the scene shaping strategy of at least one bus route, so as to obtain a corrected route trajectory point sequence.

[0012] The bus route generation module is used to determine the target route trajectory point sequence of the bus route to be updated if the corrected route trajectory point sequence meets the set update conditions.

[0013] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, which, when executed, enable the at least one processor to perform the bus route generation method according to any embodiment of this disclosure.

[0017] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to perform the bus route generation method according to any embodiment of this disclosure.

[0018] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for generating bus routes according to any embodiment of this disclosure.

[0019] The technical solution of this disclosure can automatically modify the initial trajectory point sequence of the bus route to be updated according to the scenario corresponding to the bus route, thereby obtaining a more accurate trajectory point sequence of the bus route with a higher degree of matching with the real trajectory points.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0021] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0022] Figure 1 This is a flowchart of a method for generating bus routes according to an embodiment of this disclosure;

[0023] Figure 2 This is a flowchart of another method for generating bus routes according to an embodiment of this disclosure;

[0024] Figure 3 This is a flowchart of another method for generating bus routes according to an embodiment of this disclosure;

[0025] Figure 4A This is a flowchart of the flying line shaping process in a method for generating bus routes according to an embodiment of this disclosure;

[0026] Figure 4B This is a schematic diagram of the trajectory of a flying line scenario provided according to an embodiment of this disclosure;

[0027] Figure 5A This is a flowchart of reverse shaping in a method for generating bus routes according to an embodiment of the present disclosure;

[0028] Figure 5B This is a schematic diagram of the trajectory of a reverse driving scenario provided in the embodiments of this disclosure;

[0029] Figure 6A This is a flowchart of loop modification in a method for generating bus routes according to an embodiment of the present disclosure;

[0030] Figure 6B This is a schematic diagram of the trajectory of a loop scenario provided according to an embodiment of this disclosure;

[0031] Figure 7A This is a flowchart of a method for generating bus routes according to an embodiment of the present disclosure, specifically a process for modifying polygonal lines.

[0032] Figure 7B This is a schematic diagram of the trajectory of a polygonal line scene provided in the embodiments of this disclosure;

[0033] Figure 8A This is a flowchart of a method for generating bus routes according to an embodiment of the present disclosure, specifically a process for detour modification.

[0034] Figure 8B This is a schematic diagram of a detour scenario provided according to an embodiment of this disclosure;

[0035] Figure 9A This is a flowchart of a method for generating bus routes according to an embodiment of the present disclosure, specifically a method for modifying cross-road shapes.

[0036] Figure 9B This is a trajectory diagram of a cross-road scenario provided according to an embodiment of this disclosure;

[0037] Figure 10 This is a flowchart of jumper shaping in a method for generating bus routes according to an embodiment of this disclosure;

[0038] Figure 11 This is a schematic diagram of a bus route generation device according to an embodiment of the present disclosure;

[0039] Figure 12 A block diagram of an electronic device used to implement the method for generating bus routes according to embodiments of the present disclosure. Detailed Implementation

[0040] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0041] To integrate with electronic maps, navigation, and other technologies to provide public transportation services, it is necessary to provide bus route trajectory point sequences that closely resemble real-world conditions and have high positioning accuracy. For example, high-definition maps often use vectorized map elements to describe the real world, such as using links to record different paths in a road network and vector points to represent intersection features, signs, or buildings. To integrate with map data and provide users with public transportation services such as real-time bus location display and route calculation, it is also necessary to obtain bus route trajectory point sequences and record them in vector form. Furthermore, the attribute information of the trajectory point sequences, such as point intervals, positional errors, direction of travel, and station names, also needs to be obtained and achieved with the highest possible accuracy to reflect the real-world situation.

[0042] Traditional methods of obtaining bus route trajectory point sequences through manual analysis are often costly and lack real-time performance, making them unsuitable for the rapidly changing demands of the real world. Therefore, this disclosure provides a highly automated bus route generation scheme that reduces the cost of generating bus routes while meeting the accuracy requirements of the vectorized trajectory point sequences needed to provide public transportation services.

[0043] To clearly explain the technical solutions of the embodiments of this disclosure, the data on which they are based will be described first:

[0044] This disclosure allows for the generation of bus routes based on a large number of trajectory point sequences and bus route description data. Specifically, the trajectory point sequences are collected in real time from a large number of buses during their operation. Buses are typically equipped with one or more positioning devices, such as announcement devices, onboard terminals, vehicle-to-everything (V2X) terminals, and card readers. Passengers' user terminals also have positioning devices. Therefore, a large number of trajectory point sequences associated with bus routes can be collected. After filtering and normalization based on set conditions, trajectory point sequences with uniform data format and high confidence can be obtained. The bus route description data can come from various sources, such as news releases regarding bus route changes, station information published to the public, and bus route or station information provided by users.

[0045] This disclosure embodiment can automatically process the associated data of various bus routes to generate bus routes. The specific solution is described below:

[0046] Figure 1 This is a flowchart illustrating a method for generating bus routes according to an embodiment of this disclosure. This embodiment is applicable to the automated generation of route trajectory point sequences for bus routes. The data can be initially established for each bus route, or it can be continuously updated and changing bus routes. This method can be executed by a bus route generation device, which can be implemented in hardware and / or software and can be configured in an electronic device that carries the function of generating bus routes, such as a server that needs to provide bus services or a server used to maintain a bus route database. (Reference) Figure 1 The method specifically includes the following:

[0047] S110. Based on the set route calculation algorithm, determine the initial route trajectory point sequence of the bus route to be updated.

[0048] The above operation can be based on a large number of real-time operating trajectory point sequences of bus routes, and fused calculation based on a set route calculation algorithm to obtain an initial route trajectory point sequence.

[0049] The bus routes to be updated can be pre-known routes that need updating, and can be one or more routes, such as newly added or changed bus routes that are known through news, announcements, user feedback, or error reports. If the bus route database is being initialized, the bus routes to be updated may also be all bus routes. Optionally, the bus routes to be updated can be an entire bus route or a part of an entire bus route.

[0050] The geographical range to which the bus route to be updated belongs can be determined based on the route itself, such as within a set distance from the surrounding area. By obtaining the real-time trajectory point sequence of the bus routes within this geographical range, as well as road network data provided by high-precision maps, trajectory point fusion calculations and filtering can be performed based on a predefined routing algorithm. The predefined routing algorithm can include various specific methods, such as trajectory point aggregation algorithms and road network matching algorithms.

[0051] The determined initial route trajectory point sequence can be one or more. It represents initial data that roughly matches the bus route but still has accuracy errors or missing trajectory points. This sequence is also the route trajectory point sequence that needs further refinement in the bus route to be updated. For example, the initial route trajectory point sequence may contain incorrect trajectory points, trajectory points that do not match the road network, or trajectory point spacing requirements that are not met. Specifically, because the route trajectory point sequences of the bus routes to be updated may come from different data sources, and the data quality varies between these sources, the calculation method of the route calculation algorithm, and the road network data can all lead to a certain discrepancy between the calculated initial route trajectory point sequence and the actual route trajectory point sequence.

[0052] S120. Based on the scene shaping strategy of at least one bus route, the initial route trajectory point sequence is corrected to obtain the corrected route trajectory point sequence.

[0053] Scene-based shaping strategies for bus routes can be used to refine the initial route trajectory point sequence. There can be one or more scene-based shaping strategies for bus routes. Different initial route trajectory point sequences can correspond to different scenarios. For example, route updates near the terminal station and route updates in the middle section of a bus route may require different shaping strategies; different scenarios have different scene-based shaping strategies. Therefore, the initial route trajectory point sequence can be adaptively shaped according to the scenario it belongs to. Compared to using an indiscriminate shaping strategy for initial route trajectory point sequences corresponding to different scenarios, targeted shaping of the initial route trajectory point sequence based on its scenario yields better results. The corrected route trajectory point sequence can be the revised initial route trajectory point sequence. For example, the corrected route trajectory point sequence can be the route trajectory point sequence obtained after correcting the route trajectory points with anomalies in the initial route trajectory point sequence.

[0054] Specifically, the scene in which the initial route trajectory point sequence is located can be detected, and a scene shaping strategy corresponding to the scene can be selected from the scene shaping strategies of at least one bus route. Using this scene shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence.

[0055] S130. If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence of the bus route to be updated.

[0056] Setting update conditions can be used to check the revised route trajectory point sequence for inclusion in the database. These conditions determine whether the revised route trajectory point sequence can represent the bus route to be updated, i.e., whether it can be included in the database as the target route trajectory point sequence for the bus route to be updated. After correcting the initial route trajectory point sequence, it is not directly used as the target route trajectory point sequence for the bus route to be updated. Instead, by setting update conditions, the revised route trajectory point sequence is checked again. Only when the check passes can the revised route trajectory point sequence be determined as the target route trajectory point sequence for the bus route to be updated; otherwise, it is discarded and not used as the target route trajectory point sequence for the bus route to be updated. This improves the accuracy and reference value of the target route trajectory point sequence for the bus route to be updated. The target route trajectory point sequence can be the revised route trajectory point sequence that can represent the bus route to be updated. The specific content of the update conditions can be varied. For example, the location validity of the trajectory points in the corrected route trajectory point sequence can be verified, the verification can be based on the real-time operation trajectory of the bus, or the confidence level of the route can be judged by referring to the results of the scene shaping strategy. This disclosure does not limit the specific content of the update conditions.

[0057] This can be understood as the target route trajectory point sequence of the bus route to be updated being used to characterize the specific driving trajectory of the bus route to be updated. The data can be recorded as the coordinates of the trajectory points and the direction of the trajectory points, etc. The bus route to be updated can also include other attribute information, such as the route identifier and station identifier of the bus route to be updated.

[0058] There are two main types of bus route generation technologies. One is fully manual generation, where humans analyze and interpret trajectory information collected from various sources, then perform operations and quality checks using a vector data editing system according to complex processes and production standards. Finally, the system processes and standardizes the data, updating it to map data and storing it in a database. In other words, all changes to real-world bus routes—additions, deletions, extensions, shortenings, and route changes—must be manually interpreted, edited, and stored. The other type is machine-assisted manual generation. The basic process is similar to fully manual generation, but certain steps are improved to assist humans in increasing generation efficiency; however, it is still essentially a human-led generation method. Machine-assisted manual generation mainly has two scenarios: one is for reliable and highly standardized trajectory information sources, such as data mining, where updated data can be stored through programmed processing; the other is for optimizing the operation of the vector data editing system used by humans, such as using small tools to replace or optimize certain manual operations, thereby assisting manual production. These two production methods have different application scenarios and different problems and shortcomings: the fully manual generation method for bus routes has a wider application scenario and is widely adopted in the industry. However, it has several significant drawbacks: High production costs, requiring not only substantial labor but also a complex vector data editing system; low production efficiency, as the complex processes and standards developed manually present numerous challenges for human execution, and human fatigue limits efficiency; poor data timeliness, with lengthy manual workflows and low data responsiveness. Especially when the real world is subject to significant changes, even with overtime work, it's difficult to complete the process, demonstrating poor adaptability. Furthermore, human intervention inherently introduces unreliability, limiting data quality. While machine-assisted generation of bus routes reduces manual labor through localized scenario optimization, this approach is only applicable to highly reliable and standardized trajectory information sources, or certain highly standardized operational scenarios, representing a small proportion of the overall scenario. Essentially, this method remains a human-dominated generation model, retaining the shortcomings of fully manual bus route generation in most scenarios and failing to fundamentally solve the problem.

[0059] According to the technical solution disclosed herein, the target route trajectory point sequence of the bus route to be updated can be automatically generated, which improves the completeness and accuracy of the bus route to be updated, reduces the dependence on manual labor, reduces the production and maintenance costs of the bus route to be updated, and improves the production efficiency and data timeliness of the bus route to be updated; the shaping is performed based on different scenario shaping strategies, taking into account the scenario of the trajectory points of the bus route to be updated, and the accuracy of the bus route to be updated is higher.

[0060] Figure 2This is a flowchart of another method for generating bus routes according to an embodiment of this disclosure. It further optimizes and expands upon the above technical solution and can be combined with the various optional implementation methods described above. The following operation is further added: obtaining the running trajectory point sequences of multiple positioning devices moving along the bus route to be updated; determining high-confidence trajectory points that meet the confidence conditions from the running trajectory point sequences based on a trusted data source or trusted algorithm. (Reference) Figure 2 The method specifically includes the following:

[0061] S210. Obtain the sequence of running trajectory points of each of the multiple positioning devices moving along the bus route to be updated.

[0062] Positioning devices can be used to detect the actual operating trajectory of bus routes to be updated. While each positioning device moves along the route, differences in detection accuracy mean that different devices may obtain different actual operating trajectory points along the same route. The sequence of operating trajectory points can be used to characterize the actual operating trajectory of the bus route to be updated, collected by the positioning devices. The spacing between each operating trajectory point in the sequence is determined by the detection accuracy of the positioning devices.

[0063] Specifically, it is possible to obtain the trajectory points uploaded by multiple positioning devices moving along the bus route to be updated. The trajectory point sequence for each positioning device can be generated according to the upload time sequence. For example, it is possible to obtain the trajectory point sequence collected by positioning devices on buses moving along the bus route to be updated or by positioning devices carried by bus passengers.

[0064] S220. Based on a trusted data source or trusted algorithm, determine highly trusted trajectory points that meet the trusted conditions from the sequence of running trajectory points.

[0065] There are various data sources for the trajectory point sequence. A trusted data source is one with high credibility, and its credibility can be determined through various means such as data quality and the authority of the entity to which the data source belongs. For example, the station locations provided by a bus service company can be considered highly credible.

[0066] A reliable algorithm is an algorithm that calculates the reliability of each trajectory point in a sequence of running trajectory points. For example, a reliable algorithm can be used to aggregate multiple running trajectory sequences to obtain aggregate center points. These aggregate center points can be filtered to remove those that clearly do not belong to the bus route to be updated, resulting in high-reliability trajectory points for the bus route to be updated. For example, aggregate center points that clearly do not belong to the bus route to be updated can include those not located in a drivable position or not at a stop. The remaining aggregate center points can be considered as having passed through these locations multiple times during the run, thus possessing high reliability.

[0067] Trustworthiness criteria can be used to determine the trustworthiness of trajectory points in a sequence of running trajectory points. Optionally, trustworthiness criteria may include a trustworthiness level greater than or equal to a preset trustworthiness threshold obtained through verification by a trusted data source and / or calculation by a trusted algorithm. High-trustworthiness trajectory points can be trajectory points with relatively high trustworthiness in the sequence of running trajectory points. In practice, although high-trustworthiness trajectory points have relatively high trustworthiness, they are often sparse, and their number does not meet the requirements for forming a complete sequence of trajectory points for the entire route.

[0068] S230. Based on the set route calculation algorithm, determine the initial route trajectory point sequence of the bus route to be updated.

[0069] In one optional embodiment of this disclosure, determining the initial route trajectory point sequence of the bus route to be updated based on a set route calculation algorithm includes: processing the known station coordinates and road network data within the area to which the bus route to be updated belongs, as well as the high-confidence trajectory points in the bus route to be updated, based on the set route calculation algorithm, to determine at least one initial route trajectory point sequence of the bus route to be updated.

[0070] The bus route to be updated can be a bus route that has changed. The area to which the bus route to be updated belongs can be the area to which the changed bus route belongs. The area to which the bus route to be updated belongs can be used to obtain known station coordinates and road network data. Known station coordinates can be station coordinates known to be on the bus route to be updated. Optionally, the known station coordinates can be obtained by means of station coordinates on the bus route to be updated reported through trusted data sources, or by mining station coordinates on the bus route to be updated from information reported by various data sources. Road network data can be known high-precision map vector data. For example, road network data can include building areas, road segments, and intersection feature points, etc.

[0071] Known station coordinates, road network data, and high-confidence trajectory points can all be considered as transit points for bus routes. Based on this, at least one initial sequence of route trajectory points can be determined using a predefined route calculation algorithm. Other collected or calculated trajectory points can be added to the initial sequence of route trajectory points.

[0072] In one optional embodiment of this disclosure, the determination of at least one initial route trajectory point sequence for the bus route to be updated, based on the known station coordinates and road network data within the area to which the bus route to be updated belongs, and the high-confidence trajectory points in the bus route to be updated, is performed using a set routing algorithm. This includes: determining multiple candidate road segment trajectory point sequences connecting each known station based on the road network data; and matching and fusing the high-confidence trajectory points with each candidate road segment trajectory point sequence using the set routing algorithm to determine at least one initial route trajectory point sequence for the bus route to be updated.

[0073] A candidate road segment trajectory point sequence can be a sequence of trajectory points in the road network segments between any two known stations. The candidate road segment trajectory point sequence can be used to represent one or more selectable road segment trajectories between two known stations.

[0074] Furthermore, high-confidence trajectory points can be matched with the trajectory point sequences of each candidate road segment. If a high-confidence trajectory point does not match any candidate road segment trajectory point sequence, that candidate road segment trajectory point sequence is removed. Of course, there may be multiple high-confidence trajectory points; the matching results of each high-confidence trajectory point can be combined to filter the candidate road segment trajectory point sequences. High-confidence trajectory points can also be merged into the candidate road segment trajectory point sequences, for example, by calculating which trajectory points should be added or deleted if a candidate road segment trajectory point sequence passes through a high-confidence trajectory point.

[0075] This scheme introduces the calculation of high-confidence trajectory points. Furthermore, by matching and fusing the high-confidence trajectory points with the trajectory point sequences of each candidate road segment using a set route calculation algorithm, the comprehensiveness of the initial route trajectory point sequence determination is improved, thereby enhancing the accuracy of the generated bus routes.

[0076] This solution incorporates known station coordinates and road network data within the area of ​​the bus route to be updated. Combined with high-reliability trajectory points in the bus route to be updated, and based on a set route calculation algorithm, it achieves the screening of the initial route trajectory point sequence for the bus route to be updated. Furthermore, due to the reliability and accuracy of the known station coordinates, road network data, and high-reliability trajectory points, the accuracy of screening the initial route trajectory point sequence for the bus route to be updated is improved. This avoids the waste of computing resources caused by invalid corrections and detections of the initial route trajectory point sequence, thus saving the computing resources of the device.

[0077] S240. Based on the scene shaping strategy of at least one bus route, the initial route trajectory point sequence is corrected to obtain the corrected route trajectory point sequence.

[0078] S250. If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence of the bus route to be updated.

[0079] According to the technical solution disclosed herein, no new positioning equipment is required. Multiple positioning devices moving along the bus route to be updated are used to obtain their respective running trajectory point sequences, which can reduce the hardware cost in the high-confidence trajectory point screening process. By using a trusted data source or trusted algorithm, high-confidence trajectory points that meet the trust conditions are screened from the running trajectory point sequences, while low-confidence running trajectory points are filtered out. This achieves the screening of high-confidence trajectory points, provides reference data for bus route generation, and facilitates the subsequent generation of bus routes.

[0080] Figure 3 This is a flowchart of another method for generating bus routes disclosed in this disclosure, based on an embodiment of the present invention. It further optimizes and expands upon the above technical solution and can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as including: a reference line shaping strategy and at least one anomaly shaping strategy; correspondingly, the initial route trajectory point sequence is corrected based on the scene shaping strategy of at least one bus route to obtain a corrected route trajectory point sequence, specifically: based on the reference line shaping strategy, the initial route trajectory point sequence is adjusted according to high-confidence trajectory points in a high-confidence reference line; based on at least one anomaly shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence. (Reference) Figure 3 The method specifically includes the following:

[0081] S310. Based on the set route calculation algorithm, determine the initial route trajectory point sequence of the bus route to be updated.

[0082] S320. Based on the reference line shaping strategy, the initial line trajectory point sequence is adjusted according to the high-confidence trajectory points in the high-confidence reference line.

[0083] Scene shaping strategies can include a reference line shaping strategy and at least one anomaly shaping strategy. The reference line shaping strategy is used to correct and complete the initial route trajectory point sequence. The anomaly shaping strategy is used to correct anomalies in the initial route trajectory point sequence. A high-confidence reference line can be a route composed of high-confidence trajectory points. The high-confidence trajectory points in the high-confidence reference line can be obtained through trajectory point mining as described above, or they can be obtained from other intelligence sources. The high-confidence trajectory points in the high-confidence reference line may be partially the same as or different from the high-confidence trajectory points used in the aforementioned route calculation operation. Although the high-confidence trajectory points in the high-confidence reference line have high confidence, there may be large intervals between them, or missing route trajectory points, making them unsuitable as the target route trajectory point sequence for the bus route to be updated. For example, the spacing between high-confidence trajectory points in the high-confidence reference line can be tens of meters or even hundreds of meters; while the spacing between trajectory points in the target route trajectory point sequence for the bus route to be updated is required to be around 2 meters. Therefore, based solely on the high-confidence trajectory points in the high-confidence reference line, it is not possible to directly generate the target route trajectory point sequence for the bus route to be updated; it is necessary to complete the missing route trajectory points.

[0084] Specifically, the deviation between the line trajectory points in the initial line trajectory point sequence and the corresponding high-confidence trajectory points in the high-confidence reference line can be calculated, or the line shape deviation can be calculated. When the deviation exceeds a preset deviation threshold, the line trajectory points in the initial line trajectory point sequence are corrected to the corresponding high-confidence trajectory points, or waypoints are added based on the high-confidence trajectory points to complete the initial line trajectory point sequence.

[0085] In one optional embodiment of this disclosure, adjusting the initial route trajectory point sequence based on the reference line shaping strategy and according to the high-confidence trajectory points in the high-confidence reference line includes: calculating the alignment matching degree between the initial route trajectory point sequence and the high-confidence reference line; if the alignment matching degree does not meet the matching degree requirement, determining the waypoints according to the high-confidence trajectory points in the high-confidence reference line; and, based on the waypoints, returning to execute the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set routing algorithm.

[0086] Linearity matching degree characterizes the degree of similarity between the trajectory shape corresponding to the initial trajectory point sequence and the trajectory shape of the high-confidence reference line. If the linearity matching degree does not meet the requirements, it can be understood that the deviation between the trajectory shape corresponding to the initial trajectory point sequence and the trajectory shape of the high-confidence reference line does not meet the matching requirements. Waypoints can be trajectory points calculated based on the high-confidence reference line. Waypoints can be added as new high-confidence trajectory points, and the path calculation operation can be performed again to obtain a new initial trajectory point sequence.

[0087] Specifically, the matching distance between each trajectory point in the initial trajectory point sequence and its corresponding high-confidence trajectory point in the high-confidence reference line can be calculated. If the matching distance is less than or equal to a preset matching distance, the alignment matching degree is considered to meet the matching degree requirement; if the matching distance is greater than the preset matching distance, the alignment matching degree is considered not to meet the matching degree requirement. If the alignment matching degree does not meet the matching degree requirement, the high-confidence trajectory point in the high-confidence reference line is directly determined as a waypoint. The preset matching distance can be the maximum distance between a trajectory point in the initial trajectory point sequence and its corresponding high-confidence trajectory point in the high-confidence reference line when the alignment matching degree meets the matching requirement.

[0088] In an optional embodiment of this disclosure, calculating the linear matching degree between the initial line trajectory point sequence and the high-confidence reference line includes: calculating the bidirectional Hausdorff distance between the trajectory points in the initial line trajectory point sequence and the high-confidence trajectory points in the high-confidence reference line; if the bidirectional Hausdorff distance is greater than a first set threshold, it is determined that the linear matching degree does not meet the matching degree requirement.

[0089] The bidirectional Hausdorff distance reflects the linear difference between the initial trajectory point sequence and the high-confidence reference line from both perspectives. It can be understood as calculating the distance from each trajectory point in both sets (the initial trajectory point sequence and the high-confidence reference line) to the nearest trajectory point in the other set, and taking the maximum value of these distances as the bidirectional Hausdorff distance. In essence, the bidirectional Hausdorff distance comprehensively considers both perspectives to determine the linear difference between the initial trajectory point sequence and the high-confidence reference line. Specifically, the larger the bidirectional Hausdorff distance, the greater the linear difference between the initial trajectory point sequence and the high-confidence reference line; conversely, the smaller the bidirectional Hausdorff distance, the smaller the linear difference.

[0090] In one optional embodiment of this disclosure, determining a waypoint based on a high-confidence trajectory point in a high-confidence reference line includes: calculating the Hausdorff distance between each high-confidence trajectory point in the high-confidence reference line and the trajectory points in the initial line trajectory point sequence, and selecting the high-confidence trajectory point with the largest Hausdorff distance as a candidate waypoint; filtering from multiple candidate waypoints according to a set ratio; and determining the waypoint to be added based on the filtered candidate waypoints.

[0091] Hausdorff distance can be used to characterize the difference between a single high-confidence trajectory point in a high-confidence reference line and the trajectory points in the initial line trajectory point sequence. Specifically, the larger the Hausdorff distance, the greater the difference between the high-confidence trajectory point and the line trajectory points. The high-confidence trajectory point with the largest Hausdorff distance can be understood as the high-confidence trajectory point with the greatest deviation from the trajectory points in the initial line trajectory point sequence, i.e., it may be a missing high-confidence trajectory point, and should be added to complete the line trajectory points. The set ratio can be a pre-defined proportion for selecting candidate path points. It can be different proportions such as 10%, 30%, 50%, 70%, 80%, or 90% to select points from the candidate path points. The selected candidate path points can be directly used as path points to be added, or they can be further determined by combining road network segments. For example, the trajectory point closest to the candidate path point in the adjacent road network segment can be used as the path point to be added.

[0092] This solution further refines the initial trajectory point sequence by adding waypoints to each high-confidence trajectory point in the high-confidence reference line. By selecting waypoints according to different set ratios, it saves the device's computing resources while considering the reference role of high-confidence trajectory points in the high-confidence reference line, thus balancing the efficiency and accuracy of reference line shaping of the initial trajectory point sequence.

[0093] S330. Based on at least one abnormal shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence.

[0094] Different abnormal scenarios require different anomaly correction strategies. For example, abnormal scenarios may include loop scenarios, flying wire scenarios, zigzag line scenarios, detour scenarios, reverse driving scenarios, road crossing scenarios, and jumper wire scenarios. Accordingly, different abnormal scenarios can correspond to different anomaly correction strategies.

[0095] Specifically, abnormal scenarios can be detected in the initial route trajectory point sequence, and an abnormal scenario correction strategy corresponding to the abnormal scenario can be selected from the abnormal correction strategies of at least one bus route. Using this abnormal correction strategy, the initial route trajectory point sequence is corrected to obtain the corrected route trajectory point sequence.

[0096] S340. If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence for the bus route to be updated.

[0097] According to the technical solution disclosed herein, the scene shaping strategy is specified as a reference line shaping strategy and an anomaly shaping strategy. By first using the reference line shaping strategy to supplement trajectory points, and then using the anomaly shaping strategy, the initial line trajectory point sequence is corrected to obtain the corrected line trajectory point sequence. This achieves two-stage shaping of the initial line trajectory point sequence and improves the shaping effect of the initial line trajectory point sequence. At the same time, it also utilizes high-confidence trajectory points with higher confidence in the high-confidence reference line to further improve the accuracy of the initial line trajectory point sequence shaping.

[0098] The following examples illustrate the processing solutions for different shaping scenarios.

[0099] Figure 4A This is a flowchart illustrating the flying line shaping process in a method for generating bus routes provided in this embodiment of the disclosure. Figure 4B This is a schematic diagram of the trajectory of a flying line scene in an embodiment of this disclosure. In an optional embodiment of this disclosure, the scene shaping strategy includes a flying line shaping strategy. Based on the flying line shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence, including:

[0100] S410. Identify whether there are any redundant trajectory points after the trajectory points that serve as the final station in the initial line trajectory point sequence; if yes, execute S420; otherwise, execute S440.

[0101] S420. If so, use the extra trajectory points as the flight line trajectory points.

[0102] S430. Delete the flying line trajectory points to obtain the corrected line trajectory point sequence.

[0103] S440. If not, then it can be determined that there is no need for flywire reshaping.

[0104] The "flying line" reshaping strategy is primarily applicable to reshaping terminal stations. A terminal station is the station corresponding to the end point of a bus route. Under normal circumstances, buses stop at the terminal station, and there are no other extra road segments after the terminal station in the bus's trajectory. However, in actual operation, after reaching the terminal station, the vehicle may transfer within the bus depot or return to the parking lot, so its trajectory will still be collected, becoming a "flying line" trajectory point. This point does not belong to the bus route's trajectory and can be removed. For example... Figure 4B As shown, the point following the final station trajectory point X is the flying line trajectory point Y.

[0105] The specific method for identifying flying line scenarios can be based on the coordinates of the terminal station, vertically cutting the sequence of line trajectory points, and then, according to the direction of line operation, identifying whether there is an illegal trajectory point sequence outside the terminal station. If so, it is identified as a flying line trajectory point.

[0106] This solution identifies fly-by trajectory points in the initial route trajectory point sequence by using trajectory points at the terminal stations. By deleting fly-by trajectory points, the initial route trajectory point sequence is corrected, thereby improving the accuracy of bus routes.

[0107] Figure 5A This is a flowchart illustrating the reverse-flow shaping process in a method for generating bus routes provided in this embodiment of the disclosure. Figure 5B This is a schematic diagram of the trajectory in a reverse-traffic scenario according to an embodiment of this disclosure. The scene shaping strategy includes a reverse-traffic shaping strategy. Based on the reverse-traffic shaping strategy, the initial trajectory point sequence is corrected to obtain a corrected trajectory point sequence, including:

[0108] S510. If the initial route trajectory point sequence is found to be in the opposite direction to the adjacent road network segment, it is determined to be a reverse driving scenario.

[0109] S520. Based on the coordinates of the inverse road segments associated with adjacent road network segments, the initial route trajectory point sequence is migrated and corrected to obtain the corrected route trajectory point sequence.

[0110] The reverse trajectory correction strategy can be used to correct trajectory points in the initial route trajectory point sequence that exhibit reverse travel. The cause of reverse travel could be due to the route calculation algorithm or an incorrect direction of high-confidence trajectory points. Neighboring road network segments can be used to assist in identifying reverse travel scenarios. Neighboring road network segments are the road network segments closest to the initial route trajectory point sequence, and these segments can include the location and direction information of multiple road segments. If the initial route trajectory point sequence is detected to be traveling in the opposite direction to a neighboring road network segment, it is considered a reverse travel situation. However, in reality, the bus does not exhibit reverse travel during its journey; that is, the detected initial route trajectory point sequence does not match the actual situation, and the bus is not traveling on a neighboring road network segment. In this case, the initial route trajectory point sequence needs to be corrected.

[0111] The reverse road segment can be a road network segment in the opposite direction associated with a neighboring road network segment. For example, in a two-way road network, the reverse road segment is the segment in the opposite direction to the neighboring road network segment. Based on the coordinates of the reverse road segment associated with the neighboring road network segment, the initial route trajectory point sequence can be directly migrated to the coordinates of the reverse road segment to obtain the corrected route trajectory point coordinates.

[0112] Alternatively, after determining that the scenario corresponding to the initial route trajectory point sequence is a reverse scenario, the initial route trajectory point sequence can also be deleted.

[0113] Optionally, after reversing and reshaping the initial line trajectory point sequence, it is possible to check again whether there is a reversing scenario. If it still exists, it can continue to reshape, or it can abandon this initial line trajectory point sequence and consider it as a failure to generate.

[0114] This scheme introduces the direction recognition of the initial route trajectory point sequence and adjacent road network segments, realizing the detection of reverse driving scenarios. By migrating and correcting the initial route trajectory point sequence based on the coordinates of the reverse driving segments associated with the adjacent road network segments, a corrected route trajectory point sequence is obtained, which improves the correction efficiency and accuracy of the initial route trajectory point sequence in reverse driving scenarios.

[0115] Figure 6A This is a flowchart illustrating loop modification in a method for generating bus routes provided in this embodiment of the disclosure. Figure 6B This is a schematic diagram of the loop scene in this embodiment. Further optimizations and extensions are made based on the above technical solution, and it can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as a loop shaping strategy; correspondingly, based on the loop shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence, specifically including:

[0116] S610. Identify whether the initial line trajectory point sequence includes a closed area. If a closed area exists, it is determined that a loop scenario exists.

[0117] S620. Correct the trajectory points in the initial line trajectory point sequence that belong to the closed area to obtain the corrected line trajectory point sequence.

[0118] A loop scenario can be used to characterize the presence of loops in the initial sequence of route trajectory points. For a normal route trajectory, the traveler moves forward along a single line, without closed regions, i.e., no loops. Closed regions are used to characterize loops in the initial sequence of route trajectory points.

[0119] Specifically, the system can detect the coordinates of each trajectory point in the initial route trajectory point sequence and the travel order of each trajectory point. It can then check if the coordinates of each trajectory point change repeatedly in both the direction of travel and perpendicular to the direction of travel. If so, the initial route trajectory point sequence is identified as containing a closed region. If not, it is identified as not containing a closed region. If a closed region exists, a loop scenario is determined.

[0120] In one optional embodiment of this disclosure, identifying whether the initial line trajectory point sequence includes a closed region, and determining a loop scenario if a closed region exists, includes: identifying whether there are any two trajectory points in the initial line trajectory point sequence whose distance is less than or equal to a second preset threshold; if so, taking the two trajectory points that meet the second preset threshold condition as intersecting trajectory points, and identifying whether the first distance between the two intersecting trajectory points and the first intersecting trajectory point is greater than or equal to the second distance between the two intersecting trajectory points; if so, determining that the trajectory point is a loop trajectory point; correspondingly, correcting the trajectory points in the initial line trajectory point sequence that belong to the closed region to obtain a corrected line trajectory point sequence includes: deleting the loop trajectory points to obtain the corrected line trajectory point sequence.

[0121] The second threshold can be used to filter intersecting trajectory points. The second threshold can be the maximum distance between pre-set intersecting trajectory points. For example, the second threshold can be 1m. Since the acquisition device corresponding to the initial route trajectory point sequence has a certain acquisition frequency, during normal bus operation, there is no situation where the distance between two trajectory points is less than or equal to the second threshold, i.e., the two trajectory points are too close. Intersecting trajectory points can be trajectory points whose distance is less than or equal to the second threshold. This can be understood as intersecting trajectory points being too close. That is, the road segments corresponding to two intersecting trajectory points intersect. The trajectory points between intersecting trajectory points form a closed area. Along the bus's direction of travel, the first intersecting trajectory point can be the intersecting trajectory point with the earlier travel sequence, i.e., the first intersecting trajectory point with the earlier time sequence. The first distance can be the distance between the trajectory points between intersecting trajectory points and the first intersecting trajectory point. The second distance can be the distance between two intersecting trajectory points. For normal driving trajectories, the longer the interval, the greater the distance between trajectory points; however, for loop scenarios, due to the existence of closed loops, trajectory points on the loop may have a distance greater than the distance between two intersecting trajectory points with longer intervals. Loop trajectory points can be trajectory points located on loops.

[0122] refer to Figure 6BAs shown, the distance between trajectory points a and b is less than the second preset threshold, indicating they are intersecting trajectory points. The first distance between trajectory point c and the first intersecting trajectory point a is greater than the second distance between intersecting trajectory points a and b. Therefore, trajectory point c is determined to be a loop trajectory point and should be deleted.

[0123] This solution simplifies the shaping process of the initial line trajectory point sequence in loop scenarios and the re-detection process of the corrected line trajectory point sequence, thereby improving the efficiency of loop shaping.

[0124] Optionally, after performing loop shaping on the initial line trajectory point sequence, it is possible to check again whether there is a loop scenario. If it still exists, the shaping can be returned, or the initial line trajectory point sequence can be abandoned and considered as a failure to generate.

[0125] According to the technical solution disclosed herein, loop trajectory points in the initial line trajectory point sequence can be removed, thereby improving the accuracy of the line trajectory points.

[0126] Figure 7A This is a flowchart illustrating the polyline shaping process in a method for generating bus routes provided in this embodiment of the disclosure. Figure 7B This is a schematic diagram of the trajectory of a polyline scene in this embodiment. Further optimizations and extensions are made based on the above technical solution, and it can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as a polyline shaping strategy; correspondingly, the initial line trajectory point sequence is corrected based on the polyline shaping strategy to obtain a corrected line trajectory point sequence, specifically: identifying whether there are abnormal polylines in the initial line trajectory point sequence; if abnormal polylines exist, correcting the abnormal polylines to obtain a corrected line trajectory point sequence.

[0127] A polyline scenario can be used to characterize the presence of abnormal polylines in the initial sequence of route points. For a normal route trajectory, the traveler moves forward along the route without any abnormal polylines such as backtracking or returning.

[0128] Specifically, rules for identifying abnormal polylines can be preset. Once an abnormal polyline is identified, it can be deleted or its shape adjusted. Optionally, after reshaping the initial trajectory point sequence, the abnormal polyline identification can be performed again. If it still exists, the reshaping process can continue, or the initial trajectory point sequence can be discarded, considered a failure in generation.

[0129] like Figure 7A As shown, in an optional embodiment of this disclosure, identifying whether there are abnormal polylines in the initial line trajectory point sequence, and if abnormal polylines exist, correcting the abnormal polylines to obtain a corrected line trajectory point sequence includes:

[0130] S720. For the initial sequence of trajectory points, perform traversal identification by grouping four consecutive trajectory points.

[0131] S730. If, among the four trajectory points, the first three trajectory points are identified as forming an acute angle, then the last two trajectory points are determined to form the first broken line edge; if, the last three trajectory points are identified as forming an acute angle, then the last two trajectory points are determined to form the second broken line edge.

[0132] S740. If the distance between the first and second broken line edges of the acute angle formed by the first broken line edge and the second broken line edge is less than the third set threshold, then the first broken line edge and the second broken line edge are determined to constitute an abnormal broken line, and the vertex trajectory point of the acute angle formed by the abnormal broken line edge is determined to be the acute angle trajectory point.

[0133] S750, delete acute angle trajectory points to obtain the corrected line trajectory point sequence.

[0134] The last two trajectory points can specifically be the last two trajectory points out of the three trajectory points being identified for the broken line edge. The first broken line edge can be used to characterize the broken line edge that appears first in the initial line trajectory point sequence. The second broken line edge can be used to characterize the broken line edge that appears later in the initial line estimation point sequence. In a normal driving trajectory, the trajectory points in the line usually form obtuse angles, or acute and obtuse angles alternate, and it is rare for the trajectory points in the line to form consecutive acute angles. For broken line scenarios, due to the presence of broken line bulges in the line, the trajectory points in the line may form consecutive acute angles. Therefore, a preliminary judgment of broken line scenarios (i.e., abnormal broken lines) can be made based on whether consecutive acute angles appear between the trajectory points in the line. Taking four consecutive trajectory points as a group, the angle change between two groups of trajectory points can be detected in a single step, resulting in higher detection efficiency. The third threshold can be used to re-judge the broken lines in the initial line trajectory point sequence. The third threshold can be the minimum distance between the first and last trajectory points of the acute angle formed by the first and second broken line edges, which is set in advance. If the distance between the first and second segments of the acute angle formed by the first and second segments is less than a third preset threshold, it can be understood that the interval between the first and second segments is too small. In this case, it can be determined that the vertex of the acute angle formed by the first and second segments is abnormal. For example, the third preset threshold can be 3m. The acute angle trajectory point can be the trajectory point of the vertex of the acute angle formed by the first and second segments.

[0135] like Figure 7BAs shown, for the initial sequence of trajectory points, traversal identification can be performed by grouping four consecutive trajectory points. For example, the current identification is of trajectory points a, b, c, and d. If the first three trajectory points a, b, and c form an acute angle, then the last two trajectory points of the first three are identified as forming the first polyline edge bc. If the last three trajectory points b, c, and d form an acute angle, then the last two trajectory points of the last three are identified as forming the second polyline edge cd. If the distance between the first and last trajectory points b and d of the acute angle bcd formed by the first and second polyline edges is less than a third preset threshold, it indicates that the first and last trajectory points b and d are too close. Therefore, the first polyline edge bc and the second polyline edge cd constitute an abnormal polyline, and the vertex trajectory point c of the acute angle formed by the abnormal polyline is identified as the acute angle trajectory point. The acute angle trajectory point c can be deleted to obtain the corrected sequence of trajectory points.

[0136] This solution simplifies the shaping process of the initial line trajectory point sequence and the re-detection process of the corrected line trajectory point sequence in polyline scenarios, thereby improving the efficiency of polyline shaping of the initial line trajectory point sequence.

[0137] According to the technical solution disclosed herein, abnormal broken lines in the initial line trajectory point sequence can be removed, thereby improving the accuracy of the line trajectory points.

[0138] Figure 8A This is a flowchart illustrating the detour modification process in a bus route generation method provided in this embodiment of the disclosure. Figure 8B This is a schematic diagram of the trajectory of a detour scenario in an embodiment of this disclosure. Further optimizations and extensions are made based on the above technical solution, and it can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as a detour shaping strategy; correspondingly, based on the detour shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, specifically: identifying whether a detour scenario exists in the initial route trajectory point sequence; if so, determining the waypoint based on the high-confidence trajectory points in the high-confidence reference line; based on the waypoint, returning to execute the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set routing algorithm, and re-executing the detour shaping strategy until a corrected route trajectory point sequence without detour scenarios is obtained. Reference Figure 8A The method specifically includes the following:

[0139] S810. Based on the set route calculation algorithm, determine the initial route trajectory point sequence of the bus route to be updated.

[0140] S820: Identify the initial route trajectory point sequence and determine if there are any detour scenarios. If yes, proceed to S830; otherwise, execute other scenario reshaping strategies.

[0141] Detour scenarios can be used to characterize the presence of detours in the initial route trajectory point sequence. The rules for detour identification can be set based on real-world detour scenarios. Poor acquisition accuracy of the initial route trajectory point sequence acquisition equipment and variations in the routing algorithm can both lead to detour scenarios appearing in the initial route trajectory point sequence.

[0142] In one optional embodiment of this disclosure, identifying whether there is a detour scenario in the initial route trajectory point sequence includes: calculating the Hausdorff distance between the high-confidence trajectory points in the high-confidence reference line and each trajectory point in the initial route trajectory point sequence; for each trajectory point whose Hausdorff distance is greater than or equal to a fourth preset threshold, it is determined to be a deviation from the trajectory point sequence; if the preset multiple of the straight-line distance between the first and last trajectory points of the deviation trajectory point sequence is greater than the shortest path distance between the first and last trajectory points in the road network, it is determined that there is a detour scenario.

[0143] Hausdorff distance can be used to characterize the difference between a high-confidence trajectory point in a high-confidence reference line and a single trajectory point in the initial route trajectory point sequence. Specifically, the larger the Hausdorff distance, the greater the difference between a high-confidence trajectory point in the high-confidence reference line and a single trajectory point in the initial route trajectory point sequence; the smaller the Hausdorff distance, the smaller the difference between a high-confidence trajectory point in the high-confidence reference line and a single trajectory point in the initial route trajectory point sequence. The fourth set threshold can be the maximum value of the Hausdorff distance between a high-confidence trajectory point in the high-confidence reference line and a single trajectory point in the initial route trajectory point sequence for a pre-defined normal driving trajectory. For example, the fourth set threshold can be 40m. Trajectory points with a Hausdorff distance greater than or equal to the fourth set threshold can be understood as trajectories that deviate significantly from the high-confidence trajectory points in the high-confidence reference line, i.e., there may be detour scenarios. The deviation trajectory point sequence can be the sequence of all trajectory points in the initial route trajectory point sequence whose Hausdorff distance is greater than or equal to the fourth set threshold. The deviation trajectory point sequence can be used to characterize the degree of deviation from the high-confidence reference line that exceeds the normal range. The first and last trajectory points in the deviation trajectory point sequence can be the earliest and latest trajectory points in the sequence, determined based on time order. A multiplier can be used to assist in filtering detour scenarios. The multiplier can be a pre-defined multiple of the straight-line distance between the first and last trajectory points in the deviation trajectory point sequence. For example, the multiplier could be 3 times. The shortest path distance between the first and last trajectory points in the road network can be used as a reference distance between them. The shortest path distance between the first and last trajectory points in the road network can be used to assist in filtering detour scenarios.

[0144] like Figure 8BAs shown, the Hausdorff distances between a high-confidence trajectory point x in the high-confidence reference line and each trajectory point a, b, c, d, and e in the initial route trajectory point sequence can be calculated. The Hausdorff distances corresponding to each trajectory point can be compared with a fourth preset threshold. Trajectory points a, b, and c whose Hausdorff distances are greater than or equal to the fourth preset threshold are identified as deviations from the trajectory point sequence. The straight-line distances between the first and last sequences a and c of the deviation trajectory point sequence can be detected. The shortest path distance between the first and last trajectory points a and c in the road network is obtained. A comparison can be made between three times the straight-line distance between the first and last sequences of the deviation trajectory point sequence and the shortest path distance between the first and last trajectory points in the road network. If three times the straight-line distance between the first and last trajectory points of the deviation trajectory point sequence is greater than the shortest path distance between the first and last trajectory points in the road network, a detour scenario is identified.

[0145] This scheme calculates the Hausdorff distance between high-confidence trajectory points in the high-confidence reference line and each trajectory point in the initial route trajectory point sequence, taking into account the differences between the high-confidence trajectory points in the high-confidence reference line and the trajectory points in the initial route trajectory point sequence. Trajectory points with a Hausdorff distance greater than or equal to a fourth preset threshold are identified as deviation trajectory point sequences. The fourth preset threshold is introduced to filter deviation trajectory point sequences. Furthermore, the scheme incorporates the shortest path distance between the first and last trajectory points in the known road network. By comparing the set multiple of the straight-line distance between the first and last trajectory points in the deviation trajectory point sequence with the shortest path distance between the first and last trajectory points in the road network, it achieves the detection of detour scenarios, thereby improving the accuracy of detour scenario detection.

[0146] S830. If so, then determine the waypoint based on the high-confidence trajectory point in the high-confidence reference line.

[0147] Optionally, if so, the high-confidence trajectory points in the high-confidence reference line are directly determined as waypoints.

[0148] Optionally, if so, the high-confidence trajectory points in each high-confidence reference line are determined as candidate path points. The candidate path points can be filtered according to a set ratio to obtain the path points. The specific method for determining path points can also refer to the scheme provided in the foregoing embodiments.

[0149] S840. Based on the waypoints, return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm, and re-execute the detour correction strategy until a corrected route trajectory point sequence without detour scenarios is obtained.

[0150] Specifically, the operation can be performed by returning the route point to determine the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm. That is, the initial route trajectory point sequence is generated again. Then, other abnormal scenario correction strategies can be executed again until a corrected route trajectory point sequence without abnormal scenarios is obtained, or after a set number of returns, it is judged as a failure to generate.

[0151] S850. If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence for the bus route to be updated.

[0152] According to the technical solution disclosed herein, by specifying the scene shaping strategy as a detour shaping strategy, the system identifies whether a detour scenario exists in the initial route trajectory point sequence. If so, it determines the waypoint based on the high-confidence trajectory points in the high-confidence reference line. Based on the waypoint, it returns to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm, and re-executes the detour shaping strategy until a corrected route trajectory point sequence without detour scenarios is obtained. By using the high-confidence trajectory points in the high-confidence reference line to obtain the waypoint in the detour scenario, and correcting the initial route trajectory point sequence based on the waypoint, the system achieves detour shaping of the initial route trajectory point sequence, improving the targeting and correction efficiency of detour shaping.

[0153] Figure 9A This is a flowchart illustrating the road crossing modification process in a method for generating bus routes provided in this embodiment of the disclosure. Figure 9B This is a schematic diagram of the trajectory in a cross-road scenario according to an embodiment of this disclosure. Further optimizations and extensions are made based on the above technical solution, and it can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as: a cross-road shaping strategy; correspondingly, based on the cross-road shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, specifically: identifying cross-road trajectory points in the initial route trajectory point sequence; and correcting the coordinates of the cross-road trajectory points according to the adjacent road network segments to obtain the corrected route trajectory point sequence.

[0154] Cross-road trajectory points can be trajectory points in the initial route trajectory point sequence that cross multiple adjacent road network segments. The accuracy of the data acquisition equipment used to collect the initial route trajectory recognition sequence, the routing algorithm settings, and errors in the road network data can all lead to cross-road trajectory points in the initial route trajectory point sequence. Because road network segments may contain parallel segments, two-way segments, or main and auxiliary roads, during the aforementioned road network-based routing calculation, there may be situations where route trajectory points fall into different road segments, i.e., cross-road points occur.

[0155] Cross-road trajectory points have a corresponding time sequence. Based on the time sequence and location coordinates of the cross-road trajectory points, their direction can be determined. Adjacent road network segments also have corresponding directions. Lines in the same direction within adjacent road network segments can accurately identify cross-road trajectory points. Optionally, these lines can be adjacent road network segments with the same direction.

[0156] like Figure 9A As shown, in an optional embodiment of this disclosure, identifying cross-road trajectory points in the initial route trajectory point sequence includes:

[0157] S910. For the initial sequence of trajectory points, traverse the sequence in groups of three consecutive trajectory points.

[0158] S920. If the first point of the three trajectory points forms an obtuse angle with the last two points, and the distance between the first point and the vertex of the obtuse angle is greater than the fifth set threshold, then the recognition of cross-road trajectory points is triggered.

[0159] S930. Based on the two straight lines determined by the three trajectory points, determine a buffer zone within a set range around the three trajectory points.

[0160] S940. Identify road segments that intersect with the buffer zone from adjacent road network segments.

[0161] S950. From the road network segments within the intersection range, determine the road network segments that are in the same direction as the last two trajectory points, and use them as lines in the same direction.

[0162] S960. If the length difference between the length between the last two trajectory points and the length of the segment corresponding to the first and last trajectory points of the same direction line is greater than the sixth set threshold, then the last two trajectory points are determined to be cross-road trajectory points.

[0163] Traversing a group of three consecutive trajectory points, we can consider the relative positional relationships between different trajectory points, i.e., the angles formed by different trajectory points. If the first point of the three trajectory points forms an obtuse angle with the next two points, and the distance between the first point and the vertex of the obtuse angle is greater than a fifth preset threshold, it can be interpreted as a deviation in the trajectory between the first and next points, and if the deviation is significant, it is considered a road crossing, requiring further identification. The fifth preset threshold can be the maximum distance between the first point (which appears earlier in the time sequence) and the vertex of the obtuse angle among the three trajectory points. If the distance between the first point and the vertex of the obtuse angle reaches a certain level, such as greater than 5 meters, the distance between two roads indicates a road crossing. If the distance is small, it may just be a slight deviation within the same road segment, rather than a road crossing.

[0164] The buffer zone can be a defined area within the three trajectory points, i.e., an area in the road network where there might be lines traveling in the same direction. The buffer zone can be used for targeted corrections to the three trajectory points. Intersecting road segments can be adjacent road network segments where the three trajectory points are located. Adjacent road network segments have a direction. Lines traveling in the same direction can be road network segments that share the same direction as the latter two trajectory points. That is, the actual road network segments where the latter two trajectory points should be distributed. The length difference between the lengths of the latter two trajectory points and the corresponding segments of the lines traveling in the same direction needs to be calculated to determine whether it is a cross-road trajectory point. The lines traveling in the same direction correspond to the segments of the first and last trajectory points among the three trajectory points. Perpendicular lines can be drawn from the first and last trajectory points to the lines traveling in the same direction, and the segment between the two perpendicular points is recorded as the segment corresponding to the lines traveling in the same direction. The difference between the two lengths represents the degree of difference in the trajectory after crossing the road. Specifically, the larger the length difference, for example, greater than 5m, the greater the difference in travel distance after crossing the road. A sixth threshold can be used to assist in identifying whether the latter two trajectory points are cross-road trajectory points that need correction. This can be understood as follows: if the length difference is large, meaning there is a significant difference between the line in the same direction and the straight line to which the latter two trajectory points belong, then the latter two trajectory points need to be corrected. Conversely, if the difference is small, then the latter two trajectory points may not need to be corrected. When correcting trajectory points that cross roads, the road network segment closest to the crossing trajectory point can be used for correction, such as the road network segment to which the line in the same direction belongs.

[0165] like Figure 9B As shown, the initial line trajectory point sequence can be traversed in groups of three consecutive trajectory points. The angle formed between the first point a and the next two points b and c in the three trajectory points a, b, and c can be judged. If the angle between the first point a and the next two points b and c forms an obtuse angle, and the distance between the first point a and the vertex b of the obtuse angle is greater than a fifth preset threshold, then cross-line trajectory point identification is triggered. Based on the two straight lines determined by the three trajectory points, a buffer zone (e.g., within 2m of the line to which the trajectory points belong) within the preset range of the three trajectory points can be generated according to the preset range of the three trajectory points (e.g., within 2m of the line to which the trajectory points belong). Figure 9B (As shown in the dashed box). Based on the coordinates of the three trajectory points and the positions of adjacent road network segments, road segments that intersect with the buffer zone can be determined from the adjacent road network segments. Based on the direction of the road network segments within the intersection range, road network segments belonging to the same direction as the latter two trajectory points b and c are determined as the same-direction line L. The length M1 between the latter two trajectory points can be calculated. The length M2 of the segment corresponding to the first trajectory point a and the last trajectory point c is defined. The length difference M3 between the two lengths M1 and M2 is calculated and compared with a sixth preset threshold. If the length difference M3 is greater than the sixth preset threshold, trajectory points b and c are determined to be cross-road trajectory points and need to be corrected.

[0166] This scheme improves traversal efficiency by iterating through the initial sequence of trajectory points in groups of three consecutive points, taking into account the positional relationships between the three points. It also simplifies the process of determining cross-road trajectory points, improving the efficiency of cross-road trajectory point selection. By utilizing buffers and road network data, it narrows the search range for lines in the same direction, further improving the selection efficiency. Finally, by calculating the length difference between the line in the same direction and the straight lines to which the last two trajectory points belong, it considers the proximity between the line in the same direction and the straight lines to which the last two trajectory points belong, further improving the accuracy of cross-road shaping.

[0167] Optionally, after performing cross-road shaping on the initial route trajectory point sequence, you can return to perform cross-road shaping recognition again. If it still exists, you can continue to return to shaping, or you can abandon this initial route trajectory point sequence and consider it as a failure to generate.

[0168] Figure 10 This is a flowchart illustrating jumper line shaping in a method for generating bus routes according to an embodiment of this disclosure. It further optimizes and expands upon the above technical solution and can be combined with the various optional implementation methods described above. Based on the above embodiments, the scene shaping strategy is specified as a jumper line shaping strategy; correspondingly, based on the jumper line shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, specifically including:

[0169] S1010. Identify whether each trajectory point in the initial route trajectory point sequence is located on a nearby road network segment.

[0170] S1020 If it is not on a nearby road network segment, it is determined as a jump point.

[0171] S1030. If the jump point is identified as belonging to a point-line separation scenario, the jump point is retained; otherwise, the jump point is deleted.

[0172] The adjacent road network segment can be the road network segment closest to the initial route trajectory point sequence. Among them, the adjacent road network segment is usually the road network segment traversed by the driving trajectory corresponding to the initial travel trajectory point sequence.

[0173] Specifically, the system can detect the shortest distance between each trajectory point in the initial route trajectory point sequence and adjacent road network segments. It can compare the shortest distance corresponding to each trajectory point in the initial route trajectory point sequence with a preset distance threshold. If the detected shortest distance is greater than the preset distance threshold, it indicates that the trajectory point corresponding to that shortest distance in the initial route trajectory point sequence is not on an adjacent road network segment; if the detected shortest distance is less than the preset distance threshold, it indicates that the trajectory point corresponding to that shortest distance in the initial route trajectory point sequence is on an adjacent road network segment. The preset distance threshold is used to assist in determining whether a trajectory point in the initial route trajectory point sequence is located on an adjacent road network segment. The preset distance threshold can be a pre-set upper limit value for the shortest distance between each trajectory point in the initial route trajectory point sequence and adjacent road network segments.

[0174] If the trajectory point corresponding to the initial route trajectory point sequence is not detected on the adjacent road network segment, then the trajectory point is determined to be a jump point.

[0175] Optionally, jump points can belong to either point-to-link scenarios or point-to-line separation scenarios. In point-to-link scenarios, a jump point can be one that does not belong to an adjacent road network segment. In fact, in point-to-link scenarios, jump points are often considered unreasonable, meaning their locations are incorrect. Therefore, deleting jump points can refine the initial route trajectory point sequence. For example, some high-confidence trajectory points or trajectory points obtained through route calculation may be illegal or abnormal trajectory points.

[0176] The point-to-line separation scenario refers to a situation where the jump point and the adjacent road network segments are separated. In fact, in point-to-line separation scenarios, it is reasonable for the jump point and the adjacent road network segments to be separated. In this case, do not strongly bind the jump point and the adjacent road network segments; the jump point can be retained. For example, when a bus enters a stop, it may enter an area outside the road network segment. If the stop is far from the road network segment, a point-to-line separation scenario may occur, but it is still reasonable.

[0177] In one optional embodiment of this disclosure, identifying a jump point as belonging to a point-line separation scenario includes: obtaining existing historical bus routes corresponding to the bus route to be updated; determining the historical distance between the jump point and the trajectory point in the historical bus route, and the jump line distance between the jump point and the adjacent road network segment; if the difference between the historical distance and the jump line distance is less than or equal to a seventh preset threshold, then the jump point is determined to belong to a point-line separation scenario.

[0178] Historical bus routes can be existing bus routes in the database that correspond to the bus route to be updated. In comparison, historical bus routes are bus routes that have existed, but the bus route to be updated may have stops or track points that are either yet to be updated or have already been updated. Historical distance can be the shortest distance between the jump point and a track point in the historical bus route. Jump line distance can be the shortest distance between the jump point and adjacent road network segments. The difference between historical distance and jump line distance can be used to help determine whether the jump point is a historical stop or historical track point. A difference between historical distance and jump line distance less than or equal to the seventh set threshold can be understood as the consistency between the relative distance between the jump point and the historical bus route and the relative distance between the jump point and adjacent road network segments. That is, the jump point already exists in the historical bus route, and this jump point can be a historical stop or historical track point. The point-line separation scenario refers to a scenario where the jump point and adjacent road network segments are separated. In fact, in the point-line separation scenario, it is reasonable for the jump point and adjacent road network segments to be separated. When the jump point may be a historical trajectory point or a historical station, it can be determined that the jump point belongs to a point-line separation scenario.

[0179] This solution obtains the existing historical bus routes corresponding to the bus route to be updated, determines the historical distance between the jump point and the trajectory point in the historical bus route, and the jump line distance between the jump point and the adjacent road network segment. It compares the distance difference between the historical distance and the jump line distance with a seventh set threshold, thereby realizing the detection of whether the jump point belongs to the point-line separation scenario and improving the detection efficiency of the scenario to which the jump point belongs.

[0180] Optionally, after performing jumper shaping on the initial line trajectory point sequence, you can return to perform jumper shaping recognition again. If it still exists, you can continue to return to shaping, or you can abandon this initial line trajectory point sequence and consider it as a failure to generate.

[0181] According to the technical solution of this disclosure, by specifying the scene shaping strategy as a jump line shaping strategy, the jump point detection in the initial line trajectory point sequence is realized by judging whether each trajectory point in the initial line trajectory point sequence is located on the adjacent road network segment; by identifying whether the jump point belongs to the point-line separation scenario, different processing methods are adopted for different scenarios to which the jump point belongs, thereby realizing the jump line shaping of the initial line trajectory point sequence and improving the targeting and correction efficiency of the jump line shaping.

[0182] The abnormal scenarios provided in the above embodiments of this disclosure may include loop scenarios, flying line scenarios, zigzag scenarios, detour scenarios, reverse driving scenarios, road crossing scenarios, and jump line scenarios. The shaping strategies for the above abnormal scenarios can be executed individually, in parallel, or sequentially. Preferably, after matching with a high-confidence reference line, the waypoints are supplemented and the route is recalculated to obtain an initial route trajectory point sequence. Then, the shaping strategies for abnormal scenarios such as zigzag scenarios, loop scenarios, detour scenarios, and jump line scenarios are executed sequentially to finally obtain a target route trajectory point sequence that meets the set update conditions, so as to update the bus route database.

[0183] Figure 11 This is a schematic diagram of a bus route generation device according to an embodiment of the present disclosure. This embodiment is applicable to the automated generation of route trajectory point sequences for bus routes. It can be used to initially establish data for each bus route, or to continuously update and change bus routes. This method can be executed by a bus route generation device, which can be implemented in hardware and / or software and can be configured in an electronic device that carries the function of generating bus routes, such as a server that needs to provide bus services or a server used to maintain a bus route database. (Reference) Figure 11 The device specifically includes the following: an initial route trajectory point sequence acquisition module 1110, a bus route shaping module 1120, and a bus route generation module 1130. The initial route trajectory point sequence acquisition module 1110 is used to determine the initial route trajectory point sequence of the bus route to be updated based on a set routing algorithm; the bus route shaping module 1120 is used to correct the initial route trajectory point sequence based on a scene shaping strategy for at least one bus route to obtain a corrected route trajectory point sequence; and the bus route generation module 1130 is used to determine the corrected route trajectory point sequence as the target route trajectory point sequence of the bus route to be updated if it meets a set update condition.

[0184] According to the technical solution disclosed herein, the target route trajectory point sequence of the bus route to be updated can be automatically generated, which improves the completeness and accuracy of the bus route to be updated, reduces the dependence on manual labor, reduces the production and maintenance costs of the bus route to be updated, and improves the production efficiency and data timeliness of the bus route to be updated; the shaping is performed based on different scenario shaping strategies, taking into account the scenario of the trajectory points of the bus route to be updated, and the accuracy of the bus route to be updated is higher.

[0185] In an optional embodiment of this disclosure, the apparatus further includes: a trajectory point sequence acquisition module, used to acquire the trajectory point sequences of each of the multiple positioning devices moving along the bus route to be updated; and a high-confidence trajectory point filtering module, used to determine high-confidence trajectory points that meet the confidence conditions from the trajectory point sequences based on a trusted data source or a trusted algorithm.

[0186] In an optional embodiment of this disclosure, the initial route trajectory point sequence generation module 1110 includes: an initial route trajectory point sequence generation unit, which is used to process the known station coordinates and road network data within the area to which the bus route to be updated belongs, as well as the high-reliability trajectory points in the bus route to be updated, based on a set route calculation algorithm, to determine at least one initial route trajectory point sequence of the bus route to be updated.

[0187] In one optional embodiment of this disclosure, the initial route trajectory point sequence generation unit includes: a candidate road segment trajectory point sequence determination subunit, used to determine multiple candidate road segment trajectory point sequences connecting each known station based on road network data; and an initial route trajectory point sequence generation subunit, used to match and fuse the high-confidence trajectory points with each candidate road segment trajectory point sequence based on a set routing algorithm to determine at least one initial route trajectory point sequence for the bus route to be updated.

[0188] In one optional embodiment of this disclosure, the scene shaping strategy includes a reference line shaping strategy and at least one abnormal shaping strategy; correspondingly, the bus route shaping module 1120 includes: a reference line shaping unit, used to adjust the initial route trajectory point sequence based on the reference line shaping strategy and high-confidence trajectory points in the high-confidence reference line; and an abnormal shaping unit, used to correct the initial route trajectory point sequence based on at least one abnormal shaping strategy to obtain a corrected route trajectory point sequence.

[0189] In an optional embodiment of this disclosure, the reference line shaping unit includes: a line matching degree calculation subunit, used to calculate the line matching degree between the initial route trajectory point sequence and the high-confidence reference line; a waypoint filtering subunit, used to determine waypoints based on the high-confidence trajectory points in the high-confidence reference line if the line matching degree does not meet the matching degree requirement; and a return route calculation subunit, used to return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm, according to the waypoints.

[0190] In an optional embodiment of this disclosure, the linear matching degree calculation subunit includes: a linear matching degree calculation slave unit, used to calculate the bidirectional Hausdorff distance between the trajectory points in the initial line trajectory point sequence and the high-confidence trajectory points in the high-confidence reference line; if the bidirectional Hausdorff distance is greater than a first set threshold, it is determined that the linear matching degree does not meet the matching degree requirement.

[0191] In an optional embodiment of this disclosure, the waypoint filtering subunit includes: a candidate waypoint filtering subunit, used to calculate the Hausdorff distance between each high-confidence trajectory point in the high-confidence reference line and the trajectory points in the initial line trajectory point sequence, and select the high-confidence trajectory point with the largest Hausdorff distance as a candidate waypoint; a set ratio filtering subunit, used to filter from multiple candidate waypoints according to a set ratio; and a waypoint to be added determination subunit, used to determine the waypoint to be added based on the filtered candidate waypoints.

[0192] In one optional embodiment of this disclosure, the scene shaping strategy includes a loop shaping strategy. The bus route shaping module 1120 or the abnormal shaping unit includes: a loop scene detection unit, used to identify whether the initial route trajectory point sequence includes a closed area, and if a closed area exists, it is determined that a loop scene exists; and a loop correction unit, used to correct the trajectory points in the initial route trajectory point sequence that belong to the closed area, so as to obtain a corrected route trajectory point sequence.

[0193] In an optional embodiment of this disclosure, the loop scene detection unit includes: a trajectory point distance identification subunit, configured to identify whether there exists a distance between any two trajectory points in the initial line trajectory point sequence that is less than or equal to a second preset threshold; an intersecting trajectory point detection subunit, configured to, if so, identify two trajectory points that meet the second preset threshold condition as intersecting trajectory points, and identify whether a first distance between a trajectory point between two intersecting trajectory points and the first intersecting trajectory point is greater than or equal to a second distance between the two intersecting trajectory points; and a loop trajectory point determination subunit, configured to, if so, determine that the trajectory point is a loop trajectory point; correspondingly, the loop correction unit includes: a loop correction subunit, configured to delete the loop trajectory point to obtain the corrected line trajectory point sequence.

[0194] In one optional embodiment of this disclosure, the scene shaping strategy includes a flying line shaping strategy. The bus route shaping module 1120 or abnormal shaping unit includes: a redundant trajectory point identification unit, used to identify whether there are redundant trajectory points after the trajectory points that serve as the final station in the initial route trajectory point sequence; a flying line trajectory point filtering unit, used to, if so, treat the redundant trajectory points as flying line trajectory points; and a flying line shaping unit, used to delete the flying line trajectory points to obtain the corrected route trajectory point sequence.

[0195] In one optional embodiment of this disclosure, the scene shaping strategy includes a polyline shaping strategy. The bus route shaping module 1120 or the abnormal shaping unit includes: an abnormal polyline correction unit, used to identify whether there is an abnormal polyline in the initial route trajectory point sequence. If there is an abnormal polyline, the abnormal polyline is corrected to obtain a corrected route trajectory point sequence.

[0196] In an optional embodiment of this disclosure, the abnormal polyline correction unit includes: a first trajectory point identification subunit, configured to traverse and identify the initial line trajectory point sequence in groups of four consecutive trajectory points; a polyline edge identification subunit, configured to determine that if the first three trajectory points form an acute angle among the four trajectory points, the latter two trajectory points form a first polyline edge; and if the latter three trajectory points form an acute angle, the latter two trajectory points form a second polyline edge; an abnormal polyline detection subunit, configured to determine that the first polyline edge and the second polyline edge constitute an abnormal polyline if the distance between the first and last trajectory points of the acute angle formed by the first polyline edge and the second polyline edge is less than a third preset threshold, and to determine that the vertex trajectory point of the acute angle formed by the abnormal polyline is an acute angle trajectory point; and an abnormal polyline deletion subunit, configured to delete the acute angle trajectory points to obtain the corrected line trajectory point sequence.

[0197] In an optional embodiment of this disclosure, the scene shaping strategy includes a detour shaping strategy. The bus route shaping module 1120 or abnormal shaping unit includes: a detour scene identification unit, used to identify whether a detour scene exists in the initial route trajectory point sequence; a waypoint determination unit, used to determine a waypoint based on the high-confidence trajectory points in the high-confidence reference line if a detour scene exists; and a detour shaping unit, used to return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set routing algorithm, and re-execute the detour shaping strategy until a corrected route trajectory point sequence without detour scenes is obtained.

[0198] In one optional embodiment of this disclosure, the detour scene identification unit includes: a first Hausdorff distance calculation subunit, used to calculate the Hausdorff distance between a high-confidence trajectory point in the high-confidence reference line and each trajectory point in the initial line trajectory point sequence; and a detour scene identification subunit, used to determine each trajectory point whose Hausdorff distance is greater than or equal to a fourth preset threshold as a deviated trajectory point sequence, and if a preset multiple of the straight-line distance between the first and last trajectory points of the deviated trajectory point sequence is greater than the shortest path distance between the first and last trajectory points in the road network, then a detour scene is determined to exist.

[0199] In an optional embodiment of this disclosure, the scene shaping strategy includes a reverse-driving shaping strategy. The bus route shaping module 1120 or abnormal shaping unit includes: a reverse-driving scene identification unit, used to determine a reverse-driving scene if the initial route trajectory point sequence is found to be in the opposite direction to adjacent road network segments; and a reverse-driving shaping unit, used to migrate and correct the initial route trajectory point sequence based on the coordinates of the reverse-driving segments associated with the adjacent road network segments to obtain a corrected route trajectory point sequence.

[0200] In one optional embodiment of this disclosure, the scene shaping strategy includes a cross-road shaping strategy. Then, the bus route shaping module 1120 or the abnormal shaping unit includes: a cross-road trajectory point identification unit, used to identify cross-road trajectory points in the initial route trajectory point sequence; and a cross-road shaping unit, used to correct the coordinates of the cross-road trajectory points according to the same-direction lines of the cross-road trajectory points in adjacent road network segments, so as to obtain a corrected route trajectory point sequence.

[0201] In an optional embodiment of this disclosure, the cross-road trajectory point identification unit includes: a second trajectory point identification subunit, used to traverse the initial line trajectory point sequence in groups of three consecutive trajectory points; a cross-road trajectory point triggering identification subunit, used to trigger the identification of a cross-road trajectory point if the first point of the three trajectory points forms an obtuse angle with the last two points, and the distance between the first point and the vertex of the obtuse angle is greater than a fifth preset threshold; a buffer zone determination subunit, used to determine a buffer zone within a set range around the three trajectory points based on two straight lines determined by the three trajectory points; an intersection segment determination subunit, used to determine a segment from adjacent road network segments that intersects with the buffer zone; a same-direction line determination subunit, used to determine a road network segment from the road network segments within the intersection range that is in the same direction as the last two trajectory points, as a same-direction line; and a cross-road trajectory point identification subunit, used to determine the last two trajectory points as cross-road trajectory points if the length difference between the length between the last two trajectory points and the length of the segment corresponding to the first and last trajectory points of the same-direction line is greater than a sixth preset threshold.

[0202] In an optional embodiment of this disclosure, the scene shaping strategy includes a jump line shaping strategy. The bus route shaping module 1120 or the abnormal shaping unit includes: a trajectory point detection unit, used to identify whether each trajectory point in the initial route trajectory point sequence is located on a neighboring road network segment; a jump point identification unit, used to determine a jump point if it is not on a neighboring road network segment; and a jump line shaping unit, used to retain the jump point if it is identified as belonging to a point-line separation scene, otherwise delete the jump point.

[0203] In an optional embodiment of this disclosure, the jump line shaping unit includes: a historical bus route acquisition subunit, used to acquire existing historical bus routes corresponding to the bus route to be updated; a historical distance detection subunit, used to determine the historical distance between the jump point and the trajectory point in the historical bus route, and the jump line distance between the jump point and the adjacent road network segment; and a jump point scene classification unit, used to determine that the jump point belongs to the point-line separation scene if the distance difference between the historical distance and the jump line distance is less than or equal to a seventh preset threshold.

[0204] The technical solution disclosed herein involves the collection, storage, use, processing, transmission, provision, and disclosure of the respective operating trajectory point sequences of multiple positioning devices moving along the bus route to be updated, as well as the collection, storage, use, processing, transmission, provision, and disclosure of existing historical bus routes corresponding to the bus route to be updated. All of these comply with relevant laws and regulations and do not violate public order and good morals.

[0205] The bus route generation device described above can execute the bus route generation method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the bus route generation method.

[0206] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0207] Figure 12 A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0208] like Figure 12 As shown, device 1200 includes a computing unit 1210, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1220 or a computer program loaded from storage unit 1280 into random access memory (RAM) 1230. The RAM 1230 may also store various programs and data required for the operation of device 1200. The computing unit 1210, ROM 1220, and RAM 1230 are interconnected via bus 1240. Input / output (I / O) interface 1250 is also connected to bus 1240.

[0209] Multiple components in device 1200 are connected to I / O interface 1250, including: input unit 1260, such as keyboard, mouse, etc.; output unit 1270, such as various types of monitors, speakers, etc.; storage unit 1280, such as disk, optical disk, etc.; and communication unit 1290, such as network card, modem, wireless transceiver, etc. Communication unit 1290 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0210] The computing unit 1210 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1210 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1210 performs the various methods and processes described above, such as the method for generating bus routes. For example, in some embodiments, the method for generating bus routes may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1280. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1200 via ROM 1220 and / or communication unit 1290. When the computer program is loaded into RAM 1230 and executed by the computing unit 1210, one or more steps of the method for generating bus routes described above may be performed. Alternatively, in other embodiments, the computing unit 1210 may be configured to perform a method for generating bus routes by any other suitable means (e.g., by means of firmware).

[0211] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0212] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0213] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0214] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0215] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0216] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem that addresses the management difficulties and weak business scalability inherent in traditional physical hosting and VPS services. Servers can also be servers for distributed systems or servers integrated with blockchain technology.

[0217] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0218] Cloud computing refers to a technology system that enables access to a shared pool of physical or virtual resources via a network. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as for model training.

[0219] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.

[0220] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for generating bus routes, comprising: Based on the established route calculation algorithm, the initial route trajectory point sequence of the bus route to be updated is determined; Based on a scene shaping strategy for at least one bus route, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence. If the corrected route trajectory point sequence meets the set update conditions, it is determined as the target route trajectory point sequence of the bus route to be updated. The scene reshaping strategy includes a reference line reshaping strategy and at least one anomaly reshaping strategy; Accordingly, based on the scene shaping strategy of at least one bus route, the initial route trajectory point sequence is corrected to obtain the corrected route trajectory point sequence, including: Based on the reference line shaping strategy, the initial line trajectory point sequence is adjusted according to the high-confidence trajectory points in the high-confidence reference line; Based on at least one anomaly correction strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence. The adjustment of the initial trajectory point sequence based on the reference line shaping strategy, according to the high-confidence trajectory points in the high-confidence reference line, includes: Calculate the linear matching degree between the initial line trajectory point sequence and the high-confidence reference line; If the linear matching degree does not meet the matching degree requirement, then the waypoint is determined based on the high-confidence trajectory points in the high-confidence reference line; Based on the aforementioned waypoints, return to execute the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm.

2. The method according to claim 1, further comprising: Obtain the sequence of running trajectory points for each of the multiple positioning devices moving along the bus route to be updated; Based on a trusted data source or a trusted algorithm, high-confidence trajectory points that meet the trusted conditions are determined from the sequence of running trajectory points.

3. The method according to claim 1 or 2, wherein, Based on the established route calculation algorithm, the initial sequence of route trajectory points for the bus route to be updated is determined as follows: Based on the known station coordinates and road network data within the area of ​​the bus route to be updated, as well as the high-reliability trajectory points in the bus route to be updated, the data is processed using a set route calculation algorithm to determine at least one initial sequence of route trajectory points for the bus route to be updated.

4. The method according to claim 3, wherein, Based on the known station coordinates and road network data within the area of ​​the bus route to be updated, as well as the high-reliability trajectory points of the bus route to be updated, a predetermined route calculation algorithm is used to determine at least one initial route trajectory point sequence for the bus route to be updated, including: Based on road network data, determine a sequence of multiple candidate road segment trajectory points connecting each known station; The highly reliable trajectory points are matched and fused with the trajectory point sequences of each candidate road segment based on a set route calculation algorithm to determine at least one initial route trajectory point sequence for the bus route to be updated.

5. The method according to claim 1, wherein, Calculating the linear matching degree between the initial line trajectory point sequence and the high-confidence reference line includes: The bidirectional Hausdorff distance is calculated between the trajectory points in the initial line trajectory point sequence and the high-confidence trajectory points in the high-confidence reference line. If the bidirectional Hausdorff distance is greater than a first set threshold, it is determined that the linear matching degree does not meet the matching degree requirement.

6. The method according to claim 1, wherein, Determining the waypoints based on the high-confidence trajectory points in the high-confidence reference line includes: Calculate the Hausdorff distance between each high-confidence trajectory point in the high-confidence reference line and the trajectory points in the initial line trajectory point sequence, and select the high-confidence trajectory point with the largest Hausdorff distance as the candidate waypoint. From the multiple candidate pathways, a selection is made according to a set ratio; The selected candidate waypoints are used to determine the waypoints to be added.

7. The method according to claim 1, wherein, The scene shaping strategy includes a loop shaping strategy. Based on the loop shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence, including: Identify whether the initial line trajectory point sequence includes a closed area; if a closed area exists, it is determined that a loop scenario exists. The trajectory points belonging to closed regions in the initial line trajectory point sequence are corrected to obtain a corrected line trajectory point sequence.

8. The method according to claim 7, wherein, Identifying whether the initial line trajectory point sequence includes a closed region; if a closed region exists, it is determined to be a loop scenario, including: Identify whether there exists a distance between any two trajectory points in the initial line trajectory point sequence that is less than or equal to a second preset threshold; If so, the two trajectory points that meet the second set threshold condition are taken as intersecting trajectory points, and it is identified whether the first distance between the trajectory point between the two intersecting trajectory points and the first intersecting trajectory point is greater than or equal to the second distance between the two intersecting trajectory points. If so, then the trajectory point is determined to be a loop trajectory point; Accordingly, the trajectory points belonging to closed regions in the initial trajectory point sequence are corrected to obtain a corrected trajectory point sequence, including: The loop trajectory points are deleted to obtain the corrected line trajectory point sequence.

9. The method according to claim 1, wherein, The scene shaping strategy includes a flying line shaping strategy. Based on the flying line shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence, including: After identifying the trajectory points that serve as the final station in the initial line trajectory point sequence, are there any redundant trajectory points? If so, treat the extra trajectory points as flight line trajectory points; The flying line trajectory points are deleted to obtain the corrected line trajectory point sequence.

10. The method according to claim 1, wherein, The scene shaping strategy includes a polyline shaping strategy. Based on the polyline shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, including: The system identifies whether there are abnormal broken lines in the initial line trajectory point sequence. If abnormal broken lines are found, they are corrected to obtain a corrected line trajectory point sequence.

11. The method according to claim 10, wherein, Identify whether there are abnormal polylines in the initial route trajectory point sequence. If abnormal polylines exist, correct them to obtain a corrected route trajectory point sequence, including: For the initial sequence of trajectory points, traverse and identify them in groups of four consecutive trajectory points; If, among the four trajectory points, the first three trajectory points are identified as forming an acute angle, then the last two trajectory points are determined to form the first broken line edge; if, among the last three trajectory points are identified as forming an acute angle, then the last two trajectory points are determined to form the second broken line edge. If the distance between the first and second broken line edges of the acute angle formed by the first broken line edge and the second broken line edge is less than the third set threshold, then the first broken line edge and the second broken line edge are determined to constitute an abnormal broken line, and the vertex trajectory point of the acute angle formed by the abnormal broken line edge is determined to be the acute angle trajectory point. Delete the acute-angle trajectory points to obtain the corrected line trajectory point sequence.

12. The method according to claim 1, wherein, The scene shaping strategy includes a detour shaping strategy. Based on the detour shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, including: Identify the initial route trajectory point sequence to determine if any detours exist; If so, then the waypoint is determined based on the high-confidence trajectory points in the high-confidence reference line; Based on the waypoints, return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm, and re-execute the detour correction strategy until a corrected route trajectory point sequence without detour scenarios is obtained.

13. The method according to claim 12, wherein, Identifying whether the initial route trajectory point sequence contains detour scenarios includes: Calculate the Hausdorff distance between the high-confidence trajectory points in the high-confidence reference line and each trajectory point in the initial line trajectory point sequence; For each trajectory point whose Hausdorf distance is greater than or equal to the fourth set threshold, it is determined to be a deviation trajectory point sequence. If the set multiple of the straight-line distance between the first and last trajectory points of the deviation trajectory point sequence is greater than the shortest path distance between the first and last trajectory points in the road network, it is determined that there is a detour scenario.

14. The method according to claim 1, wherein, The scene shaping strategy includes a reverse shaping strategy. Based on the reverse shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, including: If the initial route trajectory point sequence is found to be in the opposite direction to the adjacent road network segments, it is determined to be a reverse driving scenario; Based on the coordinates of the inverse road segments associated with the adjacent road network segments, the initial route trajectory point sequence is migrated and corrected to obtain a corrected route trajectory point sequence.

15. The method according to claim 1, wherein, The scene shaping strategy includes a cross-road shaping strategy. Based on the cross-road shaping strategy, the initial route trajectory point sequence is corrected to obtain a corrected route trajectory point sequence, including: Identify cross-road trajectory points in the initial route trajectory point sequence; Based on the same-direction lines of the cross-road trajectory points in adjacent road network segments, the coordinates of the cross-road trajectory points are corrected to obtain a corrected route trajectory point sequence.

16. The method according to claim 15, wherein, Identifying cross-road trajectory points in the initial route trajectory point sequence includes: For the initial sequence of trajectory points, traverse the sequence in groups of three consecutive trajectory points; If the first point of the three trajectory points forms an obtuse angle with the last two points, and the distance between the first point and the vertex of the obtuse angle is greater than the fifth set threshold, then the identification of cross-road trajectory points is triggered. Based on the two straight lines determined by the three trajectory points, a buffer zone is defined within a set range around the three trajectory points; Identify road segments from adjacent road network segments that intersect with the buffer zone; From the road network segments within the intersection range, identify the road network segments that are in the same direction as the latter two trajectory points, and use them as lines in the same direction; If the difference between the length between the last two trajectory points and the length of the segment corresponding to the first and last trajectory points of the same direction line is greater than the sixth preset threshold, then the last two trajectory points are determined to be cross-road trajectory points.

17. The method according to claim 1, wherein, The scene shaping strategy includes a jumper shaping strategy. Based on the jumper shaping strategy, the initial line trajectory point sequence is corrected to obtain a corrected line trajectory point sequence, including: Identify whether each trajectory point in the initial route trajectory point sequence is located on a nearby road network segment; If it is not on a nearby road network segment, it is determined as a jump point; If the jump point is identified as belonging to a point-line separation scenario, the jump point is retained; otherwise, the jump point is deleted.

18. The method according to claim 17, wherein, Identifying that the jump point belongs to a point-line separation scenario includes: Obtain the existing historical bus routes corresponding to the bus route to be updated. Determine the historical distance between the jump point and the trajectory point in the historical bus route, and the jump distance between the jump point and the adjacent road network segment; If the difference between the historical distance and the jump line distance is less than or equal to the seventh set threshold, then the jump point is determined to belong to the point-line separation scenario.

19. A bus route generation device, comprising: The initial route trajectory point sequence acquisition module is used to determine the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm. The bus route shaping module is used to correct the initial route trajectory point sequence based on the scene shaping strategy of at least one bus route, so as to obtain a corrected route trajectory point sequence. The bus route generation module is used to determine the target route trajectory point sequence of the bus route to be updated if the corrected route trajectory point sequence meets the set update conditions. The scene reshaping strategy includes a reference line reshaping strategy and at least one anomaly reshaping strategy; Correspondingly, the bus route shaping module includes: The reference line shaping unit is used to adjust the initial line trajectory point sequence based on the reference line shaping strategy and according to the high-confidence trajectory points in the high-confidence reference line; An anomaly correction unit is used to correct the initial line trajectory point sequence based on at least one anomaly correction strategy to obtain a corrected line trajectory point sequence. The reference line shaping unit includes: The linear matching degree calculation subunit is used to calculate the linear matching degree between the initial line trajectory point sequence and the high-confidence reference line; The waypoint filtering subunit is used to determine the waypoint based on the high-confidence trajectory points in the high-confidence reference line if the linear matching degree does not meet the matching degree requirement. The return path calculation subunit is used to return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set path calculation algorithm, according to the path points.

20. The apparatus of claim 19, further comprising: The trajectory point sequence acquisition module is used to acquire the trajectory point sequence of each of the multiple positioning devices moving along the bus route to be updated. The high-confidence trajectory point filtering module is used to determine high-confidence trajectory points that meet the confidence conditions from the sequence of running trajectory points based on a trusted data source or a trusted algorithm.

21. The apparatus according to claim 19, wherein, The initial trajectory point sequence generation module includes: The initial route trajectory point sequence generation unit is used to process known station coordinates and road network data within the area to which the bus route to be updated belongs, as well as high-reliability trajectory points in the bus route to be updated, based on a set route calculation algorithm, to determine at least one initial route trajectory point sequence for the bus route to be updated.

22. The apparatus according to claim 21, wherein, The initial trajectory point sequence generation unit includes: The candidate road segment trajectory point sequence determination subunit is used to determine multiple candidate road segment trajectory point sequences connecting known stations based on road network data; An initial route trajectory point sequence generation subunit is used to match and fuse the high-confidence trajectory points with the trajectory point sequences of each candidate road segment based on a set route calculation algorithm to determine at least one initial route trajectory point sequence for the bus route to be updated.

23. The apparatus according to claim 19, wherein, The linear matching degree calculation sub-unit includes: The linear matching degree calculation unit is used to calculate the bidirectional Hausdorff distance between the trajectory points in the initial line trajectory point sequence and the high-confidence trajectory points in the high-confidence reference line. If the bidirectional Hausdorff distance is greater than a first set threshold, it is determined that the linear matching degree does not meet the matching degree requirements.

24. The apparatus according to claim 19, wherein, The waypoint filtering subunit includes: The candidate waypoint filtering unit is used to calculate the Hausdorff distance between each high-confidence trajectory point in the high-confidence reference line and the trajectory points in the initial line trajectory point sequence, and select the high-confidence trajectory point with the largest Hausdorff distance as the candidate waypoint. The set ratio filtering unit is used to filter from multiple candidate path points according to a set ratio; The method for determining the waypoints to be added is a unit used to determine the waypoints to be added based on the filtered candidate waypoints.

25. The apparatus according to claim 19, wherein, The scene shaping strategy includes a loop shaping strategy. Therefore, the bus route shaping module or anomaly shaping unit includes: A loop scene detection unit is used to identify whether the initial line trajectory point sequence includes a closed area; if a closed area exists, it is determined that a loop scene exists. The loop correction unit is used to correct the trajectory points belonging to the closed area in the initial line trajectory point sequence to obtain the corrected line trajectory point sequence.

26. The apparatus according to claim 25, wherein, The loop scene detection unit includes: The trajectory point distance recognition subunit is used to identify whether there are any two trajectory points in the initial line trajectory point sequence whose distance is less than or equal to a second preset threshold. The intersecting trajectory point detection subunit is used to, if so, identify two trajectory points that meet the second preset threshold condition as intersecting trajectory points, and determine whether the first distance between the trajectory point between the two intersecting trajectory points and the first intersecting trajectory point is greater than or equal to the second distance between the two intersecting trajectory points. The loop trajectory point determination sub-unit is used to determine that the trajectory point is a loop trajectory point if it is true; Accordingly, the loop correction unit includes: The loop correction subunit is used to delete the loop trajectory points to obtain the corrected line trajectory point sequence.

27. The apparatus according to claim 19, wherein, The scene shaping strategy includes a flying line shaping strategy. Therefore, the bus route shaping module or abnormal shaping unit includes: The redundant trajectory point identification unit is used to identify whether there are redundant trajectory points after the trajectory points that serve as the final station in the initial line trajectory point sequence. The flying line trajectory point filtering unit is used to select redundant trajectory points as flying line trajectory points if necessary. The flying line shaping unit is used to delete the flying line trajectory points to obtain the corrected line trajectory point sequence.

28. The apparatus according to claim 19, wherein, The scene shaping strategy includes a polyline shaping strategy. Therefore, the bus route shaping module or anomaly shaping unit includes: An abnormal polyline correction unit is used to identify whether there are abnormal polylines in the initial line trajectory point sequence. If there are abnormal polylines, the abnormal polylines are corrected to obtain a corrected line trajectory point sequence.

29. The apparatus according to claim 28, wherein, The abnormal line correction unit includes: The first trajectory point recognition subunit is used to traverse and recognize the initial line trajectory point sequence in groups of four consecutive trajectory points. The polyline edge recognition subunit is used to determine that if the first three trajectory points form an acute angle among the four trajectory points, the last two trajectory points form the first polyline edge; if the last three trajectory points form an acute angle, the last two trajectory points form the second polyline edge. An abnormal polyline detection subunit is used to determine that the first polyline edge and the second polyline edge constitute an abnormal polyline if the distance between the first and last trajectory points of the acute angle formed by the first polyline edge and the second polyline edge is less than a third preset threshold, and to determine that the vertex trajectory point of the acute angle formed by the abnormal polyline is an acute angle trajectory point. The abnormal polyline deletion subunit is used to delete the acute-angle trajectory points to obtain the corrected line trajectory point sequence.

30. The apparatus according to claim 19, wherein, The scene shaping strategy includes a detour shaping strategy. Therefore, the bus route shaping module or abnormal shaping unit includes: The detour scene identification unit is used to identify whether there is a detour scene in the initial route trajectory point sequence; The waypoint determination unit is used to determine the waypoint based on the high-confidence trajectory points in the high-confidence reference line if the condition is met. The detour correction unit is used to return to the operation of determining the initial route trajectory point sequence of the bus route to be updated based on the set route calculation algorithm according to the route points, and re-execute the detour correction strategy until a corrected route trajectory point sequence without detour scenarios is obtained.

31. The apparatus according to claim 30, wherein, The detour scene recognition unit includes: The first Hausdorff distance calculation subunit is used to calculate the Hausdorff distance between the high-confidence trajectory points in the high-confidence reference line and each trajectory point in the initial line trajectory point sequence. The detour scene identification subunit is used to identify each trajectory point whose Hausdorf distance is greater than or equal to the fourth set threshold as a deviated trajectory point sequence. If the set multiple of the straight-line distance between the first and last trajectory points of the deviated trajectory point sequence is greater than the shortest path distance between the first and last trajectory points in the road network, then it is determined that a detour scene exists.

32. The apparatus according to claim 19, wherein, The scene shaping strategy includes a reverse shaping strategy, then the bus route shaping module or abnormal shaping unit includes: The reverse driving scene recognition unit is used to determine a reverse driving scene if the initial route trajectory point sequence is detected to be in the opposite direction to the adjacent road network segment. The reverse-traffic correction unit is used to migrate and correct the initial route trajectory point sequence based on the coordinates of the reverse-traffic segments associated with the adjacent road network segments, so as to obtain a corrected route trajectory point sequence.

33. The apparatus according to claim 19, wherein, The scene shaping strategy includes a cross-road shaping strategy. Therefore, the bus route shaping module or abnormal shaping unit includes: A cross-road trajectory point identification unit is used to identify cross-road trajectory points in the initial line trajectory point sequence; The cross-road shaping unit is used to correct the coordinates of the cross-road trajectory point based on the same-direction line in the adjacent road network segment, so as to obtain a corrected line trajectory point sequence.

34. The apparatus according to claim 33, wherein, The cross-road trajectory point recognition unit includes: The second trajectory point recognition subunit is used to traverse the initial line trajectory point sequence in groups of three consecutive trajectory points. The cross-road trajectory point trigger recognition subunit is used to trigger the recognition of cross-road trajectory points if the first point of the three trajectory points forms an obtuse angle with the last two points, and the distance between the first point and the vertex of the obtuse angle is greater than the fifth set threshold. The buffer determination subunit is used to determine a buffer zone within a set range around the three trajectory points based on two straight lines determined by the three trajectory points. The intersection segment determination sub-unit is used to determine the road segments that intersect with the buffer zone from the adjacent road network segments; The same-direction line determination sub-unit is used to determine the road network segments that are in the same direction as the last two trajectory points from the road network segments within the intersection range, and to serve as the same-direction line; The cross-road trajectory point identification subunit is used to determine the last two trajectory points as cross-road trajectory points if the length difference between the length between the last two trajectory points and the length of the segment corresponding to the first and last trajectory points of the same direction line is greater than a sixth preset threshold.

35. The apparatus according to claim 19, wherein, The scene shaping strategy includes a jumper shaping strategy. Therefore, the bus route shaping module or anomaly shaping unit includes: The trajectory point detection unit is used to identify whether each trajectory point in the initial route trajectory point sequence is located on an adjacent road network segment; Jump point identification unit, used to identify a jump point if it is not on a nearby road network segment; The jumper shaping unit is used to retain the jumper if it is identified that the jumper belongs to a dot-line separation scenario, and delete the jumper otherwise.

36. The apparatus according to claim 35, wherein, The jumper shaping unit includes: The historical bus route acquisition subunit is used to acquire the existing historical bus routes corresponding to the bus route to be updated. The historical distance detection subunit is used to determine the historical distance between the jump point and the trajectory point in the historical bus route, and the jump distance between the jump point and the adjacent road network segment. The jump point scene classification unit is used to determine that the jump point belongs to the point-line separation scene if the distance difference between the historical distance and the jump line distance is less than or equal to a seventh preset threshold.

37. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method for generating bus routes according to any one of claims 1-18.

38. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method for generating bus routes according to any one of claims 1-18.

39. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the method for generating bus routes according to any one of claims 1-18.

Citation Information

Patent Citations

  • Method for extracting bus route track based on bus GPS data and station information

    CN111210612A

  • Road network road correction method and device, computer readable medium and electronic equipment

    CN117541682A