Random traffic flow generation method and system, electronic device and storage medium
By constructing a collision trajectory model and embedding a random traffic flow generation algorithm, the problem of inaccurate vehicle collision behavior in existing traffic flow simulation software is solved, generating simulation scenarios that are more consistent with real traffic flow and improving the realism of the simulation scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2023-06-28
- Publication Date
- 2026-05-01
AI Technical Summary
Existing traffic flow simulation software cannot accurately simulate vehicle collision behavior, resulting in vehicle collisions in simulated traffic flow appearing as overlapping or passing through each other, which does not conform to the vehicle collision behavior in real traffic flow and cannot simulate the microscopic interference of traffic accidents on simulated vehicles.
A collision trajectory model is constructed, and the speed and trajectory of the vehicle after the collision are generated using the state data of the vehicle before the collision. A random traffic flow generation algorithm is embedded to generate a simulation scenario that is more consistent with real traffic flow.
By embedding a random traffic flow generation algorithm with a collision trajectory model, the vehicle collision behavior in simulated traffic flow is more in line with real-world conditions, solving the problem of inaccurate vehicle collision performance in simulated traffic flow and improving the realism of the simulation scenario.
Smart Images

Figure CN116935633B_ABST
Abstract
Description
Random traffic flow generation methods, systems, electronic devices and storage media Technical Field
[0001] This invention belongs to the field of simulation technology, and specifically relates to a method, system, electronic device, and storage medium for generating random traffic flow. Background Technology
[0002] With the rapid development of intelligent vehicles, more and more autonomous driving functions are being implemented. The ultimate vision of intelligent vehicle development is to liberate humans, enable efficient transportation, and improve the user's travel experience through autonomous driving. Autonomous driving functions require extensive and comprehensive scenario coverage testing to ensure functional safety. Real-vehicle testing cannot meet the needs of testing in a large number of extreme and dangerous scenarios; therefore, the verification of autonomous driving functions will mainly rely on simulation testing. Simulation testing is mainly divided into single-scenario testing and continuous scenario testing, with random traffic flow testing being the primary method for continuous scenario testing.
[0003] However, mainstream traffic flow simulation software such as VISSIM and Sumo mainly focus on simulating macroscopic traffic flow. In generating traffic flow simulation scenarios, vehicle collisions in simulated traffic flow are characterized by overlapping and passing through, which does not conform to the vehicle collision behavior in real traffic flow. Therefore, it is impossible to simulate the microscopic interference of traffic accidents on simulated vehicles. Summary of the Invention
[0004] This invention provides a method, system, electronic device, and storage medium for generating random traffic flow, at least to solve the technical problem that vehicle collisions in simulated traffic flow exhibit overlapping, crossing, etc., which do not conform to the vehicle collision behavior in real traffic flow, and thus cannot simulate the microscopic interference of traffic accidents on simulated vehicles.
[0005] According to a first aspect of the present invention, a method for generating random traffic flow is provided, comprising: constructing a collision trajectory model, wherein the collision trajectory model can determine the speed and trajectory of the colliding vehicles after a collision based on input parameters, the input parameters being vehicle state data before the collision; embedding the collision trajectory model into a preset random traffic flow generation algorithm, determining a target traffic flow generation algorithm; and generating random traffic flow using the target traffic flow algorithm.
[0006] Optionally, vehicle status data may include one or more of the following: vehicle mass, vehicle speed, relative speed, collision location, and collision angle.
[0007] Optionally, constructing a collision trajectory model includes: determining the input and output variables of the target transfer function; determining a linear differential equation based on the relationship between the input and output variables; performing a Laplace transform on the linear differential equation to obtain an initial transfer function; and solving the initial transfer function using preset real traffic collision data to obtain the target transfer function, where the target transfer function is the collision trajectory model.
[0008] Optionally, constructing a collision trajectory model includes: constructing an initial neural network model; and training the initial neural network model using preset real traffic collision data to obtain the collision trajectory model.
[0009] Optionally, embedding the collision trajectory model into a preset random traffic flow generation algorithm and determining the target traffic flow generation algorithm includes: determining the vehicle trajectory generation module in the preset random traffic flow generation algorithm; converting the collision trajectory model into a trajectory collision algorithm; integrating the trajectory collision algorithm into the vehicle trajectory generation module, and determining the target traffic flow generation algorithm.
[0010] Optionally, the preset random traffic flow generation algorithm is one of the following: random distribution method, equal probability method, Monte Carlo method.
[0011] Optionally, the random traffic flow generation method further includes: validating the target traffic flow algorithm to obtain a validation result; and iteratively optimizing the target traffic flow algorithm in response to the validation result indicating that the validity of the target traffic flow algorithm does not meet the preset requirements.
[0012] According to a second aspect of the present invention, a random traffic flow generation system is also provided, comprising:
[0013] The module constructs a collision trajectory model, which can determine the speed and trajectory of the colliding vehicles after the collision based on input parameters, which are the vehicle state data before the collision. The module determines the target traffic flow generation algorithm by embedding the collision trajectory model into a preset random traffic flow generation algorithm. The module generates a random traffic flow using the target traffic flow algorithm.
[0014] Optionally, the building module is also used to: determine the input and output variables of the target transfer function; determine the linear differential equation based on the relationship between the input and output variables; perform a Laplace transform on the linear differential equation to obtain the initial transfer function; and solve the initial transfer function using preset real traffic collision data to obtain the target transfer function, where the target transfer function is the collision trajectory model.
[0015] Optionally, the building module is also used to: build an initial neural network model; and train the initial neural network model using preset real traffic collision data to obtain a collision trajectory model.
[0016] Optionally, the determining module is also used to: determine the vehicle trajectory generation module in the preset random traffic flow generation algorithm; convert the collision trajectory model into a trajectory collision algorithm; integrate the trajectory collision algorithm into the vehicle trajectory generation module, and determine the target traffic flow generation algorithm.
[0017] Optionally, the random traffic flow generation system also includes an optimization module, which is used to: verify the effectiveness of the target traffic flow algorithm and obtain the verification result; and in response to the verification result showing that the effectiveness of the target traffic flow algorithm does not meet the preset requirements, iteratively optimize the target traffic flow algorithm.
[0018] According to a third aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the random traffic flow generation method described in any of the embodiments of the first aspect above.
[0019] According to a fourth aspect of the present invention, a non-volatile storage medium is also provided, wherein a computer program is stored in the non-volatile storage medium, wherein the computer program is configured to execute the random traffic flow generation method described in any embodiment of the first aspect when running on a computer or processor.
[0020] In this embodiment of the invention, a collision trajectory model is constructed. This model can determine the speed and trajectory of the colliding vehicles after a collision based on input parameters, which are vehicle state data before the collision. A preset random traffic flow generation algorithm is embedded into the collision trajectory model to determine a target traffic flow generation algorithm. The target traffic flow algorithm is then used to generate a random traffic flow. This application obtains the target traffic flow generation algorithm by embedding the collision trajectory model into the preset random traffic flow generation algorithm. The random traffic flow generated by the target traffic flow generation algorithm, which integrates the collision trajectory model, considers the impact of vehicle collisions on vehicle trajectories. The traffic flow simulation scenario constructed using the target traffic flow generation algorithm is more consistent with actual traffic flow conditions. This addresses the technical problem that vehicle collisions in simulated traffic flows often exhibit overlapping or crossing behavior, which does not conform to real traffic flow collision behavior and thus fails to simulate the microscopic interference caused by traffic accidents to simulated vehicles. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0022] Figure 1 is a flowchart of a random traffic flow generation method according to one embodiment of the present invention;
[0023] Figure 2 is a structural block diagram of a random traffic flow generation system according to one embodiment of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] According to an embodiment of the present invention, an embodiment of a random traffic flow generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system containing at least one set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This method embodiment can also be executed in an electronic device including a memory and a processor, a similar control device, or in the cloud. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device for communication functions and a display device. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the electronic device. For example, the electronic device may include more or fewer components than described above, or have a different configuration than described above.
[0028] A processor may include one or more processing units. For example, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processing unit (NPU), a tensor processing unit (TPU), or an artificial intelligence (AI) processor. Different processing units may be independent components or integrated into one or more processors. In some instances, electronic devices may also include one or more processors.
[0029] The memory can be used to store computer programs, such as the computer program corresponding to the random traffic flow generation method in this embodiment of the invention. The processor implements the random traffic flow generation method by running the computer program stored in the memory. The memory may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0030] The communication device is used to receive or send data via a network. Specific examples of the network mentioned above may include a wireless network provided by the mobile terminal's communication provider. In one example, the communication device includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the communication device may be a radio frequency (RF) module, used for wireless communication with the Internet. In some embodiments of this solution, the communication device is used to connect to mobile devices such as mobile phones and tablets, enabling the mobile device to send commands to the electronic device.
[0031] The display device can be a touchscreen liquid crystal display (LCD) or a touch display (also referred to as a "touchscreen" or "touch display screen"). The LCD allows a user to interact with the user interface of the electronic device. In some embodiments, the electronic device has a graphical user interface (GUI), which allows the user to interact with the GUI by touching a touch-sensitive surface with fingers and / or gestures. Executable instructions for performing these human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0032] Figure 1 is a flowchart of a random traffic flow generation method according to one embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
[0033] Step S101: Construct a collision trajectory model.
[0034] The collision trajectory model can determine the speed and trajectory of the colliding vehicles after a collision based on the input parameters, which are the vehicle state data before the collision.
[0035] For example, if vehicle A and vehicle B are to collide on a preset path, the vehicle state data of vehicle A before the collision and the vehicle state data of vehicle B before the collision are input into the collision trajectory model. The collision trajectory model can output the trajectory and speed of vehicle A after the collision and the trajectory and speed of vehicle B after the collision.
[0036] It is understandable that when multiple vehicles collide, the collision trajectory model can determine the trajectory and speed of each vehicle after the collision according to the order in which the collisions occur.
[0037] Step S102: Embed the collision trajectory model into a preset random traffic flow generation algorithm and determine the target traffic flow generation algorithm.
[0038] Specifically, in the traffic flow generated by the preset random traffic flow algorithm, if two vehicles are in the same position at the same time, their states are overlapping or one vehicle passes through the other. By embedding the collision trajectory model into the target traffic flow algorithm obtained from the preset random traffic flow algorithm, a collision event will occur if two vehicles are in the same position at the same time. Furthermore, based on the vehicle state data before the collision, the algorithm can predict the vehicle speed and trajectory after the collision.
[0039] Step S103: Generate random traffic flow using the target traffic flow algorithm.
[0040] Specifically, the target traffic flow algorithm for generating random traffic flow takes into account the collision problem between vehicles in the traffic flow. When two vehicles coincide at the same time, it no longer manifests as overlapping or passing through, but rather a collision event occurs between the two vehicles. At the same time, it can predict the trajectory and speed of the two vehicles after the collision.
[0041] Understandably, the traffic flow generated by the target traffic flow algorithm can represent collision situations, making the traffic flow more realistic.
[0042] In this embodiment of the invention, a collision trajectory model is constructed. This model can determine the speed and trajectory of the colliding vehicles after a collision based on input parameters, which are vehicle state data before the collision. A preset random traffic flow generation algorithm is embedded into the collision trajectory model to determine a target traffic flow generation algorithm. The target traffic flow algorithm is then used to generate a random traffic flow. This application obtains the target traffic flow generation algorithm by embedding the collision trajectory model into the preset random traffic flow generation algorithm. The random traffic flow generated by the target traffic flow generation algorithm, which integrates the collision trajectory model, considers the impact of vehicle collisions on vehicle trajectories. The traffic flow simulation scenario constructed using the target traffic flow generation algorithm is more consistent with actual traffic flow conditions. This addresses the technical problem that vehicle collisions in simulated traffic flows often exhibit overlapping or crossing behavior, which does not conform to real traffic flow collision behavior and thus fails to simulate the microscopic interference caused by traffic accidents to simulated vehicles.
[0043] Optionally, vehicle status data may include one or more of the following: vehicle mass, vehicle speed, relative speed, collision location, and collision angle.
[0044] Specifically, when one or more of the following factors are input into the collision trajectory model: vehicle mass, vehicle speed, relative speed, collision location, and collision angle, the collision trajectory model can predict the trajectory and speed of the vehicle after the collision.
[0045] It should be noted that the vehicle mass, vehicle speed, relative speed, collision position, and collision angle in the vehicle status data are all data before the collision. Specifically, relative speed refers to the relative speed between the two colliding vehicles; relative angle refers to the angle between the two colliding vehicles.
[0046] It should be noted that the above method also applies if a collision occurs between the vehicle and an obstacle.
[0047] Optionally, in step S101, constructing the collision trajectory model includes the following steps:
[0048] Step S1011: Determine the input and output variables of the target transfer function.
[0049] Specifically, before constructing the target transfer function, the input and output variables of the target function are first required. In the scenario of this invention, the input variable is the vehicle state data before the collision, and the output variable is the vehicle speed and vehicle trajectory after the collision.
[0050] Step S1012: Determine the linear differential equation based on the relationship between the input and output variables.
[0051] Specifically, in scenarios involving linear time invariance, the relationship between input and output variables can be represented by linear differential equations.
[0052] Step S1013: Perform a Laplace transform on the linear differential equation to obtain the initial transfer function.
[0053] Specifically, the Laplace transform can convert a linear differential equation into an algebraic equation, and the initial transfer function can be obtained by performing the Laplace transform on the linear differential equation.
[0054] Step S1014: Solve the initial transfer function using preset real traffic collision data to obtain the target transfer function, where the target transfer function is the collision trajectory model.
[0055] Specifically, after obtaining the initial transfer function, the target transfer function is obtained by solving the initial transfer function based on preset real traffic collision data. Algebraic operations, fractional expansion, and other methods can be used to solve the initial transfer function. Finally, the obtained target transfer function serves as the collision trajectory model.
[0056] Specifically, the target transfer function is expressed as:
[0057]
[0058] Where G(s) represents the transfer function, U(s) represents the Laplace transform of the input variable, and Y(s) represents the Laplace transform of the output variable.
[0059] It should be noted that the preset real traffic collision data includes vehicle mass, speed, relative speed at the time of collision, position, angle, vehicle speed after collision, and vehicle trajectory after collision.
[0060] Optionally, in step S101, constructing the collision trajectory model includes the following steps:
[0061] Step S101a: Construct the initial neural network model.
[0062] Step S101b: Train the initial neural network model using preset real traffic collision data to obtain the collision trajectory model.
[0063] Specifically, the collision trajectory model can also be a neural network-based model. When constructing a neural network-based collision trajectory model, an initial neural network model is first built according to the business requirements of the present invention. Then, the initial neural network is trained using preset real traffic collision data to obtain the collision trajectory model.
[0064] Optionally, in step S102, embedding the collision trajectory model into a preset random traffic flow generation algorithm and determining the target traffic flow generation algorithm may include the following steps:
[0065] Step S1021: Determine the vehicle trajectory generation module in the preset random traffic flow generation algorithm.
[0066] Specifically, the preset random traffic flow generation algorithm includes multiple modules that work together to generate the random traffic flow. Among them, the vehicle trajectory generation module is used to generate the vehicle trajectories of vehicles in the random traffic flow.
[0067] It should be noted that the above modules refer to logic modules.
[0068] Step S1022: Convert the collision trajectory model into a trajectory collision algorithm.
[0069] Specifically, the collision trajectory model is transformed into a trajectory collision algorithm that can be integrated into the vehicle trajectory generation module.
[0070] Step S1023: Integrate the trajectory collision algorithm into the vehicle trajectory generation module and determine the target traffic flow generation algorithm.
[0071] Specifically, by integrating the trajectory collision algorithm into the vehicle trajectory generation module, the target traffic flow generation algorithm can be obtained, which takes into account vehicle collision scenarios.
[0072] For example, in some embodiments of the present invention, embedding a collision trajectory model into a preset random traffic flow generation algorithm and determining the target traffic flow generation algorithm includes: first, packaging the trajectory collision model into a library file and releasing the external API (Application Programming Interface); then, finding the logic module corresponding to the vehicle collision or passage in the preset random traffic flow generation algorithm, calling the aforementioned generated library file at the found logic module, and passing the data before the vehicle collision through the API interface, thus obtaining the target traffic flow generation algorithm.
[0073] Understandably, the random traffic flow generated using the target traffic flow generation algorithm takes into account the trajectory changes after vehicle collisions. After a collision, vehicles will move along trajectories consistent with real traffic accidents and stop at the end of the trajectory. At the same time, the rendering time of the colliding vehicle is increased, and the colliding vehicle will affect the behavior of other vehicles in the traffic flow, thus influencing the macroscopic traffic flow from the microscopic traffic flow and improving the consistency between the simulation scene and the real-world traffic flow.
[0074] Optionally, the preset random traffic flow generation algorithm is one of the following: random distribution method, equal probability method, Monte Carlo method.
[0075] Specifically, the random distribution method generates traffic flow by randomly selecting start and end points in the road network according to a preset probability distribution. The equal probability method generates traffic flow by selecting start and end points in the road network with equal probability. The Monte Carlo method generates traffic flow by randomly sampling start and end points in the road network, and different sampling times can be set as needed to increase the diversity of the generated traffic flow.
[0076] Optionally, the preset random traffic flow generation algorithm may also include other known random traffic flow generation algorithms.
[0077] Optionally, random traffic flow generation methods also include:
[0078] Step S104: Verify the effectiveness of the target traffic flow algorithm and obtain the verification results.
[0079] Specifically, the effectiveness of the target traffic flow algorithm is verified by executing the target traffic flow algorithm once and comparing its output with the preset requirements.
[0080] Step S105: In response to the verification results showing that the effectiveness of the target traffic flow algorithm does not meet the preset requirements, the target traffic flow algorithm is iteratively optimized.
[0081] Specifically, if the output of the target traffic flow algorithm does not meet the preset requirements, meaning the validity verification of the target traffic flow algorithm fails, iterative optimization of the target traffic flow algorithm is required. If the output of the target traffic flow algorithm meets the preset requirements, no further processing is performed on the target traffic flow algorithm. Specifically, the iterative optimization process of the target traffic flow algorithm includes adjusting the parameters of the target traffic flow algorithm.
[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0083] This embodiment also provides a random traffic flow generation system for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" refers to a combination of software and / or hardware capable of performing a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0084] Figure 2 is a structural block diagram of a random traffic flow generation system 200 according to one embodiment of the present invention. As shown in Figure 2, the random traffic flow generation system 200 is used as an example, including: a construction module 201, used to construct a collision trajectory model, wherein the collision trajectory model can determine the speed and trajectory of the colliding vehicles after a collision based on input parameters, the input parameters being vehicle state data before the collision; a determination module 202, used to embed the collision trajectory model into a preset random traffic flow generation algorithm to determine a target traffic flow generation algorithm; and a generation module 203, used to generate random traffic flow using the target traffic flow algorithm.
[0085] Optionally, the construction module 201 is also used to: determine the input and output variables of the target transfer function; determine the linear differential equation based on the relationship between the input and output variables; perform a Laplace transform on the linear differential equation to obtain the initial transfer function; and solve the initial transfer function using preset real traffic collision data to obtain the target transfer function, wherein the target transfer function is the collision trajectory model.
[0086] Optionally, the building module 201 is also used to: build an initial neural network model; and train the initial neural network model using preset real traffic collision data to obtain a collision trajectory model.
[0087] Optionally, the determining module 202 is also used to: determine the vehicle trajectory generation module in the preset random traffic flow generation algorithm; convert the collision trajectory model into a trajectory collision algorithm; integrate the trajectory collision algorithm into the vehicle trajectory generation module, and determine the target traffic flow generation algorithm.
[0088] Optionally, the random traffic flow generation system 200 also includes an optimization module connected to the generation module 203 (not shown in the figure). The optimization module is used to: verify the effectiveness of the target traffic flow algorithm and obtain the verification result; and in response to the verification result indicating that the effectiveness of the target traffic flow algorithm does not meet the preset requirements, to iteratively optimize the target traffic flow algorithm.
[0089] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the random traffic flow generation method described in any of the above embodiments.
[0090] Optionally, in this embodiment, the processor in the above-described electronic device may be configured to run a computer program to perform the following steps:
[0091] Step S101: Construct a collision trajectory model.
[0092] Step S102: Embed the collision trajectory model into a preset random traffic flow generation algorithm and determine the target traffic flow generation algorithm.
[0093] Step S103: Generate random traffic flow using the target traffic flow algorithm.
[0094] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0095] Embodiments of the present invention also provide a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the random traffic flow generation method described in any of the above embodiments when run on a computer or processor.
[0096] Optionally, in this embodiment, the computer program described above may be configured to store a computer program for performing the following steps:
[0097] Step S101: Construct a collision trajectory model.
[0098] Step S102: Embed the collision trajectory model into a preset random traffic flow generation algorithm and determine the target traffic flow generation algorithm.
[0099] Step S103: Generate random traffic flow using the target traffic flow algorithm.
[0100] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0101] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0102] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through interfaces, or indirect couplings or communication connections between modules, and may be electrical or other forms.
[0103] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0104] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0105] If the integrated module is implemented as a software functional module and sold or used as an independent product, it 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 all or part of the 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0106] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating random traffic flow, characterized in that, include: A collision trajectory model is constructed, wherein the collision trajectory model can determine the collision vehicle speed and trajectory after a collision based on input parameters. The input parameters are vehicle state data before the collision, including vehicle mass, vehicle speed, relative speed, collision position, and collision angle. The construction of the collision trajectory model includes: determining the input and output variables of a target transfer function; determining a linear differential equation based on the relationship between the input and output variables; performing a Laplace transform on the linear differential equation to obtain an initial transfer function; solving the initial transfer function using preset real traffic collision data to obtain the target transfer function, wherein the target transfer function is the collision trajectory model; determining a vehicle trajectory generation module in a preset random traffic flow generation algorithm; converting the collision trajectory model into a trajectory collision algorithm; integrating the trajectory collision algorithm into the vehicle trajectory generation module to determine a target traffic flow generation algorithm; and generating random traffic flow using the target traffic flow generation algorithm. The method further includes: validating the target traffic flow generation algorithm to obtain a validation result; and iteratively optimizing the target traffic flow generation algorithm in response to the validation result indicating that the validity of the target traffic flow generation algorithm does not meet preset requirements.
2. The random traffic flow generation method according to claim 1, characterized in that, The preset random traffic flow generation algorithm is one of the following: random distribution method, equal probability method, Monte Carlo method.
3. A random traffic flow generation system, characterized in that, include: A construction module is used to construct a collision trajectory model. This model can determine the speed and trajectory of the colliding vehicles after a collision based on input parameters. The input parameters are vehicle state data before the collision, including vehicle mass, vehicle speed, relative speed, collision position, and collision angle. The construction module is also used to: determine the input and output variables of a target transfer function; determine a linear differential equation based on the relationship between the input and output variables; perform a Laplace transform on the linear differential equation to obtain an initial transfer function; and solve the initial transfer function using preset real traffic collision data to obtain the target transfer function. The system includes a target transfer function, which is the collision trajectory model; a determination module, used to determine the vehicle trajectory generation module in a preset random traffic flow generation algorithm; converting the collision trajectory model into a trajectory collision algorithm; integrating the trajectory collision algorithm into the vehicle trajectory generation module to determine the target traffic flow generation algorithm; a generation module, used to generate random traffic flow using the target traffic flow generation algorithm; the system is further used to verify the effectiveness of the target traffic flow generation algorithm and obtain a verification result; in response to the verification result indicating that the effectiveness of the target traffic flow generation algorithm does not meet the preset requirements, iteratively optimizing the target traffic flow generation algorithm.
4. An electronic device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the random traffic flow generation method as described in any one of claims 1 to 2.
5. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, wherein the computer program is configured to execute the random traffic flow generation method as described in any one of claims 1 to 2 when run on a computer or processor.
Citation Information
Patent Citations
Traffic simulation model construction method and device and storage medium
CN115906367A
Crash simulation system
KR1020180015016A