A traffic accident prediction analysis method and device
By calculating the real-time vehicle count and density change rate of traffic checkpoint data, abnormal signals are generated to automatically warn of traffic accidents. This solves the timeliness and integration problems of existing methods, realizes automated traffic accident prediction and early warning, and improves traffic management efficiency and safety.
Patent Information
- Application Number
- CN202611259617.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-27
AI Technical Summary
Existing traffic accident analysis methods rely on manual reporting, which is not timely; video surveillance has blind spots; third-party data cannot be effectively integrated; and vehicle networking devices are not yet widespread, resulting in traffic accidents not being detected in a timely and effective manner.
By acquiring vehicle count data at the entrances and exits of the target road segment, calculating the real-time vehicle count and density, setting a change rate threshold using historical data, and generating abnormal signals by comparing real-time traffic flow, automated early warning can be achieved.
It enables automated real-time prediction and proactive early warning of traffic accidents, shortens accident detection time, improves traffic management efficiency, reduces secondary accidents, and lowers deployment costs.
Smart Images

Figure CN123182406A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision, data processing and analysis, and in particular to a method and apparatus for predicting and analyzing traffic accidents. Background Technology
[0002] With the rapid development of intelligent transportation systems, most urban roads have large-scale construction of traffic checkpoint systems. These systems utilize video technology to monitor road vehicle conditions in real time, acquiring data such as vehicle type, license plate, and speed. They can also promptly detect abnormal events such as traffic congestion and violations, providing strong support for traffic safety management. However, the construction of traffic checkpoints often fails to achieve comprehensive road coverage; on average, one checkpoint is installed every 3 kilometers on national and provincial highways. Furthermore, the randomness of traffic accident locations creates blind spots in technical detection, hindering the timely and effective discovery of traffic accidents.
[0003] Common methods for analyzing traffic accidents include the following: Traffic accident reporting: This method primarily relies on people at the scene of a traffic accident proactively reporting the accident location via telephone or mobile phone software. Management departments then determine the occurrence and location of the accident based on the location information from the caller's mobile phone. This method places traffic management departments in a passive receiving state, making it impossible to proactively detect accidents, and its timeliness is relatively low.
[0004] Video surveillance and analysis: This method utilizes video surveillance analysis technology around the accident site to automatically or manually analyze and determine abnormal road traffic conditions, thereby identifying the occurrence of a traffic accident and pinpointing its exact location based on the installation location of the video surveillance cameras. However, this method requires processing massive amounts of video data and covers many areas not covered by video surveillance.
[0005] In-vehicle navigation systems: These systems utilize real-time traffic data from in-vehicle navigation platforms such as Gaode and Baidu to determine the presence of traffic accidents. For traffic management departments, this type of data falls under the category of third-party internet data, requiring the purchase of related data services, and it is often difficult to effectively integrate with the traffic system due to the different network environments.
[0006] Vehicle-to-everything (V2X) data: With the development of intelligent connected vehicles, vehicles themselves possess network capabilities and can provide information such as abnormal collisions. Currently, this method is only applicable to intelligent connected vehicles, and the relevant road infrastructure is not yet widespread, making it difficult to meet the needs of large-scale applications.
[0007] Therefore, how to make full use of existing traffic checkpoint facilities to achieve automated real-time prediction and proactive early warning of traffic accidents without increasing additional hardware investment is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0008] This invention provides a traffic accident prediction and analysis method and apparatus, which can solve the problems of low timeliness due to reliance on manual reporting, blind spots in video surveillance, ineffective integration of third-party data, and the lack of widespread adoption of vehicle networking devices in existing traffic accident analysis methods.
[0009] The first aspect of this invention provides a method for predicting and analyzing traffic accidents, comprising: Obtain the vehicle count data at the entrance and exit of the target road segment; Based on the vehicle count data at the entrance and exit, calculate the real-time vehicle count of the target road segment, and then calculate the real-time vehicle density of the target road segment based on the real-time vehicle count. Obtain historical vehicle density data for the target road segment, and calculate the vehicle density change rate threshold for the target road segment based on the historical vehicle density data; The current vehicle density change rate is calculated based on the real-time vehicle density. When the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds the preset duration, a first abnormal signal is generated. The real-time vehicle density is compared with a preset congestion critical density threshold. When the real-time vehicle density exceeds the preset congestion critical density threshold, a second abnormal signal is generated. Based on the entrance vehicle count data and the exit vehicle count data, the entrance flow and exit flow are calculated. When the exit flow is lower than the entrance flow and the difference exceeds the preset flow difference threshold, a third abnormal signal is generated. When the first, second, and third abnormal signals are generated simultaneously, it is determined that a traffic accident has occurred on the target road segment, and a Level 1 warning message is output.
[0010] Optionally, historical vehicle density data for the target road segment is obtained, and the threshold for the vehicle density change rate of the target road segment is calculated based on the historical vehicle density data, including: Obtain historical density change rate data for the target road segment during normal, accident-free periods across multiple time slices; Calculate the mean and standard deviation of the historical density change rate for multiple time slices; The vehicle density change rate threshold is calculated based on the mean, standard deviation, and preset sensitivity coefficient. The vehicle density change rate threshold is equal to the sum of the products of the mean, sensitivity coefficient, and standard deviation.
[0011] Optionally, calculating the current vehicle density change rate based on real-time vehicle density includes: The difference between the real-time vehicle density and the vehicle density at the previous moment is calculated periodically at preset time intervals. Divide the difference by the preset time interval to obtain the current vehicle density change rate.
[0012] Optionally, calculating the inbound and outbound flow rates based on inbound and outbound vehicle count data includes: The entrance flow rate is obtained based on the number of vehicles entering the target road segment per unit time. The exit flow rate is obtained based on the number of vehicles leaving the target road segment per unit time. When the ratio of outflow to inflow is lower than a preset ratio threshold, it is determined that the outflow is lower than the inflow and the difference exceeds a preset flow difference threshold.
[0013] Optionally, the real-time vehicle count for the target road segment is calculated based on the entrance vehicle count data and the exit vehicle count data, including: Get the cumulative number of vehicles entering the target road segment from the entrance from the start time to the current time; Get the cumulative number of vehicles that have left the target road segment from the start time to the current time; Subtract the cumulative number of vehicles leaving from the cumulative number of vehicles entering to obtain the real-time vehicle count; Real-time vehicle density is the real-time number of vehicles divided by the length of the target road segment.
[0014] Optionally, it also includes: When the current vehicle density change rate exceeds the second preset threshold, or the current vehicle density change rate exceeds the third preset threshold and the real-time vehicle density exceeds the preset congestion critical density threshold, or the ratio of exit flow to inlet flow is lower than the second preset ratio threshold, a level 2 warning message is generated. The second preset threshold is greater than the vehicle density change rate threshold, and the third preset threshold is between the vehicle density change rate threshold and the second preset threshold.
[0015] Optionally, a vehicle matching verification step may also be included: Acquire the license plate recognition data of vehicles entering the target road segment and record the entry time; Obtain the exit license plate recognition data of vehicles leaving the target road segment and record the exit passage time; For vehicles with the same license plate number, the actual travel time is calculated based on the entry and exit times. When the actual travel time exceeds the preset normal travel time and the excess exceeds the preset threshold, an abnormal travel time signal is generated as an auxiliary basis for judging traffic accidents.
[0016] A second aspect of the present invention provides a traffic accident prediction and analysis device, comprising: The data acquisition module is used to acquire the vehicle count data at the entrance and exit of the target road segment; The density calculation module is used to calculate the real-time vehicle count of the target road segment based on the entrance vehicle count data and the exit vehicle count data, and to calculate the real-time vehicle density of the target road segment based on the real-time vehicle count. The threshold calculation module is used to obtain historical vehicle density data of the target road segment and calculate the vehicle density change rate threshold of the target road segment based on the historical vehicle density data. The first abnormal signal generation module is used to calculate the current vehicle density change rate based on the real-time vehicle density. When the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds the preset duration, the first abnormal signal is generated. The second abnormal signal generation module is used to compare the real-time vehicle density with the preset congestion critical density threshold. When the real-time vehicle density exceeds the preset congestion critical density threshold, a second abnormal signal is generated. The third abnormal signal generation module is used to calculate the inlet flow and outlet flow based on the inlet vehicle count data and the outlet vehicle count data. When the outlet flow is lower than the inlet flow and the difference exceeds the preset flow difference threshold, a third abnormal signal is generated. The accident determination module is used to determine that a traffic accident has occurred on the target road segment when the first abnormal signal, the second abnormal signal and the third abnormal signal are generated at the same time, and output a first-level warning information.
[0017] A third aspect of the present invention provides a traffic accident prediction and analysis device, comprising: One or more processors; A memory on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the traffic accident prediction and analysis method as described in any of the above.
[0018] A fourth aspect of the present invention provides a computer storage medium for storing a program, which, when executed, is used to implement the traffic accident prediction and analysis method as described in any of the preceding claims.
[0019] Compared with the prior art, the present invention has the following beneficial effects: Shorten accident detection time: Traditional accident reporting relies on manual alarms, which usually delays the process by 5 to 20 minutes. This method can automatically issue warnings within 2 to 5 minutes after an accident occurs, greatly improving the response speed.
[0020] Reduced deployment costs: Only existing traffic checkpoints at both ends of the road or new vehicle counters need to be used, without the need for dense deployment of equipment along the entire route. Existing electronic police or traffic monitoring equipment can be reused.
[0021] Enables automated monitoring: It can achieve 24 / 7 automatic monitoring, reducing the burden of manual monitoring. The algorithm can be deployed to multiple key road sections of the urban road network to form a monitoring network.
[0022] Improve traffic management efficiency: The traffic management center can immediately dispatch traffic police, rescue, and clearing vehicles to reduce the risk of secondary accidents; traffic lights at upstream intersections can be adjusted in a timely manner to reduce the influx of vehicles into accident sections.
[0023] Reducing secondary accidents: When vehicles are backed up on accident-prone road sections, the risk of rear-end collisions increases. Early warnings and traffic control can reduce the rate of secondary accidents. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a traffic accident prediction and analysis method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the principle of road segment vehicle counting and density calculation provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of density change and flow response under accident conditions provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a traffic accident prediction and analysis device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation
[0026] This invention provides a traffic accident prediction and analysis method and apparatus, which calculates the vehicle density within a region by fully utilizing existing traffic checkpoint data on vehicle numbers and speeds, and judges abnormal changes in vehicle density within the region, thereby predicting traffic accidents and achieving automated early warning, improving the response capability and handling efficiency of traffic emergencies; it also fully utilizes the existing capabilities of current traffic facilities, relies on big data computing and analysis and abnormal event analysis models to achieve automated early warning and decision analysis, solves the problem of real-time prediction of traffic events, and reduces system deployment and computing costs.
[0027] See Figure 1The figure is a flowchart illustrating a traffic accident prediction and analysis method provided in an embodiment of the present invention. The traffic accident prediction and analysis method provided in this embodiment of the present invention can be implemented, for example, through the following steps 101-107.
[0028] S101: Obtain the vehicle count data at the entrance and exit of the target road segment.
[0029] In this embodiment of the invention, a traffic road without ramps is selected, and the locations where vehicle counters (traffic checkpoints) have been installed at both ends are obtained or new vehicle monitoring equipment is reinstalled. The vehicle checkpoints have vehicle structuring capabilities and can effectively obtain license plate numbers to ensure the uniqueness of vehicle data statistics at the entrance and exit.
[0030] Record the times when vehicles enter and leave. Because there may be vehicles already in motion between the exit and the entrance when the calculation is actually started, in order to ensure the consistency of vehicle counts at the entrance and exit, vehicles that have already entered can be filtered by license plate number, that is, vehicles whose license plates were not captured at the entrance when the calculation starts.
[0031] S102: Calculate the real-time vehicle count of the target road segment based on the entrance vehicle count data and the exit vehicle count data, and calculate the real-time vehicle density of the target road segment based on the real-time vehicle count.
[0032] In this embodiment of the invention, the cumulative number of vehicles entering the target road segment from the entrance from the start time to the current time is obtained; the cumulative number of vehicles leaving the target road segment from the exit from the start time to the current time is obtained; the cumulative number of vehicles entering is subtracted from the cumulative number of vehicles leaving to obtain the real-time vehicle count; the real-time vehicle density is the real-time vehicle count divided by the length of the target road segment.
[0033] Specifically, To the time The total number of vehicles entering this road segment from the entrance, i.e., the number of vehicles entering per unit of time. To the time This represents the total number of vehicles that have left the road segment via the exit, i.e., the number of vehicles that have left per unit of time. Therefore, the real-time number of vehicles within the road segment is: ; Real-time vehicle density is: (Unit: vehicles / km)
[0034] S103: Obtain historical vehicle density data for the target road segment, and calculate the vehicle density change rate threshold for the target road segment based on the historical vehicle density data.
[0035] In this embodiment of the invention, the mean and standard deviation of the historical density change rate of multiple time slices are calculated; based on the mean, standard deviation and preset sensitivity coefficient, a vehicle density change rate threshold is calculated, which is equal to the sum of the products of the mean, sensitivity coefficient and standard deviation.
[0036] Specifically, this invention does not limit the specific method for setting the vehicle density change rate threshold; the method can be selected based on the actual application. The following are just examples; for instance, the setting method can be the baseline method based on historical statistical standard deviation. During the learning phase, within a normal, accident-free period (e.g., the past month), calculate the density change rate for each time slice (e.g., 08:00-08:05). .
[0037] Statistical characteristics: for each identical time period (e.g., 08:00 every Monday) Calculate the mean value and standard deviation .
[0038] Set threshold ,in, This is the sensitivity coefficient, typically taken as 2.5 to 3.5. This means that when the rate of change exceeds 2.5-3.5 standard deviations of the normal fluctuation range, it is considered extremely unlikely to be caused by random fluctuations, thus triggering an early warning.
[0039] Example: A certain road section, Monday at 8:00, historically of , .Pick ,but
[0040] S104: Calculate the current vehicle density change rate based on the real-time vehicle density. When the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds the preset duration, generate the first abnormal signal.
[0041] In this embodiment of the invention, the difference between the real-time vehicle density and the vehicle density at the previous moment is calculated periodically according to a preset time interval; the difference is divided by the preset time interval to obtain the current vehicle density change rate.
[0042] Specifically, when the density change rate exceeds a threshold, the first abnormal signal is generated.
[0043] ; in, For example, 1 minute or 5 minutes can be taken. Normally, due to random fluctuations in traffic flow, It will fluctuate slightly around zero. In the early stages of the accident, It will remain positive and the value will be large. Set a threshold. (e.g., 5 vehicles / km / minute), when Continue to exceed If a cycle is reached, an early warning will be issued.
[0044] S105: Compare the real-time vehicle density with the preset congestion critical density threshold. When the real-time vehicle density exceeds the preset congestion critical density threshold, generate a second abnormal signal.
[0045] In this embodiment of the invention, the critical density Approximately the density corresponding to the maximum flow rate (can be set based on historical data or theory, for example). ≈0.8 ). This refers to congestion density (the density of vehicles when they are lined up end to end, typically taken as 100–150 vehicles / km). If Furthermore, the density is still increasing rapidly, which likely indicates that the congestion is caused by an accident.
[0046] In one implementation of this invention, the entry license plate recognition data of vehicles entering the target road segment is obtained, and the entry passage time is recorded; the exit license plate recognition data of vehicles leaving the target road segment is obtained, and the exit passage time is recorded; for vehicles with the same license plate number, the actual travel time is calculated based on the entry passage time and the exit passage time; when the actual travel time exceeds the preset normal travel time and the excess exceeds a preset threshold, an abnormal travel time signal is generated as an auxiliary basis for judging traffic accidents.
[0047] For details, see Figure 2 , Figure 2 This is a schematic diagram illustrating the principle of road segment vehicle counting and density calculation provided in an embodiment of the present invention. The calculation of normal traffic flow time is as follows: Free-flow travel time (when there is no congestion): Hour; That is, if a vehicle enters the road segment at time t, it will normally... Leave to the left or right.
[0048] According to the basic formula of traffic flow theory: ; in, Traffic volume (vehicles / hour) Density (vehicles / km) The speed is measured in km / h. Under normal traffic conditions, the density and flow rate are stable.
[0049] Calculate the vehicle matching transit time: for in Vehicles entering should normally be If a vehicle leaves, but the actual departure time is much longer, it indicates a decrease in speed and an increase in density within the road segment. An abnormally increased transit time for a large number of vehicles can aid in this assessment.
[0050] S106: Calculate the inlet flow and outlet flow based on the inlet vehicle count data and the outlet vehicle count data. When the outlet flow is lower than the inlet flow and the difference exceeds the preset flow difference threshold, a third abnormal signal is generated.
[0051] In this embodiment of the invention, the inlet flow rate is obtained based on the number of vehicles entering the target road segment per unit time; the outlet flow rate is obtained based on the number of vehicles leaving the target road segment per unit time; when the ratio of the outlet flow rate to the inlet flow rate is lower than a preset ratio threshold, it is determined that the outlet flow rate is lower than the inlet flow rate and the difference exceeds a preset flow difference threshold.
[0052] For details, see Figure 3 , Figure 3 This is a schematic diagram illustrating density change and traffic flow response under accident conditions, provided as an embodiment of the present invention. The dynamic impact of traffic accidents on density change is calculated as follows: Set inlet flow (Originally obtained from the number of vehicles per unit time at the entrance counter), exit flow rate (Obtained from the number of vehicles per unit time using the exit counter). Based on vehicle conservation (no ramps on the road segment): = ; Substitution : ; Right now: .
[0053] When an accident occurs: Accidents typically reduce the traffic capacity of a road segment → exit flow The congestion was reduced. However, at the time of the accident, the vehicles entering the entrance were not yet aware of the congestion. It will remain at its original value for a period of time (the length of this period is less than or equal to the time it takes for the traffic jam at the accident site to spread upstream to the entrance, with a propagation speed of approximately 15–20 km / h).
[0054] Therefore in the initial stage The density will increase linearly.
[0055] If the congestion spreads to the entrance, and the incident becomes so severe that it causes vehicles to queue or even back up at the entrance, then... It will also decrease at this time. (Very small), density Maintain a high level until the incident is cleared.
[0056] S107: When the first abnormal signal, the second abnormal signal and the third abnormal signal are generated simultaneously, it is determined that a traffic accident has occurred on the target road section, and a first-level warning information is output.
[0057] In one implementation of this invention, a secondary warning message is generated when the current vehicle density change rate exceeds a second preset threshold, or the current vehicle density change rate exceeds a third preset threshold and the real-time vehicle density exceeds a preset congestion critical density threshold, or the ratio of exit flow to inlet flow is lower than a second preset ratio threshold. The second preset threshold is greater than the vehicle density change rate threshold, and the third preset threshold is between the vehicle density change rate threshold and the second preset threshold.
[0058] Specifically, using data from the counters at both ends, the matching vehicle information is calculated in real time, and the following is obtained: Current density: ; Short-time density change rate: ; Inbound traffic: (vehicles / hour); Export flow: .
[0059] Conservative strategy: If the conditions are met simultaneously, automatically generate a "Level 1 Warning" and output "[Level 1 Warning] An anomaly (possible accident) has occurred in the middle of the road segment".
[0060] (Continue for at least m minutes); ; ( For example, 0.7, (for compensation for transmission time) ; The false alarm rate is lower under the conservative strategy, but some atypical incidents may be missed (for example, incidents that occur at night when the density is already low and the flow is very small).
[0061] High-sensitivity strategy: Use "OR" relationship or "weighted scoring" to generate "Level 2 warning" that needs attention, and output "[Level 2 warning] There may be an anomaly in the middle of this road segment (needs attention)".
[0062] For example: ; ; , ; In high-sensitivity mode, it is better to give false alarms than to miss alarms. This mode is used to automatically trigger intelligence alerts or remind relevant personnel to pay close attention to video surveillance footage of a specific road section.
[0063] Beneficial effects: I. Improve traffic management efficiency: Real-time accident detection and rapid response: Shortening detection time, traditional accident reporting relies on manual alerts (typically delayed by 5–20 minutes), while this method provides automatic warnings within 2–5 minutes of an accident. Improving response speed, traffic management centers can immediately dispatch traffic police, rescue, and clearing vehicles, reducing the risk of secondary accidents.
[0064] Traffic flow optimization and control: Dynamic traffic light linkage allows for timely adjustments to traffic lights at upstream intersections, reducing vehicle influx into accident-prone areas. A traffic information dissemination system informs drivers in advance of detours, alleviating traffic pressure. Ramp control regulates traffic flow at upstream highway entrance ramps to prevent further congestion.
[0065] II. Safety Benefits: Reducing secondary accidents: When vehicles are backed up at accident-prone sections of road, the risk of rear-end collisions increases. Early warnings and traffic control can reduce the secondary accident rate by 30–50%.
[0066] Improving rescue efficiency: Earlier accident detection allows ambulances and fire trucks to be dispatched sooner. Traffic control can create "green channels" for emergency vehicles.
[0067] III. Systemic Advantages: Low-cost deployment: Only two counters (coil, radar, or camera) are required, eliminating the need for dense deployment across the entire network. Existing electronic police or traffic monitoring equipment can be reused.
[0068] Automation and Scalability: 24 / 7 automated monitoring reduces the burden of manual monitoring. The algorithm can be deployed to multiple key road sections in the urban road network to form a monitoring network.
[0069] Based on the methods provided in the above embodiments, this invention also provides a traffic accident prediction and analysis device, which is described below with reference to the accompanying drawings.
[0070] See Figure 4 The figure is a schematic diagram of the structure of a traffic accident prediction and analysis device provided in an embodiment of the present invention.
[0071] The traffic accident prediction and analysis device 400 provided in this embodiment of the invention includes: a data acquisition module 401, a density calculation module 402, a threshold calculation module 403, a first abnormal signal generation module 404, a second abnormal signal generation module 405, a third abnormal signal generation module 406, and an accident determination module 407.
[0072] The data acquisition module 401 is used to acquire the entrance vehicle count data and the exit vehicle count data of the target road segment; The density calculation module 402 is used to calculate the real-time number of vehicles on the target road segment based on the entrance vehicle count data and the exit vehicle count data, and to calculate the real-time vehicle density of the target road segment based on the real-time vehicle count. The threshold calculation module 403 is used to obtain historical vehicle density data of the target road segment and calculate the vehicle density change rate threshold of the target road segment based on the historical vehicle density data. The first abnormal signal generation module 404 is used to calculate the current vehicle density change rate based on the real-time vehicle density. When the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds the preset duration, a first abnormal signal is generated. The second abnormal signal generation module 405 is used to compare the real-time vehicle density with the preset congestion critical density threshold, and generate a second abnormal signal when the real-time vehicle density exceeds the preset congestion critical density threshold. The third abnormal signal generation module 406 is used to calculate the inlet flow and outlet flow based on the inlet vehicle count data and the outlet vehicle count data. When the outlet flow is lower than the inlet flow and the difference exceeds the preset flow difference threshold, a third abnormal signal is generated. The accident determination module 407 is used to determine that a traffic accident has occurred on the target road section when the first abnormal signal, the second abnormal signal and the third abnormal signal are generated at the same time, and to output a first-level warning information.
[0073] In one possible implementation, the threshold calculation module 403 is specifically used for: Obtain historical density change rate data for the target road segment during normal, accident-free periods across multiple time slices; Calculate the mean and standard deviation of the historical density change rate for multiple time slices; The vehicle density change rate threshold is calculated based on the mean, standard deviation, and preset sensitivity coefficient. The vehicle density change rate threshold is equal to the sum of the product of the mean and the target, where the target product is the product of the sensitivity coefficient and the standard deviation.
[0074] In one possible implementation, the first abnormal signal generation module 404 is specifically used for: The difference between the real-time vehicle density and the vehicle density at the previous moment is calculated periodically at preset time intervals. Divide the difference by the preset time interval to obtain the current vehicle density change rate.
[0075] In one possible implementation, the third abnormal signal generation module 406 is specifically used for: The entrance flow rate is obtained based on the number of vehicles entering the target road segment per unit time. The exit flow rate is obtained based on the number of vehicles leaving the target road segment per unit time. When the ratio of outflow to inflow is lower than a preset ratio threshold, it is determined that the outflow is lower than the inflow and the difference exceeds a preset flow difference threshold.
[0076] In one possible implementation, the density calculation module 402 is specifically used for: Get the cumulative number of vehicles entering the target road segment from the entrance from the start time to the current time; Get the cumulative number of vehicles that have left the target road segment from the start time to the current time; Subtract the cumulative number of vehicles leaving from the cumulative number of vehicles entering to obtain the real-time vehicle count; Real-time vehicle density is the real-time number of vehicles divided by the length of the target road segment.
[0077] In one possible implementation, a secondary early warning module is also included, specifically for: When the current vehicle density change rate exceeds the second preset threshold, or the current vehicle density change rate exceeds the third preset threshold and the real-time vehicle density exceeds the preset congestion critical density threshold, or the ratio of exit flow to inlet flow is lower than the second preset ratio threshold, a level 2 warning message is generated. The second preset threshold is greater than the vehicle density change rate threshold, and the third preset threshold is between the vehicle density change rate threshold and the second preset threshold.
[0078] In one possible implementation, a vehicle matching verification module is also included, specifically for: Acquire the license plate recognition data of vehicles entering the target road segment and record the entry time; Obtain the exit license plate recognition data of vehicles leaving the target road segment and record the exit passage time; For vehicles with the same license plate number, the actual travel time is calculated based on the entry and exit times. When the actual travel time exceeds the preset normal travel time and the excess exceeds the preset threshold, an abnormal travel time signal is generated as an auxiliary basis for judging traffic accidents.
[0079] Since the traffic accident prediction and analysis device 400 is a device corresponding to the traffic accident prediction and analysis method provided in the above method embodiments, the specific implementation of each module of the traffic accident prediction and analysis device 400 is based on the same concept as in the above method embodiments. Therefore, for the specific implementation of each module of the traffic accident prediction and analysis device 400, please refer to the description of the traffic accident prediction and analysis method in the above method embodiments, and it will not be repeated here.
[0080] This invention also provides a traffic accident prediction and analysis device, the device comprising: a processor and a memory; The memory is used to store instructions; The processor is used to execute the instructions in the memory to perform the traffic accident prediction and analysis method mentioned in the above embodiments.
[0081] It should be noted that the hardware structure of the traffic accident prediction and analysis equipment provided in the embodiments of the present invention can be as follows: Figure 5 The structure shown, Figure 5 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention.
[0082] Please see Figure 5 As shown, device 500 includes: processor 510, communication interface 520, and memory 530. The number of processors 510 in device 500 can be one or more. Figure 5 Taking a processor as an example, in this embodiment of the invention, the processor 510, communication interface 520, and memory 530 can be connected via a bus system or other means. Figure 5 Taking the connection between China and Israel via the 540 bus system as an example.
[0083] Processor 510 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Processor 510 may further include hardware chips. These hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0084] Memory 530 may include volatile memory, such as random-access memory (RAM); memory 530 may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); memory 530 may also include a combination of the above types of memory.
[0085] Optionally, the memory 530 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 510 can read the programs in the memory 530 to implement the data acquisition method provided in this embodiment of the invention.
[0086] The bus system 540 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system 540 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0087] This invention also provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the traffic accident prediction and analysis method mentioned in the above embodiments.
[0088] This invention also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the traffic accident prediction and analysis method mentioned in the above embodiments.
[0089] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for predicting and analyzing traffic accidents, characterized in that, include: Obtain the vehicle count data at the entrance and exit of the target road segment; Based on the entrance vehicle count data and the exit vehicle count data, calculate the real-time vehicle count of the target road segment, and calculate the real-time vehicle density of the target road segment based on the real-time vehicle count. Obtain historical vehicle density data for the target road segment, and calculate the vehicle density change rate threshold for the target road segment based on the historical vehicle density data; The current vehicle density change rate is calculated based on the real-time vehicle density. When the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds a preset duration, a first abnormal signal is generated. The real-time vehicle density is compared with a preset congestion critical density threshold. When the real-time vehicle density exceeds the preset congestion critical density threshold, a second abnormal signal is generated. Based on the inbound vehicle count data and the outbound vehicle count data, the inbound flow and outbound flow are calculated. When the outbound flow is lower than the inbound flow and the difference exceeds a preset flow difference threshold, a third abnormal signal is generated. When the first abnormal signal, the second abnormal signal, and the third abnormal signal are generated simultaneously, it is determined that a traffic accident has occurred on the target road segment, and a first-level warning message is output.
2. The method according to claim 1, characterized in that, The step of obtaining historical vehicle density data for the target road segment and calculating the vehicle density change rate threshold for the target road segment based on the historical vehicle density data includes: Obtain historical density change rate data for the target road segment during multiple time slices in normal, accident-free periods; Calculate the mean and standard deviation of the historical density change rate for the multiple time slices; The vehicle density change rate threshold is calculated based on the mean, the standard deviation, and the preset sensitivity coefficient. The vehicle density change rate threshold is equal to the sum of the products of the mean, the sensitivity coefficient, and the standard deviation.
3. The method according to claim 1, characterized in that, The step of calculating the current vehicle density change rate based on the real-time vehicle density includes: The difference between the real-time vehicle density and the vehicle density at the previous moment is calculated periodically at preset time intervals. The current vehicle density change rate is obtained by dividing the difference by the preset time interval.
4. The method according to claim 1, characterized in that, The step of calculating the inbound traffic flow and the outbound traffic flow based on the inbound vehicle count data and the outbound vehicle count data includes: The entrance flow rate is obtained based on the number of vehicles entering the target road segment per unit time. The exit flow rate is obtained based on the number of vehicles leaving the target road segment per unit time. When the ratio of the outflow to the inflow is lower than a preset ratio threshold, it is determined that the outflow is lower than the inflow and the difference exceeds the preset flow difference threshold.
5. The method according to claim 1, characterized in that, The step of calculating the real-time vehicle count of the target road segment based on the entrance vehicle count data and the exit vehicle count data includes: Get the cumulative number of vehicles entering the target road segment from the starting time to the current time; Get the cumulative number of vehicles that have left the target road segment from the starting time to the current time; The real-time vehicle count is obtained by subtracting the cumulative number of vehicles leaving from the cumulative number of vehicles entering. The real-time vehicle density is the real-time number of vehicles divided by the length of the target road segment.
6. The method according to claim 1, characterized in that, Also includes: When the current vehicle density change rate exceeds the second preset threshold, or the current vehicle density change rate exceeds the third preset threshold and the real-time vehicle density exceeds the preset congestion critical density threshold, or the ratio of the exit flow to the inlet flow is lower than the second preset ratio threshold, a level 2 warning message is generated. The second preset threshold is greater than the vehicle density change rate threshold, and the third preset threshold is between the vehicle density change rate threshold and the second preset threshold.
7. The method according to claim 1, characterized in that, It also includes vehicle matching verification steps: Acquire the entry license plate recognition data of vehicles entering the target road section and record the entry passage time; Obtain the exit license plate recognition data of vehicles leaving the target road segment and record the exit passage time; For vehicles with the same license plate number, the actual travel time is calculated based on the entrance passage time and the exit passage time. When the actual travel time exceeds the preset normal travel time and the excess exceeds a preset threshold, an abnormal travel time signal is generated as an auxiliary basis for determining traffic accidents.
8. A traffic accident prediction and analysis device, characterized in that, include: The data acquisition module is used to acquire the vehicle count data at the entrance and exit of the target road segment; The density calculation module is used to calculate the real-time vehicle count of the target road segment based on the entrance vehicle count data and the exit vehicle count data, and to calculate the real-time vehicle density of the target road segment based on the real-time vehicle count. The threshold calculation module is used to obtain historical vehicle density data of the target road segment and calculate the vehicle density change rate threshold of the target road segment based on the historical vehicle density data. The first abnormal signal generation module is used to calculate the current vehicle density change rate based on the real-time vehicle density, and generate a first abnormal signal when the current vehicle density change rate exceeds the vehicle density change rate threshold and the duration exceeds a preset duration. The second abnormal signal generation module is used to compare the real-time vehicle density with a preset congestion critical density threshold, and generate a second abnormal signal when the real-time vehicle density exceeds the preset congestion critical density threshold. The third abnormal signal generation module is used to calculate the inlet flow and the outlet flow based on the inlet vehicle count data and the outlet vehicle count data. When the outlet flow is lower than the inlet flow and the difference exceeds a preset flow difference threshold, a third abnormal signal is generated. The accident determination module is used to determine that a traffic accident has occurred on the target road segment when the first abnormal signal, the second abnormal signal and the third abnormal signal are generated simultaneously, and to output a first-level warning message.
9. An electronic device, characterized in that, The device includes: a processor and a memory; The memory is used to store instructions; The processor is configured to execute the instructions in the memory to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Including instructions that, when run on a computer, cause the computer to perform the method described in any one of claims 1-7 above.
