Traffic flow simulation method and system based on data driving and user editing

By encoding the two-dimensional grid map in the traffic flow simulation and introducing the value function of road information, the existing traffic flow generation method is solved, and a more flexible user editing traffic flow simulation is achieved, and the generated editing trajectory is more in line with the actual road conditions.

CN114021334BActive Publication Date: 2025-07-08JILUO TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111278770.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-31
Publication Date
2025-07-08
Estimated Expiration
2041-10-31

AI Technical Summary

Technical Problem

Existing simulation traffic flow generation methods are usually generated based on algorithms or neural networks, and are highly random, so users cannot flexibly edit the vehicle paths in the traffic flow according to actual test development needs.

Method used

By encoding the two-dimensional grid map, the value function of road information is introduced, and the road map is searched from the set editing node, and the road map grid set with the smallest value is obtained as the editing trajectory, and a simulated traffic flow is generated based on the user editing information.

Benefits of technology

It realizes a more flexible and effective user editing traffic flow simulation, and the generated editing trajectory is more in line with the actual road conditions and meets the user's needs for editing information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114021334B_ABST
    Figure CN114021334B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of traffic flow simulation, and provides a traffic flow simulation method and system based on data driving and user editing. The method includes: encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; obtaining a set of editing positions according to user editing information, and taking the grids corresponding to the editing positions in the road map as editing nodes; searching the road map starting from a set editing node, and obtaining a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing nodes; obtaining a simulated traffic flow according to the editing trajectory; the value function includes a distance parameter and a lane parameter; by encoding the two-dimensional grid map and introducing road information into the value function, the determination and selection of grids are more in line with the actual road conditions during the search process of the editing trajectory, and thus a more flexible and realistic editing trajectory that meets the user editing information is obtained based on the set of road map grids.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic flow simulation, and in particular, to a traffic flow simulation method and system based on data driving and user editing. Background Art

[0002] Autopilot, also known as driverless, computer driving or wheeled mobile robot, is a cutting-edge technology that relies on computer and artificial intelligence technologies to complete a complete, safe and effective driving without human operation.

[0003] Supported by vehicle networking technology and artificial intelligence technology, autopilot technology can coordinate travel routes and planned times, thus greatly improving travel efficiency and reducing energy consumption to a certain extent. Autopilot can also help avoid safety hazards such as drunk driving and fatigue driving, reduce driver errors and enhance safety. Therefore, autopilot has become a research and development focus in various countries in recent years.

[0004] However, driverless also faces many challenges, such as bad weather, complex traffic environment, etc. Therefore, its performance in some scenarios may not be comparable to that of human drivers, and there may even be new and more serious accident risks (such as cyber attacks).

[0005] Some analyses show that with 95% confidence, a driverless system needs to conduct about 5 billion miles of road tests to prove that its accident rate is significantly lower than that of human drivers. That is, 100 vehicles need to be tested for about 225 years under the condition of 24 hours a day, 365 days a year and an average speed of 25 miles per hour.

[0006] It can be seen that in the long run, in the scenarios of autopilot or assisted driving, the test and development in the simulation environment must account for a higher proportion to meet the development and test requirements.

[0007] The existing simulation traffic flow generation methods are usually based on algorithms or neural networks to generate combinations of vehicle trajectories and motion states with strong randomness. Users cannot edit the vehicle paths in the traffic flow according to actual test and development requirements.

[0008] Therefore, how to more flexibly and effectively implement traffic flow simulation based on user editing has become a technical problem that needs to be solved urgently in the industry. Summary of the Invention

[0009] The present invention provides a traffic flow simulation method and system based on data driving and user editing to solve the defect of strong randomness of traffic flow in the prior art and more flexibly and effectively implement traffic flow simulation based on user editing.

[0010] The present invention provides a traffic flow simulation method based on data driving and user editing, characterized by including:

[0011] Encode a two-dimensional grid map according to traffic flow road information to obtain a road map;

[0012] Obtain a set of editing positions according to user editing information, and use the grids corresponding to the editing positions in the road map as editing nodes;

[0013] Search the road map starting from a set editing node, and obtain a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node;

[0014] Obtain a simulated traffic flow according to the editing trajectory;

[0015] The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the coding value of the grid in the road map.

[0016] According to a traffic flow simulation method based on data driving and user editing provided by the present invention, the step of encoding a two-dimensional grid map according to traffic flow road information to obtain a road map includes:

[0017] Divide the two-dimensional grid map into a first area, a second area, and a third area according to traffic flow road information; the first area is a non-drivable area; the second area is a drivable area that is not the center of the lane; the third area is the area at the center of the lane; the center of the lane refers to a set of grids where the distance from the relative two lane lines is less than a set center threshold;

[0018] Set the coding values of the grids in the first area, the second area, and the third area in the two-dimensional grid map to 0, 1, and 2 respectively, and obtain the encoded two-dimensional grid map as the road map.

[0019] According to a traffic flow simulation method based on data driving and user editing provided by the present invention, the step of searching the road map starting from a set editing node and obtaining a set of road map grids with the minimum value function as the editing trajectory includes:

[0020] Determine a first editing node as the starting point and a second editing node as the ending point;

[0021] Use the first editing node as a path node, use the adjacent grid of the path node with the minimum value function as the updated path node, and add it to the set of road map grids;

[0022] Repeat the step of taking the grid adjacent to the path node with the minimum value function as the updated path node and adding it to the set of road map grids until the second editing node is added to the set of road map grids, obtaining an editing trajectory.

[0023] A traffic flow simulation method based on data-driven and user editing provided by the present invention:

[0024] The distance parameter is positively correlated with the first distance; the first distance is the distance between the grid and the first editing node;

[0025] The distance parameter is also positively correlated with the second distance; the second distance is the distance between the grid and the second editing node.

[0026] A traffic flow simulation method based on data-driven and user editing provided by the present invention, the value function satisfies:

[0027] ;

[0028] In the formula, is the grid; is the position of the editing node; is the distance parameter, representing the metric between the grid and the editing node; is a set adjustment parameter; is the coding value of the grid; is a set constant; is the lane parameter.

[0029] A traffic flow simulation method based on data-driven and user editing provided by the present invention, the step of obtaining the simulated traffic flow according to the editing trajectory includes:

[0030] Obtain time information corresponding one-to-one to the editing position according to the user editing information; the time information refers to the moment when the editing vehicle is at the editing position;

[0031] Calculate the motion state of the editing vehicle according to the editing trajectory, the editing position, and the time information;

[0032] Obtain the simulated traffic flow according to the motion states of a set number of the editing vehicles.

[0033] The present invention also provides a traffic flow simulation system based on data-driven and user editing, including:

[0034] A two-dimensional map module, configured to encode a two-dimensional grid map according to traffic flow road information to obtain a road map;

[0035] An editing node module, configured to obtain a set of editing positions according to user editing information, and use the grids corresponding to the editing positions in the road map as editing nodes;

[0036] An editing trajectory module, configured to search the road map starting from a set editing node, and obtain a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node;

[0037] A simulation module, configured to obtain a simulated traffic flow according to the editing trajectory;

[0038] The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the coding value of the grid in the road map.

[0039] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of any one of the above-mentioned traffic flow simulation methods based on data driving and user editing are implemented.

[0040] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned traffic flow simulation methods based on data driving and user editing are implemented.

[0041] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned traffic flow simulation methods based on data driving and user editing are implemented.

[0042] The traffic flow simulation method and system based on data driving and user editing provided by the present invention encode a two-dimensional grid map and introduce road information into the value function, so that in the process of searching for the editing trajectory, the determination and selection of grids are more in line with the actual road conditions, and then a more flexible and realistic editing trajectory that meets the user editing information is obtained based on the set of road map grids. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0044] Figure 1It is a schematic flow chart of the traffic flow simulation method based on data driving and user editing provided by the present invention;

[0045] Figure 2 It is a schematic structural diagram of the traffic flow simulation system based on data driving and user editing provided by the present invention;

[0046] Figure 3 It is a schematic structural diagram of the electronic device provided by the present invention.

[0047] Reference numerals:

[0048] 1: Two-dimensional map module; 2: Edit node module; 3: Edit trajectory module;

[0049] 4: Simulation module; 310: Processor; 320: Communication interface;

[0050] 330: Memory; 340: Communication bus. Detailed implementation manners

[0051] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.

[0052] The following Figure 1 describes the traffic flow simulation method based on data driving and user editing of the present invention.

[0053] As Figure 1 shown, an embodiment of the present invention provides a traffic flow simulation method based on data driving and user editing, including:

[0054] Step 101, encoding a two-dimensional grid map according to traffic flow road information to obtain a road map;

[0055] Step 103, obtaining a set of editing positions according to user editing information, and using the grids corresponding to the editing positions in the road map as editing nodes;

[0056] Step 105, starting from a set editing node, searching the road map, and obtaining a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node;

[0057] Step 107, obtaining a simulated traffic flow according to the editing trajectory;

[0058] The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the coding value of the grid in the road map.

[0059] It should be noted that by repeatedly executing the method of this embodiment and combining the editing trajectories of multiple editing vehicles, a complete simulated traffic flow can be obtained.

[0060] In addition, the method of this embodiment can also be applied to the following scenarios:

[0061] 1. Adding one or more newly introduced editing vehicles to the existing simulated traffic flow;

[0062] 2. Modifying the original trajectories of one or more selected vehicles in the existing simulated traffic flow to editing trajectories.

[0063] In a preferred embodiment, step 101 includes:

[0064] Step 1011, obtaining traffic flow road information;

[0065] For the solution of repeatedly executing the method of this embodiment and combining the editing trajectories of multiple editing vehicles to obtain a complete simulated traffic flow, the traffic flow road information is preset road environment information;

[0066] For the solution of adding one or more newly introduced editing vehicles to the existing simulated traffic flow, or the solution of modifying the original trajectories of one or more selected vehicles in the existing simulated traffic flow to editing trajectories, the traffic flow road information is the road environment information extracted from the existing simulated traffic flow;

[0067] Step 1012, projecting the traffic flow road information onto the plane where the road is located to obtain a two-dimensional map;

[0068] Step 1013, discretizing the two-dimensional map with grids of a set size to obtain a two-dimensional grid map;

[0069] The grids in step 1013 are not a limitation on the shape of the discrete units, that is, the grids can be square grids, rhombus grids, parallelogram grids, rectangular grids, hexagonal grids, triangular grids, etc.;

[0070] Step 1014, encoding each grid in the two-dimensional grid map according to the traffic flow road information;

[0071] In step 1014, the coding value of the grid is determined by the driving conditions at the corresponding position of the grid in the traffic flow road information.

[0072] In step 103, the user-edited information includes at least two editing positions to serve as the starting point and the ending point for editing the vehicle.

[0073] The beneficial effect of this embodiment lies in:

[0074] By encoding the two-dimensional grid map and introducing road information into the value function, during the search process of the edited trajectory, the determination and selection of the grid are more in line with the actual road conditions, and thus a more flexible and realistic edited trajectory that meets the user-edited information is obtained based on the set of road map grids.

[0075] According to the above embodiment, in this embodiment:

[0076] The step of searching the road map starting from the self-set editing node and obtaining the set of road map grids with the minimum value function as the edited trajectory includes:

[0077] Determine a first editing node as the starting point and a second editing node as the ending point;

[0078] Take the first editing node as a path node, take the grid adjacent to the path node with the minimum value function as the updated path node, and add it to the set of road map grids;

[0079] Repeat the step of taking the grid adjacent to the path node with the minimum value function as the updated path node and adding it to the set of road map grids until the second editing node is added to the set of road map grids to obtain the edited trajectory.

[0080] The distance parameter is positively correlated with a first distance; the first distance is the distance between the grid and the first editing node;

[0081] The distance parameter is also positively correlated with a second distance; the second distance is the distance between the grid and the second editing node.

[0082] The step of encoding the two-dimensional grid map according to the traffic flow road information to obtain the road map includes:

[0083] Divide the two-dimensional grid map into a first area, a second area, and a third area according to the traffic flow road information; the first area is a non-drivable area; the second area is a drivable area that is not the center of the lane; the third area is the area at the center of the lane; the center of the lane refers to the set of grids whose distance from the opposite lane lines is less than a set center threshold;

[0084] Set the encoding values of the grids in the first area, the second area, and the third area in the two-dimensional grid map to 0, 1, and 2 respectively to obtain the encoded two-dimensional grid map as the road map.

[0085] The value function satisfies:

[0086] ;

[0087] In the formula, is the grid; is the position of the editing node; is the distance parameter, representing the metric between the grid and the editing node; is a set adjustment parameter; is the coding value of the grid; is a set constant; is the lane parameter.

[0088] It should be noted that As the metric between the grid and the editing node, Manhattan distance metric, diagonal distance metric or Euclidean distance metric can be specifically selected;

[0089] The determination of the metric type is related to the shape of the grid. In a preferred embodiment, the determination of the metric type is related to the number of sides of the grid and the definition of adjacent grids.

[0090] For example, for a square grid, if the adjacent grids of the grid are defined as consisting of four grids: up, down, left, and right, then the search movement path of the grid is limited to the four directions of up, down, left, and right, and the Manhattan distance metric should be selected for the distance parameter; if the adjacent grids of the grid are defined as consisting of eight grids: up, down, left, right, upper left, lower left, upper right, and lower right, then the search movement path of the grid is limited to the eight directions of up, down, left, right, upper left, lower left, upper right, and lower right, and the diagonal distance metric should be selected for the distance parameter.

[0091] Again, for a grid with a large number of sides, the number of its adjacent grids is large, and it can be considered that the direction of the search movement path of the grid is arbitrary, and the Euclidean distance metric should be selected for the distance parameter.

[0092] It should be noted that As a set constant, its purpose is to prevent the denominator of the lane parameter from being zero and does not affect the distinction of the lane parameter based on the sign value. Therefore, its value should be a small value, and in some embodiments, it can be understood as an infinitesimal quantity.

[0093] In the actual calculation of the value function, depending on the situation of different numbers of editing nodes, the value-taking method of

[0094] may be different. Specifically: For the case where 2 editing nodes are used as the starting point and the ending point respectively, the value of is the sum of the metrics between the grid and the 2 editing nodes;

[0095] For the case where the number of editing nodes is greater than 2, can be the metric sum between the grid and all the editing nodes; it can also be the metric sum of the grid relative to the starting point, the ending point, and the next nearest editing node; it can also be the metric sum of the grid relative to the starting point and the next nearest editing node; it can also be the metric sum of the grid relative to the ending point and the next nearest editing node.

[0096] In a preferred embodiment, is the metric sum of the grid relative to the starting point, the ending point, and the next nearest editing node. This embodiment can better balance the search cost (i.e., the metric with the starting point), the estimation cost (i.e., the metric with the ending point), and the editing node cost (i.e., the metric with the next nearest editing node).

[0097] Furthermore, the step of obtaining the simulated traffic flow according to the editing trajectory includes two feasible schemes, namely, the modification scheme and the construction scheme;

[0098] The specific steps of the construction scheme are as follows:

[0099] Obtain time information corresponding one-to-one to the editing position according to the user editing information; the time information refers to the moment when the editing vehicle is at the editing position;

[0100] Calculate the motion state of the editing vehicle according to the editing trajectory, the editing position, and the time information;

[0101] Obtain the simulated traffic flow according to the motion states of a set number of the editing vehicles.

[0102] The specific steps of the modification scheme are as follows:

[0103] Obtain time information corresponding one-to-one to the editing position according to the user editing information; the time information refers to the moment when the editing vehicle is at the editing position;

[0104] Calculate the motion state of the editing vehicle according to the editing trajectory, the editing position, and the time information;

[0105] Input the motion state of the editing vehicle into the existing traffic flow to obtain the modified simulated traffic flow; or, replace the set vehicle in the existing traffic flow with the motion state of the editing vehicle to obtain the modified simulated traffic flow.

[0106] The beneficial effects of this embodiment are as follows:

[0107] By encoding a two-dimensional grid map and introducing road information into the value function, the determination and selection of grids during the search for an editing trajectory are made more in line with the actual road conditions, and then a more flexible and realistic editing trajectory that meets the user's editing information is obtained based on the set of road map grids.

[0108] The traffic flow simulation device based on data-driven and user editing provided by the present invention will be described below. The traffic flow simulation device based on data-driven and user editing described below can be correspondingly referred to the traffic flow simulation method based on data-driven and user editing described above.

[0109] An embodiment of the present invention further provides a traffic flow simulation system based on data-driven and user editing, including:

[0110] A two-dimensional map module 1, configured to encode a two-dimensional grid map according to traffic flow road information to obtain a road map;

[0111] An editing node module 2, configured to obtain a set of editing positions according to user editing information, and use the grids corresponding to the editing positions in the road map as editing nodes;

[0112] An editing trajectory module 3, configured to search the road map starting from a set editing node, and obtain a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node;

[0113] A simulation module 4, configured to obtain a simulated traffic flow according to the editing trajectory;

[0114] The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the encoded value of the grid in the road map.

[0115] Further, the two-dimensional map module 1 includes:

[0116] A region division unit, configured to divide the two-dimensional grid map into a first region, a second region, and a third region according to traffic flow road information; the first region is a non-drivable region; the second region is a drivable region that is not the center of the lane; the third region is the center region of the lane; the center of the lane refers to the set of grids whose distance from the opposite lane lines is less than a set center threshold;

[0117] An encoding unit, configured to set the encoded values of the grids in the first region, the second region, and the third region in the two-dimensional grid map to 0, 1, and 2 respectively.

[0118] The editing trajectory module 3 includes:

[0119] A start and end unit for determining a first editing node as the start point and a second editing node as the end point;

[0120] An iteration unit for taking the first editing node as a path node, taking the adjacent grid of the path node with the minimum value function as the updated path node, and adding it to the road map grid set; repeating the step of taking the adjacent grid of the path node with the minimum value function as the updated path node and adding it to the road map grid set until the second editing node is added to the road map grid set to obtain an editing trajectory.

[0121] The distance parameter is positively correlated with a first distance; the first distance is the distance between the grid and the first editing node;

[0122] The distance parameter is also positively correlated with a second distance; the second distance is the distance between the grid and the second editing node.

[0123] The value function satisfies:

[0124] ;

[0125] In the formula, is the grid; is the position of the editing node; is the distance parameter, representing the metric between the grid and the editing node; is a set adjustment parameter; is the coding value of the grid; is a set constant; is the lane parameter.

[0126] Furthermore, the simulation module 4 includes:

[0127] A time information unit for obtaining time information corresponding one-to-one to the editing position according to the user editing information; the time information refers to the moment when the editing vehicle is at the editing position;

[0128] A motion state unit for calculating the motion state of the editing vehicle according to the editing trajectory, editing position, and time information;

[0129] A simulated traffic flow unit for obtaining a simulated traffic flow according to the motion states of a set number of the editing vehicles.

[0130] The beneficial effects of this embodiment are as follows:

[0131] By encoding a two-dimensional grid map and introducing road information into the value function, the determination and selection of grids during the search process of the editing trajectory are made more in line with the actual road conditions. Furthermore, a more flexible and realistic editing trajectory that meets the user's editing information is obtained based on the set of road map grids.

[0132] Figure 3 An example of the physical structure diagram of an electronic device is shown as Figure 3 shown. The electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communications interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logical instructions in the memory 330 to execute a traffic flow simulation method based on data driving and user editing. The method includes: encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; obtaining a set of editing positions according to user editing information, and using the grids corresponding to the editing positions in the road map as editing nodes; searching the road map starting from a set editing node to obtain a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing nodes; the value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grids in the road map and the editing nodes; the lane parameter is determined based on the encoded value of the grids in the road map.

[0133] In addition, when the logical instructions in the above-mentioned memory 330 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0134] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the traffic flow simulation method based on data driving and user editing provided by the above-mentioned various methods. The method includes: encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; obtaining a set of editing positions according to user editing information, and using the grids corresponding to the editing positions in the road map as editing nodes; searching the road map starting from a set editing node to obtain a set of road map grids with the minimum value function as an editing trajectory; the editing trajectory passes through the editing node; the value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the encoding value of the grid in the road map.

[0135] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the traffic flow simulation method based on data driving and user editing provided by the above-mentioned various methods. The method includes: encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; obtaining a set of editing positions according to user editing information, and using the grids corresponding to the editing positions in the road map as editing nodes; searching the road map starting from a set editing node to obtain a set of road map grids with the minimum value function as an editing trajectory; the editing trajectory passes through the editing node; the value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the encoding value of the grid in the road map.

[0136] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0137] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traffic flow simulation method based on data-driven and user editing, characterized in that Including: Encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; Obtaining a set of editing positions according to user editing information, and taking the grids corresponding to the editing positions in the road map as editing nodes; Searching the road map starting from a set editing node, and taking the set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node; Obtaining a simulated traffic flow according to the editing trajectory; The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the coding value of the grid in the road map; The step of searching the road map starting from a set editing node and taking the set of road map grids with the minimum value function as the editing trajectory includes: Determining a first editing node as the starting point and a second editing node as the ending point; Taking the first editing node as a path node, and taking the grid with the minimum value function among the adjacent grids of the path node as an updated path node, and adding it to the set of road map grids; Repeating the step of taking the grid with the minimum value function among the adjacent grids of the path node as the updated path node and adding it to the set of road map grids until the second editing node is added to the set of road map grids to obtain the editing trajectory; The distance parameter is positively correlated with a first distance; the first distance is the distance between the grid and the first editing node; The distance parameter is also positively correlated with a second distance; the second distance is the distance between the grid and the second editing node.

2. The traffic flow simulation method based on data driving and user editing according to claim 1, wherein The step of encoding a two-dimensional grid map according to traffic flow road information to obtain a road map includes: Dividing the two-dimensional grid map into a first area, a second area, and a third area according to traffic flow road information; the first area is a non-drivable area; the second area is a drivable area that is not the center of the lane; the third area is the area of the center of the lane; the center of the lane refers to the set of grids where the distance from the relative two lane lines is less than a set center threshold; Setting the coding values of the grids in the first area, the second area, and the third area in the two-dimensional grid map to 0, 1, and 2 respectively, and obtaining the encoded two-dimensional grid map as the road map.

3. The traffic flow simulation method based on data-driven and user editing according to claim 2, wherein The value function satisfies: ; In the formula, is the said grid; is the position of the said editing node; is the said distance parameter, representing the measurement between the said grid and the said editing node; is the set adjustment parameter; is the coding value of the said grid; is the set constant; is the said lane parameter.

4. The traffic flow simulation method based on data-driven and user editing according to any one of claims 1 to 3, characterized in that, The step of obtaining a simulated traffic flow according to the editing trajectory includes: Obtaining time information corresponding one-to-one to the editing position according to user editing information; the time information refers to the moment when the editing vehicle is at the editing position; Calculating the motion state of the editing vehicle according to the editing trajectory, the editing position, and the time information; Obtaining a simulated traffic flow according to the motion states of a set number of the editing vehicles.

5. A traffic flow simulation system based on data-driven and user editing, characterized in that, Including: A two-dimensional map module for encoding a two-dimensional grid map according to traffic flow road information to obtain a road map; An editing node module for obtaining a set of editing positions according to user editing information, and taking the grids corresponding to the editing positions in the road map as editing nodes; An editing trajectory module, configured to search a road map starting from a self-set editing node, and obtain a set of road map grids with the minimum value function as the editing trajectory; the editing trajectory passes through the editing node; A simulation module, configured to obtain a simulated traffic flow according to the editing trajectory; The value function includes a distance parameter and a lane parameter; the distance parameter is determined based on the distance between the grid in the road map and the editing node; the lane parameter is determined based on the coding value of the grid in the road map; The step of searching a road map starting from the self-set editing node and obtaining a set of road map grids with the minimum value function as the editing trajectory includes: Determining a first editing node as the starting point and a second editing node as the ending point; Taking the first editing node as a path node, and taking the grid with the minimum value function among the adjacent grids of the path node as an updated path node, and adding it to the set of road map grids; Repeating the step of taking the grid with the minimum value function among the adjacent grids of the path node as the updated path node and adding it to the set of road map grids until the second editing node is added to the set of road map grids to obtain the editing trajectory; The distance parameter is positively correlated with a first distance; the first distance is the distance between the grid and the first editing node; The distance parameter is also positively correlated with a second distance; the second distance is the distance between the grid and the second editing node.

6. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein When the processor executes the program, it implements the steps of the traffic flow simulation method based on data driving and user editing according to any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the traffic flow simulation method based on data driving and user editing according to any one of claims 1 to 4.

8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the traffic flow simulation method based on data driving and user editing according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automatic lane changing method and device and storage medium

    CN110532846A

  • Three-dimensional road modeling method and system based on vision and rules

    CN111047694A