Method and device for automatically generating 3D video for historical restoration of highway traffic events

Through 3D digital twin technology, the highway traffic operation status is simulated, the mapping relationship between event factors and traffic flow is constructed, and the 3D historical restoration and comparison verification of highway traffic events is realized, the lengthy and unscientific problems of the traffic event handling process is solved, and the efficiency and scientific nature of event handling is improved.

CN118887803BActive Publication Date: 2025-04-29NINGXIA TRAFFIC EXPRESSWAY MANAGEMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410925436.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-04-29
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

In highway operations, the causes of traffic events are unclear, the handling process is lengthy, and it is difficult to achieve rapid and effective resolution, affecting traffic fluency and safety. The existing technology lacks effective tools and technologies, making it difficult to conduct in-depth analysis and optimize the handling process.

Method used

3D digital twin technology is used to simulate the traffic operation state, generate real-world traffic flow data, build the mapping relationship between factors such as environment and emergencies and traffic flow, and realize 3D restoration comparison verification of historical events through the automatic generation method of highway traffic event history restoration 3D video.

Benefits of technology

It realizes the global reproduction and optimization analysis of traffic events, can predict and deduce traffic events, provide evaluation and optimization solutions, and improves the scientificity and efficiency of event handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887803B_ABST
    Figure CN118887803B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for automatically generating 3D videos for restoring the history of highway traffic events. The method includes: obtaining static information of highway roads, constructing a static 3D model of the road based on the static information of the road; generating a 3D image of a vehicle through a three-dimensional database and 3D modeling technology; obtaining a vehicle driving trajectory according to the results of target detection and tracking, optimizing a car following model, a straight-moving model and a turning model according to the vehicle driving trajectory; analyzing the causes of vehicle accidents and the road congestion caused by the accidents based on the vehicle behavior pattern and the road factors that cause the accidents detected by the target detection model, extracting the causes of the accidents, calculating the accident process according to the influencing factors; superimposing the vehicle 3D image with the static 3D image of the road that has been modeled in advance to generate a 3D simulation video. The present invention can truly restore the scene of a traffic event and realize global reproduction optimization of traffic events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic management, and in particular relates to a method and device for automatically generating a 3D video for restoring the history of highway traffic events. Background Art

[0002] In highway operations, traffic incidents are often accompanied by complex situations, such as unclear causes and lengthy handling processes. These problems seriously hinder the rapid and effective resolution of incidents and pose a threat to traffic flow and safety. Traditional event recording methods, such as video surveillance and post-event reporting, often fail to fully and accurately capture the full picture of the incident, especially in terms of event cause analysis and handling strategy optimization. Currently, when dealing with highway traffic incidents, due to the lack of effective tools and technologies, it is difficult to conduct in-depth analysis of some complex traffic incidents, especially those with unknown causes, resulting in the inability to accurately formulate subsequent preventive measures. The existing event handling process is often based on empirical judgment and lacks scientific simulation and verification, making the optimization of the handling process a difficult problem, especially when dealing with emergencies, which is prone to resource waste and inefficiency. In addition, there is a lack of effective means to conduct in-depth comparison and analysis of historical events, which limits the ability to learn and improve from past events.

[0003] Therefore, how to combine 3D digital twin technology to simulate traffic operation status, form real-world traffic flow data, construct a mapping relationship between various factors such as environment and emergencies and traffic flow, and realize 3D restoration and comparative verification of historical events is one of the technical problems that technical personnel in this field need to solve urgently. Summary of the invention

[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide a method and device for automatically generating 3D videos of historical restoration of highway traffic events, combining 3D digital twin technology to simulate traffic operation status, form real-world traffic flow data, construct a mapping relationship between various factors such as environment and emergencies and traffic flow, and realize 3D restoration comparison and verification of historical events.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] In a first aspect, the present invention provides a method for automatically generating a 3D video of highway traffic event history restoration, comprising the following steps:

[0007] Obtaining highway static information, and constructing a static 3D model of the highway based on the static information; the static information includes road surface information and road facility equipment information;

[0008] Use the 2D and 3D space models of the vehicle detected by the target detection model to define and graphically display the vehicle's spatial dimensions, and generate a 3D image of the vehicle through a 3D database and 3D modeling technology;

[0009] According to the results of target detection and tracking, a vehicle driving trajectory is obtained, a vehicle following model, a straight-moving model and a turning model are optimized according to the vehicle driving trajectory, and a vehicle behavior model is obtained based on the optimized vehicle following model, straight-moving model and turning model;

[0010] Based on the vehicle behavior pattern and the road factors that cause accidents detected by the target detection model, the causes of vehicle accidents and the road congestion caused are analyzed, the causes of accidents are extracted, and the accident process is calculated according to the influencing factors;

[0011] The vehicle 3D image is superimposed on the pre-modeled static 3D model of the road to generate a 3D simulation video.

[0012] As a preferred technical solution, the construction of the road static 3D model based on the road static information is specifically as follows:

[0013] Create a rectangular dot matrix for the collected road static information, obtain multiple rectangular dot matrices, and calculate the depth value of each rectangular dot matrix;

[0014] The depth information is acquired based on the preset digital twin software, and the ratio of the real depth to the depth value of the pixel points in the rectangular dot matrix is ​​restored by adjusting the magnification factor, and matched with the coordinates of the created rectangular dot matrix to form a dot matrix nested list with complete three-dimensional coordinate data;

[0015] According to the plane projection of the road facilities and equipment on the road surface, the contour vertices are obtained and merged with the rectangular dot matrix; the road facilities and equipment include equipment and traffic lights;

[0016] According to the obtained contour vertices, the minimum triangle rule is used to perform surface fitting on all rectangular lattices to complete the construction of the static 3D model of the road.

[0017] As a preferred technical solution, the depth value of the rectangular dot matrix is ​​calculated as follows:

[0018]

[0019] Among them, i and j are the positions of the original image pixels, i.e., the horizontal and vertical coordinate values, respectively; X and Y are the width and height of the image; the number of horizontal dot matrix is ​​x; A is the scale factor; m is the number of horizontal pixels per unit dot matrix; n is the number of vertical pixels per unit dot matrix; d ij The depth value of each pixel, D ij The depth value of each dot.

[0020] As a preferred technical solution, the vehicle information is obtained in the following manner:

[0021] The detected vehicle information is saved as a data dictionary required for three-dimensional modeling, and a 3D image of the vehicle is generated through a three-dimensional database and 3D modeling technology; the digital dictionary includes the vehicle's equipment information and vehicle color information;

[0022] Create a vehicle information dictionary and a Unity3D;

[0023] Importing the vehicle position change information and speed into the vehicle information dictionary; the vehicle position information includes the original position information of the vehicle and the changed position information of the vehicle;

[0024] Extract the vehicle 3D image and import it into Unity3D;

[0025] Read the current vehicle information status from the vehicle information dictionary, adjust the vehicle and vehicle motion status and import them into Unity3D. As a preferred technical solution, the vehicle behavior modeling is specifically as follows:

[0026] M VB =(M VF ,M VS ,M VT )

[0027] Where: M VF is the vehicle following model, M VS is the vehicle moving straight model, M VT For the vehicle turning model, the collected data is preprocessed and integrated through real-time data including real-time climate data, video surveillance, and multi-source sensor data of radar data, and in-depth analysis is performed to extract key data features. The key data features include climate change trends, specific events in video surveillance, and target movement trajectories scanned by radar. Machine learning and deep learning algorithms are used to perform pattern recognition, classification, and predictive processing on the data, extract data features, and map the data features to the corresponding elements or phenomena in the virtual scene. According to the changes in real-time data, the road conditions and vehicle motion trajectories of the 3D simulation scene are dynamically adjusted.

[0028] As a preferred technical solution, the road factors causing the accident detected by the target detection model are combined to analyze the cause of the vehicle accident and the road congestion caused, extract the cause of the accident, and calculate the accident process according to the influencing factors:

[0029] The cause analysis of the accident is to use the target detection model to detect the vehicle speed, spilled objects, fireworks, and road surface water factors, associate the time and location of these factors with the vehicle's motion state, calculate the influencing factors, and thus extract the cause of the vehicle accident. The calculation method FA of the influencing factors is:

[0030] FA=a(T v -T f )+bD

[0031] Where a and b are the weight coefficients of the time and distance factors, T v is the time of the accident, T f is the time when the factor occurs, and D is the distance between the accident vehicle location and the location where the factor occurs.

[0032] As a preferred technical solution, the 3D image of the vehicle is superimposed on the static 3D model of the road that has been modeled in advance, specifically:

[0033] First, coordinate system alignment is performed to define a unified coordinate system to ensure that the 3D image of the vehicle and the image in the static 3D model of the road have the correct position and orientation in this coordinate system;

[0034] Then use texture mapping technology to map the vehicle's texture onto the road to achieve an overlay effect.

[0035] In a second aspect, the present invention provides a system for automatically generating 3D videos of highway traffic incident history restoration, which is applied to the above-mentioned method for automatically generating 3D videos of highway traffic incident history restoration, and includes a road static model building module, a vehicle information extraction module, a vehicle behavior modeling module, an accident cause analysis module and a simulation video generation module;

[0036] The road static model building module is used to obtain highway road static information and build a road static 3D model based on the road static information; the road static information includes road surface information, equipment information and traffic light information;

[0037] The vehicle information extraction module is used to define and graphically display the spatial dimensions of the vehicle using the 2D and 3D space models of the vehicle detected by the target detection model, and to generate a 3D image of the vehicle through a 3D database and 3D modeling technology;

[0038] The vehicle behavior modeling module is used to obtain a vehicle driving trajectory according to the target detection and tracking results, optimize the vehicle following model, the straight-moving model and the turning model according to the vehicle driving trajectory, and obtain a vehicle behavior model based on the optimized vehicle following model, the straight-moving model and the turning model;

[0039] The accident cause analysis module is used to analyze the cause of the vehicle accident and the road congestion caused by the accident based on the vehicle behavior pattern and the road factors that cause the accident detected by the target detection model, extract the cause of the accident, and calculate the accident process according to the influencing factors;

[0040] The simulation video generation module is used to superimpose the vehicle 3D image with the pre-modeled static 3D image of the road to generate a 3D simulation video.

[0041] In a third aspect, the present invention provides an electronic device, the electronic device comprising:

[0042] at least one processor; and,

[0043] a memory communicatively connected to the at least one processor; wherein,

[0044] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for automatically generating 3D videos for restoring the history of highway traffic events.

[0045] In a fourth aspect, the present invention provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the method for automatically generating 3D videos for restoring the history of highway traffic events.

[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0047] The present invention uses BIM+GIS digital twin technology to perform 3D road modeling based on the collected radar data, video data, equipment information, traffic lights, etc. At the same time, based on the detected elements of the traffic incident (accident vehicles, accident personnel, accident causes, fire, collision, etc.), the cause of the incident, the main handling process, traffic conditions, etc. are extracted for 3D modeling, and superimposed on the road model to automatically generate a 3D video of traffic event history restoration. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 This is a flow chart of a method for automatically generating 3D videos for restoring highway traffic event history according to an embodiment of the present invention;

[0050] Figure 2 The block diagram of the system for automatically generating 3D videos for restoring highway traffic event history according to an embodiment of the present invention.

[0051] Figure 3 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0053] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0054] like Figure 1 As shown, this embodiment provides a method for automatically generating a 3D video of highway traffic event history restoration, including the following steps:

[0055] S1. Construction of static 3D road model;

[0056] It can be understood that step S1 is to collect highway pavement information, road facilities and equipment information (including non-traffic light equipment information and traffic lights), etc. using unity3D, and map the traffic data such as facilities and equipment in the tunnel and pavement to generate a 3D image in advance.

[0057] Furthermore, step S1 is specifically as follows:

[0058] S11. Use the collected data to perform static road modeling based on the depth image. First, create a rectangular dot matrix: select a certain number of dot matrices and set the number of horizontal dot matrices to x:

[0059]

[0060] Among them, i and j are the positions of the original image pixels, i.e., the horizontal and vertical coordinate values, respectively; X and Y are the width and height of the image; the number of horizontal dot matrix is ​​x; A is the scale factor; m is the number of horizontal pixels per unit dot matrix; n is the number of vertical pixels per unit dot matrix; d ijThe depth value of each pixel, D ij The depth value of each dot.

[0061] S12. Depth information acquisition: Depth information acquisition is completed based on the preset digital twin software, and the magnification factor is adjusted to restore the ratio of the real depth to the depth value of the pixel point in the rectangular dot matrix, and matched with the coordinates of the created rectangular dot matrix to form a dot matrix nested list with complete three-dimensional coordinate data.

[0062] S13. Road static contour creation: According to the plane projection of road facilities and equipment on the road surface, contour vertices are obtained and merged with the rectangular dot matrix.

[0063] It can be understood that the road facilities and equipment include traffic lights, street lights, protective fences, etc. on the road.

[0064] S14. Curve fitting completes the construction of the static road model: Based on the obtained contour vertices, the minimum triangle rule is used to perform surface fitting on all rectangular lattices to complete the construction of the static 3D road model.

[0065] S2, extracting vehicle information;

[0066] Furthermore, step S2 is specifically as follows:

[0067] S21. Define and graphically display the spatial dimensions of the vehicle using the 2D and 3D space models detected by the target detection model. Save the detected vehicle information (including the vehicle's geometric length, width, height, axle position, connecting rod length, body color, etc.) as a data dictionary required for 3D modeling, and generate a 3D image of the vehicle through a 3D database and 3D modeling technology;

[0068] S22. Create a vehicle information dictionary and a Unity3D dictionary;

[0069] S23, importing the vehicle position change information and speed into the vehicle information dictionary; the vehicle position information includes the original position information of the vehicle and the changed position information of the vehicle;

[0070] S24, extract the vehicle and import it into Unity3D;

[0071] S25. Read the current vehicle information status from the vehicle information dictionary, adjust the vehicle and vehicle motion status, and import them into Unity3D.

[0072] S3, mathematical modeling of vehicle behavior;

[0073] According to the results of target detection and tracking, the vehicle trajectory is obtained, and the vehicle following model, straight-moving and turning models are optimized according to the trajectory. If M is a digital twin model, the vehicle behavior (VB) model is:

[0074] M VB =(M VF ,M VS ,M VT )

[0075] Where: M VF is the vehicle following (VF) model, M VS is the vehicle straight-through (VS) model, M VT For the vehicle turning (VT) model, real-time data including real-time climate data, video surveillance, radar data and other multi-source sensor data are used to pre-process and integrate the collected data, conduct in-depth analysis, and extract key data features, such as climate change trends, specific events in video surveillance, and target movement trajectories scanned by radar. Machine learning, deep learning and other algorithms are used to perform pattern recognition, classification, and prediction on the data, extract data features, and map them to the corresponding elements or phenomena in the virtual scene, such as mapping real-time climate data to weather changes in the virtual scene, and mapping radar data to target movement in the 3D simulation scene. According to the changes in real-time data, the road conditions and vehicle movement trajectories of the 3D simulation scene are dynamically adjusted.

[0076] S4, accident cause extraction;

[0077] Based on the vehicle behavior patterns obtained, combined with the road factors that cause accidents such as road waterlogging, spilled objects, speeding, overtaking, fireworks, construction, and illegal pedestrians detected by the target detection model, the causes of vehicle accidents and the resulting road congestion are analyzed, the causes of the accidents are extracted, and the accident process is calculated based on the influencing factors.

[0078] E if =ω r E r +ω l E l +ω t E t

[0079] Where E if is the total environmental impact factor, E r is the rainfall factor, E l is the light intensity factor, E ris the road target factor, and the corresponding weights ω of the other items can be appropriately modified according to the situation when the accident occurs.

[0080] Furthermore, the cause analysis of the accident uses the previous target detection model to detect the vehicle's speed, spilled objects, fireworks, road water, etc., and associates the time and location of these factors with the vehicle's motion state to calculate the influencing factors, thereby extracting the cause of the vehicle accident. The calculation method FA for influencing factors is:

[0081] FA=a(T v -T f )+bD

[0082] Where a and b are the weight coefficients of the time and distance factors, T v is the time of the accident, T f is the time when the factor occurs, and D is the distance between the accident vehicle location and the location where the factor occurs.

[0083] S5, construction and integration of various elements of the model;

[0084] The vehicle 3D image is superimposed on the static 3D image of the road that has been modeled in advance to generate a 3D simulation video.

[0085] Furthermore, the 3D image of the vehicle is superimposed with the static 3D image of the road modeled in advance, specifically:

[0086] S51, firstly align the coordinate system and define a unified coordinate system to ensure that the 3D image of the vehicle and the image in the static 3D model of the road have correct positions and directions in this coordinate system;

[0087] S52, then use texture mapping technology to map the texture of the vehicle onto the road to achieve a superimposed effect.

[0088] Based on the above technical solution, the present invention can realize global reproduction optimization of traffic events, analyze environmental and traffic flow data to predict and deduce, and provide evaluation and optimization solutions for traffic events.

[0089] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.

[0090] Based on the same idea as the method for automatically generating 3D videos of highway traffic event history restoration in the above-mentioned embodiment, the present invention also provides a system for automatically generating 3D videos of highway traffic event history restoration, which can be used to execute the above-mentioned method for automatically generating 3D videos of highway traffic event history restoration. For ease of explanation, the structural schematic diagram of the embodiment of the system for automatically generating 3D videos of highway traffic event history restoration only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than the illustrated structure, or combine certain components, or arrange the components differently.

[0091] See also Figure 2 In another embodiment of the present application, a highway traffic event history restoration 3D video automatic generation system 100 is provided, the system comprising a road static model building module 101, a vehicle information extraction module 102, a vehicle behavior modeling module 103, an accident cause analysis module 104 and a simulation video generation module 105;

[0092] The road static model building module 101 is used to obtain highway road static information and build a road static 3D model based on the road static information; the road static information includes road surface information, equipment information and traffic light information;

[0093] The vehicle information extraction module 102 is used to define and graphically display the spatial dimensions of the vehicle using the 2D and 3D space models of the vehicle detected by the target detection model, and to generate a 3D image of the vehicle through a 3D database and 3D modeling technology;

[0094] The vehicle behavior modeling module 103 is used to obtain a vehicle driving trajectory according to the target detection and tracking results, optimize the vehicle following model, the straight-moving model and the turning model according to the vehicle driving trajectory, and obtain a vehicle behavior model based on the optimized vehicle following model, the straight-moving model and the turning model;

[0095] The accident cause analysis module 104 is used to analyze the cause of the vehicle accident and the road congestion caused by the accident based on the vehicle behavior pattern and the road factors causing the accident detected by the target detection model, extract the cause of the accident, and calculate the accident process according to the influencing factors;

[0096] The simulation video generation module 105 is used to superimpose the vehicle 3D image with the pre-modeled static 3D image of the road to generate a 3D simulation video.

[0097] It should be noted that the system for automatically generating 3D videos for restoring the history of highway traffic events of the present invention corresponds one-to-one to the method for automatically generating 3D videos for restoring the history of highway traffic events of the present invention. The technical features and beneficial effects described in the embodiment of the method for automatically generating 3D videos for restoring the history of highway traffic events are all applicable to the embodiment of automatically generating 3D videos for restoring the history of highway traffic events. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. This is hereby declared.

[0098] In addition, in the implementation of the system for automatically generating 3D videos for restoring the history of highway traffic events in the above-mentioned embodiment, the logical division of each program module is only an example. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the system for automatically generating 3D videos for restoring the history of highway traffic events is divided into different program modules to complete all or part of the functions described above.

[0099] See also Figure 3 In one embodiment, an electronic device that implements a method for automatically generating 3D videos for restoring the history of highway traffic events is provided. The electronic device 200 may include a first processor 201, a first memory 202, and a bus. It may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a program 203 for automatically generating 3D videos for restoring the history of highway traffic events.

[0100] Among them, the first memory 202 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as a mobile hard disk of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 200. Further, the first memory 202 can also include both an internal storage unit of the electronic device 200 and an external storage device. The first memory 202 can not only be used to store application software and various types of data installed in the electronic device 200, such as the code of the highway traffic event history restoration 3D video automatic generation program 203, but also can be used to temporarily store data that has been output or is to be output.

[0101] In some embodiments, the first processor 201 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The first processor 201 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 200 by running or executing programs or modules stored in the first memory 202, and calling data stored in the first memory 202.

[0102] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 200 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0103] The program 203 for automatically generating 3D videos for restoring the history of highway traffic events stored in the first memory 202 of the electronic device 200 is a combination of multiple instructions. When executed in the first processor 201, the following can be achieved:

[0104] Obtaining highway static information, and constructing a static 3D model of the highway based on the static information; the static information includes road surface information, equipment information, and traffic light information;

[0105] Use the 2D and 3D space models of the vehicle detected by the target detection model to define and graphically display the vehicle's spatial dimensions, and generate a 3D image of the vehicle through a 3D database and 3D modeling technology;

[0106] According to the results of target detection and tracking, a vehicle driving trajectory is obtained, a vehicle following model, a straight-moving model and a turning model are optimized according to the vehicle driving trajectory, and a vehicle behavior model is obtained based on the optimized vehicle following model, straight-moving model and turning model;

[0107] Based on the vehicle behavior pattern and the road factors that cause accidents detected by the target detection model, the causes of vehicle accidents and the road congestion caused are analyzed, the causes of accidents are extracted, and the accident process is calculated according to the influencing factors;

[0108] The vehicle 3D image is superimposed with the static 3D image of the road modeled in advance to generate a 3D simulation video.

[0109] Furthermore, if the module / unit integrated in the electronic device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0112] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A method for automatically generating 3D videos of highway traffic event history restoration, characterized in that: The steps include: Obtaining highway static information, and constructing a static 3D model of the road based on the static information; the static information of the road includes road surface information and road facility equipment information; constructing a static 3D model of the road based on the static information of the road is specifically as follows: Create a rectangular dot matrix for the collected road static information, obtain multiple rectangular dot matrices, and calculate the depth value of each rectangular dot matrix; The depth information is acquired based on the preset digital twin software, and the ratio of the real depth to the depth value of the pixel points in the rectangular dot matrix is ​​restored by adjusting the magnification factor, and matched with the coordinates of the created rectangular dot matrix to form a dot matrix nested list with complete three-dimensional coordinate data; According to the plane projection of the road facilities and equipment on the road surface, the contour vertices are obtained and merged with the rectangular dot matrix; the road facilities and equipment include traffic lights, street lights and protective fences on the road; According to the obtained contour vertices, the minimum triangle rule is used to perform surface fitting on all rectangular lattices to complete the construction of the static 3D model of the road; Use the 2D and 3D space models of the vehicle detected by the target detection model to define and graphically display the vehicle's spatial dimensions, and generate a 3D image of the vehicle through a 3D database and 3D modeling technology; According to the results of target detection and tracking, a vehicle driving trajectory is obtained, a vehicle following model, a straight-moving model and a turning model are optimized according to the vehicle driving trajectory, and a vehicle behavior model is obtained based on the optimized vehicle following model, straight-moving model and turning model; Based on the vehicle behavior pattern and the road factors that cause accidents detected by the target detection model, the causes of vehicle accidents and the resulting road congestion are analyzed, the causes of accidents are extracted, and the process of the accident is calculated based on the influencing factors; The vehicle 3D image is superimposed on the pre-modeled static 3D model of the road to generate a 3D simulation video.

2. The method for automatically generating 3D video of highway traffic event history restoration according to claim 1 is characterized in that: The depth value of the rectangular lattice is calculated as follows: Among them, i and j are the positions of the original image pixels, i.e., the horizontal and vertical coordinate values, respectively; X and Y are the width and height of the image; the number of horizontal dot matrix is ​​x; A is the scale factor; m is the number of horizontal pixels per unit dot matrix; n is the number of vertical pixels per unit dot matrix; d ij The depth value of each pixel, D ij The depth value of each dot.

3. The method for automatically generating 3D video of highway traffic event history restoration according to claim 1 is characterized in that: The vehicle information is extracted by: The detected vehicle information is saved as a data dictionary required for three-dimensional modeling, and a 3D image of the vehicle is generated through a three-dimensional database and 3D modeling technology; the data dictionary includes the vehicle's equipment information and vehicle color information; Create a vehicle information dictionary and a Unity3D; Importing the vehicle position change information and speed into the vehicle information dictionary; the vehicle position change information includes the original position information of the vehicle and the changed position information of the vehicle; Extract the vehicle 3D image and import it into Unity3D; Read the current vehicle information status from the vehicle information dictionary, adjust the vehicle and vehicle motion status and import them into Unity3D.

4. The method for automatically generating 3D video of highway traffic event history restoration according to claim 1 is characterized in that: The vehicle behavior modeling is specifically as follows: M VB =(M VF ,M VS ,M VT ) Where: M VF is the vehicle following model, M VS is the vehicle moving straight model, M VT For the vehicle turning model, the collected data is preprocessed and integrated through real-time data including real-time climate data, video surveillance, and multi-source sensor data of radar data, and in-depth analysis is performed to extract key data features. The key data features include climate change trends, specific events in video surveillance, and target movement trajectories scanned by radar. Machine learning and deep learning algorithms are used to perform pattern recognition, classification, and predictive processing on the data, extract data features, and map the data features to the corresponding elements or phenomena in the virtual scene. According to the changes in real-time data, the road conditions and vehicle motion trajectories of the 3D simulation scene are dynamically adjusted.

5. The method for automatically generating 3D video of highway traffic event history restoration according to claim 1 is characterized in that: The road factors causing the accident detected by the target detection model are combined to analyze the cause of the vehicle accident and the road congestion caused, extract the cause of the accident, and calculate the accident process according to the influencing factors: The cause analysis of the accident is to use the target detection model to detect the vehicle speed, spilled objects, fireworks, and road surface water factors, associate the time and location of these factors with the vehicle's motion state, calculate the influencing factors, and thus extract the cause of the vehicle accident. The calculation method FA of the influencing factors is: FA=a(T v -T f )+bD Where a and b are the weight coefficients of the time and distance factors, T v is the time of the accident, T f is the time when the factor occurs, and D is the distance between the accident vehicle location and the location where the factor occurs.

6. The method for automatically generating 3D video of highway traffic event history restoration according to claim 1 is characterized in that: The 3D image of the vehicle is superimposed on the static 3D model of the road that has been modeled in advance, specifically: First, coordinate system alignment is performed to define a unified coordinate system to ensure that the 3D image of the vehicle and the image in the static 3D model of the road have the correct position and orientation in this coordinate system; Then use texture mapping technology to map the vehicle's texture onto the road to achieve an overlay effect.

7. A system for automatically generating 3D videos of highway traffic incident history restoration, characterized in that: A method for automatically generating 3D videos for restoring the history of highway traffic events applied to any one of claims 1-6, comprising a road static model building module, a vehicle information extraction module, a vehicle behavior modeling module, an accident cause analysis module and a simulation video generation module; The road static model building module is used to obtain highway road static information and build a road static 3D model based on the road static information; the road static information includes road surface information, equipment information and traffic light information; The vehicle information extraction module is used to define and graphically display the spatial dimensions of the vehicle using the 2D and 3D space models of the vehicle detected by the target detection model, and to generate a 3D image of the vehicle through a 3D database and 3D modeling technology; The vehicle behavior modeling module is used to obtain a vehicle driving trajectory according to the results of target detection and tracking, optimize a vehicle following model, a straight-moving model and a turning model according to the vehicle driving trajectory, and obtain a vehicle behavior model based on the optimized vehicle following model, straight-moving model and turning model; The accident cause analysis module is used to analyze the cause of the vehicle accident and the road congestion caused by the accident based on the vehicle behavior pattern and the road factors that cause the accident detected by the target detection model, extract the cause of the accident, and calculate the accident process according to the influencing factors; The simulation video generation module is used to superimpose the vehicle 3D image with the pre-modeled static 3D image of the road to generate a 3D simulation video.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for automatically generating 3D video for restoring the history of highway traffic events as described in any one of claims 1-6.

9. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the method for automatically generating 3D video for restoring the history of highway traffic events as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Congestion simulation method and system based on real road scene

    CN113033030A

  • Digital twin intersection construction method and system based on vehicle identification and track mapping

    CN116883610A