Path planning, model training, index library establishment method, device and equipment
By using a pre-trained driving data encoding model and index library technology, the route planning path is automatically selected, which solves the problem of low route planning efficiency in the existing technology and achieves efficient and accurate route planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECH CO LTD
- Filing Date
- 2022-12-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing path planning methods rely on a large number of manually defined rules, resulting in low efficiency in path planning.
By using a pre-trained driving data encoding model, the system automatically filters out target features by determining the similarity between the features of the driving scenario to be planned and those in a pre-created index, thereby determining the planned path and reducing human intervention.
It improves the efficiency and accuracy of path planning, reduces reliance on manual selection rules, and achieves fast and accurate path planning.
Smart Images

Figure CN116010721B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to the fields of artificial intelligence, autonomous driving and intelligent transportation, specifically to a method, apparatus and device for path planning, model training and index library establishment. Background Technology
[0002] With the rapid development of the autonomous driving field, path planning methods can provide important support for the field.
[0003] Currently, common route planning methods typically use quadratic programming (QP) algorithms to select the optimal driving path. Summary of the Invention
[0004] This disclosure provides a method, apparatus, and device for path planning, model training, and index library establishment.
[0005] According to a first aspect of this disclosure, a path planning method is provided, comprising: obtaining a first feature corresponding to first data based on a pre-trained driving data encoding model; the first data including: scene data of a driving scenario to be planned; determining the similarity between the first feature and each second feature in a pre-created index library, and identifying the second feature with a similarity greater than a first preset threshold as a target feature; the index library including: a correspondence between multiple second data and multiple second features; the second data including: scene data of a planned driving scenario; the scene data including: path data; the number of target features being at least one; and determining the path data in the scene data of the planned driving scenario corresponding to the target feature as the planned path of the driving scenario to be planned.
[0006] According to a second aspect of this disclosure, a model training method is provided, comprising: acquiring multiple third data; the third data including: scene data of a planned driving scenario; determining any two training data that satisfy preset conditions from the multiple third data as positive sample pairs, thereby obtaining multiple positive sample pairs; the preset conditions including: the similarity between the first training data and the second training data is greater than a preset similarity; the first training data and the second training data being any two training data from the multiple third data; determining any two training data that do not satisfy the preset conditions from the multiple third data as negative sample pairs, thereby obtaining multiple negative sample pairs; and training a driving data encoding model based on the multiple positive sample pairs and the multiple negative sample pairs.
[0007] According to a third aspect of this disclosure, a method for establishing an index library is provided, comprising: obtaining multiple second features corresponding one-to-one with multiple second data based on a pre-trained driving data encoding model; the second data including: scenario data of a planned driving scenario; the scenario data including: path data; establishing an index library based on the multiple second data and the multiple second features; the index library including: the correspondence between the multiple second data and the multiple second features.
[0008] According to a fourth aspect of this disclosure, a path planning apparatus is provided, comprising: a processing unit and a determining unit; the processing unit is configured to obtain a first feature corresponding to first data based on a pre-trained driving data encoding model; the first data includes: scene data of a driving scenario to be planned; the determining unit is configured to determine the similarity between the first feature and each second feature in a pre-created index library, and determine the second feature with a similarity greater than a first preset threshold as a target feature; the index library includes: a correspondence between multiple second data and multiple second features; the second data includes: scene data of a planned driving scenario; the scene data includes: path data; the number of target features is at least one; the determining unit is further configured to determine the path data in the scene data of the planned driving scenario corresponding to the target feature as the planned path of the driving scenario to be planned.
[0009] According to a fifth aspect of this disclosure, a model training apparatus is provided, comprising: an acquisition unit and a processing unit; the acquisition unit is configured to acquire a plurality of third data; the third data includes: scene data of a planned driving scenario; the processing unit is configured to determine any two training data that satisfy preset conditions from the plurality of third data as positive sample pairs, thereby obtaining a plurality of positive sample pairs; the preset conditions include: the similarity between the first training data and the second training data is greater than a preset similarity; the first training data and the second training data are any two training data from the plurality of third data; the processing unit is further configured to determine any two training data that do not satisfy the preset conditions from the plurality of third data as negative sample pairs, thereby obtaining a plurality of negative sample pairs; the processing unit is further configured to train a driving data encoding model based on the plurality of positive sample pairs and the plurality of negative sample pairs.
[0010] According to a sixth aspect of this disclosure, an index library establishment apparatus is provided, comprising: a processing unit and an establishment unit; the processing unit is configured to obtain a plurality of second features corresponding one-to-one with a plurality of second data according to a pre-trained driving data encoding model; the second data includes: scene data of a planned driving scenario; the scene data includes: path data; the establishment unit is configured to establish an index library based on the plurality of second data and the plurality of second features; the index library includes: the correspondence between the plurality of second data and the plurality of second features.
[0011] According to a seventh aspect of this disclosure, an electronic device is provided, comprising:
[0012] At least one processor; and
[0013] A memory that is communicatively connected to at least one processor; wherein,
[0014] The memory stores instructions that can be executed by at least one processor, such that the at least one processor is able to perform any of the methods in the first aspect, or any of the methods in the second aspect, or any of the methods in the third aspect.
[0015] According to an eighth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, comprising:
[0016] Computer instructions are used to cause a computer to perform any of the methods in the first aspect, or any of the methods in the second aspect, or any of the methods in the third aspect.
[0017] According to the ninth aspect of this disclosure, a computer program product is provided, comprising:
[0018] A computer program, which is executed by a processor using any of the methods in the first aspect, or any of the methods in the second aspect, or any of the methods in the third aspect.
[0019] According to the tenth aspect of this disclosure, an electronic device is provided, including the electronic device provided in the seventh aspect.
[0020] The technology disclosed herein solves the problem of low efficiency in path planning.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0023] Figure 1 This is a schematic diagram of the structure of a path planning system provided in an embodiment of this disclosure;
[0024] Figure 2 This is a schematic flowchart of a model training method provided in an embodiment of this disclosure;
[0025] Figure 3 This is a flowchart illustrating another model training method provided in this embodiment of the disclosure;
[0026] Figure 4 This is a flowchart illustrating a method for creating an index database according to an embodiment of this disclosure;
[0027] Figure 5 This is a flowchart illustrating another method for creating an index database provided in this embodiment of the disclosure;
[0028] Figure 6 This is a flowchart illustrating a path planning method provided in an embodiment of this disclosure;
[0029] Figure 7 This is a flowchart illustrating another path planning method provided in an embodiment of this disclosure;
[0030] Figure 8 This is a flowchart illustrating another path planning method provided in an embodiment of this disclosure;
[0031] Figure 9 This is a flowchart illustrating another path planning method provided in an embodiment of this disclosure;
[0032] Figure 10 This is a schematic diagram of the structure of a path planning device provided in an embodiment of this disclosure;
[0033] Figure 11 This is a schematic diagram of the structure of a model training device provided in an embodiment of this disclosure;
[0034] Figure 12 This is a schematic diagram of the structure of an index database creation device provided in an embodiment of this disclosure;
[0035] Figure 13 This is a block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0036] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0037] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0038] With the rapid development of the autonomous driving field, path planning methods can provide important support for the field.
[0039] Currently, common route planning methods typically use the QP algorithm to select the optimal driving path.
[0040] Specifically, the QP algorithm uses a lateral and longitudinal spatiotemporal planning (SLT rule) algorithm to calculate the scene data in the planning scenario, thereby obtaining thousands of candidate paths. Then, through a variety of manually defined rules, these thousands of candidate paths are filtered to determine the optimal driving path.
[0041] As can be seen from the above, the QP algorithm relies on a large number of manually defined rules when determining the optimal driving path, which is time-consuming, labor-intensive, and inefficient.
[0042] To address the aforementioned problems, this disclosure provides a path planning method applied to scenarios where electronic devices perform path planning. In this method, the electronic device can obtain a first feature corresponding to first data (scene data of the driving scenario to be planned) based on a pre-trained driving data encoding model. Next, the electronic device can determine the similarity between the first feature and each second feature in a pre-created index library, and identify second features with similarity greater than a first preset threshold as target features. The index library includes: a correspondence between multiple second data and multiple second features; the second data includes: scene data of the planned driving scenario; the scene data includes: path data; and the number of target features is at least one. Subsequently, the electronic device can determine the path data from the scene data of the planned driving scenario corresponding to the target feature as the planned path for the driving scenario to be planned.
[0043] Since the driving data encoding model is pre-trained, it can accurately obtain the first feature corresponding to the scene data of the driving scenario to be planned. This first feature accurately represents the data content of the scene data. Next, the electronic device can determine target features similar to the first feature from an index containing multiple second features. Because the second features can also accurately represent the data content of the planned driving scenario, the electronic device can quickly and accurately determine the planned path for the driving scenario based on feature similarity, eliminating the need for manual selection rules and improving path planning efficiency.
[0044] The path planning, model training, and index library establishment methods provided in this disclosure can be applied to path planning systems. Figure 1 A schematic diagram of a path planning system provided in an embodiment of this disclosure is shown. Figure 1 As shown, the path planning system includes a first electronic device 101 and multiple second electronic devices 102.
[0045] The first electronic device 101 and the second electronic device 102 are connected in communication.
[0046] In practical applications, the first electronic device 101 can be connected to any number of second electronic devices 102. For ease of understanding, Figure 1 The following is an example of a first electronic device 101 connected to a second electronic device 102.
[0047] In this embodiment of the application, the second electronic device 102 is used to provide the first electronic device 101 with data for path planning (such as scene data of the driving scenario to be planned, scene data of the planned driving scenario, etc.), so that the first electronic device 101 can perform path planning based on the data sent by the multiple second electronic devices 102.
[0048] Optionally, the physical devices of the first electronic device 101 and the second electronic device 102 can be in-vehicle electronic devices, terminals, or other types of electronic devices (such as vehicle enterprise servers, etc.). This application embodiment does not limit this.
[0049] Optionally, the aforementioned in-vehicle electronic equipment can be a vehicle-mounted system deployed inside the vehicle. This system possesses a variety of in-vehicle functions, thereby enabling information communication between people and the vehicle, and between the vehicle and the outside world (vehicle-to-vehicle communication).
[0050] Optionally, the aforementioned terminal may be a device that provides voice and / or data connectivity to the user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a radio access network (RAN). In this way, the wireless terminal can store the acquired scene data in the vehicle manufacturer's server through the core network, preventing data loss.
[0051] Wireless terminals can be mobile terminals, such as mobile phones (or "cellular" phones) and computers with mobile terminals, or portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices that exchange voice and / or data with a wireless access network, such as mobile phones, tablets, laptops, netbooks, and personal digital assistants (PDAs).
[0052] Optionally, the aforementioned vehicle manufacturer server can be one of the servers in a server cluster (composed of multiple servers), a chip in the server, a system-on-a-chip in the server, or a virtual machine (VM) deployed on a physical machine. This application embodiment does not limit this.
[0053] Optionally, when the physical devices of the first electronic device 101 and the second electronic device 102 are of the same type (for example, both the first electronic device 101 and the second electronic device 102 are vehicle enterprise servers or terminals), the first electronic device 101 and the second electronic device 102 can be two devices that are set up independently, or they can be integrated into the same device.
[0054] It is easy to understand that when the first electronic device 101 and the second electronic device 102 are integrated into the same device, the communication method between the first electronic device 101 and the second electronic device 102 is the same as the communication method between internal modules of the device. In this case, the communication process between the two is the same as that between the first electronic device 101 and the second electronic device 102 when they are independent of each other.
[0055] For ease of understanding, this application will be described using the example of the first electronic device 101 and the second electronic device 102 being independent of each other.
[0056] The technical solutions provided by the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0057] The path planning method provided in this disclosure includes: a process in which a first electronic device trains a driving data encoding model based on multiple third data (hereinafter referred to as "driving data encoding model training process"), a process in which the first electronic device establishes an index library based on the driving data encoding model and multiple second data (hereinafter referred to as "index library establishment process"), and a process in which the first electronic device determines the planned path of the driving scenario to be planned based on the first data, the index library and the driving data encoding model (hereinafter referred to as "path planning process").
[0058] The following section describes the "driving data encoding model training process".
[0059] like Figure 2 As shown, the "driving data encoding model training process" specifically includes:
[0060] S201, The first electronic device acquires multiple third data.
[0061] Specifically, when training a driving data encoding model, a large amount of training data is required to train the model. In this case, the first electronic device can acquire a large amount of training data, such as multiple third-party data sources.
[0062] Optionally, the third data includes scenario data for planned driving scenarios.
[0063] The scenario data for planned driving scenarios may include path data for those scenarios.
[0064] For example, when the planned driving scenario is a driving scenario from location A to location B, the scenario data of the planned driving scenario may include path data from location A to location B.
[0065] The aforementioned route data can include road type (e.g., highway or tunnel), number of road lanes, and road lane markings.
[0066] Optionally, the scenario data of the planned driving scenario may also include obstacle data of the planned driving scenario and driving data of the planned driving scenario.
[0067] Based on the above example, when the planned driving scenario is driving from location A to location B, the scenario data can also include obstacle data on the path from location A to location B, as well as driving data from location A to location B.
[0068] The obstacle data for the planned driving scenario can include the type of obstacle (e.g., restricted roads, debris, etc.), the size of the obstacle, and the location of the obstacle.
[0069] The driving data for the planned driving scenarios mentioned above can include the time it takes for a vehicle to travel from location A to location B, average speed, heading angle, etc.
[0070] In one feasible way, combining Figure 1 When the second electronic device is a car manufacturer's server, it can store a large amount of scenario data for planned driving scenarios. In this case, the first electronic device can send data requests to the second electronic device to request multiple third-party data.
[0071] In yet another possible way, combining Figure 1 When the second electronic device is an in-vehicle electronic device, it can store scene data of the current vehicle in a planned driving scenario. In this case, the first electronic device can send data requests to the in-vehicle electronic devices of multiple vehicles, requesting to obtain multiple third data corresponding to each of the multiple in-vehicle electronic devices.
[0072] S202, the first electronic device determines any two training data that meet the preset conditions from multiple third data as positive sample pairs, thus obtaining multiple positive sample pairs.
[0073] Specifically, after acquiring multiple third-party data sets, in order to train a more accurate driving data encoding model, the first electronic device can divide the multiple third-party data sets into multiple positive sample pairs and multiple negative sample pairs according to preset conditions. In this way, the first electronic device can train a more accurate driving data encoding model based on the multiple positive sample pairs and multiple negative sample pairs.
[0074] The preset conditions may include: the similarity between the first training data and the second training data is greater than a preset similarity; the first training data and the second training data are any two training data from a plurality of third data.
[0075] Optionally, since the training data (i.e., the third data) includes path data and driving data for the planned driving scenario, the training data may include the vehicle's driving path within a certain time period. In this way, the first electronic device can determine whether different training data sets are similar based on the Euclidean distance of the vehicle's driving path within a certain time period in the different training data sets.
[0076] When the absolute value of the distance difference between the first Euclidean distance and the second Euclidean distance is less than the first preset distance, and the absolute value of the distance difference between the third Euclidean distance and the fourth Euclidean distance is less than the second preset distance, the first electronic device can determine that the similarity between the first training data and the second training data is greater than the preset similarity.
[0077] Wherein, the first Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the first training data. The second Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the second training data. The third Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the first training data. The fourth Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the second training data.
[0078] For example, suppose the first training data includes: within the time period from when the vehicle starts driving to 1 second of driving (i.e., the first preset time period), the vehicle travels from location A to location B. The Euclidean distance between location A and location B is 1 meter (i.e., the first Euclidean distance).
[0079] The first training data also includes: within the time period from the start of the vehicle's journey to 3 seconds (i.e., the second preset time period), the vehicle travels from location A to location C. The Euclidean distance between location A and location C is 10 meters (i.e., the third Euclidean distance).
[0080] Suppose the second training data includes: within the time period from when the vehicle starts driving to 1 second of driving (i.e., the first preset time period), the vehicle travels from location D to location E. The Euclidean distance between location D and location E is 1.1 meters (i.e., the second Euclidean distance).
[0081] The second training data also includes: during the time period from the start of the vehicle's journey to 3 seconds (i.e., the second preset time period), the vehicle travels from location D to location F. The Euclidean distance between location D and location F is 10.5 meters (i.e., the fourth Euclidean distance).
[0082] The first preset distance is 0.3 meters. The second preset distance is 1 meter. It should be understood that the absolute value of the difference between the first Euclidean distance of 1 meter and the second Euclidean distance of 1.1 meters (0.1 meters) is less than the first preset distance of 0.3 meters, and the absolute value of the difference between the third Euclidean distance of 10 meters and the fourth Euclidean distance of 10.5 meters (0.5 meters) is less than the second preset distance of 1 meter. In this case, the first electronic device determines that the first training data and the second training data constitute a positive sample pair.
[0083] Optionally, the preset conditions may also include other conditions used to indicate that the first training data and the second training data are similar, such as: the path length in the first training data is the same as the path length in the second training data, and the path type in the first training data is the same as the path type in the second training data, etc. This disclosure does not limit this.
[0084] S203. The first electronic device determines any two training data that do not meet the preset conditions from multiple third data as a negative sample pair, thus obtaining multiple negative sample pairs.
[0085] Specifically, since the preset condition is to indicate that the first training data and the second training data are similar, when any two training data in the multiple third data do not meet the preset condition, the first electronic device will determine any two training data that do not meet the preset condition as a negative sample pair, thus obtaining multiple negative sample pairs.
[0086] Referring to the above example, assume the first preset distance is 0.01 meters and the second preset distance is 0.1 meters. It should be understood that the absolute value of the difference between the first Euclidean distance of 1 meter and the second Euclidean distance of 1.1 meters (0.1 meters) is greater than the first preset distance of 0.01 meters, and the absolute value of the difference between the third Euclidean distance of 10 meters and the fourth Euclidean distance of 10.5 meters (0.5 meters) is greater than the second preset distance of 0.1 meters. In this case, the first electronic device determines that the first training data and the second training data constitute a negative sample pair.
[0087] It should be noted that the first electronic device may execute S202 first and then S203; or it may execute S203 first and then S202; or it may execute S202 and S203 simultaneously. This embodiment does not limit the scope of the invention.
[0088] S204. The first electronic device trains a driving data encoding model based on multiple positive sample pairs and multiple negative sample pairs.
[0089] Specifically, after obtaining multiple positive sample pairs and multiple negative samples, the first electronic device can train a driving data encoding model based on the multiple positive sample pairs and multiple negative sample pairs.
[0090] Optionally, the above-mentioned driving data encoding model can be a time series model, a transformer model, an attention model, etc., and this disclosure does not limit it.
[0091] Optionally, the above-mentioned driving data encoding model is a model for encoding data. In this embodiment of the application, the encoding model is used to encode driving data.
[0092] Optionally, the first electronic device may be trained on multiple positive sample pairs and multiple negative sample pairs based on a supervised learning algorithm to obtain a driving data encoding model; it may also be trained on multiple positive sample pairs and multiple negative sample pairs based on an unsupervised learning algorithm to obtain a driving data encoding model; or it may be trained on multiple positive sample pairs and multiple negative sample pairs based on a contrastive learning algorithm to obtain a driving data encoding model. This disclosure does not limit the specific method used.
[0093] As can be seen from the above, in this embodiment of the present disclosure, the first electronic device can divide multiple third data into positive sample pairs and negative sample pairs, and then train a more accurate driving data encoding model based on multiple positive sample pairs and multiple negative sample pairs, so as to accurately determine the first feature and multiple second features based on the driving data encoding model, and thus quickly and accurately determine the planning path of the driving scenario to be planned.
[0094] In one feasible approach, the method for training a driving data encoding model based on multiple positive sample pairs and multiple negative sample pairs specifically includes:
[0095] S2041. For each of the multiple positive sample pairs, the first electronic device inputs the positive sample pair into the model to be trained to obtain the first positive sample feature and the second positive sample feature.
[0096] Specifically, since a positive sample pair consists of two training data, after the first electronic device inputs a positive sample pair into the model to be trained, it can obtain two sample features, such as the first positive sample feature and the second positive sample feature.
[0097] The sample features are used to represent the data content of the training data corresponding to the sample features in the target sample pair. The representation of the features can be in the form of code, in the form of pure numbers, or in other forms. This disclosure does not limit the representation.
[0098] It should be noted that sample features can be represented in different forms to accurately express the data content of the training data corresponding to the sample features.
[0099] For example, the sample features are represented as "A=1, B=20". Here, A represents the road type, A=1 indicates the road type is a highway, and B represents the road width. B=20 indicates the road width is 20 meters.
[0100] S2042. When the similarity between the first positive sample feature and the second positive sample feature is less than the second preset threshold, the first electronic device adjusts the model parameters of the model to be trained based on the loss function.
[0101] Specifically, after obtaining the first positive sample features and the second positive sample features, the first electronic device can determine whether the accuracy of the model to be trained has met the requirements based on the similarity between the first positive sample features and the second positive sample features.
[0102] Optionally, the first electronic device may determine the similarity between the first positive sample feature and the second positive sample feature based on the cosine similarity, or it may determine the similarity between the first positive sample feature and the second positive sample feature based on other similarity algorithms. This disclosure does not limit the specific method used.
[0103] As shown in S202, the two training data in a positive sample pair are highly similar. When the similarity between the first positive sample feature and the second positive sample feature is less than the second preset threshold, it indicates that the similarity between the first positive sample feature and the second positive sample feature differs significantly. In this case, it indicates that the first positive sample feature and / or the second positive sample feature output by the model to be trained are inaccurate, i.e., the accuracy of the model to be trained is low. Therefore, the first electronic device can adjust the model parameters of the model to be trained based on the loss function.
[0104] Optionally, the loss function can be a contrastive loss function commonly used in contrastive learning models, such as cosine embedding loss, triplet loss, etc., and this disclosure does not limit it.
[0105] S2043. For each of the multiple negative sample pairs, the first electronic device inputs the negative sample pair into the model to be trained to obtain the first negative sample feature and the second negative sample feature.
[0106] Specifically, since a negative sample pair consists of two training data, inputting a negative sample pair into the model to be trained will yield two sample features, referred to as the first negative sample feature and the second negative sample feature.
[0107] S2044. When the similarity between the first negative sample feature and the second negative sample feature is greater than a third preset threshold, the first electronic device adjusts the model parameters of the model to be trained based on the loss function.
[0108] Specifically, after obtaining the first negative sample features and the second negative sample features, the first electronic device can determine whether the accuracy of the model to be trained has met the requirements based on the similarity between the first negative sample features and the second negative sample features.
[0109] Optionally, the first electronic device may determine the similarity between the first negative sample feature and the second negative sample feature based on the cosine similarity between the first negative sample feature and the second negative sample feature, or it may determine the similarity between the first negative sample feature and the second negative sample feature based on other similarity algorithms. This disclosure does not limit the specific method used.
[0110] As shown in S203, the two training data in the negative sample pair have low similarity. When the similarity between the first negative sample feature and the second negative sample feature is greater than the third preset threshold, it indicates that the similarity between the first negative sample feature and the second negative sample feature is small. In this case, it indicates that the first negative sample feature and / or the second negative sample feature output by the model to be trained are inaccurate, that is, the accuracy of the model to be trained is low. Therefore, the first electronic device can adjust the model parameters of the model to be trained based on the loss function.
[0111] Optionally, the second preset threshold and the third preset threshold can be the same value or different values, and this embodiment does not limit this.
[0112] It should be noted that the first electronic device may execute S2041-S2042 first and then S2043-S2044; or it may execute S2043-S2044 first and then S2041-S2042; or it may execute S2041-S2042 and S2043-S2044 simultaneously. This embodiment of the present disclosure does not limit this.
[0113] S2045. When the model to be trained reaches the convergence state, the first electronic device determines the model to be trained in the convergence state as the driving data encoding model.
[0114] Specifically, the convergence state refers to the state in which the model to be trained meets the convergence condition. In the convergence state, the accuracy of the model to be trained is relatively high. Therefore, the first electronic device can identify the model to be trained in the convergence state as the driving data encoding model.
[0115] Optionally, the convergence condition may include the number of training iterations of the model to be trained reaching a preset number (e.g., 10,000 times), or the similarity between the first positive sample feature and the second positive sample feature being greater than or equal to a second preset threshold, or the similarity between the first negative sample feature and the second negative sample feature being less than or equal to a third preset threshold. This disclosure does not limit the specific conditions.
[0116] As can be seen from the above, in this embodiment of the present disclosure, the first electronic device can determine that the output result of each sample pair meets the preset conditions when the similarity between the two positive sample features corresponding to the two third data outputs of the positive sample pair is greater than a second preset threshold, and the similarity between the two negative sample features corresponding to the two third data outputs of the negative sample pair is less than a third preset threshold. Conversely, it is determined that the output result of each sample pair does not meet the preset conditions. In the case where the preset conditions are not met, the model parameters of the model to be trained can be adjusted through a loss function until the model to be trained reaches a convergent state, thus obtaining a driving data encoding model. In this way, a driving data encoding model with higher encoding accuracy can be trained using third data including positive and negative sample pairs.
[0117] In one feasible approach, the data acquired by the first electronic device during the training of the driving data encoding model may include bad case data. In this case, to improve the accuracy of the driving data encoding model, such as... Figure 3 As shown, this path planning method also includes:
[0118] S301, The first electronic device acquires multiple fourth data.
[0119] The fourth type of data includes violation data from the planned driving scenarios.
[0120] Optionally, violation data can be data on violations of traffic rules, such as speeding data, crossing the line data, etc.
[0121] Optionally, the first electronic device may be pre-configured with a detection driver module for detecting illegal data. After acquiring multiple pieces of fourth data, the first electronic device can invoke this detection driver module to quickly detect the illegal data.
[0122] S302, The first electronic device preprocesses the illegal data to obtain multiple third-party data.
[0123] Preprocessing is used to update non-compliant data into compliant data.
[0124] Optionally, preprocessing can include updating the speed in the speeding data to obtain the non-speeding data, or updating the vehicle position in the line-crossing data to obtain the position of the vehicle that did not cross the line, etc.
[0125] Optionally, the first electronic device may be pre-configured with a processing driver module for preprocessing illegal data. Upon detecting illegal data, the first electronic device can invoke this processing driver module to quickly preprocess the illegal data.
[0126] Thus, in the path planning method provided in this embodiment, the first electronic device can also preprocess the acquired data, avoiding the problem of the first electronic device determining a planned path that includes illegal data.
[0127] The "index database creation process" will be described below.
[0128] like Figure 4 As shown, the "index database creation process" specifically includes:
[0129] S401, the first electronic device obtains multiple second features that correspond one-to-one with multiple second data based on a pre-trained driving data encoding model.
[0130] The second type of data includes: scenario data for planned driving scenarios. Scenario data includes: route data.
[0131] It should be understood that since both the second and third data include scenario data of the planned driving scenarios, the second and third data can be multiple identical data sets.
[0132] Optionally, since the number of planned driving scenarios is very large, the second and third data can also be different.
[0133] For example, multiple third data include multiple second data; or, multiple second data include multiple third data; or, some of the data in multiple third data and multiple second data are the same, and some of the data are different. This disclosure does not limit this.
[0134] Specifically, as shown above, the driving data encoding model trained based on the "driving data encoding model training process" can output high-precision data features. In this case, the first electronic device can acquire multiple second data (scene data of the planned driving scenario) and obtain multiple second features corresponding one-to-one with the multiple second data according to the pre-trained driving data encoding model.
[0135] The descriptions of multiple second data points can be found in the descriptions of multiple third data points, and will not be repeated here.
[0136] For a description of the multiple second features, please refer to the description of the sample features in S2041, which will not be repeated here.
[0137] S402. The first electronic device establishes an index library based on multiple second data and multiple second features.
[0138] The index database includes the correspondence between multiple second data and multiple second features.
[0139] Specifically, after obtaining multiple second features that correspond one-to-one with multiple second data, the first electronic device can establish an index relationship between the multiple second features and the multiple second data, and store the index relationship between the multiple second features and the multiple second data in an index library, so as to facilitate the rapid retrieval of the second data corresponding to the second features in the future.
[0140] In one feasible approach, the index also includes multiple categorical features. Each categorical feature includes at least one second feature. The method for the first electronic device to build the index based on multiple second data and multiple second features specifically includes:
[0141] The first electronic device uses a clustering algorithm to cluster multiple secondary features to obtain multiple category features.
[0142] Specifically, after acquiring multiple second features, since the number of second features is large, in order to quickly determine the target feature whose similarity to the first feature is greater than the first preset threshold, the first electronic device can cluster the multiple second features based on a clustering algorithm to obtain multiple category features.
[0143] Each category feature includes at least one second feature.
[0144] Optionally, the clustering algorithm can be K-means clustering, Gaussian mixture model distance algorithm, or other clustering algorithms. This disclosure does not limit the specific clustering algorithm used.
[0145] In one feasible approach, when determining multiple second characteristics, the data acquired by the first electronic device may include bad case data. In this case, to accurately determine the path data that conforms to the plan, such as... Figure 5 As shown, this path planning method also includes:
[0146] S501, The first electronic device acquires multiple fifth data.
[0147] The fifth type of data includes violation data from the planned driving scenarios.
[0148] S502, The first electronic device preprocesses the illegal data to obtain multiple second data.
[0149] Preprocessing is used to update non-compliant data into compliant data.
[0150] Since both the fifth and fourth data sets include violation data from the planned driving scenarios, therefore... For a description of S501-S502, please refer to the description of S301-S302 above; it will not be repeated here.
[0151] The "path planning process" will be described below.
[0152] like Figure 6 As shown, the "path planning process" specifically includes:
[0153] S601, The first electronic device obtains the first feature corresponding to the first data based on the pre-trained driving data encoding model.
[0154] The first data includes: scenario data of the driving scenarios to be planned.
[0155] Specifically, as shown above, the driving data encoding model trained based on the "driving data encoding model training process" can output high-precision data features. In this case, the first electronic device can acquire the first data (scene data of the driving scenario to be planned) and obtain the first feature corresponding to the first data according to the pre-trained driving data encoding model.
[0156] Optionally, the first data may be carried in a route planning request sent by the onboard electronic device that needs to perform route planning.
[0157] The first data may include path data in the driving scenario to be planned, such as the road type (e.g., highway or tunnel), number of lanes, and lane markings in the driving scenario to be planned.
[0158] Optionally, the first data may also include obstacle data and driving data in the driving scenario to be planned.
[0159] The obstacle data in the driving scenario to be planned can include the type of obstacle (such as restricted roads, debris, etc.), the size of the obstacle, and the location of the obstacle.
[0160] The driving data in the driving scenario to be planned can be the vehicle's current speed, steering wheel angle, etc.
[0161] For a description of the first feature, please refer to the description of the sample features in S2041, which will not be repeated here.
[0162] S602, the first electronic device determines the similarity between the first feature and each second feature in the pre-created index library, and determines the second feature with a similarity greater than the first preset threshold as the target feature.
[0163] The index includes: the correspondence between multiple second data and multiple second features; the second data includes: scenario data of planned driving scenarios; the scenario data includes: path data; and the number of target features is at least one.
[0164] Specifically, as can be seen from the above, the index library established based on the "index library establishment process" includes the correspondence between multiple second data and multiple second features. Therefore, after obtaining the first feature, the first electronic device can determine the similarity between the first feature and each second feature in the pre-created index library, and determine the second feature with a similarity greater than the first preset threshold as the target feature.
[0165] In one possible implementation, the first electronic device can determine the similarity between the first feature and each second feature based on the cosine similarity between the first feature and each second feature. Alternatively, it can determine the similarity between the first feature and each second feature based on other similarity algorithms. This disclosure does not limit the specific implementation of these algorithms.
[0166] S603, the first electronic device determines the path data in the scene data of the planned driving scene corresponding to the target feature as the planned path of the driving scene to be planned.
[0167] Specifically, after determining the target feature whose similarity to the first feature is greater than the first preset threshold, since the target feature is a feature with a high similarity to the first feature, the first electronic device can determine the path data in the scene data of the planned driving scene corresponding to the target feature as the planned path of the driving scene to be planned.
[0168] Optionally, the first electronic device may also determine the driving data in the scene data of the planned driving scenario corresponding to the target feature as the driving data of the driving scenario to be planned.
[0169] In one feasible approach, the index also includes multiple categorical features; each categorical feature includes at least one secondary feature. In this case, such as... Figure 7 As shown in the embodiments of this disclosure, another path planning method is also provided, including:
[0170] S701, the first electronic device obtains the first feature corresponding to the first data based on the pre-trained driving data encoding model.
[0171] It should be noted that since the content of step S701 is the same as that of step S601, it will not be repeated here.
[0172] S702, the first electronic device determines a target category feature from multiple category features whose similarity to the first feature is greater than a first preset threshold, and determines at least one second feature included in the target category feature as the target feature.
[0173] Specifically, when the index includes multiple category features, each category feature includes at least one second feature that shares at least one common feature. This common feature can be called a clustering feature. In this case, the first electronic device can determine the similarity between the first feature and each clustering feature, and then determine the clustering feature whose similarity to the first feature is greater than a first preset threshold, and determine at least one second feature included in the target category feature corresponding to that clustering feature as the target feature.
[0174] For example, the multiple second features include: feature 1, feature 2, feature 3, and feature 4. The first electronic device can cluster the above four features to obtain two category features: a first category feature and a second category feature. The first category feature includes: feature 1 and feature 2. The second category feature includes: feature 3 and feature 4.
[0175] Assume the clustering feature of the first category is feature A, and the clustering feature of the second category is feature B. In this case, the first electronic device can determine that the first feature has a similarity of 50% with feature A and a similarity of 90% with feature B.
[0176] When the first preset threshold is 85%, the first electronic device can identify features 3 and 4 in the second category of features corresponding to feature B as target features.
[0177] Thus, in this embodiment of the present disclosure, the first electronic device can identify multiple target features for users to select in the path planning scenario, thereby enriching the user experience.
[0178] S703, the first electronic device determines the path data in the scene data of the planned driving scene corresponding to the target feature as the planned path of the driving scene to be planned.
[0179] It should be noted that since the content of step S703 is the same as that of step S603, it will not be repeated here.
[0180] In one feasible approach, the scene data also includes obstacle data and driving data. When there are multiple target features, the electronic device can determine the optimal target path based on the obstacle data and driving data corresponding to each target feature. In this case, such as Figure 8 As shown in the embodiments of this disclosure, another path planning method is also provided, including:
[0181] S801, the first electronic device obtains the first feature corresponding to the first data based on the pre-trained driving data encoding model.
[0182] S802, the first electronic device determines the similarity between the first feature and each second feature in the pre-created index library, and determines the second feature with a similarity greater than the first preset threshold as the target feature.
[0183] It should be noted that since the content of step S801 is the same as that of step S601, and the content of step S802 is the same as that of step S602, it will not be repeated here.
[0184] Furthermore, after determining a target feature whose similarity to the first feature is greater than a first preset threshold, the first electronic device determines the path data in the scene data of the planned driving scenario corresponding to the target feature as the planned path for the driving scenario to be planned. Specifically:
[0185] S803, the first electronic device acquires multiple scene data corresponding one-to-one with multiple target features.
[0186] Specifically, when there are multiple target features, the first electronic device acquires multiple scene data corresponding to each of the multiple target features, so as to determine the optimal target path based on the multiple scene data.
[0187] In one feasible approach, when the first electronic device establishes an index relationship between multiple second features and multiple second data, and stores the index relationship between multiple second features and multiple second data in a database, the first electronic device can read the index relationship between multiple second features and multiple second data in the database, and thus obtain multiple scene data that correspond one-to-one with multiple target features.
[0188] S804, the first electronic device determines the passage data corresponding to each scenario data based on the path data, obstacle data and driving data included in each scenario data.
[0189] The traffic data includes at least one of the following: collision rate, emergency braking rate, and traffic efficiency.
[0190] As can be seen from the above, in addition to path data, scene data also includes obstacle data and driving data. In this case, the first electronic device can determine the passage data corresponding to each scene data based on the path data, obstacle data and driving data included in each scene data.
[0191] For example, the first electronic device can divide the path in the planned scene corresponding to a certain scene data into 5 segments based on the path data in the scene data. Then, the first electronic device can determine the number of collisions (1) of the vehicle in the planned scene based on the obstacle data and driving data in the scene data. In this case, the first electronic device can determine that the collision rate corresponding to the scene data is 20%.
[0192] In another example, the first electronic device can divide the path in the planned scene corresponding to a certain scene data into 5 segments based on the path data in the scene data. Then, the first electronic device can determine the number of times the vehicle will brake suddenly in the planned scene based on the obstacle data and driving data in the scene data. In this case, the first electronic device can determine that the sudden braking rate corresponding to the scene data is 60%.
[0193] In another example, the first electronic device can determine the path length in the planned scenario corresponding to a certain scenario data as 10 kilometers based on the path data in that scenario data. Then, the first electronic device can determine the average speed of the vehicle in the planned scenario as 100 kilometers per hour based on the driving data in that scenario data. In this case, the first electronic device can determine the traffic efficiency corresponding to that scenario data as 10 kilometers / 100 kilometers per hour = 0.1.
[0194] S805, the first electronic device determines the priority of multiple scene data according to the traffic data corresponding to each scene data, and determines the path data in the scene data with a priority higher than the preset level as the planning path of the driving scene to be planned.
[0195] Specifically, after determining the access data corresponding to each scene data, the first electronic device can determine the priority of multiple scene data based on the access data corresponding to each scene data.
[0196] Optionally, the first electronic device can perform a weighted summation of data such as collision rate, emergency braking rate, and traffic efficiency in each traffic data point to obtain a weighted value corresponding to each traffic data point. Then, the first electronic device can determine the priority of each scene data point based on the weighted value corresponding to each traffic data point.
[0197] Next, the first electronic device can determine the path data from the scene data with a priority higher than a preset level as the planned path for the driving scene to be planned. In this way, in the path planning method provided by this embodiment, the first electronic device can determine the safest and most efficient planned path based on the traffic data corresponding to each scene data, thereby achieving optimal path planning.
[0198] The above mainly describes the path planning method provided by the embodiments of this disclosure from two processes. The complete process of the path planning method provided by the embodiments of this disclosure is described below, combining the above two processes. For example... Figure 9 As shown, the path planning method provided in this embodiment specifically includes:
[0199] S901, the first electronic device acquires multiple initial data.
[0200] Among them, multiple initial data sets included multiple sets of non-compliant data.
[0201] For example, Figure 9 The initial data in the data includes initial data 1, initial data 2, ..., initial data N.
[0202] S902, the first electronic device preprocesses the illegal data to obtain multiple second data and multiple third data.
[0203] For example, Figure 9 The multiple third data in the data include third data 1, third data 2, ..., third data M.
[0204] Where M is less than or equal to N.
[0205] S903 and the first electronic device train a model based on multiple third-party data to obtain a driving data encoding model.
[0206] S904, The first electronic device acquires the first data.
[0207] S905, the first electronic device obtains a first feature corresponding to the first data and multiple second features corresponding one-to-one with multiple second data according to a pre-trained driving data encoding model.
[0208] S906, The first electronic device establishes an index library including multiple second features and multiple second data.
[0209] S907. When there are multiple target features, the first electronic device acquires multiple scene data corresponding to the multiple target features one by one, and determines the passage data corresponding to each scene data based on the path data, obstacle data and driving data included in each scene data.
[0210] S908, the first electronic device determines the priority of multiple scene data according to the traffic data corresponding to each scene data, and determines the path data in the scene data with a priority higher than the preset level as the planning path of the driving scene to be planned.
[0211] The foregoing primarily describes the solutions provided by the embodiments of this disclosure from the perspective of computer devices. It is understood that, in order to achieve the above functions, the computer device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the path planning method steps described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0212] This disclosure embodiment can divide the path planning method into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The division of modules or units in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0213] like Figure 10 The diagram shown is a structural schematic of a path planning device provided in an embodiment of this disclosure. The path planning device includes: a processing unit 1001 and a determining unit 1002;
[0214] The processing unit 1001 is used to obtain a first feature corresponding to the first data based on a pre-trained driving data encoding model; the first data includes: scene data of the driving scenario to be planned;
[0215] The determining unit 1002 is used to determine the similarity between the first feature and each second feature in a pre-created index library, and to determine the second feature with a similarity greater than a first preset threshold as the target feature; the index library includes: the correspondence between multiple second data and multiple second features; the second data includes: scene data of planned driving scenarios; the scene data includes: path data; the number of target features is at least one.
[0216] The determining unit 1002 is also used to determine the path data in the scene data of the planned driving scene corresponding to the target feature as the planning path of the driving scene to be planned.
[0217] Optionally, the index may also include multiple category features; each category feature includes at least one second feature;
[0218] Unit 1002 is specifically used for:
[0219] From multiple category features, a target category feature with a similarity greater than a first preset threshold is determined, and at least one second feature included in the target category feature is determined as the target feature.
[0220] Optionally, the scene data also includes obstacle data and driving data; when there are multiple target features, the determination unit 1002 is specifically used for:
[0221] Acquire multiple scene data that correspond one-to-one with multiple target features;
[0222] Based on the path data, obstacle data, and driving data included in each scenario, determine the corresponding traffic data for each scenario; the traffic data includes at least one of the following: collision rate, emergency braking rate, and traffic efficiency;
[0223] Based on the traffic data corresponding to each scenario, the priority of multiple scenario data is determined, and the path data in the scenario data with a priority higher than the preset level is determined as the planning path for the driving scenario to be planned.
[0224] like Figure 11 The diagram shown is a structural schematic of a model training device provided in an embodiment of this disclosure. The model training device includes: an acquisition unit 1101 and a processing unit 1102;
[0225] The acquisition unit 1101 is used to acquire multiple third data; the third data includes: scene data of the planned driving scenario;
[0226] Processing unit 1102 is used to determine any two training data that meet preset conditions from multiple third data as positive sample pairs, thereby obtaining multiple positive sample pairs; the preset conditions include: the similarity between the first training data and the second training data is greater than a preset similarity; the first training data and the second training data are any two training data from multiple third data.
[0227] The processing unit 1102 is also used to determine any two training data that do not meet the preset conditions from multiple third data as a negative sample pair, thereby obtaining multiple negative sample pairs;
[0228] The processing unit 1102 is also used to train a driving data encoding model based on multiple positive sample pairs and multiple negative sample pairs.
[0229] The processing unit 1102 is further configured to determine that the similarity between the first training data and the second training data is greater than a preset similarity when the absolute value of the distance difference between the first Euclidean distance and the second Euclidean distance is less than the first preset distance, and the absolute value of the distance difference between the third Euclidean distance and the fourth Euclidean distance is less than the second preset distance; the first Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the first training data; the second Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the second training data; the third Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the first training data; and the fourth Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the second training data.
[0230] Optionally, the processing unit 1102 is specifically used for:
[0231] For each positive sample pair among multiple positive sample pairs, the positive sample pair is input into the model to be trained to obtain the first positive sample feature and the second positive sample feature; when the similarity between the first positive sample feature and the second positive sample feature is less than a second preset threshold, the model parameters of the model to be trained are adjusted based on the loss function.
[0232] For each negative sample pair among multiple negative sample pairs, the negative sample pair is input into the model to be trained to obtain the first negative sample feature and the second negative sample feature; when the similarity between the first negative sample feature and the second negative sample feature is greater than a third preset threshold, the model parameters of the model to be trained are adjusted based on the loss function.
[0233] When the model to be trained reaches the convergence state, the model to be trained in the convergence state is determined as the driving data encoding model.
[0234] Optionally, the acquisition unit 1101 is also used to acquire multiple fourth data; the fourth data includes: violation data in the scenario data of the planned driving scenario;
[0235] The processing unit 1102 is also used to preprocess the non-compliant data to obtain multiple third-party data; the preprocessing is used to update the non-compliant data into compliant data.
[0236] like Figure 12 The diagram shown is a structural schematic of an index database creation apparatus provided in an embodiment of this disclosure. The index database creation apparatus includes: a processing unit 1201 and a creation unit 1202;
[0237] The processing unit 1201 is used to obtain multiple second features corresponding one-to-one with multiple second data based on a pre-trained driving data encoding model; the second data includes: scene data of the planned driving scenario; the scene data includes: path data;
[0238] Establishment unit 1202 is used to establish an index library based on multiple second data and multiple second features; the index library includes: the correspondence between multiple second data and multiple second features.
[0239] Optionally, the index also includes multiple categorical features; each categorical feature includes at least one second feature; the establishment unit 1202 is specifically used for:
[0240] Based on a clustering algorithm, multiple second features are clustered to obtain multiple category features; each category feature includes at least one second feature.
[0241] Optionally, the processing unit 1201 is also used to acquire multiple fifth data; the fifth data includes: violation data in the scenario data of the planned driving scenario;
[0242] The processing unit 1201 is also used to preprocess the non-compliant data to obtain multiple second data; the preprocessing is used to update the non-compliant data into compliant data.
[0243] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0244] Figure 13 A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0245] like Figure 13 As shown, device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1102 or a computer program loaded from storage unit 1108 into random access memory (RAM) 1103. The RAM 1103 may also store various programs and data required for the operation of device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Input / output (I / O) interface 1105 is also connected to bus 1104.
[0246] Multiple components in device 1100 are connected to I / O interface 1105, including: input unit 1106, such as keyboard, mouse, etc.; output unit 1107, such as various types of monitors, speakers, etc.; storage unit 1108, such as disk, optical disk, etc.; and communication unit 1109, such as network card, modem, wireless transceiver, etc. Communication unit 1109 allows device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0247] The computing unit 1101 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central determination unit (CPU), a graphics determination unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as path planning methods. For example, in some embodiments, the path planning method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the path planning method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform path planning methods by any other suitable means (e.g., by means of firmware).
[0248] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, 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), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0249] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0250] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0251] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0252] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0253] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0254] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0255] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A path planning method, comprising: Based on a pre-trained driving data encoding model, a first feature corresponding to the first data is obtained; the first data includes: scene data of the driving scenario to be planned; The similarity between the first feature and each second feature in a pre-created index is determined, and the second features with a similarity greater than a first preset threshold are identified as target features; the index includes: a correspondence between multiple second data and multiple second features; the second data includes: scene data of planned driving scenarios; the scene data includes: path data; the number of target features is at least one. The path data in the scene data of the planned driving scenario corresponding to the target feature is determined as the planned path for the driving scenario to be planned. The pre-trained driving data encoding model is obtained through training in the following manner: Acquire multiple third-party data; the third-party data includes: scene data of the planned driving scenarios; Any two training data points that satisfy the preset conditions from the plurality of third data points are determined as positive sample pairs, resulting in a plurality of positive sample pairs; any two training data points that do not satisfy the preset conditions from the plurality of third data points are determined as negative sample pairs, resulting in a plurality of negative sample pairs. The preset conditions include: when the absolute value of the distance difference between the first Euclidean distance and the second Euclidean distance is less than the first preset distance, and the absolute value of the distance difference between the third Euclidean distance and the fourth Euclidean distance is less than the second preset distance, the similarity between the first training data and the second training data is determined to be greater than the preset similarity; the first training data and the second training data are any two training data from the plurality of third data. Wherein, the first Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within a first preset time period in the first training data; the second Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the second training data; the third Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within a second preset time period in the first training data; and the fourth Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the second training data; wherein, the first preset time period is included within the second preset time period; The driving data encoding model is obtained by training the multiple positive sample pairs and the multiple negative sample pairs.
2. The path planning method according to claim 1, wherein, The index also includes multiple category features; each category feature includes at least one second feature. The step of determining the similarity between the first feature and each second feature in a pre-created index, and identifying second features with a similarity greater than a first preset threshold as target features, includes: From the plurality of category features, a target category feature with a similarity greater than the first feature is determined, and at least one second feature included in the target category feature is determined as the target feature.
3. The path planning method according to claim 1 or 2, wherein, The scene data also includes obstacle data and driving data; when there are multiple target features, determining the path data in the scene data of the planned driving scene corresponding to the target feature as the planned path of the driving scene to be planned includes: Acquire multiple scene data that correspond one-to-one with multiple target features; Based on the path data, obstacle data, and driving data included in each scenario, the corresponding traffic data for each scenario is determined; the traffic data includes at least one of the following: collision rate, emergency braking rate, and traffic efficiency. Based on the traffic data corresponding to each scenario data, the priority of the multiple scenario data is determined, and the path data in the scenario data with a priority higher than the preset level is determined as the planning path of the driving scenario to be planned.
4. The path planning method according to claim 1, wherein, The step of training the driving data encoding model based on the plurality of positive sample pairs and the plurality of negative sample pairs includes: For each of the plurality of positive sample pairs, the positive sample pair is input into the model to be trained to obtain a first positive sample feature and a second positive sample feature; when the similarity between the first positive sample feature and the second positive sample feature is less than a second preset threshold, the model parameters of the model to be trained are adjusted based on the loss function. For each of the plurality of negative sample pairs, the negative sample pair is input into the model to be trained to obtain a first negative sample feature and a second negative sample feature; when the similarity between the first negative sample feature and the second negative sample feature is greater than a third preset threshold, the model parameters of the model to be trained are adjusted based on the loss function. When the model to be trained reaches a convergence state, the model to be trained in the convergence state is determined as the driving data encoding model.
5. The path planning method according to claim 1 or 4 further includes: Obtain multiple fourth data; The fourth type of data includes: violation data from the scenario data of the planned driving scenarios; The violation data is preprocessed to obtain the plurality of third data; the preprocessing is used to update the violation data to compliant data.
6. The path planning method according to claim 1, wherein, A method for creating an index database includes: the index database being determined in the following manner: Based on a pre-trained driving data encoding model, multiple second features are obtained that correspond one-to-one with the multiple second data; the second data includes: scenario data of the planned driving scenario; the scenario data includes: path data; An index library is established based on the plurality of second data and the plurality of second features; the index library includes the correspondence between the plurality of second data and the plurality of second features.
7. The path planning method according to claim 6, wherein the index database further comprises multiple category features; each category feature includes at least one second feature; the step of establishing the index database based on the multiple second data and the multiple second features comprises: Based on a clustering algorithm, the multiple second features are clustered to obtain the multiple category features; Each category feature includes at least one second feature.
8. The path planning method according to claim 6 or 7, further comprising: Obtain multiple fifth data; The fifth data includes: violation data in the scenario data of the planned driving scenarios; The violation data is preprocessed to obtain the plurality of second data; the preprocessing is used to update the violation data to compliant data.
9. A path planning device, comprising: Processing unit and determination unit; The processing unit is used to obtain a first feature corresponding to the first data based on a pre-trained driving data encoding model; the first data includes: scene data of the driving scenario to be planned; The determining unit is used to determine the similarity between the first feature and each second feature in a pre-created index library, and to determine the second feature with a similarity greater than a first preset threshold as the target feature; the index library includes: a correspondence between multiple second data and multiple second features; the second data includes: scene data of planned driving scenarios; the scene data includes: path data; the number of target features is at least one. The determining unit is further configured to determine the path data in the scene data of the planned driving scene corresponding to the target feature as the planned path of the driving scene to be planned. The processing unit is further used to train the pre-trained driving data encoding model, specifically including: Acquire multiple third-party data; the third-party data includes: scene data of the planned driving scenarios; Any two training data points that satisfy the preset conditions from the plurality of third data points are determined as positive sample pairs, resulting in a plurality of positive sample pairs; any two training data points that do not satisfy the preset conditions from the plurality of third data points are determined as negative sample pairs, resulting in a plurality of negative sample pairs. The preset conditions include: when the absolute value of the distance difference between the first Euclidean distance and the second Euclidean distance is less than the first preset distance, and the absolute value of the distance difference between the third Euclidean distance and the fourth Euclidean distance is less than the second preset distance, the similarity between the first training data and the second training data is determined to be greater than the preset similarity; the first training data and the second training data are any two training data from the plurality of third data. Wherein, the first Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within a first preset time period in the first training data; the second Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the first preset time period in the second training data; the third Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within a second preset time period in the first training data; and the fourth Euclidean distance is used to represent the Euclidean distance of the vehicle's travel path within the second preset time period in the second training data; wherein, the first preset time period is included within the second preset time period; The driving data encoding model is obtained by training the multiple positive sample pairs and the multiple negative sample pairs.
10. The path planning device according to claim 9, further comprising: Establish units; The processing unit is further configured to obtain multiple second features corresponding one-to-one with the multiple second data based on a pre-trained driving data encoding model; The second data includes: scenario data of the planned driving scenarios; the scenario data includes: path data; The establishment unit is used to establish an index library based on the plurality of second data and the plurality of second features; the index library includes: the correspondence between the plurality of second data and the plurality of second features.
11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.
14. An autonomous vehicle, including the electronic equipment as claimed in claim 11.