Recognition Method, Device and Vehicle for Driving Scenarios
By converting vehicle data into a structured triple form and using the target knowledge graph for analysis, the problem of low accuracy in scene recognition of autonomous vehicles is solved, and more efficient and accurate driving scenario recognition is achieved.
Patent Information
- Application Number
- CN202210654300.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-06-10
AI Technical Summary
In the prior art, the accuracy of autonomous driving vehicles in scene recognition is low and cannot cover various scenarios, resulting in low recognition accuracy.
The target knowledge graph is used to process vehicle data, convert entity information and relational information into a structured triple form, and the trained knowledge graph is used for scene reasoning and analysis, and output driving scenario information.
It improves the scene recognition efficiency and accuracy of autonomous driving vehicles, can identify more driving scenario information, and provides richer driving decision support.
Smart Images

Figure CN115129886B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent vehicles, and in particular, to a method, apparatus, and vehicle for identifying driving scenarios. Background Art
[0002] During the process of autonomous driving, a vehicle often needs to identify the current scenario to make appropriate driving decisions, which can effectively improve the performance of the autonomous driving system. In related technologies, supervised classification algorithms are usually used to classify and judge information such as surrounding environment images. However, the number of scenarios in this classification method is limited and fixed, and it cannot cover all scenarios encountered during autonomous driving, resulting in low accuracy of scenario recognition.
[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, and vehicle for identifying driving scenarios, so as to at least solve the technical problem of low accuracy in scenario recognition by autonomous driving vehicles in related technologies.
[0005] According to one aspect of an embodiment of the present invention, a method for identifying a driving scenario is provided, including: obtaining vehicle data of a target vehicle; processing the vehicle data to obtain target information of the vehicle data, where the target information is used to represent entity information and relationship information included in the vehicle data; using a target knowledge graph to identify the target information to obtain target driving scenario information of the target vehicle, where the target knowledge graph is used to represent the association relationship between different entities.
[0006] Optionally, processing the vehicle data to obtain target information of the vehicle data includes: extracting feature information of the vehicle data to obtain a category and a position corresponding to the vehicle data; determining the target information based on the category and the position corresponding to the vehicle data, where the category and the position corresponding to the vehicle data are converted into corresponding entity information and relationship information.
[0007] Optionally, using the target knowledge graph to identify the target information to obtain target driving scenario information of the target vehicle includes: determining a first entity vector corresponding to the entity information and a relationship vector corresponding to the relationship information; constructing a second entity vector based on the first entity vector and the relationship vector; using the target knowledge graph to process the first entity vector and the relationship vector to obtain a target entity vector, where the distance between the target entity vector and the second entity vector is less than a preset threshold; determining the target driving scenario information based on the target entity information corresponding to the target entity vector.
[0008] Optionally, based on the first entity vector and the relationship vector, a second entity vector is constructed, including: obtaining the sum of the first entity vector and the relationship vector to obtain the second entity vector.
[0009] Optionally, the vehicle data includes: image data collected by a camera installed on the target vehicle, point cloud data collected by a radar installed on the target vehicle, driving data of the target vehicle, and environmental data of the environment where the target vehicle is located.
[0010] Optionally, the method further includes: processing a data set using a first knowledge graph to obtain sample vectors, where the data set of the first knowledge graph includes vehicle data of multiple vehicles, and the sample vectors include: a first sample entity vector, a sample relationship vector, and a second sample entity vector; processing the first sample entity vector and the sample relationship vector using a second knowledge graph to obtain a target sample entity vector; constructing a loss function of the second knowledge graph based on the second sample entity vector and the target sample entity vector; and adjusting network parameters of the second knowledge graph based on the loss function to obtain a target knowledge graph.
[0011] Optionally, the sample vectors include positive sample vectors and negative sample vectors, where processing the data set using the first knowledge graph to obtain sample vectors includes: processing the data set using the first knowledge graph to obtain positive sample vectors; and replacing the first sample entity vector or the second sample entity vector in the positive sample vectors to generate negative sample vectors.
[0012] According to another aspect of the embodiments of the present invention, there is also provided an identification device for a driving scenario, including: an acquisition module configured to acquire vehicle data of a target vehicle; a processing module configured to process the vehicle data of the target vehicle to obtain target information of the vehicle data, where the target information is used to characterize entity information and relationship information included in the vehicle data; and an identification module configured to identify the target information using a target knowledge graph to obtain target driving scenario information of the target vehicle, where the target knowledge graph is used to characterize association relationships between different entities.
[0013] According to another aspect of the embodiments of the present invention, there is also provided a vehicle, including: the identification device for a driving scenario according to any one of the above embodiments of the present invention.
[0014] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls a device where the computer-readable storage medium is located to execute the identification method for a driving scenario according to any one of the above embodiments of the present invention.
[0015] According to another aspect of the embodiments of the present invention, a processor is further provided. The processor is used to run a program, and when the program runs, it executes the driving scenario recognition method according to any one of the above-mentioned embodiments of the present invention.
[0016] In the embodiments of the present invention, in a certain scenario, the autonomous driving system performs scenario recognition, obtains vehicle data of the target vehicle through multiple devices equipped on the target vehicle, selects different feature extraction methods according to the type of vehicle data, and converts the extracted categories and positions into entity information and relationship information, which is used as target information to be input into the target knowledge graph. The target knowledge graph is a knowledge graph trained for the vehicle driving scenario recognition function. After the target knowledge graph recognizes the target information, it outputs the corresponding vehicle scenario information. It is easy to notice that when the driving scenario recognition method processes the vehicle data of the target vehicle, by processing the data into the structure of target information, that is, the target information is composed of entity information and relationship information, it has a more consistent data layout, which is more suitable for optimization, and can input different types of vehicle data into the same scenario inference analysis module. The scenario inference analysis module is the trained target knowledge graph, which can recognize the target information and output the corresponding vehicle driving scenario, thereby effectively improving the efficiency and accuracy of scenario recognition, and further solving the technical problem of low accuracy in scenario recognition of autonomous driving vehicles in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a schematic diagram of a driving scenario method according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of an optional vehicle driving scenario recognition according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of optional feature information of vehicle data according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an optional triple vector of a knowledge graph according to an embodiment of the present invention;
[0022] Figure 5 is a relationship diagram of an optional vehicle driving scenario dataset according to an embodiment of the present invention;
[0023] Figure 6It is a flowchart of model training for vehicle driving scenario data according to an embodiment of the present invention;
[0024] Figure 7 It is a schematic diagram of an identification device for a driving scenario according to an embodiment of the present invention. Detailed implementation manners
[0025] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data may be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0027] Embodiment 1
[0028] According to an embodiment of the present invention, a method embodiment of an identification method for a driving scenario is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order than here.
[0029] Figure 1 It is a schematic diagram of a driving scenario method according to an embodiment of the present invention. As Figure 1 shown, the method includes the following steps:
[0030] Step S102, obtaining vehicle data of a target vehicle;
[0031] Step S104, processing the vehicle data to obtain target information of the vehicle data, where the target information is used to characterize the entity information and relationship information included in the vehicle data;
[0032] Step S106: Use the target knowledge graph to identify the target information and obtain the target driving scenario information of the target vehicle, where the target knowledge graph is used to represent the association relationships between different entities.
[0033] It should be noted that as a structured form of knowledge, the knowledge graph is one of the popular research directions in artificial intelligence. The knowledge graph represents knowledge as an intelligent system to obtain the ability to solve complex tasks. Knowledge is usually described in the form of (H, R, T) triples, where H (head) is the head entity, R (relation) is the connection relationship, and T (tail) is the tail entity. Entities are real-world objects and abstract concepts, and the relationship represents the semantic connection between entities. For example, for the triple (Yao Ming, born in, China), "Yao Ming" is the head entity, "China" is the tail entity, and "born in" is the relationship connecting the head entity and the tail entity. Thus, it can be seen that the knowledge graph has its own semantics, contains logical meanings and rules. The nodes in the knowledge graph correspond to entities or concepts in the real world, and each edge or attribute also corresponds to an association in reality. Therefore, by combining the relationship logic in the vehicle driving scenario and using the knowledge graph as the core of scenario reasoning, the hidden information that is difficult to discover easily in the current scenario can be inferred and analyzed.
[0034] Among them, the target vehicle can be an autonomous vehicle. During the driving process, the autonomous vehicle can collect various types of vehicle data in the driving scenario using multiple devices equipped on the vehicle. The vehicle data includes: image data of the vehicle driving scenario obtained through an in-vehicle camera, point cloud data of the obstacles in front of the vehicle obtained through an in-vehicle radar, and state data and environmental data of the vehicle driving obtained through an in-vehicle sensor. After the vehicle data of the target vehicle is processed, it is stored in a triple structure. The entity information can be the head entity, the relationship information can be the connection relationship, and the target information can be composed of the two parts of the head entity and the connection relationship. The target knowledge graph can be a knowledge graph trained for the vehicle driving scenario recognition function, which can identify the input target information and output the vehicle driving scenario information. The target driving scenario can be the driving scenario corresponding to the moment when the vehicle data is collected. It should be noted that when the vehicle device can identify more information or the knowledge graph contains more knowledge, more missing driving scenario information can be identified. In this way, richer driving scenario information can be provided for vehicle driving, making the decision-making of autonomous driving or driver-assisted driving safer.
[0035] In an alternative embodiment, Figure 2 is a flowchart of an alternative vehicle driving scenario recognition according to an embodiment of the present invention, as shown in Figure 2As shown, in a certain user driving scenario, the autonomous driving system performs scenario recognition, obtains vehicle data of the target vehicle in the driving scenario through multiple devices equipped on the target vehicle. After obtaining the vehicle data, it processes the vehicle data and selects different feature extraction methods according to the data type. For example, for image data, it can be input into a trained target recognition neural network to identify the target types and positions included therein. For radar data, it can be input into a trained 3D point cloud target neural network to identify the target types and positions therein. The extracted types are saved as entity information, and the positions are saved as relationship information. The entity information and relationship information are used as target information and input into a trained target knowledge graph for scenario reasoning and analysis, and finally the corresponding vehicle scenario information is output.
[0036] In an embodiment of the present invention, in a certain scenario, the autonomous driving system performs scenario recognition, obtains vehicle data of the target vehicle through multiple devices equipped on the target vehicle, and selects different feature extraction methods according to the type of vehicle data. The extracted categories and positions are converted into entity information and relationship information and input into the target knowledge graph as target information. The target knowledge graph is a knowledge graph trained for the vehicle driving scenario recognition function. After the target knowledge graph recognizes the target information, it outputs the corresponding vehicle scenario information. It is easy to notice that when processing the vehicle data of the target vehicle by this driving scenario recognition method, by processing the data into the structure of target information, that is, the target information is composed of entity information and relationship information, it has a more consistent data layout, which is more suitable for optimization. Different types of vehicle data can be input into the same scenario reasoning and analysis module. The scenario reasoning and analysis module is a trained target knowledge graph, which can recognize the target information and output the corresponding vehicle driving scenario, thus effectively improving the efficiency and accuracy of scenario recognition, and further solving the technical problem of low accuracy when the autonomous driving vehicle performs scenario recognition in the related art.
[0037] Optionally, according to the above-mentioned embodiment of the invention, processing the vehicle data to obtain the target information of the vehicle data includes: extracting the feature information of the vehicle data to obtain the corresponding categories and positions of the vehicle data; determining the target information based on the corresponding categories and positions of the vehicle data, wherein the corresponding categories and positions of the vehicle data are converted into the corresponding entity information and relationship information.
[0038] Among them, the extraction method used for extracting the feature information of the vehicle data is based on the type of vehicle data, stores the valid information in the same data layout, and represents it in the triple (head entity, relationship, tail entity) structure. The category can be the head entity, the position can be the connection relationship, and the target information can be the information representing the inclusion of the head entity and the connection relationship.
[0039] In an alternative embodiment,Figure 3 It is a schematic diagram of characteristic information of vehicle data according to an embodiment of the present invention. In the same scenario, an in-vehicle camera collects image data, a radar obtains point cloud data, and vehicle driving state data and environmental data are obtained based on in-vehicle sensors. When extracting characteristic information, for the image data collected by the in-vehicle camera, it needs to be input into a trained target recognition neural network to identify the target categories and positions included therein. For the point cloud data obtained by the radar, it is input into a trained 3D point cloud target neural network to identify the target categories and positions therein. For the driving data, it includes vehicle speed, steering wheel angle, etc. For the environmental data, it includes time, light, weather, etc. These target categories and positions are converted into an entity: relationship structure for storage to determine target information. For example, vehicle: position / speed..., indication information: speed limit / traffic light / intersection position..., pedestrian: position / speed / direction....
[0040] It should be noted that a neural network is an algorithm model that mimics the behavioral characteristics of an animal neural network for distributed parallel information processing. According to the needs of users, the neural network can be trained by adjusting the relationships between a large number of internal nodes to achieve the technical effect of accurately and efficiently outputting prediction results after inputting data. Therefore, neural networks have very wide applications in feature recognition and classification.
[0041] For example, in a rainy scenario, the in-vehicle camera collects image data of a pedestrian holding an umbrella. The image data is input into a trained target neural network, and the extracted target categories are pedestrian and the position is holding an umbrella. Then the entity information is pedestrian, and the relationship information is the structure of holding an umbrella, that is, the target information is pedestrian: holding an umbrella.
[0042] Optionally, according to the above embodiment of the present invention, a target knowledge graph is used to identify target information to obtain target driving scenario information of a target vehicle, including: determining a first entity vector corresponding to the entity information and a relationship vector corresponding to the relationship information; constructing a second entity vector based on the first entity vector and the relationship vector; using the target knowledge graph to process the first entity vector and the relationship vector to obtain a target entity vector, where the distance between the target entity vector and the second entity vector is less than a preset threshold; and determining the target driving scenario information based on the target entity information corresponding to the target entity vector.
[0043] It should be noted that the embodiment of the present invention adopts a classical knowledge graph representation learning model: the TransE model. The TransE model represents the semantic information triple of the research object as a dense low-dimensional real-valued vector. Using the vector form can facilitate various subsequent calculations and inferences for us. Figure 4 It is a schematic diagram of a triple vector of a knowledge graph according to an embodiment of the present invention, as Figure 4As shown, the TransE model encodes the (head, relation, tail) triple into low-dimensional distributed vectors. The head is like the Figure 4 vector h shown in the figure, the relation is like the Figure 4 vector r shown in the figure, and the tail is like the Figure 4 vector t shown in the figure. The relation vector r can be regarded as the translation from the head entity vector h to the tail entity vector t. By continuously adjusting the magnitudes and directions of the vector h, vector r, and vector t, h + r = t.
[0044] Among them, the first entity vector can be the vector h corresponding to the head entity information queried through the target knowledge graph. The second vector can be the vector r corresponding to the relation information queried through the target knowledge graph. The second entity vector can be the tail vector T obtained by calculating h + r, that is, h + r = T. The target entity vector can be the vector t with the smallest distance from T queried through the target knowledge graph. The preset threshold can be the difference threshold f between T and t. The target driving scenario information can be the entity information represented by the vector t.
[0045] In an alternative embodiment, after inputting the target information into the trained target knowledge graph, the knowledge graph TransE model is used to query the vector h corresponding to the entity information as the first entity vector, and the vector r corresponding to the relation information is queried as the relation vector. Perform the vector calculation h + r to obtain the tail entity vector T, that is, h + r = T. Use the target knowledge graph to query the tail entity vector t with the smallest difference from the tail entity vector T. If the difference between the tail entity vector T and t is less than the difference threshold f, then output the entity represented by the tail entity t, which is the recognized driving scenario information.
[0046] For example, pedestrians will hold umbrellas in rainy or sunny weather. According to the attribute of rain, if the light is dim, it can be inferred that the current weather is rainy. If the current weather information is missing, it can be recognized through the camera that pedestrians are holding umbrellas. Query the corresponding vectors of pedestrians and umbrellas according to the knowledge of the target knowledge graph, calculate the sum of their vectors, and query the entity corresponding to the sum vector to obtain this triple knowledge (pedestrian, hold umbrella, rain), and then the conclusion that the current driving is in a rainy scenario can be output.
[0047] Optionally, according to the above-mentioned invention embodiment, based on the first entity vector and the relation vector, a second entity vector is constructed, including: obtaining the sum of the first entity vector and the relation vector to obtain the second entity vector.
[0048] Among them, the operation of finding the sum of two vectors is called vector addition. Connect the head and tail of the vectors to be added in sequence, and the result of the vector sum is from the starting point of the first vector to the ending point of the last vector.
[0049] For example, to find the sum of the head entity vector h and the relation vector r, h and r are connected end to end. The result is that the starting point of vector h points to the ending point of vector r, obtaining the second entity vector, i.e., the tail vector T.
[0050] Optionally, according to the above embodiments of the present invention, the vehicle data includes: image data collected by a camera installed on the target vehicle, point cloud data collected by a radar installed on the target vehicle, driving data of the target vehicle, and environmental data of the environment where the target vehicle is located.
[0051] In an alternative embodiment, as Figure 3 shown, the image data collected by the in-vehicle camera is the current road condition, i.e., vehicle position, intersection position, lane lines, number and actions of pedestrians, etc. The point cloud data collected by the vehicle-mounted radar can determine obstacles in front of the vehicle and their distances and directions. The driving data of the target vehicle can be vehicle speed, steering wheel angle, etc., and can determine whether it is a lane-changing operation, a constant-speed driving, or an acceleration driving currently. The environmental data of the target vehicle includes the collection time of multiple sensors, light, weather, etc., and can determine the current time, location, and weather conditions.
[0052] Optionally, according to the above embodiments of the present invention, the method further includes: processing a data set using a first knowledge graph to obtain sample vectors, where the data set of the first knowledge graph includes vehicle data of multiple vehicles, and the sample vectors include: a first sample entity vector, a sample relation vector, and a second sample entity vector; processing the first sample entity vector and the sample relation vector using a second knowledge graph to obtain a target sample entity vector; constructing a loss function of the second knowledge graph based on the second sample entity vector and the target sample entity vector; and adjusting network parameters of the second knowledge graph based on the loss function to obtain a target knowledge graph.
[0053] Among them, the first knowledge graph can be a general knowledge graph, covering all aspects. Figure 5 is a relational graph of a data set of an alternative vehicle driving scenario according to an embodiment of the present invention, as Figure 5As shown, the data set can be the data screened from the general knowledge graph that conforms to the driving scenario and the driving scenario data supplemented by professional technicians in driving scenario recognition, including vehicles, roads, weather, indication information, the current vehicle and pedestrians, and the relationships between them. For example, E: The vehicle includes vehicle speed, driving direction, distance...; E: The road includes lane lines, median strip position, road surface condition...; E: The weather includes temperature, sunny / cloudy / rainy / snowy, light...; E: The indication information includes speed limit, traffic lights, exits, prohibited information...; E: The current vehicle includes vehicle speed, driving direction, position...; E: The pedestrians include position, speed, walking direction, umbrella... The relationship between the road and the current vehicle, vehicle, and pedestrians is all relationship R: road condition; the relationship between the weather and the current vehicle, vehicle, and pedestrians is all relationship R: inclusion; the relationship between the indication information and the current vehicle, vehicle, and pedestrians is all relationship R: indication; the relationship between the vehicle and the current vehicle, pedestrians is all relationship R: adjacent. The second knowledge graph can be the knowledge graph containing this data set. Figure 6 is a flowchart for model training for vehicle driving scenario data according to an optional knowledge graph of an embodiment of the present invention, as Figure 6 shown. After the driving domain data is input, the driving domain data is clearly stored in the triple (head entity, relationship, tail entity) structure. The first sample entity vector can be the vector h corresponding to the head entity in the sample, the sample relationship vector can be the vector r corresponding to the relationship in the sample, and the second sample entity vector can be the vector t corresponding to the tail entity in the sample. The target sample entity vector can be the sum vector constructed through the second knowledge graph. The loss function can be the function model used in the training phase to adjust the differences in the second knowledge graph so as to obtain a more accurate and fast target knowledge graph.
[0054] In an optional embodiment, the data in the data set that conforms to the driving scenario in the general knowledge graph and the driving scenario data supplemented by professional technicians in driving scenario recognition are screened. The second knowledge graph can be the knowledge graph trained with the screened data as the training data. The triple data in the training data is encoded to obtain the vector of the triple data as the positive sample triple (h, r, t). The head entity or the tail entity is randomly replaced as the negative sample triple (h', r', t'). Using the second knowledge graph, the sum of the first sample entity vector and the sample relationship vector is calculated to obtain the target sample entity vector. The above method can establish a loss function based on the second sample entity vector and the target sample entity vector as follows:
[0055]
[0056] where, (h, r, t) represents the triple of the positive sample; (h', r', t') represents the negative sample triple; γ: represents the spacing between the positive sample and the negative sample, a constant; [x] +: It represents max(0, x), that is, the maximum value between 0 and x. The above loss function calculates the difference between the output vector calculated by the second knowledge graph and the real entity vector, and adjusts the difference of the second knowledge graph. The second knowledge graph is repeatedly trained, and the parameters of the second knowledge graph are updated multiple times according to the loss function, so as to obtain a more accurate and fast target knowledge graph.
[0057] Optionally, according to the above invention embodiments, the sample vector includes a positive sample vector and a negative sample vector. Among them, using the first knowledge graph to process the data set to obtain the sample vector includes: using the first knowledge graph to process the data set to obtain the positive sample vector; replacing the first sample entity vector or the second sample entity vector in the positive sample vector to generate the negative sample vector.
[0058] It should be noted that since the data selected by professionals are all correct positive sample data, the number of positive and negative samples needs to be balanced during model training. Therefore, this method uses the method of randomly replacing the head entity or the tail entity to generate negative samples, but the head entity and the tail entity cannot be replaced simultaneously.
[0059] In an optional embodiment, each triple in the data set is encoded into a low-dimensional distributed vector, and each dimension of each vector is randomly initialized within (-6 / √k, 6 / √k), where k is the dimension of the low-dimensional vector, to obtain the head entity vector h, the relation vector r, and the tail entity vector t, as the positive sample triple (h, r, t). Randomly replace the head entity vector or the tail entity vector, but the head entity and the tail entity cannot be replaced simultaneously. The replaced triple is used as the negative sample triple (h', r', t'). The head entity vector and the relation vector in the sample vector are used as the input layer of the TransE neural network model, and the tail entity vector is used as the output layer of the neural network.
[0060] Embodiment 2
[0061] According to the embodiments of the present invention, there is also provided an identification device for a driving scenario. This device can execute the motor control method in the above embodiments. The specific implementation manner and the preferred application scenario are the same as those in the above embodiments, and will not be elaborated here.
[0062] Figure 7 is a schematic diagram of an identification device for a driving scenario according to an embodiment of the present invention, as Figure 7 shown. The device includes:
[0063] An acquisition module 72, configured to acquire vehicle data of a target vehicle;
[0064] A processing module 74, configured to process the vehicle data of the target vehicle to obtain target information of the vehicle data, where the target information is used to characterize the entity information and relationship information included in the vehicle data;
[0065] An identification module 76, configured to identify target information by using a target knowledge graph to obtain target driving scenario information of a target vehicle, where the target knowledge graph is used to represent the association relationships between different entities.
[0066] Wherein, the above-mentioned acquisition module, processing module, and identification module are all included in the target vehicle system, and the functions of the modules and data processing are realized through a control system equipped in the target vehicle. The acquisition module can be a device that can collect scenario data of the target vehicle. For example, an in-vehicle camera acquires image data of the vehicle driving scenario, an in-vehicle radar obtains point cloud data of obstacles in front of the vehicle, vehicle driving state data, and vehicle driving environment data. The processing module can be a data processing channel that can extract and classify feature information, and is used to extract the target types and positions in the vehicle data and save them as a triple structure as target information. The processing of the data facilitates the input into the target knowledge graph for identification. The identification module can be a trained target knowledge graph, and the target knowledge graph can output the identified vehicle scenario information according to the input target information, achieving the technical effect of scenario identification.
[0067] In an alternative embodiment, when the autonomous driving system performs scenario identification, the acquisition module respectively acquires image data of the vehicle driving scenario through an in-vehicle camera, obtains point cloud data of obstacles in front of the vehicle through an in-vehicle radar, and acquires vehicle driving state data and vehicle driving environment data. After the processing module obtains the vehicle data of the target vehicle, according to the data type, different feature extraction methods are selected. For example, for image data, it can be input into a trained target recognition neural network to identify the target types and positions included therein. For radar data, it can be input into a trained 3D point cloud target neural network to identify the target types and positions therein. The extracted types are saved as entity information, and the positions are saved as relationship information. The identification module is a knowledge graph trained for the vehicle driving scenario identification function. After obtaining the entity information and relationship information, it performs identification through this knowledge graph, and finally outputs the corresponding vehicle scenario information. The above modules cooperate together to achieve the technical effect of vehicle driving scenario identification.
[0068] Optionally, according to the above-mentioned invention embodiment, the processing module includes: a feature extraction unit, configured to extract the feature information of the vehicle data to obtain the category and position corresponding to the vehicle data; and an information processing unit, configured to determine target information based on the category and position corresponding to the vehicle data, where the category and position corresponding to the vehicle data are converted into corresponding entity information and relationship information.
[0069] Optionally, according to the above embodiments of the invention, the recognition module includes: a first vector query unit for determining a first entity vector corresponding to entity information and a relation vector corresponding to relation information; a vector construction unit for constructing a second entity vector based on the first entity vector and the relation vector; a second vector query unit for further processing the first entity vector and the relation vector by using a target knowledge graph to obtain a target entity vector, where the distance between the target entity vector and the second entity vector is less than a preset threshold; and a scenario determination unit for determining target driving scenario information based on the target entity information corresponding to the target entity vector.
[0070] Optionally, according to the above embodiments of the invention, the vector construction unit is further configured to obtain the sum of the first entity vector and the relation vector to obtain the second entity vector.
[0071] Optionally, according to the above embodiments of the invention, the vehicle data includes: image data collected by a camera installed on the target vehicle, point cloud data collected by a radar installed on the target vehicle, driving data of the target vehicle, and environmental data of the environment where the target vehicle is located.
[0072] Optionally, according to the above embodiments of the invention, the device further includes: a sample processing module for processing a data set by using a first knowledge graph to obtain sample vectors, where the data set of the first knowledge graph includes vehicle data of multiple vehicles, and the sample vectors include: a first sample entity vector, a sample relation vector, and a second sample entity vector; a knowledge graph training module for processing the first sample entity vector and the sample relation vector by using a second knowledge graph to obtain a target sample entity vector; for constructing a loss function of the second knowledge graph based on the second sample entity vector and the target sample entity vector; and a parameter adjustment module for adjusting network parameters of the second knowledge graph based on the loss function to obtain a target knowledge graph.
[0073] Optionally, according to the above embodiments of the invention, the sample processing module includes: an initialization unit for processing the data set by using the first knowledge graph to obtain positive sample vectors; and a vector construction unit for replacing the first sample entity vector or the second sample entity vector in the positive sample vectors to generate negative sample vectors.
[0074] Embodiment 3
[0075] According to another aspect of the embodiments of the present invention, there is also provided a vehicle, including: the recognition device for the driving scenario in any one of the above embodiments of the invention.
[0076] Embodiment 4
[0077] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium includes a stored program, wherein when the program runs, it controls the device where the computer-readable storage medium is located to execute the driving scenario recognition method according to any one of the above-mentioned embodiments of the present invention.
[0078] Embodiment 5
[0079] According to another aspect of the embodiments of the present invention, there is also provided a processor. The processor is used to run a program, wherein when the program runs, it executes the driving scenario recognition method according to any one of the above-mentioned embodiments of the present invention.
[0080] The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0081] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0082] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0083] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0084] In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0085] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0086] The foregoing is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A method for identifying a driving scenario, characterized in that, Including: Obtaining vehicle data of a target vehicle; Processing the vehicle data to obtain target information of the vehicle data, where the target information is used to represent entity information and relationship information included in the vehicle data; Identifying the target information using a target knowledge graph to obtain target driving scenario information of the target vehicle, where the target knowledge graph is used to represent the association relationships between different entities; Among them, identifying the target information using the target knowledge graph to obtain target driving scenario information of the target vehicle includes: Determining a first entity vector corresponding to the entity information and a relationship vector corresponding to the relationship information; Constructing a second entity vector based on the first entity vector and the relationship vector; Processing the first entity vector and the relationship vector using the target knowledge graph to obtain a target entity vector, where the distance between the target entity vector and the second entity vector is less than a preset threshold; Determining the target driving scenario information based on the target entity information corresponding to the target entity vector; Constructing a second entity vector based on the first entity vector and the relationship vector, including: Obtaining the sum of the first entity vector and the relationship vector to obtain the second entity vector; The method further includes: Processing a data set using a first knowledge graph to obtain sample vectors, where the first knowledge graph is a general knowledge graph, the data set of the first knowledge graph includes vehicle data of multiple vehicles, and the sample vectors include: a first sample entity vector, a sample relationship vector, and a second sample entity vector; Processing the first sample entity vector and the sample relationship vector using a second knowledge graph to obtain a target sample entity vector, where the second knowledge graph is a knowledge graph trained by screening data that conforms to driving scenarios from the data set of the first knowledge graph as training data; Constructing a loss function of the second knowledge graph based on the second sample entity vector and the target sample entity vector; Adjusting network parameters of the second knowledge graph based on the loss function to obtain the target knowledge graph.
2. The method according to claim 1, wherein Processing the vehicle data to obtain target information of the vehicle data, including: Extracting feature information of the vehicle data to obtain the category and location corresponding to the vehicle data; Determining the target information based on the category and location corresponding to the vehicle data, where the category and location corresponding to the vehicle data are converted into corresponding entity information and relationship information.
3. The method according to claim 1, characterized in that, The vehicle data includes: image data collected by a camera installed on the target vehicle, point cloud data collected by a radar installed on the target vehicle, driving data of the target vehicle, and environmental data of the environment where the target vehicle is located.
4. The method according to claim 1, characterized in that, The sample vectors include positive sample vectors and negative sample vectors, where processing a data set using a first knowledge graph to obtain sample vectors includes: Processing the data set using the first knowledge graph to obtain the positive sample vectors; Replace the first sample entity vector or the second sample entity vector in the positive sample vector to generate the negative sample vector.
5. An identification device for a driving scenario, characterized in that Comprising: An acquisition module, configured to acquire vehicle data of a target vehicle; A processing module, configured to process the vehicle data of the target vehicle to obtain target information of the vehicle data, where the target information is used to characterize entity information and relationship information included in the vehicle data; An identification module, configured to identify the target information by using a target knowledge graph to obtain target driving scenario information of the target vehicle, where the target knowledge graph is used to characterize the association relationship between different entities; The identification module is further configured to determine a first entity vector corresponding to the entity information and a relationship vector corresponding to the relationship information; construct a second entity vector based on the first entity vector and the relationship vector; process the first entity vector and the relationship vector by using the target knowledge graph to obtain a target entity vector, where the distance between the target entity vector and the second entity vector is less than a preset threshold; determine the target driving scenario information based on the target entity information corresponding to the target entity vector; The identification module is further configured to obtain the sum of the first entity vector and the relationship vector to obtain the second entity vector; The identification device further includes a sample processing module, configured to process a data set by using a first knowledge graph to obtain sample vectors, where the data set of the first knowledge graph includes vehicle data of multiple vehicles, and the sample vectors include: a first sample entity vector, a sample relationship vector, and a second sample entity vector; A knowledge graph training module, configured to process the first sample entity vector and the sample relationship vector by using a second knowledge graph to obtain a target sample entity vector; construct a loss function of the second knowledge graph based on the second sample entity vector and the target sample entity vector; A parameter adjustment module, configured to adjust network parameters of the second knowledge graph based on the loss function to obtain a target knowledge graph.
6. A vehicle, characterized in that, Comprising: The identification device for a driving scenario according to claim 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where when the program runs, it controls the device where the computer-readable storage medium is located to execute the identification method for a driving scenario according to any one of claims 1 to 4.
Citation Information
Patent Citations
Query processing method and device and computer readable storage medium
CN111061750A