Method, apparatus, device, medium and program product for route planning
Through the generative model, the intersection sequence planning routes based on historical route training, the problem of inaccurate route planning in the existing technology is solved, and the user experience and planning efficiency of the navigation system are improved.
Patent Information
- Application Number
- CN202410390464.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-01
- Publication Date
- 2025-07-18
AI Technical Summary
The existing route planning methods are difficult to accurately generate routes that fit the user's historical driving trajectory, resulting in inaccurate calculation of navigation broadcasts and estimated time, and the route cannot be effectively planned when the high-heat route changes.
A generative model is adopted to train a generative model based on the intersection sequence of multiple historical routes, and a candidate intersection sequence is generated through prompt word information, and then the route is planned.
It improves the rationality and efficiency of route planning, enhances user experience, and ensures that reasonable routes can still be generated under changing high-heat routes.
Smart Images

Figure CN120333430A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and particularly to a method, apparatus, device, computer-readable storage medium, and computer program product for route planning. Background Art
[0002] In a navigation scenario, after a user inputs a starting point and an ending point, the system often needs to plan one or more reasonable routes for user navigation announcements, calculation of the estimated arrival time, and display of information such as road conditions on the route. Generally, the more the planned route conforms to the historical actual driving trajectory, the higher the acceptance of the planned route by users and the more reasonable the route. Correspondingly, functions based on the route such as navigation announcements and estimated time calculation will also be more accurate. Summary of the Invention
[0003] In a first aspect of the present disclosure, there is provided a method for route planning. The method includes: receiving a route planning request that indicates a starting point and an ending point; determining, based on the starting point and the ending point, prompt word information for a trained generative model, the prompt word information at least indicating a starting intersection corresponding to the starting point and an ending intersection corresponding to the ending point, the generative model being trained based on a plurality of sample intersection sequences corresponding to a plurality of historical routes, each sample intersection sequence corresponding to a historical route indicating each intersection on the historical route; generating at least one candidate intersection sequence by providing at least the prompt word information to the generative model, each intersection sequence indicating a set of intersections passed from the starting intersection to the ending intersection and the order between each intersection; and providing at least one candidate route for the route planning request based on the at least one candidate intersection sequence.
[0004] In a second aspect of the present disclosure, there is provided an apparatus for route planning. The apparatus includes: a request receiving module configured to receive a route planning request that indicates a starting point and an ending point; a prompt word determining module configured to determine, based on the starting point and the ending point, prompt word information for a trained generative model, the prompt word information at least indicating a starting intersection corresponding to the starting point and an ending intersection corresponding to the ending point, the generative model being trained based on a plurality of sample intersection sequences corresponding to a plurality of historical routes, each sample intersection sequence corresponding to a historical route indicating each intersection on the historical route; a candidate intersection generating module configured to generate at least one candidate intersection sequence by providing at least the prompt word information to the generative model, each intersection sequence indicating a set of intersections passed from the starting intersection to the ending intersection and the order between each intersection; and a route providing module configured to provide at least one candidate route for the route planning request based on the at least one candidate intersection sequence.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. The instructions, when executed by the at least one processing unit, cause the device to perform the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, and the computer program is executable by a processor to implement the method of the first aspect.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided. The computer program product includes computer-executable instructions that, when executed by a processor, implement the method of the first aspect.
[0008] It should be understood that the content described in the present invention content section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A flowchart showing the architecture of a generative model for route planning according to some embodiments of the present disclosure;
[0012] Figure 3 A flowchart showing the process of route inference based on a generative model according to some embodiments of the present disclosure;
[0013] Figure 4 A flowchart showing the process of route planning according to some embodiments of the present disclosure;
[0014] Figure 5 A block diagram showing a device for route planning according to some embodiments of the present disclosure; and
[0015] Figure 6 A block diagram showing an electronic device capable of implementing one or more embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and its similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". There may also be other explicit and implicit definitions hereinafter. The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.
[0018] The embodiments of the present disclosure may involve the user's data, data acquisition and / or use, etc. These aspects all comply with the corresponding laws, regulations and related provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user is aware and confirms. Accordingly, when implementing the embodiments of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained through appropriate means according to the relevant laws and regulations. The specific informing and / or authorization methods may vary according to the actual situation and application scenarios, and the scope of the present disclosure is not limited in this regard.
[0019] As used herein, the term "responsive to" represents a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the execution timing of the subsequent actions executed in response to the event or condition and the time when the event occurs or the condition is established are not necessarily strongly correlated. For example, in some cases, the subsequent actions can be executed immediately when the event occurs or the condition is established; while in other cases, the subsequent actions can be executed after a period of time after the event occurs or the condition is established.
[0020] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, for a given input, the corresponding output can be generated. The generation of the model can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes the input and provides the corresponding output by using multiple processing units. In this article, the "model" can also be referred to as "machine learning model", "machine learning network" or "network", and these terms can be used interchangeably in this article.
[0021] Generally, machine learning can roughly include three stages, namely the training stage, the testing stage, and the application stage (also known as the inference stage). In the training stage, a given model can be trained using a large amount of training data, continuously iterating and updating the parameter values until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered capable of learning the association from input to output (also known as the input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. Sometimes the testing stage can be incorporated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained from training and determine the corresponding model output.
[0022] In the navigation scenario, the accuracy and rationality of route planning are important for the user experience and the accuracy of various functions based on the route.
[0023] Common route planning methods usually model the drivable road network as a directed weighted graph, and planning a route is to search for the shortest route on the directed weighted graph. By designing the weights of the directed edges representing the line segments on the road network graph, different preferred routes can be obtained; another solution is the mining-based route storage solution: by mining a large number of historical trajectories offline, retaining the high-heat routes and storing them in the database; online, query the high-heat routes in the database based on the actual navigation start and end points as the planned route.
[0024] However, when planning a route through the shortest route search method, since the actual route taken by the user is difficult to simply be summarized as a single-dimensional requirement such as the shortest distance or the fastest time, it is difficult to plan the actual route taken by the user by designing the weights of the directed edges.
[0025] The mining-based solution based on historical actual trajectories clusters the historical actual trajectories according to the route start and end points, records the total number of historical times passed by each cluster, and uses the high-heat routes with a heat threshold greater than a certain value as the frequently traveled recall sources. This solution is restricted by the overall route quality and the clustering boundaries and parameters, and it is difficult to ensure the generation of globally optimal high-heat routes. And under the start and end points with relatively few historical trajectory data, high-heat routes cannot be generated. In addition, once the passability on the high-heat routes in the map database changes (such as a road closure), the route cannot be successfully planned either.
[0026] Embodiments of the present disclosure propose an improved route planning solution. According to various embodiments of the present disclosure, a route planning request is received, and the route planning request indicates a starting point and an ending point. Next, based on the starting point and the ending point, prompt word information of a trained generative model is determined, and the prompt word information can at least indicate a starting intersection corresponding to the starting point and an ending intersection corresponding to the ending point. Moreover, the generative model can be trained based on multiple sample intersection sequences corresponding to multiple historical routes, and each sample intersection sequence corresponding to a historical route indicates each intersection on that historical route. Then, by providing at least the prompt word information to the generative model, at least one candidate intersection sequence is generated, and each intersection sequence can indicate a set of intersections passed from the starting intersection to the ending intersection and the order between each intersection. Accordingly, based on at least one candidate intersection sequence, at least one candidate route for the route planning request is provided. In this way, embodiments of the present disclosure can effectively improve the rationality and planning efficiency of route planning, so that users can more conveniently select the required route, fully meet the user needs, and enhance the user experience.
[0027] Figure 1 FIG. shows a schematic diagram of an exemplary environment 100 in which embodiments of the present disclosure can be implemented. As Figure 1 shown, the environment 100 includes a terminal device 110 and a server device 120. The terminal device 110 can interact with the user 102 and receive a route planning request from the user 102. In some embodiments, the terminal device 110 can communicate with the server device 120 to send the route planning request to the server device 120, requesting the server device 120 to plan one or more routes based on the route planning request. In some embodiments, the terminal device 110 can perform route planning locally based on the route planning request.
[0028] The generated route can be presented to the user 102 via the user interface 112. In some embodiments, functions such as navigation announcements, calculation of estimated arrival times, and display of road conditions on the route can also be performed based on the generated route. Of course, embodiments of the present disclosure do not limit the display method and subsequent uses of the generated route.
[0029] In some embodiments, the user interface 112 can be provided by an application (APP) running on the terminal device 110. Such APPs can include, but are not limited to, map APPs, navigation APPs, taxi-hailing APPs, travel APPs, browser APPs, etc.
[0030] In some embodiments of the present disclosure, the server device 130 can provide a route planning service for the terminal device 120 by invoking the generative model 125. Although Figure 1Only a single generative model 125 is shown, but it will be understood that depending on the specific application requirements, there may be more models.
[0031] In some embodiments of the present disclosure, the server device 120 also needs to assist in generating a route planning service by means of an existing route planning (RP) service 122. The RP service 122 can plan a route based on a predetermined route planning algorithm, for example, by means of the shortest route search, to determine the shortest route from the starting point to the ending point.
[0032] In some embodiments, alternatively or additionally, the terminal device 110 can also access the generative model 125 and the RP service 122 to provide route planning for the user 102 locally without the need to request the assistance of the server device 120.
[0033] The specific use of the generative model 125 and the RP service 122 will be discussed in detail below. In the following, for the sake of convenience of discussion, the route planning scheme in the embodiments of the present disclosure will be described from the perspective of the server device 120, but it should be understood that some or all of the described operations can also be implemented at the terminal device 110.
[0034] The terminal device 120 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / cameras, television receivers, radio broadcast receivers, e-book devices, game devices or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 120 can also support any type of user interface (such as a "wearable" circuit, etc.). The server device 130 can be various types of computing systems / servers capable of providing computing capabilities, including but not limited to mainframes, edge computing nodes, computing devices in a cloud environment, and the like.
[0035] It should be understood that the environment described above with reference to Figure 1 is only exemplary and is not intended to limit the scope of the present disclosure.
[0036] Figure 2 A flowchart of an architecture 200 of a generative model for route planning according to some embodiments of the present disclosure is shown. For the convenience of discussion, these embodiments will be described with reference to Figure 1 the environment 100.
[0037] As Figure 2As shown, in architecture 200, generative model 125 includes a feature extraction network 205 and a Transformer (also known as a converter, which is a model structure based on the attention mechanism) decoder 210. During training, generative model 125 can receive information on the historical actual travel routes of a large number of users as input, and use the information on the historical actual travel routes to compress the road network into a directed graph at the intersection level. The trained generative model 125 can perform route prediction on the intersection-based road network.
[0038] Specifically, in some embodiments, the server device 120 can extract multiple intersections from multiple historical routes, and then construct a road network based at least on the extracted multiple intersections. In the road network, the multiple intersections can be indexed by corresponding identifiers (IDs) respectively, and the sample intersection sequence corresponding to each historical route can indicate the identifiers of the intersections on the historical route and the order between each intersection.
[0039] In Figure 2 it, the server device 120 can process the actual travel trajectories of the historical routes of a large number of users collected, such as cleaning noise and annotating data, so as to remove the routes with poor trajectory quality and obtain the extracted multiple intersections. The server device 120 can perform statistics on the road network topology data. For example, it can retain all intersection IDs (i.e., Linkids) with an out-degree >= 2 as the compressed road network. Then, based on the compressed road network, the server device 120 can encode the actual travel trajectory sequence into an ID sequence at the intersection level.
[0040] In the actual travel trajectory of the route, based on the start and end point information, prompt word information can be obtained. In some embodiments, the prompt word information also indicates at least one of the following: the first neighborhood information of the start intersection, the first neighborhood information at least indicating a subset of downstream intersections that can be directly reached from the start intersection or reached after passing a predetermined number of intersections, or the second neighborhood information of the end intersection, the second neighborhood information being able to directly reach the end intersection or reach an upstream intersection subset of the end intersection after passing a predetermined number of intersections. For example, for a second-order neighborhood, it should include the first-order intersections that can be directly reached, and the second-order intersections reached after passing "one" intersection. For the subset of downstream intersections, it can be the second-order downstream neighborhood of the start point. For the subset of upstream intersections, it can be the second-order downstream neighborhood of the end point.
[0041] Specifically, different from the design of prompt words in natural language, the embodiments of the present disclosure design a new type of prompt word based on the characteristics of the road network. It can obtain the upstream and downstream neighborhood information based on the start and end point information of the route, and can be concatenated with the start symbol and end symbol as the representation of the start and end point information, so as to generate the route with the highest probability under different start and end points during inference.
[0042] In some embodiments, the generative model 125 includes a language model (LM), such as a large language model (LLM). The constructed road network is used as the vocabulary of the large language model. The large language model is a deep learning model trained based on a vast amount of text data. It can not only generate natural language text but also deeply understand the meaning of the text and handle various natural language tasks, such as text summarization, question answering, translation, etc. In Figure 2 , through vocabulary encoding, an ID sequence at the intersection level (i.e., intersection sequence) can be obtained, and then the ID sequence at the intersection level can be vector-represented. For example, it can be represented as an embedding vector (shown as EMB in Figure 2 ), thus compressing the road network into a directed graph at the intersection level. Thereby, by using the compressed intersections as the vocabulary, it is beneficial to find the downstream intersections of the starting point and the upstream intersections of the ending point, and then facilitate predicting the probability of the topological intersections of the origin and destination, greatly reducing the prediction space.
[0043] Next, the Transformer decoder 210 uses the Transformer structure and the multi-layer self-attention mechanism to model the correlation between the route start and end points and the historical actual travel trajectory sequence based on the directed graph at the intersection level. When modeling, the actual travel trajectory can be encoded as a sequence at the intersection level, and then the downstream intersections of each intersection can be learned as a classification problem.
[0044] Specifically, for the directed graph at the intersection level, first, layer normalization (211) is performed to obtain the Q vector of the linear layer 212, the K vector of the linear layer 213, and the V vector of the linear layer 214, respectively. Then, the Q vector, K vector, and V vector are respectively input into the masked (with mask) multi-head attention layer 216. In addition, the prompt word is concatenated with the encoded actual travel intersection sequence as the word encoding for model training. Different from the absolute position encoding method directly added to the embedding vector, by adding the relative position encoding vector matrix 215 to the masked multi-head attention layer 216, the relative position encoding (e.g., Alibi encoding) method is adopted to represent the sequence position relationship, which can improve the model extrapolation while saving video memory.
[0045] Next, the result obtained by the masked multi-head attention layer 216 is combined with the directed graph at the intersection level, and layer normalization (217) is performed together. Next, the result obtained by layer normalization (217) is input into the fully connected layer 218. Then, the result obtained by the multi-head attention layer 216 and the result obtained by the fully connected layer 218 are combined as the output result of the Transformer decoder 210, and this output result is output (232).
[0046] It should be understood that Figure 2Only an example model structure of the generative model 125 is shown. In practical applications, there are various variations in the model structures of the generative model 125 or the language model. Any currently existing or future-developed model variations can be applied, and the embodiments of the present disclosure do not make specific limitations thereto.
[0047] Thus, using the Transformer architecture, the input sequence passes through multiple layers of multi-head attention mechanisms and fully connected layers to learn the correlation between the start and end point information and the corresponding actual travel sequence, and predict the probability distribution downstream of each intersection. Compared with the need to calculate the softmax (an activation function for multi-class classification problems, usually used in the output layer of neural networks) probabilities for all words in the vocabulary in natural language, in this solution, the compressed intersections are used as the vocabulary, and when making predictions, only the probability values need to be calculated among the topological downstream intersections, greatly reducing the prediction space and improving the prediction accuracy and calculation efficiency.
[0048] In some embodiments, during the training process of the generative model 125, for a given historical route among multiple historical routes, sample prompt word information is generated based on a partial sequence in the sample intersection sequence of the given historical route, and the sample prompt word information indicates some intersections in the given historical route. Then, the generative model 125 being trained is used to predict the probabilities of each downstream intersection based on the partial intersections. And, based on the prediction error between the predicted probabilities of each downstream intersection and the actual downstream intersections after the partial intersections in the historical route, the generative model 125 is updated.
[0049] Continue to refer to Figure 2 , in the training process 230, each time a partial intersection (such as intersection X) of a historical route is given, and the generative model 125 is made to calculate the probability values (234) of the candidate downstream intersections corresponding to the partial intersection. Specifically, the softmax function and the minimization of the loss function 236 (such as the cross-entropy loss function) can be used to optimize the generative model 125 to minimize the prediction error, thereby updating the generative model 125. In the prediction process 240, the probabilities of the candidate downstream intersections corresponding to intersection X can be sampled (242), and then the prediction result of the route can be obtained based on the sampling result (244).
[0050] Based on this, during the inference phase of the generative model 125, the server device 120 can receive a route planning request that indicates a starting point and an ending point. In some embodiments, for each of the at least one planned route from the starting point to the ending point, each planned route can include one or more intersections. Then, based on the starting point and the ending point, the server device 120 can determine the prompt information of the trained generative model 125, where the prompt information at least indicates the starting intersection corresponding to the starting point and the ending intersection corresponding to the ending point, such as intersection IDs. As described above, the generative model 125 is trained based on multiple sample intersection sequences corresponding to multiple historical routes. At this time, the sample intersection sequence corresponding to each historical route indicates each intersection on that historical route. Next, the server device 120 can generate at least one candidate intersection sequence by providing at least the prompt information to the generative model 125, where each intersection sequence indicates the set of intersections passed from the starting intersection to the ending intersection and the order between each intersection. Accordingly, based on the at least one candidate intersection sequence, at least one candidate route for the route planning request is provided.
[0051] Thus, inspired by the pre-training method of the generative model 125 in natural language, it is migrated to the new scenario of route generation. The actual walking trajectory sequence is regarded as text, and through prompt design, the context correlation information between the starting and ending points and the corresponding actual walking routes is learned. By using the compressed intersections as the vocabulary, it is only necessary to calculate the probability values among its topological downstream intersections, which greatly reduces the prediction space and improves the prediction accuracy and calculation efficiency.
[0052] In some embodiments, when performing route prediction, the generative model 125 can be called multiple times to predict the next intersection, and the route is serially generated for each intersection based on the forward sequence information of the intersections that have been predicted for a route. That is, at each decision intersection, the probability values of the downstream candidate intersections are calculated, and the downstream with the highest probability is selected to generate the route that best conforms to the user's historical behavior under the current starting and ending points. In this way, under the starting and ending points without high-heat historical trajectories, by using the generalization ability of the generative model 125, the route with the highest actual walking probability can be gradually generated based on the prediction probability at the intersection level.
[0053] In some embodiments, to improve the route prediction efficiency, the inference process based on the generative model can also be improved, and the generative model 125 is called in parallel to obtain the route more quickly. Figure 3 FIG. shows a flowchart of a process 300 for route inference based on a generative model according to some embodiments of the present disclosure. The process 300 can be implemented in Figure 1 the environment 100. The process 300 needs to be implemented in combination with the architecture 200. In the process 300, with the help of the RP service 122 and the parallel call of the generative model 125 in route planning, the route inference speed is greatly improved.
[0054] As shown Figure 3 in the figure, the server device 120 can receive a route planning request (305), initialize the start and end intersection IDs based on the route planning request, and obtain the neighborhood information of the start and end points (310). Next, the server device 120 calls the RP service 122 (also referred to as the route planning service) based on the start intersection and the end intersection (315) to generate a first candidate intersection sequence (320). Specifically, after the start and end points are given, the RP service 122 can generate a first candidate intersection sequence between the start and end points (the corresponding route is sometimes also referred to as the RPv2 route) as the first exhibited route according to a predetermined route planning algorithm, such as the shortest route principle. Here, the RPv2 route refers to the route with the smallest weight among each route of the road network, and sometimes it can be the shortest route. For the RP service 122, if the start and end points are given, a RPv2 route will be generated first to connect the corresponding start and end points. Then, based on this start and end point, the server terminal device 120 can obtain all intersections, that is, an encoded information of the dictionary of the generative model 125.
[0055] Then, the server device 120 can determine the probability of each first candidate intersection in the first candidate intersection sequence as a downstream intersection from the start intersection by providing at least the prompt word information and each first candidate intersection of the first candidate intersection sequence to the generative model 125. Specifically, the server device 120 can call the generative model 125, input the prompt word and the candidate route intersection sequence, obtain the vector representation of the forward sequence of each intersection, calculate the similarity information with the downstream candidate intersection representation vector, and obtain the transfer probability of each intersection after normalization.
[0056] Next, based on the probability of each first candidate intersection in the first candidate intersection sequence as a downstream intersection, the server device 120 can select at least one first candidate intersection as a candidate for the downstream intersection. For example, the TOP-K (K = preset number) downstream intersections can be selected as at least one first candidate intersection. Correspondingly, based on the at least one first candidate intersection selected, the server device 120 can determine at least one candidate intersection sequence.
[0057] In some embodiments, given the starting and ending points, after the first candidate intersection sequence (320) generated by invoking the RP service 122, the server device 120 may determine whether the number of generated route sets has reached the maximum number (370). If the number of generated route sets has not reached the maximum number, the candidate route corresponding to the candidate intersection sequence may be determined and added to the candidate route set (375). If the number of generated route sets has reached the maximum number, the candidate route set may be returned to the user 102. Therefore, the route corresponding to the first candidate intersection sequence may be first presented to the user 102 as the first presented route. After generating candidate routes by invoking the generative model 125 subsequently, they may be presented to the user 102 by replacing or together with the first presented route.
[0058] In some embodiments, when determining at least one candidate intersection sequence based on at least one selected first candidate intersection, the server device 120 may perform multiple rounds of iteration. In each round of iteration, the server device 120 may determine at least one second intersection sequence by invoking a route planning service based on the starting intersection, at least one given candidate intersection, and the ending intersection, where the at least one given candidate intersection includes at least one selected first candidate intersection or a candidate selected as a downstream intersection in the previous round of iteration. For example, in the second invocation, the at least one given candidate intersection may include the first candidate intersection selected in the above embodiment. In the third invocation, the at least one given candidate intersection may be the candidate intersection selected in the second invocation. Then, the server device 120 may determine the probability of each candidate intersection in the at least one second candidate intersection sequence as a downstream intersection starting from the starting intersection by providing at least the prompt word information and each candidate intersection in the at least one second candidate intersection sequence to the generative model 125. Based on the probability of each candidate intersection in the first candidate intersection set as a downstream intersection, the server device 120 may select at least one candidate intersection as a candidate for the downstream intersection. Accordingly, the server device 120 may determine the at least one second intersection sequence determined in multiple rounds of iteration as the at least one candidate intersection sequence. It should be understood that the specific number of iterations may be pre-configured.
[0059] For example, in the first round of iteration, by invoking the RP service 122, it is determined that the second candidate intersection sequence includes intersections A1, A2, and A3. Then, in the second round of iteration, the prompt word information and intersections A1, A2, and A3 may be directly provided to the generative model 125 to determine the probability of intersections A1, A2, and A3 as downstream intersections starting from the starting intersection. Thus, the number of times of invoking the generative model 125 can be effectively reduced, greatly improving the route finding efficiency.
[0060] Continue to refer to Figure 3A description will be given. After generating the candidate intersection sequence (320), the server device 120 can traverse the candidate intersection sequence to obtain all intersections (325), and then determine whether a certain intersection has been detected (330). If a certain intersection has been detected, the intersection is deleted from the candidate intersection set (335). If the intersection has not been detected, it is added to the candidate intersection set (340). Further, the generative model 125 can be called in parallel at the route level based on the candidate intersections in the candidate intersection set. By calling the generative model 125 to perform downstream intersection prediction, for each candidate intersection, the probabilities of all downstream intersections of the candidate intersection can be obtained (350).
[0061] Specifically, in some embodiments, when determining the probabilities of each candidate intersection in at least one second candidate intersection sequence as downstream intersections starting from the starting intersection, the server device 120 can filter out the intersections that overlap starting from the starting intersection from at least one second candidate intersection sequence to obtain a filtered candidate intersection set. Then, the server device 120 can determine the probabilities of each candidate intersection in at least one second candidate intersection sequence as downstream intersections starting from the starting intersection by providing at least the prompt word information and the filtered candidate intersection set to the generative model 125.
[0062] Therefore, by filtering the explored intersections, unexplored branches can be obtained in the downstream direction of the unexplored intersections in the newly generated road section and placed in the unexplored branch pool. The explored intersections refer to the intersections corresponding to the common road sections that overlap starting from the starting intersection among all intersections.
[0063] Thus, for the candidate intersections, by parallelly calling the generative model 125, the probabilities at each intersection in multiple routes can be obtained simultaneously, ensuring that at least multiple routes are generated within a given recall time, greatly enhancing the diversity of the recalled routes.
[0064] Still referring to Figure 3 , in the unexplored branch pool, the intersections can be sorted in descending order according to the normalized probabilities within the intersections, and the TOP-K downstream intersections are selected as the starting points of the RP service 122 (355), and then the RP service 122 is called to obtain new candidate routes. In the case of parallelly calling the generative model 125, it is determined whether the unexplored branch pool is empty, and the parallel call to the generative model 125 stops. After selecting the TOP-K downstream intersections, it is determined whether the maximum progressive call depth is reached (360). If the maximum progressive call depth is reached, the route finding stops (365). If the maximum progressive call depth is not reached, the call to the RP service 315 is continued (315). At this time, based on the starting and ending points, and using the intersections selected in the previous round (and possibly previous rounds), the candidate intersection sequence is continued to be generated (320).
[0065] In some embodiments, at least one candidate intersection sequence includes multiple candidate intersection sequences, and during the process of generating the multiple candidate intersection sequences, the generative model 125 determines the probability of each intersection other than the starting intersection and the ending intersection in the multiple candidate sequences as a downstream intersection. At this time, when providing at least one candidate route package for a route planning request, for each candidate intersection sequence among the multiple candidate intersection sequences, the server device 120 may determine the confidence score of the candidate intersection sequence based on the probability of each intersection other than the starting intersection and the ending intersection in the candidate intersection sequence as a downstream intersection. Then, based on the sorting of the confidence scores of the multiple candidate intersection sequences, the server device 120 may select at least one candidate intersection sequence from the multiple candidate intersection sequences for generating at least one candidate route.
[0066] That is to say, after the pathfinding is terminated, the candidate routes can be sorted in descending order according to the cumulative values of the probabilities of all intersections of the route returned by the generative model 125, and the candidate routes can be packaged and returned as the recall source. In some embodiments, the confidence score of the candidate intersection sequence may be the cumulative value of the probabilities of all intersections of the route returned by the generative model 125.
[0067] Thus, through Figure 3 the proposed solution to achieve parallel calls, it is possible to obtain the probabilities at each intersection of multiple routes simultaneously, ensure that at least multiple routes are generated within a given recall time, and reduce the number of calls to the model service. Compared with the recall method that directly generates routes serially for each intersection based on Figure 2 the forward sequence information, this solution can greatly improve the pathfinding efficiency and the diversity of recalled routes, and the planning efficiency is also very high even under high-heat route planning requirements.
[0068] Figure 4 FIG. shows a flowchart of a route planning process 400 according to some embodiments of the present disclosure. The process 400 may be implemented at the server device 120. The process 400 may be implemented in Figure 1 the environment 100, for example, implemented at Figure 1 the server device 120 or the terminal device 110 of
[0069] As Figure 4 shown, at block 410, the server device 120 receives a route planning request, and the route planning request indicates a starting point and an ending point.
[0070] At block 420, based on the starting point and the ending point, the server device 120 determines the prompt information of the trained generative model, and the prompt information can at least indicate the starting intersection corresponding to the starting point and the ending intersection corresponding to the ending point. Moreover, the generative model can be trained based on multiple sample intersection sequences corresponding to multiple historical routes, and each sample intersection sequence corresponding to a historical route indicates each intersection on that historical route.
[0071] At block 430, by providing at least the prompt information to the generative model, the server device 120 can generate at least one candidate intersection sequence, and each intersection sequence can indicate the set of intersections passed from the starting intersection to the ending intersection and the order between each intersection.
[0072] At block 440, based on at least one candidate intersection sequence, the server device 120 can provide at least one candidate route for the route planning request.
[0073] In some embodiments, the prompt information further indicates at least one of the following: the first neighborhood information of the starting intersection, the first neighborhood information at least indicating the subset of downstream intersections that can be directly reached from the starting intersection or reached after passing a predetermined number of intersections, or the second neighborhood information of the ending intersection, the second neighborhood information being the subset of upstream intersections that can directly reach the ending intersection or reach the ending intersection after passing a predetermined number of intersections.
[0074] In some embodiments, the server device 120 can extract multiple intersections from multiple historical routes and construct a road network based at least on the extracted multiple intersections. In the road network, the multiple intersections are respectively indexed by corresponding identifiers. Each sample intersection sequence corresponding to a historical route indicates the identifiers of the intersections on that historical route and the order between each intersection.
[0075] In some embodiments, the generative model includes a large language model, and the road network is used as the vocabulary of the large language model.
[0076] In some embodiments, when training the generative model, for a given historical route among multiple historical routes, the server device 120 can generate sample prompt information based on a partial sequence in the sample intersection sequence of the given historical route, and the sample prompt information indicates partial intersections in the given historical route. Then, the generative model being trained is used to predict the probabilities of each downstream intersection based on the partial intersections. Correspondingly, based on the prediction error between the predicted probabilities of each downstream intersection and the true downstream intersections after the partial intersections in the historical route, the generative model is updated.
[0077] In some embodiments, when generating at least one candidate intersection sequence by at least providing prompt information to a generative model, the server device 120 may determine a first candidate intersection sequence by invoking a route planning service based on the starting intersection and the ending intersection. And the server device 120 may determine the probability that each first candidate intersection in the first candidate intersection sequence is a downstream intersection starting from the starting intersection by at least providing the prompt information and each first candidate intersection in the first candidate intersection sequence to the generative model. Then, based on the probability that each first candidate intersection in the first candidate intersection sequence is a downstream intersection, the server device 120 may select at least one first candidate intersection as a candidate for the downstream intersection. Accordingly, based on the at least one first candidate intersection selected, the server device 120 may determine at least one candidate intersection sequence.
[0078] In some embodiments, when determining at least one candidate intersection sequence based on the at least one first candidate intersection selected, in each round of multiple rounds of iteration, the server device 120 may determine at least one second intersection sequence by invoking a route planning service based on the starting intersection, at least one given candidate intersection, and the ending intersection. The at least one given candidate intersection includes the at least one first candidate intersection selected or the candidate selected as the downstream intersection candidate in the previous round of iteration. By at least providing the prompt information and each candidate intersection in the at least one second candidate intersection sequence to the generative model, the server device 120 may determine the probability that each candidate intersection in the at least one second candidate intersection sequence is a downstream intersection starting from the starting intersection. Then, based on the probability that each candidate intersection in the first candidate intersection set is a downstream intersection, the server device 120 may select at least one candidate intersection as a candidate for the downstream intersection. Accordingly, the server device 120 may determine the at least one second intersection sequence determined in multiple rounds of iteration as at least one candidate intersection sequence.
[0079] In some embodiments, when determining the probability that each candidate intersection in the at least one second candidate intersection sequence is a downstream intersection starting from the starting intersection, the server device 120 may filter out the overlapping intersections starting from the starting intersection from the at least one second candidate intersection sequence to obtain a filtered candidate intersection set. Then, the server device 120 may determine the probability that each candidate intersection in the at least one second candidate intersection sequence is a downstream intersection starting from the starting intersection by at least providing the prompt information and the filtered candidate intersection set to the generative model.
[0080] In some embodiments, at least one candidate intersection sequence includes a plurality of candidate intersection sequences, and the server device 120 may determine, during the process of generating the plurality of candidate intersection sequences, the probability of each intersection other than the starting intersection and the ending intersection in the plurality of candidate sequences as a downstream intersection by means of a generative model. And when providing at least one candidate route for the route planning request based on at least one candidate intersection sequence, for each candidate intersection sequence among the plurality of candidate intersection sequences, the server device 120 may determine the confidence score of the candidate intersection sequence based on the probability of each intersection other than the starting intersection and the ending intersection in the candidate intersection sequence as a downstream intersection. Accordingly, based on the ranking of the confidence scores of the plurality of candidate intersection sequences, the server device 120 may select at least one candidate intersection sequence from the plurality of candidate intersection sequences for generating at least one candidate route.
[0081] Thus, through process 400, the rationality and efficiency of route planning can be effectively improved, enabling users to more conveniently select the required route, fully meeting the user's needs, and enhancing the user experience.
[0082] Figure 5 FIG. shows a schematic structural block diagram of a device 500 for route planning according to certain embodiments of the present disclosure. The device 500 may be implemented as or included in the server device 120. Each module / component in the device 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0083] As Figure 5 shown, the device 500 includes a request receiving module 510 configured to receive a route planning request that indicates a starting point and an ending point. The device 500 further includes a prompt word determining module 520 configured to determine, based on the starting point and the ending point, the prompt word information of a trained generative model, the prompt word information at least indicating the starting intersection corresponding to the starting point and the ending intersection corresponding to the ending point, and the generative model is trained based on a plurality of sample intersection sequences corresponding to a plurality of historical routes, and each sample intersection sequence corresponding to a historical route indicates each intersection on the historical route. The device 500 also includes a candidate intersection generating module 530 configured to generate at least one candidate intersection sequence by at least providing the prompt word information to the generative model, and each intersection sequence indicates a set of intersections passed from the starting intersection to the ending intersection and the order between each intersection. In addition, the device 500 further includes a route providing module 540 configured to provide at least one candidate route for the route planning request based on at least one candidate intersection sequence.
[0084] In some embodiments, the prompt information further indicates at least one of the following: the first neighborhood information of the starting intersection, the first neighborhood information indicating at least a subset of downstream intersections that can be directly reached from the starting intersection or reached after passing a predetermined number of intersections, or the second neighborhood information of the ending intersection, the second neighborhood information indicating a subset of upstream intersections that can directly reach the ending intersection or reach the ending intersection after passing a predetermined number of intersections.
[0085] In some embodiments, the device 500 further includes a road network construction module configured to extract a plurality of intersections from a plurality of historical routes and construct a road network based at least on the extracted plurality of intersections. In the road network, the plurality of intersections are respectively indexed by corresponding identifiers, and the sample intersection sequence corresponding to each historical route indicates the identifiers of the intersections on the historical route and the order between each intersection.
[0086] In some embodiments, the generative model includes a large language model, and the road network is used as the vocabulary of the large language model.
[0087] In some embodiments, the device 500 further includes a generative model training module configured to, for a given historical route among the plurality of historical routes, generate sample prompt information based on a partial sequence in the sample intersection sequence of the given historical route, the sample prompt information indicating partial intersections in the given historical route; use the generative model being trained to predict the probabilities of each downstream intersection based on the partial intersections; and update the generative model based on the prediction error between the predicted probabilities of each downstream intersection and the true downstream intersections after the partial intersections in the historical route.
[0088] In some embodiments, the candidate intersection generation module 530 is further configured to determine a first candidate intersection sequence by invoking a route planning service based on the starting intersection and the ending intersection; determine the probabilities of each first candidate intersection in the first candidate intersection sequence as downstream intersections from the starting intersection by providing at least the prompt information and each first candidate intersection of the first candidate intersection sequence to the generative model; select at least one first candidate intersection as a candidate for the downstream intersection based on the probabilities of each first candidate intersection in the first candidate intersection sequence as the downstream intersection; and determine at least one candidate intersection sequence based on the selected at least one first candidate intersection.
[0089] In some embodiments, the candidate intersection generation module 530 includes an iteration module configured to perform the following operations in each round of multiple rounds of iteration: determine at least one second intersection sequence by invoking a route planning service based on a starting intersection, at least one given candidate intersection, and an ending intersection, where the at least one given candidate intersection includes at least one selected first candidate intersection or a candidate that was selected as a downstream intersection in the previous round of iteration; determine the probability of each candidate intersection in the at least one second candidate intersection sequence being a downstream intersection starting from the starting intersection by providing at least the prompt word information and each candidate intersection in the at least one second candidate intersection sequence to a generative model; and select at least one candidate intersection as a candidate for a downstream intersection based on the probability of each candidate intersection in the first candidate intersection set being a downstream intersection; determine the at least one second intersection sequence determined in multiple rounds of iteration as at least one candidate intersection sequence.
[0090] In some embodiments, the iteration module includes a probability determination module configured to filter out overlapping intersections starting from the starting intersection from the at least one second candidate intersection sequence to obtain a filtered set of candidate intersections; and determine the probability of each candidate intersection in the at least one second candidate intersection sequence being a downstream intersection starting from the starting intersection by providing at least the prompt word information and the filtered set of candidate intersections to a generative model.
[0091] In some embodiments, the at least one candidate intersection sequence includes multiple candidate intersection sequences, and during the process of generating the multiple candidate intersection sequences, the generative model determines the probability of each intersection other than the starting intersection and the ending intersection in the multiple candidate sequences being a downstream intersection, and the route providing module 540 is further configured to, for each candidate intersection sequence in the multiple candidate intersection sequences, determine the confidence score of the candidate intersection sequence based on the probability of each intersection other than the starting intersection and the ending intersection in the candidate intersection sequence being a downstream intersection; and select at least one candidate intersection sequence from the multiple candidate intersection sequences for generating at least one candidate route based on the ranking of the confidence scores of the multiple candidate intersection sequences.
[0092] The units and / or modules included in apparatus 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to the machine-executable instructions, some or all of the units and / or modules in apparatus 600 can be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0093] Figure 6 FIG. shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure can be implemented. It should be understood that Figure 6 the illustrated electronic device 600 is merely exemplary and should not constitute any limitation on the functions and scope of the embodiments described herein. Figure 6 The illustrated electronic device 600 can be used to implement Figure 1 the terminal device 110 or the server device 120.
[0094] As Figure 6 shown, the electronic device 600 is in the form of a general-purpose computing device. The components of the electronic device 600 can include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 can be an actual or virtual processor and is capable of performing various processes according to the programs stored in the memory 620. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing ability of the electronic device 600.
[0095] The electronic device 600 generally includes multiple computer storage media. Such media can be any accessible media that can be obtained by the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (such as registers, caches, random access memory (RAM)), a non-volatile memory (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a magnetic disk, or any other medium that can be used to store information and / or data (such as training data for training) and can be accessed within the electronic device 600.
[0096] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in Figure 6 , a disk drive for reading from and writing to a removable, non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading from and writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform the various methods or actions of the various embodiments of the present disclosure.
[0097] The communication unit 640 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the electronic device 600 may be implemented in a single computing cluster or multiple computer machines that are capable of communicating via a communication connection. Thus, the electronic device 600 may operate in a networked environment using a logical connection to one or more other servers, network personal computers (PCs), or another network node.
[0098] The input device 650 may be one or more input devices such as a mouse, keyboard, trackball, etc. The output device 660 may be one or more output devices such as a display, speaker, printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) as needed via the communication unit 640, such as a storage device, a display device, etc., communicate with one or more devices that enable a user to interact with the electronic device 600, or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0099] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, where the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, the computer program product being tangibly stored on a non-transitory computer-readable medium and including computer-executable instructions, and the computer-executable instructions being executed by a processor to implement the method described above.
[0100] Aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0101] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when the instructions are executed by the processing unit of the computer or other programmable data processing apparatus, an apparatus is created that implements the functions / acts specified in one or more boxes of the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that causes a computer, a programmable data processing apparatus, and / or other devices to operate in a particular manner, such that the computer-readable medium storing the instructions comprises a manufacture including instructions that implement various aspects of the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0102] The computer-readable program instructions may be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other devices implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0103] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various implementations of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, and the module, segment of code, or portion of an instruction includes one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the boxes may occur out of the order noted in the figures. For example, two consecutive boxes may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each box of the block diagrams and / or flowcharts, and combinations of boxes in the block diagrams and / or flowcharts, can be implemented by special-purpose hardware-based systems that perform the specified functions or acts, or by combinations of special-purpose hardware and computer instructions.
[0104] The various implementations of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The choice of terms used herein is intended to best explain the principles of the implementations, the practical application, or improvements made to the technology in the marketplace, or to enable other ordinary skilled artisans in the art to understand the various implementations disclosed herein.
Claims
1. A method for route planning, comprising: Receiving a route planning request, the route planning request indicating a starting point and an ending point; Based on the starting point and the ending point, determining prompt information for a trained generative model, the prompt information at least indicating a starting intersection corresponding to the starting point and an ending intersection corresponding to the ending point, the generative model being trained based on multiple sample intersection sequences corresponding to multiple historical routes, and each sample intersection sequence corresponding to a historical route indicating each intersection on the historical route; Generating at least one candidate intersection sequence by at least providing the prompt information to the generative model, each intersection sequence indicating a set of intersections passed from the starting intersection to the ending intersection and the order between each intersection; And Based on the at least one candidate intersection sequence, providing at least one candidate route for the route planning request.
2. The method according to claim 1, wherein the prompt information further indicates at least one of the following: First neighborhood information of the starting intersection, the first neighborhood information at least indicating a subset of downstream intersections that can be directly reached from the starting intersection or reached after passing a predetermined number of intersections, or Second neighborhood information of the ending intersection, the second neighborhood information being a subset of upstream intersections that can directly reach the ending intersection or reach the ending intersection after passing a predetermined number of intersections.
3. The method according to claim 1, further comprising: Extracting a plurality of intersections from the plurality of historical routes; And Constructing a road network based at least on the extracted plurality of intersections, wherein the plurality of intersections in the road network are respectively indexed by corresponding identifiers, and Wherein each sample intersection sequence corresponding to a historical route indicates the identifiers of the intersections on the historical route and the order between each intersection.
4. The method according to claim 1, wherein the generative model includes a large language model, and the road network is used as a vocabulary of the large language model.
5. The method according to claim 1, wherein the training of the generative model comprises: For a given historical route among the plurality of historical routes, Generating sample prompt information based on a partial sequence in the sample intersection sequence of the given historical route, the sample prompt information indicating partial intersections in the given historical route; Using the generative model being trained to predict the probabilities of each downstream intersection based on the partial intersections; And Updating the generative model based on the prediction error between the predicted probabilities of each downstream intersection and the actual downstream intersections after the partial intersections in the historical route.
6. The method according to claim 1, wherein generating at least one candidate intersection sequence by at least providing the prompt information to the generative model includes: Determining a first candidate intersection sequence by invoking a route planning service based on the starting intersection and the ending intersection; Determining the probabilities of each first candidate intersection in the first candidate intersection sequence as downstream intersections starting from the starting intersection by at least providing the prompt information and each first candidate intersection of the first candidate intersection sequence to the generative model; Select at least one first candidate intersection as a candidate for the downstream intersection based on the probabilities of each first candidate intersection in the first candidate intersection sequence being the downstream intersection; and Determine the at least one candidate intersection sequence based on the at least one selected first candidate intersection.
7. The method according to claim 6, wherein determining the at least one candidate intersection sequence based on the at least one selected first candidate intersection includes: Performing the following operations in each round of multiple rounds of iteration, Determine at least one second intersection sequence by invoking the route planning service based on the starting intersection, at least one given candidate intersection, and the ending intersection, where the at least one given candidate intersection includes the at least one selected first candidate intersection or a candidate selected as the downstream intersection in the previous round of iteration; Determine the probabilities of each candidate intersection in the at least one second candidate intersection sequence being the downstream intersection starting from the starting intersection by providing at least the prompt word information and each candidate intersection in the at least one second candidate intersection sequence to the generative model; and Select at least one candidate intersection as a candidate for the downstream intersection based on the probabilities of each candidate intersection in the first candidate intersection set being the downstream intersection; Determine the at least one second intersection sequence determined in the multiple rounds of iteration as the at least one candidate intersection sequence.
8. The method according to claim 7, wherein determining the probabilities of each candidate intersection in the at least one second candidate intersection sequence being the downstream intersection starting from the starting intersection includes: Filter out the overlapping intersections starting from the starting intersection from the at least one second candidate intersection sequence to obtain a filtered set of candidate intersections; and Determine the probabilities of each candidate intersection in the at least one second candidate intersection sequence being the downstream intersection starting from the starting intersection by providing at least the prompt word information and the filtered set of candidate intersections to the generative model.
9. The method according to claim 1, wherein the at least one candidate intersection sequence includes multiple candidate intersection sequences, and during the process of generating the multiple candidate intersection sequences, the generative model determines the probabilities of each intersection other than the starting intersection and the ending intersection in the multiple candidate sequences being the downstream intersection, and wherein providing at least one candidate route for the route planning request based on the at least one candidate intersection sequence includes: For each candidate intersection sequence in the multiple candidate intersection sequences, determine the confidence score of the candidate intersection sequence based on the probabilities of each intersection other than the starting intersection and the ending intersection in the candidate intersection sequence being the downstream intersection; and Select at least one candidate intersection sequence from the multiple candidate intersection sequences for generating the at least one candidate route based on the ranking of the confidence scores of the multiple candidate intersection sequences.
10. An apparatus for route planning, comprising: A request receiving module configured to receive a route planning request, the route planning request indicating a starting point and an ending point; A prompt determination module, configured to determine prompt information of a trained generative model based on the starting point and the ending point, where the prompt information at least indicates a starting intersection corresponding to the starting point and an ending intersection corresponding to the ending point, and the generative model is trained based on a plurality of sample intersection sequences corresponding to a plurality of historical routes, and each sample intersection sequence corresponding to a historical route indicates each intersection on the historical route; A candidate intersection generation module, configured to generate at least one candidate intersection sequence by at least providing the prompt information to the generative model, and each intersection sequence indicates a set of intersections passed from the starting intersection to the ending intersection and the order between the intersections; And A route providing module, configured to provide at least one candidate route for the route planning request based on the at least one candidate intersection sequence.
11. An electronic device, comprising: At least one processing unit; And At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, and the instructions, when executed by the at least one processing unit, cause the electronic device to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, having stored thereon a computer program, the computer program being executable by a processor to implement the method according to any one of claims 1 to 9.
13. A computer program product, comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.