Model training method and device, computer device, storage medium and program product
Patent Information
- Application Number
- CN202210987346.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2042-08-17
AI Technical Summary
目前,路线推荐神经网络模型的训练样本一般包括神经网络的预测路线和标签,标签是用户基于预测路线所走的轨迹,由于用户基于预测路线所走的轨迹不一定是最优的轨迹,这样一来,采用训练样本对路线推荐神经网络模型进行训练,会导致训练后路线推荐神经网络模型推荐路线不准确的问题
[0032] This application embodiment can obtain recommended trajectory data for travelers, which is data obtained by performing recommendation processing on the travel trajectory data of travelers. The recommended trajectory data is then type-identified to determine its data source type. Based on the data source type, a quantity measurement parameter is determined for the recommended trajectory data. Based on the quantity measurement parameter, the corresponding route data to be labeled is obtained, and the route data to be labeled is labeled according to the recommended trajectory data to obtain route data samples. A sample set is constructed from the route data samples according to the quantity measurement parameter to obtain a sample set. The route recommendation model is trained based on the sample set to obtain a trained route recommendation model. Because this application embodiment can determine the quantity measurement parameter based on the data source type of the recommended trajectory data and obtain the route data to be labeled based on the quantity measurement parameter, it can use the recommended trajectory data to label the route data to optimize the sample set used to train the route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set and improving the accuracy of the recommended routes by the trained route recommendation model.
Smart Images

Figure CN117669678B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a model training method, apparatus, computer equipment, storage medium, and program product, wherein the storage medium is a computer-readable storage medium, and the program product is a computer program product. Background Technology
[0002] Route recommendation services provide users with the most cost-effective route from their origin to their destination; in other words, they recommend the optimal route. The cost of a route is influenced by various factors, such as road conditions, travel time, and weather.
[0003] Route recommendation services are typically implemented using route recommendation neural network models. Currently, the training samples for these models generally include the neural network's predicted routes and labels. The labels represent the user's trajectory based on the predicted route. However, since the user's trajectory based on the predicted route is not necessarily the optimal one, using these training samples to train the route recommendation neural network model can lead to inaccurate route recommendations after training.
[0004] In summary, existing technologies suffer from the problem of inaccurate route recommendations by neural network models after training. Summary of the Invention
[0005] This application provides a model training method, apparatus, computer device, and computer-readable storage medium, which can optimize the sample set used to train a route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set, and thus improving the accuracy of the route recommendation model's route recommendations after training.
[0006] A model training method, comprising:
[0007] Obtain recommended trajectory data for the traveler. The recommended trajectory data is the data obtained by performing recommended trajectory data processing on the traveler's travel trajectory data.
[0008] Type identification is performed on the recommended trajectory data to determine the data source type of the recommended trajectory data;
[0009] Determine the quantity measurement parameters for recommended trajectory data based on the data source type;
[0010] Based on the quantity measurement parameters, obtain the route data to be labeled corresponding to the recommended trajectory data, and label the route data to be labeled according to the recommended trajectory data to obtain route data samples;
[0011] The route data samples are processed into a sample set according to the quantitative measurement parameters to obtain the sample set;
[0012] The route recommendation model is trained based on the sample set to obtain the trained route recommendation model.
[0013] Accordingly, embodiments of this application provide a model training apparatus, including:
[0014] The acquisition unit can be used to acquire recommended trajectory data for the travel object. The recommended trajectory data is the data obtained by performing recommendation processing on the travel trajectory data of the travel object.
[0015] The identification unit can be used to identify the type of the recommended trajectory data and obtain the data source type of the recommended trajectory data;
[0016] The defined unit can be used to determine the quantity of recommended trajectory data based on the data source type;
[0017] The annotation unit can be used to obtain the route data to be annotated corresponding to the recommended trajectory data based on the quantity measurement parameters, and to annotate the route data to be annotated based on the recommended trajectory data to obtain route data samples;
[0018] The construction unit can be used to construct a sample set from route data samples according to quantity measurement parameters.
[0019] The training unit can be used to train the route recommendation model based on the sample set, resulting in a trained route recommendation model.
[0020] In some embodiments, the acquisition unit may be specifically used to extract travel operation data corresponding to the travel trajectory data based on the travel trajectory data; and to perform recommendation processing on the travel trajectory data based on the travel operation data to obtain recommended trajectory data for the travel object.
[0021] In some embodiments, the acquisition unit may be specifically used to identify the operation type of the travel operation data to obtain the operation type corresponding to the travel operation data; and to perform recommendation processing on the travel trajectory data according to the operation type to obtain recommended trajectory data for the travel object.
[0022] In some embodiments, the acquisition unit may be specifically used to extract target travel trajectory data corresponding to the operation type from the travel trajectory data according to the operation type; acquire planned travel route data corresponding to the target travel trajectory data, wherein the planned travel route data is the travel route data planned for the travel object; if the target travel trajectory data and the planned travel route data match, then the planned travel route data is determined as the recommended trajectory data for the travel object.
[0023] In some embodiments, the acquisition unit may also be used to acquire travel object information of the travel object; if the travel object information is target travel object information, then the travel trajectory data corresponding to the target travel object information is determined as recommended trajectory data.
[0024] In some embodiments, the construction unit may be specifically used to obtain adjustment parameters for quantity measurement parameters based on recommended trajectory data; adjust the quantity measurement parameters according to the adjustment parameters to obtain adjusted quantity measurement parameters; and construct a sample set for the route data samples according to the adjusted quantity measurement parameters to obtain a sample set.
[0025] In some embodiments, the adjustment parameters include a time parameter, which is the time parameter for generating the recommended trajectory data; a construction unit, specifically used to obtain the current time parameter; calculate the weight parameter of the quantity measurement parameter based on the current time parameter and the time parameter; and perform weighted processing on the quantity measurement parameter based on the weight parameter to obtain the adjusted quantity measurement parameter.
[0026] In some embodiments, the adjustment parameters include a region parameter, which is a parameter of the target region for generating recommended trajectory data; the construction unit can be specifically used to determine the region parameter as the adjusted quantity measurement parameter if the quantity measurement parameter of the target region is greater than the region parameter, and to determine the quantity measurement parameter as the adjusted quantity measurement parameter if the quantity measurement parameter of the target region is less than or equal to the region parameter.
[0027] In some embodiments, the model training apparatus further includes a recommendation unit, which can be used to acquire several candidate route data; use a trained route recommendation model to predict the route score of the candidate route data to obtain a predicted route score for each candidate route data; determine target recommended route data from the candidate route data based on the predicted route score, and recommend the target recommended route data.
[0028] Furthermore, embodiments of this application also provide a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the model training methods provided in embodiments of this application.
[0029] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute any of the model training methods provided in embodiments of this application.
[0030] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the model training methods provided in this application.
[0031] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the model training methods provided in this application.
[0032] This application embodiment can obtain recommended trajectory data for travelers, which is data obtained by performing recommendation processing on the travel trajectory data of travelers. The recommended trajectory data is then type-identified to determine its data source type. Based on the data source type, a quantity measurement parameter is determined for the recommended trajectory data. Based on the quantity measurement parameter, the corresponding route data to be labeled is obtained, and the route data to be labeled is labeled according to the recommended trajectory data to obtain route data samples. A sample set is constructed from the route data samples according to the quantity measurement parameter to obtain a sample set. The route recommendation model is trained based on the sample set to obtain a trained route recommendation model. Because this application embodiment can determine the quantity measurement parameter based on the data source type of the recommended trajectory data and obtain the route data to be labeled based on the quantity measurement parameter, it can use the recommended trajectory data to label the route data to optimize the sample set used to train the route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set and improving the accuracy of the recommended routes by the trained route recommendation model. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of a scenario for the model training method provided in an embodiment of this application;
[0035] Figure 2 This is a schematic flowchart of the model training method provided in the embodiments of this application;
[0036] Figure 3 This is a schematic diagram illustrating the acquisition of recommended trajectory data for travelers provided in an embodiment of this application;
[0037] Figure 4 This is a schematic diagram of non-operation type travel trajectory data provided in the embodiments of this application;
[0038] Figure 5 This is a schematic diagram of travel trajectory data corresponding to the act of zooming in on map data during navigation according to the navigation route provided in the embodiments of this application;
[0039] Figure 6 A schematic diagram of travel trajectory data corresponding to the feedback optimization operation type provided in the embodiments of this application;
[0040] Figure 7 Two schematic flowcharts illustrating the model training method provided in this application embodiment;
[0041] Figure 8 This is a schematic diagram illustrating the data source type provided in the embodiments of this application;
[0042] Figure 9 Three schematic flowcharts illustrating the model training method provided in the embodiments of this application;
[0043] Figure 10 This is a schematic diagram of the structure of the model training device provided in the embodiments of this application;
[0044] Figure 11 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] This application provides a model training method, apparatus, computer device, and computer-readable storage medium. The model training apparatus can be integrated into the computer device, which may be a server or a terminal, etc.
[0047] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. The embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.
[0048] This application relates to Artificial Intelligence (AI), which is the theory, method, technology, and application system for simulating, extending, and expanding human intelligence using digital computers or machines controlled by digital computers to perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
[0049] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0050] For example, see Figure 1 Taking the integration of the model training device into a computer device as an example, the computer device can acquire recommended trajectory data for travelers; identify the type of the recommended trajectory data to obtain the data source type; determine the quantity measurement parameters of the recommended trajectory data based on the data source type; acquire the route data to be labeled corresponding to the recommended trajectory data based on the quantity measurement parameters, and label the route data to be labeled based on the recommended trajectory data to obtain route data samples; construct a sample set for the route data samples according to the quantity measurement parameters to obtain a sample set; and train the route recommendation model based on the sample set to obtain the trained route recommendation model.
[0051] The recommended trajectory data refers to the data obtained by processing the travel trajectory data of the traveler into a recommended trajectory data set. Specifically, the recommended trajectory data can be trajectory data similar to the traveler's travel trajectory data. More specifically, the recommended trajectory data can be travel trajectory data corresponding to the traveler's target traveler information.
[0052] Among them, the data source type can refer to the type of source of the recommended trajectory data.
[0053] The travel trajectory data can refer to the trajectory data of the traveler during the travel process. In this embodiment, the travel trajectory data is data obtained based on the traveler's individual consent.
[0054] Among them, the quantity measurement parameter can refer to the parameter used to measure the number of route data samples.
[0055] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0056] This embodiment will be described from the perspective of a model training device, which can be integrated into a computer device, such as a server or a terminal. The terminal can include tablet computers, laptops, personal computers (PCs), wearable devices, virtual reality devices, or other smart devices that can acquire data.
[0057] like Figure 2 As shown, the specific process of this model training method is as follows: steps S201 to S206:
[0058] S201. Obtain recommended trajectory data for the traveler.
[0059] Among them, the recommended trajectory data is the data obtained by performing recommendation trajectory data on the travel trajectory data of the travel subjects.
[0060] In one application embodiment, such as Figure 3 As shown, the recommended trajectory data for the traveler can be obtained in steps S301 to S302:
[0061] S301. Based on the travel trajectory data, extract the travel operation data corresponding to the travel trajectory data.
[0062] Specifically, travel operation data can refer to the data processed by the traveler regarding their travel trajectory during the trip. More specifically, travel operation data can be the data processed by the traveler using a route navigation application regarding their travel trajectory.
[0063] Among them, travel operation data can be data carried by travel trajectory data, travel operation data can also be stored in the cloud, travel operation data can also be stored in a local database, travel operation data can also be stored in the blockchain; and so on.
[0064] There is a correlation between travel trajectory data and travel operation data. Based on this, the embodiments of this application can extract the travel operation data corresponding to the travel trajectory data based on the correlation between travel trajectory data and travel operation data and the travel trajectory data.
[0065] S302. Based on the travel operation data, perform recommended trajectory data processing on the travel trajectory data to obtain recommended trajectory data for the travel subject.
[0066] In some application embodiments, the method of obtaining recommended trajectory data for a traveler by performing recommended trajectory data on travel trajectory data based on travel operation data can be as follows: using a trajectory recommendation neural network model to predict the recommended trajectory data on travel trajectory data based on travel operation data to obtain recommended trajectory data for a traveler.
[0067] In some embodiments, the method of processing travel trajectory data to obtain recommended trajectory data for the travel subject based on travel operation data can be as follows: identify the operation type of the travel operation data to obtain the operation type corresponding to the travel operation data; and process the travel trajectory data to obtain recommended trajectory data for the travel subject based on the operation type.
[0068] The operation type can refer to the type of operation performed on the travel trajectory data by the traveling object during the travel process. The operation type can include no operation type, judgment behavior operation type, good feedback operation type, and poor feedback operation type.
[0069] The "no-operation type" can refer to a type where the traveler takes no action on the travel trajectory data during the travel process. Examples of travel trajectory data of the "no-operation type" include... Figure 4 As shown.
[0070] The judgment behavior operation type can refer to the type of operation performed by the traveler during their trip, involving judgment behavior on the navigation route matched with the travel trajectory data. The navigation route can be a route recommended by the navigation application to the traveler and selected by the traveler for navigation. The judgment behavior includes actions such as zooming in on the map data while navigating according to the navigation route, zooming out on the map data while navigating according to the navigation route, and switching the navigation route. The travel trajectory data corresponding to the action of zooming in on the map data while navigating according to the navigation route is as follows: Figure 5 As shown.
[0071] The "Feedback Optimization" operation type can refer to the type of operation that provides positive feedback on the navigation route after the trip. The corresponding travel trajectory data for the "Feedback Optimization" operation type includes, for example: Figure 6 As shown.
[0072] The feedback error operation type can refer to the operation type that provides poor feedback on the navigation route after the trip is completed.
[0073] In one example, the travel operation data has a corresponding operation data identifier. Based on this, the embodiments of this application can identify the operation type of the travel operation data based on the operation data identifier to obtain the operation type corresponding to the travel operation data.
[0074] In one example, the recommended trajectory data is processed based on the operation type to obtain the recommended trajectory data for the traveler. This can be done by: extracting the target travel trajectory data corresponding to the operation type from the travel trajectory data; obtaining the planned travel route data corresponding to the target travel trajectory data; and if the target travel trajectory data and the planned travel route data match, then the planned travel route data is determined as the recommended trajectory data for the traveler.
[0075] The planned travel route data refers to the travel route data planned for travelers. This can be understood as the route planning data that a route navigation application plans and recommends to travelers. The aforementioned navigation routes fall under the category of planned travel route data.
[0076] In one example, if the target travel trajectory data and the planned travel route data match, before determining the planned travel route data as the recommended trajectory data for the traveler, the process further includes: matching the target travel trajectory data and the planned route data to determine whether the target travel trajectory data and the planned route data match.
[0077] In this embodiment, a similarity function can be used to calculate the similarity between the target travel trajectory data and the planned route data, thereby matching the target travel trajectory data and the planned route data. The similarity function can be a cosine similarity function, a Gaussian kernel similarity function, or so on.
[0078] In this embodiment, the matching degree between the target travel trajectory data and the planned route data can be calculated to determine whether the target travel trajectory data and the planned route data match. Specifically, this embodiment identifies the overlapping trajectory data between the target travel trajectory data and the planned route data; determines the trajectory distance corresponding to the trajectory data and the route distance corresponding to the planned route data; and calculates the matching degree based on the trajectory distance and the route distance. In this embodiment, the matching degree can be obtained by dividing the trajectory distance by the route distance.
[0079] In this context, it can be understood that the recommended trajectory data can be the preferred travel route data.
[0080] In some application embodiments, the recommended trajectory data for a traveler can be obtained by: obtaining the traveler's traveler information; if the traveler information is target traveler information, then determining the travel trajectory data corresponding to the target traveler information as the recommended trajectory data.
[0081] Among them, the travel subject information can be the travel subject's identity information, the travel subject's characteristic information, and so on.
[0082] Here, we will use the example of travel recipient information being the travel recipient's identity information. For example, target travel recipient information may include the identity information of a taxi driver, a ride-hailing driver, or a truck driver.
[0083] As can be understood above, taxi drivers, ride-hailing drivers, truck drivers, and other drivers are usually familiar with the roads and have rich route experience. Therefore, in this application embodiment, the travel trajectory data of taxi drivers, ride-hailing drivers, truck drivers, and other drivers can be used as recommended trajectory data.
[0084] S202. Perform type identification on the recommended trajectory data to obtain the data source type of the recommended trajectory data.
[0085] Among them, the data source type can refer to the type of source of the recommended trajectory data.
[0086] In one example, the source of the recommended trajectory data can be the travel object of the recommended trajectory data. Therefore, the data source type can be a type distinguished by the travel object information of the travel object of the recommended trajectory data.
[0087] In one example, the source of the recommended trajectory data can be a source channel for the recommended trajectory data, such as the cloud or local. Therefore, the data source type can be a type distinguished by the source channel of the recommended trajectory data.
[0088] In one example, the source of the recommended trajectory data can be the source region of the recommended trajectory data, such as urban areas or suburbs. Therefore, the data source type can be a type distinguished by the source region of the recommended trajectory data.
[0089] In some embodiments, the method for identifying the data source type of the recommended trajectory data can be as follows: extracting features from the recommended trajectory data to obtain recommended trajectory feature data; obtaining a mapping relationship set, which includes the mapping relationship between preset recommended trajectory feature data and preset data source type; determining the target preset recommended trajectory feature data corresponding to the recommended trajectory feature data from the mapping relationship set; determining the target preset data source type corresponding to the target preset recommended trajectory feature data based on the mapping relationship set; and using the target preset data source type as the data source type of the recommended trajectory data.
[0090] The recommended trajectory feature data can be data obtained by extracting features from the recommended trajectory data using a feature extraction neural network model; the recommended trajectory feature data can also be the data identifier of the recommended trajectory data.
[0091] In some embodiments of the application, the method for identifying the data source type of the recommended trajectory data can be as follows: This embodiment of the application can use a classification neural network model to classify the recommended trajectory data to obtain the data source type of the recommended trajectory data.
[0092] S203. Determine the quantity measurement parameters for recommended trajectory data based on the data source type.
[0093] Here, the quantity measurement parameter can refer to the parameter used to measure the number of route data samples. Specifically, the quantity measurement parameter can be a proportion, or it can be a specific quantity.
[0094] In some application embodiments, there is a correlation between the quantity measurement parameter and the data source type. Based on this, the quantity measurement parameter of the recommended trajectory data can be determined based on the correlation between the quantity measurement parameter and the data source type and the data source type.
[0095] S204. Based on the quantity measurement parameters, obtain the route data to be labeled corresponding to the recommended trajectory data, and label the route data to be labeled according to the recommended trajectory data to obtain route data samples.
[0096] In some embodiments, the route data to be labeled may be data with the same start and end points as the recommended trajectory data. The route data to be labeled may include at least two routes, which may include the aforementioned planned travel route data and recommended trajectory data. Based on this, embodiments of this application label the route data to be labeled according to the recommended trajectory data to obtain route data samples may be as follows: calculate the matching degree between the recommended trajectory data and the route data to be labeled; sort the route data to be labeled according to the matching degree to obtain a sorting result; and use the sorting result as a label to label the route data to be labeled, thus obtaining route data samples.
[0097] For details on calculating the matching degree between the recommended trajectory data and the route data to be labeled, please refer to the above-mentioned process of "calculating the matching degree between the target travel trajectory data and the planned route data", which will not be repeated here.
[0098] In some embodiments of the application, the route data to be labeled can be the data of the area where the route to be labeled is located on an electronic map. Based on this, embodiments of the application can label the route data to be labeled according to the recommended trajectory data, and the route data sample can be obtained by using the recommended trajectory data as a label to label the route data to be labeled, thereby obtaining the route data sample.
[0099] S205. Construct a sample set for the route data samples according to the quantity measurement parameters to obtain the sample set.
[0100] Each data source type of route data sample has a corresponding quantity measurement parameter. Based on this, the sample set includes route data samples corresponding to different data source types constructed based on the quantity measurement parameters.
[0101] In some application embodiments, the route data samples are processed to construct a sample set according to the quantity measurement parameters. The sample set can be obtained by: obtaining the adjustment parameters of the quantity measurement parameters based on the recommended trajectory data; adjusting the quantity measurement parameters according to the adjustment parameters to obtain the adjusted quantity measurement parameters; and constructing the sample set of the route data samples according to the adjusted quantity measurement parameters to obtain the sample set.
[0102] Since the quantity measurement parameters may be affected by actual factors, leading to an imbalance of route data samples in the sample set, this application embodiment adjusts the quantity measurement parameters to construct the sample set based on the adjusted quantity measurement parameters.
[0103] In some application embodiments, road networks and road conditions typically change over time. For example, newly opened roads may draw away some traffic flow from existing similar routes. Road construction, closures, and new traffic regulations may further reduce traffic flow. Therefore, the impact of time factors must be considered when constructing the sample set. Accordingly, adjustment parameters can include time parameters, which are the time parameters used to generate the recommended trajectory data. Specifically, the quantity measurement parameters are adjusted based on the adjustment parameters to obtain the adjusted quantity measurement parameters. This can be achieved by: obtaining the current time parameter; calculating the weight parameters of the quantity measurement parameters based on the current time parameter and the time parameter; and weighting the quantity measurement parameters according to the weight parameters to obtain the adjusted quantity measurement parameters.
[0104] In one example, the weight parameter of the quantity measurement parameter can be calculated based on the current time parameter and the time parameter by: calculating the difference parameter between the current time parameter and the time parameter; and using the weight parameter calculation function to calculate the weight parameter of the quantity measurement parameter based on the difference parameter. The weight parameter calculation function is shown in formula (1):
[0105]
[0106] Where w refers to the weighting parameter; λ refers to the weighting coefficient; and t refers to the difference parameter.
[0107] In some embodiments, the recommended trajectory data exhibits significant spatial variations. For example, the number of recommended trajectory data points is particularly large in the first region of the map, while it is particularly sparse in the second region. Therefore, this embodiment considers the influence of regional factors to improve the application of the route recommendation model in regions with limited trajectory data. Accordingly, the adjustment parameters include regional parameters, which are parameters of the target region from which the recommended trajectory data is generated. Specifically, the quantity measurement parameters are adjusted based on the adjustment parameters to obtain the adjusted quantity measurement parameters. This can be achieved by: if the quantity measurement parameter of the target region is greater than the regional parameter, then the regional parameter is determined as the adjusted quantity measurement parameter; if the quantity measurement parameter of the target region is less than or equal to the regional parameter, then the quantity measurement parameter is determined as the adjusted quantity measurement parameter.
[0108] Specifically, embodiments of this application can limit the number of route data samples in the sample set for the target area based on the region parameter ρ. In this way, the sample ratio in the space can be balanced.
[0109] In addition to the above, this application may also adopt a crowdsourcing approach, setting up a bonus to allow travelers to directly participate in the construction of the sample set.
[0110] S206. Train the route recommendation model based on the sample set to obtain the trained route recommendation model.
[0111] Among them, the route recommendation model can be a ranking model, such as the LambdaMART model; the route recommendation model can also be a self-attention neural network model, a logistic regression model, a deep neural network model, and so on.
[0112] This application embodiment can use a route recommendation model to predict based on route data samples in a sample set to obtain prediction results; use a loss function to calculate the loss value between the prediction results and the labels; and converge the model parameters of the route recommendation model based on the loss value to obtain the trained route recommendation model.
[0113] The loss function can be the cross-entropy loss function, the mean squared error loss function, and so on.
[0114] Specifically, the route recommendation model in this application embodiment can be a single model, or it can include at least two models.
[0115] 1) For cases where the route recommendation model is a single model, we will take a ranking model as an example. In this embodiment, the aforementioned sample set is used as input to the route recommendation model to train its ranking ability. In this case, the route data sample may include route data and labels. The route data may include the aforementioned planned travel route data and recommended trajectory data, and the labels may be the ranking results of the planned travel route data and recommended trajectory data.
[0116] First, the route recommendation model extracts route features from each route data sample, such as route length, estimated arrival time, number of traffic lights, and number of turns. Then, based on these route features and labels, the route recommendation model is trained. Training stops when the label loss value decreases to a threshold or the number of iterations reaches a certain threshold, resulting in the trained route recommendation model.
[0117] The trained route recommendation model can be applied to online services. Taking several candidate routes as input, it can output a ranking of those routes. In online applications, the trained model achieves more accurate ranking and recommends more precise routes to travelers, thus improving their satisfaction.
[0118] 2) For route recommendation models comprising at least two models, cascading these models typically improves the accuracy of the trained model. This involves retraining at least two models from a single route recommendation model. The output of the first model is used as the input to the second model for cascaded learning. Common cascaded models include logistic regression, LambdaMART, and deep neural network models.
[0119] In some application examples, after step S206, the trained route recommendation model can also be applied. In one example, several candidate route data can be obtained; the trained route recommendation model is used to predict the route score of the candidate route data to obtain the predicted route score of each candidate route data; based on the predicted route score, the target recommended route data is determined from the candidate route data and the target recommended route data is recommended.
[0120] In this embodiment, candidate route data can be sorted based on predicted route scores to obtain a target ranking result. Based on the target ranking result, target recommended route data can be determined from the candidate route data. The target recommended route data can be the route with the highest predicted route score.
[0121] This application embodiment can obtain recommended trajectory data for travelers, which is data obtained by performing recommendation processing on the travel trajectory data of travelers. The recommended trajectory data is then type-identified to determine its data source type. Based on the data source type, a quantity measurement parameter is determined for the recommended trajectory data. Based on the quantity measurement parameter, the corresponding route data to be labeled is obtained, and the route data to be labeled is labeled according to the recommended trajectory data to obtain route data samples. A sample set is constructed from the route data samples according to the quantity measurement parameter to obtain a sample set. The route recommendation model is trained based on the sample set to obtain a trained route recommendation model. Because this application embodiment can determine the quantity measurement parameter based on the data source type of the recommended trajectory data and obtain the route data to be labeled based on the quantity measurement parameter, it can use the recommended trajectory data to label the route data to optimize the sample set used to train the route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set and improving the accuracy of the recommended routes by the trained route recommendation model.
[0122] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0123] In this embodiment, the model training device is specifically integrated into a computer device, which serves as a server.
[0124] First, it should be noted that this application can be applied to route recommendation in scenarios such as mobile maps, in-vehicle systems, food delivery, ride-hailing, and logistics systems. It mines travel trajectory data from different scenarios to train the route recommendation model, effectively improving the quality of route recommendations after training. In typical application scenarios such as mobile maps, using the method of this application can effectively improve the quality of navigation route recommendations and enhance the user experience.
[0125] like Figure 7 As shown, a model training method is described, with the specific process as follows: steps S701 to S709:
[0126] S701. Computer equipment acquires recommended trajectory data for travelers.
[0127] Among them, the recommended trajectory data is the data obtained by performing recommendation trajectory data on the travel trajectory data of the travel subjects.
[0128] Specifically, the travel subjects in this application embodiment can include ordinary users, taxi drivers, ride-hailing drivers, and truck drivers. The recommended trajectory data selected differs for different travel subjects. For ordinary users, the route navigation application recommends planned travel routes, and ordinary users typically choose one of these planned routes as their navigation route. The navigation route guides the ordinary user. If an ordinary user performs operations on the navigation route during their trip, such as zooming in, zooming out, or switching, it can be considered that the ordinary user has made a judgment about the navigation route. Therefore, the travel trajectory data generated based on the navigation route by an ordinary user has a high degree of reliability.
[0129] Based on the above, for ordinary users, the method to obtain recommended trajectory data for travel subjects can be as follows: extract the travel operation data corresponding to the travel trajectory data based on the travel trajectory data; and perform recommendation processing on the travel trajectory data based on the travel operation data to obtain recommended trajectory data for travel subjects.
[0130] In some embodiments, the method of processing travel trajectory data to obtain recommended trajectory data for the travel subject based on travel operation data can be as follows: identify the operation type of the travel operation data to obtain the operation type corresponding to the travel operation data; and process the travel trajectory data to obtain recommended trajectory data for the travel subject based on the operation type.
[0131] The operation type can include no operation type, judgment behavior operation type, good feedback operation type, and poor feedback operation type.
[0132] In one example, the recommended trajectory data is processed based on the operation type to obtain the recommended trajectory data for the traveler. This can be done by: extracting the target travel trajectory data corresponding to the operation type from the travel trajectory data; obtaining the planned travel route data corresponding to the target travel trajectory data; and if the target travel trajectory data and the planned travel route data match, then the planned travel route data is determined as the recommended trajectory data for the traveler.
[0133] Taxi drivers, ride-hailing drivers, and truck drivers are very familiar with the roads, and their travel trajectory data is often better than the routes recommended by navigation systems. Using the travel trajectory data of taxi drivers, ride-hailing drivers, and truck drivers can improve the accuracy of route recommendation models after training.
[0134] Based on the above, for drivers such as taxi drivers, ride-hailing drivers, and truck drivers, the method to obtain recommended trajectory data for the travel target can be as follows: obtain the travel target information of the travel target; if the travel target information is the target travel target information, then determine the travel trajectory data corresponding to the target travel target information as the recommended trajectory data.
[0135] It can be understood here that the target traveler information may include the identity information of taxi drivers, ride-hailing drivers, and truck drivers.
[0136] S702. The computer equipment performs type identification on the recommended trajectory data to obtain the data source type of the recommended trajectory data.
[0137] In some embodiments, the method for identifying the data source type of the recommended trajectory data can be as follows: extracting features from the recommended trajectory data to obtain recommended trajectory feature data; obtaining a mapping relationship set, which includes the mapping relationship between preset recommended trajectory feature data and preset data source type; determining the target preset recommended trajectory feature data corresponding to the recommended trajectory feature data from the mapping relationship set; determining the target preset data source type corresponding to the target preset recommended trajectory feature data based on the mapping relationship set; and using the target preset data source type as the data source type of the recommended trajectory data.
[0138] Based on the foregoing, it can be seen that data source types can include driver source types and ordinary user source types.
[0139] like Figure 8As shown, driver source type refers to the type of driver from which the recommended trajectory data originates. Driver source types can include taxi driver source type, ride-hailing driver source type, and truck driver source type. Specifically, taxi driver source type means the recommended trajectory data originates from taxi drivers. Ride-hailing driver source type means the recommended trajectory data originates from ride-hailing drivers. Truck driver source type means the recommended trajectory data originates from truck drivers.
[0140] Among them, "ordinary user source type" refers to the type of recommended trajectory data that originates from ordinary users. Ordinary user source type can be further subdivided according to the user's operational behavior. For example, ordinary user source type can include ordinary user source without operation, ordinary user source based on judgment behavior, ordinary user source with positive feedback, and ordinary user source with poor feedback.
[0141] The "no user action source" type refers to recommended trajectory data originating from ordinary users, where these users have not performed any actions related to the travel trajectory data. The "ordinary user judgment action source" type refers to recommended trajectory data originating from ordinary users, where these users have made judgments regarding the travel trajectory data. The "positive user feedback action source" type refers to recommended trajectory data originating from ordinary users, where these users have positive feedback on the navigation route. The "poor user feedback action source" type refers to recommended trajectory data originating from ordinary users, where these users have poor feedback on the navigation route.
[0142] S703. The computer equipment determines the quantity measurement parameters of the recommended trajectory data based on the data source type.
[0143] Among them, the quantity measurement parameter can be a proportion.
[0144] S704. The computer equipment obtains the route data to be labeled corresponding to the recommended trajectory data based on the quantity measurement parameters, and labels the route data to be labeled based on the recommended trajectory data to obtain route data samples.
[0145] The route data to be labeled may include the aforementioned planned travel route data and recommended trajectory data. Based on this, the embodiment of this application labels the route data to be labeled according to the recommended trajectory data to obtain route data samples in the following way: calculating the matching degree between the recommended trajectory data and the route data to be labeled; sorting the route data to be labeled according to the matching degree to obtain a sorting result; and using the sorting result as a label to label the route data to be labeled to obtain route data samples.
[0146] S705. The computer equipment constructs a sample set by processing the route data samples according to the quantity measurement parameters, and obtains the sample set.
[0147] In some application embodiments, the route data samples are processed to construct a sample set according to the quantity measurement parameters. The sample set can be obtained by: obtaining the adjustment parameters of the quantity measurement parameters based on the recommended trajectory data; adjusting the quantity measurement parameters according to the adjustment parameters to obtain the adjusted quantity measurement parameters; and constructing the sample set of the route data samples according to the adjusted quantity measurement parameters to obtain the sample set.
[0148] Because different travelers have varying levels of acceptance of navigation routes and familiarity with road networks, the confidence levels of route data samples from different data sources differ; some data sources have higher confidence levels, while others have lower confidence levels. After obtaining the aforementioned recommended trajectory data, route data samples are fused according to a set ratio to construct a sample set.
[0149] Typically, route data samples from ordinary users without user input have the lowest weight in the above proportions, while route data samples from ordinary users with positive user feedback and route data samples from drivers have higher weights in the proportions.
[0150] In actual processing, the ratio of route data samples from ordinary users with no operation source, route data samples from ordinary users with positive feedback, and route data samples from drivers can be set to 1:5:10.
[0151] In practice, the processing of route data samples from ordinary user source types can be as follows: the weights of route data samples from ordinary user source types with no operation, route data samples from ordinary user source types with operation judgment, route data samples from ordinary user source types with good feedback, and route data samples from ordinary user source types with poor feedback can increase sequentially.
[0152] S706. The computer equipment trains the route recommendation model based on the sample set to obtain the trained route recommendation model.
[0153] This application embodiment can use a route recommendation model to predict route data samples in a sample set to obtain prediction results; use a loss function to calculate the loss value between the prediction results and the labels; and converge the model parameters of the route recommendation model based on the loss value to obtain the trained route recommendation model. The route recommendation model can be a ranking model.
[0154] S707, Computer equipment acquires several candidate route data.
[0155] In this embodiment of the application, the candidate route data can be obtained by the candidate route recommendation model based on map data for route prediction.
[0156] like Figure 9 As shown, when a traveler embarks on a journey, they can input their origin and destination in a navigation route application. Based on these information, the application can use a route planning service to plan several candidate routes for the traveler using map data. This route planning service can be provided through a candidate route recommendation model. This model can be a graph convolutional neural network, a self-attention neural network, or something similar.
[0157] Then, the candidate route data is input into the route recommendation service to obtain the target recommended route data. The services provided by the route recommendation service are shown in steps S708 to S709.
[0158] S708 The computer equipment uses a trained route recommendation model to predict the route score of candidate route data, and obtains the predicted route score for each candidate route data.
[0159] S709. The computer equipment determines the target recommended route data from the candidate route data based on the predicted route score, and recommends the target recommended route data.
[0160] The trained route recommendation model can be a ranking model. In this embodiment, candidate route data can be ranked based on predicted route scores to obtain a target ranking result. Based on the target ranking result, target recommended route data can be determined from the candidate route data. The target recommended route data can be the route with the highest predicted route score.
[0161] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0162] This application embodiment can obtain recommended trajectory data for travelers, which is data obtained by performing recommendation processing on the travel trajectory data of travelers. The recommended trajectory data is then type-identified to determine its data source type. Based on the data source type, a quantity measurement parameter is determined for the recommended trajectory data. Based on the quantity measurement parameter, the corresponding route data to be labeled is obtained, and the route data to be labeled is labeled according to the recommended trajectory data to obtain route data samples. A sample set is constructed from the route data samples according to the quantity measurement parameter to obtain a sample set. The route recommendation model is trained based on the sample set to obtain a trained route recommendation model. Because this application embodiment can determine the quantity measurement parameter based on the data source type of the recommended trajectory data and obtain the route data to be labeled based on the quantity measurement parameter, it can use the recommended trajectory data to label the route data to optimize the sample set used to train the route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set and improving the accuracy of the recommended routes by the trained route recommendation model.
[0163] To better implement the above methods, this application also provides a model training device that can be integrated into a computer device, such as a server or terminal. The terminal may include a tablet computer, a laptop computer, and / or a personal computer.
[0164] For example, such as Figure 10 As shown, the model training device may include an acquisition unit 301, an identification unit 302, a determination unit 303, an annotation unit 304, a construction unit 305, a training unit 306, and a recommendation unit 307, as follows:
[0165] (1) Obtain unit 301;
[0166] The acquisition unit 301 can be used to acquire recommended trajectory data for the traveler. The recommended trajectory data is the data obtained by performing recommendation processing on the traveler's travel trajectory data.
[0167] In some embodiments, the acquisition unit 301 can be used to extract travel operation data corresponding to the travel trajectory data based on the travel trajectory data; and to perform recommendation processing on the travel trajectory data based on the travel operation data to obtain recommended trajectory data for the travel object.
[0168] In some embodiments, the acquisition unit 301 can be used to identify the operation type of the travel operation data to obtain the operation type corresponding to the travel operation data; and to perform recommendation processing on the travel trajectory data according to the operation type to obtain recommended trajectory data for the travel object.
[0169] In some embodiments, the acquisition unit 301 can be used to extract target travel trajectory data corresponding to the operation type from the travel trajectory data according to the operation type; acquire the planned travel route data corresponding to the target travel trajectory data, wherein the planned travel route data is the travel route data planned for the travel object; if the target travel trajectory data and the planned travel route data match, then the planned travel route data is determined as the recommended trajectory data for the travel object.
[0170] In some embodiments, the acquisition unit 301 can also be used to acquire travel object information of the travel object; if the travel object information is target travel object information, then the travel trajectory data corresponding to the target travel object information is determined as recommended trajectory data.
[0171] (2) Identification unit 302;
[0172] The identification unit 302 can be used to identify the type of the recommended trajectory data and obtain the data source type of the recommended trajectory data.
[0173] (3) Determine unit 303;
[0174] The determination unit 303 can be used to determine the quantity measurement parameter of recommended trajectory data based on the data source type.
[0175] (4) Label unit 304;
[0176] The annotation unit 304 can be used to obtain the route data to be annotated corresponding to the recommended trajectory data based on the quantity measurement parameters, and to annotate the route data to be annotated based on the recommended trajectory data to obtain a route data sample.
[0177] (5) Constructing unit 305;
[0178] The construction unit 305 can be used to construct a sample set of route data samples according to the quantity measurement parameters, so as to obtain a sample set.
[0179] In some application embodiments, the construction unit 305 can be used to obtain adjustment parameters for quantity measurement parameters based on recommended trajectory data; adjust the quantity measurement parameters according to the adjustment parameters to obtain adjusted quantity measurement parameters; and construct a sample set for the route data samples according to the adjusted quantity measurement parameters to obtain a sample set.
[0180] In some embodiments, the adjustment parameters include time parameters, which are the time parameters for generating recommended trajectory data; the construction unit 305 can be used to obtain the current time parameter; calculate the weight parameter of the quantity measurement parameter based on the current time parameter and the time parameter; and perform weighted processing on the quantity measurement parameter based on the weight parameter to obtain the adjusted quantity measurement parameter.
[0181] In some embodiments, the adjustment parameters include region parameters, which are parameters of the target region for generating recommended trajectory data; the construction unit 305 can be used to determine the region parameters as the adjusted quantity measurement parameters if the quantity measurement parameter of the target region is greater than the region parameters; and to determine the quantity measurement parameters as the adjusted quantity measurement parameters if the quantity measurement parameter of the target region is less than or equal to the region parameters.
[0182] (6) Training Unit 306;
[0183] Training unit 306 can be used to train the route recommendation model based on the sample set to obtain the trained route recommendation model.
[0184] (7) Recommended Unit 307;
[0185] Recommendation unit 307 can be used to acquire several candidate route data; use the trained route recommendation model to predict the route score of the candidate route data to obtain the predicted route score of each candidate route data; determine the target recommended route data from the candidate route data based on the predicted route score, and recommend the target recommended route data.
[0186] As can be seen from the above, the acquisition unit 301 of this application embodiment can be used to acquire recommended trajectory data for a traveler, the recommended trajectory data being the data obtained by performing recommendation processing on the travel trajectory data of the traveler; the identification unit 302 can be used to identify the type of the recommended trajectory data to obtain the data source type of the recommended trajectory data; the determination unit 303 can be used to determine the quantity measurement parameter of the recommended trajectory data according to the data source type; the annotation unit 304 can be used to acquire the route data to be annotated corresponding to the recommended trajectory data according to the quantity measurement parameter, and annotate the route data to be annotated according to the recommended trajectory data to obtain a route data sample; the construction unit... Unit 305 can be used to construct a sample set for route data samples according to the quantity measurement parameters, and obtain a sample set; training unit 306 can be used to train the route recommendation model according to the sample set, and obtain the trained route recommendation model; since the embodiments of this application can determine the quantity measurement parameters based on the data source type of the recommended trajectory data, and obtain the route data to be labeled based on the quantity measurement parameters, the recommended trajectory data can be used to label the route data to be labeled, so as to optimize the sample set used to train the route recommendation model, thereby improving the accuracy of training the route recommendation model based on the sample set, and thus improving the accuracy of the recommended routes of the trained route recommendation model.
[0187] This application also provides a computer device, such as... Figure 11 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically:
[0188] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 11 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0189] The processor 401 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and computer programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0190] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0191] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0192] The computer device may also include an input unit 404, which can be used to receive input digital or character information communication, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0193] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer programs stored in the memory 402 to realize various functions, as follows:
[0194] This application embodiment can obtain recommended trajectory data for travelers, which is data obtained by performing recommendation processing on the travel trajectory data of travelers; identify the type of the recommended trajectory data to obtain the data source type of the recommended trajectory data; determine the quantity measurement parameter of the recommended trajectory data according to the data source type; obtain the route data to be labeled corresponding to the recommended trajectory data according to the quantity measurement parameter, and label the route data to be labeled according to the recommended trajectory data to obtain route data samples; construct a sample set according to the quantity measurement parameter to obtain a sample set; train the route recommendation model according to the sample set to obtain the trained route recommendation model.
[0195] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0196] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0197] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute any of the model training methods provided in embodiments of this application.
[0198] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0199] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0200] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the model training methods provided in the embodiments of this application, the beneficial effects that any of the model training methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0201] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0202] The above provides a detailed description of a model training method, computer device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A model training method, characterized in that, include: Obtain recommended trajectory data for the traveler, wherein the recommended trajectory data is the data obtained by performing recommended trajectory data recommendation processing on the traveler's travel trajectory data; The recommended trajectory data is type-identified to obtain the data source type of the recommended trajectory data; Based on the data source type, determine the quantity measurement parameter of the recommended trajectory data; wherein, the quantity measurement parameter refers to the parameter used to measure the number of route data samples; Based on the quantity measurement parameters, obtain the route data to be labeled corresponding to the recommended trajectory data, and label the route data to be labeled based on the recommended trajectory data to obtain a route data sample; The route data samples are processed according to the aforementioned quantity measurement parameters to construct a sample set, thereby obtaining the sample set. The route recommendation model is trained based on the sample set to obtain the trained route recommendation model.
2. The model training method according to claim 1, characterized in that, The acquisition of recommended trajectory data for travelers includes: Based on the travel trajectory data, extract the travel operation data corresponding to the travel trajectory data; Based on the travel operation data, the travel trajectory data is processed to recommend trajectory data, thereby obtaining recommended trajectory data for the traveler.
3. The model training method according to claim 2, characterized in that, The step of performing recommendation trajectory data processing on the travel trajectory data based on the travel operation data to obtain recommended trajectory data for the travel object includes: The operation type is identified from the travel operation data to obtain the operation type corresponding to the travel operation data; Based on the operation type, the travel trajectory data is processed to recommend trajectory data, thereby obtaining recommended trajectory data for the traveler.
4. The model training method according to claim 3, characterized in that, The step of performing recommendation trajectory data processing on the travel trajectory data according to the operation type to obtain recommended trajectory data for the travel object includes: Based on the operation type, extract the target travel trajectory data corresponding to the operation type from the travel trajectory data; Obtain the planned travel route data corresponding to the target travel trajectory data, wherein the planned travel route data is the travel route data planned for the travel object; If the target travel trajectory data matches the planned travel route data, then the planned travel route data is determined as the recommended trajectory data for the traveler.
5. The model training method according to claim 1, characterized in that, The acquisition of recommended trajectory data for travelers includes: Obtain the travel information of the traveler; If the travel object information is the target travel object information, then the travel trajectory data corresponding to the target travel object information is determined as the recommended trajectory data.
6. The model training method according to claim 1, characterized in that, The process of constructing a sample set based on the route data samples according to the quantity measurement parameters, resulting in a sample set, includes: Based on the recommended trajectory data, obtain the adjustment parameters for the quantity measurement parameters; The quantity measurement parameters are adjusted according to the adjustment parameters to obtain the adjusted quantity measurement parameters; Based on the adjusted quantity measurement parameters, the route data samples are processed to construct a sample set, thus obtaining the sample set.
7. The model training method according to claim 6, characterized in that, The adjustment parameters include a time parameter, which is the time parameter for generating the recommended trajectory data; the step of adjusting the quantity measurement parameters according to the adjustment parameters to obtain the adjusted quantity measurement parameters includes: Get the current time parameter; Calculate the weight parameter of the quantity measurement parameter based on the current time parameter and the time parameter; The quantity measurement parameters are weighted according to the weight parameters to obtain the adjusted quantity measurement parameters.
8. The model training method according to claim 6, characterized in that, The adjustment parameters include region parameters, which are parameters of the target region for generating the recommended trajectory data; the step of adjusting the quantity measurement parameters according to the adjustment parameters to obtain the adjusted quantity measurement parameters includes: If the quantity measurement parameter of the target area is greater than the area parameter, then the area parameter is determined as the adjusted quantity measurement parameter; If the quantity measurement parameter of the target area is less than or equal to the area parameter, then the quantity measurement parameter is determined as the adjusted quantity measurement parameter.
9. The model training method according to any one of claims 1 to 8, characterized in that, After training the route recommendation model based on the sample set to obtain the trained route recommendation model, the method further includes: Obtain data for several candidate routes; The trained route recommendation model is used to predict the route score of the candidate route data to obtain the predicted route score for each candidate route data. Based on the predicted route score, target recommended route data is determined from the candidate route data, and the target recommended route data is recommended.
10. A model training device, characterized in that, include: The acquisition unit is used to acquire recommended trajectory data for a traveler, wherein the recommended trajectory data is data obtained by performing recommendation processing on the travel trajectory data of the traveler. The identification unit is used to identify the type of the recommended trajectory data to obtain the data source type of the recommended trajectory data; The determining unit is configured to determine the quantity measurement parameter of the recommended trajectory data based on the data source type; wherein, the quantity measurement parameter refers to a parameter used to measure the number of route data samples; The annotation unit is used to obtain the route data to be annotated corresponding to the recommended trajectory data according to the quantity measurement parameter, and to annotate the route data to be annotated according to the recommended trajectory data to obtain a route data sample; A construction unit is used to construct a sample set for the route data samples according to the quantity measurement parameters, thereby obtaining a sample set; The training unit is used to train the route recommendation model based on the sample set to obtain the trained route recommendation model.
11. The model training apparatus according to claim 10, characterized in that, The acquisition unit is specifically used to extract travel operation data corresponding to the travel trajectory data based on the travel trajectory data; and to perform recommendation trajectory data processing on the travel trajectory data based on the travel operation data to obtain recommended trajectory data for the travel object.
12. The model training apparatus according to claim 11, characterized in that, The acquisition unit is specifically used to identify the operation type of travel operation data to obtain the operation type corresponding to the travel operation data; based on the operation type, it performs recommendation processing on the travel trajectory data to obtain recommended trajectory data for the travel object.
13. The model training apparatus according to claim 12, characterized in that, The acquisition unit is specifically used to extract the target travel trajectory data corresponding to the operation type from the travel trajectory data according to the operation type; and to acquire the planned travel route data corresponding to the target travel trajectory data, wherein the planned travel route data is the travel route data planned for the travel object; If the target travel trajectory data and the planned travel route data match, the planned travel route data will be determined as the recommended trajectory data for the traveler.
14. The model training apparatus according to claim 10, characterized in that, The acquisition unit is also used to acquire travel object information of the travel object; if the travel object information is target travel object information, then the travel trajectory data corresponding to the target travel object information is determined as recommended trajectory data.
15. The model training apparatus according to claim 10, characterized in that, The construction unit is specifically used to obtain adjustment parameters for quantity measurement parameters based on recommended trajectory data; adjust the quantity measurement parameters according to the adjustment parameters to obtain the adjusted quantity measurement parameters; and construct a sample set for the route data samples according to the adjusted quantity measurement parameters to obtain the sample set.
16. The model training apparatus according to claim 15, characterized in that, The adjustment parameters include the time parameter, which is the time parameter for generating the recommended trajectory data; The construction unit is specifically used to obtain the current time parameter; based on the current time parameter and the time parameter, the weight parameter of the quantity measurement parameter is calculated; based on the weight parameter, the quantity measurement parameter is weighted to obtain the adjusted quantity measurement parameter.
17. The model training apparatus according to claim 15, characterized in that, The adjustment parameters include the region parameters, which are the parameters of the target region for generating the recommended trajectory data; The construction unit is specifically used to determine the adjusted quantity measurement parameter if the quantity measurement parameter of the target area is greater than the area parameter, and to determine the adjusted quantity measurement parameter if the quantity measurement parameter of the target area is less than or equal to the area parameter.
18. The model training apparatus according to any one of claims 10 to 17, characterized in that, The model training device also includes a recommendation unit; The recommendation unit is used to acquire several candidate route data; use a trained route recommendation model to predict the route score of the candidate route data to obtain the predicted route score of each candidate route data; determine the target recommended route data from the candidate route data based on the predicted route score, and recommend the target recommended route data.
19. A computer device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the model training method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to execute the model training method according to any one of claims 1 to 9.
21. A computer program product, characterized in that, The computer program product stores a computer program adapted for loading by a processor to execute the model training method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Travel route recommendation method and device, electronic equipment and readable storage medium
CN112766607A
Travel recommendation method and device, computer equipment and storage medium
CN113283184A