Model training method and apparatus, and electronic device
By clustering the target road segments of the sample routes and training a machine self-learning model, the problem of inaccurate prediction of road toll information for new road segments was solved, and higher prediction accuracy was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2022-06-01
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, route planning services struggle to accurately predict road toll information, including newly opened road sections, leading to inaccurate predictions of additional route information.
By acquiring the target road segment set and its road features of the sample route, clustering is performed, and a machine self-learning model is trained to determine the category information of the target road segment, and based on this, the route information of the route to be predicted is predicted.
It can accurately predict additional route information for new routes, expanding coverage and improving the accuracy of route information prediction.
Smart Images

Figure CN115017989B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of navigation technology, specifically to a model training method, apparatus, and electronic device. Background Technology
[0002] With the development of internet technology, people's travel increasingly relies on location-based service systems. Location-based services include navigation, route planning, and map rendering. Route planning services provide recommended navigation routes based on the user's provided origin and destination, and also predict additional route information such as travel time, traffic light intersections, and toll information. This additional route information has a certain influence on users' route selection preferences, sometimes even playing a decisive role in some users' route choices. Therefore, accurately predicting this additional route information is necessary in route planning services. Taking toll information as an example, existing technologies using mileage-based billing methods are difficult to maintain due to variations in rates and billing rules across different regions. Furthermore, while other billing methods can accurately predict past road toll information, they cannot accurately predict toll information for newly opened road sections. Therefore, it is necessary to propose a solution that can accurately predict route toll information and other additional route information while also covering newly opened road sections. Summary of the Invention
[0003] This disclosure provides a model training method, apparatus, and electronic device.
[0004] In a first aspect, this disclosure provides a model training method, which includes:
[0005] Obtain the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route; the set of target road segments includes at least one target road segment on the sample route, the length of the target road segment, and the road features of the target road segment;
[0006] Based on the road features, the target road segments in the target road segment set are clustered; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category;
[0007] Based on the clustering results corresponding to the sample routes and the additional information of the routes, a machine self-learning model is trained to determine the additional information of the category corresponding to the target road segment category.
[0008] Further, a machine learning model is trained based on the clustering results corresponding to the sample routes and the route supplementary information to determine the category supplementary information corresponding to the target road segment category, including:
[0009] Based on the clustering results, the sample feature variables and sample feature ground truth values of the machine self-learning model are obtained; the sample feature variables include the total length of the target road segment under the target road segment category, and the sample feature ground truth values include the route additional information of the sample route;
[0010] The machine self-learning model is trained using the sample feature variables corresponding to multiple sample routes and the true values of the sample features to obtain additional category information corresponding to the target road segment category.
[0011] Furthermore, the road features include multiple sub-features; clustering the target road segments in the target road segment set based on the road features includes:
[0012] The target road segments in the sample route that have the same multiple sub-features are grouped into the same target road segment category.
[0013] Furthermore, the road features include one or more combinations of road grade, road structure, number of lanes, and vehicle speed.
[0014] Further, the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route are obtained, including:
[0015] Obtain the sample route;
[0016] The sample route is divided into multiple target road segments by interrupting it at fork in the road, so as to obtain the set of target road segments corresponding to the sample route.
[0017] Secondly, this disclosure provides a method for predicting additional information, comprising:
[0018] Obtain the set of road segments to be predicted and the set of target road segment categories corresponding to the route to be predicted; the set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road features of the road segments to be predicted; the set of target road segment categories includes at least one target road segment category and additional category information corresponding to the target road segment category;
[0019] Based on the road features, the road segments to be predicted in the set of road segments to be predicted are matched with the target road segment categories in the set of target road segment categories;
[0020] The additional information of the route to be predicted is determined based on the category information corresponding to the target road segment category in the matching results and the length of the road segment to be predicted.
[0021] Further, based on the road features, matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories includes:
[0022] Based on road features, the road segments to be predicted in the set of road segments to be predicted are clustered; wherein, the clustering results include the categories of road segments to be predicted with the same road features and the total length of the road segments to be predicted under the categories of road segments to be predicted;
[0023] The road segment categories to be predicted in the clustering results are matched with the target road segment category set to obtain matching results including matching road segment categories to be predicted and target road segment categories.
[0024] Further, based on the road features, matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories includes:
[0025] The category of the road segment to be predicted in the set of road segments to be predicted is determined based on road characteristics;
[0026] The road segment category to be predicted is matched with the set of target road segment categories to obtain a matching result that includes the matching road segment category to be predicted and the target road segment category.
[0027] Furthermore, the target road segment category set is obtained in advance by training a machine self-learning model through multiple sample routes; during the training of the machine self-learning model, the route additional information of the sample routes is known, the target road segments in the target road segment set corresponding to the sample routes are clustered to obtain the target road segment category, and the machine self-learning model is trained using the length of the target road segment under the target road segment category and the route additional information to obtain the category additional information corresponding to the target road segment category.
[0028] Thirdly, this disclosure provides a location-based service provision method, which uses the methods described in the first and / or second aspects to provide location-based services to a service recipient, wherein the location-based services include one or more of navigation, map rendering, and route planning.
[0029] Fourthly, this disclosure provides a model training apparatus, comprising:
[0030] The first acquisition module is configured to acquire a set of target road segments corresponding to the sample route and additional route information corresponding to the sample route; the set of target road segments includes at least one target road segment on the sample route, the length of the target road segment, and the road features of the target road segment;
[0031] The clustering module is configured to cluster the target road segments in the target road segment set based on the road features; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category;
[0032] The training module is configured to train a machine self-learning model based on the clustering results corresponding to the sample routes and the route supplementary information, so as to determine the category supplementary information corresponding to the target road segment category.
[0033] Furthermore, the training module includes:
[0034] The first acquisition submodule is configured to obtain the sample feature variables and sample feature ground truth values of the machine self-learning model based on the clustering results; the sample feature variables include the total length of the target road segment under the target road segment category, and the sample feature ground truth values include the route additional information of the sample route;
[0035] The training submodule is configured to train the machine self-learning model using the sample feature variables corresponding to multiple sample routes and the true values of the sample features, so as to obtain additional category information corresponding to the target road segment category.
[0036] Furthermore, the road features include multiple sub-features; the clustering module includes:
[0037] The first clustering submodule is configured to cluster target road segments in the sample route that have the same multiple sub-features into the same target road segment category.
[0038] Furthermore, the road features include one or more combinations of road grade, road structure, number of lanes, and vehicle speed.
[0039] Further, the first acquisition module includes:
[0040] The second acquisition submodule is configured to acquire sample routes;
[0041] The segmentation submodule is configured to divide the sample route into multiple target road segments by interrupting it at fork in the road, so as to obtain the set of target road segments corresponding to the sample route.
[0042] Fifthly, this disclosure provides an additional information prediction device, comprising:
[0043] The second acquisition module is configured to acquire a set of road segments to be predicted and a set of target road segment categories corresponding to the route to be predicted; the set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road features of the road segments to be predicted; the set of target road segment categories includes at least one target road segment category and additional category information corresponding to the target road segment category;
[0044] The matching module is configured to match the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features;
[0045] The determination module is configured to determine the route additional information of the route to be predicted based on the category additional information corresponding to the target road segment category in the matching result and the length of the road segment to be predicted.
[0046] Furthermore, the matching module includes:
[0047] The second clustering submodule is configured to cluster the road segments to be predicted in the set of road segments to be predicted based on road features; wherein, the clustering result includes the categories of road segments to be predicted with the same road features and the total length of the road segments to be predicted under the categories of road segments to be predicted;
[0048] The first matching submodule is configured to match the road segment categories to be predicted in the clustering results with the target road segment category set to obtain a matching result including the matching road segment categories to be predicted and the target road segment categories.
[0049] Furthermore, the matching module includes:
[0050] The determination submodule is configured to determine the category of the road segment to be predicted in the set of road segments to be predicted based on road features;
[0051] The second matching submodule is configured to match the road segment category to be predicted with the set of target road segment categories to obtain a matching result including the matching road segment category to be predicted and the target road segment category.
[0052] Furthermore, the route to be predicted includes the route between the entrance toll station and the exit toll station in the navigation planning route; the route supplementary information is the overall road toll information of the route to be predicted; and the category supplementary information is the road toll information per unit length of the target road segment under the target road segment category.
[0053] Furthermore, the target road segment category set is obtained in advance by training a machine self-learning model through multiple sample routes; during the training of the machine self-learning model, the route additional information of the sample routes is known, the target road segments in the target road segment set corresponding to the sample routes are clustered to obtain the target road segment category, and the machine self-learning model is trained using the length of the target road segment under the target road segment category and the route additional information to obtain the category additional information corresponding to the target road segment category.
[0054] The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.
[0055] In one possible design, the above-described device includes a memory and a processor. The memory stores one or more computer instructions that support the device in performing the corresponding methods described above, and the processor is configured to execute the computer instructions stored in the memory. The device may also include a communication interface for communicating with other devices or communication networks.
[0056] In a sixth aspect, embodiments of this disclosure provide an electronic device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any of the preceding aspects.
[0057] In a seventh aspect, embodiments of this disclosure provide a computer-readable storage medium for storing computer instructions used by any of the above-described devices, which, when executed by a processor, are used to implement the methods described in any of the above aspects.
[0058] Eighthly, embodiments of this disclosure provide a computer program product comprising computer instructions which, when executed by a processor, are used to implement the methods described in any of the preceding aspects.
[0059] The technical solutions provided in this disclosure may have the following beneficial effects:
[0060] In this embodiment, to determine the additional route information of a new route, multiple sample routes and their known additional route information are used to determine the category information of the target road segment category corresponding to each target road segment in the sample route. The target road segment category is determined based on whether the road features are the same. In this embodiment, a machine learning model is trained using the target road segment category corresponding to the sample route and the total length of each target road segment under that category to obtain the category information of each target road segment category. Through this method, the category information of each target road segment category involved in the sample route can be determined, thereby enabling the prediction of the additional route information of the new route based on the target road segment category to which the predicted road segment belongs and the category information. Since this implementation determines the category information of target road segment categories with different road features, even if a new road segment appears in the new route that has not appeared in the sample routes, the additional route information of the new route can still be accurately predicted, expanding the coverage and further improving the prediction accuracy of the additional route information.
[0061] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0062] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:
[0063] Figure 1 A flowchart illustrating a model training method according to an embodiment of the present disclosure is shown.
[0064] Figure 2 A schematic diagram illustrating the sample route division effect according to an embodiment of the present disclosure is shown.
[0065] Figure 3 A flowchart illustrating an additional information prediction method according to an embodiment of the present disclosure is shown.
[0066] Figure 4 This diagram illustrates an application scenario in a map navigation scenario according to an embodiment of the present disclosure.
[0067] Figure 5 A structural block diagram of a model training apparatus according to an embodiment of the present disclosure is shown.
[0068] Figure 6 A structural block diagram of an additional information prediction device according to an embodiment of the present disclosure is shown.
[0069] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing a model training method, an additional information prediction method, and / or a location-based service provision method according to an embodiment of the present disclosure. Detailed Implementation
[0070] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of the exemplary embodiments have been omitted from the drawings.
[0071] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and do not preclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.
[0072] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0073] The details of the embodiments of this disclosure are described in detail below through specific examples.
[0074] Figure 1 A flowchart illustrating a model training method according to an embodiment of this disclosure is shown. Figure 1 As shown, the model training method includes the following steps:
[0075] In step S101, the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route are obtained; the set of target road segments includes at least one target road segment on the sample route, the length of the target road segment, and the road features of the target road segment;
[0076] In step S102, the target road segments in the target road segment set are clustered based on the road features; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category;
[0077] In step S103, a machine self-learning model is trained based on the clustering results corresponding to the sample route and the route additional information to determine the category additional information corresponding to the target road segment category.
[0078] In this embodiment, the model training method can be executed in the cloud or on a server. The sample route can be a route with known additional information, such as the driving route of a vehicle on a highway. The additional information can be obtained through appropriate methods. For example, toll information can be obtained through ETC reconciliation data, taxi invoices, ride-hailing fee information, etc.
[0079] After collecting a large number of sample routes, preprocessing can be performed on each sample route. During preprocessing, each sample route can be divided into a target road segment set, which includes multiple target road segments. This target road segment set includes the identifier of the target road segment, the length of the target road segment, and the road characteristics of the target road segment.
[0080] In some embodiments, road features may include a plurality of sub-features, which may be one or more combinations of road grade, road composition, number of lanes and vehicle speed.
[0081] The length and characteristics of the target road segment can be obtained from road network data. When creating road network data, the identification, location, length, road characteristics, and relationship with other road elements of each road segment are usually recorded.
[0082] In this embodiment, after obtaining a large number of sample routes, the target road segment set corresponding to each sample route is obtained by dividing the sample routes into road segments. Then, the obtained target road segment set is clustered. The clustering is based on grouping two or more target road segments with the same road characteristics into one class, and assigning a road segment category identifier to the target road segments in that class.
[0083] In some embodiments, two or more target road segments with consistent road characteristics can be understood as target road segments with completely identical road characteristics. It is understood that the lengths of two or more target road segments with consistent road characteristics can be the same or different. That is, road characteristics do not include the length of the target road segment.
[0084] After clustering one or more target road segments with the same road characteristics into one class, the sum of the lengths of all target road segments belonging to any one road segment category in the current sample route can be calculated. This sum of lengths can be the total length of the target road segments under that road segment category.
[0085] Therefore, after clustering the target road segments of the current sample route is completed, the clustering results include the categories of each target road segment corresponding to the current sample route and the length of the target road segments under each target road segment category.
[0086] In some embodiments, the identification of a target road segment category can be represented using road features. For example, a target road segment category can be represented as category X_road feature X1_road feature X2_...road feature Xn; if the clustering result corresponding to a sample route includes two target road segment categories, X and Y, then the clustering result corresponding to the sample route can be represented as category X_road feature X1_road feature X2_...road feature Xn, category Y_road feature Y1_road feature Y2_...road feature Yn; the total length of category X; the total length of category Y.
[0087] After the above processing, the collected sample routes are clustered to obtain their respective clustering results. When the number of collected sample routes is large enough, the target road segment categories included in the clustering results of each sample route can cover all or most of the road segments in the road network data. Therefore, by constructing a machine learning model and training it with the length of the target road segment categories included in the clustering results of each sample route and the route supplementary information of the sample routes as input, the machine learning model can solve for the category supplementary information corresponding to each target road segment category. In some embodiments, the category supplementary information corresponding to the target road segment category can be understood as the supplementary information per unit length of the target road segment belonging to that target road segment category. The category supplementary information of the target road segment can be determined based on the category supplementary information corresponding to the target road segment category and the length of a target road segment belonging to that target road segment category.
[0088] In some embodiments, the machine learning model may employ a linear regression model.
[0089] In some embodiments, route supplementary information is road toll information. The route supplementary information of a sample route, i.e., the road toll information, is the sum of the category supplementary information (i.e., road toll information) corresponding to the target road segments divided from that sample route. Road toll information on a route is related to the route length. Therefore, when training a machine learning model using the target road segment categories on multiple sample routes, linear fitting can be performed based on the target road segment category, the total length corresponding to the target road segment category, and the route supplementary information of the sample routes. Furthermore, the target road segment category identifier, the total length corresponding to the target road segment category, and the route supplementary information of the sample routes can be used as inputs to train the machine learning model, thereby solving for the category supplementary information of each target road segment category.
[0090] In this embodiment, to determine the additional route information of a new route, multiple sample routes and their known additional route information are used to determine the category information of the target road segment category corresponding to each target road segment in the sample route. The target road segment category is determined based on whether the road features are the same. In this embodiment, a machine learning model is trained using the target road segment category corresponding to the sample route and the total length of each target road segment under that category to obtain the category information of each target road segment category. Through this method, the category information of each target road segment category involved in the sample route can be determined, thereby enabling the prediction of the additional route information of the new route based on the target road segment category to which the predicted road segment belongs and the category information. Since this implementation determines the category information of target road segment categories with different road features, even if a new road segment appears in the new route that has not appeared in the sample routes, the additional route information of the new route can still be accurately predicted, expanding the coverage and further improving the prediction accuracy of the additional route information.
[0091] In an optional implementation of this embodiment, step S103, namely, training a machine self-learning model based on the clustering results corresponding to the sample routes and the route supplementary information to determine the category supplementary information corresponding to the target road segment category, further includes the following steps:
[0092] Based on the clustering results, the sample feature variables and sample feature ground truth values of the machine self-learning model are obtained; the sample feature variables include the total length of the target road segment under the target road segment category, and the sample feature ground truth values include the route additional information of the sample route;
[0093] The machine self-learning model is trained using the sample feature variables corresponding to multiple sample routes and the true values of the sample features to obtain additional category information corresponding to the target road segment category.
[0094] In this optional implementation, the total length of the target road segments under the target road segment category corresponding to the sample route can be determined as the sample feature variable of the machine self-learning model, while the route-related information of the sample route can be used as the ground truth of the sample features to train the machine self-learning model, so as to solve for the category-related information of each target road segment category based on the machine self-learning model. The machine self-learning model can adopt a linear regression model.
[0095] In this linear regression model, the sample feature variables include the total length of the target road segment under the target road segment category, while the true values of the sample features are the route-related features of the sample routes, solving for the category-related information of the target road segment category. That is, the sample feature variables on the left side of the linear regression model include the total length of the target road segment under the target road segment category, while the true values of the sample features on the right side of the linear regression model include the route-related features of the sample routes.
[0096] Since training a linear regression model requires a large number of sample routes, and the target road segment categories in different sample routes may be the same or different, in order to distinguish between the same target road segment category and different target road segment categories, a unique identifier can be assigned to the same target road segment category. This unique identifier can be used as the variable name in the machine self-learning model.
[0097] As mentioned above, the identification of target road segment categories can be represented using road features. For example, a target road segment category can be represented as category X_road feature X1_road feature X2_...road feature Xn; if the clustering result corresponding to a sample route includes two target road segment categories, X and Y, then the clustering result corresponding to that sample route can be represented as category X_road feature X1_road feature X2_...road feature Xn, category Y_road feature Y1_road feature Y2_...road feature Yn; the total length of category X; the total length of category Y.
[0098] The following example uses road toll information to illustrate this:
[0099] Suppose that clustering a sample route yields the following set of target categories:
[0100] RoadClass0_Formway1_Lane4_120,RoadClass0_Formway1_Lane2_80;5000,3000;4
[0101] The target road segment category set includes two target road segment categories. The first target road segment category identifier key1 is RoadClass0_Formway1_Lane4_120, and the cumulative length of the target road segment under key1 is 5km. The second target road segment category key2 is RoadClass0_Formway1_Lane2_80, and the cumulative length of the target road segment under key2 is 3km. The actual road toll information for the sample route including key1 and key2 is 4 yuan.
[0102] Here, key1 and key2 are variable names that need to be calculated when training the machine self-learning model to determine the cost.
[0103] If the machine learning model uses a linear regression model, then during the model training process, the input data obtained based on the above sample route is:
[0104] RoadClass0_Formway1_Lane4_120,RoadClass0_Formway1_Lane2_80;5000,3000;4
[0105] A linear regression model can be trained based on input data corresponding to multiple sample routes. The training process of the linear regression model is also the linear solution process. In the solution process, the total length corresponding to the target road segment category key in all input data is used as the input variable x. What needs to be solved is the cost (i.e., category-related information) corresponding to each target road segment category key, denoted as w. Based on the linear regression model, the following cross product matrix relationship can be obtained: x*w=y; y is the road toll information of the sample route, that is, the route-related information of the sample route. w is a single-column matrix, where each element in each row is the cost corresponding to the target road segment category to be solved.
[0106] The matrix form of the input variable x is represented as follows:
[0107] keyA1, keyA2, ..., keyAn (corresponding to sample route A)
[0108] keyB1, keyB2, ..., keyBn (corresponding to sample route B)
[0109] keyC1, keyC2, ..., keyCn (corresponding to sample route C)
[0110] The size of n represents the number of target road segment categories whose costs are to be calculated, which is also the number of target road segment categories. We can count the target road segment categories in all sample routes participating in the solution. In the actual solution process, the input data for each sample route may only include the total length of a portion of the n target road segment categories, while the total length of target road segment categories not involved in that sample route can be 0.
[0111] The solution process can be simply represented as follows:
[0112]
[0113] Wherein, keyA1, keyA2, ..., keyAn represent the total length of the target road segments under the n target road segment categories in sample route A; keyB1, keyB2, ..., keyBn represent the total length of the target road segments under the n target road segment categories in sample route B; keyC1, keyC2, ..., keyCn represent the total length of the target road segments under the n target road segment categories in sample route C; w1, w2, ..., wn represent the costs of the n target road segment categories, i.e., category supplementary information; and yA, yB, and yC represent the road toll information for sample routes A, B, and C, respectively, i.e., route supplementary information.
[0114] In an optional implementation of this embodiment, the road features include multiple sub-features; step S102, which is the step of clustering the target road segments in the target road segment set based on the road features, further includes the following steps:
[0115] The target road segments in the sample route that have the same multiple sub-features are grouped into the same target road segment category.
[0116] In this optional implementation, the target road segment can include multiple sub-features. Due to differences in road features, the additional information corresponding to different categories of target road segments also differs. Taking road toll information as an example, due to differences in road grades, road structures (e.g., viaducts, ramps), lane widths, speed limits, and road construction and maintenance costs, the road toll information also varies. Therefore, target road segments can be classified according to road features, with different target road segment categories corresponding to different road features.
[0117] In some embodiments, the target road segment may include one or more combinations of road grade, road configuration, number of lanes, and vehicle speed.
[0118] In some embodiments, the road features of a target road segment may include multiple sub-features. When classifying target road segments, target road segments with the same multiple sub-features can be classified into the same target road segment category. For example, if the road features of a target road segment include four sub-features: road grade, road composition, number of lanes, and vehicle speed, then target road segments with the same four sub-features can be classified into the same target road segment category. If one sub-feature is different, then they can be classified into different target road segment categories.
[0119] In an optional implementation of this embodiment, step S101, namely, obtaining the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route, further includes the following steps:
[0120] Obtain the sample route;
[0121] The sample route is divided into multiple target road segments by interrupting it at fork in the road, so as to obtain the set of target road segments corresponding to the sample route.
[0122] In this optional implementation, the obtained sample route may be a continuous route from the starting point to the end point, and this continuous route may consist of multiple target road segments. In order to divide the sample route into a set of target road segments, the search can start from the starting point of the sample route. When a fork in the road is encountered, the sample route is divided by breaking it at the fork. The resulting segment is added as a target road segment to the target road segment set of the sample route, and the length of the target road segment is also added to the target road segment set.
[0123] Figure 2 A schematic diagram illustrating the sample route division effect according to an embodiment of this disclosure is shown. Figure 2 As shown, for sample routes AB, AC, AD, and AF, the target road segment sets obtained after partitioning them in the above manner are as follows: {AF_x1, FH_x2, HB_x3}, {AF_x4, FH_x5, HC_x6}, {AF_x7, FG_x8, GC_x9}, {AF_x10, FG_x11, GD_x11}. In AF_x1, AF represents the target road segment, and x1 represents the length of the target road segment.
[0124] It should be noted that a link is the smallest data structure describing a road. A link is the smallest segment of a road that can be divided into sections, and it has attributes such as road class, road composition, road name, length, shape points, and direction. In the road network data of an electronic map, each link is assigned a unique identifier.
[0125] Figure 3 A flowchart illustrating an additional information prediction method according to an embodiment of this disclosure is shown. Figure 3 As shown, the additional information prediction method includes the following steps:
[0126] In step S301, the set of road segments to be predicted and the set of target road segment categories corresponding to the route to be predicted are obtained; the set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road features of the road segments to be predicted; the set of target road segment categories includes at least one target road segment category and additional category information corresponding to the target road segment category.
[0127] In step S302, the road segments to be predicted in the set of road segments to be predicted are matched with the target road segment categories in the set of target road segment categories based on the road features;
[0128] In step S303, the route information of the route to be predicted is determined based on the category supplementary information corresponding to the matching target road segment category and the length of the road segment to be predicted.
[0129] In this embodiment, the additional information prediction method is applicable to execution on a server, such as a navigation server. When a user requests navigation information using a navigation terminal, the navigation server can generate a navigation planning route based on the starting and ending locations provided by the navigation terminal, and can also predict the additional information of the navigation planning route. In this embodiment, the navigation planning route is the route to be predicted. It should be noted that the additional information of the route to be predicted is unknown, while the category additional information of the target road segment category to which each target road segment in the set of target road segments belongs has been predetermined. The set of target road segment categories may include all or part of the target road segment categories in the road network data and the category additional information of the target road segment categories.
[0130] In some embodiments, the route to be predicted may include one or more road segments. It should be noted that a road segment (Link) is the smallest data structure describing a road. A road segment is the smallest segment of a route, containing information such as road class, road composition, number of lanes, lane speed, segment name, length, shape point, and direction. In the road network data of an electronic map, each road segment is assigned a segment identifier.
[0131] In some embodiments, the set of road segments to be predicted corresponding to the route to be predicted can be divided into a set of road segments including multiple road segments by interrupting the route at fork in the road, for example, as follows:
[0132] The search can begin from the starting point of the route to be predicted. Upon encountering a fork in the road, the route is divided by breaking it at the fork. The resulting segment is added to the set of segments to be predicted for that route. In some embodiments, when the route to be predicted is a navigation planning route, since navigation planning routes are planned on a segment-by-segment basis, the set of segments to be predicted is already generated when the navigation planning route is generated and can be directly obtained without performing the above-mentioned division steps.
[0133] In some embodiments, the category information corresponding to the target road segment set corresponding to the sample route and the known route supplementary information corresponding to the sample route is obtained in advance by training a machine self-learning model. In some embodiments, the process of obtaining the category supplementary information of the target road segment category to which the target road segment belongs can be referred to the description of the model training method above, and will not be repeated here. It is understood that the category supplementary information of the target road segment category to which the target road segment belongs can also be obtained through other means, as long as the category supplementary information of the target road segment category is known; no restriction is imposed here.
[0134] Therefore, after obtaining the set of road segments to be predicted corresponding to the route to be predicted, the target road segment categories to which all road segments included in the route to be predicted belong, as well as the category-specific information of each target road segment category, can be determined by matching the road segments to be predicted in the set of target road segment categories. Then, route-specific information for the route to be predicted can be determined based on the length of the road segments to be predicted and the category-specific information of their respective target road segment categories. In some embodiments, the category-specific information of the target road segment category is additional information per unit length, such as the road segment cost per unit length.
[0135] In other words, in this embodiment of the present disclosure, the additional information per unit length under the target road segment category is known. By dividing the route to be predicted into multiple road segments to be predicted, the target road segment category to which the road segment to be predicted belongs is determined based on road characteristics. Then, the additional information of the route to be predicted is determined based on the additional information per unit length under the target road segment category and the length of the road segment to be predicted.
[0136] In this embodiment of the disclosure, when predicting additional information about a route to be predicted, such as a navigation planning route, a set of road segments to be predicted corresponding to the route to be predicted is obtained. The road segments to be predicted in this set are then matched with a set of target road segment categories. The target road segment category set includes at least one target road segment category and category-specific additional information corresponding to that at least one target road segment category. Based on the category-specific additional information corresponding to the matched target road segment categories and the length of the road segment to be predicted, the additional information about the route to be predicted is determined. By using the known category-specific additional information of the target road segment categories to which each road segment belongs to determine the additional information about the route to be predicted, the accuracy of the prediction can be improved.
[0137] In an optional implementation of this embodiment, step S302, which is the step of matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features, further includes the following steps:
[0138] Based on road features, the road segments to be predicted in the set of road segments to be predicted are clustered; wherein, the clustering results include the categories of road segments to be predicted with the same road features and the total length of the road segments to be predicted under the categories of road segments to be predicted;
[0139] The road segment categories to be predicted in the clustering results are matched with the target road segment category set to obtain matching results including matching road segment categories to be predicted and target road segment categories.
[0140] In this optional implementation, the road segments to be predicted in the set of road segments to be predicted can be clustered first. The basis for clustering is that road segments to be predicted with the same road characteristics are grouped into one category, and one or more categories of road segments to be predicted can be obtained. In addition, the total length of the road segments to be predicted under each category of road segments to be predicted can be determined.
[0141] The one or more road segment categories to be predicted are matched with the target road segment categories in the target road segment category set to obtain matching results including the matched road segment categories to be predicted and the target road segment categories.
[0142] Based on the matching result, the category-specific information of the road segment to be predicted can be determined. Furthermore, the route-specific information of the route to be predicted can be determined based on the total length of the road segments under each category and the category-specific information. For example, the road toll information of the route to be predicted can be obtained by multiplying the total length of the road segments under each category by the toll information for that category, and then summing the products corresponding to each category.
[0143] In an optional implementation of this embodiment, step S302, which is the step of matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features, further includes the following steps:
[0144] The category of the road segment to be predicted in the set of road segments to be predicted is determined based on road characteristics;
[0145] The road segment category to be predicted is matched with the set of target road segment categories to obtain a matching result that includes the matching road segment category to be predicted and the target road segment category.
[0146] In this optional implementation, as described above, the target road segment category can be assigned a category identifier based on road features. This category identifier includes the corresponding road features. When the road features of the road segment to be predicted are known, the category identifier of the road segment to be predicted can be obtained based on the road features of the road segment to be predicted. The category identifier of the road segment to be predicted is matched with the category identifier of the target road segment in the target road segment category set. This can determine the target road segment category that matches the road segment to be predicted, thereby obtaining the matching result between the road segment to be predicted and the target road segment category.
[0147] Based on the matching result, the category-specific information of the road segment to be predicted can be determined. Furthermore, the route-specific information of the route to be predicted can be determined based on the total length of the road segments under each category and the category-specific information. For example, the road toll information of the route to be predicted can be obtained by multiplying the total length of the road segments under each category by the toll information for that category, and then summing the products corresponding to each category.
[0148] In one optional implementation of this embodiment, the route to be predicted includes the route between the entrance toll station and the exit toll station in the navigation planning route; the route supplementary information is the overall road toll information of the route to be predicted; and the category supplementary information is the road toll information per unit length of the target road segment under the target road segment category.
[0149] In this optional implementation, the aforementioned additional information prediction method can be executed on the navigation server. The route to be predicted can be a portion of the navigation route planned by the navigation server based on the starting and ending locations provided by the navigation terminal. This portion of the route is a section between the entrance toll station and the exit toll station. In other words, the route to be predicted is a route on a toll road segment. The route additional information is the overall road toll information for the route to be predicted; while the category additional information is the road toll information per unit length under the target road segment category.
[0150] In an optional implementation of this embodiment, the target road segment category set is obtained in advance by training a machine self-learning model through multiple sample routes; during the training of the machine self-learning model, the route additional information of the sample routes is known, the target road segments in the target road segment set corresponding to the sample routes are clustered to obtain the target road segment category, and the machine self-learning model is trained using the length of the target road segments under the target road segment category and the route additional information to obtain the category additional information corresponding to the target road segment category.
[0151] In this optional implementation, a large number of sample routes can be collected, and each sample route can be divided into a target segment set that includes multiple target road segments. During the division process, the search can start from the starting point of the sample route, and when a fork in the road is encountered, the sample route can be divided by breaking it at the fork. The resulting segment is added as a target road segment to the target segment set of the sample route, and the length of the target road segment is also added to the target segment set.
[0152] After dividing each sample route into corresponding target road segment sets, the additional road segment information of each target road segment in the target road segment set can be determined based on the target road segment set and the route additional information of the sample route.
[0153] In some embodiments, the target road segments in the target road segment set corresponding to the sample route can be clustered, with target road segments having the same road characteristics grouped into one category, and target road segments with different road characteristics grouped into different categories, thus obtaining the target road segment category corresponding to the sample route. Alternatively, the total length of the target road segments under each target road segment category can be determined. After training a machine learning model based on the total length of the target road segments under each target road segment category and the route supplementary information of the sample route, the category supplementary information for each target road segment category can be determined.
[0154] It is understood that the additional information of each sample route is known, and after the sample route is divided into multiple target road segments, the length of each target road segment is also known. The additional information of the sample route is obtained based on the additional information of each target road segment into which the sample route is divided. Target road segments with the same road characteristics have the same additional information. Based on this, a machine learning model can be trained by using the target road segment category to which the target road segments in each sample route belong, the total length of the target road segment categories under each target road segment category, and the additional information of the sample route as a training sample set. This yields the category additional information corresponding to each target road segment category. Then, during online prediction, the additional information of the new route can be determined based on the category additional information corresponding to the target road segment category and the target road segment category and length of each road segment in the new route. In some embodiments, the machine learning model can employ a linear regression model.
[0155] In some embodiments, the route supplementary information is road toll information. The route supplementary information of a sample route, i.e., the road toll information, is the sum of the road segment supplementary information, i.e., the road toll information, corresponding to the target road segments divided into target road segments on the sample route. The road toll information on a route is related to the route length. Therefore, a linear regression model can be fitted using the target road segment category and total length of each target road segment on multiple sample routes, along with the route supplementary information, to solve for the category supplementary information of each target road segment category.
[0156] Figure 4 This diagram illustrates an application scenario in a map navigation context according to an embodiment of the present disclosure. For example... Figure 4As shown, the toll information determination server retrieves sample routes and their toll information from a sample database. After dividing the sample routes into target road segment sets, it clusters the target road segments in the target road segment sets based on road features. The lengths of target road segments within the same target road segment category are summed to obtain the total length of that target road segment category. Based on the total length of the target road segment categories and the toll information of the sample routes, a linear regression model is trained to obtain the cost per kilometer for each target road segment category. The toll information determination server sends the target road segment category set, including all target road segment categories and their costs per kilometer, to the navigation server. After receiving the navigation request from the navigation terminal, the navigation server generates a navigation planning route based on location information and predicts the toll information of the navigation planning route based on the target category set. The navigation server provides the toll information as supplementary information for the navigation planning route to the navigation terminal, allowing the navigation terminal or the user using the navigation terminal to select the appropriate navigation planning route.
[0157] According to an embodiment of the present disclosure, a location-based service provision method provides location-based services to a service recipient using the aforementioned model training method and / or additional information prediction method. The location-based services include one or more of navigation, map rendering, and route planning.
[0158] In this embodiment, the location-based service provision method can be executed on a location service terminal, such as a mobile phone, iPad, computer, smartwatch, or in-vehicle device. This embodiment can predict road toll information corresponding to a route during navigation, route planning, and / or map rendering. This road toll information can then be pushed to the service recipient during navigation. In route planning, a low-cost route can be planned for the service recipient based on the road toll information. And / or, during map rendering, the road toll information can be rendered on the map for the service recipient to view.
[0159] The served objects can be mobile phones, iPads, computers, smartwatches, autonomous vehicles, robots, etc. The server can send the target road set and / or predicted road toll information obtained by the above methods to the location service terminal. When navigating, planning routes, or rendering roads on the map for the served objects, the location service terminal provides the served objects with road toll information. For details, please refer to the description of the model training method and / or additional information prediction method above, which will not be repeated here.
[0160] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein.
[0161] Figure 5A structural block diagram of a model training apparatus according to an embodiment of the present disclosure is shown. This apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 5 As shown, the model training device includes:
[0162] The first acquisition module 501 is configured to acquire a set of target road segments corresponding to the sample route and additional route information corresponding to the sample route; the set of target road segments includes at least one target road segment on the sample route, the length of the target road segment, and the road features of the target road segment;
[0163] Clustering module 502 is configured to cluster the target road segments in the target road segment set based on the road features; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category;
[0164] Training module 503 is configured to train a machine self-learning model based on the clustering results corresponding to the sample routes and the route additional information, so as to determine the category additional information corresponding to the target road segment category.
[0165] In this embodiment, the model training device can be executed in the cloud or on a server. The sample route can be a route with known additional information, such as the route of a vehicle on a highway. The additional information can be obtained through appropriate methods. For example, toll information can be obtained through ETC reconciliation data, taxi invoices, ride-hailing fee information, etc.
[0166] After collecting a large number of sample routes, preprocessing can be performed on each sample route. During preprocessing, each sample route can be divided into a target road segment set, which includes multiple target road segments. This target road segment set includes the identifier of the target road segment, the length of the target road segment, and the road characteristics of the target road segment.
[0167] In some embodiments, road features may include a plurality of sub-features, which may be one or more combinations of road grade, road composition, number of lanes and vehicle speed.
[0168] The length and characteristics of the target road segment can be obtained from road network data. When creating road network data, the identification, location, length, road characteristics, and relationship with other road elements of each road segment are usually recorded.
[0169] In this embodiment, after obtaining a large number of sample routes, the target road segment set corresponding to each sample route is obtained by dividing the sample routes into road segments. Then, the obtained target road segment set is clustered. The clustering is based on grouping two or more target road segments with the same road characteristics into one class, and assigning a road segment category identifier to the target road segments in that class.
[0170] In some embodiments, two or more target road segments with consistent road characteristics can be understood as target road segments with completely identical road characteristics. It is understood that the lengths of two or more target road segments with consistent road characteristics can be the same or different. That is, road characteristics do not include the length of the target road segment.
[0171] After clustering one or more target road segments with the same road characteristics into one class, the sum of the lengths of all target road segments belonging to any one road segment category in the current sample route can be calculated. This sum of lengths can be the total length of the target road segments under that road segment category.
[0172] Therefore, after clustering the target road segments of the current sample route is completed, the clustering results include the categories of each target road segment corresponding to the current sample route and the length of the target road segments under each target road segment category.
[0173] In some embodiments, the identification of a target road segment category can be represented using road features. For example, a target road segment category can be represented as category X_road feature X1_road feature X2_...road feature Xn; if the clustering result corresponding to a sample route includes two target road segment categories, X and Y, then the clustering result corresponding to the sample route can be represented as category X_road feature X1_road feature X2_...road feature Xn, category Y_road feature Y1_road feature Y2_...road feature Yn; the total length of category X; the total length of category Y.
[0174] After the above processing, the collected sample routes are clustered to obtain their respective clustering results. When the number of collected sample routes is large enough, the target road segment categories included in the clustering results of each sample route can cover all or most of the road segments in the road network data. Therefore, by constructing a machine learning model and training it with the length of the target road segment categories included in the clustering results of each sample route and the route supplementary information of the sample routes as input, the machine learning model can solve for the category supplementary information corresponding to each target road segment category. In some embodiments, the category supplementary information corresponding to the target road segment category can be understood as the supplementary information per unit length of the target road segment belonging to that target road segment category. The category supplementary information of the target road segment can be determined based on the category supplementary information corresponding to the target road segment category and the length of a target road segment belonging to that target road segment category.
[0175] In some embodiments, the machine learning model may employ a linear regression model.
[0176] In some embodiments, route supplementary information is road toll information. The route supplementary information of a sample route, i.e., the road toll information, is the sum of the category supplementary information (i.e., road toll information) corresponding to the target road segments divided from that sample route. Road toll information on a route is related to the route length. Therefore, when training a machine learning model using the target road segment categories on multiple sample routes, linear fitting can be performed based on the target road segment category, the total length corresponding to the target road segment category, and the route supplementary information of the sample routes. Furthermore, the target road segment category identifier, the total length corresponding to the target road segment category, and the route supplementary information of the sample routes can be used as inputs to train the machine learning model, thereby solving for the category supplementary information of each target road segment category.
[0177] In this embodiment, to determine the additional route information of a new route, multiple sample routes and their known additional route information are used to determine the category information of the target road segment category corresponding to each target road segment in the sample route. The target road segment category is determined based on whether the road features are the same. In this embodiment, a machine learning model is trained using the target road segment category corresponding to the sample route and the total length of each target road segment under that category to obtain the category information of each target road segment category. Through this method, the category information of each target road segment category involved in the sample route can be determined, thereby enabling the prediction of the additional route information of the new route based on the target road segment category to which the predicted road segment belongs and the category information. Since this implementation determines the category information of target road segment categories with different road features, even if a new road segment appears in the new route that has not appeared in the sample routes, the additional route information of the new route can still be accurately predicted, expanding the coverage and further improving the prediction accuracy of the additional route information.
[0178] In an optional implementation of this embodiment, the training module includes:
[0179] The first acquisition submodule is configured to obtain the sample feature variables and sample feature ground truth values of the machine self-learning model based on the clustering results; the sample feature variables include the total length of the target road segment under the target road segment category, and the sample feature ground truth values include the route additional information of the sample route;
[0180] The training submodule is configured to train the machine self-learning model using the sample feature variables corresponding to multiple sample routes and the true values of the sample features, so as to obtain additional category information corresponding to the target road segment category.
[0181] In this optional implementation, the total length of the target road segments under the target road segment category corresponding to the sample route can be determined as the sample feature variable of the machine self-learning model, while the route-related information of the sample route can be used as the ground truth of the sample features to train the machine self-learning model, so as to solve for the category-related information of each target road segment category based on the machine self-learning model. The machine self-learning model can adopt a linear regression model.
[0182] In this linear regression model, the sample feature variables include the total length of the target road segment under the target road segment category, while the true values of the sample features are the route-related features of the sample routes, solving for the category-related information of the target road segment category. That is, the sample feature variables on the left side of the linear regression model include the total length of the target road segment under the target road segment category, while the true values of the sample features on the right side of the linear regression model include the route-related features of the sample routes.
[0183] Since training a linear regression model requires a large number of sample routes, and the target road segment categories in different sample routes may be the same or different, in order to distinguish between the same target road segment category and different target road segment categories, a unique identifier can be assigned to the same target road segment category. This unique identifier can be used as the variable name in the machine self-learning model.
[0184] As mentioned above, the identification of target road segment categories can be represented using road features. For example, a target road segment category can be represented as category X_road feature X1_road feature X2_...road feature Xn; if the clustering result corresponding to a sample route includes two target road segment categories, X and Y, then the clustering result corresponding to that sample route can be represented as category X_road feature X1_road feature X2_...road feature Xn, category Y_road feature Y1_road feature Y2_...road feature Yn; the total length of category X; the total length of category Y.
[0185] The following example uses road toll information to illustrate this:
[0186] Suppose that clustering a sample route yields the following set of target categories:
[0187] RoadClass0_Formway1_Lane4_120,RoadClass0_Formway1_Lane2_80;5000,3000;4
[0188] The target road segment category set includes two target road segment categories. The first target road segment category identifier key1 is RoadClass0_Formway1_Lane4_120, and the cumulative length of the target road segment under key1 is 5km. The second target road segment category key2 is RoadClass0_Formway1_Lane2_80, and the cumulative length of the target road segment under key2 is 3km. The actual road toll information for the sample route including key1 and key2 is 4 yuan.
[0189] Here, key1 and key2 are variable names that need to be calculated when training the machine self-learning model to determine the cost.
[0190] If the machine learning model uses a linear regression model, then during the model training process, the input data obtained based on the above sample route is:
[0191] RoadClass0_Formway1_Lane4_120,RoadClass0_Formway1_Lane2_80;5000,3000;4
[0192] A linear regression model can be trained based on input data corresponding to multiple sample routes. The training process of the linear regression model is also the linear solution process. In the solution process, the total length corresponding to the target road segment category key in all input data is used as the input variable x. What needs to be solved is the cost (i.e., category-related information) corresponding to each target road segment category key, denoted as w. Based on the linear regression model, the following cross product matrix relationship can be obtained: x*w=y; y is the road toll information of the sample route, that is, the route-related information of the sample route. w is a single-column matrix, where each element in each row is the cost corresponding to the target road segment category to be solved.
[0193] The matrix form of the input variable x is represented as follows:
[0194] keyA1, keyA2, ..., keyAn (corresponding to sample route A)
[0195] keyB1, keyB2, ..., keyBn (corresponding to sample route B)
[0196] keyC1, keyC2, ..., keyCn (corresponding to sample route C)
[0197] The size of n represents the number of target road segment categories whose costs are to be calculated, which is also the number of target road segment categories. We can count the target road segment categories in all sample routes participating in the solution. In the actual solution process, the input data for each sample route may only include the total length of a portion of the n target road segment categories, while the total length of target road segment categories not involved in that sample route can be 0.
[0198] The solution process can be simply represented as follows:
[0199]
[0200] Wherein, keyA1, keyA2, ..., keyAn represent the total length of the target road segments under the n target road segment categories in sample route A; keyB1, keyB2, ..., keyBn represent the total length of the target road segments under the n target road segment categories in sample route B; keyC1, keyC2, ..., keyCn represent the total length of the target road segments under the n target road segment categories in sample route C; w1, w2, ..., wn represent the costs of the n target road segment categories, i.e., category supplementary information; and yA, yB, and yC represent the road toll information for sample routes A, B, and C, respectively, i.e., route supplementary information.
[0201] In an optional implementation of this embodiment, the road features include multiple sub-features; the clustering module includes:
[0202] The first clustering submodule is configured to cluster target road segments in the sample route that have the same multiple sub-features into the same target road segment category.
[0203] In this optional implementation, the target road segment can include multiple sub-features. Due to differences in road features, the additional information corresponding to different categories of target road segments also differs. Taking road toll information as an example, due to differences in road grades, road structures (e.g., viaducts, ramps), lane widths, speed limits, and road construction and maintenance costs, the road toll information also varies. Therefore, target road segments can be classified according to road features, with different target road segment categories corresponding to different road features.
[0204] In some embodiments, the target road segment may include one or more combinations of road grade, road configuration, number of lanes, and vehicle speed.
[0205] In some embodiments, the road features of a target road segment may include multiple sub-features. When classifying target road segments, target road segments with the same multiple sub-features can be classified into the same target road segment category. For example, if the road features of a target road segment include four sub-features: road grade, road composition, number of lanes, and vehicle speed, then target road segments with the same four sub-features can be classified into the same target road segment category. If one sub-feature is different, then they can be classified into different target road segment categories.
[0206] In an optional implementation of this embodiment, the first acquisition module includes:
[0207] The second acquisition submodule is configured to acquire sample routes;
[0208] The segmentation submodule is configured to divide the sample route into multiple target road segments by interrupting it at fork in the road, so as to obtain the set of target road segments corresponding to the sample route.
[0209] In this optional implementation, the obtained sample route may be a continuous route from the starting point to the end point, and this continuous route may consist of multiple target road segments. In order to divide the sample route into a set of target road segments, the search can start from the starting point of the sample route. When a fork in the road is encountered, the sample route is divided by breaking it at the fork. The resulting segment is added as a target road segment to the target road segment set of the sample route, and the length of the target road segment is also added to the target road segment set.
[0210] It should be noted that a link is the smallest data structure describing a road. A link is the smallest segment of a road that can be divided into sections, and it has attributes such as road class, road composition, road name, length, shape points, and direction. In the road network data of an electronic map, each link is assigned a unique identifier.
[0211] Figure 6 A structural block diagram of an additional information prediction device according to an embodiment of the present disclosure is shown. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the additional information prediction device includes:
[0212] The second acquisition module 601 is configured to acquire a set of road segments to be predicted and a set of target road segment categories corresponding to the route to be predicted; the set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road features of the road segments to be predicted; the set of target road segment categories includes at least one target road segment category and additional category information corresponding to the target road segment category.
[0213] Matching module 602 is configured to match the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features;
[0214] The determination module 603 is configured to determine the route additional information of the route to be predicted based on the category additional information corresponding to the target road segment category in the matching result and the length of the road segment to be predicted.
[0215] In this embodiment, the additional information prediction device is suitable for operation on a server, such as a navigation server. When a user requests navigation information using a navigation terminal, the navigation server can generate a navigation planning route based on the starting and ending locations provided by the navigation terminal, and can also predict the additional information of the navigation planning route. In this embodiment, the navigation planning route is the route to be predicted. It should be noted that the additional information of the route to be predicted is unknown, while the category additional information of the target road segment category to which each target road segment in the set of target road segments belongs has been predetermined. The set of target road segment categories may include all or part of the target road segment categories in the road network data and the category additional information of the target road segment categories.
[0216] In some embodiments, the route to be predicted may include one or more road segments. It should be noted that a road segment (Link) is the smallest data structure describing a road. A road segment is the smallest segment of a route, containing information such as road class, road composition, number of lanes, lane speed, segment name, length, shape point, and direction. In the road network data of an electronic map, each road segment is assigned a segment identifier.
[0217] In some embodiments, the set of road segments to be predicted corresponding to the route to be predicted can be divided into a set of road segments including multiple road segments by interrupting the route at fork in the road, for example, as follows:
[0218] The search can begin from the starting point of the route to be predicted. Upon encountering a fork in the road, the route is divided by breaking it at the fork. The resulting segment is added to the set of segments to be predicted for that route. In some embodiments, when the route to be predicted is a navigation planning route, since navigation planning routes are planned on a segment-by-segment basis, the set of segments to be predicted is already generated when the navigation planning route is generated and can be directly obtained without performing the above-mentioned division steps.
[0219] In some embodiments, using the set of target road segments corresponding to the sample routes and the known route supplementary information corresponding to the sample routes, the category supplementary information corresponding to the target road segment category to which each target road segment belongs in the target road segment set is obtained in advance by training a machine self-learning model. In some embodiments, the process of obtaining the category supplementary information of the target road segment category to which the target road segment belongs can be referred to the description of the model training device above, and will not be repeated here. Of course, it is understood that the category supplementary information of the target road segment category to which the target road segment belongs can also be obtained by other means, as long as the category supplementary information of the target road segment category is known, and there is no limitation here.
[0220] Therefore, after obtaining the set of road segments to be predicted corresponding to the route to be predicted, the target road segment categories to which all road segments included in the route to be predicted belong, as well as the category-specific information of each target road segment category, can be determined by matching the road segments to be predicted in the set of target road segment categories. Then, route-specific information for the route to be predicted can be determined based on the length of the road segments to be predicted and the category-specific information of their respective target road segment categories. In some embodiments, the category-specific information of the target road segment category is additional information per unit length, such as the road segment cost per unit length.
[0221] In other words, in this embodiment of the present disclosure, the additional information per unit length under the target road segment category is known. By dividing the route to be predicted into multiple road segments to be predicted, the target road segment category to which the road segment to be predicted belongs is determined based on road characteristics. Then, the additional information of the route to be predicted is determined based on the additional information per unit length under the target road segment category and the length of the road segment to be predicted.
[0222] In this embodiment of the disclosure, when predicting additional information about a route to be predicted, such as a navigation planning route, a set of road segments to be predicted corresponding to the route to be predicted is obtained. The road segments to be predicted in this set are then matched with a set of target road segment categories. The target road segment category set includes at least one target road segment category and category-specific additional information corresponding to that at least one target road segment category. Based on the category-specific additional information corresponding to the matched target road segment categories and the length of the road segment to be predicted, the additional information about the route to be predicted is determined. By using the known category-specific additional information of the target road segment categories to which each road segment belongs to determine the additional information about the route to be predicted, the accuracy of the prediction can be improved.
[0223] In an optional implementation of this embodiment, the matching module includes:
[0224] The second clustering submodule is configured to cluster the road segments to be predicted in the set of road segments to be predicted based on road features; wherein, the clustering result includes the categories of road segments to be predicted with the same road features and the total length of the road segments to be predicted under the categories of road segments to be predicted;
[0225] The first matching submodule is configured to match the road segment categories to be predicted in the clustering results with the target road segment category set to obtain a matching result including the matching road segment categories to be predicted and the target road segment categories.
[0226] In this optional implementation, the road segments to be predicted in the set of road segments to be predicted can be clustered first. The basis for clustering is that road segments to be predicted with the same road characteristics are grouped into one category, and one or more categories of road segments to be predicted can be obtained. In addition, the total length of the road segments to be predicted under each category of road segments to be predicted can be determined.
[0227] The one or more road segment categories to be predicted are matched with the target road segment categories in the target road segment category set to obtain matching results including the matched road segment categories to be predicted and the target road segment categories.
[0228] Based on the matching result, the category-specific information of the road segment to be predicted can be determined. Furthermore, the route-specific information of the route to be predicted can be determined based on the total length of the road segments under each category and the category-specific information. For example, the road toll information of the route to be predicted can be obtained by multiplying the total length of the road segments under each category by the toll information for that category, and then summing the products corresponding to each category.
[0229] In an optional implementation of this embodiment, the matching module includes:
[0230] The determination submodule is configured to determine the category of the road segment to be predicted in the set of road segments to be predicted based on road features;
[0231] The second matching submodule is configured to match the road segment category to be predicted with the set of target road segment categories to obtain a matching result including the matching road segment category to be predicted and the target road segment category.
[0232] In this optional implementation, as described above, the target road segment category can be assigned a category identifier based on road features. This category identifier includes the corresponding road features. When the road features of the road segment to be predicted are known, the category identifier of the road segment to be predicted can be obtained based on the road features of the road segment to be predicted. The category identifier of the road segment to be predicted is matched with the category identifier of the target road segment in the target road segment category set. This can determine the target road segment category that matches the road segment to be predicted, thereby obtaining the matching result between the road segment to be predicted and the target road segment category.
[0233] Based on the matching result, the category-specific information of the road segment to be predicted can be determined. Furthermore, the route-specific information of the route to be predicted can be determined based on the total length of the road segments under each category and the category-specific information. For example, the road toll information of the route to be predicted can be obtained by multiplying the total length of the road segments under each category by the toll information for that category, and then summing the products corresponding to each category.
[0234] In one optional implementation of this embodiment, the route to be predicted includes the route between the entrance toll station and the exit toll station in the navigation planning route; the route supplementary information is the overall road toll information of the route to be predicted; and the category supplementary information is the road toll information per unit length of the target road segment under the target road segment category.
[0235] In this optional implementation, the aforementioned additional information prediction device can be executed on the navigation server. The route to be predicted can be a portion of the navigation route planned by the navigation server based on the starting and ending locations provided by the navigation terminal. This portion of the route is a section between the entrance toll station and the exit toll station. In other words, the route to be predicted is a route on a toll road segment. The route additional information is the overall road toll information for the route to be predicted; while the category additional information is the road toll information per unit length under the target road segment category.
[0236] In an optional implementation of this embodiment, the target road segment category set is obtained in advance by training a machine self-learning model through multiple sample routes; during the training of the machine self-learning model, the route additional information of the sample routes is known, the target road segments in the target road segment set corresponding to the sample routes are clustered to obtain the target road segment category, and the machine self-learning model is trained using the length of the target road segments under the target road segment category and the route additional information to obtain the category additional information corresponding to the target road segment category.
[0237] In this optional implementation, a large number of sample routes can be collected, and each sample route can be divided into a target segment set that includes multiple target road segments. During the division process, the search can start from the starting point of the sample route, and when a fork in the road is encountered, the sample route can be divided by breaking it at the fork. The resulting segment is added as a target road segment to the target segment set of the sample route, and the length of the target road segment is also added to the target segment set.
[0238] After dividing each sample route into corresponding target road segment sets, the additional road segment information of each target road segment in the target road segment set can be determined based on the target road segment set and the route additional information of the sample route.
[0239] In some embodiments, the target road segments in the target road segment set corresponding to the sample route can be clustered, with target road segments having the same road characteristics grouped into one category, and target road segments with different road characteristics grouped into different categories, thus obtaining the target road segment category corresponding to the sample route. Alternatively, the total length of the target road segments under each target road segment category can be determined. After training a machine learning model based on the total length of the target road segments under each target road segment category and the route supplementary information of the sample route, the category supplementary information for each target road segment category can be determined.
[0240] It is understood that the additional information of each sample route is known, and after the sample route is divided into multiple target road segments, the length of each target road segment is also known. The additional information of the sample route is obtained based on the additional information of each target road segment into which the sample route is divided. Target road segments with the same road characteristics have the same additional information. Based on this, a machine learning model can be trained by using the target road segment category to which the target road segments in each sample route belong, the total length of the target road segment categories under each target road segment category, and the additional information of the sample route as a training sample set. This yields the category additional information corresponding to each target road segment category. Then, during online prediction, the additional information of the new route can be determined based on the category additional information corresponding to the target road segment category and the target road segment category and length of each road segment in the new route. In some embodiments, the machine learning model can employ a linear regression model.
[0241] In some embodiments, the route supplementary information is road toll information. The route supplementary information of a sample route, i.e., the road toll information, is the sum of the road segment supplementary information, i.e., the road toll information, corresponding to the target road segments divided into target road segments on the sample route. The road toll information on a route is related to the route length. Therefore, a linear regression model can be fitted using the target road segment category and total length of each target road segment on multiple sample routes, along with the route supplementary information, to solve for the category supplementary information of each target road segment category.
[0242] According to an embodiment of the present disclosure, a location-based service providing apparatus provides location-based services to a service recipient using the aforementioned model training apparatus and / or additional information prediction apparatus. The location-based services include one or more of navigation, map rendering, and route planning.
[0243] In this embodiment, the location-based service providing device can be executed on a location service terminal, such as a mobile phone, iPad, computer, smartwatch, or in-vehicle device. This embodiment can predict road toll information corresponding to a route during navigation, route planning, and / or map rendering. This road toll information can then be pushed to the user during navigation. In route planning, a low-cost route can be planned for the user based on the road toll information. And / or, during map rendering, the road toll information can be rendered on the map for the user to view.
[0244] The served devices can be mobile phones, iPads, computers, smartwatches, autonomous vehicles, robots, etc. The server can send the target road set and / or predicted road toll information obtained by the above devices to the location service terminal. When the location service terminal navigates, plans routes, or renders roads on the map for the served devices, it provides the served devices with road toll information. For details, please refer to the description of the model training device and / or additional information prediction device above, which will not be repeated here.
[0245] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing a model training method, an additional information prediction method, and / or a location-based service provision method according to an embodiment of the present disclosure.
[0246] like Figure 7 As shown, the electronic device 700 includes a processing unit 701, which can be implemented as a CPU, GPU, FPGA, NPU, or other processing unit. The processing unit 701 can execute various processes according to any of the methods described above in this disclosure, based on a program stored in the read-only memory (ROM) 702 or a program loaded from the storage portion 708 into the random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0247] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0248] In particular, according to embodiments of this disclosure, any of the methods described above in the embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing any of the methods in the embodiments of this disclosure. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711.
[0249] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0250] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.
[0251] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in this disclosure.
[0252] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A model training method, wherein, include: Obtain the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route; The target road segment set includes at least one target road segment on the sample route, the length of the target road segment, and the road characteristics of the target road segment; Based on the road features, the target road segments in the target road segment set are clustered; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category; Based on the clustering results corresponding to the sample routes and the additional route information, a machine self-learning model is trained to determine the additional category information corresponding to the target road segment category. The additional category information corresponding to the target road segment category is used to determine the additional route information of the route to be predicted. The additional category information corresponding to the target road segment category is the additional information per unit length corresponding to the target road segment belonging to that target road segment category.
2. The method according to claim 1, wherein, Based on the clustering results corresponding to the sample routes and the additional route information, a machine self-learning model is trained to determine the additional category information corresponding to the target road segment category, including: Based on the clustering results, the sample feature variables and sample feature ground truth values of the machine self-learning model are obtained; the sample feature variables include the total length of the target road segment under the target road segment category, and the sample feature ground truth values include the route additional information of the sample route; The machine self-learning model is trained using the sample feature variables corresponding to multiple sample routes and the true values of the sample features to obtain additional category information corresponding to the target road segment category.
3. The method according to claim 1 or 2, wherein, The road features include multiple sub-features; clustering the target road segments in the target road segment set based on the road features includes: The target road segments in the sample route that have the same multiple sub-features are grouped into the same target road segment category.
4. The method according to claim 1 or 2, wherein, The road features include one or more combinations of road grade, road structure, number of lanes, and vehicle speed.
5. The method according to claim 1 or 2, wherein, Obtain the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route, including: Obtain the sample route; The sample route is divided into multiple target road segments by interrupting it at fork in the road, so as to obtain the set of target road segments corresponding to the sample route.
6. A method for predicting additional information, wherein, include: Obtain the set of road segments to be predicted and the set of target road segment categories corresponding to the route to be predicted; The set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road characteristics of the road segments to be predicted; The target road segment category set includes at least one target road segment category and additional category information corresponding to the target road segment category; The additional category information corresponding to the target road segment category is determined based on the model training method described in any one of claims 1-5; Based on the road features, the road segments to be predicted in the set of road segments to be predicted are matched with the target road segment categories in the set of target road segment categories; The additional information of the route to be predicted is determined based on the category information corresponding to the target road segment category in the matching results and the length of the road segment to be predicted.
7. The method according to claim 6, wherein, Matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features includes: Based on road features, the road segments to be predicted in the set of road segments to be predicted are clustered; wherein, the clustering results include the categories of road segments to be predicted with the same road features and the total length of the road segments to be predicted under the categories of road segments to be predicted; The road segment categories to be predicted in the clustering results are matched with the target road segment category set to obtain matching results including matching road segment categories to be predicted and target road segment categories.
8. The method according to claim 6, wherein, Matching the road segments to be predicted in the set of road segments to be predicted with the target road segment categories in the set of target road segment categories based on the road features includes: The category of the road segment to be predicted in the set of road segments to be predicted is determined based on road characteristics; The road segment category to be predicted is matched with the set of target road segment categories to obtain a matching result that includes the matching road segment category to be predicted and the target road segment category.
9. The method according to any one of claims 6-8, wherein, The target road segment category set is obtained in advance by training a machine self-learning model through multiple sample routes. During the training of the machine self-learning model, the route additional information of the sample routes is known. The target road segments in the target road segment set corresponding to the sample routes are clustered to obtain the target road segment category. After training the machine self-learning model using the length of the target road segment under the target road segment category and the route additional information, the category additional information corresponding to the target road segment category is obtained.
10. A method for providing location-based services, the method utilizing the method of any one of claims 1-9 to provide location-based services to a service recipient, the location-based services comprising: One or more of the following: navigation, map rendering, and route planning.
11. A model training device, wherein, include: The first acquisition module is configured to acquire the set of target road segments corresponding to the sample route and the additional route information corresponding to the sample route. The target road segment set includes at least one target road segment on the sample route, the length of the target road segment, and the road characteristics of the target road segment; The clustering module is configured to cluster the target road segments in the target road segment set based on the road features; wherein, target road segments with the same road features are clustered into the same target road segment category, and the clustering result includes the target road segment category and the total length of the target road segments under the target road segment category; The training module is configured to train a machine self-learning model based on the clustering results corresponding to the sample routes and the route supplementary information to determine the category supplementary information corresponding to the target road segment category. The category supplementary information corresponding to the target road segment category is used to determine the route supplementary information of the route to be predicted. The category supplementary information corresponding to the target road segment category is the supplementary information per unit length corresponding to the target road segment belonging to that target road segment category.
12. An additional information prediction device, wherein, include: The second acquisition module is configured to acquire the set of road segments to be predicted and the set of target road segment categories corresponding to the route to be predicted. The set of road segments to be predicted includes the road segments to be predicted in the route to be predicted, the length of the road segments to be predicted, and the road characteristics of the road segments to be predicted; The target road segment category set includes at least one target road segment category and additional category information corresponding to the target road segment category; The category supplementary information corresponding to the target road segment category is determined based on the model training method described in any one of claims 1-5; the matching module is configured to match the road segment to be predicted in the set of road segments to be predicted with the target road segment category in the set of target road segment categories based on the road features; The determination module is configured to determine the route additional information of the route to be predicted based on the category additional information corresponding to the target road segment category in the matching result and the length of the road segment to be predicted.
13. An electronic device, wherein, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to any one of claims 1-10.
14. A computer-readable storage medium having stored thereon computer instructions, wherein, When executed by a processor, the computer instructions implement the method described in any one of claims 1-10.
Citation Information
Patent Citations
Traffic congestion prediction method and system
CN109887279A