# US 2021/0334420 A1 · Driving simulation method and apparatus, electronic device, and computer storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334420 A1
- Document ID: US20210334420A1
- Status: Published application
- Kind: A1
- Application number: 17/371,900
- Filed: 2021-07-09
- Published: 2021-10-28
- Earliest claimed: 2019-05-05
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Haining DU
- Web page: https://patentgrep.com/patent/US20210334420A1

## CPC

- G06F 30/15: Vehicle, aircraft or watercraft design
- G06F 30/10: Geometric CAD
- G06F 30/20: Design optimisation, verification or simulation (optimisation, verification or simulation of circuit designs G06F30/30)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application discloses a driving simulation method performed at an electronic device. The method includes: receiving parameters through a first configuration interface; determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane; determining an initial location of each of background vehicles in the target lane based on a location of a test vehicle, the reference vehicle-to-vehicle distance, and a random distance deviation; determining an initial speed of each of the background vehicles in the target lane based on the reference vehicle speed and a random speed deviation; and simulating traveling of each of the background vehicles in a simulated traffic environment based on the initial location and the initial speed of each of the background vehicles and the background vehicle quantity.

## Claims

### Claim 1

A driving simulation method, performed by an electronic device, the method comprising:
receiving parameters through a first configuration interface;
determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane, the target lane comprising a lane in which a test vehicle and background vehicles are located;
determining an initial location of each of the background vehicles in the target lane based on a location of the test vehicle, the reference vehicle-to-vehicle distance, and a random distance deviation;
determining an initial speed of each of the background vehicles in the target lane based on the reference vehicle speed and a random speed deviation; and
simulating traveling of each of the background vehicles in a simulated traffic environment based on the initial location and the initial speed of each of the background vehicles and the background vehicle quantity.

### Claim 2 (depends on 1)

The method according to claim 1, wherein
the first configuration interface comprises a configuration control configured to configure a traffic state indication parameter, and a configuration control configured to configure a background vehicle quantity indication parameter;
the receiving parameters inputted through the first configuration interface comprises:
receiving a target traffic state indication parameter and a target background vehicle quantity indication parameter inputted through the configuration controls on the first configuration interface; and
the determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane comprises:
determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter; and
determining the background vehicle quantity of the target lane based on the target background vehicle quantity indication parameter of the target lane.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the target traffic state indication parameter comprises a target traffic density; and
the determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter comprises:
using an inverse of the target traffic density as the reference vehicle-to-vehicle distance; and
determining a target traffic state corresponding to the target traffic density from the target traffic flow macroscopic fundamental diagram, determining a target traffic capacity that the target traffic state has in the target traffic flow macroscopic fundamental diagram, and using a ratio of the target traffic capacity to the target traffic density as the reference vehicle speed.

### Claim 4 (depends on 3)

The method according to claim 3, wherein
the target traffic flow macroscopic fundamental diagram comprises a first linear segment and a second linear segment located in a coordinate system, a horizontal axis of the coordinate system representing a traffic density, a vertical axis of the coordinate system representing a traffic capacity, and each point in the first linear segment and the second linear segment representing a traffic state;
the determining a target traffic state corresponding to the target traffic density from the target traffic flow macroscopic fundamental diagram comprises:
establishing the following constraint relationships between the first linear segment and the second linear segment in the target traffic flow macroscopic fundamental diagram:
an ordinate of an intersection point of the first linear segment and the second linear segment is used as a maximum traffic capacity, an abscissa of the intersection point of the first linear segment and the second linear segment is used as a critical traffic density, and an abscissa of an intersection point of the second linear segment and the horizontal axis is used as a traffic jam density; and
using, as the target traffic state, a point, in the first linear segment and the second linear segment that conform to the constraint relationships, whose abscissa is the target traffic density; and
the determining a target traffic capacity that the target traffic state has in the target traffic flow macroscopic fundamental diagram comprises:
using an ordinate of the target traffic state as the target traffic capacity that the target traffic state has in the target traffic flow macroscopic fundamental diagram.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the target traffic state indication parameter comprises a target traffic capacity and a target vehicle speed; and
the determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter comprises:
determining a target traffic state corresponding to the target traffic capacity and a target vehicle speed from the target traffic flow macroscopic fundamental diagram, determining a target traffic density that the target traffic state has in the target traffic flow macroscopic fundamental diagram, and using an inverse of the target traffic density as the reference vehicle-to-vehicle distance; and
determining the target vehicle speed as the reference vehicle speed.

### Claim 6 (depends on 5)

The method according to claim 5, wherein
the target traffic flow macroscopic fundamental diagram comprises a coordinate system and a first linear segment and a second linear segment located in the coordinate system, a horizontal axis of the coordinate system representing a traffic density, a vertical axis of the coordinate system representing a traffic capacity, and each point in the first linear segment and the second linear segment representing a traffic state;
the determining a target traffic state corresponding to the target traffic capacity and a target vehicle speed from the target traffic flow macroscopic fundamental diagram comprises:
establishing the following constraint relationships between the first linear segment and the second linear segment in the target traffic flow macroscopic fundamental diagram:
an ordinate of an intersection point of the first linear segment and the second linear segment is used as a maximum traffic capacity, an abscissa of the intersection point of the first linear segment and the second linear segment is used as a critical traffic density, and an abscissa of an intersection point of the second linear segment and the horizontal axis is used as a traffic jam density; and
determining, as the target traffic state, a point, in the first linear segment and the second linear segment that conform to the constraint relationships, whose ordinate is the target traffic capacity and which is connected to an origin of the coordinate system to form a line with a slope that is the target vehicle speed; and
the determining a target traffic density that the target traffic state has in the target traffic flow macroscopic fundamental diagram comprises:
using an abscissa of the target traffic state as the target traffic density that the target traffic state has in the target traffic flow macroscopic fundamental diagram.

### Claim 7 (depends on 3)

The method according to claim 3, further comprising:
displaying a second configuration interface, and receiving traffic flow quantification parameters inputted through the second configuration interface, the traffic flow quantification parameters comprising a free-flow vehicle speed, a jam density, a critical density, and a maximum traffic capacity;
generating, according to the free-flow vehicle speed, the critical density, and the maximum traffic capacity, the first linear segment configured for representing a free traveling state of the vehicles;
generating, according to the critical density, the maximum traffic capacity, and the jam density, the second linear segment configured for representing a jammed traveling state of the vehicles; and
constructing the target traffic flow macroscopic fundamental diagram according to the coordinate system and the first linear segment and the second linear segment located in the coordinate system.

### Claim 8 (depends on 2)

The method according to claim 2, wherein the target background vehicle quantity indication parameter comprises a background vehicle quantity parameter used for indicating the background vehicle quantity of the target lane.

### Claim 9 (depends on 2)

The method according to claim 2, wherein the target background vehicle quantity indication parameter comprises a location range indication parameter; and
the determining the background vehicle quantity of the target lane based on the target background vehicle quantity indication parameter of the target lane comprises:
determining the background vehicle quantity of the target lane according to the location range indication parameter of target background vehicles and the reference vehicle-to-vehicle distance.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the location range indication parameter of the target background vehicles comprises a first distance parameter and a second distance parameter, the first distance parameter being used for indicating a maximum distance between the test vehicle and a background vehicle in a forward direction of the test vehicle, and the second distance parameter being used for indicating a maximum distance between the test vehicle and a background vehicle in a reverse direction of the test vehicle; and
the determining the background vehicle quantity of the target lane according to the location range indication parameter of target background vehicles and the reference vehicle-to-vehicle distance comprises:
determining a ratio of the first distance parameter to the reference vehicle-to-vehicle distance, and using the ratio as a quantity of the background vehicles in the target lane in front of the test vehicle; and
determining a ratio of the second distance parameter to the reference vehicle-to-vehicle distance, and using the ratio as a quantity of the background vehicles in the target lane in rear of the test vehicle.

### Claim 11 (depends on 1)

The method according to claim 1, wherein the first configuration interface comprises a configuration control configured to configure the reference vehicle-to-vehicle distance, a configuration control configured to configure the reference vehicle speed, and a configuration control configured to configure the background vehicle quantity of the target lane; and
the receiving parameters inputted through the first configuration interface comprises:
receiving parameters inputted through the configuration controls on the first configuration interface, the parameters comprising the reference vehicle-to-vehicle distance, the reference vehicle speed, and the background vehicle quantity of the target lane.

### Claim 12 (depends on 1)

The method according to claim 1, wherein
the background vehicles are classified into a leading background vehicle and a following background vehicle; and
the simulating traveling of each of the background vehicles in a simulated traffic environment comprises:
fixing a speed of the leading background vehicle, and updating a speed of the following background vehicle, so that the following background vehicle follows the leading background vehicle.

### Claim 13 (depends on 1)

The method according to claim 1, wherein when determining the initial location of an ith background vehicle in the target lane, the random distance deviation is a normal random variable conforming to a first normal distribution, and when determining the initial speed of the ith background vehicle in the target lane, the random speed deviation is a normal random variable conforming to a second normal distribution, a value for i being in a range of 1 to N, N being a total quantity of the background vehicles.

### Claim 14

An electronic device, comprising a processor and a memory,
the memory being configured to store a plurality of computer programs that, when executed by the processor, cause the electronic device to perform a plurality of operations including:
receiving parameters through a first configuration interface;
determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane, the target lane comprising a lane in which a test vehicle and background vehicles are located;
determining an initial location of each of the background vehicles in the target lane based on a location of the test vehicle, the reference vehicle-to-vehicle distance, and a random distance deviation;
determining an initial speed of each of the background vehicles in the target lane based on the reference vehicle speed and a random speed deviation; and
simulating traveling of each of the background vehicles in a simulated traffic environment based on the initial location and the initial speed of each of the background vehicles and the background vehicle quantity.

### Claim 15 (depends on 14)

The electronic device according to claim 14, wherein
the first configuration interface comprises a configuration control configured to configure a traffic state indication parameter, and a configuration control configured to configure a background vehicle quantity indication parameter;
the receiving parameters inputted through the first configuration interface comprises:
receiving a target traffic state indication parameter and a target background vehicle quantity indication parameter inputted through the configuration controls on the first configuration interface; and
the determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane comprises:
determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter; and
determining the background vehicle quantity of the target lane based on the target background vehicle quantity indication parameter of the target lane.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the target traffic state indication parameter comprises a target traffic density; and
the determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter comprises:
using an inverse of the target traffic density as the reference vehicle-to-vehicle distance; and
determining a target traffic state corresponding to the target traffic density from the target traffic flow macroscopic fundamental diagram, determining a target traffic capacity that the target traffic state has in the target traffic flow macroscopic fundamental diagram, and using a ratio of the target traffic capacity to the target traffic density as the reference vehicle speed.

### Claim 17 (depends on 15)

The electronic device according to claim 15, wherein the target traffic state indication parameter comprises a target traffic capacity and a target vehicle speed; and
the determining the reference vehicle-to-vehicle distance and the reference vehicle speed based on a target traffic flow macroscopic fundamental diagram and the target traffic state indication parameter comprises:
determining a target traffic state corresponding to the target traffic capacity and a target vehicle speed from the target traffic flow macroscopic fundamental diagram, determining a target traffic density that the target traffic state has in the target traffic flow macroscopic fundamental diagram, and using an inverse of the target traffic density as the reference vehicle-to-vehicle distance; and
determining the target vehicle speed as the reference vehicle speed.

### Claim 18 (depends on 14)

The electronic device according to claim 14, wherein
the background vehicles are classified into a leading background vehicle and a following background vehicle; and
the simulating traveling of each of the background vehicles in a simulated traffic environment comprises:
fixing a speed of the leading background vehicle, and updating a speed of the following background vehicle, so that the following background vehicle follows the leading background vehicle.

### Claim 19

A non-transitory computer-readable storage medium, storing a plurality of computer programs, the plurality of computer programs, when executed by a processor of an electronic device, cause the electronic device to perform a plurality of operations including:
receiving parameters through a first configuration interface;
determining, based on the parameters, a reference vehicle-to-vehicle distance, a reference vehicle speed, and a background vehicle quantity of a target lane, the target lane comprising a lane in which a test vehicle and background vehicles are located;
determining an initial location of each of the background vehicles in the target lane based on a location of the test vehicle, the reference vehicle-to-vehicle distance, and a random distance deviation;
determining an initial speed of each of the background vehicles in the target lane based on the reference vehicle speed and a random speed deviation; and
simulating traveling of each of the background vehicles in a simulated traffic environment based on the initial location and the initial speed of each of the background vehicles and the background vehicle quantity.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein
the background vehicles are classified into a leading background vehicle and a following background vehicle; and
the simulating traveling of each of the background vehicles in a simulated traffic environment comprises:
fixing a speed of the leading background vehicle, and updating a speed of the following background vehicle, so that the following background vehicle follows the leading background vehicle.
