Recommendation model training method and device, loading and unloading point recommendation method and device

By constructing a loading and unloading point recommendation model that considers the time and space scale, combining historical data and user positioning characteristics, the problem of poor recommendation of loading and unloading point recommendation in the existing technology is solved, and more accurate and personalized recommendations are achieved, improving user experience .

CN114331266BActive Publication Date: 2025-01-17SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111612613.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-01-17
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The existing recommendation methods for loading and unloading points are based on global popularity sorting, and fail to effectively consider users' personalized loading and unloading behavior and time and space relationships, resulting in poor recommendation results and affecting the experience between drivers and users.

Method used

By obtaining order data and historical order data within a specified time range, a binary classification sample is constructed, combining the historical loading and unloading heat, positioning heat and spatial distance characteristics of the point, using the gradient enhancement iterative decision tree classifier to train the recommended model, considering different time and space scales Personalized recommendations for loading and unloading preferences and positioning accessibility.

Benefits of technology

It improves the accuracy and reliability of loading and unloading points recommendations, makes recommendations smarter, more efficient, and have a wide range of applications, improving the efficiency and experience of meeting between drivers and users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331266B_ABST
    Figure CN114331266B_ABST
Patent Text Reader

Abstract

The present application relates to a training method and device for a recommendation model for recommending loading and unloading points, and a method and device for recommending loading and unloading points. The training method includes: obtaining all orders within a specified time range as basic data, generating multiple binary classification samples based on the basic data, and the label of each binary classification sample is a positive label or a negative label; obtaining all historical orders, and constructing features for each binary classification sample based on the acquired historical orders, and the features include historical loading and unloading heat features of the point, historical positioning features of the point, and spatial distance features; using the label and features of each binary classification sample as a training sample and performing model training to obtain a trained recommendation model. The embodiments of the present application can improve the accuracy and reliability of the recommendation of loading and unloading points, and are more intelligent, efficient, reasonable, and widely applicable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of loading and unloading point recommendation, and in particular to a training method and device for a recommendation model for recommending loading and unloading points, a loading and unloading point recommendation method and device, a computer device, and a storage medium. Background Art

[0002] There are currently some freight platforms where users can place orders on the platform, and the drivers who accept the orders will go to the designated location to load and unload the goods. In some orders, the user's order point is far away from the user's actual loading and unloading point, and the driver cannot find the user's goods when he arrives. This will not only lead to high communication costs for the driver and the user's goods, but also lead to poor user experience for the driver and the user. In order to improve the efficiency of driver-goods meeting, reduce the cost of meeting, and improve the platform's driver and user experience, the current method is to perform global offline sorting of loading and unloading popularity based on the user's order point.

[0003] The offline global heat ranking method for recommending loading and unloading points has the following advantages: no online calculation is involved, the solution is simple and easy to implement, and online data storage is relatively simple. However, it has the following disadvantages: the offline global heat recommends the same loading and unloading points to different users at the same location, without considering the user's personalized loading and unloading behavior, the changes in loading and unloading behavior preferences, and the spatiotemporal relationship between loading and unloading behavior and the location POI (point of interest) and the user's current location and the recommended points. This ultimately leads to poor loading and unloading point recommendation results, affecting the driver and user experience. Summary of the invention

[0004] In response to the above-mentioned deficiencies or shortcomings, the present application provides a training method and device for a recommendation model for recommending loading and unloading points, a loading and unloading point recommendation method and device, computer equipment and storage medium. The embodiments of the present application can improve the accuracy and reliability of the recommendation of loading and unloading points, and are more intelligent, efficient, reasonable and widely applicable.

[0005] According to a first aspect, the present application provides a training method for a recommendation model for recommending loading and unloading points. In one embodiment, the method includes:

[0006] Get all orders within the specified time range as basic data, and generate multiple binary classification samples based on the basic data. The label of each binary classification sample is a positive label or a negative label.

[0007] Obtain all historical orders, and construct features for each binary classification sample based on the obtained historical orders. The features include the historical loading and unloading heat feature of the point, the historical positioning feature of the point, and the spatial distance feature.

[0008] The label and features of each binary classification sample are used as training samples and model training is performed to obtain a trained recommendation model.

[0009] In one embodiment, all orders within a specified time range are obtained as basic data, and multiple binary classification samples are generated according to the basic data, including:

[0010] Get the order data of each order within the specified time range as basic data;

[0011] Recall the recommended points corresponding to each order by specifying the recall index;

[0012] Select x recommended points from all the recalled recommended points according to the specified rules;

[0013] Use the rough ranking model to score each of the x recommended points, and select y recommended points with the highest scores from the x recommended points; x and y are both positive integers, and y is less than x;

[0014] According to the distance between each of the y recommended points and its corresponding actual loading and unloading point, a label is set for each of the y recommended points;

[0015] Each of the y recommended points and its label is taken as a binary classification sample to obtain y training samples.

[0016] In one embodiment, features are constructed for each binary classification sample based on the acquired historical orders, including:

[0017] At different time and space scales, calculate the heat of the loading and unloading points of all historical orders near the point of each binary classification sample, the heat of the loading and unloading points of all historical orders under the location poi near the point, the heat of the loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of the loading and unloading points of all historical orders of the current order sender under the location poi near the point;

[0018] At different spatial scales, calculate the historical location heat of users near each binary classification sample point;

[0019] Calculate the distance between each binary sample point and the nearby location POI, the distance between each binary sample point and the location when the user places an order, the distance between the location when the user places an order and the nearby location POI, and the minimum distance between each binary sample point and the user's historical location.

[0020] In one embodiment, the label and feature of each binary classification sample are used as training samples and model training is performed, including:

[0021] Use the specified data warehouse tool to map all training samples into database tables;

[0022] Obtain training samples from the database table through the Spark training platform;

[0023] The gradient boosting iterative decision tree classifier performs feature splitting based on the acquired training samples, and the loss gradient is returned for model training.

[0024] According to a second aspect, the present application provides a method for recommending loading and unloading points. In one embodiment, the method includes:

[0025] Receive a request from a target user;

[0026] Extract the input parameters in the request, obtain the corresponding features from the online feature storage medium according to the extracted input parameters, and generate n prediction samples according to the obtained features;

[0027] Using the recommendation model to score each predicted sample; the recommendation model is trained using the training method for the recommendation model for recommending loading and unloading points provided in any of the above embodiments;

[0028] Select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples, where n and m are both positive integers, and m is less than n.

[0029] In one embodiment, the method further includes: forcibly adsorbing the preset sample with the highest score among the m predicted samples.

[0030] According to a third aspect, the present application provides a training device for a recommendation model for recommending loading and unloading points. In one embodiment, the device includes:

[0031] The sample generation module is used to obtain all orders within a specified time range as basic data, and generate multiple binary classification samples based on the basic data. The label of each binary classification sample is a positive label or a negative label;

[0032] The feature construction module is used to obtain all historical orders and construct features for each binary classification sample based on the obtained historical orders. The features include the historical loading and unloading heat feature of the point, the historical positioning feature of the point, and the spatial distance feature.

[0033] The training module is used to use the label and features of each binary classification sample as a training sample and perform model training to obtain a trained recommendation model.

[0034] According to a fourth aspect, the present application provides a loading and unloading point recommendation device. In one embodiment, the device includes:

[0035] A request receiving module, used for receiving a request from a target user;

[0036] A prediction sample generation module is used to extract input parameters in the request, obtain corresponding features from an online feature storage medium according to the extracted input parameters, and generate n prediction samples according to the obtained features;

[0037] A scoring module, used to score each predicted sample using a recommendation model; the recommendation model is trained using a training method for a recommendation model for recommending loading and unloading points provided in any of the above embodiments;

[0038] The recommendation module is used to select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples.

[0039] According to a fifth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above method embodiments when executing the computer program.

[0040] According to a sixth aspect, the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of an embodiment of any of the above methods are implemented.

[0041] In the embodiment of the present application, all orders within a specified time range are obtained as basic data, and multiple binary classification samples are generated based on the basic data, and the label of each binary classification sample is a positive label or a negative label; all historical orders are obtained, and features are constructed for each binary classification sample based on the obtained historical orders, and the features include historical loading and unloading heat features of the point, historical positioning features of the point, and spatial distance features; the label and features of each binary classification sample are used as training samples and model training is performed to obtain a trained recommendation model. The embodiment of the present application can improve the accuracy and reliability of the recommendation of loading and unloading points, and is more intelligent, efficient, reasonable, and widely applicable. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a flow chart of a training method for a recommendation model for recommending loading and unloading points in one embodiment;

[0043] Figure 2 is a schematic diagram of feature importance in one embodiment;

[0044] Figure 3 A training flowchart of a recommendation model in one embodiment;

[0045] Figure 4 A schematic diagram of a flow chart of a method for recommending loading and unloading points in one embodiment;

[0046] Figure 5is an overall flow chart of a recommended loading and unloading point in one embodiment;

[0047] Figure 6 A data schematic diagram of a loading and unloading point recommended in an embodiment;

[0048] Figure 7 is a structural block diagram of a training device for a recommendation model for recommending loading and unloading points in one embodiment;

[0049] Figure 8 It is a structural block diagram of a loading and unloading point recommendation device in one embodiment;

[0050] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The present application provides a training method for a recommendation model for recommending loading and unloading points. In one embodiment, the training method for a recommendation model for recommending loading and unloading points includes: Figure 1 The steps shown are described below.

[0053] S110: Acquire all orders within a specified time range as basic data, and generate multiple binary classification samples based on the basic data, where the label of each binary classification sample is a positive label or a negative label;

[0054] The specified time range may be one week, one month, etc., which is not limited in this embodiment. The acquired order may include user_id (user ID), poiid (point ID), poiname (point name), tel (user contact number), longitude and latitude of the request point, longitude and latitude of the selected poi, longitude and latitude of the actual loading and unloading point, etc. Points can also be said to be coordinate points on the map, which can be uniquely determined by longitude and latitude.

[0055] In one embodiment, all orders within a specified time range are obtained as basic data, and multiple binary classification samples are generated according to the basic data, including:

[0056] Get the order data of each order within the specified time range as basic data; recall the recommended points corresponding to each order by specifying the recall index; select x recommended points from all the recalled recommended points according to the specified rules; use the coarse sorting model to score each of the x recommended points, and select the y recommended points with the highest scores from the x recommended points; set a label for each of the y recommended points according to the distance between each of the y recommended points and its corresponding actual loading and unloading point; take each of the y recommended points and its label as a binary classification sample to obtain y training samples. Where x and y are positive integers, and y is less than x.

[0057] S120: Obtain all historical orders, and construct features for each binary classification sample according to the obtained historical orders.

[0058] Feature engineering is performed through the historical orders obtained, including the historical loading and unloading heat feature of the point, the historical positioning feature of the point, and the spatial distance feature.

[0059] Furthermore, the historical loading and unloading heat characteristics of the point at least include the heat of the loading and unloading points of all historical orders near the point, the heat of the loading and unloading points of all historical orders under the location POI near the point, the heat of the loading and unloading points of all historical orders placed by the current order issuer near the point, and the heat of the loading and unloading points of all historical orders of the current order issuer under the location POI near the point; the historical positioning characteristics of the point include the historical positioning heat of users near the point; the spatial distance characteristics include at least the distance between the point and POI of the binary classification sample, the distance between the point and the user's positioning when placing an order, the distance between the user's positioning when placing an order and POI, and the minimum distance between the point and the user's historical positioning of the binary classification sample.

[0060] In one embodiment, constructing features for each binary classification sample based on the acquired historical orders includes:

[0061] At different time and space scales, calculate the heat of the loading and unloading points of all historical orders near the point of each binary classification sample, the heat of the loading and unloading points of all historical orders under the location poi near the point, the heat of the loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of the loading and unloading points of all historical orders of the current order sender under the location poi near the point;

[0062] At different spatial scales, calculate the historical location heat of users near each binary classification sample point;

[0063] Calculate the distance between each binary sample point and the nearby location POI, the distance between each binary sample point and the location when the user places an order, the distance between the location when the user places an order and the nearby location POI, and the minimum distance between each binary sample point and the user's historical location.

[0064] The importance of each feature can be found in Figure 2 shown.

[0065] S130: Use the label and features of each binary classification sample as a training sample and perform model training to obtain a trained recommendation model.

[0066] The label and features of each binary classification sample are used as training samples and model training is performed, including: using a specified data warehouse tool to map all training samples into a database table; obtaining training samples from the database table through a spark training platform; performing feature splitting based on the obtained training samples through a gradient boosting iterative decision tree classifier, and returning the loss gradient for model training.

[0067] The designated data warehouse tool refers to hive, the spark training platform refers to the spark training platform, and the gradient boosting iterative decision tree classifier refers to the gbdt classifier.

[0068] In response to the current recommendation problem of loading and unloading points, this embodiment solves it from the algorithm level. By comprehensively considering the historical loading and unloading popularity characteristics, historical positioning characteristics and spatial distance characteristics of points at different time and space scales, the user's loading and unloading preferences in different time periods, the potential spatial location of loading and unloading contacts, and the spatial accessibility of the points relative to the POI and the current location are characterized. The recommendation model is trained based on these characteristics, which can greatly improve the accuracy and reliability of the loading and unloading points recommended by the recommendation model, and is more intelligent, efficient, reasonable and widely applicable.

[0069] Compared with the previous single offline recommendation method based on the global heat of the recommended point, this embodiment designs a variety of historical loading and unloading heat features of different time and space scales to fully capture the changes in the user's loading and unloading preferences. At the same time, the contact's historical location heat features are added to characterize the location preferences of the loading and unloading contacts, and the user's current location, POI and point space distance features are considered to characterize the order sender's instant location and spatial distance accessibility. After the feature information is constructed, a machine learning model is used to uniformly score the candidate points, and the user is recommended a suitable loading and unloading point based on the model score. Compared with the previous recommendation method, this embodiment can make the recommendation of loading and unloading points more personalized and intelligent, thereby improving the meeting efficiency, as well as the platform driver and user experience.

[0070] The above embodiment is described below by using a specific example.

[0071] In this example, the entire training process of the recommendation model is divided into three parts: sample construction, feature engineering, and model training. The training process can be found in Figure 3 As shown. Among them, the sample construction part mainly constructs binary classification samples through different recall methods, including positive samples and negative samples; the feature engineering part includes all historical orders of all users on the platform, using the actual loading and unloading points mined by orders to construct loading and unloading heat features of different time and space intersections, historical positioning heat features based on the historical positioning of platform users, location POI and point spatial distance features, user request positioning point and point spatial distance features, etc.; the model training part is based on Spark MLlib module training, and the trained model is saved in PMML (Predictive Model Markup Language) format, which is convenient for online calling; online prediction is Java calling the saved PMML file for real-time scoring prediction. The above three parts are explained below.

[0072] 1. About sample construction

[0073] (1) Sample selection

[0074] Randomly select a week's worth of orders as basic data (which may include user_id, poiid, poiname, tel, longitude and latitude of the request point, longitude and latitude of the selected poi, longitude and latitude of the actual loading and unloading point, etc.), use different recall indexes (where key can be user_id_poiid, tel_poiid, poiid, etc.) to recall the recommended points, remove duplicates from all the recalled points, and finally take a maximum of 150 points. Use the offline rough ranking model (which is also a recommendation model) to score these 150 points. Each point will correspond to a score, for example, point 1: 0.95, point 2: 0.85, point 3: 0.75, etc., intercept the top 30 points with the highest scores from these 150 points, and output them to the fine ranking model (that is, the recommendation model to be trained) as training samples. The samples are binary samples, including positive labels (represented by 1) and negative labels (represented by 0).

[0075] (2) Label generation

[0076] This example uses the "supervised learning" method, that is, each piece of data is labeled (positive or negative). Among the above 30 points, the points whose distance from the actual loading and unloading points of the order is less than or equal to 50 meters are used as positive samples, and the points whose distance from the actual loading and unloading points of the order is greater than 50 meters are used as negative samples.

[0077] 2. About feature engineering

[0078] (1) Characteristics of historical loading and unloading heat at a point

[0079] At different time and space scales, the heat of loading and unloading points of all historical orders near the point, the heat of loading and unloading points of all historical orders under the location POI near the point, the heat of loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of loading and unloading points of all historical orders of the current order sender under the location POI near the point are calculated respectively.

[0080] The heat of all loading and unloading points of historical orders near the point is represented by p_trace_cnt_xdym. For example, p_trace_cnt_xdym = the total number of loading and unloading points of orders within a range of y meters near the point in the past x days. The value of x can be 365, 180, 90, 60, 30, etc., and the value of y can be 10, 20, 30, 40, 50, 100, etc.

[0081] The heat of loading and unloading points of all historical orders under the selected POI near the point can include absolute heat and relative heat. For example, the absolute heat is represented by pp_trace_cnt_xdym, pp_trace_cnt_xdym = the total number of loading and unloading points of orders under the POI within the range of y meters near the point in the past x days; the relative heat is represented by pp_trace_ratio_xdym, pp_trace_ratio_xdym = pp_trace_cnt_xdym / the total number of loading and unloading points under the POI in the past x days. The value of x can be 365, 180, 90, 60, 30, etc., and the value of y can be 10, 20, 30, 40, 50, 100, etc.

[0082] The heat of the loading and unloading points of all historical orders placed by the current order issuer near the point can also include absolute heat and relative heat. Exemplarily, the absolute heat is represented by up_trace_cnt_xdym, up_trace_cnt_xdym = the total number of loading and unloading points within y meters near the point where the user completed the order in the past x days, and the relative heat is represented by up_trace_ratio_xdym, up_trace_ratio_xdym = up_trace_cnt_xdym / the total number of loading and unloading points where the user completed the order in the past x days. The value of x can be 365, 180, 90, 60, 30, etc., and the value of y can be 10, 20, 30, 40, 50, 100, etc.

[0083] The heat of the loading and unloading points of all historical orders of the current order issuer under the selected POI near the point can also include absolute heat and relative heat. For example, the absolute heat is represented by upp_trace_cnt_xdym, upp_trace_cnt_xdym=the total number of loading and unloading points within y meters near the point where the user completed the order under the POI in the past x days, and the relative heat is represented by upp_trace_ratio_xdym, upp_trace_ratio_xdym=upp_trace_cnt_xdym / the total number of loading and unloading points where the user completed the order under the POI in the past x days. The value of x can be 365, 180, 90, 60, 30, etc., and the value of y can be 10, 20, 30, 40, 50, 100, etc.

[0084] (2) About the historical positioning characteristics of points

[0085] At different spatial scales, the historical positioning heat of users near the point is calculated separately.

[0086] Exemplarily, the historical positioning heat of users near a point may include absolute heat and relative heat. The absolute heat is represented by loc_heat_xm, loc_heat_xm = the total number of historical positioning of the user within x meters near the point in the past x days, and the relative heat is represented by loc_heat_ratio_x meters, loc_heat_ratio_xm = loc_heat_xm / the total number of historical positioning of the user in the past x days, where x can be 10, 20, 30, 40, 50, 100, etc.

[0087] (3) Regarding spatial distance characteristics

[0088] The spatial distance features include one or more of the distance between the point to be recommended and the POI, the distance between the point to be recommended and the location when the user places an order, the distance between the location when the user places an order and the POI, and the minimum distance between the point to be recommended and the user's historical location.

[0089] 3. About model training

[0090] After feature engineering of the constructed samples, training samples containing all the features in 1 above can be obtained. The training samples are stored in the form of hive tables. The spark training platform can directly obtain training samples from the hive table. The gbdt classifier continuously trains the model through feature splitting and loss gradient feedback. The tree model parameters are set as follows: maximum depth 10, number of trees 100, learning rate 0.01, and other parameters are set to default.

[0091] Specifically, the gbdt classifier in the Spark MLlib module is used. gbdt is actually an "integrated tree model" composed of multiple "binary trees" (one root node and at most two child nodes called left nodes and right nodes) connected in sequence. The "root node" is used to store split features and split thresholds (conditions). The left and right child nodes are used to store samples that meet the split conditions and samples that do not meet the split conditions, respectively. After the model is trained, all samples are divided into leaf nodes. Finally, the classification error between the samples on all leaf nodes and the predicted label corresponding to the node is calculated, and then the gradient is updated according to the error loss function. The ultimate goal of the gradient update is to reduce the overall error and make the value output by the model closer to the true label, so as to have a highly reliable prediction ability for unknown data.

[0092] This example comprehensively considers the loading and unloading popularity information of points at different time and space scales, the historical positioning popularity information of point users, the point-POI spatial distance, the point-user spatial distance, and the user-POI spatial distance, and depicts the user's loading and unloading preferences in different time periods, the potential spatial location of contacts, and the spatial accessibility of the point relative to the POI and the current location, which greatly improves the accuracy and reliability of the recommendation of loading and unloading points, and is more intelligent, efficient, reasonable, and widely applicable.

[0093] The present application also provides a method for recommending loading and unloading points. In one embodiment, the method includes: Figure 4 The steps shown are described below.

[0094] S210: receiving a request from a target user;

[0095] S220: extracting input parameters in the request, acquiring corresponding features from an online feature storage medium according to the extracted input parameters, and generating n prediction samples according to the acquired features;

[0096] S230: Use the recommendation model to score each predicted sample.

[0097] The recommendation model used in this embodiment is trained using the training method of the recommendation model for recommending loading and unloading points provided in any of the above embodiments;

[0098] S240: Select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples, wherein n and m are positive integers, and m is less than n.

[0099] After the recommendation model is trained using the training method for the recommendation model for recommending loading and unloading points provided in the above embodiment, the recommendation model can be used for prediction.

[0100] Among them, prediction is also called the classification process. For a real data (for example, containing user_id, poiid, point), since the features are updated to the online feature storage medium pika (360 open source Redis-like storage system) T+1 after the offline calculation is completed, the key composed of different input parameters (user_id, poiid, tel) and recall point point (the key can be user_id_poiid_point, user_id_point, poi_point, point, tel) is used to read the features generated by the above feature engineering stored in pika, and the read features are spliced ​​to generate multiple prediction samples, which can be in the form of <user_id, <feature>>, and then the generated prediction samples are input into the trained recommendation model, which will score the features in each prediction sample. <user_id, <feature>>The predicted samples are input into the trained recommendation model. The model uses the features to determine the real possibility of the data (the score is between 0 and 1), and sorts them from large to small according to the score, for example<user_id, poiid,point1, feature1, 0.9> ,<user_id, poiid,point2, feature2, 0.8> ,<user_id, poiid,point3, feature3, 0.7> And so on, and take the top 3, that is, the top 3 are displayed, among which the top 1, that is, the predicted sample with the highest score, is forced to be adsorbed.

[0101] The following is an explanation using a specific example.

[0102] In this example, the overall process of recommending loading and unloading points to users can be as follows: Figure 5 shown.

[0103] Assume that a user's request is as follows:

[0104] user_id: 42155461

[0105] Request poiid: 0da28f47f040de0f2d4733ab

[0106] Request type: loading

[0107] trigger_id: 2

[0108] The request is passed into the model after obtaining features online. The model finally outputs the following according to the learned parameters: Figure 6 Points shown.

[0109] According to the score, user 42155461 chooses Mancheng Second Traditional Chinese Medicine Hospital to place an order for loading. Then the front end will recommend and display three small orange dots, among which the first-ranked dot will be forcibly adsorbed:

[0110] 1. Mancheng Second Traditional Chinese Medicine Hospital-North Side 1, "lat":"38.807787", "lon":"115.366766";

[0111] 2. Mancheng Second Traditional Chinese Medicine Hospital - North Side 2, "lat":"38.807682", "lon":"115.366841";

[0112] 3. Mancheng Second Traditional Chinese Medicine Hospital - northeast side, "lat":"38.808048","lon":"115.367302".

[0113] Figure 1 , 4 FIG. 1 is a flow chart of a training method for a recommendation model for recommending loading and unloading points in one embodiment. Figure 1 , 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0114] Based on the same inventive concept, the present application also provides a training device for a recommendation model for recommending loading and unloading points. Figure 7 As shown, the training device for the recommendation model for recommending loading and unloading points includes the following modules:

[0115] The sample generation module 110 is used to obtain all orders within a specified time range as basic data, and generate multiple binary classification samples according to the basic data, and the label of each binary classification sample is a positive label or a negative label;

[0116] A feature construction module 120 is used to obtain all historical orders and construct features for each binary classification sample based on the obtained historical orders, the features including the historical loading and unloading heat feature of the point, the historical positioning feature of the point, and the spatial distance feature;

[0117] The training module 130 is used to use the label and features of each binary classification sample as a training sample and perform model training to obtain a trained recommendation model.

[0118] In one embodiment, the sample generation module is specifically used to:

[0119] Get the order data of each order within the specified time range as basic data;

[0120] Recall the recommended points corresponding to each order by specifying the recall index;

[0121] Select x recommended points from all the recalled recommended points according to the specified rules;

[0122] Use the coarse ranking model to score each of the x recommended points, and select y recommended points with the highest scores from the x recommended points;

[0123] According to the distance between each of the y recommended points and its corresponding actual loading and unloading point, a label is set for each of the y recommended points;

[0124] Each of the y recommended points and its label is taken as a binary classification sample to obtain y training samples.

[0125] In one embodiment, the feature construction module is specifically used to:

[0126] At different time and space scales, calculate the heat of the loading and unloading points of all historical orders near the point of each binary classification sample, the heat of the loading and unloading points of all historical orders under the location poi near the point, the heat of the loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of the loading and unloading points of all historical orders of the current order sender under the location poi near the point;

[0127] At different spatial scales, calculate the historical location heat of users near each binary classification sample point;

[0128] Calculate the distance between each binary sample point and the nearby location POI, the distance between each binary sample point and the location when the user places an order, the distance between the location when the user places an order and the nearby location POI, and the minimum distance between each binary sample point and the user's historical location.

[0129] In one embodiment, the training module is specifically used to:

[0130] Use the specified data warehouse tool to map all training samples into database tables;

[0131] Get training samples from the database table through the Spark training platform;

[0132] The gradient boosting iterative decision tree classifier performs feature splitting based on the acquired training samples, and the loss gradient is returned for model training.

[0133] For the specific definition of the training device of the recommendation model for recommending loading and unloading points, please refer to the definition of the training method of the recommendation model for recommending loading and unloading points in the above text, which will not be repeated here. Each module in the above-mentioned training device of the recommendation model for recommending loading and unloading points can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0134] Based on the same inventive concept, the present application also provides a loading and unloading point recommendation device. Figure 8 As shown, the loading and unloading point recommendation device includes the following modules:

[0135] A request receiving module 210, used to receive a request from a target user;

[0136] The prediction sample generation module 220 is used to extract input parameters in the request, obtain corresponding features from an online feature storage medium according to the extracted input parameters, and generate n prediction samples according to the obtained features;

[0137] A scoring module 230 is used to score each predicted sample using a recommendation model; the recommendation model is trained using a training method for a recommendation model for recommending loading and unloading points provided in any of the above embodiments;

[0138] The recommendation module 240 is used to select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples.

[0139] In one embodiment, the device further comprises an adsorption module, which is used to forcibly adsorb the preset sample with the highest score among the m predicted samples.

[0140] The specific definition of the loading and unloading point recommendation device can be found in the definition of the loading and unloading point recommendation method above, and will not be repeated here. Each module in the above loading and unloading point recommendation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0141] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as order data. The specific stored data can also refer to the definition in the above method embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a recommendation model for recommending loading and unloading points is implemented.

[0142] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the method provided in any of the above method embodiments are implemented.

[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in any of the above method embodiments are implemented.

[0145] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0146] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0147] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.< / feature> < / feature>

Claims

1. A training method for a recommendation model for recommending loading and unloading points, characterized in that: The method comprises: Obtain all orders within a specified time range as basic data, and generate multiple binary classification samples based on the basic data, where the label of each binary classification sample is a positive label or a negative label; Obtain all historical orders, and construct features for each of the binary classification samples based on the acquired historical orders, wherein the features include historical loading and unloading heat features of the point, historical positioning features of the point, and spatial distance features; the historical positioning features of the point include historical positioning heat of users near the point; Using the label and features of each binary classification sample as a training sample and performing model training to obtain a trained recommendation model; The constructing of features for each binary classification sample according to the acquired historical orders includes: At different time and space scales, respectively calculate the heat of the loading and unloading points of all historical orders near the point of each binary sample, the heat of the loading and unloading points of all historical orders under the location poi near the point, the heat of the loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of the loading and unloading points of all historical orders of the current order sender under the location poi near the point; At different spatial scales, respectively calculate the user historical positioning heat near the point of each binary classification sample; Calculate the distance between each binary sample point and the nearby location POI, the distance between each binary sample point and the user's location when placing an order, the distance between the user's location when placing an order and the nearby location POI, and the minimum distance between each binary sample point and the user's historical location.

2. The method according to claim 1, characterized in that The method of obtaining all orders within a specified time range as basic data and generating multiple binary classification samples according to the basic data includes: Get the order data of each order within the specified time range as basic data; Recall the recommended points corresponding to each order by specifying the recall index; Select x recommended points from all the recalled recommended points according to the specified rules; Using a rough ranking model to score each of the x recommended points, and selecting y recommended points with the highest scores from the x recommended points; x and y are both positive integers, and y is less than x; According to the distance between each of the y recommended points and its corresponding actual loading and unloading point, a label is set for each of the y recommended points; Each of the y recommended points and its label is taken as a binary classification sample to obtain y training samples.

3. The method according to claim 1, characterized in that The method of using the label and feature of each binary classification sample as a training sample and performing model training includes: Mapping all of the training samples into database tables using a specified data warehouse tool; Acquire training samples from the database table through the Spark training platform; The gradient boosting iterative decision tree classifier performs feature splitting based on the acquired training samples, and the loss gradient is returned for model training.

4. A method for recommending loading and unloading points, characterized in that: The method comprises: Receive a request from a target user; Extracting input parameters in the request, acquiring corresponding features from an online feature storage medium according to the extracted input parameters, and generating n prediction samples according to the acquired features; Using a recommendation model to score each of the predicted samples; the recommendation model is trained using the method for training a recommendation model for recommending loading and unloading points as described in any one of claims 1 to 3; Select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples, wherein n and m are both positive integers, and m is less than n.

5. The method according to claim 4, characterized in that The method further includes: forcibly adsorbing the preset sample with the highest score among the m predicted samples.

6. A training device for a recommendation model for recommending loading and unloading points, characterized in that: The device comprises: A sample generation module, used to obtain all orders within a specified time range as basic data, and generate multiple binary classification samples according to the basic data, wherein the label of each binary classification sample is a positive label or a negative label; A feature construction module is used to obtain all historical orders, and construct features for each of the two-class samples according to the obtained historical orders, wherein the features include historical loading and unloading heat features of the point, historical positioning features of the point, and spatial distance features; the historical positioning features of the point include the historical positioning heat of users near the point; A training module, used to use the label and features of each binary classification sample as a training sample and perform model training to obtain a trained recommendation model; The constructing of features for each binary classification sample according to the acquired historical orders includes: At different time and space scales, respectively calculate the heat of the loading and unloading points of all historical orders near the point of each binary sample, the heat of the loading and unloading points of all historical orders under the location poi near the point, the heat of the loading and unloading points of all historical orders placed by the current order sender near the point, and the heat of the loading and unloading points of all historical orders of the current order sender under the location poi near the point; At different spatial scales, respectively calculate the user historical positioning heat near the point of each binary classification sample; Calculate the distance between each binary sample point and the nearby location POI, the distance between each binary sample point and the user's location when placing an order, the distance between the user's location when placing an order and the nearby location POI, and the minimum distance between each binary sample point and the user's historical location.

7. A loading and unloading point recommendation device, characterized in that: The device comprises: A request receiving module, used for receiving a request from a target user; A prediction sample generation module, used to extract input parameters in the request, obtain corresponding features from an online feature storage medium according to the extracted input parameters, and generate n prediction samples according to the obtained features; A scoring module, used to score each of the predicted samples using a recommendation model; the recommendation model is trained using the method for training a recommendation model for recommending loading and unloading points according to any one of claims 1 to 3; A recommendation module is used to select m prediction samples with the highest scores from the n prediction samples, and recommend loading and unloading points to the target user based on the m prediction samples.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and system for determining boarding point recommendation model

    CN111861622A

  • Order willingness prediction method and device, computer equipment and computer readable storage medium

    CN112488806A