Automatic driving control method and trajectory retrieval and index construction method and device
By performing scene clustering and trajectory clustering on historical driving data, an index based on scene coding and trajectory clusters is constructed, which solves the problem of low trajectory planning accuracy in existing technologies and achieves more efficient and accurate trajectory retrieval.
Patent Information
- Application Number
- CN202310271927.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-03-16
Smart Images

Figure CN116186565B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data processing, and in particular to the technical field of automatic driving and intelligent transportation. BACKGROUND
[0002] With the development of automatic driving technology of vehicles, trajectory planning is crucial to alleviate the automatic driving technology. The trajectory planning generally searches for a historical scene with high similarity to the current scene, and takes the trajectory corresponding to the historical scene as the result of trajectory planning. Such trajectory planning method is difficult to meet the demand of trajectory planning. SUMMARY
[0003] The present disclosure provides an automatic driving control method and a trajectory retrieval and index construction method and device.
[0004] According to a first aspect of the present disclosure, a trajectory retrieval construction method is provided, comprising:
[0005] Obtaining scene encodings representing different driving scenes; the scene encodings are obtained by encoding scene data contained in historical driving data of different driving scenes, and the historical driving data further comprises trajectory data;
[0006] According to the scene encodings, the historical driving data is scene-clustered to obtain at least one scene cluster;
[0007] For each scene cluster, the trajectory data in the scene cluster is trajectory-clustered to obtain at least one trajectory cluster;
[0008] Based on the scene encodings and the trajectory clusters, an index is constructed, and the index is used for trajectory retrieval.
[0009] According to a second aspect of the present disclosure, a trajectory retrieval method is provided, comprising:
[0010] Obtaining current driving data of a vehicle in a current driving scene, the current driving data comprising scene data representing the current driving scene;
[0011] Encoding the scene data representing the current driving scene to obtain a current scene encoding representing the current driving scene;
[0012] According to the index, a trajectory cluster matching the current scene encoding is determined as a trajectory retrieval result, and the index is determined by the trajectory index construction method of the first aspect.
[0013] According to a third aspect of the present disclosure, an automatic driving control method is provided, comprising:
[0014] obtain a trajectory retrieval result of the vehicle in the current driving scene, the trajectory retrieval result being determined according to the trajectory retrieval method of the second aspect;
[0015] control the vehicle to automatically drive according to the trajectory retrieval result.
[0016] According to a fourth aspect of the present disclosure, a trajectory index construction device is provided, comprising:
[0017] a first obtaining module configured to obtain scene encodings representing different driving scenes, the scene encodings being obtained by encoding scene data contained in historical driving data of different driving scenes, the historical driving data further comprising trajectory data;
[0018] a scene clustering module configured to perform scene clustering on the historical driving data according to the scene encodings, to obtain at least one scene cluster;
[0019] a trajectory clustering module configured to, for each scene cluster, perform trajectory clustering on the trajectory data in the scene cluster, to obtain at least one trajectory cluster;
[0020] an index construction module configured to construct an index based on the scene encodings and the trajectory clusters, the index being used for trajectory retrieval.
[0021] According to a fifth aspect of the present disclosure, a trajectory retrieval device is provided, comprising:
[0022] a second obtaining module configured to obtain current driving data of the vehicle in the current driving scene, the current driving data comprising scene data representing the current driving scene;
[0023] an encoding module configured to encode the scene data representing the current driving scene, to obtain a current scene encoding representing the current driving scene;
[0024] a retrieval module configured to determine, according to the index, a trajectory cluster matching the current scene encoding as a trajectory retrieval result, the index being determined according to the trajectory index construction device of the fourth aspect.
[0025] According to a sixth aspect of the present disclosure, an automatic driving control device is provided, comprising:
[0026] a third obtaining module configured to obtain a trajectory retrieval result of the vehicle in the current driving scene, the trajectory retrieval result being determined according to the trajectory retrieval device of any one of the fifth aspect;
[0027] a driving control module configured to control the vehicle to automatically drive according to the trajectory retrieval result.
[0028] According to a seventh aspect of the present disclosure, an electronic device is provided, comprising:
[0029] at least one processor; and
[0030] a memory communicatively connected with the at least one processor; wherein
[0031] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform at least one of the methods of the first aspect, the second aspect, the third aspect.
[0032] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform at least one of the methods of the first aspect, the second aspect, the third aspect.
[0033] According to a ninth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements at least one of the methods of the first aspect, the second aspect, the third aspect.
[0034] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0036] Figure 1 is a flowchart of a trajectory index construction method according to an exemplary embodiment of the present disclosure;
[0037] Figure 2 is a flowchart of a trajectory retrieval method according to an exemplary embodiment of the present disclosure;
[0038] Figure 3 is a flowchart of an automatic driving control method according to an exemplary embodiment of the present disclosure;
[0039] Figure 4 is a module schematic diagram of a trajectory index construction device according to an exemplary embodiment of the present disclosure;
[0040] Figure 5 is a module schematic diagram of a trajectory retrieval device according to an exemplary embodiment of the present disclosure;
[0041] Figure 6 is a module schematic diagram of an automatic driving control device according to an exemplary embodiment of the present disclosure;
[0042] Figure 7 is a block diagram of an electronic device according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding them. These should be considered in their context only. Thus, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for the sake of clarity and conciseness.
[0044] With the development of automatic driving technology of vehicles, trajectory planning, as a crucial step in the automatic driving technology, is generally implemented based on trajectory retrieval of scene data. Since the scene data collected by conventional technologies is often presented in the form of images or other data, it is difficult to retrieve the required trajectory data from the index library constructed based on such data forms in the trajectory planning process. Therefore, in the construction of the index of trajectory planning, the scene data under the historical driving scene needs to be encoded first. The scene encoding obtained based on the scene data can preserve the scene features of each scene data while unifying the data format of the scene data, facilitating the construction of the index library. Then, the index library is constructed according to the scene encoding. When trajectory planning is performed, the historical driving scene matching the current scene encoding is queried in the index library according to the current scene encoding under the current driving scene, and the trajectory data corresponding to the historical driving scene is taken as the retrieval result of trajectory planning. Among them, the construction of the index library and trajectory retrieval are important steps to achieve trajectory planning. The existing trajectory retrieval generally adopts a similar encoding retrieval method, that is, the scene encoding of a single historical driving scene is taken as the construction and retrieval object of the index library. Since there may be deviations in the encoding algorithm for encoding the scene data in the construction and application process, the obtained scene encoding cannot accurately represent the corresponding scene data. Therefore, there will be a large amount of noise in the trajectory data obtained in the retrieval process based on the similar encoding retrieval method, resulting in a low recall rate of the retrieved trajectory, and further affecting the accuracy of trajectory planning.
[0045] Based on this, an example embodiment of the present disclosure provides a trajectory index construction method, Figure 1 A flowchart of a trajectory index construction method provided by an example embodiment of the present disclosure is provided, and the construction method includes:
[0046] S 101, scene encoding representing different driving scenes is obtained.
[0047] The scene encoding is obtained by encoding the scene data contained in the historical driving data of different driving scenes, and the historical driving data further includes trajectory data.
[0048] One trajectory data corresponds to one driving scene, and the trajectory data includes continuous first driving trajectory and second driving trajectory. The collection time node of the first driving data matches the collection time node of the scene data, and the first driving data can include the driving trajectory of the vehicle in a preset time period before the collection time node of the first driving data. The second driving data includes the driving trajectory of the vehicle in a preset time period in the future after the collection time node of the first driving data.
[0049] For historical driving data of different driving scenes, the vehicle can be collected during a road running experiment. During the road running experiment, the historical driving data can be collected by GPS (Global Positioning System) or a camera mounted on the vehicle body or the driving position. In this embodiment, the collection process of the historical driving data is not particularly limited, and can be selected according to actual conditions.
[0050] The historical driving data is described by taking straight driving of a vehicle at an intersection as an example:
[0051] During the road running experiment of the vehicle for automatic driving, the data of the vehicle when driving straight at the intersection is collected to obtain one or more continuous time period collection data. The collection data can be collected from the driving position as the main collection perspective, and the obtained trajectory data can be used as a reference for trajectory planning by the driver. The collection data of each continuous time period includes one or more frames of historical driving data, each frame corresponds to one driving scene, and each frame of historical driving data includes one or more of the scene data, the trajectory data, but is not limited to.
[0052] S102, scene clustering of the historical driving data is performed according to the scene coding to obtain at least one scene cluster.
[0053] The scene cluster includes at least one historical driving data, and the similarity between the historical driving data in the same scene cluster is high.
[0054] In the embodiments of the present disclosure, the historical driving data of similar driving scenes with high similarity can be collected in the same scene cluster by the scene coding, and the historical driving data of driving scenes with low similarity can be distinguished. In this way, the similar driving scenes with a large number of common features in different driving scenes can be aggregated by the clustering algorithm. When subsequent trajectory planning is performed, the similar scene clusters can be directly searched, and the trajectory data included in the similar scene clusters can be used as the search result of the trajectory planning, without indexing the similar driving scenes from a large amount of unordered data. The algorithm for trajectory planning can be reduced, and the efficiency of trajectory planning can be improved.
[0055] S103, for each scene cluster, trajectory clustering is performed on the trajectory data in the scene cluster to obtain at least one trajectory cluster.
[0056] In one trajectory cluster, at least one trajectory data is contained, and the similarity between the trajectory data in the same trajectory cluster is high. The more the number of trajectory data contained in the trajectory cluster, the more likely it is to use the trajectory data in the trajectory cluster as the target trajectory data for trajectory planning in the corresponding driving scene, the less noise when the trajectory cluster is used as the trajectory retrieval result, and the higher the trajectory planning accuracy.
[0057] In addition, for example, due to the coding bias in the above process of encoding the scene data, for example, in the process of encoding the scene data representing driving scene A, due to the coding bias, the final obtained scene code represents driving scene B. In the process of scene clustering, there are two cases for this piece of historical driving data: one is to be allocated to the corresponding scene cluster alone; two, together with other historical driving data, is clustered into a scene cluster similar to driving scene B. For the first case, in the process of trajectory planning, the scene cluster with low coding similarity will be filtered to reduce the noise in the retrieval result caused by coding error; for the second case, since this piece of historical driving data actually represents driving scene A, the trajectory data contained in this piece of historical driving data is not similar to the trajectory data under driving scene B. By performing trajectory clustering on the scene cluster similar to driving scene B, the trajectory data of this piece of historical driving data will be allocated to a trajectory cluster alone, and in the subsequent trajectory planning, this kind of trajectory will be filtered, thereby avoiding the error caused by the error scene code in the coding process to the trajectory planning.
[0058] S104, constructing an index based on the scene code and the trajectory cluster.
[0059] The index is used for trajectory retrieval.
[0060] For each scene cluster, the centroid code of the scene cluster can be used as the index identifier of the scene cluster, and the trajectory cluster in the scene cluster can be used as the index value of the scene cluster. The index identifier can be understood as the key of the index, and the index value can be understood as the value of the index. Wherein, the centroid code of each scene cluster is constructed according to the scene code contained in each scene cluster. In the subsequent process of trajectory retrieval, the trajectory cluster under the corresponding driving scene can be retrieved through the centroid code.
[0061] In the embodiments of the present disclosure, the two times of clustering can reduce the noise brought by errors in encoding the scene data of the driving scene to the retrieval result of the trajectory. The two times of clustering of the historical driving data in the scene clustering process can cluster the historical driving data in a similar driving scene into the same scene cluster, and the trajectory clustering process can cluster the trajectory data in each scene cluster into the same trajectory cluster. The index constructed by clustering can effectively reduce the noise brought by errors in the encoding process of the scene data to the retrieval result.
[0062] In one embodiment, in order to make the clustering result of the historical driving data more accurate, the historical driving data can further include historical driving data, and the historical driving data includes the driving trajectory of the vehicle in a preset time period with the collection time of the scene data as the time node.
[0063] In one embodiment, the scene encoding representing different driving scenes obtained in step S101 specifically includes:
[0064] According to the encoding strategy, the scene data of different driving scenes is encoded respectively to obtain the scene encoding corresponding to each driving scene.
[0065] The scene data includes but is not limited to any one or more of obstacle data, road topology data, which can be selected according to actual conditions. The encoding form includes but is not limited to any one or more of ordinal encoding, vector encoding, which can be selected according to actual conditions. In the present embodiment, vector encoding is preferably used. Compared with other encoding methods, vector encoding can effectively represent the scene features in the scene data.
[0066] In one embodiment, the encoding strategy can include:
[0067] The scene features are extracted from the scene data representing the driving scene, and the scene features are encoded.
[0068] The scene features can be obstacle features in the obstacle data and road topology features in the road topology data.
[0069] In one embodiment, the encoding strategy can include:
[0070] The scene data representing the driving scene is encoded by using an encoding algorithm.
[0071] The encoding algorithm used in the present embodiment is not particularly limited and can be selected according to actual conditions.
[0072] In one embodiment, the encoding strategy can include:
[0073] The scene data characterizing the driving scene is input into the encoding model to extract scene features from the scene data characterizing the driving scene by the encoding model and encode the scene features.
[0074] Taking vector encoding as an example, the implementation of encoding the scene data by the encoding model to obtain the scene encoding is described as follows:
[0075] The scene data is input into the encoding model to extract scene features from the scene data by the encoding model and output an n-dimensional vector as the scene encoding of the scene data according to the extracted scene features, as follows:
[0076] v i =SceneModel(Obs i ,Map i )
[0077] Wherein, SceneModel represents the encoding model, Obs i represents the obstacle data corresponding to the i-th driving scene, Map i represents the road topology data corresponding to the i-th driving scene, and v i represents the i-th scene encoding.
[0078] The encoding model can be obtained by self-supervised contrast training. The network architecture, training process, and acquisition process of the training sample of the encoding model can be referred to the related technical description, which will not be described here.
[0079] It should be noted that, since the provided embodiment is a driving scene of straight driving at an intersection, the encoding strategy of the scene encoding in the embodiment of the present disclosure only exemplifies the case that the scene data includes obstacle data and road topology data, but is not limited thereto. For example, in the trajectory planning for the driving scene of turning the vehicle, the scene data can also include path data, etc., which can specifically determine the path of the vehicle when turning. By extracting the path features of the driving scene, a more accurate matching result of the scene data can be obtained.
[0080] In the embodiment of the present disclosure, the scene encoding can be determined by encoding the scene data to characterize the scene features in different driving scenes, facilitating clustering and searching of historical driving data, simplifying the searching process, improving the searching efficiency, and reducing the risk of trajectory planning in autonomous driving.
[0081] In one embodiment, the scene clustering of the historical driving data according to the scene encoding in step S102 specifically includes:
[0082] determine scene similarity between scene encodings, and divide the historical driving data into at least one scene cluster according to the scene similarity.
[0083] The clustering algorithm can adopt a hierarchical clustering algorithm, for example, Agglomerative clustering, but is not limited to the hierarchical clustering algorithm, and can be selected according to actual conditions. The scene similarity can adopt a cosine similarity, but is not limited to the cosine similarity, and can be selected according to actual conditions. Specifically, the historical driving data corresponding to the scene encodings with a cosine similarity greater than a first similarity threshold can be clustered into the same cluster by the hierarchical clustering algorithm, to obtain the corresponding scene cluster.
[0084] The scene clustering is described in a specific implementation manner:
[0085] The historical driving data meta_data is clustered by Agglomerative clustering, the cosine similarity is adopted to determine the scene similarity between scene encodings, the first similarity threshold is set to 0.7, the historical driving data with a first similarity greater than 0.7 is clustered into the same cluster in the clustering process, to obtain a set of scene clusters, and the set of scene clusters includes at least one scene cluster, as shown below:
[0086]
[0087] wherein M represents the number of scene clusters, is the centroid encoding of the i-th scene cluster, and T i represents a trajectory data set of the i-th scene cluster, and the trajectory data set includes the trajectory data in the historical driving data clustered into the same scene cluster.
[0088] The historical driving data meta_data, the centroid encoding and the trajectory set T i are respectively represented by the following formulas:
[0089] The historical driving data meta_data is as follows:
[0090] meta_date={(v i , s i )|i=1, 2,..., N}
[0091] wherein v i represents the scene encoding under the i-th historical driving scene, and s i represents the trajectory data under the i-th historical driving scene.
[0092] The centroid encoding is as follows:
[0093]
[0094] wherein v ij represents the jth scene encoding in the ith scene cluster, c i represents the number of scene data in the scene cluster.
[0095] a set of trajectory data T i As follows:
[0096]
[0097] wherein, represents the cth scene encoding in the ith scene cluster, c i represents the trajectory data of the ith trajectory in the ith scene cluster.
[0098] The cosine similarity as the scene similarity of the scene clustering is that the driving scene is generally represented by encoding, and the cosine similarity can calculate the similarity between two scene encodings. When the cosine similarity is higher, the similarity between the scene encodings is also higher, that is, the driving scenes are more coincident. By aggregating the historical driving data under the driving scenes with high similarity together and distinguishing the historical driving data under the driving scenes with low similarity, some incorrect scene encodings or dissimilar driving data are avoided to output noise for trajectory retrieval.
[0099] In addition, since the centroid encoding is actually calculated by averaging the scene encodings in the scene cluster, it can represent the common features of the driving scenes in the entire scene cluster. Therefore, in the index construction, the centroid encoding constructed by the scene encodings can be used as the identification of the scene cluster, that is, the index identification, so as to represent the common features of the scene encodings in the scene cluster, so that the corresponding scene cluster can be quickly retrieved in the process of trajectory retrieval.
[0100] In the embodiments of the present disclosure, for the case that a single driving scene indexes trajectory data of a single driving scene in the prior art, two dissimilar scenes may be matched together due to the deviation in encoding the driving scene, resulting in inaccurate retrieval results of the final trajectory. Therefore, by performing scene clustering on historical driving data, historical driving data under similar driving scenes can be clustered together. For some historical driving data whose scene encoding is inaccurate due to the deviation of the encoding model, the historical driving data cannot be clustered in the scene cluster of similar driving scenes in the process of scene clustering, and can be filtered out by encoding similarity in the subsequent retrieval results. Even if these inaccurate historical driving data are clustered in the similar scene cluster, the historical driving data can be filtered out by trajectory clustering in the process of trajectory clustering, so as to correspondingly reduce the error caused by the inaccurate historical driving data and reduce the noise caused by the encoding error in the retrieval results.
[0101] In one embodiment, the trajectory clustering of the trajectory data in each scene cluster in step S103 specifically includes:
[0102] determining trajectory similarity between the trajectory data, and dividing the trajectory data into at least one trajectory cluster according to the trajectory similarity.
[0103] The trajectory similarity can be the Euclidean distance between the trajectory data. By clustering the trajectory data with trajectory similarity less than a second similarity threshold into the same cluster, the corresponding trajectory cluster is obtained.
[0104] The algorithm of trajectory clustering is described below through a specific implementation. For the trajectory data set T i The trajectory clustering can be performed through the following steps:
[0105] a trajectory data S is randomly selected from the trajectory data set T i and is added to the trajectory cluster traj_group, and a trajectory data S is randomly selected from the trajectory set T iThe remaining trajectory data is randomly selected as one other trajectory data S', the Euclidean distance between the trajectory data S and S' is calculated, when the Euclidean distance is less than the second similarity threshold θ, the trajectory data S' is added to the trajectory cluster corresponding to S, until the clustering of all historical trajectory data is completed, and the trajectory cluster set of each scene cluster is obtained, and the trajectory cluster set includes at least one trajectory cluster. For each trajectory cluster set of the obtained scene cluster, the more the number of trajectory data in the trajectory cluster, the greater the possibility of representing the trajectory data in the trajectory cluster as a retrieval result, so the trajectory clusters are generally arranged in descending order of the number of trajectory data.
[0106] The threshold range of the second similarity threshold θ includes a horizontal distance of 0.1 meters and a vertical distance of 0.3 meters, which is only for reference and is not particularly limited in the embodiment, and can be selected according to actual conditions.
[0107] The purpose of using the Euclidean distance as the trajectory similarity is to determine whether the compared trajectory data is similar, and the smaller the Euclidean distance, the higher the similarity of the two trajectory data, and when the Euclidean distance is close to 0, the two historical trajectory data are close to coincidence. In this way, the historical trajectory data close to coincidence can be screened out and clustered into the same trajectory cluster.
[0108] In the embodiment of the present disclosure, the trajectory clustering method is used to cluster the trajectory data with high similarity into one trajectory cluster and distinguish the trajectory data with low similarity. When the scene encoding is performed in the upstream, the model bias causes the trajectory data error to fall into the current scene cluster. Since the trajectory data in different driving scenes is quite different, and the trajectory data in the same driving scene is less different, the trajectory clustering method can distinguish these trajectory data that do not belong to the current driving scene, so as to avoid the trajectory data that do not belong to the current driving scene as the trajectory retrieval result. On the one hand, the noise of the trajectory retrieval result is reduced, and on the other hand, the accuracy of the trajectory planning is improved.
[0109] In one embodiment, the step S104 of constructing the index based on the scene encoding and the trajectory cluster specifically includes:
[0110] The centroid encoding of the scene cluster is determined according to the scene encoding; the centroid encoding of the scene cluster is used as the index identifier of the scene cluster, and the trajectory cluster in the scene cluster is used as the index value of the scene cluster.
[0111] The index identifier can be understood as the key of the index, and the index value can be understood as the value of the index. The calculation method of the centroid encoding of the scene cluster can refer to the method of calculating the centroid encoding in the above embodiment, that is, This will not be described in detail here.
[0112] In addition, in the construction of the index, the trajectory clusters in the scene cluster can be arranged in order from more to less of the number of trajectory data in each trajectory cluster, and the arranged trajectory cluster is taken as the index value of the scene coding index. The more the number of trajectory data in each trajectory cluster, the more the trajectory data in the trajectory cluster represents the situation of adopting the trajectory data in the driving scene. Taking the trajectory cluster arranged in order of the number of trajectory data as the index value of the scene coding index facilitates improving the speed of trajectory retrieval and effectively screening out trajectory data not belonging to the driving scene for filtering.
[0113] In a specific implementation, the index scene_cluster' of the trajectory cluster can be constructed by the following formula:
[0114]
[0115] wherein, the centroid coding representing the i-th scene cluster, traj_cluster i the trajectory cluster set representing the i-th scene cluster, M represents the number of scene clusters.
[0116] In a specific implementation, taking the scene coding as a vector coding as an example, the index in step S104 can be constructed by using an approximate vector index algorithm to obtain a final index index, and the index index is stored in a faiss library (an open source database) for subsequent trajectory retrieval.
[0117] In the embodiments of the present disclosure, since the scene cluster contains more than one scene coding, the retrieval mode of retrieving a single driving scene and its corresponding trajectory data through a single driving scene usually can only obtain a single trajectory data as the retrieval result, and the error of the retrieval result is large. Therefore, taking the centroid coding as the key of the index of the scene cluster can obtain an index represented by the scene cluster, and taking the trajectory cluster as the value of the index. For each trajectory cluster, the more the number of trajectory data in the trajectory cluster, the more the trajectory data in the trajectory cluster represents the situation of adopting the trajectory data in the driving scene, thereby reducing the error in the trajectory retrieval result, and providing more accurate trajectory data as the reference for trajectory planning in the process of trajectory planning.
[0118] The exemplary embodiments of the present disclosure also provide a trajectory retrieval method, Figure 2 A flowchart of a trajectory retrieval method provided by the embodiments of the present disclosure is shown in FIG. 2. The retrieval method includes the following steps.
[0119] S201, obtaining current driving data of a vehicle in a current driving scene.
[0120] The current driving data includes a current scene code representing a current driving scene.
[0121] S202, encode scene data representing a current driving scene to obtain a current scene code representing the current driving scene.
[0122] The scene data can be collected by GPS, camera, etc.
[0123] S203, determine a trajectory cluster matching the current scene code according to the index as a trajectory retrieval result.
[0124] In the embodiments of the present disclosure, by encoding the current scene data and determining the trajectory cluster matching the current scene code according to the index, the trajectory data in the trajectory cluster corresponding to the similar historical driving scene of the current driving scene can be obtained from the index as the result of trajectory planning, which can reduce the interference of trajectory data of other dissimilar driving scenes on the trajectory retrieval result. The trajectory cluster obtained finally can adapt to the demand of the current driving scene and reduce the noise interference in the trajectory retrieval result.
[0125] The index is determined according to the construction method of the trajectory index in the above embodiments.
[0126] In one embodiment, the encoding of the scene data representing the current driving scene in step S202 to obtain the current scene code representing the current driving scene specifically includes:
[0127] The scene data representing the current driving scene is encoded according to the same encoding strategy as when the index is constructed.
[0128] The scene data includes but is not limited to any one or more of obstacle data, road topology data, which can be selected according to actual conditions. The encoding form includes but is not limited to any one or more of ordinal encoding, vector encoding, which can be selected according to actual conditions. In the present embodiment, vector encoding is preferably used, which can effectively represent the scene features in the scene data compared with other encoding methods.
[0129] In an implementable manner, the encoding strategy can include:
[0130] Scene features are extracted from the scene data representing the driving scene, and the scene features are encoded.
[0131] The scene features can include but are not limited to obstacle features in the obstacle data and road topology features in the road topology data, etc.
[0132] In an implementable manner, the encoding strategy can include:
[0133] The scene data representing the driving scene is encoded using an encoding algorithm.
[0134] In one implementation, the encoding strategy can include:
[0135] The scene data representing the driving scene is input into an encoding model to extract scene features from the scene data representing the driving scene by the encoding model and encode the scene features.
[0136] An implementation of encoding the current scene data by the encoding model to obtain the current scene encoding is described taking vector encoding as an example:
[0137] The scene data is input into the encoding model to extract scene features from the scene data by the encoding model and output an n-dimensional vector as the scene encoding of the scene data according to the extracted scene features, as follows:
[0138] v = SceneModel (Obs, Map)
[0139] Wherein, SceneModel represents the encoding model, Obs represents the obstacle data corresponding to the current driving scene, Map represents the road topology data corresponding to the current driving scene, and v represents the current scene encoding.
[0140] The encoding model can be obtained through self-supervised contrast training. The network architecture of the encoding model, the training process, and the acquisition process of the training sample can be referred to the related technical description, which will not be described here.
[0141] It should be noted that, since the provided embodiment is a driving scene of straight driving at an intersection, the encoding strategy of the scene encoding in the embodiment of the present disclosure only exemplifies the case that the scene data includes obstacle data and road topology data, but is not limited thereto. For example, in a driving scene of turning, the current scene data can further include current route data, etc.
[0142] In the embodiment of the present disclosure, the scene encoding can be determined by encoding the scene data to extract scene features in different driving scenes for representation, which facilitates clustering and storage of the current driving data, simplifies the retrieval process during trajectory planning, improves retrieval efficiency, and reduces the risk of trajectory planning in autonomous driving.
[0143] Taking straight driving of a car at an intersection as an example, the current driving data is described:
[0144] In the process of trajectory planning for straight driving of the car at the intersection, the data of the vehicle during straight driving at the intersection is collected, and the collected data is analyzed to determine the current driving scene. The current driving data includes any one or more of the current driving data, the current route data, and the current road topology data.
[0145] In one embodiment, the step S203 of determining the trajectory cluster matching the current scene code according to the index specifically comprises:
[0146] determining the code similarity between the current scene code and the centroid code of the scene cluster.
[0147] The code similarity can be determined by using an approximate vector algorithm or a cosine similarity, which is not particularly limited herein.
[0148] The scene clusters are arranged in descending order of the code similarity, and all or part of the trajectory clusters in the first n scene clusters are determined as the trajectory clusters matching the current scene code according to the arrangement order of the code similarity, where n can be selected according to actual conditions, which is not particularly limited herein.
[0149] The index of the trajectory is described below through a specific implementation manner:
[0150] The current obstacle information and the current road topology information are input into a scene coding model SceneModel, and the current scene code v is calculated.
[0151] The current scene code v is indexed, and the first n scene clusters with the highest similarity are recalled in the index as the scene clusters matching the current scene code. The trajectory clusters in the scene clusters are arranged in descending order of the similarity, and are sequentially added to a target trajectory set traj as the trajectory retrieval result.
[0152] In the embodiments of the present disclosure, the scene clusters in the index are arranged according to the code similarity. The scene clusters with low similarity can be filtered to filter out the scene clusters corresponding to the driving scenes that do not match the current driving scene, so as to avoid outputting the trajectory data in the similar driving scenes, to avoid noise interference to the trajectory retrieval result, to obtain the trajectory retrieval result that is more matched to the current driving scene, and to improve the accuracy of the trajectory retrieval result.
[0153] In one embodiment, for the first n scene clusters in the arrangement order, the trajectory clusters in the first n scene clusters determined in the step S203 are arranged in descending order of the number of trajectory data in each trajectory cluster, because the trajectory clusters in each scene cluster are arranged in descending order of the number of trajectory data in each trajectory cluster in the process of constructing the index. Referring to the above arrangement order, the above embodiment of determining all or part of the trajectory clusters in the first n scene clusters as the trajectory clusters matching the current scene code according to the arrangement order of the code similarity includes the following two implementation manners:
[0154] The first kind is to determine the trajectory cluster satisfying a quantity condition in the n scene clusters as the trajectory cluster matched with the current scene code; wherein the quantity condition includes that the number of trajectory data contained in the trajectory cluster is greater than a data quantity threshold.
[0155] The data quantity threshold can be selected according to actual conditions, and is not particularly limited herein. The trajectory cluster not satisfying the quantity condition in the scene cluster is filtered through the data quantity threshold. The trajectory cluster not satisfying the quantity condition can be caused by the deviation of the scene coding algorithm in the construction process of the trajectory index, and thus, filtering out the trajectory cluster can improve the accuracy of the trajectory retrieval result and reduce the noise in the retrieval result.
[0156] The second kind is to determine the trajectory cluster satisfying a quantity condition in the n scene clusters as the trajectory cluster matched with the current scene code; wherein the quantity condition includes that the arrangement order of the number of trajectory data contained in the trajectory cluster in the corresponding scene cluster is the first m, that is, the first m trajectory clusters are selected from each determined scene cluster according to the arrangement order of the trajectory cluster in the corresponding scene cluster.
[0157] The m can be selected according to actual conditions, and is not particularly limited herein.
[0158] In the embodiments of the present disclosure, the purpose of arranging the trajectory clusters in the scene cluster according to the number of trajectory data in each trajectory cluster is that the more the number of trajectory data contained in the trajectory cluster, the more the trajectory data in the trajectory cluster satisfies the demand of the trajectory retrieval under the current driving scene, the greater the possibility of selecting the trajectory data in the trajectory cluster as the target trajectory data, the higher the accuracy of the trajectory retrieval result, and the smaller the noise. In addition, for the trajectory cluster containing a small number of trajectory data, especially the trajectory cluster containing only one piece of trajectory data, the trajectory data not belonging to the scene cluster can be incorrectly allocated to the scene cluster due to the deviation of the coding algorithm in the index construction process, and the trajectory data cannot be clustered with other trajectory data when trajectory clustering is performed, but is allocated to a trajectory cluster alone. Therefore, arranging the first m trajectory clusters as the matched trajectory cluster can filter the trajectory cluster caused by the error of the coding algorithm, further improve the accuracy of the retrieval result, and reduce the noise in the retrieval result.
[0159] Another kind of automatic driving control method is provided in the exemplary embodiments of the present disclosure. Figure 3 A flowchart of an automatic driving control method is provided in the exemplary embodiments of the present disclosure, and the automatic driving control method includes:
[0160] S301, obtaining a trajectory retrieval result of a vehicle under a current driving scene.
[0161] The trajectory retrieval result is determined according to the trajectory retrieval method as in the above embodiment.
[0162] S302, controlling the vehicle to automatically drive according to the trajectory retrieval result.
[0163] In the embodiments of the present disclosure, referring to the content stated in the above embodiments, the trajectory retrieval result is finally characterized in the form of a trajectory cluster and filtered and sorted according to the coding similarity of the driving scene, which can improve the accuracy of the trajectory retrieval result and make the trajectory planning for the vehicle automatic driving more accurate.
[0164] In one embodiment, the trajectory planning according to the trajectory retrieval result in step S302 specifically includes:
[0165] The target trajectory data contained in the trajectory cluster as the trajectory retrieval result is subjected to driving rule verification, and the vehicle is controlled to automatically drive according to the target trajectory data subjected to the driving rule verification.
[0166] The trajectory retrieval result can be the target trajectory set traj obtained in the above embodiments. All trajectory data contained in the target trajectory set traj can be taken as the target trajectory data, or the trajectory data in the trajectory cluster with the top z ranking order can be selected as the target trajectory data in sequence according to the ranking order of the trajectory cluster in the target trajectory set, so as to reduce the computing power of the automatic driving planning. The z can be selected according to the actual situation, which is not specifically limited here.
[0167] Since the trajectory retrieval result obtained in the above embodiments usually contains multiple trajectory data, in order to obtain the final target trajectory data to meet the actual driving needs of the vehicle, the trajectory data needs to be subjected to driving rule verification, and the trajectory data meeting the driving rule verification is taken as the target trajectory data, so as to improve the accuracy of the trajectory planning and the safety of the vehicle driving.
[0168] In one embodiment, the target trajectory data includes a continuous first driving trajectory and a second driving trajectory.
[0169] The driving rule verification of the target trajectory data as the trajectory retrieval result in step S302 specifically includes:
[0170] The first driving trajectory is subjected to driving rule verification.
[0171] The vehicle is controlled to automatically drive according to the target trajectory data subjected to the driving rule verification in step S302 specifically includes:
[0172] The second driving trajectory corresponding to the first driving trajectory passing the driving rule verification is determined as a planning trajectory, and the vehicle is controlled to automatically drive according to the planning trajectory.
[0173] In the embodiment of the present disclosure, the trajectory is subjected to driving rule verification, and when the driving rule verification passes, the trajectory data can be directly used as target running trajectory data. Since the trajectory data in the trajectory cluster is obtained by clustering according to the trajectory similarity, the trajectory data in the same trajectory cluster has high similarity. When one of the trajectory data passes the driving rule verification, the other trajectory data can be discarded, so as to reduce the calculation amount of trajectory planning while ensuring the accuracy of trajectory planning.
[0174] An example embodiment of the present disclosure provides a trajectory index construction device, Figure 4 A module schematic diagram of a trajectory index construction device provided in an embodiment of the present disclosure is provided, and the construction device includes:
[0175] The first acquisition module 41 is configured to acquire scene codes representing different driving scenes; the scene codes are obtained by encoding scene data contained in historical driving data of different driving scenes, and the historical driving data further includes trajectory data;
[0176] The scene clustering module 42 is configured to perform scene clustering on the historical driving data according to the scene codes, to obtain at least one scene cluster;
[0177] The trajectory clustering module 43 is configured to, for each scene cluster, perform trajectory clustering on the trajectory data in the scene cluster, to obtain at least one trajectory cluster;
[0178] The index construction module 44 is configured to construct an index based on the scene codes and the trajectory clusters, and the index is used for trajectory retrieval.
[0179] In one embodiment, the first acquisition module 41 is further configured to:
[0180] The scene data of different driving scenes is encoded according to an encoding strategy, to obtain scene codes corresponding to each driving scene;
[0181] The encoding strategy includes at least one of the following:
[0182] The scene features are extracted from the scene data representing the driving scene, and the scene features are encoded;
[0183] The scene data representing the driving scene is encoded by using an encoding algorithm:
[0184] inputting scene data characterizing the driving scene into an encoding model to extract scene features from the scene data characterizing the driving scene by the encoding model and encode the scene features.
[0185] In one embodiment, the scene clustering module 42 comprises:
[0186] a first determining unit configured to determine cosine similarity between the scene encodings;
[0187] a first dividing unit configured to divide the historical driving data into at least one scene cluster according to the cosine similarity.
[0188] In one embodiment, the scene clustering module 42 comprises:
[0189] a second determining unit configured to determine Euclidean distance between the trajectory data;
[0190] a second dividing unit configured to divide the trajectory data into at least one trajectory cluster according to the Euclidean distance.
[0191] In one embodiment, the index construction module 44 comprises:
[0192] a third determining unit configured to determine a centroid encoding of the scene cluster according to the scene encodings;
[0193] a first indexing unit configured to take the centroid encoding of the scene cluster as an index identifier of the scene cluster and take the trajectory clusters in the scene cluster as index values of the scene cluster.
[0194] In one embodiment, the first indexing unit is further configured to:
[0195] arrange the trajectory clusters in the scene cluster in descending order of the number of trajectory data in each trajectory cluster and take the arranged trajectory clusters as the index values of the scene cluster.
[0196] An example embodiment of the present disclosure provides a trajectory retrieval device, Figure 5 An example embodiment of the present disclosure provides a module schematic diagram of a trajectory retrieval device, which comprises:
[0197] a second obtaining module 51 configured to obtain current driving data of a vehicle in a current driving scene, the current driving data comprising scene data characterizing the current driving scene;
[0198] an encoding module 52 configured to encode the scene data characterizing the current driving scene to obtain a current scene encoding characterizing the current driving scene;
[0199] The retrieval module 53 is configured to determine, according to the index, the trajectory cluster matching the current scene code as a trajectory retrieval result, and the index is determined according to the trajectory index construction device in the above embodiment.
[0200] In one embodiment, the encoding module 52 is further configured to:
[0201] The scene data representing the current driving scene is encoded according to the same encoding strategy as when constructing the index.
[0202] In one embodiment, the retrieval module 53 comprises:
[0203] The fourth determination unit is configured to determine the encoding similarity between the current scene code and the centroid code of the scene cluster;
[0204] The sorting unit is configured to arrange the scene clusters in descending order of the encoding similarity, and determine all or part of the trajectory clusters in the first n scene clusters as the trajectory cluster matching the current scene code according to the arrangement order of the encoding similarity.
[0205] In one embodiment, the sorting unit is further configured to:
[0206] The trajectory cluster in the n scene clusters satisfying the quantity condition is determined as the trajectory cluster matching the current scene code, and the quantity condition comprises that the number of trajectory data contained in the trajectory cluster is greater than a data quantity threshold and / or the number of trajectory data contained in the trajectory cluster is in the first m in the arrangement order in the corresponding scene cluster.
[0207] An automatic driving control device is provided in an example embodiment of the present disclosure, Figure 6 A module schematic diagram of an automatic driving control device is provided in an example embodiment of the present disclosure, and the retrieval device comprises:
[0208] The third acquisition module 61 is configured to acquire a trajectory retrieval result of the vehicle in the current driving scene, and the trajectory retrieval result is determined according to the trajectory retrieval device in the above embodiment;
[0209] The driving control module 62 is configured to control the automatic driving of the vehicle according to the trajectory retrieval result.
[0210] In one embodiment, the driving control module 62 comprises:
[0211] The verification unit is configured to perform driving rule verification on the target trajectory data contained in the trajectory cluster as the trajectory retrieval result;
[0212] The control unit is configured to control the automatic driving of the vehicle according to the target trajectory data passing the driving rule verification.
[0213] In one embodiment, the target trajectory data includes a first driving trajectory and a second driving trajectory in succession;
[0214] The checking unit is further configured to:
[0215] perform driving rule checking on the first driving trajectory;
[0216] control the vehicle to automatically drive according to the target trajectory data that passes the driving rule checking, including:
[0217] determine the second driving trajectory corresponding to the first driving trajectory that passes the driving rule checking as a planning trajectory;
[0218] control the vehicle to automatically drive according to the planning trajectory.
[0219] For the device embodiment, since it basically corresponds to the method embodiment, the related parts can refer to the part of the method embodiment. The device embodiment described above is only illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Some or all modules can be selected to achieve the purpose of the present application according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0220] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution comply with relevant laws and regulations and do not violate public order and good customs.
[0221] According to the embodiments of the present disclosure, the exemplary embodiments of the present disclosure also provide an electronic device, a readable storage medium and a computer program product.
[0222] Figure 7 A schematic block diagram of an example electronic device 700 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 laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present disclosure described and / or claimed in this document.
[0223] As Figure 7As shown, the device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from the storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0224] A plurality of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, and the like; an output unit 707, such as various types of displays, speakers, and the like; a storage unit 708, such as a magnetic disk, an optical disk, and the like; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0225] The computing unit 701 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 701 performs various methods and processes described above, such as the methods in the above-described embodiments. For example, in some embodiments, the methods in the above-described embodiments can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the methods in the above-described embodiments described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the methods in the above-described embodiments by any other appropriate means, such as by means of firmware.
[0226] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0227] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, or entirely on a remote machine or server.
[0228] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical conductors, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0229] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; 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 acoustic, speech, or tactile input.
[0230] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0231] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0232] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation, as long as the desired results of the technology disclosed in the present disclosure are achieved.
[0233] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above.
Claims
1. A method for constructing trajectory index, comprising: obtaining scene encodings representing different driving scenes; the scene encodings are obtained by encoding scene data contained in historical driving data of different driving scenes, the historical driving data further comprising trajectory data; performing scene clustering on the historical driving data according to the scene encodings, obtaining at least one scene cluster; for each scene cluster, performing trajectory clustering on the trajectory data in the scene cluster, obtaining at least one trajectory cluster; constructing an index based on the scene encodings and the trajectory clusters, the index being used for trajectory retrieval.
2. The construction method of claim 1, wherein, the obtaining of the scene encodings representing different driving scenes comprises: encoding the scene data of different driving scenes respectively according to an encoding strategy, obtaining scene encodings corresponding to each driving scene; wherein the encoding strategy comprises at least one of the following: extracting scene features from the scene data representing the driving scene, and encoding the scene features; encoding the scene data representing the driving scene using an encoding algorithm; inputting the scene data representing the driving scene into an encoding model to extract scene features from the scene data representing the driving scene by the encoding model, and encoding the scene features.
3. The construction method of claim 1, wherein, the performing of the scene clustering on the historical driving data according to the scene encodings, obtaining at least one scene cluster, comprises: determining the cosine similarity between the scene encodings; dividing the historical driving data into at least one scene cluster according to the cosine similarity.
4. The construction method of claim 1, wherein, the performing of the trajectory clustering on the trajectory data in the scene cluster for each scene cluster, obtaining at least one trajectory cluster, comprises: determining the Euclidean distance between the trajectory data; dividing the trajectory data into at least one trajectory cluster according to the Euclidean distance.
5. The construction method of claim 1, wherein, the constructing of the index based on the scene encodings and the trajectory clusters, comprises: determining the centroid encoding of the scene cluster according to the scene encodings; taking the centroid encoding of the scene cluster as the index identifier of the scene cluster, and taking the trajectory clusters in the scene cluster as the index values of the scene cluster.
6. The construction method of claim 5, wherein, the taking of the trajectory clusters in the scene cluster as the index values of the scene cluster, comprises: arranging the trajectory clusters in the scene cluster in order from more to less according to the number of trajectory data in each trajectory cluster, and taking the arranged trajectory clusters as the index values of the scene cluster. 7.A method for retrieving trajectory, comprising: obtaining current driving data of a vehicle in a current driving scene, the current driving data comprising scene data representing the current driving scene; encoding the scene data representing the current driving scene, obtaining a current scene encoding representing the current driving scene; determining a trajectory cluster matching the current scene encoding according to the index as a trajectory retrieval result, the index being determined according to the method for constructing trajectory index according to any one of claims 1-6.
8. The search method of claim 7, wherein, the encoding of the scene data representing the current driving scene comprises: encoding the scene data representing the current driving scene according to the same encoding strategy as when constructing the index.
9. The search method of claim 7, wherein, the determining of the trajectory cluster matching the current scene encoding according to the index comprises: determining a coding similarity between the current scene code and the centroid code of the scene cluster; arranging the scene clusters in descending order of the coding similarity, and determining all or part of the trajectory clusters in the first n scene clusters as the trajectory clusters matched with the current scene code according to the arrangement order of the coding similarity.
10. The search method of claim 9, wherein, The determining all or part of the trajectory clusters in the first n scene clusters as the trajectory clusters matched with the current scene code according to the arrangement order of the coding similarity comprises: determining the trajectory clusters in the n scene clusters that meet a quantity condition as the trajectory clusters matched with the current scene code, wherein the quantity condition comprises that the number of trajectory data contained in the trajectory cluster is greater than a data quantity threshold and / or the arrangement order of the number of trajectory data contained in the trajectory cluster in the corresponding scene cluster is the first m.
11. An automatic driving control method, comprising: obtaining a trajectory retrieval result of a vehicle in a current driving scene, the trajectory retrieval result being determined according to the trajectory retrieval method in any one of claims 7-10; controlling the vehicle to automatically drive according to the trajectory retrieval result.
12. The automatic driving control method of claim 11, wherein, The controlling the vehicle to automatically drive according to the trajectory retrieval result comprises: performing driving rule verification on target trajectory data contained in the trajectory cluster as the trajectory retrieval result; controlling the vehicle to automatically drive according to the target trajectory data that passes the driving rule verification.
13. The automatic driving control method of claim 12, wherein, The target trajectory data comprises a first driving trajectory and a second driving trajectory; The performing driving rule verification on the target trajectory data contained in the trajectory cluster as the trajectory retrieval result comprises: performing driving rule verification on the first driving trajectory; The controlling the vehicle to automatically drive according to the target trajectory data that passes the driving rule verification comprises: determining the second driving trajectory corresponding to the first driving trajectory that passes the driving rule verification as a planned trajectory; and controlling the vehicle to automatically drive according to the planned trajectory.
14. An apparatus for constructing a trajectory index, comprising: a first obtaining module configured to obtain scene codes representing different driving scenes; The scene codes are obtained by encoding scene data contained in historical driving data of different driving scenes, and the historical driving data further comprises trajectory data; a scene clustering module configured to perform scene clustering on the historical driving data according to the scene codes, to obtain at least one scene cluster; a trajectory clustering module configured to, for each scene cluster, perform trajectory clustering on trajectory data in the scene cluster, to obtain at least one trajectory cluster; an index construction module configured to construct an index based on the scene codes and the trajectory clusters, the index being used for trajectory retrieval.
15. The build apparatus of claim 14, wherein, The first obtaining module is further configured to: encode scene data of different driving scenes respectively according to an encoding strategy, to obtain scene codes corresponding to the respective driving scenes; The encoding strategy comprises at least one of the following: extracting scene features from the scene data representing the driving scenes, and encoding the scene features; encoding the scene data representing the driving scenes by using an encoding algorithm; inputting scene data characterizing the driving scene into an encoding model to extract scene features from the scene data characterizing the driving scene by the encoding model and encode the scene features.
16. The build apparatus of claim 14, wherein, The scene clustering module comprises: a first determination unit configured to determine cosine similarity between the scene encodings; a first division unit configured to divide the historical driving data into at least one scene cluster according to the cosine similarity.
17. The build apparatus of claim 14, wherein, The trajectory clustering module comprises: a second determination unit configured to determine Euclidean distance between the trajectory data; a second division unit configured to divide the trajectory data into at least one trajectory cluster according to the Euclidean distance.
18. The build apparatus of claim 14, wherein, The index construction module comprises: a third determination unit configured to determine a centroid encoding of the scene cluster according to the scene encodings; a first index unit configured to take the centroid encoding of the scene cluster as an index identifier of the scene cluster and take the trajectory clusters in the scene cluster as index values of the scene cluster.
19. The build apparatus of claim 18, wherein, The first index unit is further configured to: arrange the trajectory clusters in the scene cluster in an order from large to small according to the number of trajectory data in each trajectory cluster, and take the arranged trajectory clusters as the index values of the scene cluster.
20. A trajectory retrieval device, comprising: a second acquisition module configured to acquire current driving data of a vehicle in a current driving scene, the current driving data comprising scene data characterizing the current driving scene; an encoding module configured to encode the scene data characterizing the current driving scene to obtain a current scene encoding characterizing the current driving scene; a retrieval module configured to determine, according to the index, trajectory clusters matching the current scene encoding as a trajectory retrieval result, the index being determined according to the trajectory index construction device of any one of claims 14-19.
21. The retrieval apparatus of claim 20, wherein, The encoding module is further configured to: encode the scene data characterizing the current driving scene according to the same encoding strategy as when the index is constructed.
22. The retrieval apparatus of claim 20, wherein, The retrieval module comprises: a fourth determination unit configured to determine encoding similarity between the current scene encoding and the centroid encoding of the scene cluster; a sorting unit configured to arrange the scene clusters in an order from large to small according to the encoding similarity, and determine all or part of the trajectory clusters in the first n scene clusters as the trajectory clusters matching the current scene encoding according to the arrangement order of the encoding similarity.
23. The retrieval apparatus of claim 22, wherein, The sorting unit is further configured to: determine, as the trajectory clusters matching the current scene encoding, the trajectory clusters in the n scene clusters that satisfy a quantity condition, wherein the quantity condition comprises that the number of trajectory data contained in the trajectory cluster is greater than a data quantity threshold and / or the arrangement order of the number of trajectory data contained in the trajectory cluster in the corresponding scene cluster is the first m.
24. An automatic driving control device, comprising: a third acquisition module configured to acquire a trajectory retrieval result of a vehicle in a current driving scene, the trajectory retrieval result being determined according to the trajectory retrieval device of any one of claims 20-23; a driving control module configured to control automatic driving of the vehicle according to the trajectory retrieval result.
25. The automatic driving control device according to claim 24, wherein The driving control module comprises: The verification unit is configured to perform driving rule verification on target trajectory data included in the trajectory cluster as the trajectory search result. The control unit is configured to control automatic driving of the vehicle according to the target trajectory data that passes the driving rule verification.
26. The automatic driving control device according to claim 25, wherein The target trajectory data includes a first driving trajectory and a second driving trajectory that are continuous. The verification unit is further configured to: perform driving rule verification on the first driving trajectory; and control automatic driving of the vehicle according to the target trajectory data that passes the driving rule verification, including: determining the second driving trajectory corresponding to the first driving trajectory that passes the driving rule verification as a planning trajectory; and controlling automatic driving of the vehicle according to the planning trajectory. 27.An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
28. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-13. 29.A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-13.
Citation Information
Patent Citations
Driving scene based path planning for autonomous driving vehicles
CN109491375A
Track data storage and indexing method and device, electronic equipment and readable medium
CN113688193A