Driving scene determination method and device, storage medium and electronic device
By obtaining and processing the driving data of intelligent driving cars, generating and filtering out more reliable dangerous driving scenarios, the problem of low scenario reliability in the existing technology is solved and the testing needs of intelligent driving cars are met.
Patent Information
- Application Number
- CN202411236834.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-27
Smart Images

Figure CN119203738A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and more specifically, to a method and device for determining a driving scene, a storage medium, and an electronic device. Background Art
[0002] With the development of intelligent driving technology, virtual testing has become one of the important testing methods for intelligent driving vehicles in the functional development and verification stages. Among them, scenario-based virtual testing has gradually become a consensus in intelligent driving vehicle testing. Therefore, scenarios play a vital role in intelligent driving testing.
[0003] Among them, the testing of dangerous scenarios is a key link in improving the decision-making level of intelligent driving cars. However, dangerous scenarios usually occur when multiple scenario elements are in a low probability. If the scenarios are accumulated through actual vehicle testing, it will be difficult to meet the testing needs of intelligent driving cars, and it is impossible to fundamentally achieve the goal of expanding the number of test scenarios.
[0004] In the related technology, the restoration and reconstruction of dangerous scenarios are generally carried out based on field-collected data or traffic accident data. However, this method of restoring and reconstructing dangerous scenarios cannot fundamentally expand the number of test scenarios, and the reliability of the generated dangerous scenarios is low, which makes it difficult to meet the testing needs of intelligent driving vehicles. Summary of the invention
[0005] The embodiments of the present application provide a method and device for determining a driving scene, a storage medium, and an electronic device to at least solve the problem in the related art that the reliability of the generated dangerous scenes is low and it is difficult to meet the testing requirements of intelligent driving vehicles.
[0006] According to one aspect of an embodiment of the present application, a method for determining a driving scene is provided, comprising: acquiring driving data of a target vehicle during driving; screening based on the driving data to obtain initial dangerous driving data; performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data; in the case where abnormal data that does not satisfy the physical constraints of the vehicle exists in the derived dangerous driving data, correcting the abnormal data to obtain corrected dangerous driving data; generating multiple initial driving scenes based on the corrected dangerous driving data, and screening out a target driving scene from the multiple initial driving scenes based on a preset scene complexity condition.
[0007] In an exemplary embodiment, the screening based on the driving data to obtain initial dangerous driving data includes: determining whether a dangerous event occurs during the driving of the target vehicle; when it is determined that the dangerous event occurs, screening data that meets preset scenario screening conditions from the driving data; and obtaining initial dangerous driving data based on the data that meets the preset scenario screening conditions.
[0008] In an exemplary embodiment, the preset scenario screening condition is used to screen out dangerous following data from the driving data; the driving data includes: the driving data of the target vehicle, and the driving data of the adjacent vehicle within the preset boundary range of the target vehicle; when it is determined that a dangerous event has occurred, the data satisfying the preset scenario screening condition is screened out from the driving data, including: when it is determined that the dangerous event has occurred, based on the driving data of the target vehicle and the driving data of the adjacent vehicle, determining the first associated data between the target vehicle and the adjacent vehicle; the first associated data includes following information, lateral distance, longitudinal distance and longitudinal headway; second associated data satisfying the first preset condition is determined from the first associated data, and the second associated data is determined as data satisfying the preset scenario screening condition, wherein the first preset condition includes: the following information satisfies the following condition, the lateral distance is less than the lateral distance threshold, the longitudinal distance satisfies the longitudinal distance condition, and the longitudinal headway meets the longitudinal headway condition.
[0009] In an exemplary embodiment, the preset scenario screening condition is used to screen out dangerous lane changing data from the driving data; the driving data includes the driving data of the target vehicle and the driving data of the adjacent vehicle within the preset boundary range of the target vehicle; when it is determined that a dangerous event has occurred, the data satisfying the preset scenario screening condition is screened out from the driving data, including: when it is determined that the dangerous event has occurred, based on the driving data of the target vehicle and the driving data of the adjacent vehicle, third associated data between the target vehicle and the adjacent vehicle is determined; the third associated data includes lateral displacement, lateral spacing, steering angular velocity, and risk time; from the third associated data, fourth associated data satisfying the second preset condition is determined, and the fourth associated data is determined as data satisfying the preset scenario screening condition, wherein the second preset condition includes: the lateral displacement reaches a lateral displacement threshold, the lateral spacing reaches a lateral spacing threshold, the steering angular velocity reaches an angular velocity threshold, and the risk time satisfies a time condition.
[0010] In an exemplary embodiment, the performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data includes: inputting the initial dangerous driving data into a pre-trained generative adversarial network; and performing derivative processing on the initial dangerous driving data based on the generative adversarial network to obtain derived dangerous driving data.
[0011] In an exemplary embodiment, the initial dangerous driving data is subjected to derivative processing based on the generative adversarial network to obtain derived dangerous driving data, including: based on the feature decomposition module of the generative adversarial network, the initial dangerous driving data is subjected to feature attribute decomposition to obtain attribute characteristics and time series characteristics of the initial dangerous driving data; the attribute characteristics, the time series characteristics and the set random noise are input into the generator of the generative adversarial network, and the generator performs derivative processing based on the attribute characteristics, the time series characteristics and the preset random noise to obtain derived dangerous driving data.
[0012] In an exemplary embodiment, the vehicle physical constraint condition includes a following scenario constraint condition and a lane changing scenario constraint condition; when there is abnormal data that does not meet the vehicle physical constraint condition in the derived dangerous driving data, the abnormal data is corrected to obtain corrected dangerous driving data, including: determining a following scenario constraint parameter and a lane changing scenario constraint parameter based on the derived dangerous driving data; the following scenario constraint parameters include the speed of the target vehicle, the speed of the vehicle adjacent to the target vehicle, and the front and rear vehicle distances between the target vehicle and the adjacent vehicle; the lane changing scenario constraint parameters include the lateral coordinate difference and the longitudinal coordinate difference between the target vehicle and the adjacent vehicle; based on the following scenario constraint condition, determining whether there is abnormal data in the speed of the target vehicle, the speed of the vehicle adjacent to the target vehicle, and the front and rear vehicle distance between the target vehicle and the adjacent vehicle, and based on the lane changing scenario constraint condition, determining whether there is abnormal data in the front and rear vehicle distance, the lateral coordinate difference, and the longitudinal coordinate difference between the target vehicle and the adjacent vehicle; when it is determined that the abnormal data exists, based on the data attributes of the determined abnormal data, selecting a correction method matching the data attributes to correct the abnormal data to obtain corrected dangerous driving data.
[0013] In an exemplary embodiment, the method generates a plurality of initial driving scenarios based on the corrected dangerous driving data, and screens out a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition, including: determining the scenario complexities corresponding to the plurality of initial driving scenarios respectively; comparing the plurality of scenario complexities with a preset scenario complexity threshold value respectively to obtain a comparison result; and determining the initial driving scenario whose comparison result is that the scene complexity reaches the scene complexity threshold value as the target driving scenario.
[0014] In an exemplary embodiment, the determining of the scene complexity of each of the multiple initial driving scenes includes: determining the scene complexity of any initial driving scene by the following steps: determining static scene information of the initial driving scene, and inputting the static scene information into a recognition algorithm model, wherein the recognition algorithm model recognizes each element in the static scene information to obtain an element recognition result, and determines an element recognition error rate of each element based on the element recognition result, and obtains the scene static complexity of the initial driving scene according to each element recognition error rate; determining spatiotemporal interaction information of multiple vehicle pairs in the initial driving scene, wherein the spatiotemporal interaction information includes an encounter angle, a relative speed and a relative distance of the multiple vehicle pairs, calculating the vehicle pair complexity of the multiple vehicle pairs based on the encounter angle, the relative speed and the relative distance, and accumulating multiple vehicle pair complexities to obtain the scene dynamic complexity of the initial driving scene; determining the scene complexity of the initial driving scene based on the sum of the scene static complexity and the scene dynamic complexity and the product of the environmental correction coefficient.
[0015] According to another aspect of the embodiment of the present application, a device for determining a driving scene is also provided, including: an acquisition module for acquiring driving data of a target vehicle during driving; a screening module for screening based on the driving data to obtain initial dangerous driving data; a derivation module for performing derivation processing based on the initial dangerous driving data to obtain derived dangerous driving data; a correction module for correcting abnormal data in the case where there is abnormal data in the derived dangerous driving data that does not meet the physical constraint conditions of the vehicle to obtain corrected dangerous driving data. A generation module for generating multiple initial driving scenes based on the corrected dangerous driving data, and filtering out a target driving scene from the multiple initial driving scenes based on a preset scene complexity condition.
[0016] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the above-mentioned method for determining the driving scenario when the program is executed.
[0017] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor runs the above-mentioned method for determining the driving scene through the computer program.
[0018] In an embodiment of the present application, by obtaining the driving data of the target vehicle during driving, the driving data is screened to obtain initial dangerous driving data, and then the initial dangerous driving data can be derived to obtain derived dangerous driving data. On this basis, when it is determined that there is abnormal data in the derived dangerous driving data that does not meet the physical constraints of the vehicle, the abnormal data will be corrected to obtain corrected dangerous driving data, so that multiple initial driving scenarios can be generated based on the corrected dangerous driving data, and more reliable target driving scenarios can be screened out from multiple initial driving scenarios based on preset scenario complexity conditions. This solves the problem in related technologies that the reliability of the generated dangerous scenarios is low and it is difficult to meet the testing requirements of smart driving vehicles. This achieves the technical effect of improving the reliability of the target driving scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 is a hardware structure block diagram of a computer terminal according to a method for determining a driving scenario in an embodiment of the present application;
[0022] Figure 2 is a flow chart of a method for determining a driving scene according to an embodiment of the present application;
[0023] Figure 3 is another flow chart of a method for determining a driving scenario according to an embodiment of the present application;
[0024] Figure 4 is a structural block diagram of a generative adversarial network according to an embodiment of the present application;
[0025] Figure 5 It is a structural block diagram of a device for determining a driving scene according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] The method embodiment provided in the embodiment of the present application can be run in a computer terminal. Taking running on a computer terminal as an example, Figure 1 is a hardware structure block diagram of a computer terminal according to a method for determining a driving scene in an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing system such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the driving scene in the embodiment of the present application. The processor 102 runs various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage systems, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the secure text via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the camera device. In one example, the transmission system 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
[0031] In this embodiment, a method for determining a driving scene is provided, including but not limited to being applied to the above-mentioned computer terminal. Figure 2 : is a flow chart of a method for determining a driving scene according to an embodiment of the present application, the process comprising the following steps:
[0032] Step S202, obtaining driving data of the target vehicle during driving;
[0033] It should be noted that driving data is data collected under natural working conditions, and driving data includes the driving data of the target vehicle and the driving data of the adjacent vehicles within the preset boundary range of the target vehicle. Specifically, the driving data of the target vehicle can be obtained by setting detectors and radars on the target vehicle; and for the driving data of the adjacent vehicles, the computer terminal can obtain the driving data of the adjacent vehicles within the preset boundary range of the target vehicle. The boundary range here can include the spatial boundary range and the temporal boundary range. The spatial boundary range can include but is not limited to the front of the target vehicle, the rear of the target vehicle, and the side of the target vehicle (such as the left or right side).
[0034] The time boundary range specifically means that the driving data obtained can be driving data within a period of time, which can be an hour or a day, and this application does not limit this. For example, if driving data within an hour is obtained, the driving data can specifically include driving data information of the target vehicle and the adjacent vehicle at various time points within the hour, such as the longitudinal deceleration, steering angular velocity, following information, lateral distance, longitudinal distance, etc. of the vehicle and the adjacent vehicle at different time points.
[0035] Step S204, screening based on the driving data to obtain initial dangerous driving data;
[0036] It should be noted that the purpose of screening based on the driving data is to screen out driving data that can construct dangerous scenarios; dangerous scenarios include but are not limited to dangerous car-following scenarios, dangerous lane-changing scenarios, etc. Therefore, the computer terminal can screen out driving data with the characteristics of dangerous car-following scenarios and dangerous lane-changing scenarios based on the driving data, and determine the screened driving data with the characteristics of dangerous car-following scenarios and dangerous lane-changing scenarios as initial dangerous driving data.
[0037] Step S206, performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data;
[0038] It should be noted that after the screening process in the previous step, the amount of initial dangerous driving data with dangerous scene characteristics is not large. Furthermore, through derivative processing, the amount of initial dangerous driving data can be expanded, and more dangerous scenes can be generated to better meet the virtual testing of smart driving car application scenarios.
[0039] In some embodiments, following step S206, the performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data includes: inputting the initial dangerous driving data into a pre-trained generative adversarial network; and performing derivative processing on the initial dangerous driving data based on the generative adversarial network to obtain derived dangerous driving data.
[0040] It should be noted that in the field of machine learning, GAN (Generative Adversarial Network) has the ability to generate realistic image data, that is, GAN has the potential to generate high-confidence data. Therefore, the initial dangerous driving data is input into GAN, and GAN performs derivative processing to obtain derived dangerous driving data.
[0041] In an exemplary embodiment, the initial dangerous driving data is subjected to derivative processing based on the generative adversarial network to obtain derived dangerous driving data, including: based on the feature decomposition module of the generative adversarial network, the initial dangerous driving data is subjected to feature attribute decomposition to obtain attribute features and time series features of the initial dangerous driving data; the attribute features, time series features and set random noise are input into the generator of the generative adversarial network, and the generator performs derivative processing based on the attribute features, time series features and preset random noise to obtain derived dangerous driving data.
[0042] It should be noted that for conventional GAN networks, it is still challenging to generate high-confidence data. The reason is that the initial dangerous driving data is time series data, and there is complexity between the time series and its related attributes (non-linearity, non-stationarity, and long memory); the time series has autocorrelation. Conventional GAN networks cannot learn such correlations well, and it is difficult to generate autocorrelation sequences. Conventional GAN networks are difficult to train, unstable, and have gradient vanishing problems.
[0043] The GAN network in the embodiment of the present application is compared with the conventional GAN network, and the feature decomposition module is added. The feature decomposition module can perform feature attribute decomposition on the initial dangerous driving data to obtain the attribute characteristics and time series characteristics of the initial dangerous driving data. Among them, the attribute characteristics may include trends (mainly reflecting the continuous upward or downward changes in the characteristics of the moving target over a long period of time), periodic differences (mainly reflecting the periodicity of the changes in the characteristics of the moving target) and residuals (random fluctuations after removing trends and extreme values).
[0044] Specifically, the feature decomposition module in the embodiment of the present application decomposes the initial dangerous driving data into time series features and attribute features by using STL (Seasonal and Trend Decomposition using LOESS, decomposition time series method). For the attribute feature Y, it can be further decomposed into trend component T, periodic component S and residual component R. The specific formula is as follows:
[0045] Y = T + S + R;
[0046] Furthermore, the attribute characteristics and time series characteristics of the initial dangerous driving data are derived through the generator of the generative adversarial network based on the attribute characteristics, time series characteristics and set random noise to obtain derived dangerous driving data.
[0047] In this embodiment, the feature decomposition module is used to decompose the initial dangerous driving data into feature attributes, so as to generate high-confidence data and improve the accuracy of the derived dangerous driving data.
[0048] Step S208: when there is abnormal data in the derived dangerous driving data that does not meet the physical constraint conditions of the vehicle, the abnormal data is corrected to obtain corrected dangerous driving data.
[0049] Among them, the vehicle physical constraint conditions are used to verify whether the derived dangerous driving data conforms to the vehicle interaction rules and physical restrictions. It can be understood that after the derivative processing of the neural network model, i.e., the GAN network in the previous step, due to the randomness of the neural network model, the automatically generated derived dangerous driving data has fluctuations, anomalies, and the scene complexity does not meet the actual needs, which may not conform to the movement rules and constraints in the real driving environment, so it is corrected by the vehicle physical constraint conditions.
[0050] Step S210: generating a plurality of initial driving scenarios based on the corrected dangerous driving data, and selecting a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition.
[0051] It is understandable that the target driving scenario finally screened out is the dangerous scenario used for intelligent driving scenario testing. Among them, the scenario complexity condition is a condition for judging the complexity of the generated initial driving scenario. The initial driving scenario may be too simple and not meet the actual needs, while a high-complexity scenario helps to improve the test efficiency. Therefore, the computer terminal can screen out the target driving scenario that meets the scenario complexity condition from the initial driving scenario based on the scenario complexity condition.
[0052] In some embodiments, the computer terminal may input the corrected dangerous driving data into a scenario construction unit, implement scenario construction based on the scenario construction unit, and generate a plurality of initial driving scenarios.
[0053] Through the above steps, by obtaining the driving data of the target vehicle during driving, the driving data is screened to obtain the initial dangerous driving data, and then the initial dangerous driving data can be derived to obtain the derived dangerous driving data. On this basis, when it is determined that there are abnormal data that do not meet the physical constraints of the vehicle in the derived dangerous driving data, the abnormal data will be corrected to obtain the corrected dangerous driving data, so that multiple initial driving scenes can be generated based on the corrected dangerous driving data, and based on the preset scene complexity conditions, more reliable target driving scenes can be screened from multiple initial driving scenes. The problem in the related technology that the reliability of the generated dangerous scenes is low and it is difficult to meet the testing requirements of intelligent driving cars is solved. The technical effect of improving the reliability of driving scenes is achieved.
[0054] The above-mentioned step S204 can be implemented through the following scheme, including: determining whether a dangerous event occurs during the driving of the target vehicle; when it is determined that a dangerous event occurs, filtering out data that meets the preset scenario filtering conditions from the driving data; and determining initial dangerous driving data based on the data that meets the preset scenario filtering conditions.
[0055] Among them, the preset scenario screening conditions are conditions set to screen out data that meet the characteristics of dangerous driving scenarios. It is understandable that dangerous driving scenarios may include dangerous following scenarios, dangerous lane changing scenarios, etc. During the driving process of the vehicle, dangerous events may or may not occur. This application needs to screen out data that can construct dangerous driving scenarios. Therefore, it is necessary to first determine whether a dangerous event occurs during driving, and then carry out screening based on the determination of the occurrence of a dangerous event.
[0056] There are multiple feasible schemes for filtering out data that meets preset scenario filtering conditions. In one feasible scheme, the preset scenario filtering conditions are used to filter out dangerous following data from the driving data; the driving data includes: the driving data of the target vehicle, and the driving data of the adjacent vehicles within the preset boundary range of the target vehicle.
[0057] When it is determined that a dangerous event has occurred, data that meets a preset scenario screening condition is filtered out from the driving data, including: when it is determined that the dangerous event has occurred, first associated data between the target vehicle and the adjacent vehicle is determined based on the driving data of the vehicle itself and the driving data of the adjacent vehicle; the first associated data includes following information, lateral distance, longitudinal distance and longitudinal headway; second associated data that meets a first preset condition is determined from the first associated data, and the second associated data is determined as data that meets the preset scenario screening condition, wherein the first preset condition includes: the following information meets the following condition, the lateral distance is less than the lateral distance threshold, the longitudinal distance meets the longitudinal distance condition, and the longitudinal headway meets the longitudinal headway condition.
[0058] It should be noted that the driving data includes the driving data of the vehicle and the driving data of the vehicles adjacent to the vehicle. For the vehicle, the number of the vehicles adjacent to the vehicle can be one or more, and the vehicles adjacent to the vehicle can be in front of the vehicle or behind the vehicle. Therefore, in the actual data processing process, the driving data of the vehicle and the driving data of the vehicles adjacent to the vehicle can be included.
[0059] It should be noted that the following information refers to the following relationship between the own vehicle and the vehicle on top, that is, the following relationship; the following information satisfying the following condition means that the own vehicle and the vehicle on top have stable following information. For example, taking the time point when the dangerous event occurs as the reference time point, within a period of time before the reference time point, the own vehicle always follows the same vehicle on top, so it can be determined that the own vehicle and the vehicle on top have stable following information.
[0060] The longitudinal distance satisfies the longitudinal distance condition when the front-to-rear distance between the vehicle and the adjacent vehicle meets the set requirements, such as being less than a set longitudinal distance threshold, or selecting an adjacent vehicle with the closest longitudinal distance to the vehicle from among multiple adjacent vehicles.
[0061] The longitudinal headway time meeting the longitudinal headway time condition means that the longitudinal headway time between vehicles is less than the set longitudinal headway time threshold. For example, if the longitudinal headway time threshold is 2s (seconds), the time point when the dangerous event occurs is taken as the reference time point. Within a period of time before the reference time point, the longitudinal headway time between the vehicle and the adjacent vehicle is always less than 2s.
[0062] In this embodiment, by presetting scenario screening conditions, dangerous car-following data with dangerous car-following scenario characteristics are screened out, and then based on the dangerous car-following data, dangerous scenarios can be constructed, thereby providing an expansion solution for virtual testing of smart driving car application scenarios.
[0063] In another implementable scheme, the preset scenario screening condition is used to screen out dangerous lane changing data from the driving data; the driving data includes the driving data of the target vehicle and the driving data of the adjacent vehicle within the preset boundary range of the target vehicle; when it is determined that a dangerous event has occurred, the data satisfying the preset scenario screening condition is screened out from the driving data, including: when it is determined that the dangerous event has occurred, based on the driving data of the target vehicle and the driving data of the adjacent vehicle, third associated data between the target vehicle and the adjacent vehicle is determined; the third associated data includes lateral displacement, lateral spacing, steering angular velocity, and risk time; from the third associated data, fourth associated data satisfying the second preset condition is determined, and the fourth associated data is determined as data satisfying the preset scenario screening condition, wherein the second preset condition includes: the lateral displacement reaches a lateral displacement threshold, the lateral spacing reaches a lateral spacing threshold, the steering angular velocity reaches an angular velocity threshold, and the risk time satisfies a time condition.
[0064] It should be noted that the lateral displacement reaching the lateral displacement threshold means that the lateral displacement of the vehicle exceeds the set lateral displacement threshold, and the lateral displacement threshold can be set to 2m (meter); optionally, the time point when the dangerous event occurs can be used as the reference time point, and within a period of time before and after the reference time point, the lateral displacement always exceeds the lateral displacement threshold.
[0065] The lateral spacing reaches the lateral spacing threshold value, which means that the lateral spacing between the vehicle and the adjacent vehicle is greater than or equal to the set lateral spacing threshold value. Optionally, the time point when the dangerous event occurs can be used as the reference time point, and within a period of time before and after the reference time point, such as within 5 seconds before and after, the lateral spacing always exceeds the lateral spacing threshold value.
[0066] The steering angular velocity reaching the angular velocity threshold is used to determine whether the vehicle is in a lane change state. The time point when the dangerous event occurs can be used as the reference time point. Within 5 seconds before the reference time point, the steering angular velocity is greater than the angular velocity threshold.
[0067] The risk time is the minimum headway time (THW) and the minimum time to collision (TTC) between vehicles. The risk time meets the time condition when the minimum headway time (THW) between vehicles is less than the set headway time threshold, and the minimum collision time is less than the set collision time threshold. Optionally, the time point when the dangerous event occurs can be used as the reference time point. Within a period of time before and after the reference time point, the minimum THW between the vehicle and the adjacent vehicle within 2 seconds before the reference time point is less than 2 seconds, or the minimum TTC is less than 2.7 seconds.
[0068] In this embodiment, by presetting scenario screening conditions, dangerous lane changing data with dangerous lane changing scenario characteristics are screened out, and then based on the dangerous lane changing data, dangerous scenarios can be constructed, thereby providing an expansion solution for virtual testing of smart driving car application scenarios.
[0069] In an exemplary embodiment, the vehicle physical constraint condition includes a following scenario constraint condition and a lane changing scenario constraint condition; when there is abnormal data that does not meet the vehicle physical constraint condition in the derived dangerous driving data, the abnormal data is corrected to obtain corrected dangerous driving data, including: determining a following scenario constraint parameter and a lane changing scenario constraint parameter based on the derived dangerous driving data; the following scenario constraint parameters include a speed of a target vehicle, a speed of an adjacent vehicle of the target vehicle, and a front and rear vehicle distance between the target vehicle and the adjacent vehicle; the lane changing scenario constraint parameters include a lateral coordinate difference and a longitudinal coordinate difference between the target vehicle and the adjacent vehicle; based on the following scenario constraint condition, determining whether there is abnormal data in the speed of the target vehicle, the speed of the adjacent vehicle of the target vehicle, and the front and rear vehicle distance between the target vehicle and the adjacent vehicle, and based on the lane changing scenario constraint condition, determining whether there is abnormal data in the front and rear vehicle distance, the lateral coordinate difference, and the longitudinal coordinate difference between the target vehicle and the adjacent vehicle; when it is determined that there is abnormal data, based on the data attributes of the determined abnormal data, selecting a correction method matching the data attributes to correct the abnormal data to obtain corrected dangerous driving data.
[0070] It should be noted that when determining whether there is abnormal data in the derived risk data, it can be mainly carried out through the following scene constraint conditions and lane change scene constraint conditions. The computer terminal determines whether the front and rear vehicle distance between the target vehicle and the adjacent vehicle is greater than 0m / s (meters / second), and whether the front and rear vehicle distance is greater than the set front and rear vehicle distance threshold. When the speed of the target vehicle and the adjacent vehicle is greater than 0m / s (meters / second), and the front and rear vehicle distance needs to be greater than the set front and rear vehicle distance threshold, it means that the following scene constraint conditions are met; otherwise, it means that the following scene constraint conditions are not met and can be corrected.
[0071] The computer terminal can determine whether the lateral coordinate difference between the target vehicle and the adjacent vehicle is greater than 0, and whether the longitudinal coordinate differences are all greater than 0 or all less than 0 (the longitudinal coordinate differences here can be the longitudinal coordinate differences calculated at multiple time points). When the lateral coordinate difference is greater than 0, and the longitudinal coordinate differences are all greater than 0 or all less than 0, it indicates that the lane changing scenario constraint conditions are met; otherwise, it indicates that the lane changing scenario constraint conditions are not met and corrections can be made.
[0072] In some embodiments, when the speed of the target vehicle is abnormal data, the time point corresponding to the abnormal speed of the target vehicle can be determined, the target speed of the target vehicle at the previous time point and the speed of the target vehicle at the next time point can be determined, and the abnormal speed of the target vehicle can be corrected using the average of the speeds of the target vehicle at the upper and lower time points.
[0073] In some embodiments, when the speed of the oncoming vehicle is abnormal data, the time point at which the abnormal speed of the oncoming vehicle is located can be determined, as can the speed of the oncoming vehicle at the previous time point and the speed of the oncoming vehicle at the next time point before the time point. The abnormal speed of the oncoming vehicle can be corrected by using the average of the speeds of the oncoming vehicle at the two previous time points.
[0074] In some embodiments, when the horizontal coordinate difference is abnormal data, the time point at which the horizontal coordinate difference is located can be determined, the horizontal coordinate difference at the previous time point can be determined, and the horizontal coordinate difference can be corrected to the horizontal coordinate difference at the previous time point;
[0075] In some embodiments, when the speed of the target vehicle is abnormal data, the time point at which the longitudinal coordinate difference is located can be determined, the longitudinal coordinate difference at the previous time point can be determined, and the longitudinal coordinate difference can be corrected to the longitudinal coordinate difference at the previous time point.
[0076] In this embodiment, the reliability of the target driving scene determined subsequently is improved by correcting the fluctuating and abnormal data.
[0077] In an exemplary embodiment, based on a preset scene complexity condition, a target driving scene is screened out from the multiple initial driving scenes, including: determining the scene complexities corresponding to the multiple initial driving scenes respectively; comparing the multiple scene complexities with a preset scene complexity threshold respectively to obtain a comparison result; and determining the initial driving scene whose comparison result is that the scene complexity reaches the scene complexity threshold as the target driving scene.
[0078] The scene complexity is a parameter used to indicate the complexity of the generated initial driving scene. The scene complexity threshold is a parameter used to determine whether the scene complexity of the initial driving scene meets the actual requirements. The scene complexity threshold can be adaptively set according to the actual test scene, test accuracy requirements, etc.
[0079] Specifically, the computer terminal calculates the scene complexity of each initial driving scene, and compares each scene complexity with the set scene complexity threshold. If the scene complexity of an initial driving scene does not reach the scene complexity threshold, that is, is less than the scene complexity threshold, it means that the initial driving scene is too simple and does not meet the test requirements, and the initial driving scene can be removed.
[0080] In this embodiment, by setting a scene complexity threshold, and then comparing the complexity of each scene with the set scene complexity threshold, initial driving scenes that do not meet the requirements are removed, thereby improving the reliability of the target driving scenes determined subsequently.
[0081] In an exemplary embodiment, the determining of the scene complexity of each of the multiple initial driving scenes includes: determining the scene complexity of any initial driving scene by the following steps: determining static scene information of the initial driving scene, and inputting the static scene information into a recognition algorithm model, wherein the recognition algorithm model recognizes each element in the static scene information to obtain an element recognition result, and determines an element recognition error rate of each element based on the element recognition result, and obtains the scene static complexity of the initial driving scene according to each element recognition error rate; determining spatiotemporal interaction information of multiple vehicle pairs in the initial driving scene, wherein the spatiotemporal interaction information includes an encounter angle, a relative speed, and a relative distance of multiple vehicle pairs, calculating the vehicle pair complexity of the multiple vehicle pairs based on the encounter angle, the relative speed, and the relative distance, and accumulating the multiple vehicle pair complexities to obtain the scene dynamic complexity of the initial driving scene; and determining the scene complexity of the initial driving scene based on the sum of the scene static complexity and the scene dynamic complexity and the product of the environmental correction coefficient.
[0082] It should be noted that the scene complexity of the initial driving scene may be affected by multiple factors, such as dynamic traffic factors, static traffic factors, environmental factors, etc. The dynamic traffic factors may correspond to the scene dynamic complexity, the static traffic factors may correspond to the scene static complexity, and the environmental factors may correspond to the environmental correction coefficient.
[0083] Static scene information may be static parameters obtained in the initial driving scene, and specifically may include road type, lane width, lane lines, traffic lights, etc. in the initial driving scene based on high-precision maps, sensors, positioning information, etc.
[0084] The spatiotemporal interaction information mainly refers to the interaction relationship between vehicles, such as the encounter angle θ between vehicles. ij , relative speed v ij , relative distance d ij wait.
[0085] In some embodiments, when calculating the scene dynamic complexity, the influencing factors of each vehicle team are determined, including the encounter angle θ ij , relative speed v ij , relative distance d ij , both use nonlinear models to calculate fleet complexity, fleet complexity C ij The calculation formula is as follows:
[0086]
[0087] The convoy complexity of the vehicle fleet is accumulated to obtain the scene dynamic complexity. The specific formula is as follows:
[0088]
[0089] In some embodiments, when calculating the static complexity of a scene, the static scene information may be input into a recognition algorithm model, and the static scene information road and street scene may be recognized based on the recognition algorithm model to obtain an element recognition result, and then the recognition error rate of each factor (i.e., the recognition error rate of each element) may be determined based on the obtained element recognition result. The element recognition error rate is the probability that the recognition algorithm model will misrecognize various elements in road type, lane width, lane line, and traffic light. The recognition error rate of each factor may be used as complexity, and the calculation formula is as follows:
[0090] Element recognition error rate = recognition error scenario / total scenarios * 100%;
[0091] Finally, the recognition error rates of each element are weighted and summed to obtain the static complexity of the scene.
[0092] In this embodiment, by considering three types of factors, namely dynamic traffic factors, static traffic factors, and environmental factors, the scene complexity is accurately calculated, thereby removing initial driving scenes that do not meet the requirements and improving the reliability of the target driving scenes determined subsequently.
[0093] In order to better understand the above-mentioned determination scheme of the driving scene, in an optional embodiment, a scheme is also provided to explain the above-mentioned scheme.
[0094] Virtual simulation is one of the most important testing methods for smart driving cars in the functional development and verification stage. Scenario-based virtual testing has gradually become a consensus for smart driving car testing, so scenarios play a vital role in smart driving testing. Among them, the test of dangerous working conditions (i.e. dangerous scenarios) is a key link in improving the decision-making level of smart driving cars. However, dangerous working conditions usually occur when multiple scene elements are in a low probability. If the scenarios are accumulated through real vehicle testing, it is difficult to meet the testing needs of smart driving cars, and it is impossible to fundamentally achieve the goal of expanding the number of test scenarios. In related technologies, in order to expand the number of test scenarios, massive data must be continuously collected, which greatly consumes manpower and material resources, and has low reliability. Therefore, the test and verification of dangerous scenarios of intelligent driving systems face huge challenges.
[0095] In view of the above problems, the purpose of the optional embodiment of the present application is to improve the reliability of the generated dangerous scene to determine the driving scene method, the overall technical flow chart is as shown in the attached Figure 3 As shown, the implementation steps include the following:
[0096] Step S31: Acquire driving data.
[0097] Step S32: Based on the driving data, a small amount of initial dangerous driving data is obtained. When screening, one can screen according to the dangerous following scene screening conditions. Specifically, the initial dangerous driving data screened needs to meet the following requirements: During the driving process, the vehicle always follows the same vehicle in front 10 seconds before the dangerous event occurs, and the two vehicles have a stable following relationship, and there is no re-braking caused by the insertion of other vehicles. The front vehicle is located in the space in front of the vehicle with a lateral distance of less than 2m and the longitudinal distance is the closest vehicle traveling in the same direction; during the driving process, the longitudinal headway time distance between the vehicle and the front vehicle is always less than 2s within 5 seconds before the dangerous event occurs.
[0098] Secondly, screening can be carried out according to the screening conditions of dangerous lane-changing scenarios. Specifically, the initial dangerous driving data obtained by screening needs to meet the following requirements: the lateral displacement of the vehicle within 5 seconds before and after the dangerous moment exceeds 2m, and the lateral distance with the collision object is greater than 2m, that is, the vehicle has obvious lateral movement; the steering angular velocity of the vehicle within 5 seconds before the dangerous moment is greater than 2° / s, that is, the vehicle is in a lane-changing state; the minimum THW of the vehicle with the collision object within 2 seconds before the dangerous moment is less than 2s or the minimum TTC is less than 2.7s, to ensure the existence of a dangerous event.
[0099] Step S33: training the improved GAN network. The training step of the generative adversarial network includes: obtaining dangerous driving data samples; based on the feature decomposition module of the generative adversarial network to be trained, performing feature attribute decomposition on the dangerous driving data samples to obtain sample attribute features and sample time series features of the dangerous driving data samples; inputting the sample attribute features, sample time series features and sample random noise into the generator of the generative adversarial network to be trained, and the generator performs prediction based on the sample attribute features, sample time series features and sample random noise to obtain sample predicted dangerous driving data; inputting the sample real dangerous driving data and the sample predicted dangerous driving data into the discriminator of the generative adversarial network, and the discriminator determines the prediction result; training the generative adversarial network to be trained based on the prediction result and the Wasserstein loss function until the training end condition is met, and a trained generative adversarial network is obtained.
[0100] Specifically, refer to Figure 4 As shown in the figure, it is the structural block diagram of the improved GAN network. Figure 4 The main structure in the expansion explanation:
[0101] (1) Feature Decomposition Module
[0102] STL (Seasonal and Trend Decomposition using LOESS) is a very general and robust method for decomposing time series. Therefore, the STL method is used to decompose the multidimensional time series of scene data into attribute features and time series features. Attribute features include trend (the continuous upward or downward changes in the main moving target features over a long period of time), period difference (mainly reflecting the periodicity of the changes in the moving target features) and residual (random fluctuations after removing trends and extreme values). Through STL, each time series feature Y is further decomposed into trend component T, period component S and residual component R as supplementary attribute features.
[0103] (2) Generator
[0104] The function of the generator is to generate false data similar to real data. In the present invention, the generator adopts a combined structure of RNN+CNN, in which the recurrent neural network RNN is mainly used to process sequence data. By introducing a recurrent connection, the network can retain and utilize previous state information. This recurrent structure allows the network to have memory capabilities, thereby processing tasks with time dependencies. The convolutional neural network CNN can obtain spatial correlations in multidimensional feature maps through convolutional layers and pooling layers. Thereby effectively improving training efficiency.
[0105] (3) Discriminator
[0106] The task of the discriminator is to determine whether the input data is real data or false data. In the present invention, the discriminator introduces an auxiliary discriminator to determine the authenticity of the input attribute features, and the discriminator is used to determine the authenticity of the time series features.
[0107] (4) Loss Function
[0108] The reverse feedback process in the training process requires the use of a loss function to calculate the loss, which is used to evaluate the performance of the network. In this application, based on the Wasserstein loss function, it is proposed to introduce a flat potential divergence so that the network parameters can converge faster, the training effect is closer to expectations, and the purpose of more stable training is achieved.
[0109] Step S34: Automatically generate derived dangerous driving data based on the improved GAN network.
[0110] Step S35: Correction processing.
[0111] Step S36: Determine whether the scene complexity condition is met. The automatically generated dangerous scene may be too simple and not meet the actual needs, so high-complexity scenes help improve test efficiency. The scene complexity includes three categories: dynamic traffic factors, static traffic factors, and environmental factors. If not met, the improved GAN network can be retrained to perform hyperparameter tuning. If satisfied, proceed to step S37.
[0112] Step S37: Generate a target driving scenario.
[0113] Step S38: Validity verification. In order to verify the validity of the corrected dangerous scene, the dangerous road driving scene is modeled and reproduced in the simulation software VTD to determine whether the scene is correct, whether the main vehicle moves normally, whether the interaction with surrounding vehicles is reasonable, whether dangerous features appear, etc.
[0114] In summary, the optional embodiment of the present application proposes a method for automatically generating scenarios based on an improved GAN network, that is, based on a small number of realistic dangerous scenarios, a data-driven method is used to automatically generate more new, reasonable dangerous scenarios that do not require field collection. At the same time, in order to verify whether the automatically generated scenarios meet the vehicle interaction rules and physical constraints, some constraints and complexity models are added to the present invention to correct them, and dangerous scenarios are built and reproduced in the simulation software VTD to verify the effectiveness of the corrected dangerous scenarios. Provide an expansion solution for virtual testing of application scenarios of smart driving vehicles.
[0115] Furthermore, based on a small number of actual dangerous scenarios, data-driven methods can be used to automatically generate more new, reasonable dangerous scenarios that do not require field collection, providing an expansion route for virtual testing of smart driving car application scenarios.
[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to run the methods of each embodiment of the present application.
[0117] In this embodiment, a device for determining a driving scene is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0118] Figure 5 is a structural block diagram of a device for determining a driving scene according to an embodiment of the present application; Figure 5 As shown, including:
[0119] An acquisition module 52 is used to acquire the driving data of the target vehicle during driving;
[0120] A screening module 54, configured to screen the driving data to obtain initial dangerous driving data;
[0121] A derivation module 56, configured to perform derivation processing based on the initial dangerous driving data to obtain derived dangerous driving data;
[0122] A correction module 58, configured to correct the abnormal data in the case where the derived dangerous driving data contains abnormal data that does not satisfy the physical constraint conditions of the vehicle, so as to obtain corrected dangerous driving data;
[0123] The generating module 59 is used to generate a plurality of initial driving scenarios based on the corrected dangerous driving data, and to select a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition.
[0124] Through the above-mentioned device of the present application, by obtaining the driving data of the target vehicle during driving, the driving data is screened to obtain the initial dangerous driving data, and then the initial dangerous driving data can be derived to obtain the derived dangerous driving data. On this basis, when it is determined that there is abnormal data that does not meet the physical constraints of the vehicle in the derived dangerous driving data, the abnormal data will be corrected to obtain the corrected dangerous driving data, so that multiple initial driving scenes can be generated based on the corrected dangerous driving data, and more reliable target driving scenes can be screened out from multiple initial driving scenes based on the preset scene complexity conditions. The problem in the related art that the reliability of the generated dangerous scenes is low and it is difficult to meet the testing requirements of intelligent driving cars is solved. The technical effect of improving the reliability of driving scenes is achieved.
[0125] In an exemplary embodiment, the screening module 54 is also used to determine whether a dangerous event occurs during the driving of the target vehicle; when it is determined that the dangerous event occurs, data that meets the preset scenario screening conditions is screened out from the driving data; and initial dangerous driving data is obtained based on the data that meets the preset scenario screening conditions.
[0126] In an exemplary embodiment, the preset scenario screening condition is used to screen out dangerous following data from the driving data; the driving data includes: the driving data of the target vehicle, and the driving data of the adjacent vehicle within the preset boundary range of the target vehicle; the screening module 54 is also used to determine the first associated data between the target vehicle and the adjacent vehicle based on the driving data of the target vehicle and the driving data of the adjacent vehicle when it is determined that the dangerous event has occurred; the first associated data includes following information, lateral distance, longitudinal distance and longitudinal headway; second associated data that meets the first preset condition is determined from the first associated data, and the second associated data is determined as data that meets the preset scenario screening condition, wherein the first preset condition includes: the following information meets the following condition, the lateral distance is less than the lateral distance threshold, the longitudinal distance meets the longitudinal distance condition, and the longitudinal headway meets the longitudinal headway condition.
[0127] In an exemplary embodiment, the preset scenario screening condition is used to screen out dangerous lane changing data from the driving data; the driving data includes the target vehicle's own vehicle driving data and the adjacent vehicle's driving data within the preset boundary range of the target vehicle; the screening module 54 is also used to determine the third associated data between the target vehicle and the adjacent vehicle based on the own vehicle driving data and the adjacent vehicle driving data when it is determined that the dangerous event has occurred; the third associated data includes lateral displacement, lateral spacing, steering angular velocity, and risk time; from the third associated data, determine the fourth associated data that meets the second preset condition, and determine the fourth associated data as data that meets the preset scenario screening condition, wherein the second preset condition includes: the lateral displacement reaches a lateral displacement threshold, the lateral spacing reaches a lateral spacing threshold, the steering angular velocity reaches an angular velocity threshold, and the risk time meets the time condition.
[0128] In an exemplary embodiment, the derivation module 56 is further used to input the initial dangerous driving data into a pre-trained generative adversarial network; based on the generative adversarial network, the initial dangerous driving data is subjected to derivation processing to obtain derived dangerous driving data.
[0129] In an exemplary embodiment, the derivation module 56 is also used to perform feature attribute decomposition on the initial dangerous driving data based on the feature decomposition module of the generative adversarial network to obtain the attribute characteristics and time series characteristics of the initial dangerous driving data; the attribute characteristics, the time series characteristics and the set random noise are input into the generator of the generative adversarial network, and the generator performs derivation processing based on the attribute characteristics, the time series characteristics and the preset random noise to obtain derived dangerous driving data.
[0130] In an exemplary embodiment, the vehicle physical constraints include following scenario constraints and lane changing scenario constraints; the correction module 58 is further used to determine following scenario constraint parameters and lane changing scenario constraint parameters based on the derived dangerous driving data; the following scenario constraint parameters include the speed of the target vehicle, the speed of the vehicle adjacent to the target vehicle, and the front and rear vehicle distances between the target vehicle and the adjacent vehicle; the lane changing scenario constraint parameters include the lateral coordinate difference and the longitudinal coordinate difference between the target vehicle and the adjacent vehicle; based on the following scenario constraints, determine whether there is abnormal data in the speed of the target vehicle, the speed of the vehicle adjacent to the target vehicle, and the front and rear vehicle distance between the target vehicle and the adjacent vehicle, and based on the lane changing scenario constraints, determine whether there is abnormal data in the front and rear vehicle distance between the target vehicle and the adjacent vehicle, the lateral coordinate difference, and the longitudinal coordinate difference; when it is determined that the abnormal data exists, based on the data attributes of the determined abnormal data, select a correction method matching the data attributes to correct the abnormal data to obtain corrected dangerous driving data.
[0131] In an exemplary embodiment, the generation module 59 is further used to determine the scene complexities corresponding to the multiple initial driving scenes respectively; compare the multiple scene complexities with the preset scene complexity thresholds respectively to obtain comparison results; and determine the initial driving scene whose comparison result is that the scene complexity reaches the scene complexity threshold as the target driving scene.
[0132] In an exemplary embodiment, the generation module 59 is further used to determine the static scene information of the initial driving scene, and input the static scene information into the recognition algorithm model, the recognition algorithm model identifies each element in the static scene information to obtain an element recognition result, and determines the element recognition error rate of each element based on the element recognition result, and obtains the scene static complexity of the initial driving scene according to each element recognition error rate; determines the spatiotemporal interaction information of multiple vehicle pairs in the initial driving scene, the spatiotemporal interaction information includes the encounter angle, relative speed and relative distance of the multiple vehicle pairs, calculates the vehicle pair complexity of the multiple vehicle pairs based on the encounter angle, the relative speed and the relative distance, accumulates the multiple vehicle pair complexities to obtain the scene dynamic complexity of the initial driving scene; determines the scene complexity of the initial driving scene based on the sum of the scene static complexity and the scene dynamic complexity, and the product of the environmental correction coefficient.
[0133] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein any of the above methods is executed when the program is executed.
[0134] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0135] S1, obtaining driving data of the target vehicle during driving;
[0136] S2, screening based on the driving data to obtain initial dangerous driving data;
[0137] S3, performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data;
[0138] S4, when there is abnormal data that does not meet the vehicle physical constraint condition in the derived dangerous driving data, correct the abnormal data to obtain corrected dangerous driving data;
[0139] S5, generating a plurality of initial driving scenarios based on the corrected dangerous driving data, and screening out a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition.
[0140] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0141] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0142] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the computer program to execute the steps in any one of the above method embodiments.
[0143] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0144] S1, obtaining driving data of the target vehicle during driving;
[0145] S2, screening based on the driving data to obtain initial dangerous driving data;
[0146] S3, performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data;
[0147] S4, when there is abnormal data that does not meet the vehicle physical constraint condition in the derived dangerous driving data, correct the abnormal data to obtain corrected dangerous driving data;
[0148] S5, generating a plurality of initial driving scenarios based on the corrected dangerous driving data, and screening out a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition.
[0149] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0150] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0151] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented with a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented with program codes executable by the computing system, so that they can be stored in a storage system and run by the computing system, and in some cases, the steps shown or described can be run in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0152] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a driving scene, characterized in that: include: Acquire the driving data of the target vehicle during driving; Screening based on the driving data to obtain initial dangerous driving data; Performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data; When there is abnormal data that does not meet the physical constraint conditions of the vehicle in the derived dangerous driving data, the abnormal data is corrected to obtain corrected dangerous driving data; A plurality of initial driving scenarios are generated based on the corrected dangerous driving data, and a target driving scenario is screened out from the plurality of initial driving scenarios based on a preset scenario complexity condition.
2. The method according to claim 1, characterized in that: The screening based on the driving data to obtain initial dangerous driving data includes: Determining whether a dangerous event occurs during driving of the target vehicle; When it is determined that the dangerous event has occurred, filtering out data that meets a preset scenario screening condition from the driving data; Based on the data satisfying the preset scenario screening conditions, initial dangerous driving data is obtained.
3. The method according to claim 2, characterized in that The preset scenario screening condition is used to screen out dangerous car-following data from the driving data; The driving data includes: driving data of the target vehicle and driving data of an adjacent vehicle within a preset boundary range of the target vehicle; When it is determined that the dangerous event has occurred, filtering out data satisfying a preset scenario filtering condition from the driving data includes: In the case where it is determined that the dangerous event has occurred, first association data between the target vehicle and the adjacent vehicle is determined based on the driving data of the own vehicle and the driving data of the adjacent vehicle; the first association data includes following information, lateral distance, longitudinal distance and longitudinal headway; Determine second associated data that meets a first preset condition from the first associated data, and determine the second associated data as data that meets the preset scene screening condition, wherein the first preset condition includes: the following information meets the following condition, the lateral distance is less than a lateral distance threshold, the longitudinal distance meets the longitudinal distance condition, and the longitudinal headway meets the longitudinal headway condition.
4. The method according to claim 2, characterized in that: The preset scene screening condition is used to screen out dangerous lane change data from the driving data; the driving data includes the driving data of the target vehicle and the driving data of the adjacent vehicle within the preset boundary range of the target vehicle; When it is determined that the dangerous event has occurred, filtering out data satisfying a preset scenario filtering condition from the driving data includes: In the case of determining that the dangerous event occurs, determining third correlation data between the target vehicle and the adjacent vehicle based on the driving data of the own vehicle and the driving data of the adjacent vehicle; the third correlation data includes lateral displacement, lateral spacing, steering angular velocity, and risk time; From the third associated data, fourth associated data that meets the second preset condition is determined, and the fourth associated data is determined as data that meets the preset scene screening condition, wherein the second preset condition includes: the lateral displacement reaches a lateral displacement threshold, the lateral spacing reaches a lateral spacing threshold, the steering angular velocity reaches an angular velocity threshold, and the risk time meets a time condition.
5. The method according to claim 1, characterized in that The performing derivative processing based on the initial dangerous driving data to obtain derived dangerous driving data includes: Inputting the initial dangerous driving data into a pre-trained generative adversarial network; Based on the generative adversarial network, the initial dangerous driving data is subjected to derivative processing to obtain derived dangerous driving data.
6. The method according to claim 5, characterized in that The step of performing derivative processing on the initial dangerous driving data based on the generative adversarial network to obtain derived dangerous driving data includes: Based on the feature decomposition module of the generative adversarial network, the initial dangerous driving data is subjected to feature attribute decomposition to obtain attribute features and time series features of the initial dangerous driving data; The attribute characteristics, the timing characteristics and the set random noise are input into the generator of the generative adversarial network, and the generator performs derivative processing based on the attribute characteristics, the timing characteristics and the preset random noise to obtain derived dangerous driving data.
7. The method according to claim 1, characterized in that The vehicle physical constraint conditions include a following scenario constraint condition and a lane changing scenario constraint condition; when there is abnormal data in the derived dangerous driving data that does not meet the vehicle physical constraint conditions, the abnormal data is corrected to obtain corrected dangerous driving data, including: Based on the derived dangerous driving data, determining a following scenario constraint parameter and a lane-changing scenario constraint parameter; the following scenario constraint parameter includes the speed of the target vehicle, the speed of the vehicle adjacent to the target vehicle, and the distance between the target vehicle and the vehicle adjacent to the target vehicle; the lane-changing scenario constraint parameter includes the lateral coordinate difference and the longitudinal coordinate difference between the target vehicle and the vehicle adjacent to the target vehicle; Based on the following scenario constraint, determine whether there is abnormal data in the speed of the target vehicle, the speed of the vehicle next to the target vehicle, and the distance between the target vehicle and the vehicle next to it, and based on the lane changing scenario constraint, determine whether there is abnormal data in the distance between the target vehicle and the vehicle next to it, the lateral coordinate difference, and the longitudinal coordinate difference; When it is determined that the abnormal data exists, based on the determined data attributes of the abnormal data, a correction method matching the data attributes is selected to correct the abnormal data to obtain corrected dangerous driving data.
8. The method according to claim 1, characterized in that The step of selecting a target driving scene from the plurality of initial driving scenes based on a preset scene complexity condition includes: Determining scene complexities corresponding to each of the plurality of initial driving scenes; Comparing the plurality of scene complexities with a preset scene complexity threshold respectively to obtain a comparison result; The initial driving scene whose comparison result is that the scene complexity reaches the scene complexity threshold is determined as the target driving scene.
9. The method according to claim 8, characterized in that The determining of the scene complexity of each of the plurality of initial driving scenes comprises: for the scene complexity of any initial driving scene, the scene complexity is determined by the following steps: Determine static scene information of the initial driving scene, and input the static scene information into a recognition algorithm model, wherein the recognition algorithm model recognizes each element in the static scene information to obtain an element recognition result, and determines an element recognition error rate of each element based on the element recognition result, and obtains a scene static complexity of the initial driving scene according to each element recognition error rate; determine spatiotemporal interaction information of multiple vehicle pairs in the initial driving scene, wherein the spatiotemporal interaction information includes an encounter angle, a relative speed, and a relative distance of the multiple vehicle pairs, and calculates a vehicle pair complexity of the multiple vehicle pairs based on the encounter angle, the relative speed, and the relative distance, and accumulates multiple vehicle pair complexities to obtain a scene dynamic complexity of the initial driving scene; The scene complexity of the initial driving scene is determined based on the product of the sum of the scene static complexity and the scene dynamic complexity and the environment correction coefficient.
10. A device for determining a driving scene, characterized in that: include: An acquisition module, used to acquire the driving data of the target vehicle during driving; A screening module, used for screening based on the driving data to obtain initial dangerous driving data; A derivation module, used for performing derivation processing based on the initial dangerous driving data to obtain derived dangerous driving data; A correction module, configured to correct the abnormal data in the case where the derived dangerous driving data contains abnormal data that does not satisfy the physical constraint conditions of the vehicle, so as to obtain corrected dangerous driving data; A generation module is used to generate a plurality of initial driving scenarios based on the corrected dangerous driving data, and to screen out a target driving scenario from the plurality of initial driving scenarios based on a preset scenario complexity condition.
