Path planning method and device, electronic equipment, storage medium and program product

By encoding and decoding road segment representations based on the origin and destination in path planning, and using real-time path constraint data to filter candidate road segments, the problem of low reliability of traditional algorithms in dynamic traffic environments is solved, and more efficient path recommendation is achieved.

CN121829588APending Publication Date: 2026-04-10NAVINFO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional graph search algorithms struggle to cope with dynamic constraints in path planning within dynamic traffic environments, resulting in low reliability and computational inefficiency.

Method used

By encoding and decoding road segments based on origin and destination, candidate road segments are filtered using real-time path constraint data, and decoded road segments that do not conform to the current path constraints are eliminated, thereby improving the reliability and rationality of path planning and reducing computational overhead.

Benefits of technology

It improves the reliability and rationality of path planning, reduces the computational overhead in the decoding process, and enhances the response efficiency of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121829588A_ABST
    Figure CN121829588A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a path planning method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: determining a starting point road section representation and a terminal point road section representation according to an acquired starting point and an acquired terminal point; performing coding and decoding processing on the basis of the start point road segment representation and the end point road segment representation to obtain a plurality of initial paths, and in the decoding process, screening a plurality of decoding road segments of each decoding step according to real-time path limitation data to obtain at least one candidate road segment of each decoding step; the initial path comprises a candidate road section of each decoding step; and selecting a recommended path from the plurality of initial paths. The method is used for achieving the effect of improving the reliability of path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of path planning and artificial intelligence technology, and in particular to a path planning method, apparatus, electronic device, storage medium and program product. Background Technology

[0002] In intelligent transportation systems, route planning is a core component for ensuring traffic efficiency and optimizing the travel experience.

[0003] In related technologies, traditional graph search algorithms are used for path planning, which requires traversing road network nodes and edges. This is suitable for static road network environments. However, in practical applications, the constraints of path planning change dynamically, and traditional graph search algorithms are difficult to cope with dynamic constraint changes. The planned path may contain unreasonable road segments, resulting in low reliability of path planning. Summary of the Invention

[0004] This application provides a path planning method, apparatus, electronic device, storage medium, and program product to improve the reliability of path planning.

[0005] In a first aspect, embodiments of this application provide a path planning method, including:

[0006] Based on the obtained starting point and ending point, determine the starting point road segment representation and the ending point road segment representation;

[0007] Encoding and decoding are performed based on the starting point segment representation and the ending point segment representation to obtain multiple initial paths. During the decoding process, multiple decoding segments in each decoding step are filtered according to real-time path constraint data to obtain at least one candidate segment in each decoding step; the initial path includes one candidate segment in each decoding step.

[0008] Select the recommended path from multiple initial paths.

[0009] Secondly, embodiments of this application provide a path planning device, comprising:

[0010] The characterization determination module is used to determine the starting point road segment characterization and the ending point road segment characterization based on the obtained starting point and ending point.

[0011] The inference module is used to perform encoding and decoding processing based on the starting point road segment representation and the ending point road segment representation to obtain multiple initial paths. During the decoding process, multiple decoding road segments in each decoding step are filtered according to real-time path constraint data to obtain at least one candidate road segment in each decoding step; the initial path includes one candidate road segment in each decoding step.

[0012] The path recommendation module is used to select a recommended path from multiple initial paths.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0016] The path planning method, apparatus, electronic device, storage medium, and program product provided in this application determine the starting point road segment representation and the ending point road segment representation based on the obtained starting point and ending point road segment representations. Encoding and decoding processing is performed based on the starting point road segment representation and the ending point road segment representation to obtain multiple initial paths. During the decoding process, multiple decoded road segments in each decoding step are filtered based on real-time path constraint data to obtain at least one candidate road segment for each decoding step. By filtering based on real-time path constraint data, decoded road segments that do not conform to the current path constraint data can be eliminated, ensuring that the candidate road segments included in the initial path conform to the dynamically changing constraints in real time. This improves the reliability and rationality of the final recommended path. Furthermore, the eliminated decoded road segments do not participate in subsequent decoding processes, reducing computational overhead during decoding and improving the response efficiency of path planning. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 Flowchart of the path planning method provided in this application Figure 1 ;

[0019] Figure 2 A schematic diagram illustrating the process of determining multiple initial paths using a path prediction model provided in this application;

[0020] Figure 3 The diagram provided for this application illustrates the process of filtering decoded road segments based on preset bundle width, road network topology data, height limits, and weight limits during the decoding process.

[0021] Figure 4This is a flowchart illustrating the process of determining the path prediction model during the training phase and performing path planning during the inference phase, as provided in this application.

[0022] Figure 5 A schematic diagram of the multiple initial paths provided for this application;

[0023] Figure 6 Flowchart of the path planning method provided in this application Figure 2 ;

[0024] Figure 7 A schematic diagram of the path planning device provided in this application;

[0025] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.

[0026] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0028] In intelligent transportation systems, path planning is a core component for ensuring traffic efficiency and optimizing the travel experience. Traditional graph search algorithms for path planning require traversing road network nodes and edges, making them suitable for static road network environments but inefficient and unable to handle dynamic traffic changes. Alternatively, random algorithms can be used to construct search trees, but due to the randomness of the sampling process, the generated paths are often feasible solutions rather than optimal solutions, easily resulting in jagged paths and failing to flexibly address dynamic constraints. In complex road networks and application scenarios where path planning constraints change dynamically, paths planned using these technologies may contain unreasonable road segments, leading to low reliability.

[0029] The technical concept of this application is to determine the starting point road segment representation and the ending point road segment representation based on the obtained starting point and ending point road segment representations, and to perform encoding and decoding processing based on the starting point road segment representation and the ending point road segment representation to obtain multiple initial paths. During the decoding process, the multiple decoded road segments of each decoding step are filtered according to real-time path constraint data to obtain at least one candidate road segment for each decoding step. By filtering through real-time path constraint data, decoded road segments that do not match the current path constraint data can be eliminated, so that the candidate road segments included in the initial path meet the dynamic constraints that change in real time, thereby improving the reliability and rationality of the final recommended path. In addition, the decoded road segments that are eliminated do not participate in the subsequent decoding process, reducing the computational overhead in the decoding process and improving the response efficiency of path planning.

[0030] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0031] Figure 1 This is a flowchart illustrating the path planning method provided in this application. The path planning method can be applied to electronic devices, which can be servers or terminals; for example... Figure 1 As shown, path planning methods include:

[0032] S101. Based on the obtained starting point and ending point, determine the starting point road segment representation and the ending point road segment representation.

[0033] The starting point is the initial location of the recommended path, and the ending point is the destination location of the recommended path.

[0034] The starting point segment can be a segment that includes the starting point (link) or the segment closest to the starting point; the ending point segment can be a segment that includes the ending point (link) or the segment closest to the ending point.

[0035] For example, the starting point (origin) corresponds to the starting point road segment (linkO), and the destination corresponds to the starting point road segment (linkD).

[0036] Optionally, the electronic device is a terminal. The terminal obtains the starting point and the ending point. Based on the road network topology data, the terminal searches for the road segment containing the starting point, i.e., the starting point road segment. If no road segment containing the starting point is found, the terminal searches for the road segment closest to the starting point to obtain the starting point road segment. Based on the road network topology data, the terminal searches for the road segment containing the ending point, i.e., the ending point road segment. If no road segment containing the ending point is found, the terminal searches for the road segment closest to the ending point to obtain the ending point road segment.

[0037] The starting point and ending point obtained by the terminal can be either entered by the user through the interactive page or obtained from the business data.

[0038] For example, in a navigation scenario, the terminal displays a navigation page, through which the user can input the starting point name and the destination name. The terminal obtains the starting point name and the destination name, determines the starting point (the starting location point corresponding to the starting point name) based on the starting point name, and determines the destination (the destination location point corresponding to the destination name) based on the destination name. Alternatively, the user can perform a location point selection operation through the map displayed on the navigation page, so that the terminal obtains the starting point and destination selected by the user.

[0039] For example, in a logistics and delivery scenario, the terminal displays a logistics and delivery task in the logistics and delivery system. The user performs a route recommendation operation for the logistics and delivery task. In response to the route recommendation operation, the terminal obtains the origin and destination from the business data corresponding to the logistics and delivery task.

[0040] Optionally, the electronic device is a server. The terminal obtains the starting point and the ending point, and sends the starting point and the ending point to the server. The server searches for the road segment containing the starting point, i.e., the starting point road segment, based on the road network topology data. If no road segment containing the starting point is found, the server searches for the road segment closest to the starting point to obtain the starting point road segment. The server searches for the road segment containing the ending point, i.e., the ending point road segment, based on the road network topology data. If no road segment containing the ending point is found, the server searches for the road segment closest to the ending point to obtain the ending point road segment.

[0041] S102. Encoding and decoding are performed based on the starting point segment representation and the ending point segment representation to obtain multiple initial paths. During the decoding process, multiple decoding segments in each decoding step are filtered according to real-time path restriction data to obtain at least one candidate segment in each decoding step. The initial path includes one candidate segment in each decoding step.

[0042] In one implementation, the path constraint data includes segment constraint data, which is used to restrict the topological connectivity between segments included in the path, and / or to restrict the traffic conditions required for the segments.

[0043] In one implementation, the path constraint data includes a preset bundle width and road segment constraint data. The preset bundle width is used to filter out decoding road segments with higher confidence (higher prediction probability) from multiple decoding road segments.

[0044] Based on the starting and ending road segments, multiple initial paths are obtained through encoding and decoding processing using a path prediction model. The path prediction model includes an encoder and a decoder. In practical applications, the path prediction model can be implemented using a Transformer model, which is a deep learning model with an attention mechanism. The path prediction model can also be implemented using an enhanced Transformer model, or it can be implemented using cascaded convolutional neural network layers and a decoder with an attention mechanism.

[0045] Specifically, after encoding is completed by the encoder, multiple initial paths are predicted in parallel by the decoder. The prediction of multiple initial paths is independent of each other. Each initial path starts from the starting segment. In each decoding step, multiple decoded segments are predicted for the incomplete initial path, and candidate segments are selected based on real-time path constraint data until the selected candidate segment is the destination segment, at which point the prediction of the initial path stops. The number of decoding steps used to predict different initial paths may be different.

[0046] During the decoding process, multiple decoded road segments output by each decoding step are filtered based on real-time path restriction data to obtain candidate road segments for each decoding step, thereby eliminating decoded road segments that do not match the real-time path restriction data.

[0047] In one implementation, the path constraint data includes road segment constraint data. Multiple decoding road segments in each decoding step are filtered based on the road segment constraint data, such that the filtered candidate road segments have a topological connection with the input road segments of the decoding step, and / or the filtered candidate road segments meet the required traffic conditions.

[0048] In one implementation, the path display data includes a preset bundle width and road segment constraint data. First, multiple decoded road segments in each decoding step are pruned according to the preset bundle width to obtain multiple initial road segments, thereby eliminating decoded road segments with low confidence. Then, the multiple initial road segments in each decoding step are filtered according to the road segment constraint data, so that the selected candidate road segments have a topological connection relationship with the input road segments of the decoding step, and / or the selected candidate road segments meet the required passage conditions.

[0049] For example, taking path display data including preset bundle width and road segment constraint data as an example, the input of the first decoding step t1 is the feature vector of the starting road segment linkO. During the decoding process, cross-attention processing is performed based on the ending road segment linkD to output multiple decoded road segments: linkp11, linkp12, linkp13, linkp14, linkp15, and linkp16. The preset bundle width is 3. Based on the preset bundle width, the multiple decoded road segments are pruned to obtain multiple initial road segments of t1: linkp11, linkp12, and linkp13. Based on the real-time road segment constraint data, candidate road segments of t1 are obtained: linkp11 and linkp12.

[0050] Since there are two candidate road segments for t1, the subsequent decoding process will be performed on each of the two candidate road segments for t1.

[0051] For candidate road segment linkp11 in t1, the input of the second decoding step t2 is the feature vector of the starting road segment linkO and the representation of linkp11. Cross-attention processing is performed based on the ending road segment linkD, and multiple decoded road segments are output: linkp21, linkp22, linkp23, linkp24, linkp25, and linkp26. The multiple decoded road segments are pruned according to the preset bundle width to obtain multiple initial road segments in t2: linkp21, linkp22, and linkp23. The candidate road segment in t2 is obtained by filtering based on real-time road segment constraint data: linkp21.

[0052] The input to the third decoding step t3 is the feature vector of the starting segment linkO, the representation of linkp11, and the representation of linkp21. Cross-attention processing is performed based on the ending segment linkD, and the output decoded segments include linkp31 and linkD. Multiple decoded segments are pruned according to the preset bundle width to obtain multiple initial segments of t3: linkp31 and linkD. Candidate segments of t3 are obtained by filtering according to real-time segment constraint data: linkpD. The initial path L1 is obtained: linkO-linkp11-linkp21-linkD.

[0053] For candidate road segment linkp12 in t1, the input of the second decoding step t2 is the feature vector of the starting road segment linkO and the representation of linkp12. Cross-attention processing is performed based on the ending road segment linkD to output multiple decoded road segments: linkp21, linkp23, linkp25, and linkp26. The multiple decoded road segments are pruned according to the preset bundle width to obtain multiple initial road segments in t2: linkp21, linkp23, and linkp25. The candidate road segment in t2 is obtained by filtering based on real-time road segment constraint data: linkp23.

[0054] The input to the third decoding step t3 is the feature vector of the starting segment linkO, the representation of linkp12, and the representation of linkp23. Cross-attention processing is performed based on the ending segment linkD to output multiple decoded segments: linkp31 and linkp32. The multiple decoded segments are pruned according to the preset bundle width to obtain multiple initial segments of t3: linkp31 and linkp32. Candidate segments of t3: linkp32 are obtained by filtering according to real-time segment constraint data.

[0055] The input to the fourth decoding step t4 is the feature vector of the starting segment linkO, the representation of linkp12, and the representations of linkp23 and linkp32. Cross-attention processing is performed based on the ending segment linkD. The output decoded segments include linkD, linkp41, and linkp42. The decoded segments are pruned according to the preset bundle width to obtain multiple initial segments of t4: linkD, linkp41, and linkp42. The candidate segment of t4 is obtained by filtering according to the real-time segment constraint data: linkpD. The initial path L2 is obtained: linkO-linkp12-linkp23-linkp32-linkD.

[0056] In this example, two initial paths are obtained: Initial path L1: linkO-linkp11-linkp21-linkD; Initial path L2: linkO-linkp12-linkp23-linkp32-linkD. It can be seen that the candidate road segments included in each initial path come from different decoding steps.

[0057] S103. Select the recommended path from multiple initial paths.

[0058] The recommended path is at least a part of the multiple initial paths, and the number of recommended paths can be multiple.

[0059] In one implementation, multiple initial paths are used as recommended paths.

[0060] In one implementation, for each initial path, the predicted probability of each candidate road segment in the initial path is determined, and the credibility of the initial path is determined based on the predicted probability of the candidate road segments. Initial paths with credibility greater than a preset credibility threshold can be used as recommended paths, or a preset number of recommended paths with higher credibility can be selected from multiple initial paths. The predicted probability of the candidate road segment is output simultaneously with the decoding process when the candidate road segment is decoded.

[0061] In one implementation, for any two initial paths, the similarity between the two initial paths is determined based on the candidate road segments they include. This similarity reflects the degree of overlap between the two initial paths. If the similarity between any two initial paths is greater than a similarity threshold, then deduplication is performed on the two initial paths. If the similarity between any two initial paths is not greater than the similarity threshold, then deduplication is not performed. The above operation is performed on any two initial paths from multiple initial paths in this manner, and the retained initial paths are used as recommended paths.

[0062] The path planning method provided in this application determines the start-point road segment representation and the end-point road segment representation based on the obtained start-point and end-point road segment representations. Encoding and decoding processing is performed based on these representations to obtain multiple initial paths. During the decoding process, multiple decoded road segments in each decoding step are filtered according to real-time path constraint data to obtain at least one candidate road segment for each decoding step. Filtering using real-time path constraint data can eliminate decoded road segments that do not conform to the current path constraint data, ensuring that the candidate road segments included in the initial paths meet the dynamically changing constraints in real time. This improves the reliability and rationality of the final recommended path. Furthermore, the eliminated decoded road segments do not participate in subsequent decoding processes, reducing computational overhead during decoding and improving the response efficiency of path planning.

[0063] In some embodiments, the path constraint data includes a preset bundle width and road segment constraint data; filtering multiple decoded road segments in each decoding step based on real-time path constraint data to obtain at least one candidate road segment in each decoding step includes: for each decoding step: pruning multiple decoded road segments output by each decoding step according to the preset bundle width to obtain multiple initial road segments in each decoding step; filtering multiple initial road segments in each decoding step according to the road segment constraint data to obtain at least one candidate road segment in each decoding step.

[0064] Specifically, for a batch of decoded road segments output by the decoder, pruning is performed using a preset bundle width to retain multiple initial road segments with reasonable quantity and prediction probability; the specific value of the preset bundle width can be set according to actual needs.

[0065] For example, with a preset beamwidth of 100, for a batch of decoded segments (e.g., 500 decoded segments) output by the decoder in a certain decoding step, the decoded segments with the highest predicted probability are selected as the initial segments according to the preset beamwidth.

[0066] Optionally, based on the preset bundle width and preset temperature coefficient, the multiple decoded segments output in each decoding step are pruned to obtain multiple initial segments for each decoding step. The preset temperature coefficient can increase the path exploration in the decoding process. The specific value of the preset temperature coefficient can be set according to actual needs.

[0067] For example, if the preset temperature coefficient T approaches 1, the probability distribution is close to the original result. The selection of the initial road segment depends more on the training preference of the decoding process. For example, if the preset beamwidth is 100 and the preset temperature coefficient T is 1, the decoding road segments with the top 100 predicted probabilities will be used as the initial road segments. If the preset temperature coefficient T is 0.5, the decoding road segments with lower predicted probabilities may be selected as the initial road segments. For example, if the preset beamwidth is 100 and the preset temperature coefficient T is 0.5, the selected initial road segments include decoding road segments with predicted probability values ​​that are not in the top 100.

[0068] When real-time road segment constraint data is used to limit the topological connectivity between road segments included in the path, multiple initial road segments in each decoding step are filtered according to the real-time road segment constraint data, so that the selected candidate road segments have a topological connectivity with the input road segments of the decoding step, and initial road segments that do not have a topological connectivity in the road network can be eliminated.

[0069] When real-time road segment constraint data is used to restrict the traffic conditions required for the road segments included in the path, such as real-time road segment constraint data including: vehicle type restrictions, height restrictions, weight restrictions, etc.; multiple initial road segments in each decoding step are filtered according to the real-time road segment constraint data so that the selected candidate road segments meet the traffic conditions.

[0070] In the above embodiments, for multiple decoding segments in each decoding step, candidate segments for each decoding step are selected based on preset bundle width and segment constraint data, which improves the credibility of candidate segments. Furthermore, the candidate segments match the segment constraint data, thereby improving the reliability and rationality of the final recommended path.

[0071] In some embodiments, the road segment constraint data includes road network topology data and / or road segment traffic thresholds; based on the road segment constraint data, multiple initial road segments in each decoding step are filtered to obtain at least one candidate road segment in each decoding step, including: for each decoding step: based on the road network topology data, determining the topological relationship between the input road segment of the decoding step and each initial road segment; and / or, based on the road segment traffic thresholds, determining the adaptation status of each initial road segment in the decoding step; based on the topological relationship and / or the adaptation status, at least one candidate road segment is obtained from the multiple initial road segments in the decoding step.

[0072] Among them, road network topology data is the connection relationship data between road segments in the road network. Road network topology data is acquired in real time. For example, if a road segment is temporarily closed, there is no connection relationship between this road segment and other road segments in the road network topology data. After the road segment is reopened, there are other road segments that are connected to this road segment in the road network topology data.

[0073] Among them, the road segment passage threshold is the compliance threshold for road segment passage. For example, the road segment passage threshold includes: height limit and / or weight limit. The road segment passage threshold is obtained in real time. For example, the height limit and weight limit of the road segment are adjusted according to weather, road conditions, temporary traffic control, etc.

[0074] The input road segment is the input item for the decoding process, and the decoded road segment is the output item for the decoding process. The decoding process is to predict the possible next road segment (i.e., the decoded road segment) based on the input road segment. The input road segment for the first decoding step is the starting road segment, the input road segment for the second decoding step is the starting road segment and the candidate road segment from the first decoding step, and so on.

[0075] This embodiment includes the following situations:

[0076] Case 1: Based on the road network topology data, determine the topological relationship between the input road segment and each initial road segment in the decoding step. Based on the topological relationship, select at least one candidate road segment from the multiple initial road segments in the decoding step.

[0077] Specifically, for each decoding step, based on the road network topology data, it is determined whether the input road segment of the decoding step is connected to each initial road segment; when there are multiple input road segments, including the candidate road segments of the previous decoding step, it is determined whether the candidate road segments of the previous decoding step are connected to the initial road segment; if the input road segment is connected to the initial road segment, the topology relationship is determined to be a connection relationship; if the input road segment is not connected to the initial road segment, the topology relationship is determined to be a disconnected relationship; initial road segments with a disconnected topology relationship are eliminated, and initial road segments with a connection topology relationship are taken as candidate road segments.

[0078] Case 2: Based on the road segment traffic threshold, determine the adaptation status of each initial road segment in the decoding step, and based on the adaptation status, select at least one candidate road segment from multiple initial road segments in the decoding step.

[0079] It should be noted that, after obtaining the route planning requirements, Scenario 2 is executed to determine whether the initial road segment meets the route planning requirements based on the road segment traffic threshold.

[0080] Specifically, for each initial road segment in each decoding step, the road segment passage threshold is obtained. Based on the path planning requirements and the road segment passage threshold, the adaptation status of the initial road segment is determined. If the adaptation status is not suitable, the initial road segment is removed. If the adaptation status is suitable, the initial road segment is selected as a candidate road segment.

[0081] Case 3: Based on the road network topology data, determine the topological relationship between the input road segment and each initial road segment in the decoding step. Based on the road segment passage threshold, determine the adaptation status of each initial road segment in the decoding step. If the topological relationship is disconnected or the adaptation status is not suitable, the initial road segment is removed. If the topological relationship is connected and the adaptation status is suitable, the initial road segment is taken as a candidate road segment.

[0082] For example, encoding and decoding are performed through a path prediction model; such as Figure 2 As shown, the path planning method includes: obtaining the starting point and the ending point; determining the starting point road segment representation based on the starting point; determining the ending point road segment representation based on the ending point; inputting the starting point road segment representation and the ending point road segment representation into the path prediction model; performing encoding and decoding processing through the path prediction model to obtain multiple initial paths; during the decoding process of the path prediction model, by presetting the beam size, determining multiple initial road segments from multiple decoding road segments in each decoding step; and selecting candidate road segments from multiple initial road segments based on road network topology data and road segment constraint data (height limit and weight limit) to achieve restrictive decoding.

[0083] In the above embodiments, for each decoding step, at least one candidate road segment is selected from multiple initial road segments based on road network topology data and / or road segment traffic thresholds. Initial road segments that do not conform to the current road segment constraint data can be eliminated, so that the candidate road segments included in the initial path conform to the dynamic constraints that change in real time, thereby improving the reliability and rationality of the finally obtained recommended path.

[0084] In some embodiments, the road segment passage threshold includes height limit and / or weight limit; based on the road segment passage threshold, the adaptation status of each initial road segment in the decoding step is determined, including: when the required height and / or required weight are obtained, determining whether the adaptation status of the initial road segment is adapted or not adapted based on whether the required height is less than the height limit of the initial road segment and / or whether the required weight is less than the weight limit of the initial road segment.

[0085] The demand height and / or demand weight can be entered by the user through the interactive page or obtained from the business data.

[0086] For example, in a navigation scenario, if the vehicle driven by the user has a road segment access threshold, the user can input the starting point name, the destination name, and the road segment access threshold (required height and / or required weight) through the navigation page.

[0087] For example, in a logistics and delivery scenario, the business data corresponding to a logistics and delivery task includes delivery vehicles and the road passage thresholds (demand height and / or demand weight) of the delivery vehicles.

[0088] Specifically, taking the road segment passage threshold including height limit as an example, after obtaining the required height, for each initial road segment in each decoding step, the height limit of the initial road segment is obtained, and it is determined whether the required height is less than the height limit of the initial road segment. If not, the adaptation status of the initial road segment is determined to be unsuitable; if so, the adaptation status of the initial road segment is determined to be suitable.

[0089] In one possible implementation, the segment identifier of the initial road segment is obtained, and the road segment passage threshold corresponding to the segment identifier is obtained through a constraint lookup table, which is the road segment passage threshold of the initial road segment; wherein, the constraint lookup table is pre-constructed, and the segment identifier is a unique identifier of the road segment.

[0090] Taking the road segment passage thresholds, which include height and weight limits, as an example, the constraint lookup table stores the correspondence between the road segment identifier, height limit, and weight limit of all road segments in the road network. For example, the constraint lookup table is shown in Table 1.

[0091] Table 1

[0092]

[0093] Link ID refers to the road segment identifier.

[0094] For example, such as Figure 3As shown in the diagram, for ease of illustration, the preset bundle width is set to 2. The input of the first decoding step t1 is the feature vector (start) of the starting segment linkO. The multiple decoding segments of t1 include: linka, ..., link1a, link1b, ..., linkz. Based on the preset bundle width, multiple initial segments of t1 are selected: link1a, link1b. Based on the road network topology data, height limit, and weight limit, it is determined that link1a and link1b meet the current segment constraints. Therefore, the candidate segments of t1 include: link1a and link1b.

[0095] For link1a, the input of t2 includes: the feature vector of the starting segment linkO, the representation of link1a, and multiple decoded segments of t2 including: linka, ..., link2aa, link2ab, ..., linkz; multiple initial segments of t1 are selected according to the preset bundle width: link2aa, link2ab; according to the road network topology data, height limit and weight limit, it is determined that neither link2aa nor link2ab meets the current segment constraints.

[0096] For link1b, the input of t2 includes: the feature vector of the starting segment linkO, the representation of link1b, and multiple decoded segments of t2 including: linka, ..., link2ba, link2bb, ..., linkz; multiple initial segments of t2 are selected according to the preset bundle width: link2ba, link2bb. According to the road network topology data, height limit and weight limit, it is determined that link2ba and link2bb both meet the current segment constraints.

[0097] For link2ba, the input of t3 includes: the feature vector of the starting segment linkO, the representation of link1b, and the representation of link2ba. The multiple decoding segments of t3 include: linka, ..., link3baa, link2bab, ..., linkz. According to the preset bundle width, multiple initial segments of t3 are selected: link3baa and link2bab. Based on the road network topology data, height limit, and weight limit, it is determined that link3bab meets the current segment constraints. The subsequent decoding process continues based on link3bab.

[0098] For link2bb, the input of t3 includes: the feature vector of the starting segment linkO, the representation of link1b, and the representation of link2bb. The multiple decoding segments of t3 include: linka, ..., link3bba, link2bbb, ..., linkz. According to the preset bundle width, multiple initial segments of t3 are selected: link3bba and link2bbb. According to the road network topology data, height limit, and weight limit, it is determined that link3bbb meets the current segment constraints. The subsequent decoding process continues based on link3bbb.

[0099] In the above embodiments, for each decoding step, multiple initial road segments are used to determine whether the initial road segments meet the required height and / or required weight based on the height and / or weight restrictions of the initial road segments. In logistics and delivery scenarios, road segments that do not meet the vehicle passage conditions can be eliminated based on the current height and / or weight restrictions of the initial road segments. Personalized recommendations can be made for paths with height and weight requirements, thereby improving the reliability of path recommendations.

[0100] In some embodiments, determining the starting point segment representation and the ending point segment representation based on the obtained starting point and ending point includes:

[0101] Based on the obtained starting and ending points, determine the starting road segment and the ending road segment; based on the road network topology data, determine the first connection relationship data of the starting road segment and the second connection relationship data of the ending road segment; based on the first connection relationship data, determine the representation of the starting road segment, and based on the second connection relationship data, determine the representation of the ending road segment.

[0102] The first connection relationship data includes road segments and points of interest connected to the starting point road segment; the second connection relationship data includes road segments and points of interest connected to the ending point road segment.

[0103] Specifically, in the road segment data, find the starting road segment corresponding to the starting point (including the starting point, or the one closest to the starting point), and find the ending road segment corresponding to the ending point (including the ending point, or the one closest to the ending point).

[0104] In the road network topology data, identify the road segments and points of interest connected to the starting road segment, and generate a representation of the starting road segment based on the road segments and points of interest connected to the starting road segment; in the road network topology data, identify the road segments and points of interest connected to the ending road segment, and generate a representation of the ending road segment based on the road segments and points of interest connected to the ending road segment.

[0105] For example, each road segment in the road network topology data is assigned a unique road segment identifier. For the starting road segment linkO, the road segment identifier is 1. If linkO connects warehouse A and Link2, then the first connection relationship data of linkO includes: warehouse A and link2. Based on warehouse A and link2, a fixed-dimensional representation is generated using a learnable embedding table to obtain the representation of the starting road segment.

[0106] For the endpoint segment linkD, the segment identifier is 9. LinkD connects to Link5, Link6, and Link8. The first connection relationship data of linkD includes: Link5, Link6, and Link8. Based on Link5, Link6, and Link8, a fixed-dimensional representation is generated using a learnable embedding table to obtain the endpoint segment representation.

[0107] For example, linkO: linkID=1, the first connection relationship data includes: warehouse A and link2; the starting segment of linkO is represented as [0.12,0.35,0.28,…,0.21]; linkD: linkID=9, the second connection relationship data includes: Link5, Link6, Link8; the ending segment of linkD is represented as [0.45,0.18,0.32,…,0.56].

[0108] In the above embodiments, the starting road segment representation is determined based on the connection relationship of the starting road segment in the road network, and the ending road segment representation is determined based on the connection relationship of the ending road segment in the road network. This improves the information richness of the starting road segment representation and the ending road segment representation. Subsequently, route recommendation is performed based on the starting road segment representation and the ending road segment representation, which improves the reliability of the topological relationship of the recommended route.

[0109] In some embodiments, encoding and decoding processing is performed based on the starting point road segment representation and the ending point road segment representation to obtain multiple initial paths, including: encoding and decoding the starting point road segment representation and the ending point road segment representation using a path prediction model to obtain multiple initial paths; the training process of the path prediction model includes: determining the frequency of historical road segments based on a historical path set; adjusting the initial attention weights of the initial model based on the frequency of historical road segments to obtain a candidate model; determining the training starting point road segment representation and the training ending point road segment representation based on the historical paths included in the historical path set; encoding and decoding the training starting point road segment representation and the training ending point road segment representation using the candidate model to obtain a training prediction path; and adjusting the model parameters of the candidate model based on the training prediction path and the historical paths until the training conditions are met to obtain the path prediction model.

[0110] The path prediction model includes an encoder and a decoder. In practical applications, the path prediction model can be implemented using the Transformer model, which is a deep learning model with an attention mechanism. The path prediction model can also be implemented using an enhanced Transformer model, or using cascaded convolutional neural network layers and a decoder with an attention mechanism.

[0111] The initial model has the same model structure as the path prediction model, but different model parameters; the initial model is iteratively trained to obtain the path prediction model.

[0112] The historical path set includes multiple historical paths; historical paths are actual driving routes, so the historical road segments included in the historical path are all compliant road segments, that is, the topological relationship between the historical road segments included in the historical path is correct and conforms to the road segment constraints.

[0113] Among them, the frequency of historical road sections refers to the number of times a historical road section appears in multiple historical routes.

[0114] The historical path set is used for one training batch. Different training batches use different historical path sets. Before each round of training, the current initial attention weights are updated based on the historical path set of the current training batch.

[0115] When the current training batch is the first one, the initial attention weights can be obtained through initialization, and the initial attention weights can be the dot product of the initial query matrix and the initial key matrix; when the current training batch is not the first one, the initial attention weights are obtained through training in previous batches.

[0116] Specifically, in the current training batch, based on the historical path set of the current training batch, the frequency of each historical road segment appearing in the historical path set is determined, and the weight coefficient of each historical road segment is determined based on the frequency of each historical road segment; frequency and weight coefficient are positively correlated, that is, the more frequent the historical road segment, the higher the weight coefficient; for example, the frequency of historical road segments appearing in the historical path set and the weight coefficient are shown in Table 2.

[0117] Table 2

[0118]

[0119] It should be noted that the frequency of historical road segments changes dynamically with the changes in the historical path set. For example, if a road segment appears less frequently in actual driving routes due to construction, the weight coefficient of that historical road segment will decrease.

[0120] Optionally, the initial attention weight includes the native attention weight of each historical road segment. Based on the weight coefficient of each historical road segment, the native attention weight of each historical road segment is adjusted to obtain the target attention weight of each historical road segment.

[0121] As shown in formula (1).

[0122] Formula (1): ;

[0123] in, It is the target attention weight of historical road sections. It is the weighting coefficient of historical road sections. It is the weighting coefficient for historical road sections.

[0124] Optionally, based on the weight coefficient of each historical road segment, the frequency vector of the historical road segment is determined, and the frequency bias matrix is ​​calculated based on the frequency vector of the historical road segment; the initial attention weights in the initial model are obtained, and the initial attention weights are adjusted according to the frequency bias matrix to obtain the candidate model.

[0125] For the historical paths included in the historical path set, the historical starting point road segment and the historical ending point road segment are obtained from the historical path. The connection relationship data of the historical starting point road segment is obtained from the road network topology data. Based on the connection relationship data, the representation of the training starting point road segment is determined. The connection relationship data of the historical ending point road segment is obtained from the road network topology data. Based on the connection relationship data, the representation of the training ending point road segment is determined.

[0126] The candidate model encodes the road segment representations of the training start point and the road segment representation of the training end point to obtain the training prediction path. The loss value is calculated based on the training prediction path and the historical path. The parameters of the candidate model are adjusted based on the loss value. After completing the iterative training of the current batch, it is determined whether the training conditions are met. If not, the candidate model is used as the initial model. The iterative training continues according to the above process based on the historical path set of the next training batch. If the conditions are met, the candidate model that meets the training conditions is used as the path prediction model.

[0127] The training conditions can be either reaching a preset number of iterations or the candidate model converging.

[0128] For example, such as Figure 4 As shown, during the training phase, historical path sets of multiple training batches are obtained based on big data path samples. The frequency of each historical road segment is determined based on the historical path set of the current training batch. The initial attention weights of the initial model are adjusted based on the frequency of the historical road segments to obtain candidate models. The candidate models are iteratively trained based on the historical path sets. Iterative training is carried out through historical paths of multiple training batches until the training conditions are met, and the path prediction model is obtained.

[0129] During the inference phase, based on big data path samples, road segment traffic thresholds and road segment frequencies are determined. The starting and ending road segment representations are encoded and decoded using a path prediction model to obtain multiple initial paths. During decoding, the decoded road segments for each decoding step are pruned using a preset bundle width to obtain initial road segments for each decoding step. These initial road segments are then filtered using road network topology data and road segment traffic thresholds to obtain candidate road segments for each decoding step. Each initial path includes one candidate road segment from each decoding step. Based on road segment frequency, a recommended path is selected from the multiple initial paths.

[0130] Optionally, when a recommended path fails, the system obtains the reason for the path adjustment reported by the user, such as recommended path 1 being impassable due to an unexpected accident. Based on the reason for the path adjustment and the corresponding failed recommended path, the logistics and delivery system updates the dataset, uses incremental training to periodically fine-tune the path prediction model, and evaluates the performance indicators of the path prediction model in real-world scenarios, forming a closed-loop iterative process of data feedback, model optimization, and effect verification.

[0131] In the above embodiments, the initial attention weights of the initial model are adjusted by the frequency of historical road segments to obtain candidate models. This allows the candidate models to pay more attention to the features of high-frequency road segments during training, avoiding model bias caused by fixed weights and improving the path planning performance of the model.

[0132] In some embodiments, selecting a recommended path from multiple initial paths includes: determining a similarity coefficient for each candidate road segment based on the multiple initial paths; for any two initial paths, identifying common and non-common road segments among the candidate road segments included in the two initial paths, determining the similarity between the two initial paths based on the similarity coefficients of the common and non-common road segments; and if the similarity between any two initial paths is greater than a similarity threshold, performing deduplication on the two initial paths to obtain a recommended path.

[0133] The similarity coefficient can represent the prevalence of candidate road segments. For example, if candidate road segment linka1 appears in every initial path and candidate road segment linka2 appears in only one initial path, then the similarity coefficient of linka1 is higher than that of linka2.

[0134] Specifically, for each candidate road segment, the candidate road segment and multiple initial paths are determined, the identifiability of the candidate road segment is determined, and the identifiability is inverted to obtain the similarity coefficient of the candidate road segment. For example, if the candidate road segment appears frequently in multiple initial paths and has high coverage, the candidate road segment has low identifiability and high similarity coefficient, and the candidate road segment belongs to a general road segment; if the candidate road segment appears infrequently in multiple initial paths and has low coverage, the candidate road segment has high identifiability and low similarity coefficient, and the candidate road segment does not belong to a general road segment.

[0135] For each initial path, determine whether each candidate road segment included in the initial path appears in other initial paths. If so, the candidate road segment is a common road segment; otherwise, the candidate road segment is a non-common road segment.

[0136] For each initial path, the similarity coefficient of each candidate road segment determined above includes the similarity coefficient of common road segments and the similarity coefficient of non-common road segments in the initial path; based on the similarity coefficient of common road segments, the distances of common road segments are weighted and summed to obtain the reference distance of common road segments; based on the similarity coefficient of common road segments, the distance of common road segments, the similarity coefficient of non-common road segments, and the distance of non-common road segments, the target distance of the initial path is obtained by weighted summing; the ratio of the reference distance to the target distance is used as the similarity of the initial path; as shown in formula (2).

[0137] Formula (2): ;

[0138] in, It is the similarity of the initial paths. It is the similarity coefficient of the i-th candidate road segment in the initial path. It is the distance to the i-th candidate road segment; It is the similarity coefficient of the j-th common road segment in the initial path. It is the distance of the j-th public road segment.

[0139] After obtaining the similarity of multiple initial paths, a recommended path is selected from the similarity of the multiple initial paths according to the similarity threshold. For example, if the similarity of an initial path is less than the similarity threshold, then the initial path is used as the recommended path. The specific value of the similarity threshold can be set according to actual needs.

[0140] In the above embodiments, the similarity of the initial path is determined based on the similarity coefficient between the common road segments and the non-common road segments in the initial path. The initial path with a similarity less than the similarity threshold is used as the recommended path, so that the recommended path includes fewer common road segments, avoids the convergence of recommended paths or getting trapped in local optima, and improves the diversity of recommended paths.

[0141] In some embodiments, determining the similarity coefficient of each candidate road segment based on multiple initial paths includes: determining the occurrence frequency and rarity value of each candidate road segment based on multiple initial paths; determining the distinctiveness of each candidate road segment based on the occurrence frequency and rarity value of each candidate road segment; and determining the similarity coefficient of each candidate road segment based on the distinctiveness of each candidate road segment; the similarity coefficient is negatively correlated with the distinctiveness.

[0142] The term frequency (TF) of candidate road segments is used to reflect the degree to which candidate road segments are frequently selected in route recommendation. Optionally, the term frequency of candidate road segments is the first number of initial paths including candidate road segments. Optionally, the term frequency of candidate road segments is the ratio between the first number of initial paths including candidate road segments and the total number of times all candidate road segments appear.

[0143] Among them, the Inverse Document Frequency (IDF) of candidate road segments is used to reflect the uniqueness of candidate road segments among multiple initial paths. Specifically, for each candidate road segment, a first number of initial paths including the candidate road segment is determined, and the inverse document frequency is determined based on the ratio between the second number and the first number of multiple initial paths. For example, the inverse document frequency is obtained by taking the logarithm of the ratio between the second number and the first number.

[0144] The product of the frequency and rarity values ​​is used as the identification score. The identification score is inverted to obtain the similarity weight. The similarity coefficient is determined based on the similarity weight and the preset ratio factor, as shown in formula (3).

[0145] Formula (3): ;

[0146] in, It is the first The similarity coefficient of each candidate road segment. It is the first The frequency of occurrence of each candidate road segment It is the first The rarity value of each candidate road segment; It is the first The recognizability of each candidate road segment.

[0147] For example, such as Figure 5 As shown, the initial paths between the starting point P1 and the ending point P5 include: Initial path 1: linkp1-link2-linkp4-linkp5; Initial path 2: linkp1-linkp2-linkp4-linkp5; Initial path 3: linkp1-linkp2-linkp3-linkp4-linkp5.

[0148] The similarity coefficients between different candidate road segments are as follows: linpk4-linkp5 > linpk3-linkp4; linpk1-linkp2 > linkp1-linkp3, linkp2-linkp3, linkp2-linkp4.

[0149] In the above embodiments, the identification score is determined based on the frequency and rarity of candidate road segments, and then the similarity coefficient of the candidate road segments is determined based on the identification score, which improves the accuracy of the similarity coefficient. Subsequently, deduplication is performed based on the similarity coefficient, which further improves the diversity of recommended paths.

[0150] In a specific example, the path prediction model is implemented using a Transformer model, which includes an encoder and a decoder.

[0151] like Figure 6 As shown, in the inference phase, the starting point and the ending point are obtained, the starting point road segment representation and the ending point road segment representation are determined, and the starting point road segment representation and the ending point road segment representation are input into the encoder to obtain the feature vector of the starting point road segment and the feature vector of the ending point road segment.

[0152] In decoding step t1, the feature vector of the starting road segment is input into the decoder, and cross-attention processing is performed based on the feature vector of the ending road segment to output multiple decoded road segments in decoding step t1. Based on the preset bundle width, road network topology data and road segment passage threshold, the multiple decoded road segments are filtered to obtain the candidate road segment link1 in decoding step t1.

[0153] In the t2 decoding step, the feature vector of the starting segment and the representation of link1 are input into the decoder, and cross-attention processing is performed based on the feature vector of the ending segment to output multiple decoding segments of the decoding step t2. The same filtering method as that used for the multiple decoding segments of t1 is used to obtain the decoding segments of t2.

[0154] Following the above process, the decoded path segment output by each decoding step is processed to obtain multiple initial paths;

[0155] Based on multiple initial paths, determine the frequency of occurrence (TF) and rarity value (IDF) of each candidate road segment, and determine the similarity coefficient of each candidate road segment based on the TF and IDF of each candidate road segment;

[0156] For any two initial paths, common and non-common road segments are identified. Based on the similarity coefficient between the common and non-common road segments, the similarity between the two initial paths is determined. If the similarity is greater than a similarity threshold, the two initial paths are deduplicated. After deduplication, recommended paths are obtained. If there are multiple recommended paths, the similarity between any two recommended paths is not greater than the similarity threshold, thus improving the diversity of recommended paths.

[0157] In practical applications, in logistics and delivery scenarios, the terminal displays logistics and delivery tasks in the logistics and delivery system. Users perform route recommendation operations for the logistics and delivery tasks, and the terminal responds to these operations by obtaining the origin and destination from the business data corresponding to the logistics and delivery tasks. Customized functional interfaces are added to the logistics and delivery system, such as a height and weight restriction avoidance interface, to input truck parameters to determine height and weight requirements. This allows for the filtering of decoded road segments based on height and weight restrictions during route planning. A multi-delivery-point sequence optimization interface can also be customized to input multiple delivery points and output recommended routes passing through these points, ensuring the smooth operation of business decisions in logistics and delivery scenarios.

[0158] Optionally, the logistics and delivery system can also display the estimated travel information for the recommended route, including: estimated travel time, fuel cost or electricity cost, etc.; for example, displaying the estimated travel information for the recommended route: "Estimated travel time 35 minutes, fuel cost 28 yuan".

[0159] The path planning method provided in this application determines the start-point road segment representation and the end-point road segment representation based on the obtained start-point and end-point road segment representations. Encoding and decoding processing is performed based on these representations to obtain multiple initial paths. During the decoding process, multiple decoded road segments in each decoding step are filtered according to real-time path constraint data to obtain at least one candidate road segment for each decoding step. Filtering using real-time path constraint data can eliminate decoded road segments that do not conform to the current path constraint data, ensuring that the candidate road segments included in the initial paths meet the dynamically changing constraints in real time. This improves the reliability and rationality of the final recommended path. Furthermore, the eliminated decoded road segments do not participate in subsequent decoding processes, reducing computational overhead during decoding and improving the response efficiency of path planning.

[0160] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0161] The path planning method, apparatus, electronic device, storage medium, and program product provided in this application determine the starting point road segment representation and the ending point road segment representation based on the obtained starting point and ending point road segment representations. Encoding and decoding processing is performed based on the starting point road segment representation and the ending point road segment representation to obtain multiple initial paths. During the decoding process, multiple decoded road segments in each decoding step are filtered based on real-time path constraint data to obtain at least one candidate road segment for each decoding step. By filtering based on real-time path constraint data, decoded road segments that do not conform to the current path constraint data can be eliminated, ensuring that the candidate road segments included in the initial path conform to the dynamically changing constraints in real time. This improves the reliability and rationality of the final recommended path. Furthermore, the eliminated decoded road segments do not participate in subsequent decoding processes, reducing computational overhead during decoding and improving the response efficiency of path planning.

[0162] Figure 7 A schematic diagram of the path planning device provided in this application is shown below. Figure 7 As shown, the path planning device 70 provided in this embodiment includes:

[0163] The characterization determination module 701 is used to determine the starting point road segment characterization and the ending point road segment characterization based on the acquired starting point and ending point.

[0164] The inference module 702 is used to perform encoding and decoding processing based on the starting point segment representation and the ending point segment representation to obtain multiple initial paths. During the decoding process, multiple decoding segments in each decoding step are filtered according to real-time path constraint data to obtain at least one candidate segment in each decoding step. The initial path includes one candidate segment in each decoding step.

[0165] The path recommendation module 703 is used to select a recommended path from multiple initial paths.

[0166] In some embodiments, the path constraint data includes a preset bundle width and road segment constraint data; the inference module 702 is used for each decoding step to: prune multiple decoded road segments output by each decoding step according to the preset bundle width to obtain multiple initial road segments for each decoding step; and filter the multiple initial road segments for each decoding step according to the road segment constraint data to obtain at least one candidate road segment for each decoding step.

[0167] In some embodiments, the road segment constraint data includes road network topology data and / or road segment traffic thresholds; the inference module 702 is configured to, for each decoding step: determine the topological relationship between the input road segment and each initial road segment of the decoding step based on the road network topology data; and / or determine the adaptation state of each initial road segment of the decoding step based on the road segment traffic thresholds; and filter at least one candidate road segment from multiple initial road segments of the decoding step based on the topological relationship and / or the adaptation state.

[0168] In some embodiments, the road segment passage threshold includes height limit and / or weight limit; the inference module 702 is used to determine whether the adaptation status of the initial road segment is adapted or not adapted based on whether the required height is less than the height limit of the initial road segment and / or whether the required weight is less than the weight limit of the initial road segment, after obtaining the required height and / or required weight.

[0169] In some embodiments, the characterization determination module 701 is used to determine the starting road segment and the ending road segment based on the acquired starting point and ending point; determine the first connection relationship data of the starting road segment and the second connection relationship data of the ending road segment based on the road network topology data; determine the characterization of the starting road segment based on the first connection relationship data; and determine the characterization of the ending road segment based on the second connection relationship data.

[0170] In some embodiments, the inference module 702 is used to encode and decode the starting point segment representation and the ending point segment representation through a path prediction model to obtain multiple initial paths;

[0171] The training process of the path prediction model includes: determining the frequency of historical road segments based on the historical path set; adjusting the initial attention weights of the initial model based on the frequency of historical road segments to obtain a candidate model; determining the training start-point road segment representation and the training end-point road segment representation based on the historical paths included in the historical path set; encoding and decoding the training start-point road segment representation and the training end-point road segment representation using the candidate model to obtain the training prediction path; and adjusting the model parameters of the candidate model based on the training prediction path and the historical paths until the training conditions are met to obtain the path prediction model.

[0172] In some embodiments, the path recommendation module 703 is configured to determine the similarity coefficient of each candidate road segment based on multiple initial paths; for any two initial paths, determine common road segments and non-common road segments among the candidate road segments included in the two initial paths, determine the similarity between the two initial paths based on the similarity coefficient of the common road segments and non-common road segments; and if the similarity between any two initial paths is greater than a similarity threshold, perform deduplication processing on the two initial paths to obtain a recommended path.

[0173] In some embodiments, the path recommendation module 703 is configured to determine the occurrence frequency and rarity value of each candidate road segment based on multiple initial paths; determine the identifiability of each candidate road segment based on the occurrence frequency and rarity value of each candidate road segment; and determine the similarity coefficient of each candidate road segment based on the identifiability of each candidate road segment; the similarity coefficient is negatively correlated with the identifiability.

[0174] The path planning device provided in this embodiment can execute the path planning device provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0175] Figure 8 A schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus.

[0176] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to perform the above-described method.

[0177] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0178] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0179] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0180] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0181] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0182] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0183] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0184] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0185] The division of units is merely a logical functional division; 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 indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0186] 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.

[0187] In addition, the functional units in the various embodiments of the present invention 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.

[0188] If a function 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 invention, or the part that contributes to the prior art, or a 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 of the various embodiments of this invention. 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.

[0189] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0190] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A path planning method characterized by, The method comprises the following steps: determining a start point road segment representation and an end point road segment representation according to the obtained start point and end point; based on the start point road segment representation and the end point road segment representation, performing encoding and decoding processing to obtain a plurality of initial paths, in the decoding process, filtering a plurality of decoding road segments of each decoding step according to real-time path restriction data to obtain at least one candidate road segment of each decoding step; the initial path includes one candidate road segment of each decoding step; selecting a recommended path from the plurality of initial paths.

2. The method of claim 1, wherein, The path restriction data includes a preset beam width and road segment constraint data; the filtering of the plurality of decoding road segments of each decoding step according to the real-time path restriction data to obtain at least one candidate road segment of each decoding step comprises: for each decoding step: according to the preset beam width, performing pruning processing on the plurality of decoding road segments output by each decoding step to obtain a plurality of initial road segments of each decoding step; according to the road segment constraint data, filtering the plurality of initial road segments of each decoding step to obtain at least one candidate road segment of each decoding step.

3. The method of claim 2, wherein, The road segment constraint data includes road network topology data and / or road segment passing threshold; the filtering of the plurality of initial road segments of each decoding step according to the road segment constraint data to obtain at least one candidate road segment of each decoding step comprises: for each decoding step: according to the road network topology data, determining the topological relationship between the input road segment of the decoding step and each initial road segment; and / or, according to the road segment passing threshold, determining the adaptation state of each initial road segment of the decoding step; according to the topological relationship and / or the adaptation state, filtering at least one candidate road segment from the plurality of initial road segments of the decoding step.

4. The method of claim 3, wherein, The road segment passing threshold includes height limit and / or weight limit; the determination of the adaptation state of each initial road segment of the decoding step according to the road segment passing threshold comprises: in the case of obtaining a required height and / or a required weight, determining the adaptation state of the initial road segment as adapted or not adapted according to whether the required height is less than the height limit of the initial road segment and / or whether the required weight is less than the weight limit of the initial road segment.

5. The method of claim 1, wherein, The determination of the start point road segment representation and the end point road segment representation according to the obtained start point and end point comprises: determining a start point road segment and an end point road segment according to the obtained start point and end point; determining first connection relationship data of the start point road segment and second connection relationship data of the end point road segment according to road network topology data; determining the start point road segment representation according to the first connection relationship data and determining the end point road segment representation according to the second connection relationship data.

6. The method of claim 1, wherein, The encoding and decoding processing based on the start point road segment representation and the end point road segment representation to obtain a plurality of initial paths comprises: performing encoding and decoding processing on the start point road segment representation and the end point road segment representation through a path prediction model to obtain a plurality of initial paths; the training process of the path prediction model comprises: determining the frequency of historical road segments according to a historical path set; adjusting the initial attention weight of an initial model according to the frequency of historical road segments to obtain a candidate model; determine a training start road segment representation and a training end road segment representation according to the historical paths included in the historical path set; encode and decode the training start road segment representation and the training end road segment representation through the candidate model to obtain a training predicted path; adjust model parameters of the candidate model according to the training predicted path and the historical paths until a training condition is met to obtain a path prediction model.

7. The method according to any one of claims 1 to 6, characterized in that, The selecting a recommended path from the plurality of initial paths comprises: determining a similarity coefficient of each candidate road segment according to the plurality of initial paths; for any two initial paths in the plurality of initial paths, determining a common road segment and a non-common road segment in candidate road segments included in the any two initial paths, and determining a similarity of the any two initial paths according to the similarity coefficients of the common road segment and the non-common road segment; in a case where the similarity of the any two initial paths is greater than a similarity threshold, performing a deduplication process on the any two initial paths to obtain a recommended path.

8. The method of claim 7, wherein, The determining a similarity coefficient of each candidate road segment according to the plurality of initial paths comprises: determining a frequency of occurrence and a rarity value of each candidate road segment according to the plurality of initial paths; determining a recognition degree of each candidate road segment according to the frequency of occurrence and the rarity value of each candidate road segment; determining a similarity coefficient of each candidate road segment according to the recognition degree of each candidate road segment; the similarity coefficient is negatively correlated with the recognition degree.

9. A route planning apparatus characterized by comprising: The apparatus comprises: a representation determining module configured to determine a start road segment representation and an end road segment representation according to an obtained start point and an end point; an inference module configured to perform encode and decode processing based on the start road segment representation and the end road segment representation to obtain a plurality of initial paths, and in a decoding process, filter a plurality of decoding road segments of each decoding step according to real-time path restriction data to obtain at least one candidate road segment of each decoding step; the initial paths comprise one candidate road segment of each decoding step; a path recommendation module configured to select a recommended path from the plurality of initial paths.

10. An electronic device / computer readable storage medium / computer program product, characterized in that, The electronic device comprises a processor and a memory connected with the processor in communication; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method according to any one of claims 1 to 8; The computer readable storage medium stores computer execution instructions; the computer execution instructions are executed by the processor to implement the method according to any one of claims 1 to 8; The computer program product comprises computer execution instructions; the computer execution instructions are executed by the processor to implement the method according to any one of claims 1 to 8.