Accident detection method and device, terminal equipment and storage medium
By obtaining target trajectory data within the perceived range of multiple base stations, determining the target to be detected, and using the California algorithm for accident detection, the problem of degradation of detection accuracy caused by interference in the prior art is solved, and more efficient traffic accident detection is achieved.
Patent Information
- Application Number
- CN202311612214.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-06-06
AI Technical Summary
Existing traffic accident detection methods rely on visual data and are easily disturbed by factors such as light, limited view or occlusion, resulting in a decrease in detection accuracy.
By acquiring the detection data of the associated base station, including the trajectory data of all targets within the sensing range of the first base station and the second base station, the target to be detected is determined, and the accident detection is performed using the California algorithm based on these data.
The accuracy of traffic accident detection has been improved, and through collaborative inspection by multiple base stations, the detection ability of potential accidents has been enhanced, and misjudgment caused by factors such as lighting has been reduced.
Smart Images

Figure CN120108169A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent transportation technology, and in particular, relates to an accident detection method, device, terminal equipment and storage medium. Background Art
[0002] Traffic accident detection is currently an important research field. Traffic accident detection can help monitor traffic conditions in real time, detect accidents in time and take appropriate emergency measures to reduce traffic congestion, improve traffic safety, and accelerate rescue response.
[0003] In the related art, the detection of traffic accidents usually relies on visual data, such as videos or images captured by cameras. However, visual data may be interfered by various factors, such as lighting conditions, limited or blocked fields of view, etc. These factors will reduce the accuracy of traffic accident detection and identification. Summary of the invention
[0004] The embodiments of the present application provide an accident detection method, apparatus, terminal device and storage medium, which can improve the accuracy of traffic accident detection.
[0005] A first aspect of an embodiment of the present application provides an accident detection method, including: acquiring detection data of associated base stations, wherein the associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within a perception range of the first base station, and trajectory data of all targets within a perception range of the second base station; determining a target to be detected within a perception range of the first base station based on the trajectory data of all targets within the perception range of the first base station; and performing accident detection on the target to be detected based on the detection data of the associated base stations.
[0006] Optionally, in a possible implementation manner of the first aspect, the performing accident detection on the target to be detected based on the detection data of the associated base station includes:
[0007] Based on the detection data of the associated base stations, the California algorithm is used to perform accident detection on the target to be detected.
[0008] Optionally, in another possible implementation manner of the first aspect, the performing accident detection on the target to be detected by using the California algorithm based on the detection data of the associated base station includes:
[0009] Determine the occupancy rate of the first base station according to the trajectory data of all targets within the sensing range of the first base station;
[0010] Determine the occupancy rate of the second base station according to the trajectory data of all targets within the sensing range of the second base station;
[0011] Accident detection is performed on a target to be detected according to the occupancy rate of the first base station and the occupancy rate of the second base station.
[0012] Optionally, in yet another possible implementation manner of the first aspect, determining the occupancy rate of the first base station according to the trajectory data of all targets within a sensing range of the first base station includes:
[0013] Determine the total length of all targets within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station;
[0014] The ratio of the total length of all targets within the sensing range of the first base station to the length of the sensing range of the first base station is determined as the occupancy rate of the first base station.
[0015] Optionally, in another possible implementation of the first aspect, the performing accident detection on the target to be detected according to the occupancy rate of the first base station and the occupancy rate of the second base station includes:
[0016] determining an absolute difference between an occupancy rate of the first base station and an occupancy rate of the second base station;
[0017] Determine a ratio of the absolute difference value to the occupancy rate of the first base station and a ratio of the absolute difference value to the occupancy rate of the second base station;
[0018] Determine whether the absolute difference is greater than a first threshold;
[0019] If yes, determining whether the ratio of the absolute difference to the occupancy rate of the first base station is greater than a second threshold;
[0020] If yes, determining whether the ratio of the absolute difference to the occupancy rate of the second base station is greater than a third threshold;
[0021] If so, it is determined that an accident occurs in the target to be detected.
[0022] Optionally, in another possible implementation manner of the first aspect, before determining whether the absolute difference is greater than the first threshold, the accident detection method further includes:
[0023] Obtain reference test data and annotated data of the reference test data;
[0024] Using the reference detection data and the labeled data of the reference detection data, a preset machine learning model is trained to obtain an accident prediction model;
[0025] Based on the accident prediction model, a first threshold, a second threshold, and a third threshold are obtained.
[0026] Optionally, in yet another possible implementation of the first aspect, if the above is true, after determining that an accident occurs in the target to be detected, the accident detection method further includes:
[0027] Obtaining label data of detection data of associated base stations;
[0028] The first threshold, the second threshold and the third threshold are updated by using the detection data of the associated base station and the annotated data of the detection data of the associated base station.
[0029] Optionally, in another possible implementation manner of the first aspect, determining the target to be detected within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station includes:
[0030] Determine at least one stationary target within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station;
[0031] Match the detection data of the associated base station with the accident judgment rules to obtain the matching result corresponding to each stationary target;
[0032] Based on the matching results corresponding to each stationary target, the target to be detected is determined.
[0033] Optionally, in yet another possible implementation manner of the first aspect, the accident judgment rule includes a first judgment rule, and the matching of the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each stationary target includes:
[0034] Determine, based on the detection data of the associated base station, whether there are other targets within a preset first distance in front of the stationary target;
[0035] If yes, it is determined that the stationary target does not match the first judgment rule;
[0036] If not, it is determined that the stationary target matches the first judgment rule.
[0037] Optionally, in another possible implementation manner of the first aspect, the accident judgment rule includes a second judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each stationary target, including:
[0038] determining whether the stationary target is located between the two targets based on the detection data of the associated base station;
[0039] If yes, determine whether the distance between the stationary target and the target behind is less than a preset distance threshold;
[0040] If so, it is determined that the stationary target matches the second judgment rule;
[0041] If not, it is determined that the stationary target does not match the second judgment rule.
[0042] Optionally, in another possible implementation manner of the first aspect, the accident judgment rule includes a third judgment rule, and the matching of the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each stationary target includes:
[0043] Determining whether there is a moving target within a preset second distance in front of the stationary target based on the detection data of the associated base station;
[0044] If so, it is determined that the stationary target matches the third judgment rule;
[0045] If not, it is determined that the stationary target does not match the third judgment rule.
[0046] Optionally, in yet another possible implementation manner of the first aspect, the accident judgment rule includes a fourth judgment rule, matching the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each stationary target, including:
[0047] Determine the number of targets within a preset third distance in front of the stationary target and determine the number of targets within a preset third distance behind the stationary target based on the detection data of the associated base station;
[0048] Determine whether the difference between the number of targets within a preset third distance in front and the number of targets within a preset third distance in the rear is greater than a preset number threshold;
[0049] If so, it is determined that the stationary target matches the fourth judgment rule;
[0050] If not, it is determined that the stationary target does not match the fourth judgment rule.
[0051] Optionally, in another possible implementation manner of the first aspect, the accident judgment rule includes a fifth judgment rule, and the matching of the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each stationary target includes:
[0052] Determine whether there is a pedestrian within the sensing range of the first base station according to the detection data of the associated base station;
[0053] If so, it is determined that the stationary target matches the fifth judgment rule;
[0054] If not, it is determined that the stationary target does not match the fifth judgment rule.
[0055] A second aspect of an embodiment of the present application provides an accident detection device, including:
[0056] A data acquisition module, configured to acquire detection data of associated base stations, wherein the associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within a sensing range of the first base station and trajectory data of all targets within a sensing range of the second base station;
[0057] A target determination module, configured to determine a target to be detected within a sensing range of the first base station according to trajectory data of all targets within a sensing range of the first base station;
[0058] The accident detection module is used to perform accident detection on the target to be detected based on the detection data of the associated base station.
[0059] A third aspect of an embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the accident detection method of the first aspect when executing the computer program.
[0060] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the accident detection method of the first aspect described above is implemented.
[0061] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the accident detection method of the first aspect.
[0062] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the present application discloses an accident detection method, apparatus, terminal device and storage medium, wherein the method first obtains the detection data of the associated base station, wherein the associated base station includes the first base station and the second base station, and the detection data of the associated base station includes the trajectory data of all targets within the sensing range of the first base station, and the trajectory data of all targets within the sensing range of the second base station; then, according to the trajectory data of all targets within the sensing range of the first base station, the target to be detected within the sensing range of the first base station is determined; finally, based on the detection data of the associated base station, the target to be detected is subjected to accident detection. Thus, the trajectory data of each target detected by the associated base station is used to make an accident judgment on the target to be detected, thereby realizing accurate identification of traffic accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art 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 paying any creative work.
[0064] Figure 1 It is a flowchart of an accident detection method provided in an embodiment of the present application;
[0065] Figure 2 is an example diagram of a California algorithm calculation process provided by an embodiment of the present application;
[0066] Figure 3 is a structural schematic diagram of an accident detection device provided in an embodiment of the present application;
[0067] Figure 4 It is a structural diagram of a terminal device provided in Example 4 of the present application. DETAILED DESCRIPTION
[0068] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0069] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0070] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0071] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0072] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0073] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0074] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0075] In the related art, the detection of traffic accidents usually relies on visual data, such as videos or images captured by cameras. However, visual data may be interfered by various factors, such as lighting conditions, limited or blocked fields of view, etc. These factors will reduce the accuracy of traffic accident detection and identification.
[0076] In view of this, the embodiments of the present application provide an accident detection method, apparatus, terminal device and storage medium, which perform accident judgment on the target to be detected through the trajectory data of each target detected by the associated base station, thereby achieving accurate identification of traffic accidents.
[0077] The following is an example of the application scenario of the accident detection method provided in the embodiment of the present application. The method can be applied to tunnel and highway scenarios. Two associated base stations are set in the tunnel or highway, such as upstream and downstream base stations. The target to be detected can be a vehicle, where the position of the vehicle to be detected corresponds to the first base station. According to the trajectory data of all vehicles within the sensing range of the first base station, combined with the trajectory data of all vehicles within the sensing range of the second base station downstream of the first base station, analyze whether the vehicle to be detected has an accident. By comparing the trajectory data of vehicles within the sensing range of the associated base stations, the dynamic situation in the detection area can be more comprehensively understood, thereby enhancing the ability to detect potential accidents.
[0078] In order to illustrate the technical solution of the present application, specific embodiments are provided below.
[0079] Reference Figure 1 , showing a flow chart of an accident detection method provided in an embodiment of the present application.
[0080] like Figure 1 As shown, the accident detection method may include the following steps:
[0081] Step 101: Acquire detection data of associated base stations.
[0082] The associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within a sensing range of the first base station and trajectory data of all targets within a sensing range of the second base station.
[0083] In the embodiment of the present application, the associated base stations may be upstream and downstream base stations, the first base station being the upstream base station, and the second base station being the downstream base station. By comparing the target trajectory data within the sensing range of the upstream and downstream base stations, the dynamic situation within the detection area can be more comprehensively understood, thereby enhancing the ability to detect potential accidents. The target may be a vehicle, pedestrian, or other traffic participant.
[0084] It should be noted that by acquiring the detection data of the associated base stations, the flow, density and speed macro characteristics of the associated base stations, namely, flow, density, speed and other data, can be analyzed through the trajectory data of all targets and used for subsequent accident detection.
[0085] Step 102: Determine the target to be detected within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station.
[0086] It should be noted that the trajectory data of all targets within the sensing range of the first base station can be analyzed to preliminarily identify targets where accidents may occur as targets to be detected.
[0087] It should be understood that usually after an accident, the targets affected by the accident tend to stop moving, especially if a collision or other serious situation occurs. Therefore, the stationary targets within the sensing range of the first base station can be detected based on the trajectory data, and detecting the stationary targets helps to identify potential accident points. However, not all stationary targets have accidents. Taking the stationary target as a vehicle as an example, normal parking and waiting for red lights will cause the vehicle to be stationary. Therefore, it is also necessary to combine some accident judgment rules to screen the stationary targets to determine the targets to be detected.
[0088] That is, as a possible implementation method of an embodiment of the present application, the above step 102 may include: determining at least one stationary target within the perception range of the first base station based on the trajectory data of all targets within the perception range of the first base station; matching the detection data of the associated base stations with the accident judgment rules to obtain the matching results corresponding to each stationary target; and determining the target to be detected based on the matching results corresponding to each stationary target.
[0089] As an example, since the traffic of the target is usually balanced, if there are no other targets within a certain distance in front of the stationary target, it is considered that the stationary target may have an accident. Taking the target as a vehicle as an example, the stationary target may be an illegally parked vehicle. If there are no other vehicles within a certain distance in front of the illegally parked vehicle, it is considered that the illegally parked vehicle may have an accident. Based on this, a first judgment rule can be set, that is, the accident judgment rule includes the first judgment rule. The above matching of the detection data of the associated base station with the accident judgment rule to obtain the matching result corresponding to each stationary target may include: judging whether there are other targets within a preset first distance in front of the stationary target according to the detection data of the associated base station; if so, determining that the stationary target does not match the first judgment rule; if not, determining that the stationary target matches the first judgment rule.
[0090] It should be understood that the first distance can be determined in combination with actual application scenarios and requirements, such as tens of meters or hundreds of meters, and the embodiments of the present application are not limited to this.
[0091] As another example, if a stationary target is between two targets, and the distance between the stationary target and the target behind is very small, then it is considered that the stationary target may have collided with the target behind. Taking the target as a vehicle as an example, if the stationary vehicle is in the middle of the convoy, and the distance between the front of the vehicle behind the adjacent vehicle is less than a certain threshold, then it may be considered that the stationary vehicle has had an accident. Based on this, a second judgment rule can be set, that is, the accident judgment rule includes the second judgment rule, and the above matching of the detection data of the associated base station with the accident judgment rule to obtain the matching result corresponding to each stationary target can include: judging whether the stationary target is between the two targets according to the detection data of the associated base station; if so, judging whether the distance between the stationary target and the target behind is less than a preset distance threshold; if so, determining that the stationary target matches the second judgment rule; if not, determining that the stationary target does not match the second judgment rule.
[0092] It should be understood that the preset distance threshold can be determined in combination with actual application scenarios and requirements, and the embodiments of the present application are not limited to this.
[0093] As another example, if there are other targets in front of the stationary target that are moving normally, but the stationary target is still stationary, then it is considered that an accident may have occurred with the stationary target. Taking the target as a vehicle as an example, if there is a vehicle moving freely in front of the stationary vehicle, then it may be considered that the illegally parked vehicle has an accident. Based on this, a third judgment rule can be set, that is, the accident judgment rule includes the third judgment rule. The above matching of the detection data of the associated base station with the accident judgment rule to obtain the matching result corresponding to each stationary target may include: judging whether there is a moving target within a preset second distance in front of the stationary target based on the detection data of the associated base station; if so, determining that the stationary target matches the third judgment rule; if not, determining that the stationary target does not match the third judgment rule.
[0094] It should be understood that the second distance can be determined in combination with actual application scenarios and requirements, and the embodiments of the present application are not limited to this.
[0095] As another example, since the traffic of the target is usually balanced, if an accident occurs, congestion will usually occur behind the accident site. That is to say, if the number of targets behind the stationary target is too different from the number of targets in front, for example, the number of targets behind is much larger than the number of targets in front, then it is considered that the stationary target may have an accident. Based on this, a fourth judgment rule can be set, that is, the accident judgment rule includes the fourth judgment rule, and the above matching of the detection data of the associated base station with the accident judgment rule to obtain the matching result corresponding to each stationary target can include: determining the number of targets within a preset third distance in front of the stationary target and determining the number of targets within a preset third distance behind the stationary target according to the detection data of the associated base station; determining whether the difference between the number of targets within the preset third distance in front and the number of targets within the preset third distance behind is greater than the preset number threshold; if so, determining that the stationary target matches the fourth judgment rule; if not, determining that the stationary target does not match the fourth judgment rule.
[0096] It should be understood that the preset quantity threshold can be determined in combination with actual application scenarios and requirements, and the embodiments of the present application do not limit this.
[0097] As another example, taking the target as a vehicle, when the vehicle is driving on the road, especially when driving in a tunnel or on a highway, there will be no pedestrians on the road. If pedestrians appear around a stationary vehicle, it may be because an accident occurred with the stationary vehicle and someone got off the vehicle to check. Based on this, a fifth judgment rule can be set, that is, the accident judgment rule includes the fifth judgment rule. The above matching of the detection data of the associated base station with the accident judgment rule to obtain the matching result corresponding to each stationary target may include: judging whether there are pedestrians within the sensing range of the first base station based on the detection data of the associated base station; if so, determining that the stationary target matches the fifth judgment rule; if not, determining that the stationary target does not match the fifth judgment rule.
[0098] It should be noted that when using accident judgment rules to judge a stationary target, any one of the above judgment rules can be selected or multiple judgment rules can be used at the same time, and the embodiments of the present application do not limit this.
[0099] Step 103: Perform accident detection on the target to be detected based on the detection data of the associated base station.
[0100] It should be noted that after preliminarily determining the targets to be detected where accidents may occur, combined with the trajectory data of all targets within the sensing range of the associated base station, a more comprehensive understanding of the dynamic situation in the detection area can be achieved, thereby enhancing the ability to detect potential accidents.
[0101] In a possible implementation, the California Algorithm may be used to perform accident detection on the target to be detected based on the detection data of the associated base station.
[0102] Among them, the California algorithm, also known as the dual-section algorithm, judges whether an event occurs in the detected area based on the rule that the occupancy rate of the upstream detection section will increase and the occupancy rate of the downstream detection section will decrease when an event occurs.
[0103] In an embodiment of the present application, the steps of performing accident detection on a target to be detected using the California algorithm are as follows: determining the occupancy of the first base station based on the trajectory data of all targets within the sensing range of the first base station; determining the occupancy of the second base station based on the trajectory data of all targets within the sensing range of the second base station; performing accident detection on the target to be detected based on the occupancy of the first base station and the occupancy of the second base station.
[0104] It should be noted that the occupancy rate is obtained by calculating the ratio between the total length of the target and the total length of the sensing range. That is to say, taking the calculation of the occupancy rate of the first base station as an example, the total length of all targets within the sensing range of the first base station can be determined based on the trajectory data of all targets within the sensing range of the first base station; the ratio of the total length of all targets within the sensing range of the first base station to the length of the sensing range of the first base station is determined as the occupancy rate of the first base station.
[0105] Furthermore, in the California algorithm, it is first necessary to calculate the absolute difference in occupancy between associated base stations and compare it with a preset first threshold K1. If it is greater than the first threshold K1, then continue to calculate the ratio of the difference in occupancy between associated base stations to the occupancy of the first base station (e.g., an upstream base station), and then compare it with a preset second threshold K2. If it is greater than the second threshold K2, then continue to calculate the ratio of the difference in occupancy between associated base stations to the occupancy of the second base station (e.g., a downstream base station), and then compare it with a preset third threshold K3. If it is greater than the third threshold K3, it indicates that an event has occurred.
[0106] That is, as a possible implementation method of the embodiment of the present application, the above-mentioned accident detection of the target to be detected based on the occupancy of the first base station and the occupancy of the second base station may include: determining the absolute difference between the occupancy of the first base station and the occupancy of the second base station; determining the ratio of the absolute difference to the occupancy of the first base station, and the ratio of the absolute difference to the occupancy of the second base station; judging whether the absolute difference is greater than a first threshold; if so, judging whether the ratio of the absolute difference to the occupancy of the first base station is greater than a second threshold; if so, judging whether the ratio of the absolute difference to the occupancy of the second base station is greater than a third threshold; if so, determining that an accident has occurred in the target to be detected.
[0107] Reference Figure 2 , shows an example diagram of the California algorithm calculation process. Figure 2 As shown, OCC(i, t) represents the occupancy of the first base station at time t; OCC(i+1, t) represents the occupancy of the second base station at time t; OCC(i+1, t-2) represents the occupancy of the second base station at time t-2; OCCDF represents the absolute difference between the occupancy of the first base station and the occupancy of the second base station; DOCCDF represents the ratio of the absolute difference to the occupancy of the first base station; DOCCTD represents the ratio of the absolute difference to the occupancy of the second base station.
[0108] It should be noted that the above-mentioned first threshold K1, second threshold K2 and third threshold K3 can be set manually, but the accuracy of artificial experience setting is not high. Therefore, the initial first threshold K1, second threshold K2 and third threshold K3 can be set as loosely as possible, and all the accidents judged are regarded as suspected accidents, and the trajectory data is saved, and the trajectory segment data is annotated by manually comparing the on-site video. Then the acquired annotated data is cleaned. After the cleaning is completed, the trajectory data is preprocessed, standardized, normalized or scaled, etc., so as to eliminate the differences between the features and ensure that they have similar scales. Then select an appropriate machine learning algorithm, such as logistic regression, decision tree, support vector machine, etc. After model training, evaluation, tuning and verification, a more accurate first threshold K1, second threshold K2 and third threshold K3 are output.
[0109] That is, as a possible implementation method of the embodiment of the present application, reference detection data and labeled data of the reference detection data can be obtained; then, the reference detection data and the labeled data of the reference detection data are used to train a preset machine learning model to obtain an accident prediction model; finally, based on the accident prediction model, a first threshold, a second threshold and a third threshold are obtained.
[0110] Furthermore, since different road sections have their own characteristics, it is difficult to cover all road section conditions with a set of first thresholds, second thresholds, and third thresholds. Therefore, after an accident is detected, the accident can be manually confirmed, and the trajectory data of the base station associated with the accident judgment can be marked, and the aforementioned accident prediction model can be retrained to obtain more accurate first thresholds, second thresholds, and third thresholds that are suitable for different road sections, thereby improving the accuracy of accident detection.
[0111] That is, as a possible implementation method of the embodiment of the present application, after step 103, the labeling data of the detection data of the associated base station can be obtained; the first threshold, the second threshold and the third threshold can be updated using the detection data of the associated base station and the labeling data of the detection data of the associated base station.
[0112] The accident detection method disclosed in the above embodiment of the present application first obtains the detection data of the associated base station, wherein the associated base station includes the first base station and the second base station, and the detection data of the associated base station includes the trajectory data of all targets within the sensing range of the first base station, and the trajectory data of all targets within the sensing range of the second base station; then, based on the trajectory data of all targets within the sensing range of the first base station, the target to be detected within the sensing range of the first base station is determined; finally, based on the detection data of the associated base station, the target to be detected is subjected to accident detection. Thus, the trajectory data of each target detected by the associated base station is used to make accident judgments on the target to be detected, thereby achieving accurate identification of traffic accidents.
[0113] See also Figure 3 , shows a schematic diagram of the structure of an accident detection device provided in Example 3 of the present application. For the sake of ease of explanation, only the parts related to the example of the present application are shown.
[0114] The accident detection device may specifically include the following modules:
[0115] The data acquisition module 301 is used to acquire detection data of associated base stations, wherein the associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within the perception range of the first base station and trajectory data of all targets within the perception range of the second base station.
[0116] The target determination module 302 is used to determine the target to be detected within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station.
[0117] The accident detection module 303 is used to perform accident detection on the target to be detected based on the detection data of the associated base station.
[0118] The accident detection device disclosed in the above embodiment of the present application first obtains the detection data of the associated base station, wherein the associated base station includes the first base station and the second base station, and the detection data of the associated base station includes the trajectory data of all targets within the sensing range of the first base station, and the trajectory data of all targets within the sensing range of the second base station; then, based on the trajectory data of all targets within the sensing range of the first base station, the target to be detected within the sensing range of the first base station is determined; finally, based on the detection data of the associated base station, the target to be detected is subjected to accident detection. Thus, the trajectory data of each target detected by the associated base station is used to make an accident judgment on the target to be detected, thereby realizing accurate identification of traffic accidents.
[0119] Furthermore, in a possible implementation of the embodiment of the present application, the above-mentioned accident detection module 303 may specifically include the following submodules:
[0120] The first processing submodule is used to perform accident detection on a target to be detected by using a California algorithm based on detection data of an associated base station.
[0121] Furthermore, in another possible implementation of the embodiment of the present application, the first processing submodule may specifically include the following units:
[0122] The first processing unit is used to determine the occupancy rate of the first base station according to the trajectory data of all targets within the sensing range of the first base station.
[0123] The second processing unit is used to determine the occupancy rate of the second base station according to the trajectory data of all targets within the sensing range of the second base station.
[0124] The third processing unit is used to perform accident detection on the target to be detected according to the occupancy rate of the first base station and the occupancy rate of the second base station.
[0125] Furthermore, in another possible implementation method of the embodiment of the present application, the above-mentioned first processing unit is specifically used to: determine the total length of all targets within the perception range of the first base station based on the trajectory data of all targets within the perception range of the first base station; and determine the ratio of the total length of all targets within the perception range of the first base station to the length of the perception range of the first base station as the occupancy rate of the first base station.
[0126] Furthermore, in another possible implementation method of the embodiment of the present application, the above-mentioned third processing unit is specifically used to: determine the absolute difference between the occupancy rate of the first base station and the occupancy rate of the second base station; determine the ratio of the absolute difference to the occupancy rate of the first base station, and the ratio of the absolute difference to the occupancy rate of the second base station; determine whether the absolute difference is greater than a first threshold value; if so, determine whether the ratio of the absolute difference to the occupancy rate of the first base station is greater than a second threshold value; if so, determine whether the ratio of the absolute difference to the occupancy rate of the second base station is greater than a third threshold value; if so, determine that an accident has occurred in the target to be detected.
[0127] Furthermore, in another possible implementation method of the embodiment of the present application, the above-mentioned third processing unit is also specifically used to: obtain reference detection data and annotated data of the reference detection data; use the reference detection data and the annotated data of the reference detection data to train a preset machine learning model to obtain an accident prediction model; based on the accident prediction model, obtain a first threshold, a second threshold and a third threshold.
[0128] Furthermore, in another possible implementation method of the embodiment of the present application, the above-mentioned third processing unit is specifically used to: obtain labeling data of the detection data of the associated base station; use the detection data of the associated base station and the labeling data of the detection data of the associated base station to update the first threshold, the second threshold and the third threshold.
[0129] Furthermore, in another possible implementation of the embodiment of the present application, the target determination module 302 may specifically include the following submodules:
[0130] The second processing submodule is used to determine at least one stationary target within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station.
[0131] The third processing submodule is used to match the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each stationary target.
[0132] The fourth processing submodule is used to determine the target to be detected based on the matching result corresponding to each stationary target.
[0133] Further, in another possible implementation of the embodiment of the present application, the accident judgment rule includes a first judgment rule, and the third processing submodule may specifically include the following units:
[0134] The first judgment unit is used to judge whether there are other targets within a preset first distance in front of the stationary target according to the detection data of the associated base station.
[0135] The fourth processing unit is configured to determine that, if yes, the stationary target does not match the first judgment rule.
[0136] The fifth processing unit is configured to determine whether the stationary target matches the first judgment rule if no.
[0137] Further, in another possible implementation of the embodiment of the present application, the accident judgment rule includes a second judgment rule, and the third processing submodule may specifically include the following units:
[0138] The second judgment unit is used to judge whether the stationary target is located between the two targets according to the detection data of the associated base station.
[0139] The sixth processing unit is used to determine whether the distance between the stationary target and the rear target is less than a preset distance threshold.
[0140] The seventh processing unit is configured to determine that the stationary target matches the second judgment rule.
[0141] The eighth processing unit is configured to determine, if not, that the stationary target does not match the second judgment rule.
[0142] Further, in another possible implementation of the embodiment of the present application, the accident judgment rule includes a third judgment rule, and the third processing submodule may specifically include the following units:
[0143] The third judgment unit is used to judge whether there is a moving target within a preset second distance in front of the stationary target according to the detection data of the associated base station.
[0144] The ninth processing unit is configured to determine that, if yes, the stationary target matches the third judgment rule.
[0145] The tenth processing unit is configured to determine, if not, that the stationary target does not match the third judgment rule.
[0146] Further, in another possible implementation of the embodiment of the present application, the accident judgment rule includes a fourth judgment rule, and the third processing submodule may specifically include the following units:
[0147] The eleventh processing unit is used to determine the number of targets within a preset third distance in front of the stationary target and the number of targets within a preset third distance behind the stationary target according to the detection data of the associated base station.
[0148] The fourth judgment unit is used to judge whether the difference between the number of targets within a preset third distance in front and the number of targets within a preset third distance in the back is greater than a preset number threshold.
[0149] The twelfth processing unit is configured to determine that, if yes, the stationary target matches the fourth judgment rule.
[0150] The thirteenth processing unit is used to determine that the stationary target does not match the fourth judgment rule if no.
[0151] Further, in another possible implementation of the embodiment of the present application, the accident judgment rule includes a fifth judgment rule, and the third processing submodule may specifically include the following units:
[0152] The fifth judgment unit is used to judge whether there is a pedestrian within the sensing range of the first base station according to the detection data of the associated base station.
[0153] The fourteenth processing unit is configured to determine that, if yes, the stationary target matches the fifth judgment rule.
[0154] The fifteenth processing unit is used to determine that the stationary target does not match the fifth judgment rule if no.
[0155] The accident detection device provided in the embodiment of the present application can be applied in the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0156] Figure 4 Schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 4 As shown, the terminal device 400 of this embodiment includes: at least one processor 410 ( Figure 4 Only one processor is shown in the figure), a memory 420, and a computer program 421 stored in the memory 420 and executable on the at least one processor 410, wherein the processor 410 implements the steps in the above-mentioned accident detection method embodiment when executing the computer program 421.
[0157] The terminal device 400 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 410 and a memory 420. Those skilled in the art will appreciate that Figure 4It is only an example of the terminal device 400 and does not constitute a limitation on the terminal device 400. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.
[0158] The processor 410 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0159] In some embodiments, the memory 420 may be an internal storage unit of the terminal device 400, such as a hard disk or memory of the terminal device 400. In other embodiments, the memory 420 may also be an external storage device of the terminal device 400, such as a plug-in 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 terminal device 400. Further, the memory 420 may also include both an internal storage unit of the terminal device 400 and an external storage device. The memory 420 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 420 may also be used to temporarily store data that has been output or is to be output.
[0160] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0161] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0162] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0163] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0167] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing.
[0168] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An accident detection method, It is characterized in that include: Acquire detection data of associated base stations, wherein the associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within a sensing range of the first base station, and trajectory data of all targets within a sensing range of the second base station; Determine the target to be detected within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station; Based on the detection data of the associated base station, accident detection is performed on the target to be detected.
2. The accident detection method according to claim 1, It is characterized in that The performing accident detection on the target to be detected based on the detection data of the associated base station includes: Based on the detection data of the associated base station, the California algorithm is used to perform accident detection on the target to be detected.
3. The accident detection method according to claim 2, It is characterized in that The performing accident detection on the target to be detected by using the California algorithm based on the detection data of the associated base station includes: Determining the occupancy rate of the first base station according to the trajectory data of all targets within the sensing range of the first base station; determining the occupancy rate of the second base station according to the trajectory data of all targets within the sensing range of the second base station; Accident detection is performed on the target to be detected according to the occupancy rate of the first base station and the occupancy rate of the second base station.
4. The accident detection method according to claim 3, It is characterized in that The determining the occupancy rate of the first base station according to the trajectory data of all targets within the sensing range of the first base station includes: Determine the total length of all targets within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station; The ratio of the total length of all targets within the sensing range of the first base station to the length of the sensing range of the first base station is determined as the occupancy rate of the first base station.
5. The accident detection method according to claim 3, It is characterized in that The performing accident detection on the target to be detected according to the occupancy rate of the first base station and the occupancy rate of the second base station includes: determining an absolute difference between an occupancy rate of the first base station and an occupancy rate of the second base station; Determine a ratio of the absolute difference to the occupancy rate of the first base station and a ratio of the absolute difference to the occupancy rate of the second base station; Determining whether the absolute difference is greater than a first threshold; If yes, determining whether the ratio of the absolute difference to the occupancy rate of the first base station is greater than a second threshold; If yes, determining whether the ratio of the absolute difference to the occupancy rate of the second base station is greater than a third threshold; If so, it is determined that an accident occurs to the target to be detected.
6. The accident detection method according to claim 5, It is characterized in that Before determining whether the absolute difference is greater than a first threshold, the accident detection method further includes: Acquire reference test data and annotated data of the reference test data; Using the reference detection data and the annotated data of the reference detection data, training a preset machine learning model to obtain an accident prediction model; Based on the accident prediction model, the first threshold, the second threshold and the third threshold are obtained.
7. The accident detection method according to claim 6, It is characterized in that If so, after determining that an accident has occurred on the target to be detected, the accident detection method further includes: Acquire the label data of the detection data of the associated base station; The first threshold, the second threshold and the third threshold are updated by using the detection data of the associated base station and the annotated data of the detection data of the associated base station.
8. The accident detection method according to claim 1, It is characterized in that The determining, according to the trajectory data of all targets within the sensing range of the first base station, the target to be detected within the sensing range of the first base station includes: Determine at least one stationary target within the sensing range of the first base station according to the trajectory data of all targets within the sensing range of the first base station; Matching the detection data of the associated base station with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets; The target to be detected is determined based on the matching result corresponding to each of the stationary targets.
9. The accident detection method according to claim 8, It is characterized in that The accident judgment rule includes a first judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets, including: Determining, based on the detection data of the associated base station, whether there are other targets within a preset first distance in front of the stationary target; If yes, determining that the stationary target does not match the first judgment rule; If not, it is determined that the stationary target matches the first judgment rule.
10. The accident detection method according to claim 8, It is characterized in that The accident judgment rule includes a second judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets, including: determining, based on the detection data of the associated base station, whether the stationary target is located between two targets; If yes, determining whether the distance between the stationary target and the target behind is less than a preset distance threshold; If yes, determining that the stationary target matches the second judgment rule; If not, it is determined that the stationary target does not match the second judgment rule.
11. The accident detection method according to claim 8, It is characterized in that The accident judgment rule includes a third judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets, including: Determining whether there is a moving target within a preset second distance in front of the stationary target according to the detection data of the associated base station; If yes, determining that the stationary target matches the third judgment rule; If not, it is determined that the stationary target does not match the third judgment rule.
12. The accident detection method according to claim 8, It is characterized in that The accident judgment rule includes a fourth judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets, including: Determine, based on the detection data of the associated base station, the number of targets within a preset third distance in front of the stationary target, and the number of targets within a preset third distance behind the stationary target; Determine whether the difference between the number of targets within a preset third distance in front and the number of targets within a preset third distance in the rear is greater than a preset number threshold; If yes, determining that the stationary target matches the fourth judgment rule; If not, it is determined that the stationary target does not match the fourth judgment rule.
13. The accident detection method according to claim 8, It is characterized in that The accident judgment rule includes a fifth judgment rule, and the detection data of the associated base station is matched with the accident judgment rule to obtain a matching result corresponding to each of the stationary targets, including: Determining whether there is a pedestrian within the sensing range of the first base station according to the detection data of the associated base station; If yes, determining that the stationary target matches the fifth judgment rule; If not, it is determined that the stationary target does not match the fifth judgment rule.
14. An accident detection device, It is characterized in that include: A data acquisition module, configured to acquire detection data of associated base stations, wherein the associated base stations include a first base station and a second base station, and the detection data of the associated base stations include trajectory data of all targets within a sensing range of the first base station, and trajectory data of all targets within a sensing range of the second base station; a target determination module, configured to determine a target to be detected within a sensing range of the first base station according to trajectory data of all targets within a sensing range of the first base station; The accident detection module is used to perform accident detection on the target to be detected based on the detection data of the associated base station.
15. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 13 is implemented.
16. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.