Scene element library construction method for vehicle energy consumption evaluation
By building a scenario element library for vehicle energy consumption evaluation, the problem of existing technologies being unable to simulate real traffic conditions has been solved, more realistic testing and analysis have been achieved, and accurate energy consumption evaluation data has been provided.
Patent Information
- Application Number
- CN202510501556.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-09-12
AI Technical Summary
Existing vehicle energy consumption evaluation methods cannot effectively simulate real-world traffic conditions, resulting in poor test authenticity.
Build a scenario element library for vehicle energy consumption evaluation. By obtaining scenario information, extracting static and dynamic elements, forming traffic flow and road network data, and clustering them, a static and dynamic scenario element library is generated to simulate real-world traffic conditions.
It improves the authenticity of the test scenarios, can more accurately simulate and analyze the energy consumption of vehicles in various actual scenarios, and provide more detailed data support.
Smart Images

Figure CN120633368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle energy consumption evaluation, and in particular to a method for constructing a scene element library for whole vehicle energy consumption evaluation. Background Art
[0002] This section merely provides background information related to the present disclosure and is not necessarily prior art.
[0003] At present, vehicle economy evaluation mainly relies on dynamometer tests with standard driving cycles as input: the dynamometer simulates road loads, and a driving robot or an experienced human driver controls the vehicle under test to drive according to a given speed curve to obtain the vehicle's energy consumption or driving range.
[0004] However, current testing methods using test machines cannot simulate real-world traffic conditions, resulting in poor test authenticity. Therefore, building a scenario element library for vehicle energy consumption evaluation, so that test scenarios can simulate real-world traffic conditions and thus increase test authenticity, is an important research direction. Summary of the Invention
[0005] The purpose of the present invention is to at least solve the problem of how to improve the authenticity of test scenarios for vehicle energy consumption evaluation. This purpose is achieved through the following technical solutions:
[0006] The present invention proposes a method for constructing a scene element library for vehicle energy consumption evaluation, including:
[0007] Acquiring scene information, wherein the scene information is used to characterize the driving scene of the host vehicle;
[0008] Extracting static elements and dynamic elements from the scene information;
[0009] Forming traffic flow data through the dynamic elements and obtaining road network data through the static elements;
[0010] Extracting atomic roads from the road network data;
[0011] Clustering the atomic roads to form a static scene element library;
[0012] extracting atomic scenes from the traffic flow data;
[0013] The atomic scenes are clustered to form a dynamic scene element library.
[0014] The method for constructing a scenario element library for whole vehicle energy consumption evaluation of the present invention can construct a static scenario element library and a dynamic scenario element library for whole vehicle energy consumption evaluation, so that the test scenario can simulate real-world traffic conditions, thereby improving the authenticity of the test scenario.
[0015] In some embodiments, the step of extracting static elements and dynamic elements from the scene information includes:
[0016] extracting elements from the scene information;
[0017] Obtaining a driving state of the host vehicle in the elements, and classifying the elements according to the driving state, wherein the driving state includes an acceleration state, a constant speed state, a deceleration state, and an idle state;
[0018] Obtaining a driving area of the host vehicle in the element, and classifying the element according to the driving area, wherein the driving area includes an urban scene, a suburban scene, and a highway scene;
[0019] determining whether the elements change over time;
[0020] According to the change of the element over time, determining that the element is a dynamic element;
[0021] According to the fact that the element does not change over time, it is determined that the element is a static element.
[0022] In some embodiments, the step of obtaining the driving state of the host vehicle in the scene information includes:
[0023] Get the speed and acceleration of the main vehicle;
[0024] According to the fact that the speed of the main vehicle and the acceleration of the main vehicle are both greater than 0, it is determined that the main vehicle is in an accelerating state;
[0025] According to the fact that the speed of the main vehicle is greater than 0 and the acceleration of the main vehicle is equal to 0, it is determined that the main vehicle is in a uniform speed state;
[0026] According to the speed of the main vehicle being greater than 0 and the acceleration of the main vehicle being less than 0, determining that the main vehicle is in a deceleration state;
[0027] According to the fact that the speed of the host vehicle and the acceleration of the host vehicle are both 0, it is determined that the host vehicle is in an idle state.
[0028] In some embodiments, the step of obtaining road network data through the static elements includes:
[0029] Querying an open source geographic information database according to the static elements to obtain the road network data;
[0030] The step of extracting atomic roads from the road network data comprises:
[0031] Compiling the road network data into an xodr file that complies with the OpenDRIVE standard;
[0032] Obtaining road delimiters in the road network data, and extracting fields between the road delimiters, wherein the road delimiters are delimiters used to record basic road parameters;
[0033] Splitting the field according to the road ID attribute to form an atomic road field;
[0034] An overall closed tag is added to each of the atomic road fields according to the OpenDRIVE standard, and an xodr file is generated for each of the atomic road fields.
[0035] In some embodiments, the step of clustering the atomic roads includes:
[0036] Extracting characteristic information of the atomic road from the xodr file of each atomic road field, the characteristic information of the atomic road including the length of the atomic road, the curvature of the atomic road, the number of lanes of the atomic road, and the curvature change rate of the atomic road;
[0037] The characteristics of each atomic road are clustered and analyzed using the DBSCAN algorithm, and the results of the cluster analysis are stored to form a static scene element library.
[0038] In some embodiments, after the step of extracting the characteristic information of the atomic roads in the xodr file of each atomic road field and before the step of performing cluster analysis on the characteristics of each atomic road using the DBSCAN algorithm and storing the results of the cluster analysis to form a static scene element library, the step of clustering the atomic roads further includes:
[0039] Determine the local alignment of each of the atomic roads according to the xodr file of each of the atomic road fields;
[0040] According to the local linear shape of the atomic road being a straight line, the curvature C of the straight local linear shape of the atomic road is line C line =0;
[0041] According to the local line shape of the atomic road being an arc, the curvature C of the arc local line shape of the atomic road is arc is the recorded curvature;
[0042] According to the local linear shape of the atomic road being a spiral linear shape, the curvature C of the local linear shape of the spiral line of the atomic road is simplified by the following formula: spiral :
[0043] C spiral =(curvStart+curvEnd) / 2
[0044] Wherein, curvStart is the curvature of the starting point of the atomic road spiral, and curvEnd is the curvature of the ending point of the atomic road spiral;
[0045] According to the local linear shape of the atomic road being a cubic polynomial curve, the curvature C of the local linear shape of the polynomial curve of the atomic road is simplified by the following formula: Poly3 :
[0046]
[0047] Among them, t i Represents the coordinates of the i-th sampling point, i is a natural number, and N is the number of sampling points;
[0048] The representative curvature C of the atomic path ID for:
[0049] C ID =max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly 3 ,ID )
[0050] The curvature change rate of the atomic road ΔC ID for:
[0051]
[0052] Among them, d ID is the length of the atomic path, max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the maximum value, min(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the minimum value.
[0053] In some embodiments, the step of extracting atomic scenes from the traffic flow data includes:
[0054] Obtaining lane change conditions of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle in the traffic flow data;
[0055] According to the lane change of the preceding vehicle of the host vehicle, it is determined to be an invalid scene and the speed and trajectory of the vehicle are not recorded;
[0056] Based on the fact that the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the main vehicle to the left, the vehicle in front of the main vehicle to the right, and the vehicle in front of the vehicle in front of the main vehicle have not changed lanes, it is determined that it is a vehicle following scenario, and the speed and trajectory of each of the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the main vehicle to the left, the vehicle in front of the main vehicle to the right, and the vehicle in front of the vehicle in front of the main vehicle are recorded;
[0057] Based on at least one of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, and the vehicle to the right of the host vehicle changing lanes, determining that it is a lane change scenario, and recording the speed and trajectory of each of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the vehicle preceding the vehicle preceding the host vehicle;
[0058] Extracting speed and trajectory information of each of the host vehicle, the preceding vehicle of the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the preceding vehicle of the preceding vehicle in the following vehicle scenario and the lane changing scenario, and constructing a viscous hierarchical Dirichlet process hidden Markov model;
[0059] Obtain observation vectors with continuously identical hidden states in the viscous layered Dirichlet process hidden Markov model, wherein each group of observation vectors with continuously identical hidden states is an atomic scene, and each atomic scene is represented as a data point in a multidimensional space, and the data point is described by speed and trajectory information of the main vehicle, the preceding vehicle of the main vehicle, the left preceding vehicle of the main vehicle, the right preceding vehicle of the main vehicle, and the preceding vehicle of the preceding vehicle of the main vehicle.
[0060] In some embodiments, the step of clustering the atomic scenes includes:
[0061] According to the atomic scene, obtaining the similarity of the time series of the same dimension of the atomic scene by a dynamic time warping algorithm, and mapping the similarity into a distance metric;
[0062] calculating a comprehensive distance metric between the atomic scenes according to the distance metric;
[0063] The atomic scenes are clustered according to the comprehensive distance metric of each atomic scene and the K-means algorithm to form the dynamic scene element library.
[0064] In some embodiments, the step of extracting speed and trajectory information of each of the host vehicle, the preceding vehicle of the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the preceding vehicle of the preceding vehicle of the host vehicle in the following vehicle scenario and the lane changing scenario, and constructing a viscous hierarchical Dirichlet process hidden Markov model includes:
[0065] In the following vehicle scenario and the lane changing scenario, the target scene described by the speed and trajectory information of each of the host vehicle, the preceding vehicle of the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the preceding vehicle of the preceding vehicle of the host vehicle is defined as the observation vector;
[0066] Initializing parameters of the viscous layered Dirichlet process hidden Markov model, wherein the parameters of the viscous layered Dirichlet process hidden Markov model include parameters of the hidden state of the hidden Markov model and hyperparameters of the layered Dirichlet process;
[0067] Repeat the following steps until a preset condition is met to iterate the viscous hierarchical Dirichlet process hidden Markov model:
[0068] updating the parameters of the hidden state and the hyperparameters at each time step by Gibbs sampling according to the parameters of the viscous hierarchical Dirichlet process hidden Markov model, wherein the number of the hidden states is configured to be adaptively changeable;
[0069] Calculating the hidden state probability at each moment according to the viscous hierarchical Dirichlet process hidden Markov model, and determining the hidden state at each moment according to the maximum a posteriori probability;
[0070] The speed and trajectory information of each of the main vehicle, the vehicle preceding the main vehicle, the vehicle preceding the main vehicle to the left, the vehicle preceding the main vehicle to the right, and the vehicle preceding the vehicle preceding the main vehicle in multiple groups of the following scenarios and the lane changing scenarios are selected as observation vectors, and the speed and trajectory information are input into the viscous layered Dirichlet process hidden Markov model. The log-likelihood value of the observation vector is calculated. If the log-likelihood value does not converge, it is judged that the preset condition is not met. If the log-likelihood value converges, it is judged that the preset condition is met.
[0071] In some embodiments, the step of obtaining the similarity of time series of the same dimension of the atomic scene using a dynamic time warping algorithm according to the atomic scene, and mapping the similarity into a distance metric includes:
[0072] Calculate the time series of the atomic scene and another time series of the atomic scene The local distance matrix D is:
[0073]
[0074] Among them, d ij Represents the distance between the i-th point in time series X and the j-th point in time series Y;
[0075] Define the cumulative distance matrix C, the initial condition is C(1,1)=D(1,1), and calculate the cumulative distance matrix C according to the following formula:
[0076]
[0077] c ij =d ij +min{c i-1,j ,c i,j-1 ,c i-1,j-1}
[0078] Get Back to c 11 The optimal path is the DTW path, wherein the cumulative distance of all elements in the optimal path is the smallest, and the length of the optimal path is the DTW path;
[0079] The step of calculating the comprehensive distance metric between the atomic scenes according to the distance metric comprises:
[0080] The comprehensive distance metric SD between the atomic scenes is calculated by the following formula
[0081]
[0082] Where M refers to the dimension of the characteristic information of the atomic scene; DTW k Refers to the distance between the DTW paths of different data points in the kth dimension;
[0083] The step of clustering the atomic scenes according to the comprehensive distance metric of each atomic scene and the K-means algorithm to form the dynamic scene element library includes:
[0084] Randomly select multiple data points as the initial cluster centers;
[0085] Repeat the following steps until the exit condition is met:
[0086] Assigning the atomic scene to the cluster to which the nearest cluster center belongs according to the comprehensive distance metric of the atomic scene;
[0087] Calculating the mean distance of the data points in each cluster, and updating the cluster center according to the mean;
[0088] Determining whether the cluster center changes before and after the cluster center is updated;
[0089] According to the change of the cluster center, it is determined that the exit condition is not satisfied;
[0090] According to the fact that the cluster center has not changed, it is determined that the exit condition is met. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference numerals are used throughout the accompanying drawings to denote the same components. In the accompanying drawings:
[0092] Figure 1 This is a flow chart of a method for constructing a scenario element library for vehicle energy consumption evaluation according to an embodiment of the present invention;
[0093] Figure 2 A schematic diagram of a method for constructing a scenario element library for vehicle energy consumption evaluation according to an embodiment of the present invention;
[0094] Figure 3 This is an example diagram of scene element classification in the method for constructing a scene element library for vehicle energy consumption evaluation according to an embodiment of the present invention;
[0095] Figure 4 This is a schematic diagram of a two-way dual carriageway;
[0096] Figure 5 This is a schematic diagram of a six-lane bidirectional road;
[0097] Figure 6 Schematic diagram of a right-angle bend;
[0098] Figure 7 Schematic diagram of continuous curves;
[0099] Figure 8 A schematic diagram of a vehicle-following scenario in a method for constructing a scenario element library for vehicle energy consumption evaluation according to an embodiment of the present invention;
[0100] Figure 9 A schematic diagram of a lane-changing scenario in a method for constructing a scenario element library for vehicle energy consumption evaluation according to an embodiment of the present invention;
[0101] Figure 10 Detailed schematic diagram of a vehicle-following scenario according to some embodiments of the present invention;
[0102] Figure 11 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0103] Figure 12 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0104] Figure 13 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0105] Figure 14 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0106] Figure 15 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0107] Figure 16 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0108] Figure 17 Detailed schematic diagrams of vehicle-following scenarios according to other embodiments of the present invention;
[0109] Figure 18 Schematic diagram of characteristic information of a vehicle-following scenario and a lane-changing scenario according to an embodiment of the present invention;
[0110] Figure 19 Schematic diagram of feature information and corresponding hidden states for a following vehicle scenario and a lane changing scenario according to an embodiment of the present invention. DETAILED DESCRIPTION
[0111] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0112] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0113] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates otherwise, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.
[0114] For ease of description, spatially relative terms may be used herein to describe the relationship of one element or feature relative to another element or feature as shown in the figures, such as "inside," "outside," "inside," "outside," "below," "beneath," "above," and the like. Such spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is flipped, an element described as "below" or "below" another element or feature would then be oriented as "above" or "above" another element or feature. Thus, the example term "below" can include both above and below orientations. The device may be otherwise oriented (rotated 90 degrees or in other orientations) and the spatially relative descriptors used herein are interpreted accordingly.
[0115] At present, vehicle economy evaluation mainly relies on dynamometer tests with standard driving cycles as input: the dynamometer simulates road loads, and a driving robot or an experienced human driver controls the vehicle under test to drive according to a given speed curve to obtain the vehicle's energy consumption or driving range.
[0116] However, current testing methods using test machines cannot simulate real-world traffic conditions, resulting in poor test authenticity. Therefore, building a scenario element library for vehicle energy consumption evaluation, so that test scenarios can simulate real-world traffic conditions and thus increase test authenticity, is an important research direction.
[0117] In order to at least solve the problem of how to improve the authenticity of test scenarios for whole vehicle energy consumption evaluation, an embodiment of the present invention proposes a method for constructing a scenario element library for whole vehicle energy consumption evaluation, which can construct a static scenario element library and a dynamic scenario element library for whole vehicle energy consumption evaluation, so that the test scenario can simulate real-world traffic conditions, thereby improving the authenticity of the test scenario.
[0118] The following describes a method for constructing a scenario element library for vehicle energy consumption evaluation according to an embodiment of the present invention with reference to the accompanying drawings.
[0119] Combine Figure 1 and Figure 2 As shown, the method for constructing a scene element library for vehicle energy consumption evaluation according to an embodiment of the present invention includes:
[0120] S100: Acquire scene information, where the scene information is used to represent a driving scene of the host vehicle;
[0121] S200, extracting static elements and dynamic elements from scene information;
[0122] S300, forming traffic flow data through dynamic elements and obtaining road network data through static elements;
[0123] S400, extracting atomic roads from road network data;
[0124] S500, clustering atomic roads to form a static scene element library;
[0125] S600, extracting atomic scenes from traffic flow data;
[0126] S700: Cluster the atomic scenes to form a dynamic scene element library.
[0127] S100: Acquire scene information, where the scene information is used to represent a driving scene of the host vehicle.
[0128] By collecting scene information, a data basis can be provided for subsequent steps.
[0129] S200: Extract static elements and dynamic elements from scene information.
[0130] Separating static and dynamic elements in scene information can make subsequent analysis more targeted.
[0131] Combine Figure 2 and Figure 3 As shown, in some embodiments, S200, the step of extracting static elements and dynamic elements from scene information, includes:
[0132] Extract elements from scene information;
[0133] Obtaining the driving state of the main vehicle in the element and classifying the element according to the driving state, wherein the driving state includes acceleration state, constant speed state, deceleration state and idling state;
[0134] Obtain the driving area of the main vehicle in the feature and classify the feature according to the driving area, where the driving area includes urban scenes, suburban scenes, and highway scenes;
[0135] Determine whether the elements have changed over time;
[0136] According to the changes of elements over time, the elements are judged to be dynamic elements;
[0137] Since the elements do not change over time, they are considered static elements.
[0138] Dividing the driving state into acceleration, constant speed, deceleration and idling states can accurately reflect the energy consumption characteristics of the main vehicle under different driving states, so that the elements under different driving states can be analyzed, and then detailed data support can be provided for energy consumption evaluation, so that the static scene element library and dynamic scene element library constructed by the scene element library construction method for whole vehicle energy consumption evaluation in the embodiment of the present invention can more accurately evaluate the energy consumption of the whole vehicle.
[0139] The three-level classification can cover multiple dimensions of the main vehicle's driving scenarios, including driving status, driving area, and the temporal characteristics of the elements. This provides a rich and comprehensive data foundation for building a dynamic scene element library, enabling the dynamic scene element library to fully consider the impact of elements under different classifications on energy consumption, thereby more accurately simulating the main vehicle's energy consumption in various actual scenarios.
[0140] As an example, dynamic elements and static elements such as Figure 3 shown.
[0141] In some embodiments, the step of obtaining the driving state of the host vehicle in the scene information includes:
[0142] Get the speed and acceleration of the main vehicle;
[0143] Since the speed and acceleration of the main vehicle are both greater than 0, it is determined that the main vehicle is in an accelerating state;
[0144] According to the fact that the speed of the main vehicle is greater than 0 and the acceleration of the main vehicle is equal to 0, it is judged that the main vehicle is in a uniform speed state;
[0145] According to the fact that the speed of the main vehicle is greater than 0 and the acceleration of the main vehicle is less than 0, it is judged that the main vehicle is in a deceleration state;
[0146] Since the speed and acceleration of the host vehicle are both 0, it is determined that the host vehicle is in an idling state.
[0147] By using the numerical relationship between speed and acceleration to judge the driving state, the specific driving state of the main vehicle can be accurately determined.
[0148] S300: Generate traffic flow data through dynamic elements and obtain road network data through static elements.
[0149] Traffic flow data is formed through dynamic elements, and road network data is obtained through static elements, which makes it convenient to construct a dynamic scene element library and a static scene element library through traffic flow data and road network data respectively in subsequent steps.
[0150] In some optional embodiments, the road network data is formed by static elements.
[0151] By directly forming road network data through static elements, the basic form and layout of roads can be accurately depicted.
[0152] In other optional embodiments, an open source geographic information database is queried through static elements to obtain road network data.
[0153] Open source geographic information databases integrate large amounts of data, making road network data richer and more comprehensive.
[0154] S400: Extracting atomic roads from road network data.
[0155] Road network data usually contains a large amount of road information and has a complex structure. Extracting atomic roads can decompose complex road networks into the most basic units and reduce data redundancy and complexity.
[0156] S500: Cluster the atomic roads to form a static scene element library.
[0157] The clustering operation is to group atomic roads based on their similar features. Through clustering, the common features of different groups of atomic roads can be further extracted and summarized to reduce the difficulty of finding features from the static scene feature library.
[0158] Therefore, by extracting atomic roads from the road network data, data extraction from the road network data is achieved, so that the redundancy and complexity of constructing a static scene feature library are low. By clustering the atomic roads to integrate the extracted data, the difficulty of finding elements from the static scene feature library can be reduced.
[0159] In some embodiments, the step of obtaining road network data through static elements includes:
[0160] Query open source geographic information databases based on static features to obtain road network data;
[0161] S400, the step of extracting atomic roads from road network data, comprises:
[0162] Compile the road network data into an xodr file that complies with the OpenDRIVE standard. For example, use the Osm2Odr toolkit in the carla library through a Python program to recompile the road network data into an xodr file.
[0163] Obtaining road delimiters in the road network data and extracting fields between the road delimiters, wherein the road delimiters are delimiters used to record basic road parameters;
[0164] Split the field according to the road ID attribute to form an atomic road field;
[0165] Add an overall closed label to each atomic road field according to the OpenDRIVE standard and generate an xodr file for each atomic road field.
[0166] OpenDRIVE, developed by the German Association for Standardization of Automation and Measuring Systems (ASAM), is a standard exchange format for describing static road traffic networks required for driving simulation applications. OpenDRIVE uses the Extensible Markup Language (XML) with the file extension .xodr as the basis for describing road networks. Xodr files are files with the extension .xodr.
[0167] The road ID attribute is a number used to uniquely identify each road.
[0168] Compiling road network data into xodr files that comply with the OpenDRIVE standard can standardize road network data and improve its compatibility.
[0169] By extracting road delimiters from road network data and the fields between them, we can accurately isolate key information that records essential road parameters. This information between road delimiters is crucial for in-depth analysis of road characteristics and vehicle performance. This approach provides highly accurate and targeted information, avoids interference from irrelevant data, and provides a clear and effective data foundation for subsequent analysis and applications.
[0170] By segmenting the road ID attribute into atomic road fields, complex road network data is broken down into its most basic road units. As the smallest component of the road network, atomic roads have independent attributes and characteristics, making road analysis and processing more refined and flexible.
[0171] According to the OpenDRIVE standard, each atomic road field is tagged with a closed tag and a corresponding xodr file is generated for each atomic road field, further standardizing the format and structure of atomic road data. The addition of closed tags ensures data integrity and consistency, and the OpenDRIVE-compliant file format makes data more stable and reliable during storage and use. This helps improve data quality and reduce data errors and inconsistencies.
[0172] As an example, the road delimiter is <road> …< / road> .
[0173] In some embodiments, the step of clustering atomic roads includes:
[0174] Extract the characteristic information of the atomic road from the xodr file of each atomic road field, where the characteristic information of the atomic road includes the length of the atomic road, the curvature of the atomic road, the number of lanes of the atomic road, and the curvature change rate of the atomic road;
[0175] The DBSCAN algorithm is used to perform cluster analysis on the characteristics of each atomic road, and the results of the cluster analysis are stored to form a static scene feature library.
[0176] As some examples of atomic roads, the atomic roads are Figure 4 The dual carriageway shown in .
[0177] As some other examples of atomic roads, the atomic roads are Figure 5 Six lanes in both directions as shown in .
[0178] As some other examples of atomic roads, the atomic roads are Figure 6 A two-way dual carriageway with a right-angle curve as shown in .
[0179] As some other examples of atomic roads, the atomic roads are Figure 7 A two-way dual carriageway with continuous curves as shown in .
[0180] In some embodiments, after the step of extracting the characteristic information of the atomic roads in the xodr file of each atomic road field, and before the step of performing cluster analysis on the characteristics of each atomic road using the DBSCAN algorithm and storing the results of the cluster analysis to form a static scene feature library, the step of clustering the atomic roads further includes:
[0181] Determine the local alignment of each atomic road based on the xodr file of each atomic road field;
[0182] According to the local shape of the atomic road is a straight line, the curvature C of the straight line local shape of the atomic road is line C line =0;
[0183] According to the local line shape of the atomic road is an arc, the curvature C of the arc local line shape of the atomic road is arc is the recorded curvature;
[0184] According to the local linear shape of the atomic road being a spiral line, the curvature C of the local linear shape of the spiral line of the atomic road is simplified by the following formula: spiral :
[0185] C spiral =(curvStart+curvEnd) / 2
[0186] Among them, curvStart is the curvature of the starting point of the atomic road spiral, and curvEnd is the curvature of the end point of the atomic road spiral;
[0187] According to the local linear shape of the atomic road being a cubic polynomial curve, the curvature C of the local linear shape of the polynomial curve of the atomic road is simplified by the following formula: Poly3 :
[0188]
[0189] Among them, t i Represents the coordinates of the i-th sampling point, i is a natural number, and N is the number of sampling points;
[0190] Representative curvature C of the atomic path ID for:
[0191] C ID =max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly 3 ,ID )
[0192] The curvature change rate of the atomic road ΔC ID for:
[0193]
[0194] Among them, d ID is the length of the atomic path, max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the maximum value, min(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the minimum value.
[0195] The shape of the atomic road is a combination of one or more of a straight line, an arc, a spiral and a cubic polynomial curve. This embodiment can simplify the local curvature of the atomic road and further simplify the curvature description of the atomic road by representing the curvature, thereby reducing the amount of calculation and data processing.
[0196] Specifically, the local line shape of the atomic road is a cubic polynomial curve, and the parametric equation is:
[0197] r(t)=(x(t),y(t)),t∈[t0,t n ]
[0198]
[0199] Where a, b, c, d, e, f, g, and h are the coefficients of the cubic polynomial.
[0200] Uniformly sample N points, the corresponding coordinates of each point are:
[0201]
[0202] t i =t0+i×Δt,i=0,1,…,N-1
[0203]
[0204] The curvature is simplified as follows:.
[0205]
[0206] This embodiment can simplify the curvature when the local linear shape of the atomic road is a cubic polynomial curve, thereby reducing the amount of calculation and data processing.
[0207] In some optional embodiments, road ancillary facilities have a significant impact on vehicle speed, mainly including traffic signs, signal lights, guardrails, monitoring and speed measurement equipment, etc. These ancillary facilities usually appear near specific road structures, such as signal lights at intersections, traffic signs such as speed limit signs often appear on sections where road conditions change, and guardrails appear on highways. Therefore, these static elements can be added as needed after the road network is built. Static scene elements such as fixed buildings and natural environments mainly serve to render the surrounding environment. These static scene elements can be generated as needed during scene visualization using the scene simulation platform.
[0208] In some embodiments, the feature information of each dimension of the atomic road is normalized according to the following formula:
[0209]
[0210] Among them, X norm represents the normalized feature information, X represents the original feature information, X∈{d ID ,L IS ,C ID ,ΔC ID}, X max and Xmin respectively represent the maximum value and the minimum value in the original feature information.
[0211] Each atomic road Road ID,norm is represented by the following atomic road data points:
[0212] Road ID,norm =(d ID,norm , L ID,norm , C ID,norm , ΔC ID,norm )
[0213] Obtain the given neighborhood radius ε and the number of core objects MinPts;
[0214] Judge whether the atomic road data point is accessed;
[0215] According to the atomic road data point not being accessed, calculate the number n of points within the ε-neighborhood of the atomic road data point;
[0216] According to n≥MinPts, judge that the atomic road data point is a core point, and merge all atomic road data points within the ε-neighborhood to expand into a cluster.
[0217] According to n<MinPts, judge that the atomic road data point is not a core point and mark it as a noise point.
[0218] Repeat the above steps until all atomic road data points are accessed.
[0219] By setting the neighborhood radius ∈ and the number of core objects MinPts, it is possible to accurately judge whether an atomic road data point is a core point. If the number n of points within the ∈-neighborhood of an atomic road data point is n≥MinPts, then it is determined as a core point, and all atomic road data points within its ∈-neighborhood are merged into a cluster, so as to effectively discover the dense regions in the dataset, that is, clusters of atomic roads with similar characteristics.
[0220] For atomic road data points with n<MinPts, determine them as noise points and mark them. This enables the identification of those data points that have significant differences in characteristics from other atomic roads and do not belong to any dense clusters during analysis.
[0221] After normalization and clustering processing, a feature model of atomic roads can be constructed, and the atomic roads are divided into different clusters according to their characteristics, so as to realize the construction of a static scene element library.
[0222] S600, Extract the atomic scenes from the traffic flow data.
[0223] Traffic flow data contains a large amount of complex and dynamically changing information. Extracting atomic scenes decomposes complex data into the smallest, relatively independent atomic scenes, removing redundant and unnecessary details, thereby reducing the complexity of the data.
[0224] S700: Cluster the atomic scenes to form a dynamic scene element library.
[0225] The clustering operation is to group atomic scenes based on their similar features. Through clustering, the common features of different groups of atomic scenes can be further extracted and summarized to reduce the difficulty of finding elements from the dynamic scene element library.
[0226] Therefore, by extracting atomic scenes from traffic flow data, data extraction from traffic flow data is achieved, so that the redundancy and complexity of constructing a dynamic scene element library are low. By clustering the atomic scenes to integrate the extracted data, the difficulty of finding elements from the dynamic scene element library can be reduced.
[0227] In some embodiments, S600, the step of extracting atomic scenes from traffic flow data, includes:
[0228] Obtain the lane-changing status of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle in traffic flow data;
[0229] If the lane change of the vehicle preceding the main vehicle is considered invalid, the vehicle's speed and trajectory will not be recorded.
[0230] Based on the fact that the main vehicle, the vehicle preceding the main vehicle, the vehicle preceding the main vehicle to the left, the vehicle preceding the main vehicle to the right, and the vehicle preceding the vehicle preceding the main vehicle to the front have not changed lanes, it is determined to be a vehicle following scenario, and the speed and trajectory of each of the main vehicle, the vehicle preceding the main vehicle, the vehicle preceding the main vehicle to the left, the vehicle preceding the main vehicle to the right, and the vehicle preceding the vehicle preceding the main vehicle to the front are recorded;
[0231] Based on at least one of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, and the vehicle to the right of the host vehicle changing lanes, determining that it is a lane change scenario, and recording the speed and trajectory of each of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the vehicle preceding the vehicle preceding the host vehicle;
[0232] Extract the speed and trajectory information of each of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle in the following and lane-changing scenarios, and construct a viscous hierarchical Dirichlet process hidden Markov model;
[0233] Obtain observation vectors with continuously identical hidden states in the viscous layered Dirichlet process hidden Markov model, wherein each group of observation vectors with continuously identical hidden states is an atomic scene, and each atomic scene is represented as a data point in a multidimensional space, and the data point is described by speed and trajectory information of a main vehicle, a preceding vehicle of the main vehicle, a vehicle to the left of the main vehicle, a vehicle to the right of the main vehicle, and a vehicle preceding the preceding vehicle of the main vehicle.
[0234] It should be noted that the vehicle preceding the main vehicle is the vehicle directly preceding the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle is the vehicle directly preceding the vehicle directly preceding the main vehicle.
[0235] In the process of constructing the viscous hierarchical Dirichlet process hidden Markov model, the speed and trajectory information of each of the main vehicle, the preceding vehicle of the main vehicle, the left preceding vehicle of the main vehicle, the right preceding vehicle of the main vehicle, and the preceding vehicle of the preceding vehicle of the main vehicle can be selected for use in part or in whole according to the actual situation.
[0236] The atomic scene can select part or all of the speed and trajectory information of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle to describe according to the actual situation.
[0237] By determining invalid scenarios, such as lane changes by the vehicle ahead of the main vehicle, the system does not record vehicle speed and trajectory in these scenarios, effectively eliminating data interference from irrelevant factors. This prevents invalid or noisy data from impacting subsequent analysis, ensuring that collected data is more representative and reliable, and improving data quality.
[0238] Clearly distinguishing between following and lane-changing scenarios, and recording the speed and trajectory of the corresponding vehicles separately, makes data collection more targeted. Following and lane-changing scenarios are common and important types of scenarios in traffic flow. Detailed data recording of these scenarios provides rich foundational data for subsequent steps.
[0239] Accurately judging vehicle-following and lane-changing scenarios facilitates more detailed scenario descriptions, thereby increasing the authenticity of the test scenarios.
[0240] The hidden state transfers over time according to the hidden state transfer probability matrix. By mapping the observation probability distribution matrix, the sequence of traffic flow atomic scenes forms the target scene, and then divides the atomic scenes of all traffic flows in the target scene.
[0241] As some examples, car following scenarios such as Figure 8 shown.
[0242] As some examples, lane-changing scenarios Figure 9 shown.
[0243] As some specific examples of car following scenarios, such as Figure 10As shown, the vehicle in front of the main vehicle and the vehicle in front of the left of the main vehicle accelerate, and the vehicle in front of the right of the main vehicle decelerates.
[0244] As some specific examples of other car-following scenarios, Figure 11 As shown, the vehicle in front of the main vehicle, the vehicle in front of the left of the main vehicle and the vehicle in front of the right of the main vehicle all accelerate.
[0245] As some specific examples of other car-following scenarios, Figure 12 As shown, the left front vehicle and the right front vehicle of the main vehicle both accelerate, and the front vehicle of the main vehicle decelerates.
[0246] As some specific examples of other car-following scenarios, Figure 13 As shown, the left front vehicle of the main vehicle accelerates, and the front vehicle of the main vehicle and the right front vehicle of the main vehicle both decelerate.
[0247] As some specific examples of other car-following scenarios, Figure 14 As shown, the vehicle in front of the main vehicle and the vehicle in front of the right of the main vehicle are accelerated, and the vehicle in front of the left of the main vehicle is decelerated.
[0248] As some specific examples of other car-following scenarios, Figure 15 As shown, the left front vehicle and the right front vehicle of the main vehicle both decelerate, and the front vehicle of the main vehicle accelerates.
[0249] As some specific examples of other car-following scenarios, Figure 16 As shown, the vehicle in front of the main vehicle and the vehicle in front of the left of the main vehicle decelerate, and the vehicle in front of the right of the main vehicle accelerates.
[0250] As some specific examples of other car-following scenarios, Figure 17 As shown, the vehicle in front of the main vehicle, the vehicle in front of the left of the main vehicle and the vehicle in front of the right of the main vehicle all slow down.
[0251] like Figure 18 Specifically, the speed and trajectory information of the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the left of the main vehicle, the vehicle in front of the right of the main vehicle, and the vehicle in front of the vehicle in front of the main vehicle include: the longitudinal speed v of the main vehicle ego (m / s), the longitudinal speed of the vehicle ahead of the main vehicle v front (m / s), longitudinal distance d from the vehicle in front of the main vehicle front (m), the longitudinal speed v of the left front vehicle of the main vehicle left (m / s), longitudinal distance d from the left front vehicle of the main vehicle left (m), the longitudinal speed v of the right front vehicle of the main vehicle right (m / s), longitudinal distance d from the right front vehicle of the main vehicle right (m), longitudinal speed v of the lane-changing vehicle cut (m / s), lateral distance d of lane-changing vehicle cut,x (m), longitudinal distance d of lane-changing vehicles cut,y(m). This allows for a comprehensive description of the scene.
[0252] In the process of constructing the viscous layered Dirichlet process hidden Markov model, the longitudinal velocity v of the main vehicle is ego (m / s), the longitudinal speed of the vehicle ahead of the main vehicle v front (m / s), longitudinal distance d from the vehicle in front of the main vehicle front (m), the longitudinal speed v of the left front vehicle of the main vehicle left (m / s), longitudinal distance d from the left front vehicle of the main vehicle left (m), the longitudinal speed v of the right front vehicle of the main vehicle right (m / s), longitudinal distance d from the right front vehicle of the main vehicle right (m), longitudinal speed v of the lane-changing vehicle cut (m / s), lateral distance d of lane-changing vehicle cut,x (m), longitudinal distance d of lane-changing vehicles cut,y (m) Describes the scene as feature information.
[0253] The atomic scenario can be based on the longitudinal speed v of the main vehicle ego (m / s), the longitudinal speed of the vehicle ahead of the main vehicle v front (m / s), longitudinal distance d from the vehicle in front of the main vehicle front (m), the longitudinal speed v of the left front vehicle of the main vehicle left (m / s), longitudinal distance d from the left front vehicle of the main vehicle left (m), the longitudinal speed v of the right front vehicle of the main vehicle right (m / s), longitudinal distance d from the right front vehicle of the main vehicle right (m), longitudinal speed v of the lane-changing vehicle cut (m / s), lateral distance d of lane-changing vehicle cut,x (m), longitudinal distance d of lane-changing vehicles cut,y (m) and other characteristic information, so that each atomic scene can be represented as a multi-dimensional time series of a certain length.
[0254] In some embodiments, the step of clustering atomic scenes includes:
[0255] Extract feature information of each atomic scene;
[0256] Based on each atomic scene, the dynamic time warping algorithm is used to obtain the similarity of the time series of the same dimension of the atomic scene, and the similarity is mapped into a distance metric;
[0257] calculating a comprehensive distance metric between the atomic scenes according to the distance metric;
[0258] The atomic scenes are clustered according to the comprehensive distance metric and K-means algorithm of each atomic scene to form a dynamic scene feature library.
[0259] Extracting the characteristic information of each atomic scene can comprehensively and meticulously characterize the characteristics of the atomic scene, so that each atomic scene can be represented in a quantitative and analyzable form, providing a basis for subsequent similarity calculation and cluster analysis.
[0260] The dynamic time warping algorithm is used to calculate the similarity of time series of the same dimension of atomic scenes, and the similarity is mapped to a distance metric, which provides a quantitative method for comparing the similarity between different atomic scenes of the same dimension, thereby helping to more objectively judge the relationship between atomic scenes and providing a basis for judging the comprehensive similarity between atomic scenes.
[0261] The comprehensive distance metric for each atomic scenario—that is, the distance between each atomic scenario and all other atomic scenarios—fully reflects the position and relationship of that atomic scenario within the entire set of atomic scenarios. This comprehensive distance metric considers the combined similarity between all atomic scenarios across all dimensions. This comprehensive distance metric allows for a more accurate assessment of the similarities and differences between each atomic scenario, providing a reliable basis for cluster analysis.
[0262] By clustering atomic scenes using a comprehensive distance metric and the K-means algorithm, similar atomic scenes can be grouped together to form a dynamic scene element library. This allows a large number of complex atomic scenes to be divided into several representative categories, with the atomic scenes within each category sharing similar characteristics and behavior patterns. Consequently, each category in the dynamic scene element library represents a typical traffic scenario, facilitating classification, management, and analysis of traffic scenes while also reducing the difficulty of finding elements within the dynamic scene element library.
[0263] In some embodiments, the steps of extracting speed and trajectory information of each of a host vehicle, a preceding vehicle of the host vehicle, a vehicle to the left of the host vehicle, a vehicle to the right of the host vehicle, and a preceding vehicle of the preceding vehicle of the host vehicle in a following vehicle scenario and a lane changing scenario, and constructing a viscous hierarchical Dirichlet process hidden Markov model include:
[0264] In the following and lane-changing scenarios, the target scene described by the speed and trajectory information of each of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle is defined as the observation vector.
[0265] Initializing parameters of a viscous hierarchical Dirichlet process hidden Markov model, wherein the parameters of the viscous hierarchical Dirichlet process hidden Markov model include parameters of the hidden state of the hidden Markov model and hyperparameters of the hierarchical Dirichlet process;
[0266] Repeat the following steps until a preset condition is met to iterate the Viscous Hierarchical Dirichlet Process Hidden Markov Model:
[0267] According to the parameters of the viscous hierarchical Dirichlet process hidden Markov model, the parameters and hyperparameters of the hidden state at each time step are updated by Gibbs sampling, wherein the number of hidden states is configured to be able to change adaptively;
[0268] According to the viscous hierarchical Dirichlet process hidden Markov model, the hidden state probability at each moment is calculated, and the hidden state at each moment is determined according to the maximum a posteriori probability;
[0269] The speed and trajectory information of each of the following vehicle, the preceding vehicle, the preceding vehicle to the left, the preceding vehicle to the right, and the preceding vehicle in front of the preceding vehicle in multiple vehicle-following and lane-changing scenarios is selected as the observation vector and input into a viscous layered Dirichlet process hidden Markov model. The log-likelihood of the observation vector is calculated. If the log-likelihood does not converge, the model is judged to have failed to meet the preset conditions. If the log-likelihood does converge, the model is judged to have met the preset conditions. In other words, the preset condition is that the log-likelihood of the observation vector converges.
[0270] The target scene described by the speed and trajectory information of the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the main vehicle to the left, the vehicle in front of the main vehicle to the right, and the vehicle in front of the vehicle in front of the main vehicle in the following and lane-changing scenarios is defined as an observation vector. This can comprehensively capture the key dynamic information in the traffic scene, thereby providing rich and detailed data input for the model.
[0271] Initialize the parameters of the Sticky Hierarchical Dirichlet Process Hidden Markov Model (Sticky HDP-HMM), including the hidden state parameters of the Hidden Markov Model (HMM) (such as the mean, covariance, observation probability matrix, hidden state probability matrix) and the hyperparameters of the Hierarchical Dirichlet Process (HDP). Proper parameter initialization provides a foundation for subsequent effective learning and convergence of the model, guiding iterative updates within a reasonable parameter space and improving model stability and performance.
[0272] Gibbs sampling is used to update the hidden state parameters and hyperparameters at each time step, and the number of hidden states can be adaptively changed. Gibbs sampling is an effective Markov Chain Monte Carlo (MCMC) method that enables efficient sampling in high-dimensional parameter spaces. Adaptive adjustment of the number of hidden states allows the model to automatically increase or decrease hidden states based on the complexity and pattern changes of the data, thereby more flexibly capturing the states and changes in traffic scenarios. For example, when new behavioral patterns emerge in traffic scenarios, the model can automatically add hidden states to represent these new patterns, thereby improving the model's adaptability and expressiveness.
[0273] Calculating the hidden state probability at each moment according to the model and determining the hidden state at each moment based on the maximum a posteriori probability can make full use of the parameter information learned by the model, so as to accurately infer the most likely hidden state at each moment.
[0274] Multiple sets of observation vectors from car-following and lane-changing scenarios are input into the model, and the log-likelihood of these observation vectors is calculated. The log-likelihood is an important indicator of how well the model fits the observed data. A higher log-likelihood indicates a stronger model's ability to explain the observed data. By calculating the log-likelihood, we can objectively assess how well the model fits the traffic scenario data under the current parameters, providing a quantitative basis for model optimization and adjustment.
[0275] Convergence of the log-likelihood value determines whether the preset conditions are met. When the log-likelihood value converges, it indicates that the model has reached a relatively stable state during the iteration process, and parameter updates no longer significantly improve model performance. At this point, it can be assumed that the model has learned the main patterns and regularities in the data. Conversely, if the log-likelihood value does not converge, the model iterative update continues until the preset conditions are met. This ensures that the model achieves good performance within a reasonable number of iterations, avoiding poor model performance caused by excessive iterations or premature cessation of iterations.
[0276] In summary, the viscous hierarchical Dirichlet process hidden Markov model trained through the above operation process can deeply analyze the characteristics and laws of car-following and lane-changing scenarios.
[0277] As an example, the relationship between the feature information of the following scene and the lane changing scene and the corresponding hidden state is as follows: Figure 19 shown.
[0278] In some specific embodiments, during the iteration of the sticky layered Dirichlet process hidden Markov model, a sticky mechanism is introduced to adjust the probability of state transition, so as to make the transition between hidden states smoother and more stable.
[0279] The introduction of the sticky mechanism increases the probability of state self-transitions, making the model more likely to remain in its current state and reducing unnecessary state switching. Because state transitions are smoother and more stable, parameter updates during the model iteration process are also more stable. The sticky mechanism reduces the impact of noise and short-term fluctuations on parameter estimation, enabling the model to more accurately estimate hidden state parameters and state transition probabilities.
[0280] In some embodiments, the steps of obtaining similarities of time series of the same dimension of the atomic scenes using a dynamic time warping algorithm and mapping the similarities to a distance metric include:
[0281] Compute the time series of an atomic scene and another time series of atomic scenes The local distance matrix D is:
[0282]
[0283] Among them, d ij Represents the distance between the i-th point in time series X and the j-th point in time series Y;
[0284] Define the cumulative distance matrix C, the initial condition is C(1,1)=D(1,1), and calculate the cumulative distance matrix C according to the following formula:
[0285]
[0286] c ij =d ij +min{c i-1,j ,c i,j-1 ,c i-1,j-1}
[0287] Get Back to c 11 The optimal path is the one where the cumulative distance of all elements in the optimal path is the smallest and the length of the optimal path is the DTW path.
[0288] The steps of calculating the comprehensive distance metric between atomic scenes according to the distance metric include:
[0289] The comprehensive distance metric SD between atomic scenes is calculated by the following formula
[0290]
[0291] Among them, M refers to the dimension of the characteristic information of the atomic scene; DTW k Refers to the distance between DTW paths of different atomic scenes in the kth dimension.
[0292] The steps of clustering the atomic scenes according to the comprehensive distance metric of each atomic scene and the K-means algorithm to form a dynamic scene feature library include:
[0293] Randomly select multiple data points as the initial cluster centers;
[0294] Repeat the following steps until the exit condition is met:
[0295] The atomic scenes are assigned to the cluster to which the nearest cluster center belongs according to the comprehensive distance metric of the atomic scenes;
[0296] Calculate the mean distance of atomic scenes in each cluster and update the cluster center based on the mean;
[0297] Determine whether the cluster center changes before and after updating the cluster center;
[0298] According to the change of cluster center, it is determined that the exit condition is not met;
[0299] Since the cluster center has not changed, it is determined that the exit condition is met.
[0300] That is, the exit condition is that the cluster center does not change before and after the cluster center is updated.
[0301] The Dynamic Time Warping (DTW) algorithm calculates the local distance matrix, cumulative distance matrix, and DTW paths between atomic scenes, accurately measuring the similarity between different atomic scene time series. The DTW algorithm takes into account the non-alignment of time series on the time axis and can find the optimal matching path for atomic scene time series with different temporal rhythms and lengths, thereby more accurately reflecting the spatial distance between atomic scenes. When calculating the comprehensive distance metric, the characteristic information of multiple dimensions of the atomic scene is taken into account, making the distance metric more comprehensive and objective.
[0302] The calculation of a comprehensive distance metric and clustering operations clearly reveal the similarities and differences between atomic scenarios. By assigning atomic scenarios to different clusters, similar atomic scenarios are grouped together, while atomic scenarios from different clusters exhibit significant differences. This helps us gain a deeper understanding of the characteristics and behavioral patterns of different types of atomic scenarios, providing a foundation for the study and analysis of traffic behavior.
[0303] The clustering process can discover underlying patterns and regularities in atomic scene data. By iteratively updating cluster centers and assigning atomic scenes, the model can gradually converge to a stable clustering result, where the atomic scenes within each cluster have similar characteristics.
[0304] Atomic scenarios are clustered using the K-means algorithm to form a dynamic scenario element library. This library contains different types of atomic scenario clusters, each representing a typical scenario pattern. The dynamic scenario element library provides a rich set of scenario materials for subsequent applications such as traffic simulation and intelligent transportation systems, enabling these applications to more realistically simulate and respond to various real-world scenarios.
[0305] The cluster centers are continuously updated during the clustering process, allowing the model to adapt to the changes and characteristics of atomic scene data. The dynamic scene feature library constructed in this way has good generalization capabilities and can reasonably classify and process new atomic scene data.
[0306] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0307] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0308] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement the hardware: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0309] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for constructing a scene element library for vehicle energy consumption evaluation, characterized in that: include: Acquiring scene information, wherein the scene information is used to characterize the driving scene of the host vehicle; Extracting static elements and dynamic elements from the scene information; Forming traffic flow data through the dynamic elements and obtaining road network data through the static elements; Extracting atomic roads from the road network data; Clustering the atomic roads to form a static scene element library; extracting atomic scenes from the traffic flow data; The atomic scenes are clustered to form a dynamic scene element library.
2. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 1 is characterized in that: The step of extracting static elements and dynamic elements from the scene information includes: extracting elements from the scene information; Obtaining a driving state of the host vehicle in the elements, and classifying the elements according to the driving state, wherein the driving state includes an acceleration state, a constant speed state, a deceleration state, and an idle state; Obtaining a driving area of the host vehicle in the element, and classifying the element according to the driving area, wherein the driving area includes an urban scene, a suburban scene, and a highway scene; determining whether the elements change over time; According to the change of the element over time, determining that the element is a dynamic element; According to the fact that the element does not change over time, it is determined that the element is a static element.
3. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 2 is characterized in that: The step of obtaining the driving state of the host vehicle in the scene information includes: Get the speed and acceleration of the main vehicle; According to the fact that the speed of the main vehicle and the acceleration of the main vehicle are both greater than 0, it is determined that the main vehicle is in an accelerating state; According to the fact that the speed of the main vehicle is greater than 0 and the acceleration of the main vehicle is equal to 0, it is determined that the main vehicle is in a uniform speed state; According to the speed of the main vehicle being greater than 0 and the acceleration of the main vehicle being less than 0, determining that the main vehicle is in a deceleration state; According to the fact that the speed of the host vehicle and the acceleration of the host vehicle are both 0, it is determined that the host vehicle is in an idle state.
4. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 1 is characterized in that: The step of obtaining road network data through the static elements includes: Querying an open source geographic information database according to the static elements to obtain the road network data; The step of extracting atomic roads from the road network data comprises: Compiling the road network data into an xodr file that complies with the OpenDRIVE standard; Obtaining road delimiters in the road network data, and extracting fields between the road delimiters, wherein the road delimiters are delimiters used to record basic road parameters; Splitting the field according to the road ID attribute to form an atomic road field; An overall closed tag is added to each of the atomic road fields according to the OpenDRIVE standard, and an xodr file is generated for each of the atomic road fields.
5. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 4 is characterized in that: The step of clustering the atomic roads comprises: Extracting characteristic information of the atomic road from the xodr file of each atomic road field, the characteristic information of the atomic road including the length of the atomic road, the curvature of the atomic road, the number of lanes of the atomic road, and the curvature change rate of the atomic road; The characteristics of each atomic road are clustered and analyzed using the DBSCAN algorithm, and the results of the cluster analysis are stored to form a static scene element library.
6. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 5 is characterized in that: After the step of extracting the characteristic information of the atomic roads in the xodr file of each atomic road field, and before the step of performing cluster analysis on the characteristics of each atomic road using the DBSCAN algorithm and storing the results of the cluster analysis to form a static scene element library, the step of clustering the atomic roads further includes: Determine the local alignment of each of the atomic roads according to the xodr file of each of the atomic road fields; According to the local linear shape of the atomic road being a straight line, the curvature C of the straight local linear shape of the atomic road is line C line =0; According to the local linear shape of the atomic road being an arc, the curvature C of the arc local linear shape of the atomic road is arc is the recorded curvature; According to the local linear shape of the atomic road being a spiral linear shape, the curvature C of the local linear shape of the spiral line of the atomic road is simplified by the following formula: spiral : C spiral =(curvStart+curvEnd) / 2 Wherein, curvStart is the curvature of the starting point of the atomic road spiral, and curvEnd is the curvature of the ending point of the atomic road spiral; According to the local linear shape of the atomic road being a cubic polynomial curve, the curvature C of the local linear shape of the polynomial curve of the atomic road is simplified by the following formula: Poly3 : Among them, t i Represents the coordinates of the i-th sampling point, i is a natural number, and N is the number of sampling points; The representative curvature C of the atomic path ID for: C ID =max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) The curvature change rate of the atomic road ΔC ID for: Among them, d ID is the length of the atomic path, max(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the maximum value, min(C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID ) is for C line,ID ,C arc,ID ,C spiral,ID ,C Poly3,ID Take the minimum value.
7. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 1 is characterized in that: The step of extracting atomic scenes from the traffic flow data includes: Obtaining lane change conditions of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle in the traffic flow data; According to the lane change of the preceding vehicle of the host vehicle, it is determined to be an invalid scene and the speed and trajectory of the vehicle are not recorded; Based on the fact that the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the main vehicle to the left, the vehicle in front of the main vehicle to the right, and the vehicle in front of the vehicle in front of the main vehicle have not changed lanes, it is determined that it is a vehicle following scenario, and the speed and trajectory of each of the main vehicle, the vehicle in front of the main vehicle, the vehicle in front of the main vehicle to the left, the vehicle in front of the main vehicle to the right, and the vehicle in front of the vehicle in front of the main vehicle are recorded; Based on at least one of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, and the vehicle to the right of the host vehicle changing lanes, determining that it is a lane change scenario, and recording the speed and trajectory of each of the host vehicle, the vehicle preceding the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the vehicle preceding the vehicle preceding the host vehicle; Extracting speed and trajectory information of the main vehicle, the vehicle preceding the main vehicle, the vehicle to the left of the main vehicle, the vehicle to the right of the main vehicle, and the vehicle preceding the vehicle preceding the main vehicle in the following vehicle scenario and the lane changing scenario, and constructing a viscous hierarchical Dirichlet process hidden Markov model; Obtain observation vectors with continuously identical hidden states in the viscous layered Dirichlet process hidden Markov model, wherein each group of observation vectors with continuously identical hidden states is an atomic scene, and each atomic scene is represented as a data point in a multidimensional space, and the data point is described by speed and trajectory information of the main vehicle, the preceding vehicle of the main vehicle, the left preceding vehicle of the main vehicle, the right preceding vehicle of the main vehicle, and the preceding vehicle of the preceding vehicle of the main vehicle.
8. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 7 is characterized in that: The step of clustering the atomic scenes includes: According to the atomic scene, obtaining the similarity of the time series of the same dimension of the atomic scene by a dynamic time warping algorithm, and mapping the similarity into a distance metric; calculating a comprehensive distance metric between the atomic scenes according to the distance metric; The atomic scenes are clustered according to the comprehensive distance metric of each atomic scene and the K-means algorithm to form the dynamic scene element library.
9. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 7, characterized in that: The step of extracting speed and trajectory information of each of the host vehicle, the preceding vehicle of the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the preceding vehicle of the preceding vehicle of the host vehicle in the following vehicle scenario and the lane changing scenario, and constructing a viscous hierarchical Dirichlet process hidden Markov model includes: In the following vehicle scenario and the lane changing scenario, the target scene described by the speed and trajectory information of each of the host vehicle, the preceding vehicle of the host vehicle, the vehicle to the left of the host vehicle, the vehicle to the right of the host vehicle, and the preceding vehicle of the preceding vehicle of the host vehicle is defined as the observation vector; Initializing parameters of the viscous layered Dirichlet process hidden Markov model, wherein the parameters of the viscous layered Dirichlet process hidden Markov model include parameters of the hidden state of the hidden Markov model and hyperparameters of the layered Dirichlet process; Repeat the following steps until a preset condition is met to iterate the viscous hierarchical Dirichlet process hidden Markov model: updating the parameters of the hidden state and the hyperparameters at each time step by Gibbs sampling according to the parameters of the viscous hierarchical Dirichlet process hidden Markov model, wherein the number of the hidden states is configured to be adaptively changeable; Calculating the hidden state probability at each moment according to the viscous hierarchical Dirichlet process hidden Markov model, and determining the hidden state at each moment according to the maximum a posteriori probability; The speed and trajectory information of each of the main vehicle, the vehicle preceding the main vehicle, the vehicle preceding the main vehicle to the left, the vehicle preceding the main vehicle to the right, and the vehicle preceding the vehicle preceding the main vehicle in multiple groups of the following scenarios and the lane changing scenarios are selected as observation vectors, and the speed and trajectory information are input into the viscous layered Dirichlet process hidden Markov model. The log-likelihood value of the observation vector is calculated. If the log-likelihood value does not converge, it is judged that the preset condition is not met. If the log-likelihood value converges, it is judged that the preset condition is met.
10. The method for constructing a scene element library for vehicle energy consumption evaluation according to claim 8, characterized in that: The step of obtaining the similarity of time series of the same dimension of the atomic scenes by a dynamic time warping algorithm according to the atomic scenes, and mapping the similarity into a distance metric includes: Calculate the time series of the atomic scene and another time series of the atomic scene The local distance matrix D is: Among them, d ij Represents the distance between the i-th point in time series X and the j-th point in time series Y; Define the cumulative distance matrix C, the initial condition is C(1,1)=D(1,1), and calculate the cumulative distance matrix C according to the following formula: c ij =d ij +min{c i-1,j ,c i,j-1 ,c i-1,j-1 } Get Back to c 11 The optimal path is the DTW path, wherein the cumulative distance of all elements in the optimal path is the smallest, and the length of the optimal path is the DTW path; The step of calculating the comprehensive distance metric between the atomic scenes according to the distance metric comprises: The comprehensive distance metric SD between the atomic scenes is calculated by the following formula Where M refers to the dimension of the characteristic information of the atomic scene; DTW k Refers to the distance between different data points on the DTW path in the kth dimension; The step of clustering the atomic scenes according to the comprehensive distance metric of each atomic scene and the K-means algorithm to form the dynamic scene element library includes: Randomly select multiple data points as the initial cluster centers; Repeat the following steps until the exit condition is met: Assigning the atomic scene to the cluster to which the nearest cluster center belongs according to the comprehensive distance metric of the atomic scene; Calculating the mean distance of the data points in each cluster, and updating the cluster center according to the mean; Determining whether the cluster center changes before and after the cluster center is updated; According to the change of the cluster center, it is determined that the exit condition is not satisfied; According to the fact that the cluster center has not changed, it is determined that the exit condition is met.