A route planning method and related apparatus

By collaboratively training the arrival time prediction model and the ranking model, the problems of inaccurate route quality and time prediction in existing technologies are solved, achieving higher prediction accuracy and route planning precision.

CN115169711BActive Publication Date: 2026-05-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-07-18
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing methods for estimating arrival times and route sequencing are inadequate in considering route quality and time accuracy, leading to inaccurate prediction results.

Method used

By collaboratively training the arrival time prediction model and the ranking model, and utilizing the feature information of candidate routes, the model parameters are adjusted in reverse to improve prediction accuracy.

Benefits of technology

It also improves the accuracy of arrival time estimation and route sequencing, ensuring that route quality is fed back into the prediction model, thereby enhancing the overall accuracy of route planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115169711B_ABST
    Figure CN115169711B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a route planning method and related device for improving the prediction accuracy of the ranking model and the arrival time estimation model simultaneously. The method comprises: obtaining feature information of N candidate routes, the multiple candidate routes having the same starting point, ending point and departure time; sequentially passing the feature information of the N candidate routes through an arrival time estimation model and a ranking model to obtain arrival time information of the N candidate routes and ranking information of the N candidate routes, wherein the arrival time estimation model and the ranking model are obtained by collaborative training of a first target model and a second target model, and the first training sample set and the second training sample set are obtained by extracting features from sample pairs constructed from historical routes and alternative routes of the historical routes; and determining a target route according to the ranking information of the N candidate routes and the arrival time information of the N candidate routes. The method provided by the present application can be applied to the fields of maps, cloud technology and big data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and in particular to a route planning method and related apparatus. Background Technology

[0002] Currently, in the field of Estimated Time of Arrival (ETA), the most commonly used algorithms include rule-based segment-by-segment accumulation methods and machine learning algorithms based on decision tree models. For route ranking, the most commonly used method is the pairwise ranking learning method based on Gradient Boosting Decision Tree (GBDT).

[0003] The rule-based segment-by-segment accumulation method divides the entire route into multiple segments. Based on the length, speed, and traffic light conditions of each segment, it estimates the travel time for each segment and adds this to the travel time at each intersection. These sums are then used to obtain the total travel time for the entire route. This method heavily relies on human experience, requiring manual setting of rules for each segment. However, due to the complexity of real-world road conditions, manually set rules cannot cover all scenarios, leading to inaccurate times. More importantly, this method accumulates the estimated times for each segment, thus accumulating errors in the estimated times for each segment, making it difficult to achieve satisfactory accuracy. The decision tree model-based method, instead of dividing the entire route into segments for segment-by-segment estimation, first extracts features of the entire route, such as the total distance, the average speed at departure, the total number of traffic lights, and the percentage of congested mileage. These features are then input into a machine learning algorithm based on a decision tree model for training, resulting in a decision tree model for time estimation. These types of algorithms only consider the overall characteristics of the route. However, in reality, extreme congestion on a particular road segment can significantly impact the arrival time of the entire route, leading to inaccurate estimated times due to focusing solely on overall characteristics. The GBDT algorithm takes a pair of routes as input: one is a positive sample (the user's actual trajectory), and the other is a negative sample, typically another candidate route with the same origin, destination, and departure time. The pairwise ranking learning method trains the entire GBDT model by maximizing the difference in scores between positive and negative samples, and then rates the user's new route. The GBDT model trains a set of decision trees sequentially, with each tree correcting the errors of the preceding trees, gradually approaching the training objective. This GBDT model has achieved good results on many tasks and, due to its high computational performance in online prediction, has gained widespread application in industry.

[0004] As described above, ETA uses the user's actual arrival time as supervision, considering only the accuracy of time without taking into account the relative merits of different routes. The ranking model, on the other hand, directly uses the ETA model's predictions as features, failing to feed the final route quality back into the ETA model, resulting in poor route quality. Summary of the Invention

[0005] This application provides a route planning method and related apparatus for simultaneously improving the prediction accuracy of the sorting model and the arrival time estimation model.

[0006] In view of this, this application provides a route planning method, comprising: obtaining feature information of N candidate routes, wherein the candidate routes have the same starting point, ending point, and departure time, and N is an integer greater than 1; sequentially passing the feature information of the N candidate routes through an arrival time prediction model and a ranking model to obtain arrival time information and ranking information of the N candidate routes, wherein the arrival time prediction model is trained by a first training sample set through a first target model, and the ranking model is trained by a second training sample set through a second target model, and the input data packet of the second target model is... The output data of the target model is included, enabling the first target model and the second target model to be trained collaboratively. The loss value of the second target model and the loss value of the first target model are used to adjust the network parameters of the first target model inversely to obtain the arrival time prediction model. The loss value of the second target model is used to adjust the network parameters of the second target model inversely to obtain the ranking model. The first training sample set and the second training sample set are obtained by extracting features from sample pairs constructed from historical routes and candidate routes of the historical routes. The target route is determined based on the ranking information of the N candidate routes and the arrival time information of the N candidate routes.

[0007] Another aspect of this application provides a route planning device, including: an acquisition module, used to acquire feature information of N candidate routes, wherein the candidate routes have the same starting point, ending point and departure time, and N is an integer greater than 1;

[0008] The processing module is used to sequentially process the feature information of the N candidate routes through an arrival time prediction model and a ranking model to obtain the arrival time information and ranking information of the N candidate routes. The arrival time prediction model is trained by a first target model using a first training sample set, and the ranking model is trained by a second target model using a second training sample set. The input data of the second target model includes the output data of the first target model, so that the first target model and the second target model are trained together. The loss value of the second target model and the loss value of the first target model are used to adjust the network parameters of the first target model inversely to obtain the arrival time prediction model. The loss value of the second target model is used to adjust the network parameters of the second target model inversely to obtain the ranking model. The first training sample set and the second training sample set are obtained by feature extraction from sample pairs constructed from historical routes and candidate routes of the historical routes.

[0009] The determination module is used to determine the target route based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes.

[0010] In one possible design, in another implementation of another aspect of the embodiments of this application, the acquisition module is specifically used to acquire the road segment sequence of each of the N candidate routes to obtain N sets of road segment sequences;

[0011] Obtain the feature matrix of each of the N road segment sequences. The feature matrix shall include at least the basic attribute features, historical speed features, and road condition features before the departure time of the candidate route for each road segment sequence.

[0012] Obtain the overall features of each of the N candidate routes. The overall features include at least the basic attribute features of the entire route, the speed features of each segment of the route, and the road condition features of the entire route. The overall features and the feature matrix are used as the feature information.

[0013] In one possible design, in another implementation of another aspect of the embodiments of this application, the sorting model and the arrival time estimation model are deployed independently on different servers.

[0014] In one possible design, in another implementation of another aspect of the embodiments of this application, the determining module is specifically used to respond to the user's click operation on the option control corresponding to the route navigation, and recommend M recommended routes based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes, and the M recommended routes are used as the target routes, where M is a positive integer less than or equal to N.

[0015] In one possible design, in another implementation of another aspect of the embodiments of this application, the acquisition module is further configured to acquire the first training sample set and the second training sample set;

[0016] The route planning device further includes a training module, used to obtain a first output result by passing the first training sample set through the first target model, the first output result including predicted arrival time and other output results, the other output results being used to indicate the ranking characteristics of the first training sample set; calculate a first loss of the first target model based on the predicted arrival time and the actual arrival time corresponding to the first training sample set; obtain a prediction score by passing the first output result and the second training sample set through the second target model; calculate a second loss of the second target model based on the prediction score and the actual routes in the second training sample set; adjust the parameters of the second target model in reverse based on the second loss to obtain the ranking model; and adjust the parameters of the first target model in reverse based on the first loss and the second loss to obtain the arrival time prediction model.

[0017] In one possible design, in another implementation of another aspect of the embodiments of this application, the acquisition module is specifically used to acquire historical routes and P alternative routes corresponding to the historical routes, where P is an integer greater than or equal to 1.

[0018] Based on the historical route and the P alternative routes, construct a sample pair set including P sample pairs. Each sample pair in the sample pair set includes the historical route and one alternative route from the P alternative routes.

[0019] Feature extraction is performed on each sample pair in the sample pair set to obtain the feature information of each sample pair;

[0020] Based on the feature information of each sample pair, a training sample is generated by merging the historical route's actual arrival time in the sample pair, and the training samples corresponding to each sample pair are summarized to obtain the training set.

[0021] The first training sample set and the second training sample set are obtained by sampling from the training set.

[0022] In one possible design, in another implementation of another aspect of the embodiments of this application, the first training sample set and the second training sample set include the same training samples; or, the first training sample set and the second training sample set are different subsets of the training set.

[0023] This application also provides a computer device, including: a memory, a processor, and a bus system;

[0024] The memory is used to store programs;

[0025] The processor is used to execute programs in memory, and the processor is used to execute the methods mentioned above according to the instructions in the program code;

[0026] Bus systems are used to connect memory and processor to enable communication between them.

[0027] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.

[0028] Another aspect of this application provides a computer program product or computer program including 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 above aspects.

[0029] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The feature information of multiple candidate routes is input into the arrival time prediction model and the ranking model to obtain the estimated arrival time and estimated ranking information for each candidate route. The target route is then selected based on a comprehensive consideration of the estimated arrival time and estimated ranking information. Since the arrival time prediction model and the ranking model are trained collaboratively, the loss of the ranking model can be used to adjust the arrival time prediction model in reverse, thereby simultaneously improving the prediction accuracy of both the ranking model and the arrival time prediction model. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of an implementation environment system architecture for the route planning method in this application embodiment;

[0031] Figure 2 This is a schematic diagram of an implementation environment for the collaborative training method of the sorting model and the arrival time prediction model in the embodiments of this application;

[0032] Figure 3 This is a schematic diagram of a training architecture for a collaborative training method of the sorting model and the arrival time prediction model in the embodiments of this application;

[0033] Figure 4 This is a schematic diagram of an embodiment of the collaborative training method of the sorting model and the arrival time prediction model in this application.

[0034] Figure 4a This is a schematic diagram of one embodiment of the vector matrix processing architecture in this application.

[0035] Figure 5This is a schematic diagram of one embodiment of the route planning method in this application;

[0036] Figure 5a This is a schematic diagram illustrating an application scenario of the route planning method in the embodiments of this application;

[0037] Figure 6 This is a schematic diagram of one embodiment of the route planning device in this application;

[0038] Figure 7 This is a schematic diagram of another embodiment of the route planning device in this application;

[0039] Figure 8 This is a schematic diagram of another embodiment of the route planning device in this application;

[0040] Figure 9 This is a schematic diagram of another embodiment of the route planning device in this application. Detailed Implementation

[0041] This application provides a route planning method and related apparatus for simultaneously improving the prediction accuracy of the sorting model and the arrival time estimation model.

[0042] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0043] For ease of understanding, some business terms in the embodiments of this application are explained below:

[0044] Estimated Time of Arrival (ETA) is a basic function in map software. Its function is to estimate the time required to complete a route given a route on a map and a departure time.

[0045] Route: In map applications, a route is simply a complete line connecting the start and end points. In real-world scenarios, the length of a route is usually between one kilometer and tens of kilometers.

[0046] Links: In map applications, routes are represented by sequences of links. In map data, roads are divided into line segments, ranging in length from tens of meters to several kilometers. Each line segment is called a link and is assigned a globally unique identifier. Therefore, a route on a map is a sequence of all links within that route.

[0047] Route Ranking: After a user initiates a navigation request, the backend performs the following calculations to ultimately recommend 1 to 3 routes to the user. First, based on the user's input of the starting and destination points, several candidate routes are generated from the road network, typically ranging from 10 to 100. Second, for the candidate routes generated in the previous step, a series of key features are requested, such as estimated arrival time and route popularity. Different key features are usually generated by different backend modules. Third, the candidate routes generated in the first step are ranked based on their various key features, and the top 1 to 3 routes are ultimately returned to the user. Ranking involves using a model to assign a score to each route; with scores, ranking can be performed, and the model used for scoring is called the ranking model.

[0048] Actual Time of Arrival (ATA): The ATA of a route can be extracted from the historical data of the map service. Therefore, this data can be used as the ground truth to train a machine learning algorithm to estimate the arrival time.

[0049] Historical Classic Speed: The speed extracted for each road segment based on the historical routes of all users. In an exemplary scheme, assuming a period of one week and a calculation granularity of 5 minutes, each road segment will yield 7*24*12=2016 speed values, representing the travel speed every 5 minutes from Monday to Sunday.

[0050] Currently, the most commonly used algorithms in the ETA field include rule-based segment-by-segment accumulation methods and machine learning algorithms based on decision tree models. In route ranking, the most commonly used method is the pairwise ranking learning method based on Gradient Boosting Decision Tree (GBDT). Rule-based segment-by-segment accumulation methods divide the entire route into multiple segments. Based on the length, speed, and traffic light conditions of each segment, the travel time of each segment is estimated. This is then added to the travel time at each intersection, and the total travel time for the entire route is obtained by accumulating these estimates. This method relies heavily on human experience, requiring manual setting of rules for each segment. However, due to the complexity of real-world road conditions, manually set rules cannot cover all scenarios, often resulting in inaccurate times. More importantly, this method accumulates the estimated times of each segment, thus accumulating errors in the estimated times of each segment, making it difficult to achieve a satisfactory accuracy rate. Decision tree-based methods no longer divide the entire route into multiple segments for segment-by-segment estimation. Instead, they first extract features of the entire route, such as the total distance, average speed at departure, total number of traffic lights, and percentage of congested mileage. These features are then input into a machine learning algorithm based on the decision tree model for training, resulting in a decision tree model for time estimation. This type of algorithm only considers the overall characteristics of the route. However, in reality, extreme congestion in a particular segment can significantly impact the arrival time of the entire route, leading to inaccurate estimates if only overall features are considered. GBDT-based methods use a pair of routes as input: one is a positive sample (the user's actual trajectory), and the other is a negative sample, typically another candidate route with the same origin, destination, and departure time. Pairwise ranking learning methods train the entire GBDT model by maximizing the difference in scores between positive and negative samples, and then rate the user's new route. The GBDT model trains a set of decision trees sequentially, with each tree correcting the errors of the preceding trees to gradually approach the training objective. This GBDT model has achieved good results on many tasks and, due to its high computational performance in online prediction, has been widely used in industry. From the above description, it can be seen that ETA uses the user's actual arrival time as supervision, considering only the accuracy of time but not the relative merits of different routes. In contrast, the ranking model directly uses the ETA model's predictions as features, without feeding the final route quality back into the ETA model, resulting in poor route quality.

[0051] To address this technical problem, this application provides the following technical solution: Obtain feature information of N candidate routes, where the candidate routes share the same starting point, ending point, and departure time, and N is an integer greater than 1; sequentially process the feature information of the N candidate routes using an arrival time prediction model and a ranking model to obtain the arrival time information and ranking information of the N candidate routes, wherein the arrival time prediction model is trained from a first training sample set using a first target model, and the ranking model is trained from a second training sample set using a second target model, and the input data of the second target model... The method includes using the output data of the target model to enable collaborative training of the first target model and the second target model. The loss values ​​of the second and first target models are used to inversely adjust the network parameters of the first target model to obtain the arrival time prediction model. Similarly, the loss values ​​of the second target model are used to inversely adjust the network parameters of the second target model to obtain the ranking model. The first and second training sample sets are obtained by extracting features from sample pairs constructed from historical routes and their candidate routes. The target route is determined based on the ranking information and arrival time information of the N candidate routes. By employing this technical solution, since the arrival time prediction model and the ranking model are trained collaboratively, the loss of the ranking model can inversely adjust the arrival time prediction model, thereby simultaneously improving the prediction accuracy of both models.

[0052] The technical solutions provided in this application can be applied to, but are not limited to, the following scenarios:

[0053] (1) When a user initiates navigation through a navigation terminal, the navigation backend (i.e., the route planning device in this application) will determine several candidate routes based on the user's navigation request, and then use the method of this application to determine the estimated arrival time and sorting information of each candidate route, and then select the optimal route from the several candidate routes and provide it to the user.

[0054] (2) When the navigation terminal enters the navigation state, the navigation backend will use the method of this application to determine the estimated arrival time and sorting information of the candidate routes calculated based on the latest traffic conditions between the current location of the navigation terminal and the navigation destination at regular intervals. Then, it will select the optimal route from the new candidate routes and provide it to the user to facilitate the user's trip planning.

[0055] (3) Some application servers (i.e., the route planning device in this application) can use the method of this application to determine an isochronous reachable circle, such as a half-hour reachable circle, a one-hour reachable circle, etc., so that users can understand the living radius of a certain location through the corresponding application terminal. At the same time, based on the recommended locations and the user's residence address, the optimal route to each recommended location can be recommended to the user.

[0056] (4) The food delivery server (i.e., the route planning device in this application) can use the method of this application to determine the time taken for each route from the food delivery point to the user terminal and the sorting information of each route, so as to better assign orders to deliverymen and improve delivery efficiency.

[0057] (5) When a user hails a ride through a ride-hailing application terminal, the ride-hailing application backend (i.e., the route planning device in this application) can use the method of this application to determine the time consumption and sorting information of the route selected by the user, so as to better arrange drivers to accept orders and improve passenger transport efficiency.

[0058] (6) In the above application scenarios, after the navigation backend, the food delivery server, the ride-hailing application backend server, or the server of some applications determines the time consumption of each route using the method of this application, the time consumption of each route is fed back to the upstream service (such as the route sorting server) so as to evaluate the merits of each route and then push the optimal route to the user.

[0059] (7) In the above application scenarios, after the navigation backend, the food delivery server, the backend server of the ride-hailing application, or the server of some applications determines the time consumption of each route using the method of this application, the influence weight of each road segment on the time consumption of each route is obtained, and the time consumption and the influence weight of each road segment are fed back to the upstream service (such as the route sorting server), so that the user knows the reason for the time consumption and decides whether to change the route to avoid congestion, etc.

[0060] (8) During a fixed time period each day, the estimated arrival time of each alternative Tongle route for the user and the overall ranking information of each alternative Tongle route are determined by the navigation backend or the server of other applications during the current time period. Finally, the optimal Tongle route is selected and recommended to the user.

[0061] The method provided in this application is applicable to, for example... Figure 1The implementation environment system architecture, as shown in the figure, includes servers, terminal devices, and satellites. The terminal devices are equipped with clients that can provide positioning or navigation. These clients can run on the terminal devices via a browser or as standalone applications (APPs), etc. The specific form of the client is not limited here. The servers involved in this application can be independent physical servers, server clusters composed of multiple physical servers, or distributed systems. They can also be cloud servers 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 networks (CDNs), and big data and artificial intelligence platforms. Terminal devices can be smartphones, tablets, laptops, PDAs, personal computers, smart TVs, smartwatches, in-vehicle devices, wearable devices, etc., but are not limited to these. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, which is not limited here. The number of servers and terminal devices is also not limited. The solution provided in this application can be completed independently by the terminal device, independently by the server, or jointly by the terminal device and the server. This application does not make any specific limitations on this.

[0062] Terminal devices acquire Global Positioning System (GPS) data. Typically, when a terminal device is outdoors and has line-of-sight access to the satellites, it can acquire GPS data from one or more GPS satellites. The terminal device uses the GPS data to periodically determine GPS coordinates (e.g., latitude and longitude coordinates) to indicate its current location.

[0063] It is understood that, in this embodiment of the application, before route planning, a method for co-training the ranking model and the arrival time prediction model may also be provided. In one exemplary solution, the method for co-training the ranking model and the arrival time prediction model provided in this embodiment of the application can be executed by a computer device. The following describes the implementation environment of the method for co-training the ranking model and the arrival time prediction model provided in this embodiment of the application. Figure 2 This is a schematic diagram illustrating the implementation environment of a collaborative training method for a ranking model and an arrival time prediction model provided in an embodiment of this application. See also... Figure 2 The implementation environment includes terminal device 101 and server 102. Terminal device 101 and server 102 can be connected directly or indirectly via wired or wireless communication, which is not limited herein.

[0064] In some embodiments, terminal device 101 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, smart voice interaction device, smart home appliance, or in-vehicle terminal, but is not limited thereto. Terminal device 101 has a client installed and running that supports content recommendation. This client can run on terminal device 101 via a browser or as a standalone application (APP). The specific form of the client is not limited here. In some embodiments, server 102 may be an independent 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), and big data and artificial intelligence platforms. Server 102 is used to provide backend services for applications that support virtual scenarios. In some embodiments, server 102 undertakes the main computing work, and terminal device 101 undertakes the secondary computing work. For example, terminal device 101 provides sample data to server 102, and server 102 provides the training process of the multi-objective recommendation model; or, server 102 and terminal device 101 use a distributed computing architecture to perform collaborative computing.

[0065] It is understood that the number of terminal devices 101 can be more or less. For example, there may be only one terminal device 101, or there may be dozens or hundreds of terminal devices 101, or even more. That is, the embodiments of this application do not limit the number or type of terminal devices 101.

[0066] The training architecture of the collaborative training method for the ranking model and the arrival time prediction model provided in the embodiments of this application is described below, such as... Figure 3 In the training architecture shown, the first training set of the arrival time prediction model is obtained (e.g., Figure 3 As shown, the first training set is called ETA features) and the second training set of the ranking model is called ETA features. Figure 3As shown, the second training set is referred to as the ranking feature; wherein, the actual arrival time in the first training set is used as supervised data to supervise the training of the arrival time prediction model, and the actual trajectory in the second training set is used as supervised data to train the ranking model. After obtaining the training set, the overall training process can be as follows: the first training set is input into the arrival time prediction model to output the estimated arrival time and other output results, and then the estimated arrival time and the actual arrival time are used to calculate the first loss; the estimated arrival time, the other output results, and the second training set are used as input data to the ranking model to obtain the estimated score of each route, and then the estimated score and the actual trajectory are used to calculate the second loss; finally, the parameters of the ranking model are adjusted in reverse according to the second loss to achieve the training of the ranking model, and the parameters of the arrival time prediction model are adjusted in reverse according to the first loss and the second loss to achieve the training of the arrival time prediction model, until the training ends.

[0067] In this embodiment, the sorting model and the arrival time prediction model can be GBDT, a linear model, or a depth model, and no specific limitation is made here.

[0068] It should be noted that the implementation environment of the route planning method provided in this application embodiment may be the same as or different from the implementation environment of the collaborative training method of the ranking model and the arrival time prediction model. This application embodiment does not impose any restrictions on this.

[0069] It is understood that in the specific embodiments of this application, data related to routes and so on are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0070] Based on the above introduction, the following section will describe the co-training method of the ranking model and the arrival time prediction model in this application. Please refer to [link / reference]. Figure 4 One embodiment of the collaborative training method for the ranking model and the arrival time prediction model in this application includes:

[0071] 401. Obtain the first training sample set and the second training sample set.

[0072] In this embodiment, the route planning device obtains sample data for model training based on a pairwise algorithm. In an exemplary scheme, the route planning device obtains a historical route and P candidate routes corresponding to the historical route, where P is an integer greater than or equal to 1; constructs a sample pair set including P sample pairs based on the historical route and the P candidate routes, where each sample pair in the sample pair set includes the historical route and one candidate route from the P candidate routes; performs feature extraction on each sample pair in the sample pair set to obtain feature information for each sample pair; merges the feature information of each sample pair with the actual arrival time of the historical route in the sample pair to generate a training sample, and summarizes the training samples corresponding to each sample pair to obtain a training set; samples from the training set to obtain the first training sample set and the second training sample set.

[0073] In one exemplary scheme, the specific process by which the route planning device obtains the first training sample set and the second training sample set can be as follows:

[0074] 1. The route planning device acquires historical routes and alternative routes for those historical routes. It is understood that the historical routes and the alternative routes share the same start point, end point, and departure time. The historical routes include the departure time, the sequence of road segments, and the actual arrival time. In this embodiment, for ease of calculation, the number of alternative routes may not exceed 10. In one exemplary scheme, the route planning device acquires 3 historical routes, each corresponding to 10 alternative routes. For example, historical route 1 corresponds to alternative routes including (alternative route 1, alternative route 2, alternative route 3, alternative route 4, alternative route 5, alternative route 6, alternative route 7, alternative route 8, alternative route 9, and alternative route 10).

[0075] 2. The route planning device constructs a positive-negative sample pair between historical routes and their alternative routes, where the historical route is the positive sample and the alternative route is the negative sample. In an exemplary scheme, the sample pair formed by the route planning device for historical route 1 and its alternative route can be as follows: (historical route 1, alternative route 1), (historical route 1, alternative route 2), (historical route 1, alternative route 3), (historical route 1, alternative route 4), (historical route 1, alternative route 5), (historical route 1, alternative route 6), (historical route 1, alternative route 7), (historical route 1, alternative route 8), (historical route 1, alternative route 9), and (historical route 1, alternative route 10). Similarly, if there are other historical routes and their alternative routes, similar sample pairs can be constructed, and all historical routes and their alternative routes will form a sample pair set. Further details are omitted here.

[0076] 3. The route planning device performs feature extraction on the sample pairs constructed in step 2. In this embodiment, the route planning device can extract features from road segments in each sample pair as well as from the overall route. In an exemplary scheme, the feature extraction process can be as follows:

[0077] a. The route detection device acquires the basic attribute features of the road segment sequences corresponding to each route in the sample pair. This includes information such as segment length, road classification, width, and the presence of traffic lights. The road classification indicates the road's level; for example, if the segment is an urban road, it can be classified as an expressway, arterial road, secondary arterial road, or local road. If the segment is a highway, it can be classified as a national highway, provincial highway, county highway, or township highway. The width of the road segment generally indicates the width of the road for motor vehicles.

[0078] b. Historical classic speed characteristics of each road segment at the departure time. This can be understood as the average or median speed of vehicles passing through that segment at the current moment. If the statistical timeframe is 30 minutes before and after the departure time, and the calculation granularity is 5 minutes, then the historical classic speed characteristics of that road segment could include 12 historical classic speeds and 12 standard deviations of those historical classic speeds, etc.

[0079] c. Road condition characteristics of each road segment at the time of departure. This can refer to road conditions (e.g., congestion, smooth traffic, road repairs, accidents, etc.), real-time speed, and real-time traffic flow. If the 30 minutes prior to departure is used as the statistical time period, with a 5-minute calculation granularity, then the road condition characteristics of this road segment could include 6 road conditions, 6 real-time speeds, and 6 real-time traffic flows.

[0080] d. After feature extraction through steps a, b, and c, each road segment will obtain a K-dimensional vector, where K indicates the dimension of the feature description. After performing the above processing on all road segments in the sample pair, each route in the sample pair will form an M*K dimensional vector matrix, where M indicates the number of road segments.

[0081] e. Extract overall features from each route in the sample pair. These overall features may include the total length, the proportion of expressways, the average real-time speed of each road segment, the average historical speed of each road segment, and the total length of congestion, etc. After this step, the route planning device can obtain a one-dimensional feature vector of the positive sample and a one-dimensional feature vector of the negative sample in the sample pair. Each one-dimensional feature vector contains L feature values. Here, L indicates the total number of features for the route.

[0082] 4. The route planning device combines the feature matrix of the aforementioned road segment sequence and the overall features of the route with the actual arrival time to obtain a training sample. That is, a training sample is generated after feature extraction in step 3 and feature merging in step 4. Each sample pair in the sample pair set obtained in step 2 is used to form a training set through feature merging in steps a to e and step 4.

[0083] 5. The route planning device obtains the first training sample set and the second training sample set from the training set. It is understood that the first training sample set and the second training sample set can be the same, or they can be subsets of the training set, and no specific limitation is made here.

[0084] It is understandable that, in this embodiment, since the value of M in the M*K dimensional vector matrix is ​​different, when inputting the first target model and the second target model, the M*K dimensional vector matrix needs to be processed to obtain a fixed-length feature. The specific operation can be as follows:

[0085] In one possible implementation, the mean of all rows in the M*K dimensional vector matrix is ​​calculated directly to obtain a K-dimensional vector. This K-dimensional vector is then merged with e in step 3 and the feature in step 4 to form a fixed-length feature, which is then input into the first target model and the second target model.

[0086] In another possible implementation, a recurrent neural network (such as a Long Short-Term Memory (LSTM) network or a Gate Recurrent Unit (GRU) network) is added before the first target model and the second target model. This recurrent neural network processes the feature information of one road segment at each time step until the feature information of all road segments has been processed, outputting a K-dimensional vector. This K-dimensional vector is then merged with the features from step 3 and step 4 to form a set of fixed-length features. These fixed-length features are then input into the first target model or the second target model through a fully connected network. An exemplary architecture could be as follows: Figure 4a As shown, the specifics will not be elaborated here.

[0087] In another possible implementation, a convolutional network is added before the first target model and the second target model. The convolutional network processes the M*K dimensional vector matrix to obtain a K-dimensional vector. This K-dimensional vector is then merged with the e in step 3 and the features in step 4 to form a fixed-length feature, which is then input into the first target model and the second target model.

[0088] 402. The first training sample set is passed through the first target model to obtain the first output result, which includes the predicted arrival time and other output results, which are used to indicate the ranking characteristics of the first training sample set.

[0089] The route planning device uses the first training sample set as input to the first target model, and inputs it into the first target model to obtain the estimated arrival time of the training samples and other output results. It is understood that these other output results are used to indicate the ranking information of each training sample in the first training sample set.

[0090] 403. Calculate the first loss of the first target model based on the predicted arrival time and the actual arrival time corresponding to the first training sample set.

[0091] At this point, the actual arrival times in the first training sample set will be used as supervision information and compared with the estimated arrival times output by the first target model to calculate the first loss of the first target model. It is understood that the route planning device can use methods such as MAPE or MSE to calculate this first loss. Specifically, it can be shown in Equation 1 or Equation 2:

[0092]

[0093] loss eta =(ETA-ATA) 2 Formula 2

[0094] Wherein, the loss eta The ETA is used to indicate the first loss, the ETA is used to indicate the estimated time of arrival, and the ATA is used to indicate the actual time of arrival.

[0095] 404. The first output result and the second training sample set are used to obtain the predicted score through the second target model.

[0096] During model training, after the first target model outputs a first output result, the route planning device inputs this first output result along with the second training sample set into the second target model to obtain a predicted score. It is understood that this predicted score is used to indicate the estimated ranking score for the routes.

[0097] 405. Calculate the second loss of the second target model based on the predicted score and the real routes in the second training sample set.

[0098] At this point, the historical routes in the second training sample set will be used as supervision information and compared with the predicted scores output by the second target model to calculate the second loss of the second target model. This can be calculated using Formula 3:

[0099] lossrank =lnσ(s) pos -s neg ) Formula 3

[0100] Wherein, the loss rank The second loss used to indicate the second objective model, s pos s represents the predicted score of the positive samples in the second training sample set. neg Let represent the predicted score of the negative sample in the second training sample set, and σ represent the activation function (i.e., the sigmoid function), which has the form:

[0101] The overall loss of the first objective model and the second objective model can be obtained from the loss values ​​calculated in steps 403 and 405. This overall loss can be expressed as shown in Formula 4:

[0102] loss total =loss eta +λ*loss rank Formula 4

[0103] Wherein, the loss total The value λ is used to indicate the overall loss and is an empirical constant.

[0104] It is understood that in this embodiment, the time order between steps 403 and 404 is not limited to the above-mentioned time order. The calculation of the first loss value and the second loss value can be performed after the predicted score and the estimated arrival time are calculated, or the calculation of the first loss value can be performed after the estimated arrival time is output. The specifics are not limited here.

[0105] 406. Based on the second loss, the parameters of the second objective model are adjusted in reverse to obtain the ranking model.

[0106] 407. Based on the first loss and the second loss, the parameters of the first target model are adjusted in reverse to obtain the arrival time prediction model.

[0107] The above describes the collaborative training method of the ranking model and the arrival time prediction model in the embodiments of this application. The application of this ranking model and arrival time prediction model is described below; please refer to [link / reference needed]. Figure 5 As shown, one embodiment of the route planning method in this example includes:

[0108] 501. Obtain the feature information of N candidate routes. These candidate routes have the same starting point, ending point and departure time, where N is an integer greater than 1.

[0109] In this embodiment, after receiving the user's input of the starting point, destination, and departure time, the route planning device can obtain multiple candidate routes by matching them with map software. Then, the route planning device can extract features from the road segments and the entire route to obtain the feature information of the N candidate routes. In one exemplary scheme, assuming the user inputs information such as starting point A, terminal B, and departure time as 9:00 AM through navigation software, the navigation backend will match this information with the map software to obtain the following three candidate routes: Route 1 (ACFB); Route 2 (ADEB); Route 3 (AGB); where AC indicates a road segment, CF also indicates a road segment, and so on, meaning adjacent locations indicate a road segment.

[0110] Optionally, the route planning device can perform feature extraction on road segments of candidate routes and on the entire route as follows:

[0111] a. The route detection device acquires the basic attribute features of the road segment sequence corresponding to each candidate route. This includes information such as segment length, road classification, width, and the presence of traffic lights. The road classification indicates the road's level; for example, if the segment is an urban road, it can be classified as an expressway, arterial road, secondary arterial road, or local road. If the segment is a highway, it can be classified as a national highway, provincial highway, county highway, or township highway. The width of the road segment generally indicates the width of the road for motor vehicles.

[0112] b. Road condition characteristics of each road segment at the time of departure. This can refer to road conditions (e.g., congestion, smooth traffic, road repairs, accidents, etc.), real-time speed, and real-time traffic flow. If the 30 minutes prior to departure is used as the statistical time period, with a 5-minute calculation granularity, then the road condition characteristics of this road segment could include 6 road conditions, 6 real-time speeds, and 6 real-time traffic flows.

[0113] c. After feature extraction in steps a and b above, each road segment will obtain a K-dimensional vector, where K indicates the dimension of the feature description. After performing the above processing on all road segments in the sample pair, each route in the sample pair will form an M*K dimensional vector matrix, where M indicates the number of road segments.

[0114] d. Extract overall features for each candidate route. These overall features may include the total length, the proportion of expressways, the average real-time speed of each road segment, the average historical speed of each road segment, and the total length of congestion. After this step, the route planning device can obtain a one-dimensional feature vector of the positive sample in the sample pair and a one-dimensional feature vector of the negative sample in the sample pair. Each one-dimensional feature vector includes L feature values. Here, L indicates the total number of features for the route.

[0115] The route planning device combines the feature matrix of the above-mentioned road segment sequence with the overall features of the route to obtain the feature information of the candidate route.

[0116] It is understandable that in this embodiment, since the value of M in the M*K dimensional vector matrix is ​​different, when inputting the arrival time prediction model and the ranking model, the M*K dimensional vector matrix needs to be processed to obtain a fixed-length feature. The specific operation can be as follows:

[0117] In one possible implementation, the mean of all rows in the M*K dimensional vector matrix is ​​calculated directly to obtain a K-dimensional vector. This K-dimensional vector is then merged with e in step 3 and the feature in step 4 to form a fixed-length feature, which is then input into the arrival time prediction model and the sorting model.

[0118] In another possible implementation, a recurrent neural network (such as a Long Short-Term Memory (LSTM) network or a Gate Recurrent Unit (GRU) network) is added before the arrival time prediction model and the ranking model. The recurrent neural network processes the feature information of one road segment at each time step until the feature information of all road segments has been processed, and outputs a K-dimensional vector. The K-dimensional vector is then merged with e in step 3 and the features in step 4 to form a set of fixed-length features. The fixed-length features are then input into the arrival time prediction model and the ranking model through a fully connected network.

[0119] In another possible implementation, a convolutional network is added before the arrival time prediction model and the ranking model. The convolutional network processes the M*K dimensional vector matrix to obtain a K-dimensional vector. This K-dimensional vector is then merged with the e in step 3 and the features in step 4 to form a fixed-length feature, which is then input into the arrival time prediction model and the ranking model.

[0120] 502. The feature information of the N candidate routes is sequentially processed through the arrival time prediction model and the ranking model to obtain the arrival time information and ranking information of the N candidate routes.

[0121] The route planning device sequentially inputs the feature information of the N candidate routes into the arrival time estimation model and the ranking model to obtain the arrival time information and ranking information of the N candidate routes. In an exemplary scheme, assuming that the three candidate routes are Route 1 (ACFB), Route 2 (ADEB), and Route 3 (AGB), the arrival time information of the three candidate routes obtained by the above arrival time estimation model and ranking model are: Route 1 - 30 minutes; Route 2 - 35 minutes; Route 3 - 35 minutes; and the ranking information of the three candidate routes from high to low is: Route 3, Route 1, Route 2.

[0122] 503. Determine the target route based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes.

[0123] The route planning device comprehensively considers the above-mentioned sorting information and the arrival time information to determine the target route from the N candidate routes.

[0124] The following example illustrates this route planning method using a specific application scenario:

[0125] like Figure 5a As shown, the user inputs the starting point (XX residential area) and the destination (XX airport) into the input bar of the navigation software, and then clicks navigation. At this time, the navigation backend uses the route planning method of this application to provide the user with three target routes: Route 1, Route 2, and Route 3. Based on the sorting information and arrival time information, the system provides details for each of Route 1, Route 2, and Route 3. For example, Route 1: Total length 38 kilometers, 7 traffic lights, arrival time 44 minutes; Route 2: Total length 41 kilometers, 7 traffic lights, arrival time 48 minutes; Route 3: Total length 38 kilometers, 14 traffic lights, arrival time 46 minutes.

[0126] The route planning device in this application is described in detail below. Please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of one embodiment of the route planning device in this application. The route planning device 20 includes:

[0127] The acquisition module 201 is used to acquire feature information of N candidate routes. These candidate routes have the same starting point, ending point and departure time, where N is an integer greater than 1.

[0128] The processing module 202 is used to sequentially process the feature information of the N candidate routes through an arrival time prediction model and a ranking model to obtain the arrival time information and ranking information of the N candidate routes. The arrival time prediction model is trained by a first target model using a first training sample set, and the ranking model is trained by a second target model using a second training sample set. The input data of the second target model includes the output data of the first target model, so that the first target model and the second target model are trained together. The loss value of the second target model and the loss value of the first target model are used to adjust the network parameters of the first target model inversely to obtain the arrival time prediction model. The loss value of the second target model is used to adjust the network parameters of the second target model inversely to obtain the ranking model. The first training sample set and the second training sample set are obtained by feature extraction from sample pairs constructed from historical routes and candidate routes of the historical routes.

[0129] The determination module 203 is used to determine the target route based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes.

[0130] This application provides a route planning device. Using this device, feature information of multiple candidate routes is input into an arrival time prediction model and a ranking model to obtain predicted arrival times and predicted ranking information for each candidate route. The target route is then selected based on a comprehensive consideration of the predicted arrival times and predicted ranking information. Since the arrival time prediction model and the ranking model are trained collaboratively, the loss of the ranking model can be used to adjust the arrival time prediction model, thereby simultaneously improving the prediction accuracy of both models.

[0131] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another embodiment of the route planning device 20 provided in this application, the acquisition module 201 is specifically used to acquire the segment sequence of each candidate route among the N candidate routes, to obtain N sets of segment sequences;

[0132] Obtain the feature matrix of each of the N road segment sequences. The feature matrix shall include at least the basic attribute features, historical speed features, and road condition features before the departure time of the candidate route for each road segment sequence.

[0133] Obtain the overall features of each of the N candidate routes. The overall features include at least the basic attribute features of the entire route, the speed features of each segment of the route, and the road condition features of the entire route. The overall features and the feature matrix are used as the feature information.

[0134] This application provides a route planning device. Using this device, the candidate route can extract features from individual road segments as well as overall route features, ensuring richer and more effective feature information for the candidate route, thereby improving arrival time and ranking accuracy.

[0135] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another embodiment of the route planning device 20 provided in this application, the sorting model and the arrival time estimation model are deployed independently on different servers.

[0136] This application provides a route planning device. Using this device, the sorting model and the arrival time estimation model are deployed separately, which reduces the coupling between the two models and facilitates maintenance by personnel.

[0137] Optionally, in the above Figure 6 Based on the corresponding embodiment, in another embodiment of the route planning device 20 provided in this application, the determining module 203 is specifically used to respond to the user's click operation on the option control corresponding to the route navigation, and recommend M recommended routes based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes, and the M recommended routes are used as the target routes, where M is a positive integer less than or equal to N.

[0138] This application provides a route planning device. Using this device, some applications can select multiple target routes from N candidate routes for recommendation, allowing users to plan their trips from multiple routes and thus improving user experience.

[0139] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another embodiment of the route planning device 20 provided in this application, the acquisition module 201 is further used to acquire the first training sample set and the second training sample set;

[0140] like Figure 7As shown, the route planning device further includes a training module 204, which is used to obtain a first output result by passing the first training sample set through the first target model. The first output result includes predicted arrival time and other output results, which are used to indicate the ranking characteristics of the first training sample set. Based on the predicted arrival time and the actual arrival time corresponding to the first training sample set, the first loss of the first target model is calculated. The first output result and the second training sample set are passed through the second target model to obtain a prediction score. Based on the prediction score and the actual routes in the second training sample set, the second loss of the second target model is calculated. Based on the second loss, the parameters of the second target model are adjusted in reverse to obtain the ranking model. Based on the first loss and the second loss, the parameters of the first target model are adjusted in reverse to obtain the arrival time prediction model.

[0141] In this embodiment of the application, a route planning device is provided. Using the above device, during the training process, the output of the arrival time prediction model is used as the input of the ranking model, and the parameters of the arrival time prediction model and the ranking model are adjusted in reverse according to the output of the ranking model, so that the arrival time prediction model and the ranking model can be trained together, thereby improving the prediction accuracy of the ranking model and the arrival time prediction model at the same time.

[0142] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another embodiment of the route planning device 20 provided in this application, the acquisition module 201 is specifically used to acquire historical routes and P alternative routes corresponding to the historical routes, where P is an integer greater than or equal to 1;

[0143] Based on the historical route and the P alternative routes, construct a sample pair set including P sample pairs. Each sample pair in the sample pair set includes the historical route and one alternative route from the P alternative routes.

[0144] Feature extraction is performed on each sample pair in the sample pair set to obtain the feature information of each sample pair;

[0145] Based on the feature information of each sample pair, a training sample is generated by merging the historical route's actual arrival time in the sample pair, and the training samples corresponding to each sample pair are summarized to obtain the training set.

[0146] The first training sample set and the second training sample set are obtained by sampling from the training set.

[0147] This application provides a route planning device. Using this device, the candidate route can extract features from individual road segments as well as overall route features, ensuring richer and more effective feature information for the candidate route, thereby improving arrival time and ranking accuracy.

[0148] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another embodiment of the route planning device 20 provided in this application, the first training sample set and the second training sample set include the same training samples; or, the first training sample set and the second training sample set are different subsets of the training set.

[0149] This application provides a route planning device. Using this device, different or the same training sample sets are selected for the ranking model and the arrival time prediction model, providing diverse training methods to improve the accuracy of arrival time and ranking.

[0150] The route planning device provided in this application can be used on a server; please refer to [link / reference]. Figure 8 , Figure 8 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 322 (e.g., one or more processors) and memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 342 or data 344. The memory 332 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the server. Furthermore, the CPU 322 may be configured to communicate with the storage media 330 and execute the series of instruction operations stored in the storage media 330 on the server 300.

[0151] Server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.

[0152] The steps performed by the route planning device in the above embodiments can be based on this Figure 8 The server structure shown.

[0153] The route planning device provided in this application can be used in terminal devices; please refer to [link / reference]. Figure 9For ease of explanation, only the parts relevant to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. In the embodiments of this application, a smartphone is used as an example for illustration:

[0154] Figure 9 This is a block diagram illustrating a portion of the structure of a smartphone related to the terminal device provided in the embodiments of this application. (Reference) Figure 9 The smartphone includes components such as a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will understand that... Figure 9 The smartphone structure shown does not constitute a limitation on smartphones and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0155] The following is combined Figure 9 A detailed introduction to the various components of a smartphone:

[0156] RF circuit 410 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 480; additionally, it transmits uplink data to the base station. Typically, RF circuit 410 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 410 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.

[0157] The memory 420 can be used to store software programs and modules. The processor 480 executes various functions and data processing of the smartphone by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications 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 smartphone (such as audio data, phonebook, etc.). In addition, the memory 420 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.

[0158] The input unit 430 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the smartphone. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 431), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 431 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 480, and can also receive and execute commands sent by the processor 480. In addition, the touch panel 431 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 431, the input unit 430 may also include other input devices 432. Specifically, other input devices 432 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0159] Display unit 440 can be used to display information input by the user or information provided to the user, as well as various menus of the smartphone. Display unit 440 may include display panel 441, optionally configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Further, touch panel 431 may cover display panel 441. When touch panel 431 detects a touch operation on or near it, it transmits the information to processor 480 to determine the type of touch event. Subsequently, processor 480 provides corresponding visual output on display panel 441 based on the type of touch event. Although in Figure 9 In this embodiment, the touch panel 431 and the display panel 441 are two separate components to realize the input and output functions of the smartphone. However, in some embodiments, the touch panel 431 and the display panel 441 can be integrated to realize the input and output functions of the smartphone.

[0160] The smartphone may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 441 according to the ambient light level, and the proximity sensor can turn off the display panel 441 and / or the backlight when the smartphone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the smartphone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the smartphone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0161] Audio circuit 460, speaker 461, and microphone 462 provide an audio interface between the user and the smartphone. Audio circuit 460 converts received audio data into electrical signals and transmits them to speaker 461, where speaker 461 converts them into sound signals for output. On the other hand, microphone 462 converts collected sound signals into electrical signals, which are received by audio circuit 460, converted into audio data, and then processed by processor 480 before being transmitted via RF circuit 410 to, for example, another smartphone, or the audio data can be output to memory 420 for further processing.

[0162] WiFi is a short-range wireless transmission technology. Smartphones, through their WiFi modules (470), can help users send and receive emails, browse web pages, and access streaming media, providing wireless broadband internet access. Although Figure 9 WiFi module 470 is shown, but it is understood that it is not an essential component of a smartphone and can be omitted as needed without changing the nature of the invention.

[0163] The processor 480 is the control center of the smartphone, connecting various parts of the smartphone 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 420, and by calling data stored in the memory 420, thereby providing overall monitoring of the smartphone. Optionally, the processor 480 may include one or more processing units; optionally, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 480.

[0164] The smartphone also includes a power supply 490 (such as a battery) that supplies power to various components. Optionally, the power supply can be logically connected to the processor 480 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0165] Although not shown, smartphones may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0166] The steps performed by the route planning device in the above embodiments can be based on this Figure 9 The terminal device structure is shown.

[0167] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described in the foregoing embodiments.

[0168] This application also provides a computer program product including a program, which, when run on a computer, causes the computer to perform the methods described in the foregoing embodiments.

[0169] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0170] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0172] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0174] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A route planning method, characterized in that, include: Obtain feature information of N candidate routes, wherein the N candidate routes have the same start point, end point and departure time, and N is an integer greater than 1; The feature information of the N candidate routes is sequentially processed through an arrival time prediction model and a ranking model to obtain the arrival time information and ranking information of the N candidate routes. The arrival time prediction model is trained from a first training sample set using a first target model, and the ranking model is trained from a second training sample set using a second target model. The input data of the second target model includes the output data of the first target model, enabling collaborative training between the first and second target models. The loss values ​​of the second and first target models are used to inversely adjust the network parameters of the first target model to obtain the arrival time prediction model, and the loss values ​​of the second target model are used to inversely adjust the network parameters of the second target model to obtain the ranking model. The first and second training sample sets are obtained by extracting features from sample pairs constructed from historical routes and candidate routes of those historical routes. The target route is determined based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes.

2. The method according to claim 1, characterized in that, The feature information of the N candidate routes obtained includes: Obtain the segment sequence of each of the N candidate routes to obtain N sets of segment sequences; Obtain the feature matrix of each of the N road segment sequences. The feature matrix includes at least the basic attribute features, historical speed features, and road condition features before the departure time of the candidate route for each road segment sequence. Obtain the overall features of each candidate route among the N candidate routes. The overall features include at least the basic attribute features of the entire route, the speed features of each segment of the route, and the road condition features of the entire route. The overall features and the feature matrix are used as the feature information.

3. The method according to claim 1, characterized in that, The sorting model and the arrival time prediction model are deployed independently on different servers.

4. The method according to claim 1, characterized in that, The step of determining the target route based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes includes: In response to the user's click operation on the option control corresponding to the route navigation, M recommended routes are recommended based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes. The M recommended routes are used as the target routes, where M is a positive integer less than or equal to N.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the first training sample set and the second training sample set; The first training sample set is passed through the first target model to obtain a first output result. The first output result includes the predicted arrival time and other output results, which are used to indicate the ranking characteristics of the first training sample set. The first loss of the first target model is calculated based on the predicted arrival time and the actual arrival time corresponding to the first training sample set. The first output result and the second training sample set are used to obtain the predicted score through the second target model; The second loss of the second target model is calculated based on the predicted score and the real routes in the second training sample set; The ranking model is obtained by adjusting the parameters of the second target model in reverse based on the second loss; The arrival time prediction model is obtained by adjusting the parameters of the first target model in reverse based on the first loss and the second loss.

6. The method according to claim 5, characterized in that, The step of obtaining the first training sample set and the second training sample set includes: Obtain the historical route and the corresponding P alternative routes, where P is an integer greater than or equal to 1; A sample pair set comprising P sample pairs is constructed based on the historical route and the P alternative routes. Each sample pair in the sample pair set includes the historical route and one alternative route from the P alternative routes. Feature extraction is performed on each sample pair in the sample pair set to obtain the feature information of each sample pair; The feature information of each sample pair is combined with the actual arrival time of the historical route in the sample pair to generate a training sample, and the training samples corresponding to each sample pair are summarized to obtain the training set. The first training sample set and the second training sample set are obtained by sampling from the training set.

7. The method according to claim 6, characterized in that, The first training sample set and the second training sample set include the same training samples; or, the first training sample set and the second training sample set are different subsets of the training set.

8. A route planning device, characterized in that, include: The acquisition module is used to acquire feature information of N candidate routes, wherein the N candidate routes have the same start point, end point and departure time, and N is an integer greater than 1; The processing module is used to sequentially process the feature information of the N candidate routes through an arrival time prediction model and a ranking model to obtain the arrival time information and ranking information of the N candidate routes. The arrival time prediction model is trained from a first training sample set using a first target model, and the ranking model is trained from a second training sample set using a second target model. The input data of the second target model includes the output data of the first target model, enabling the first target model and the second target model to be trained collaboratively. The loss value of the second target model and the loss value of the first target model are used to inversely adjust the network parameters of the first target model to obtain the arrival time prediction model, and the loss value of the second target model is used to inversely adjust the network parameters of the second target model to obtain the ranking model. The first training sample set and the second training sample set are obtained by feature extraction from sample pairs constructed from historical routes and candidate routes of the historical routes. The determination module is used to determine the target route based on the sorting information of the N candidate routes and the arrival time information of the N candidate routes.

9. A computer device, characterized in that, include: Memory, processor, and bus system; The memory is used to store programs; The processor is configured to execute a program in the memory, and the processor is configured to execute the method of any one of claims 1 to 7 according to instructions in the program code; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

10. A computer-readable storage medium comprising instructions, when executed on a computer, causing the computer to perform the method as claimed in any one of claims 1 to 7.

11. A computer program product, characterized in that, The computer program product includes computer instructions, which a processor of a computer device executes to cause the computer device to perform the method as described in any one of claims 1 to 7.