Route recommendation method and device, electronic equipment and storage medium

By using the pre-trained LightGBM algorithm combined with user characteristics and travel characteristics, selecting the most matching route for recommendation, solving the problem of low matching degree of route recommendation in the existing technology, and achieving higher user matching degree and experience improvement.

CN118960765APending Publication Date: 2024-11-15NANJING LINGXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411011574.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, the matching degree of user route recommendations is low, and the user preferences and travel characteristics cannot be fully considered, resulting in the recommended route not matching the user.

Method used

Using a pre-trained lightweight gradient hoist (LightGBM) algorithm, combining user characteristics and travel characteristics, multiple routes from the departure point to the destination are planned, and through decision trees and histogram processing, the most matching target route is selected for recommendation. .

Benefits of technology

It improves the matching degree of route recommendations, ensures that the recommended routes are more in line with user preferences and actual travel needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118960765A_ABST
    Figure CN118960765A_ABST
Patent Text Reader

Abstract

The invention discloses a route recommendation method and device, electronic equipment and a storage medium, and belongs to the technical field of Internet. In the method, after a departure place and a destination of a user side are obtained, N routes from the departure place to the destination are planned, and feature values of various characterization features representing user side route preferences are used as feature values of various characterization features representing user side route preferences; the method comprises the following steps: inputting a plurality of characterization features including at least one user feature of a user side and / or at least one travel feature of the user side in the N routes and feature values of the plurality of route features of the N routes into a pre-trained LightGBM to obtain a target route meeting the route preference of the user side in the N routes, and sending the target route to the user side, so that the user side can receive the plurality of characterization features including at least one user feature of the user side and / or at least one travel feature of the travel of the user side. According to the route recommendation method and the route recommendation device, the feature values of the various representation features representing the user side route preference and the feature values of the various route features of the N routes are comprehensively considered when the user appears every time, the routes are recommended to the user, the considered factors are comprehensive, and therefore the matching degree of the recommended routes and the user is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a route recommendation method, device, electronic device and storage medium. Background Art

[0002] In the online car-hailing industry, multiple routes from the departure point to the destination are generally displayed to users. In related technologies, the route with the highest overlap with the user's historical route is found from the multiple routes currently planned, and is used as the user's preferred route. This method is relatively simple, and the recommended route has a low match with the user. Summary of the invention

[0003] The embodiments of the present application provide a route recommendation method, device, electronic device and storage medium, which are used to solve the problem in the related art that the route recommended to the user has a low matching degree with the user.

[0004] In a first aspect, an embodiment of the present application provides a route recommendation method, comprising:

[0005] After obtaining the departure place and destination of the user terminal, plan N routes from the departure place to the destination, where N is an integer greater than 1;

[0006] Inputting the feature values ​​of multiple characterization features characterizing the route preference of the user terminal and the feature values ​​of multiple route features of the N routes into a pre-trained lightweight gradient boosting machine LightGBM to obtain a target route that meets the route preference of the user terminal among the N routes, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip;

[0007] The target route is sent to the user terminal.

[0008] In a second aspect, an embodiment of the present application provides a route recommendation device, including:

[0009] A planning module, configured to plan N routes from the departure point to the destination after obtaining the departure point and destination of the user terminal, where N is an integer greater than 1;

[0010] An inference module is used to input the feature values ​​of multiple characterization features characterizing the route preference of the user terminal and the feature values ​​of multiple route features of the N routes into a pre-trained lightweight gradient boosting machine LightGBM to obtain a target route that meets the route preference of the user terminal among the N routes, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip;

[0011] A sending module is used to send the target route to the user terminal.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0013] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the route recommendation method.

[0014] In a fourth aspect, an embodiment of the present application provides a storage medium. When a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-mentioned route recommendation method.

[0015] In an embodiment of the present application, after obtaining the departure and destination of the user terminal, N routes from the departure to the destination are planned, and the feature values ​​of the multiple characterization features that characterize the route preferences of the user terminal and the feature values ​​of the multiple route features of the N routes are input into the pre-trained LightGBM to obtain a target route that meets the route preferences of the user terminal among the N routes, and the target route is sent to the user terminal, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip. In this way, each time it occurs, the feature values ​​of the multiple characterization features that characterize the route preferences of the user terminal and the feature values ​​of the multiple route features of the N routes are comprehensively considered to recommend a route to the user, and the factors considered are relatively comprehensive. Therefore, the recommended route has a relatively high degree of match with the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 A schematic diagram of an application scenario of a route recommendation method provided in an embodiment of the present application;

[0018] Figure 2 A flowchart of a route recommendation method provided in an embodiment of the present application;

[0019] Figure 3 A flow chart of a method for selecting a target route provided in an embodiment of the present application;

[0020] Figure 4 A route display page diagram of a user terminal provided in an embodiment of the present application;

[0021] Figure 5A schematic diagram of a histogram corresponding to various features provided in an embodiment of the present application;

[0022] Figure 6 A schematic diagram of a process for determining a mixed histogram of each route provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of a decision tree provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of a splitting process provided in an embodiment of the present application;

[0025] Fig. 9 A schematic diagram of the structure of a route recommendation device provided in an embodiment of the present application;

[0026] Fig.10 A schematic diagram of the hardware structure of an electronic device for implementing a route recommendation method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to solve the problem in the related art that the route recommended to the user has a low matching degree with the user, the embodiments of the present application provide a route recommendation method, device, electronic device and storage medium.

[0028] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0029] The route recommendation method provided in the embodiment of the present application can be applied to various scenarios where route recommendation is required, such as online car-hailing scenarios, designated driver scenarios, etc. Figure 1 , Figure 1 An application scenario diagram of a route recommendation method provided in an embodiment of the present application includes a user end, a server, and a pick-up end, wherein the user end is connected to the server via a wired network or a wireless network, and the pick-up end is also connected to the server via a wired network or a wireless network.

[0030] The user end, such as a mobile phone, iPad, smartwatch, etc., can install a taxi-hailing application or a designated driver application. After the user confirms the departure and destination on the page provided by the taxi-hailing application or the designated driver application, multiple routes, such as three routes, can be displayed. If the user selects a route and chooses to call the service, an order request will be initiated to the service. The order request may include request information such as the departure, destination, and route identifier of this route.

[0031] After receiving an order request sent by any user terminal, the server can generate an order according to the request information in the order request, match the order with the delivery terminal, send order acceptance information to the user terminal, and send order dispatch information to the delivery terminal. The order dispatch information includes the user's contact information, departure place, destination, route identification of the route selected by the user, etc.

[0032] After receiving the dispatch information sent by the server, the delivery terminal, such as a mobile phone, iPad, or smart watch, provides the user with delivery service based on the dispatch information.

[0033] After introducing the application scenarios of the embodiments of the present application, the route recommendation proposed in the present application is described with specific embodiments below. Figure 2 A flowchart of a route recommendation method provided in an embodiment of the present application, the method is applied to Figure 1 In a server, the method includes the following steps.

[0034] In step 21, after obtaining the departure place and destination of the user terminal, N routes from the departure place to the destination are planned, where N is an integer greater than 1.

[0035] Among them, the value of N is 3, 4, 5, 7, 9, etc.

[0036] In step 22, the feature values ​​of multiple characterization features that characterize the user's route preference and the feature values ​​of multiple route features of N routes are input into the pre-trained LightGBM to obtain a target route among the N routes that meets the user's route preference, wherein the multiple characterization features include at least one user feature of the user and / or at least one travel feature of the user's current trip.

[0037] Among them, Light Gradient Boosting Machine (LightGBM) is an efficient and scalable machine learning algorithm based on Gradient Boosted Decision Trees (GBDT). With the help of histograms, it can simplify the amount of data to be calculated and has a relatively fast speed, which is very suitable for scenarios that require quick response, such as online car-hailing and designated drivers.

[0038] The following are examples of specific features included in each category.

[0039] a. The at least one user characteristic of the user terminal may include at least one of the following:

[0040] Whether the user has completed an order and selected a route. For example, 1 indicates that the user has completed an order and selected a route, and 0 indicates that the user has not completed an order and selected a route.

[0041] The number of orders completed by the user in a specified time period, such as the past 7 days;

[0042] The user's completed order flow within a specified time period, such as within the past 7 days;

[0043] The user’s app version;

[0044] The user's membership level;

[0045] Whether the user is highly active (for example, if the user's order volume reaches a preset number within a set time period, such as a month, he is determined to be a highly active user; otherwise, he is determined to be a low-activity user);

[0046] Important features for highly active users include the route attributes of the top three routes chosen by users in a specified time period, such as the past 7 days, such as low price, short duration, and few traffic lights; the number of times users actively switch routes in a specified time period, such as the past 7 days;

[0047] For low-activity users, the more important features include route attributes of routes frequently traveled by similar users and route attributes of routes collected by similar users.

[0048] b. The at least one travel feature of the user's current trip may include at least one of the following features:

[0049] Whether the user's call time is a peak period of vehicle use;

[0050] The city to which the call order belongs;

[0051] Whether the day the user calls is a holiday;

[0052] Whether the weather on the day of the user's call is bad, such as rain, fog, snow, etc.;

[0053] Is it a long-distance order?

[0054] Whether it is a terminal order, that is, whether it departs from the airport or station, whether it is heading to the airport or station, etc.

[0055] c. The various route features for each route may include any combination of the following features:

[0056] Estimated price;

[0057] mileage;

[0058] Duration;

[0059] Number of traffic lights;

[0060] Attribute tags such as low price, short duration, etc.

[0061] Road congestion coefficient;

[0062] Number of electronic eyes;

[0063] Number of lanes;

[0064] Whether it passes through the highway;

[0065] Highway charges;

[0066] Whether the vehicle passes through a restricted area.

[0067] It can be seen that whether it is user characteristics, travel characteristics or route characteristics, they are all relatively rich. In this way, the considered characteristics are more comprehensive and there are more types of each type of characteristics, which is conducive to the subsequent determination of a route that better matches the user.

[0068] In specific implementation, LightGBM can be based on Figure 3 The process shown in the figure obtains the target route, including the following steps:

[0069] In step 221, for the characteristic value of each of the multiple characterization features and the multiple route features, in the histogram corresponding to the feature, a subhistogram corresponding to the characteristic value of the feature is determined, and the histogram is obtained by discretizing the characteristic value of the feature in multiple order samples and performing statistics.

[0070] For example, the target interval corresponding to the characteristic value of this feature can be determined based on the characteristic value range of each interval in the histogram corresponding to this feature, and then, from at least two sub-histograms into which the histogram is pre-divided, the sub-histogram containing the target interval is selected as the sub-histogram corresponding to this characteristic value.

[0071] In step 222, the sub-histograms corresponding to the characteristic values ​​of the route characteristics of each route and the sub-histograms corresponding to the multiple characterization characteristics are combined to obtain a mixed histogram of the route.

[0072] Generally, all features are numbered, and the subhistograms corresponding to the feature values ​​of the route features of each route and the subhistograms corresponding to multiple characterization features are combined in ascending order to obtain a mixed histogram of the route.

[0073] In step 223, a target route is selected from the N routes according to a decision tree and a mixed histogram of the N routes, wherein the decision tree is pre-constructed using a plurality of characterization features and a plurality of route features.

[0074] Generally, a decision tree contains a root node and multiple leaf nodes. Each node corresponds to a feature grouping rule. The feature grouping rule is generally a judgment rule composed of a set of feature values. Moreover, the shallower the depth of the node, the more important the feature corresponding to the node, and the shallower the depth of the node, the less important the feature corresponding to the node.

[0075] In specific implementation, with the help of decision tree, the target route can be selected according to the following steps:

[0076] Step 1: According to the feature grouping rule corresponding to the root node in the decision tree and the mixed histogram of the N routes, the N routes are grouped to obtain at least one group;

[0077] The feature grouping rule corresponding to the root node is a judgment rule composed of a set of feature values. If the mixed histograms of N routes (the mixed histogram contains the feature values ​​of various features) all meet the judgment rule, then the N routes are still in one group. If the mixed histograms of N routes partially meet the judgment rule and partially do not meet the judgment rule, then the N routes are divided into two groups.

[0078] Step 2: Select the group that currently contains the most routes, and find the leaf node corresponding to the group in the decision tree;

[0079] Step 3: Group the routes in the group according to the feature grouping rules corresponding to the leaf nodes and the mixed histogram of the routes in the group;

[0080] Similarly, the feature grouping rule corresponding to the leaf node is also a judgment rule composed of the eigenvalues ​​of a group of features. If the mixed histograms of the routes in the group (the mixed histogram contains the eigenvalues ​​of various features) all meet the judgment rules, the routes in the group will still be in one group. If the mixed histograms of N routes partially meet the judgment rules and partially do not meet the judgment rules, the routes in the group will be divided into two groups.

[0081] Step 4: Execute the step of selecting the group that currently contains the most routes until the preset stop condition is met, and determine the probability of each of the N routes according to the rule that the number of feature grouping rules that the routes meet is positively correlated with the probability;

[0082] Among them, the preset stop conditions include that each group contains only one route, the number of groupings (also called splitting times) corresponding to the group containing the most routes has reached the set number, etc. The probability of each route is determined according to the rule that the number of feature grouping rules that the route meets is positively correlated with the probability, so that the route that meets the more feature grouping rules has a higher probability of becoming the target route;

[0083] Step 5: Determine the target route based on the probabilities of the N routes.

[0084] For example, the route with the highest probability is determined as the target route.

[0085] In step 23, the target route is sent to the user terminal.

[0086] See also Figure 4 , Figure 4A route display page diagram of a user terminal provided in an embodiment of the present application shows three routes: Route 1, Route 2 and Route 3. The color of Route 1 is different from that of the other two routes, indicating that Route 1 is a recommended target route.

[0087] It should be noted that Figure 4 This is just an example. Other ways to distinguish and display Route 1, such as highlighting, adding recommended words, etc., are also possible and will not be listed here one by one.

[0088] In the embodiment of the present application, LightGBM is first trained, then deployed, and finally, LightGBM is used for route recommendation. The whole process is described in detail below.

[0089] 1. Train LightGBM.

[0090] 1. Introduction to order samples.

[0091] In some embodiments, multiple historical orders can be obtained, and then an order sample can be constructed using the feature values ​​of multiple characterizing features corresponding to each historical order and the feature values ​​of multiple route features of N routes corresponding to the historical order as sample inputs, and the order of the user's actual route in the historical order in these N routes as sample outputs.

[0092] In actual applications, N routes will have a sequential relationship in the display page. For convenience, users may directly choose the route at the top, but in fact the route at the top is not the route that meets the user's route preference. Therefore, directly using multiple order samples for training may mislead LightGBM. In order to avoid the influence of the tendency of most users to choose the route at the top on the training results, the order samples can be repeatedly expanded.

[0093] Specifically, each first order sample can be copied into M second order samples, and then the route order and label of the actual route in the M second order samples are adjusted to ensure that the actual route is evenly distributed in all route orders, and then the first order sample and the M second order samples are both used as order samples, where M is an integer not greater than N. The first order sample can be part or all of the original order sample.

[0094] Taking N=3 as an example, assuming that the prices of the three routes corresponding to a first order sample are 8.9, 10.1 and 9.1 respectively, and the actual route selected by the user is the route with a price of 8.9. Assume that the order of the three routes for the user to choose is as shown in Table 1.

[0095] Table 1

[0096] r1 r2 r3 label 8.9 10.1 9.1 0

[0097] In Table 1, r1, r2, and r3 represent three routes respectively. The column order is the route order of the three routes. The route order numbering may start from 0, and label is used to identify the route order of the actual route.

[0098] Then, the first order sample can be copied into two copies, and the order of the actual routes in the two second order samples can be changed, as shown in Table 2, which is the order of the actual routes in the three order samples.

[0099] Table 2

[0100] r1 r2 r3 label 10.1 9.1 8.9 2 9.1 8.9 10.1 1 8.9 10.1 9.1 0

[0101] In Table 2, the labels of the three order samples are 0, 1, and 2, respectively, and are evenly distributed in each route order.

[0102] In this way, even if there is a certain tendency in route selection in the original order sample set, a more balanced route selection environment can be provided, so that all routes can be considered more fairly during training, thereby improving the accuracy of training.

[0103] 2. Introduction to model principles.

[0104] LightGBM has the following two advantages:

[0105] 1) For each feature, a histogram is constructed based on the feature value. By converting the continuous feature value intervals into discrete bucket bins, the amount of calculation can be significantly reduced. Each bin stores the statistical information of the feature value in the corresponding interval, which can be used for subsequent decision tree construction;

[0106] 2) For the construction of decision trees, the histograms of all features are traversed to find the split point that can minimize the gradient. Specifically, the Leaf-wise strategy can be adopted, that is, the leaf nodes that can bring the largest gradient descent are preferentially selected for splitting until the preset stopping conditions such as the depth of the tree or the number of leaf nodes are reached, and then the splitting stops.

[0107] 3. Introduce the prediction process of LightGBM.

[0108] Assuming that the characterization features include the number of orders completed by the user in the past 7 days, and the route features include route attribute labels and road congestion index, the data of an order sample is shown in Table 3.

[0109] Table 3

[0110]

[0111] The first step is to convert continuous numerical features into bins-type histograms to improve operating efficiency and reduce model complexity.

[0112] For each feature of the number of orders completed by the user in the past 7 days, route attribute labels and road congestion index, the characteristic values ​​of this feature in all order samples can be bucketed, that is, discretized. Then, the number of samples falling into each interval is counted to obtain the histogram corresponding to this feature.

[0113] See also Figure 5 , Figure 5 A schematic diagram of a histogram corresponding to various features provided in an embodiment of the present application, wherein the number of orders completed by the user in the past 7 days is divided into 5 intervals with an interval length of 5, and the route attribute label is also divided into 5 intervals, and the interval values ​​are: few traffic lights, low price, short distance, short time and taking the highway, and the road congestion index is divided into 5 intervals with an interval length of 20.

[0114] Then, for the order sample shown in Table 3, the number of orders completed by the user in the past 7 days is 22, corresponding to Figure 5 In the last interval of the top histogram, the route attribute label time of route 0 is short, corresponding to Figure 5 In the fourth interval of the middle histogram, the route attribute label distance of route 1 is close to the corresponding Figure 5 In the third interval of the middle histogram, the route attribute label price of route 2 is low. Figure 5 The second interval of the middle histogram, the road congestion index of route 0 is 5% corresponding to Figure 5 In the first interval of the bottom histogram, the road congestion index of route 1 is 80% corresponding to Figure 5 The fifth interval of the bottom histogram, the road congestion index of route 2 is 2% corresponding to Figure 5 The first interval of the bottom histogram.

[0115] It should be noted that this is only an example. The number of intervals for various features can be different. Moreover, for each feature, the more intervals are divided, the more detailed the feature description is, but the reduced amount of calculation will be less. The fewer intervals are divided, the rougher the feature description is, and the reduced amount of calculation will be more.

[0116] The second step is to accelerate the processing of the histogram. For example, the mean of all samples in the histogram is used to split the histogram and then merge it to further improve the calculation speed of the model.

[0117] In a specific implementation, for the eigenvalue of each feature, a subhistogram corresponding to the eigenvalue can be determined in the histogram corresponding to the feature. For example, a target interval corresponding to the eigenvalue can be determined based on the eigenvalue range of each interval in the histogram corresponding to the feature. The subhistogram containing the target interval is selected as the subhistogram corresponding to the eigenvalue from at least two subhistograms into which the histogram is pre-divided, and then the subhistogram corresponding to the eigenvalue of the route feature of each route and the subhistograms corresponding to the eigenvalues ​​of multiple characterizing features are combined to obtain a mixed histogram of the route.

[0118] See also Figure 6 , Figure 6 A schematic diagram of a process for determining a mixed histogram of each route provided in an embodiment of the present application, wherein the three histograms on the left from top to bottom are histograms corresponding to the number of orders completed by the user in the past 7 days (assuming that it is called histogram Figure 1 ), the histogram corresponding to the route attribute label (assuming it is called histogram Figure 2 ), and the histogram corresponding to the road congestion index of the route (assuming it is called histogram Figure 3 ), histogram Figure 1 ~Hokata Figure 3 The downward arrows indicate where the histogram is divided into subhistograms, i.e. Figure 1 ~Hokata Figure 3 are divided into 2 sub-histograms, for histograms Figure 1 ~Hokata Figure 3 For any histogram in , the division position can be the mean of the feature values ​​of the corresponding features in all order samples. It should be noted that Figure 6 For example only, the division position of each histogram and the number of divided sub-histograms can be adjusted.

[0119] Then, for the order samples shown in Table 3, the number of orders completed by the user in the past 7 days is 22, which corresponds to the histogram Figure 1 In the right subhistogram, the shortest time for route 0 corresponds to the histogram Figure 2 In the subhistogram on the right, the distance of route 1 corresponds to the histogram Figure 2 In the left subhistogram, the low price of route 2 also corresponds to the histogram Figure 2 In the left subhistogram, the road congestion index of route 0 is 5%, which corresponds to the histogram Figure 3 In the left subhistogram, the road congestion index of route 1 is 80% corresponding to the histogram Figure 3 In the right subhistogram, the road congestion index of route 2 is 2%, which corresponds to the histogram Figure 3 Subhistogram on the left.

[0120] Furthermore, for route 0, the sub-histogram corresponding to the number of orders completed by the user in the past 7 days, the sub-histogram corresponding to the short time of route 0, and the sub-histogram corresponding to the road congestion index of route 0, 5%, can be spliced ​​to obtain a mixed histogram of route 0, that is, Figure 6 The top histogram on the right; for route 1, the sub-histogram corresponding to the number of orders completed by the user in the past 7 days is 22, the sub-histogram corresponding to the distance of route 1 is close, and the sub-histogram corresponding to the road congestion index of route 1 is 80% can be spliced ​​to obtain the mixed histogram of route 1, that is, Figure 6 The middle histogram on the right; for route 2, the sub-histogram corresponding to the number of orders completed by the user in the past 7 days is 22, the sub-histogram corresponding to the low price of route 2, and the sub-histogram corresponding to the road congestion index of route 2 is 2% are spliced ​​to obtain the mixed histogram of route 2, that is, Figure 6 The histogram at the bottom right, the mixed histogram of route 0 to route 2, is the histogram after acceleration processing.

[0121] Step 3: Perform Leaf-wise splitting based on the accelerated histogram. Here, only the features with the largest benefits are split, such as the features with the largest number of lines. The features can be split in descending order of importance to the prediction results. For example, the order of importance can be specified as follows: route attribute label > road congestion index > number of orders completed by users in the past 7 days.

[0122] See also Figure 7 , Figure 7 A schematic diagram of a decision tree provided in an embodiment of the present application, wherein each node in the decision tree corresponds to a feature grouping rule, and the feature grouping rule is used to further group the group corresponding to the node.

[0123] by Figure 7 For example, Figure 8 A schematic diagram of a splitting process is provided for an embodiment of the present application. Initially, route 0, route 1, and route 2 can be placed in group 0. Group 0 corresponds to the root node in the decision tree. The feature grouping rule corresponding to the root node is: whether there is a route with low price, short distance, and few traffic lights. Therefore, based on the mixed histogram of routes 0 to 2, it can be first determined whether there is a route with low price, short distance, and few traffic lights among routes 0, route 1, and route 2. Since route 0 does not meet the requirements, routes 1 and 2 meet the requirements, so group 0 is split into two groups 11 and 12. It is assumed that group 11 contains routes 1 and 2, and group 12 contains route 0.

[0124] Since group 11 contains the largest number of routes, group 11 can be further split. Group 11 corresponds to the leaf node on the left side of the root node in the decision tree. The feature grouping rule corresponding to this leaf node is: whether there is a route with a congestion index less than 60%. Therefore, based on the mixed histogram of route 1 and route 2, it can be judged whether there is a route with a congestion index less than 60% in route 1 and route 2. Since route 2 meets this rule and route 1 does not, group 11 is split into 2 groups: group 21 and group 22. Assume that group 21 contains route 2 and group 22 contains route 1.

[0125] At this point, each group contains only one route, so we can stop splitting. Then, according to the rule that the number of feature grouping rules that the group routes meet is positively correlated with the probability, we can determine the probability of each of the three routes.

[0126] Since group 21 meets 2 feature grouping rules, group 22 meets 1 feature grouping rule, and group 12 meets 0 feature grouping rules, the probabilities of route 2, route 1, and route 0 decrease in sequence. Assuming that the probabilities determined for route 2, route 1, and route 0 are 60%, 30%, and 10%, respectively, then route 2 with the highest probability can be determined as the target route.

[0127] 4. Introduce the parameter update process of LightGBM.

[0128] When the training reaches a certain stage, such as the number of training rounds reaches the preset number of rounds, the accuracy of LightGBM can be tested. If the accuracy does not reach the set accuracy, some non-hyperparameters can be updated first, such as the split position and number of splits of the histogram corresponding to each feature, the features corresponding to each node in the decision tree, and the feature combination method corresponding to each node in the decision tree.

[0129] In addition, you can also update hyperparameters, such as the maximum number of leaf nodes, learning rate, feature ratio of random subsets, sample ratio of random subsets, and apply bagging technology every few rounds to permutate and combine hyperparameters, and measure the performance of LightGBM under different hyperparameter combinations in the test set to find the hyperparameter combination with the best performance.

[0130] 2. Deploy LightGBM.

[0131] The trained LightGBM will be deployed to the server.

[0132] 3. Use LightGBM for route recommendation.

[0133] After obtaining the departure and destination of the user, N routes from the departure to the destination can be planned, and the feature values ​​of multiple user characteristics of the user and the feature value of at least one travel feature of the user's current trip, as well as the feature values ​​of multiple route characteristics of the N routes can be obtained. Various feature values ​​are put into the deployed algorithm model (i.e., LightGBM), and the target route that meets the user's route preference among the N routes is obtained, and the target route is sent to the client.

[0134] Based on the same technical concept, the embodiment of the present application also provides a route recommendation device. The principle of solving the problem by the route recommendation device is similar to that of the above-mentioned route recommendation method. Therefore, the implementation of the route recommendation device can refer to the implementation of the route recommendation method, and the repeated parts will not be repeated.

[0135] Fig. 9 A schematic diagram of the structure of a route recommendation device provided in an embodiment of the present application includes:

[0136] The planning module 901 is used to plan N routes from the departure place to the destination after obtaining the departure place and the destination of the user terminal, where N is an integer greater than 1;

[0137] The reasoning module 902 is used to input the feature values ​​of multiple characterization features characterizing the route preference of the user terminal and the feature values ​​of multiple route features of the N routes into a pre-trained lightweight gradient boosting machine LightGBM to obtain a target route that meets the route preference of the user terminal among the N routes, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip;

[0138] The sending module 903 is used to send the target route to the user terminal.

[0139] In some embodiments, the LightGBM obtains the target route according to the following steps:

[0140] For the characteristic value of each of the multiple characterization features and the multiple route features, in the histogram corresponding to the feature, a subhistogram corresponding to the characteristic value is determined, wherein the histogram is obtained by discretizing the characteristic values ​​of the feature in multiple order samples and performing statistics;

[0141] Combining the subhistogram corresponding to the characteristic value of the route characteristic of each route and the subhistograms corresponding to the multiple characterization characteristics to obtain a mixed histogram of the route;

[0142] The target route is selected from the N routes according to a decision tree and a mixed histogram of the N routes, wherein the decision tree is pre-constructed using the multiple characterization features and the multiple route features.

[0143] In some embodiments, a subhistogram corresponding to the feature value is determined in the histogram corresponding to the feature according to the following steps:

[0144] Determine the target interval corresponding to the characteristic value according to the characteristic value range of each interval in the histogram;

[0145] From at least two sub-histograms into which the histogram is pre-divided, a sub-histogram including the target interval is selected as the sub-histogram corresponding to the characteristic value.

[0146] In some embodiments, the target route is selected from the N routes according to the decision tree and the mixed histogram of the N routes in the following steps:

[0147] According to the feature grouping rule corresponding to the root node in the decision tree and the mixed histogram of the N routes, the N routes are grouped to obtain at least one group;

[0148] Select the group that currently contains the most routes, and search for the leaf node corresponding to the group in the decision tree;

[0149] Grouping the routes in the group according to the feature grouping rule corresponding to the leaf node and the mixed histogram of the routes in the group;

[0150] The step of selecting the group that currently contains the most routes is performed until a preset stop condition is met, and the probability of each of the N routes is determined according to the rule that the number of feature grouping rules that the routes meet is positively correlated with the probability;

[0151] The target route is determined according to the probabilities of the N routes.

[0152] In some embodiments, a plurality of order samples for training the LightGBM are obtained according to the following steps:

[0153] Obtain a first order sample, where the first order sample corresponds to N routes, and a label of the first order sample is a sequential number of an actual route in the N routes;

[0154] Copying the first order sample into M second order samples, where M is an integer not greater than N;

[0155] According to a rule that the order of the actual routes is not repeated, configuring the route order of the N routes for the M second order samples, and updating the labels of the M second order samples;

[0156] The first order sample and the M second order samples are determined as the multiple order samples.

[0157] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0158] After introducing the route recommendation method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0159] Refer to the following Fig.10 The electronic device 130 implemented according to this embodiment of the present application is described. Fig.10 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0160] like Fig.10 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0161] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0162] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0163] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0164] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0165] In an exemplary embodiment, a storage medium is also provided, and when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above route recommendation method. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0166] In an exemplary embodiment, the electronic device of the present application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor may execute the steps of any route recommendation method provided in the embodiments of the present application.

[0167] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in the present application.

[0168] Furthermore, the computer program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0169] The program product for route recommendation in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0170] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0171] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0172] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0173] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0174] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0176] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0179] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0180] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also includes these modifications and variations.

Claims

1. A route recommendation method, characterized in that: include: After obtaining the departure place and destination of the user terminal, plan N routes from the departure place to the destination, where N is an integer greater than 1; Inputting the feature values ​​of multiple characterization features characterizing the route preference of the user terminal and the feature values ​​of multiple route features of the N routes into a pre-trained lightweight gradient boosting machine LightGBM to obtain a target route that meets the route preference of the user terminal among the N routes, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip; The target route is sent to the user terminal.

2. The method according to claim 1, characterized in that The LightGBM obtains the target route according to the following steps: For the characteristic value of each of the multiple characterization features and the multiple route features, in the histogram corresponding to the feature, a subhistogram corresponding to the characteristic value is determined, wherein the histogram is obtained by discretizing the characteristic values ​​of the feature in multiple order samples and performing statistics; Combining the subhistogram corresponding to the characteristic value of the route characteristic of each route and the subhistograms corresponding to the multiple characterization characteristics to obtain a mixed histogram of the route; The target route is selected from the N routes according to a decision tree and a mixed histogram of the N routes, wherein the decision tree is pre-constructed using the multiple characterization features and the multiple route features.

3. The method according to claim 2, characterized in that In the histogram corresponding to the feature, determining a subhistogram corresponding to the feature value includes: Determine the target interval corresponding to the characteristic value according to the characteristic value range of each interval in the histogram; From at least two sub-histograms into which the histogram is pre-divided, a sub-histogram including the target interval is selected as the sub-histogram corresponding to the characteristic value.

4. The method according to claim 2, characterized in that Selecting the target route from the N routes according to the decision tree and the mixed histogram of the N routes comprises: According to the feature grouping rule corresponding to the root node in the decision tree and the mixed histogram of the N routes, the N routes are grouped to obtain at least one group; Select the group that currently contains the most routes, and search for the leaf node corresponding to the group in the decision tree; Grouping the routes in the group according to the feature grouping rule corresponding to the leaf node and the mixed histogram of the routes in the group; The step of selecting the group that currently contains the most routes is performed until a preset stop condition is met, and the probability of each of the N routes is determined according to the rule that the number of feature grouping rules that the routes meet is positively correlated with the probability; The target route is determined according to the probabilities of the N routes.

5. The method according to claim 1, characterized in that Get multiple order samples for training the LightGBM according to the following steps: Obtain a first order sample, where the first order sample corresponds to N routes, and a label of the first order sample is a sequential number of an actual route among the N routes; Copying the first order sample into M second order samples, where M is an integer not greater than N; According to a rule that the order of the actual routes is not repeated, configuring the route order of the N routes for the M second order samples, and updating the labels of the M second order samples; The first order sample and the M second order samples are determined as the multiple order samples.

6. A route recommendation device, characterized in that: include: A planning module, configured to plan N routes from the departure point to the destination after obtaining the departure point and destination of the user terminal, where N is an integer greater than 1; An inference module is used to input the feature values ​​of multiple characterization features characterizing the route preference of the user terminal and the feature values ​​of multiple route features of the N routes into a pre-trained lightweight gradient boosting machine LightGBM to obtain a target route that meets the route preference of the user terminal among the N routes, wherein the multiple characterization features include at least one user feature of the user terminal and / or at least one travel feature of the user terminal's current trip; A sending module is used to send the target route to the user terminal.

7. The device according to claim 6, characterized in that The LightGBM obtains the target route according to the following steps: For the characteristic value of each of the multiple characterization features and the multiple route features, in the histogram corresponding to the feature, a subhistogram corresponding to the characteristic value is determined, wherein the histogram is obtained by discretizing the characteristic values ​​of the feature in multiple order samples and performing statistics; Combining the subhistogram corresponding to the characteristic value of the route characteristic of each route and the subhistograms corresponding to the multiple characterization characteristics to obtain a mixed histogram of the route; The target route is selected from the N routes according to a decision tree and a mixed histogram of the N routes, wherein the decision tree is pre-constructed using the multiple characterization features and the multiple route features.

8. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 5.

9. A storage medium, characterized in that: When the computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the method as claimed in any one of claims 1 to 5.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when executed by a processor.