Route sorting, route sorting model training, and training sample acquisition method and device
The training samples are obtained through user trajectory matching and planning route combination, abnormal trajectories are eliminated, and the route sorting model is optimized, which solves the problem of user experiences better route sorting recommendations in the existing technology, and achieves a more optimized route sorting result.
Patent Information
- Application Number
- CN201910979178.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-15
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2039-10-15
AI Technical Summary
In the prior art, how to sort routes with better user experiences are recommended to users through route sorting has not been effectively solved.
By matching the user trajectory points to the road, forming a trajectory route, and combining it with the starting and end point planning route, obtaining training samples, eliminating abnormal trajectories, using the route sorting model to train and predict, and optimizing the route sorting results.
The obtained training samples reflect user behavior, have good data distribution consistency, and the trained route sorting model can more accurately recommend routes with better user experience and improve travel experience.
Smart Images

Figure CN112666584B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map navigation technology, and in particular to a method and device for route sorting, route sorting model training, and training sample acquisition. Background Art
[0002] Users can obtain route planning from their departure point to their destination through travel applications installed on smart terminals or vehicles, such as map navigation apps or shared travel apps. The route planning process generally includes: recalling planned routes, sorting the recalled routes, and recommending the sorted routes to users for selection. The purpose of sorting is to recommend routes that provide users with a better travel experience to users first. Therefore, how to sort routes that provide a better experience first is a problem that technical personnel have been trying to solve. Summary of the Invention
[0003] In view of the above problems, the present invention is proposed to provide a method and apparatus for route sorting, route sorting model training, and training sample acquisition that overcomes the above problems or at least partially solves the above problems.
[0004] An embodiment of the present invention provides a method for obtaining training samples for a route ranking model, characterized by comprising:
[0005] Performing road matching on the track points included in the user track to obtain roads matched by the track points, and forming a track route corresponding to the user track with the roads;
[0006] The trajectory route and a planned route planned based on at least a starting point and an end point of the trajectory route are combined, and each route combination is used as a training sample.
[0007] In some optional embodiments, the method further comprises:
[0008] Determining, based on the time of the track points included in the user track, an actual road condition of a road included in the track route corresponding to the user track;
[0009] Route planning is performed based on the starting point and end point of the trajectory route and the actual road conditions of the trajectory route including the road to obtain a planned route.
[0010] In some optional embodiments, combining the trajectory route with a planned route based on at least a starting point and an end point of the trajectory route comprises:
[0011] For each planned route based on the starting and ending points of the trajectory route, perform the following steps:
[0012] The travel time of the trajectory route is compared with the travel time of each planned route. If the travel time of the trajectory route is less than the travel time of the planned route, the planned route is marked as not better than the trajectory route. Otherwise, the planned route is marked as better than the trajectory route, and the trajectory route and the marked planned route are combined.
[0013] In some optional embodiments, the method further includes:
[0014] At least those trajectory routes that have abnormal detours, illegal behaviors, entering or exiting internal roads, and abnormal stops are eliminated from the trajectory routes.
[0015] In some optional embodiments, the method further includes:
[0016] Obtaining the feature items of the trajectory route and the feature items of the corresponding planned route;
[0017] Each feature item of the trajectory route is compared with the corresponding feature item of the corresponding planned route. If the comparison difference of at least one feature item falls within the preset difference tolerance range of the feature item, the trajectory route is retained.
[0018] In some optional embodiments, the method further includes:
[0019] Divide the combined route combinations into N groups, where a route combination includes a trajectory route and at least one corresponding planned route;
[0020] Each time, randomly select N-1 groups of route combinations to train the preset route sorting model, and use the trained route sorting model to predict the remaining group of route combinations. If the prediction result shows that the trajectory route is ranked after the planned route, all route combinations of the trajectory route are deleted;
[0021] Repeat the above training and prediction steps until every combination has been predicted.
[0022] An embodiment of the present invention further provides a route sorting model training method, comprising:
[0023] Obtain training samples using the above-mentioned method for obtaining training samples for the route sorting model;
[0024] The acquired training samples are input into the route sorting model to be trained in batches until a route sorting model that meets the preset requirements is obtained.
[0025] An embodiment of the present invention further provides a route sorting method, comprising:
[0026] When a route planning request is received, planning at least one alternative route according to the route planning request;
[0027] Input the planned alternative routes into the pre-trained route sorting model to obtain the alternative route sorting results;
[0028] The route sorting model is trained using the training samples obtained using the training sample acquisition method for the route sorting model.
[0029] An embodiment of the present invention further provides a training sample acquisition device for a route sorting model, comprising:
[0030] A trajectory route acquisition module, configured to perform road matching on the trajectory points included in the user trajectory to obtain roads matching the trajectory points, and to form a trajectory route corresponding to the user trajectory from the roads;
[0031] The training sample acquisition module is used to combine the trajectory route with a planned route that is planned based on at least the starting point and the end point of the trajectory route, and each route combination is used as a training sample.
[0032] An embodiment of the present invention further provides a route sequencing model training device, comprising:
[0033] The training sample acquisition device of the route sorting model is used to acquire training samples;
[0034] The model training module is used to input the acquired training samples into the route sorting model to be trained in batches until a route sorting model that meets the preset requirements is obtained.
[0035] An embodiment of the present invention further provides a route sorting device, comprising:
[0036] An alternative route planning module, configured to plan at least one alternative route according to a route planning request when a route planning request is received;
[0037] The alternative route sorting module is used to input the planned alternative routes into a pre-trained route sorting model to obtain an alternative route sorting result; the route sorting model is trained using the training samples obtained using the training sample acquisition method of the route sorting model mentioned above.
[0038] An embodiment of the present invention also provides a computer-readable storage medium having computer instructions stored thereon, characterized in that when the instructions are executed by a processor, at least one of the following is implemented: the above-mentioned method for obtaining training samples of the route sorting model, the above-mentioned method for training the route sorting model, and the above-mentioned route sorting method.
[0039] An embodiment of the present invention also provides a map server, comprising: a memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, it can implement at least one of the following: the training sample acquisition method of the route sorting model mentioned above, the route sorting model training method mentioned above, and the route sorting method mentioned above.
[0040] The beneficial effects of the above technical solutions provided by the embodiments of the present invention include at least:
[0041] Training samples are obtained by matching trajectory routes based on user trajectories and combining them with planned routes based on the starting and ending points of the trajectories. This allows the obtained training samples to reflect user behavior, and user trajectories can be obtained from the entire user group, with good data distribution consistency. When the obtained training samples are used to train a route sorting model, the trained route sorting model is better. When the trained route sorting model is used to sort alternative routes, a more optimized route sorting result can be obtained, making the sorting result more in line with user needs and facilitating the user to select a better alternative route.
[0042] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0043] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0045] Figure 1 This is a flow chart of a method for obtaining training samples for a route sorting model in Embodiment 1 of the present invention;
[0046] Figure 2 This is a flow chart of the route sorting model training method in the second embodiment of the present invention;
[0047] Figure 3A This is a schematic diagram of the trajectory route structure in the second embodiment of the present invention;
[0048] Figure 3B This is a schematic diagram of the trajectory correction structure in the second embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of the structure of the planned route corresponding to the trajectory route determined in the second embodiment of the present invention;
[0050] Figure 5 This is a specific flow chart of the route sorting model training method in Example 3 of the present invention;
[0051] Figure 6 This is a schematic diagram of the structure of multiple track routes in Example 3 of the present invention;
[0052] Figure 7 This is a flowchart of screening and filtering trajectory routes in Example 3 of the present invention;
[0053] Figure 8 Schematic diagram of the structure of a device for obtaining training samples for a route sorting model according to an embodiment of the present invention;
[0054] Figure 9 Schematic diagram of the structure of the route sorting model training device in an embodiment of the present invention;
[0055] Figure 10 Schematic diagram of the structure of the route sorting device in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0057] In order to prioritize routes that offer a better travel experience for users during route planning, embodiments of the present invention provide a method for acquiring training samples for a route ranking model, a method for training a route ranking model based on the training samples acquired by this method, and a method for ranking routes based on the trained route ranking model. This method can combine routes matched to user trajectories with planned routes based on the trajectory's start and end points to acquire training samples, thereby enabling the acquired training samples to reflect user behavior. Furthermore, user trajectories can be acquired from the entire user population, resulting in good data distribution consistency. This enables the trained route ranking model to output better route ranking results, thereby prioritizing the recommendation of routes that offer a better travel experience to users. This is described in detail below through specific embodiments.
[0058] Example 1
[0059] The first embodiment of the present invention provides a method for obtaining training samples for a route sorting model, the process of which is as follows: Figure 1 As shown, the following steps may be included:
[0060] S1: Perform road matching on the trajectory points included in the user trajectory to obtain roads matched with the trajectory points, and the roads constitute the trajectory route corresponding to the user trajectory.
[0061] Among them, user trajectory refers to the client uploading the user's location when the user uses navigation, and generating a series of trajectory points on the server; trajectory route refers to the actual route that the user actually takes when using navigation, which includes the starting point, end point, waypoints and way areas when the user navigates.
[0062] When performing road matching based on a user trajectory, each trajectory point in the user trajectory is generally projected onto a road for road matching, and the matching roads of each trajectory point included in the user trajectory constitute a trajectory route corresponding to the user trajectory.
[0063] S2: Combine the trajectory route corresponding to the user trajectory and the planned route based on at least the starting point and the end point of the trajectory route, and each route combination is used as a training sample.
[0064] After obtaining the trajectory route corresponding to the user's trajectory, the obtained trajectory route is combined with at least one planned route based on the starting and ending points of the trajectory route to obtain a route combination. Each route combination is used as a training sample. A training sample includes a trajectory route and at least one planned route corresponding to the trajectory route.
[0065] The planned route based on the starting and ending points of the trajectory route may be a planned route based on the starting and ending points of the trajectory route directly obtained from a third party, or a planned route obtained by calculating and planning the route based on the starting and ending points of the trajectory route.
[0066] A training sample can be composed of a trajectory route and a corresponding planned route. In this case, a trajectory route can be combined into multiple training samples, that is, a training sample in listpair format. A training sample can also be composed of a trajectory route and all corresponding planned routes. In this case, a trajectory route can be combined into a training sample, that is, a training sample in listwise format. Of course, a training sample can also be composed of a trajectory route and several corresponding planned routes, rather than all planned routes. The specific setting can be set in the actual application.
[0067] In an optional embodiment, when performing route planning, in addition to considering the starting and ending points of the user trajectory, the actual road conditions of the roads matched by each trajectory point may be further considered. Therefore, when performing route planning, the actual road conditions of the roads included in the trajectory route corresponding to the user trajectory are determined based on the time of the trajectory points included in the user trajectory; route planning is performed based on the starting and ending points of the trajectory route and the actual road conditions of the roads included in the trajectory route to obtain a planned route.
[0068] In an optional embodiment, when combining a trajectory route with a planned route that is at least planned based on the starting point and end point of the trajectory route, the trajectory route and the planned route are marked as superior or inferior. The marking can be based on a specified feature item, such as travel time. The process of combining routes in this case includes, for each planned route that is planned based on the starting point and end point of the trajectory route, performing the following steps: comparing the travel time of the trajectory route with the travel time of each planned route; if the travel time of the trajectory route is less than the travel time of the planned route, marking the planned route as not superior to the trajectory route; otherwise, marking the planned route as superior to the trajectory route, and combining the trajectory route with the marked planned route.
[0069] In the above method, before combining the trajectory route and the planned route, a step of screening and filtering the trajectory route can be included to obtain a better trajectory route for route combination, so that the quality of the obtained training samples is better. The screening and filtering method includes at least one of the following methods:
[0070] Method 1: Eliminate at least those trajectory routes that have abnormal detours, traffic violations, entry and exit of internal roads, and abnormal stops from the trajectory routes.
[0071] This method filters based on the characteristics of the trajectory route itself, filtering out user trajectories of poor quality or unreasonable. The best time to perform this filtering process is before obtaining the planned route, thereby reducing the need to obtain the planned route for the filtered trajectory routes. Of course, it can also be performed after obtaining the planned route, which is not limited in this application.
[0072] Method 2: Filtering based on the pros and cons of the feature items of the trajectory route and the planned route, including: obtaining the feature items of the trajectory route and the feature items of the corresponding planned route; comparing each feature item of the trajectory route with the corresponding feature item of the corresponding planned route, and retaining the trajectory route if the comparison difference of at least one feature item falls within the preset difference tolerance range of the feature item.
[0073] This method can filter based on various optional feature items such as time, distance, travel time, etc. of the trajectory route and the planned route, thereby filtering out trajectory routes with poor feature items.
[0074] Method 3: Filtering each route combination based on the trajectory route includes: dividing the resulting route combinations into N groups, where each route combination consists of a trajectory route and at least one corresponding planned route; randomly selecting N-1 route combinations each time to train a preset route ranking model, and using the trained route ranking model to predict the remaining route combinations. If the prediction result shows that the trajectory route is ranked after the planned route, all route combinations of the trajectory route are deleted. Repeat this training and prediction process until every combination has been predicted.
[0075] This method uses a training and learning approach to filter trajectory routes, thereby filtering out trajectory routes that do not meet the requirements.
[0076] The above three methods can be combined in many different ways to achieve better filtering effects: for example, executing method one, method two, and method three in sequence for multiple filtering, or executing method one or method two alone and then executing method three for a second filtering, or executing method one and then executing method two or three for a second filtering, or executing method one, method two, or method three alone for a single filtering, etc. The specific settings can be made according to actual conditions.
[0077] Optionally, when performing trajectory route filtering, if a trajectory route is combined into more than one route combination, when it is determined that the trajectory route needs to be filtered out, all route combinations of the trajectory route are deleted.
[0078] The first embodiment of the present invention further provides a route sorting model training method, which uses the above-mentioned route sorting model training sample acquisition method to obtain training samples; the acquired training samples are input into the route sorting model to be trained in batches until a route sorting model that meets preset requirements is obtained.
[0079] Embodiment 1 of the present invention further provides a route sorting method, which uses the route sorting model obtained through the above training to perform route sorting, including: when a route planning request is received, planning at least one alternative route according to the route planning request; inputting the planned alternative route into the pre-trained route sorting model to obtain an alternative route sorting result; wherein the route sorting model is trained using the training samples obtained by the above-mentioned route sorting model training sample acquisition method.
[0080] The above method obtains training samples by matching trajectory routes based on user trajectories and combining them with planned routes planned based on the starting and ending points of the trajectories. This allows the obtained training samples to reflect user behavior, and user trajectories can be obtained from the entire user group. The data distribution consistency is good. When the obtained training samples are used to train a route sorting model, the trained route sorting model is better. When the trained route sorting model is used to sort alternative routes, a more optimized route sorting result can be obtained, which makes the sorting result more in line with user needs and facilitates users to select higher-quality alternative routes.
[0081] Example 2
[0082] The second embodiment of the present invention provides a specific implementation process of a route sorting model training method, such as Figure 2 As shown, the following steps may be included:
[0083] Step S11: Match each track point in the acquired user track to the road to obtain a track route corresponding to each user track.
[0084] In this step, user trajectory data is first obtained from the user log, and then each trajectory point included in each user trajectory in the user trajectory data is projected onto a road that meets the matching rules to obtain a trajectory route corresponding to each user trajectory.
[0085] Reference Figure 3A As shown, the above-mentioned trajectory points can be obtained by converting the GPS points of the real user trajectory in the user log, because each GPS point records the geographic coordinate information of the user's actual location (for example: 2000 National Geodetic Coordinate System, a "cross" symbol in the figure represents a GPS positioning point) and time information. By converting the above-mentioned geographic information into the longitude and latitude coordinate information on the map coordinate system, and then connecting the GPS points in chronological order, a user trajectory can be generated on the matching road. The sequence of the above-mentioned GPS points can determine the direction of the user trajectory. Of course, it is also possible to first connect the GPS points to generate a GPS trajectory, then perform the coordinate system conversion, and finally project it onto the road. Each user trajectory with a direction obtained above corresponds to a trajectory route, for example Figure 3A A trajectory route from A to B can be obtained.
[0086] The matching of the above track points to the road is achieved through projection. There are many specific matching rules, which can be projected to the nearest road, or determine the road where the user is located based on the track route formed by multiple track points of the user. The process of projecting to the matching road requires error correction to ensure that the real track GPS points are projected onto the road to avoid deviation. For example, refer to Figure 3BThe circled GPS points are inaccurate due to signal extension or deviation, and require correction. The user's road location is determined based on their direction of movement, or projected onto the nearest road. For example, the circled GPS point in the upper left corner is located on a sidewalk, which is definitely different from the actual driving route, so it needs to be corrected to the road.
[0087] Step S12: performing route planning according to the starting and ending points of each trajectory route, and determining at least one planned route corresponding to each trajectory route.
[0088] Among them, route planning refers to the calculation of different routes between the starting and ending points through the path planning engine, for example, calculating the length, travel time, price, etc. of different routes; planned route refers to the specific route between the starting and ending points calculated by the path planning engine.
[0089] In this step, for each trajectory route, the starting and ending points of the trajectory route are obtained, and route planning is performed based on the selected route calculation strategy and the road right of way to obtain several optional routes from the starting point to the end point. The optional routes are screened according to the route screening strategy to determine at least one planned route corresponding to the trajectory route.
[0090] The track route is obtained through GPS points. GPS points have geographic location attributes and time attributes, so the starting and ending locations and time of each track route can be determined.
[0091] Route calculation strategy refers to calculating information such as the distance from the starting point to the end point, travel time, cost, and number of traffic lights passed.
[0092] Road right of way refers to one or more of the following: the right to travel on the road, the right of passage, the right of first recourse, and the right of occupation. The right of travel means that vehicles and their drivers must meet the conditions stipulated by traffic regulations to be allowed to travel on the road; the right of passage refers to the right of traffic participants to conduct traffic activities within a certain spatial area of the road in accordance with traffic regulations; the right of first recourse refers to the right of traffic participants to use the road first, as stipulated by traffic regulations. The terms "first" and "last" refer to temporal concepts, so the right of first recourse is also called the temporal right of way. It is often used when vehicles or pedestrians intersect, where regulations determine who goes first and who goes last; the right of occupation means that occupying a road requires approval from the traffic management department; unauthorized occupation is prohibited.
[0093] The screening strategy determines whether an available route is passable based on road attributes. Road attributes include length, width, congestion, whether it is a one-way street, turns, intersections, and more.
[0094] exist Figure 3AThe starting point of the trajectory route is A and the end point is B. According to the selected route calculation strategy and the road right, multiple optional routes from the starting point A to the end point B can be obtained. Figure 4 As shown, three optional routes from starting point A to end point B are obtained, namely route ①, route ② and route ③ shown in the figure. The above three optional routes are judged by road attributes. For example, at this time, a section of road passed by route ③ is displayed as a one-way street, which is a violation of driving against traffic on this road. Therefore, route ③ is kicked out, and only route ① and route ② are retained as the planned routes between starting point A and end point B.
[0095] Step S13: Each trajectory route and the corresponding at least one planned route are combined into a training data set to obtain a training data set.
[0096] In this step, first, for each trajectory route, trajectory route annotation information is added to the trajectory route, and planned route annotation information is added to at least one planned route corresponding to the trajectory route; then, the annotated trajectory route and the corresponding at least one planned route are combined into a training data.
[0097] For example, a trajectory route annotation is added to the trajectory route of the user from the starting point A to the end point B obtained in the above step S11, such as annotated as "0"; planning route annotation information is added to the planned route ① and planned route ② corresponding to the trajectory route, such as the annotation information of planned route ① is "11", and the annotation information of planned route ② is "12". The above-mentioned annotated trajectory route and the corresponding two planned routes are then combined into a training data. In addition to annotating the trajectory route and the planned route, the advantages and disadvantages of the two can also be annotated, such as annotating whether the planned route is better than or not better than the trajectory route, etc. Of course, a training data contains a trajectory route and at least one planned route, which is two planned routes in this example. A training data set consists of multiple training data.
[0098] Step S14: Use the obtained training data set to train a route sorting model (for example, the sorting model may be a LambdaMART model).
[0099] In the embodiment of the present invention, a route sorting model is trained based on training data consisting of actual user trajectories and planned routes from the start and end points of the trajectories. This allows the resulting route sorting model to take user behavior into account, and user trajectories can be obtained from the entire user population, resulting in good data distribution consistency. Therefore, the trained route sorting model is more optimized. When the trained route sorting model is used to sort alternative routes, a more optimized route sorting result can be obtained, making the sorting result more in line with user needs and facilitating the user's selection of higher-quality alternative routes.
[0100] Example 3
[0101] The third embodiment of the present invention provides a specific implementation process of a route sorting model training method based on user trajectory, and the process is as follows: Figure 5 As shown, the following steps may be included:
[0102] Step S21: Match each track point in the acquired user track to the road to obtain the track route corresponding to each user track. The specific execution method of this step refers to the execution method of step S11, and the specific explanation and examples are not repeated here.
[0103] Step S22: screening and filtering the trajectory routes according to the preset abnormal trajectory filtering rules to filter out the trajectory routes without abnormalities.
[0104] Abnormal trajectories refer to violations, unusual detours, entry into or exit from unauthorized roads (e.g., internal roads), or unusual stops along a user's route. Traffic violations include driving against traffic, driving in non-motorized vehicle lanes, and illegal U-turns; unusual detours include large or limited detours; and unusual stops include prolonged parking in non-parking areas.
[0105] Abnormal trajectory filtering rules are defined based on the context and road attributes of each abnormal trajectory. For example, if a traffic violation occurs, an 80% probability of the trajectory being abnormal will be considered abnormal. For example, if the trajectory distance of an abnormal detour is greater than 30% of the actual distance between the starting and ending points, it will be considered an abnormal trajectory. The filtering rules in the embodiments of the present invention can be customized based on the context of each abnormal trajectory, and this is not specifically limited in the embodiments of the present invention.
[0106] In this step, at least one predefined filter item in the abnormal trajectory filtering rule and the filtering requirements corresponding to each filter item are first obtained; then, based on the road data from the map data, it is determined whether the trajectory route meets the filtering requirements of each filter item. If all of them meet the requirements, it is determined to be a normal trajectory route. If at least one item does not meet the requirements, it is determined to be an abnormal trajectory route.
[0107] Reference Figure 6 As shown, there are three trajectory routes, namely, the trajectory route from the starting point A to the end point B, the trajectory route from the starting point C to the end point D, and the trajectory route from the starting point E to the end point F. Figure 6 The direction in the middle is north, and the one-way street (a one-way street without a dividing line in the middle) can only be driven from north to south and from west to east. At the same time, the predefined filtering items in the embodiment of the present invention are: ① the detour does not exceed 30% of the total distance; ② not driving in the opposite direction; ③ not parking for a long time in a non-parking area, etc. Figure 6The three trajectory routes are filtered in sequence with the filter items specified in the embodiment of the present invention. The trajectory route from starting point A to end point B meets the requirements of all the above filter items and is determined to be a normal trajectory route; the trajectory route from starting point C to end point D has reverse driving and does not meet the requirements of filter item ② and is determined to be an abnormal trajectory route; the trajectory route from starting point E to end point F has a detour exceeding 30% of the total distance and does not meet the requirements of filter item ① and is determined to be an abnormal trajectory route.
[0108] The embodiment of the present invention only lists several filtering items. Of course, the present invention may also have multiple other filtering items, and the filtering requirements of the filtering items may also be actually adjusted, which is not limited in the embodiment of the present invention.
[0109] Step S23: Route planning is performed based on the starting and ending points of each trajectory route, and at least one planned route corresponding to each trajectory route is determined. The specific execution method of this step refers to the execution method of step S12, and the specific explanation and examples are not repeated here.
[0110] Step S24: filtering the corresponding trajectory route according to the determined planned route to obtain a trajectory route after secondary filtering.
[0111] In this step, refer to Figure 7 As shown, filtering the corresponding trajectory route according to the determined planned route may also include the following steps:
[0112] Step S241: Obtaining feature items of the trajectory route and feature items of the corresponding planned route;
[0113] Step S242: Compare each feature item of the trajectory route with the corresponding feature item of the corresponding planned route to determine whether the difference parameter of each feature item is within the set difference parameter threshold range; then execute step S243 or execute step S244.
[0114] In this step, each feature item is assigned a difference parameter to determine whether it is particularly poor. Ultimately, vehicles are eliminated based on whether all indicators are poor. Each indicator has a quantitative parameter. For example, detour distance exceeding 30% of the total distance or distance exceeding 10 kilometers; frequent traffic lights or long waiting times, etc.
[0115] Step S243: Check whether the difference parameters of each feature item of the trajectory route are not within the preset difference parameter threshold range. If so, go to step S245; otherwise, go to step S246;
[0116] Step S244: Perform weighted scoring on the judgment result of each feature item to obtain the scoring result of the trajectory route, and judge whether the scoring result meets the preset screening requirements. If so, execute step S246, otherwise execute step S245.
[0117] Step S245: Filter out the trajectory route;
[0118] Step S246: retain the trajectory route.
[0119] Optionally, filtering the corresponding trajectory route according to the determined planned route may also include:
[0120] The route combinations obtained after obtaining the trajectory route and the planned route are divided into N groups. The groups of the route combinations are obtained in sequence. The following operations are performed on the obtained group of route combinations:
[0121] The screening and filtering model is trained using the other N-1 groups of route combination data, and the tracking routes in the obtained route group are screened and filtered using the screening and filtering model.
[0122] Step S25: Each trajectory route and the corresponding at least one planned route are combined into a training data set to obtain a training data set. The specific execution method of this step refers to the execution method of step S13, and the specific explanation and examples are not repeated here.
[0123] Step S26: Use the training data set to train and obtain a route sorting model.
[0124] In the above method, model training is achieved through sample data combining actual trajectories and planned routes, and high-quality sample data is obtained by screening user trajectories. This allows the model training process to consider various abnormal trajectories such as whether detours are taken, whether local detours are taken, whether local ingress and egress are made to main and auxiliary roads, so that the resulting sorting model can take these factors into account when sorting, thereby obtaining more reasonable sorting results.
[0125] Based on the same inventive concept, the embodiments of the present invention also provide a route sorting model training sample acquisition device, a route sorting model training device, a route sorting model training device, a memory-related storage medium and a server corresponding to the above method. Since the principles of the problems solved by these devices, related storage media and servers are similar to those of the above-mentioned route sorting model training method based on user trajectories, the implementation of these devices, related storage media and servers can refer to the implementation of the above-mentioned method, and the repeated parts will not be repeated.
[0126] Reference Figure 8 As shown, another training sample acquisition device for a route sorting model provided by an embodiment of the present invention may include:
[0127] The trajectory route acquisition module 101 is used to match the trajectory points included in the user trajectory with roads to obtain roads matched with the trajectory points, and the roads constitute the trajectory route corresponding to the user trajectory;
[0128] The training sample acquisition module 102 is configured to combine the trajectory route corresponding to the user trajectory with a planned route based at least on the starting point and the end point of the trajectory route, and each route combination is used as a training sample.
[0129] The above-mentioned device also includes: a planned route acquisition module 103, which is used to obtain a planned route based on the starting point and end point of the trajectory route, specifically including: determining the actual road conditions of the roads included in the trajectory route corresponding to the user trajectory based on the time of the trajectory points included in the user trajectory; performing route planning based on the starting point, end point and actual road conditions of the roads included in the trajectory route to obtain a planned route.
[0130] In an optional embodiment, the training sample acquisition module 102 is configured to combine the trajectory route with a planned route based on at least the starting point and the end point of the trajectory route, including:
[0131] For each planned route based on the start and end points of the trajectory route, perform the following steps:
[0132] The travel time of the trajectory route is compared with the travel time of each planned route. If the travel time of the trajectory route is less than the travel time of the planned route, the planned route is marked as not better than the trajectory route. Otherwise, the planned route is marked as better than the trajectory route, and the trajectory route and the marked planned route are combined.
[0133] In an optional embodiment, the training sample acquisition module 102 is further configured to:
[0134] At least those trajectory routes that have abnormal detours, illegal behaviors, entering or exiting internal roads, and abnormal stops are eliminated from the trajectory routes.
[0135] In an optional embodiment, the training sample acquisition module 102 is further configured to:
[0136] Obtaining the feature items of the trajectory route and the feature items of the corresponding planned route;
[0137] Each feature item of the trajectory route is compared with the corresponding feature item of the corresponding planned route. If the comparison difference of at least one feature item falls within the preset difference tolerance range of the feature item, the trajectory route is retained.
[0138] In an optional embodiment, the training sample acquisition module 102 is further configured to:
[0139] Divide the combined route combinations into N groups, where a route combination includes a trajectory route and at least one corresponding planned route;
[0140] Each time, randomly select N-1 groups of route combinations to train the preset route sorting model, and use the trained route sorting model to predict the remaining group of route combinations. If the prediction result shows that the trajectory route is ranked after the planned route, all route combinations of the trajectory route are deleted;
[0141] Repeat the above training and prediction until every combination is predicted.
[0142] like Figure 9 As shown, the route sorting model training device provided by the embodiment of the present invention includes:
[0143] The training sample acquisition device 10 of the route sorting model is used to acquire training samples;
[0144] The sorting model training module 104 is used to input the acquired training samples into the route sorting model to be trained in batches until a route sorting model that meets preset requirements is obtained.
[0145] like Figure 10 As shown, the route sorting device provided by the embodiment of the present invention includes:
[0146] The alternative route planning module 201 is configured to plan at least one alternative route according to the route planning request when a route planning request is received;
[0147] The alternative route sorting module 202 is used to input the planned alternative routes into a pre-trained route sorting model to obtain an alternative route sorting result; wherein the route sorting model is trained using the training samples obtained by the above-mentioned route sorting model training sample acquisition method.
[0148] An embodiment of the present invention also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement at least one of the following: the above-mentioned method for obtaining training samples for the route sorting model, the above-mentioned method for training the route sorting model, and the above-mentioned route sorting method.
[0149] An embodiment of the present invention also provides a map server, comprising: a memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, it can implement at least one of the following: the above-mentioned method for obtaining training samples of the route sorting model, the above-mentioned method for training the route sorting model, and the above-mentioned route sorting method.
[0150] Unless otherwise specifically stated, terms such as process, calculate, compute, determine, display, and the like may refer to the actions and / or processes of one or more processing or computing systems, or similar devices, that manipulate and convert data represented as physical (e.g., electronic) quantities within registers or memories of a processing system into other data similarly represented as physical quantities within the memories, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals may be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips referred to throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.
[0151] It should be understood that the specific order or hierarchy of steps in the disclosed processes is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0152] In the foregoing detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that embodiments of the claimed subject matter require more features than are expressly recited in each claim. On the contrary, as reflected in the appended claims, the invention comprises less than all the features of any individual disclosed embodiment. The appended claims are therefore hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0153] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein may be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described around their functions. Whether such functions are implemented as hardware or software depends on the specific application and the design constraints imposed on the entire system. A skilled person may implement the described functions in an adaptable manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of this disclosure.
[0154] The steps of the methods or algorithms described in conjunction with the embodiments herein may be directly embodied as hardware, software modules executed by a processor, or a combination thereof. The software module may be located in a RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and storage medium may also be present in a user terminal as discrete components.
[0155] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or external to the processor. In the latter case, it is communicatively coupled to the processor via various means, which are well known in the art.
[0156] The foregoing description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purposes of describing the above embodiments, but one of ordinary skill in the art will recognize that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to encompass all such changes, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent the term "comprising" is used in the specification or claims, the term is intended to be encompassed in a manner similar to the term "including," as explained in terms of "including," used as a transitional word in the claims. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or."
Claims
1. A method for obtaining training samples for a route sorting model, characterized in that: include: Performing road matching on the track points included in the user track to obtain roads matched by the track points, and forming a track route corresponding to the user track with the roads; The trajectory route and a planned route planned based on at least a starting point and an end point of the trajectory route are combined, and each route combination is used as a training sample.
2. The method according to claim 1, wherein The method further comprises: Determining, based on the time of the track points included in the user track, an actual road condition of a road included in the track route corresponding to the user track; Route planning is performed based on the starting point and end point of the trajectory route and the actual road conditions of the trajectory route including the road to obtain a planned route.
3. The method according to claim 1, wherein Combining the trajectory route with a planned route based on at least a starting point and an end point of the trajectory route, comprising: For each planned route based on the starting and ending points of the trajectory route, perform the following steps: The travel time of the trajectory route is compared with the travel time of each planned route. If the travel time of the trajectory route is less than the travel time of the planned route, the planned route is marked as not better than the trajectory route. Otherwise, the planned route is marked as better than the trajectory route, and the trajectory route and the marked planned route are combined.
4. The method according to claim 3, wherein Also includes: At least those trajectory routes that have abnormal detours, illegal behaviors, entering or exiting internal roads, and abnormal stops are eliminated from the trajectory routes.
5. The method according to claim 3 or 4, wherein: Also includes: Obtaining the feature items of the trajectory route and the feature items of the corresponding planned route; Each feature item of the trajectory route is compared with the corresponding feature item of the corresponding planned route. If the comparison difference of at least one feature item falls within the preset difference tolerance range of the feature item, the trajectory route is retained.
6. The method according to claim 5, wherein Also includes: Divide the combined route combinations into N groups, where a route combination includes a trajectory route and at least one corresponding planned route; Each time, randomly select N-1 groups of route combinations to train the preset route sorting model, and use the trained route sorting model to predict the remaining group of route combinations. If the prediction result shows that the trajectory route is ranked after the planned route, all route combinations of the trajectory route are deleted; Repeat the above training and prediction steps until every combination has been predicted.
7. A route sorting model training method, characterized in that: include: Acquire training samples using the route sorting model training sample acquisition method according to any one of claims 1 to 6; The acquired training samples are input into the route sorting model to be trained in batches until a route sorting model that meets the preset requirements is obtained.
8. A route sorting method, characterized in that: include: When a route planning request is received, planning at least one alternative route according to the route planning request; Input the planned alternative routes into the pre-trained route sorting model to obtain the alternative route sorting results; The route sorting model is trained using training samples obtained by the route sorting model training sample acquisition method according to any one of claims 1 to 6.
9. A training sample acquisition device for a route sorting model, characterized in that: include: A trajectory route acquisition module, configured to perform road matching on the trajectory points included in the user trajectory to obtain roads matching the trajectory points, and to form a trajectory route corresponding to the user trajectory from the roads; The training sample acquisition module is used to combine the trajectory route with a planned route that is planned based on at least the starting point and the end point of the trajectory route, and each route combination is used as a training sample.
10. A route sorting model training device, characterized in that: include: The training sample acquisition device for the route sorting model according to claim 9, used to acquire training samples; The model training module is used to input the acquired training samples into the route sorting model to be trained in batches until a route sorting model that meets the preset requirements is obtained.
11. A route sorting device, characterized in that: include: An alternative route planning module, configured to plan at least one alternative route according to a route planning request when a route planning request is received; The alternative route sorting module is used to input the planned alternative routes into a pre-trained route sorting model to obtain an alternative route sorting result; the route sorting model is trained using the training samples obtained by the route sorting model training sample acquisition method according to any one of claims 1 to 6.
12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by the processor, at least one of the following is implemented: the route sorting model training sample acquisition method according to any one of claims 1 to 6, the route sorting model training method according to claim 7, and the route sorting method according to claim 8.
13. A map server, characterized in that: include: A memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, it can implement at least one of the following: the route sorting model training sample acquisition method according to any one of claims 1 to 6, the route sorting model training method according to claim 7, and the route sorting method according to claim 8.
Citation Information
Patent Citations
Route planning method, mobile terminal, and system
CN105547311A
Navigation route ordering method and navigation route ordering apparatus
CN108444486A
Systems and methods for digital route planning
WO2018209576A1