Environmental information encoding method for autonomous driving decision-making based on relative spatial position
By encoding the vehicle's motion state information into a three-dimensional array containing relative spatial position relationships, the problem of insufficient encoding methods for neural networks in autonomous driving lane change decisions is solved, and the model training accuracy is improved.
Patent Information
- Application Number
- CN202210491974.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-05-07
AI Technical Summary
In existing technologies, when neural networks process autonomous driving lane-changing decisions, the encoding method can only provide numerical values but not external numerical connections, resulting in poor training results.
The perceived vehicle motion state information is processed into a three-dimensional array containing relative spatial position relationships, and convolution processing is used to improve the learning effect of the neural network model.
The training accuracy of the neural network model is improved by 3% to 5% compared with traditional encoding methods.
Smart Images

Figure CN114987536B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of autonomous driving technology, and specifically relates to a method for encoding environmental information for autonomous driving decision-making based on relative spatial position. Background Art
[0002] In recent years, the rapid development of artificial intelligence technology has made intelligent transportation systems one of the main focuses of people. Smart cars are the core of intelligent transportation systems. The main technologies include navigation and positioning, environmental detection, path planning and decision control. Among them, path planning plays a very critical role as the link connecting environmental detection and decision control, and lane changing decision in path planning is one of the most important issues.
[0003] While driving, smart cars receive information about their surroundings, including the speed and position of static and dynamic obstacles. Common methods for processing this information and making informed decisions include rule-based finite state machines and learning-based neural networks. For neural networks, data preprocessing is crucial, and the way data is encoded can significantly impact the training of the entire model. Traditional encoding methods simply place all environmental information received by smart cars in a one-dimensional array and pass it directly into a regular neural network. The model can only process the size relationship between numbers, resulting in poor training results. Summary of the Invention
[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a method for encoding environmental information for autonomous driving decisions based on relative spatial position, so as to solve the problem in the prior art that the encoding method when using neural networks to process lane change decisions can only provide numerical values to the neural network model but cannot provide the existing numerical external connections; the method of the present invention processes all perceived vehicle motion state information into a three-dimensional array, which contains the relative spatial position relationship, and can make the neural network model learning effect better after convolution processing.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] The present invention provides an environmental information encoding method for autonomous driving decision-making based on relative spatial position, comprising the following steps:
[0007] 1) Using sensors to obtain the current motion state information of the ego vehicle and surrounding vehicles, the lateral displacement, longitudinal displacement, and velocity of the surrounding vehicles are subtracted from the lateral displacement, longitudinal displacement, and velocity of the ego vehicle to obtain the lateral displacement, longitudinal displacement, and velocity relative to the ego vehicle.
[0008] 2) creating an empty three-dimensional array space for storing data according to the amount of vehicle motion state information obtained in step 1);
[0009] 3) Encode the motion state information of all vehicles relative to the ego vehicle obtained in step 1) into a one-dimensional array;
[0010] 4) stacking the one-dimensional array into a two-dimensional array;
[0011] 5) Stacking the two-dimensional array into a three-dimensional array.
[0012] Furthermore, the motion state information includes: the position and speed of the vehicle, the position and speed of the first m vehicles within the sensor perception range on the current lane, the position and speed of the first m vehicles and the position and speed of the next vehicle within the sensor perception range on the left lane, and the position and speed of the first m vehicles and the position and speed of the next vehicle within the sensor perception range on the right lane; if the information does not exist, it will not be taken.
[0013] Furthermore, step 2) specifically includes: creating an empty three-dimensional array space of (3, m+1, 5) based on the acquired vehicle motion state information, where 3 represents three lanes, m+1 represents (m+1) vehicles on each lane, and 5 represents five channels for each vehicle, wherein the five channels include: lateral displacement ΔX relative to the vehicle, longitudinal displacement ΔY relative to the vehicle, speed ΔV relative to the vehicle, lane presence, and vehicle presence; wherein lane presence is a label established to distinguish whether a left lane or a right lane exists, 0 represents absence, and 1 represents presence; vehicle presence is a label established to distinguish whether a received vehicle exists, 0 represents absence, and 1 represents presence.
[0014] Furthermore, the step 3) specifically includes:
[0015] For each vehicle obtained in step 1), create a one-dimensional array of length 5, and add the lateral displacement, longitudinal displacement, and speed relative to the ego vehicle to it. Set the presence or absence of a lane to 1 and the presence or absence of a vehicle to 1. The one-dimensional array corresponding to the ego vehicle is set to [0 0 0 1 1]. To ensure the consistency of the model input, the empty three-dimensional array space must be filled each time. Based on the space of the empty three-dimensional array created in step 2), a total of 3(m+1) one-dimensional arrays of length 5 are required to fill it. When the one-dimensional array corresponding to the obtained vehicle information is not enough to fill the three-dimensional array, it is necessary to manually create a one-dimensional array to fill it, and finally obtain 3(m+1) one-dimensional arrays.
[0016] The method to create a one-dimensional array is as follows:
[0017] 31) When a lane does not exist and the vehicle does not exist, the one-dimensional array corresponding to the (m+1) vehicles assumed in the lane is set to [0 0 0 0 0];
[0018] 32) When a lane exists and a vehicle on the lane does not exist, it is assumed that the vehicle exists and the corresponding one-dimensional array is set to [0 0 0 1 0].
[0019] Furthermore, step 4) specifically includes: stacking the three (m+1) one-dimensional arrays obtained in step 3), i.e., each lane corresponds to an (m+1) one-dimensional array, in the three-dimensional array space to obtain three (m+1, 5) two-dimensional arrays, and the stacking method is as follows:
[0020] 41) Left lane or right lane: The first row of the two-dimensional array contains the one-dimensional array corresponding to the vehicle behind the lane, followed by the one-dimensional array corresponding to the vehicle ahead in ascending order of relative longitudinal displacement. The one-dimensional array corresponding to the vehicle ahead, if any, is placed last.
[0021] 42) Current lane: The first row of the two-dimensional array contains the one-dimensional array corresponding to the vehicle itself, and then the one-dimensional array corresponding to the preceding vehicle is placed in ascending order of relative longitudinal displacement. The one-dimensional array corresponding to the preceding vehicle, if it exists, is placed last.
[0022] Furthermore, the step 5) specifically includes:
[0023] The three (m+1, 5) two-dimensional arrays obtained in step 4), that is, each lane corresponds to a two-dimensional array, and are stacked in the order of left lane, current lane, and right lane in the three-dimensional array space to obtain the final three-dimensional array.
[0024] Beneficial effects of the present invention:
[0025] In the present invention, each piece of vehicle information obtained is placed at a corresponding position in the three-dimensional array according to the relative position of the vehicle. In addition to the relationship between the vehicles being reflected in the specific values stored in the three-dimensional array, the spatial position relationship between the vehicles is also reflected in the relative positions of the values in the three-dimensional array. This encoding method contains richer content and can achieve better training effects after convolution processing in the neural network. Compared with traditional encoding methods, the training accuracy is about 3% to 5% higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Schematic diagram of the method of the present invention.
[0027] Figure 2 A traffic diagram. DETAILED DESCRIPTION
[0028] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and drawings. The contents mentioned in the embodiments are not intended to limit the present invention.
[0029] Reference Figure 1 As shown, the present invention provides an environmental information encoding method for autonomous driving decision-making based on relative spatial position, and the steps are as follows:
[0030] 1) Using sensors to obtain the current motion state information of the ego vehicle and surrounding vehicles, the lateral displacement, longitudinal displacement, and velocity of the surrounding vehicles are subtracted from the lateral displacement, longitudinal displacement, and velocity of the ego vehicle to obtain the lateral displacement, longitudinal displacement, and velocity relative to the ego vehicle.
[0031] The motion state information includes the vehicle's position and speed, the positions and speeds of the first m vehicles within the sensor's sensing range in the current lane, the positions and speeds of the first m vehicles and the next vehicle within the sensor's sensing range in the left lane, and the positions and speeds of the first m vehicles and the next vehicle within the sensor's sensing range in the right lane. If the information does not exist, it is not retrieved. In this example, m is set to 3.
[0032] 2) creating an empty three-dimensional array space for storing data according to the amount of vehicle motion state information obtained in step 1);
[0033] Based on the acquired vehicle motion state information, an empty three-dimensional array space of (3, m+1, 5) is created, where 3 represents three lanes, m+1 represents (m+1) vehicles on each lane, and 5 represents five channels for each vehicle. The five channels include: lateral displacement ΔX relative to the vehicle, longitudinal displacement ΔY relative to the vehicle, speed ΔV relative to the vehicle, lane presence, and vehicle presence. Lane presence is a label set up to distinguish whether the left lane or right lane exists, with 0 representing absence and 1 representing presence. Vehicle presence is a label set up to distinguish whether a received vehicle exists, with 0 representing absence and 1 representing presence.
[0034] 3) Encoding the motion state information of all vehicles relative to the self-vehicle obtained in step 1) into a one-dimensional array; specifically, the following steps are performed:
[0035] For each vehicle obtained in step 1), create a one-dimensional array of length 5, and add the lateral displacement, longitudinal displacement, and speed relative to the ego vehicle to it. Set the presence or absence of a lane to 1 and the presence or absence of a vehicle to 1. The one-dimensional array corresponding to the ego vehicle is set to [0 0 0 1 1]. To ensure the consistency of the model input, the empty three-dimensional array space must be filled each time. Based on the space of the empty three-dimensional array created in step 2), a total of 3(m+1) one-dimensional arrays of length 5 are required to fill it. When the one-dimensional array corresponding to the obtained vehicle information is not enough to fill the three-dimensional array, it is necessary to manually create a one-dimensional array to fill it, and finally obtain 3(m+1) one-dimensional arrays.
[0036] The method to create a one-dimensional array is as follows:
[0037] 31) When a lane does not exist and a vehicle does not exist, the one-dimensional arrays corresponding to the (m+1) vehicles in that lane are all set to [0 0 0 0 0]; for example, when the vehicle is in the leftmost lane, there are only the current lane and the right lane, and the left lane does not exist. Therefore, (m+1) [0 0 0 0 0] can be created;
[0038] 32) When a lane exists and a vehicle on the lane does not exist, it is assumed that the vehicle exists and the corresponding one-dimensional array is set to [0 0 0 1 0]. For example, when Figure 2 If vehicle 1 or vehicle 4 does not exist, you can create one [0 0 0 1 0].
[0039] 4) stacking the one-dimensional array into a two-dimensional array;
[0040] Specifically, the three (m+1) one-dimensional arrays obtained in step 3) correspond to (m+1) one-dimensional arrays for each lane. In the three-dimensional array space, the four one-dimensional arrays for each lane are stacked to obtain three (m+1, 5) two-dimensional arrays. The stacking method is as follows:
[0041] 41) Left lane or right lane: The first row of the two-dimensional array is the one-dimensional array corresponding to the rear vehicle in the lane, and then the one-dimensional array corresponding to the front vehicle is placed in order from small to large according to the relative longitudinal displacement. It is assumed that the one-dimensional array corresponding to the front vehicle that exists is placed at the end. Take m = 3. When the lane does not exist, the only stacking result is shown in Table 1; when the lane exists, several stacking results are shown in Tables 2, 3, and 4; among them, Table 2 is the encoding result when all four vehicles exist in the lane, Table 3 is the encoding result when the rear vehicle does not exist in the lane, and Table 4 is the encoding result when there are only two front vehicles in the lane; "ΔX" is the relative lateral displacement, "ΔY" is the relative longitudinal displacement, and "ΔV" is the relative speed. The subscript "0" indicates the rear vehicle, and the subscripts "1, 2, 3" indicate the front vehicle, and Δy3>Δy2>Δy1;
[0042] Table 1
[0043]
[0044] Table 2
[0045]
[0046]
[0047] Table 3
[0048]
[0049] Table 4
[0050]
[0051] 42) Current Lane: The first row of the two-dimensional array contains the one-dimensional array corresponding to the ego vehicle. The one-dimensional array corresponding to the preceding vehicle is then placed in ascending order of relative longitudinal displacement. The one-dimensional array corresponding to the presumed preceding vehicle is placed last. Assuming m = 3, several stacking results are shown in Tables 5 and 6. Table 5 shows the encoding results when all preceding vehicles are present in the current lane; Table 6 shows the encoding results when there is only one preceding vehicle in the current lane.
[0052] Table 5
[0053]
[0054] Table 6
[0055]
[0056] 5) stacking the two-dimensional array into a three-dimensional array; specifically comprising:
[0057] The three (m+1, 5) two-dimensional arrays obtained in step 4), that is, each lane corresponds to a two-dimensional array, and are stacked in the order of left lane, current lane, and right lane in the three-dimensional array space to obtain the final three-dimensional array.
[0058] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principles of the present invention. These improvements should also be considered as the scope of protection of the present invention.
Claims
1. A method for encoding environmental information for autonomous driving decision-making based on relative spatial position, characterized in that: Here are the steps: 1) Using sensors to obtain the current motion state information of the ego vehicle and surrounding vehicles, the lateral displacement, longitudinal displacement, and velocity of the surrounding vehicles are subtracted from the lateral displacement, longitudinal displacement, and velocity of the ego vehicle to obtain the lateral displacement, longitudinal displacement, and velocity relative to the ego vehicle. 2) creating an empty three-dimensional array space according to the amount of vehicle motion state information obtained in step 1); 3) Encode the motion state information of all vehicles relative to the ego vehicle obtained in step 1) into a one-dimensional array; 4) stacking the one-dimensional array into a two-dimensional array; 5) stacking the two-dimensional array into a three-dimensional array; The step 3) specifically includes: For each vehicle obtained in step 1), a one-dimensional array of length 5 is created, and the lateral displacement, longitudinal displacement and speed relative to the vehicle are added to it, and the presence or absence of a lane is set to 1, and the presence or absence of a vehicle is set to 1, where the one-dimensional array corresponding to the vehicle is set to [0 0 0 1 1]. Each time the space of the empty three-dimensional array is filled, according to the space of the empty three-dimensional array created in step 2), 3*(m+1) one-dimensional arrays of length 5 are required to fill it. When the one-dimensional array corresponding to the obtained vehicle information is not enough to fill the three-dimensional array, it is necessary to manually create a one-dimensional array to fill it, and finally 3*(m+1) one-dimensional arrays are obtained; where 3 represents three lanes, m+1 represents (m+1) vehicles on each lane, and 5 represents five channels for each vehicle. The method for creating a one-dimensional array is as follows: 31) When a lane does not exist and the vehicle does not exist, the one-dimensional array corresponding to the (m+1) vehicles assumed in the lane is set to [0 0 0 0 0]; 32) When a lane exists and a vehicle in the lane does not exist, assume that the vehicle exists and the corresponding one-dimensional array is set to [0 0 0 1 0]; Step 4) specifically includes: stacking the 3*(m+1) one-dimensional arrays obtained in step 3), i.e., each lane corresponds to an (m+1) one-dimensional array, in the three-dimensional array space to obtain three (m+1, 5) two-dimensional arrays, and the stacking method is as follows: 41) Left lane or right lane: The first row of the two-dimensional array contains the one-dimensional array corresponding to the vehicle behind the lane, followed by the one-dimensional array corresponding to the vehicle ahead in ascending order of relative longitudinal displacement. The one-dimensional array corresponding to the vehicle ahead, if any, is placed last. 42) Current lane: The first row of the two-dimensional array contains the one-dimensional array corresponding to the ego vehicle, followed by the one-dimensional array corresponding to the preceding vehicle in ascending order of relative longitudinal displacement. The one-dimensional array corresponding to the preceding vehicle, if present, is placed last. The step 5) specifically includes: The three (m+1, 5) two-dimensional arrays obtained in step 4), that is, each lane corresponds to a two-dimensional array, and are stacked in the order of left lane, current lane, and right lane in the three-dimensional array space to obtain the final three-dimensional array.
2. The method for encoding environmental information for autonomous driving decision-making based on relative spatial position according to claim 1, characterized in that: The motion state information includes: the position and speed of the vehicle, the position and speed of the first m vehicles within the sensor perception range on the current lane, the position and speed of the first m vehicles and the position and speed of the next vehicle within the sensor perception range on the left lane, and the position and speed of the first m vehicles and the position and speed of the next vehicle within the sensor perception range on the right lane; if the position and speed does not exist, it will not be taken.
Citation Information
Patent Citations
Driving intervention in vehicles
CN110001659A
Automatic driving track planning system and method based on space-time aerial view and strategy gradient algorithm
CN114407925A