Vehicle collision early warning method and device, electronic equipment and storage medium

By obtaining the signal light status and the driving direction of the target vehicle in the intersection scene, dynamically determine the hazard warning area and determine the warning method based on the number of target objects, the limitations of relying on single distance calculation in the existing technology are solved, and more accurate and advanced The vehicle collision warning improves road safety and rescue efficiency.

CN119418553APending Publication Date: 2025-02-11NORTH CHINA INST OF AEROSPACE ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411943035.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the intersection scenario, the existing technology relies on a single dimension - the linear distance calculation between the target vehicle and the potential interfering vehicle, and cannot effectively warn of the vehicle collision risk, and the warning range is limited, making it difficult to achieve early warning, affecting road safety and rescue efficiency, affecting road safety and rescue efficiency .

Method used

By obtaining the signal light status information in the driving direction of the target vehicle and the current driving road, a hazard warning area is determined, and the warning method is determined based on the number of target objects in the area to conduct early warning. This method combines the status of the signal light and driving direction to dynamically adjust the warning area and mode to improve the accuracy and advancement of the warning.

Benefits of technology

Effectively predict the possible collision risks of target vehicles when running red lights, provide early warnings, reduce traffic accident risks, improve vehicle safety, and improve traffic safety levels at intersections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418553A_ABST
    Figure CN119418553A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle collision early warning method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the state information of a signal lamp in the driving direction of a target vehicle and the current driving road of the target vehicle; under the condition that the signal lamp state information is not matched with the driving direction, a danger early warning area is determined based on a passage allowing road and a driving road corresponding to the signal lamp state, and the passage allowing road is different from the driving road; obtaining the number of target objects with collision risks in the danger early warning area; and determining a target early warning mode according to the number of the objects, and performing early warning according to the target early warning mode. According to the embodiment of the invention, the risk of traffic accidents between the target vehicle and the target object in the red light running state can be reduced, the passing efficiency and safety of the ambulance can be improved, and the traffic safety level of the intersection can be integrally improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent driving, and in particular to a vehicle collision warning method, device, electronic device and storage medium. Background Art

[0002] As a common medical special vehicle in residents' lives, ambulances have high-risk driving behaviors at intersections due to their special mission attributes, such as not following the instructions of traffic lights, which can easily lead to conflicts with other vehicles. This undoubtedly significantly increases the risk of traffic accidents, which may lead to loss of life and property. Therefore, how to effectively prevent accidents when ambulances pass through intersections is one of the important issues that need to be solved urgently.

[0003] In the intersection scenario, due to the large difference between this scenario and the long straight road following scenario, if the collision warning mechanism is implemented by relying only on a single dimension, that is, the straight-line distance measurement between the ambulance and the potential interfering vehicle, its limitations are significant. In the intersection scenario, the diversity of vehicle driving directions and the dynamic control of traffic lights lead to the complex and changeable relative motion state of the ambulance and the interfering vehicle. This warning method based only on distance has a greatly reduced accuracy in predicting collision risks. In addition, the effective warning range of this method is often limited to the stage when the two vehicles are very close, and it is difficult to achieve early warning, thus limiting its potential in improving road safety and rescue efficiency. For ambulance drivers, if they only rely on intuitive judgment of the driving trajectory of the vehicle in the direction of the oncoming vehicle and adopt an overly conservative waiting strategy, although potential conflicts can be avoided to a certain extent, precious emergency time may be sacrificed in unnecessary circumstances, which has a negative impact on the timeliness of emergency rescue missions. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a vehicle collision warning method, device, electronic device and storage medium.

[0005] In a first aspect, the present application provides a vehicle collision warning method, comprising: Obtaining the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; In the case where the signal light state information does not match the driving direction, determining a danger warning area based on a passable road corresponding to the signal light state and the driving road, the passable road being different from the driving road; Acquire the number of target objects with collision risk in the danger warning area; A target early warning method is determined according to the number of objects, and an early warning is issued according to the target early warning method.

[0006] Optionally, determining a target warning method according to the number of target objects includes: Determining whether the number of objects is greater than or equal to a preset number threshold; If the number of objects is greater than or equal to a preset number threshold, the target warning mode is determined to be the first warning mode.

[0007] Optionally, determining the target warning method according to the number of target objects further includes: If the number of the objects is less than a preset number threshold, obtaining the first driving state information of the target vehicle and the second driving state information of each of the target objects; Determine the collision risk information between the target vehicle and any of the target objects according to the first driving state information of the target vehicle, the second driving state information of each of the target objects, and the signal light state information; If it is determined according to the collision risk information that there is a collision risk between the target vehicle and any target object, the target warning mode is determined to be the second warning mode.

[0008] Optionally, determining the collision risk information between the target vehicle and any of the target objects according to the first driving state information of the target vehicle, the second driving state information of each of the target objects, and the signal light state information includes: Based on the first driving state information of the target vehicle, the second driving state information of each target object, the signal light state information and a preset trajectory prediction model, determining a first predicted driving trajectory of each target object in a preset future time period; Determine a second predicted driving trajectory of the target vehicle in a preset future time period based on the first driving state information and the motion equation; According to the first predicted driving trajectory, the second predicted driving trajectory and a preset collision detection algorithm, it is determined whether the target vehicle and each target object will collide within a preset time period in the future, and the collision risk information is obtained.

[0009] Optionally, based on the first driving state information of the target vehicle, the second driving state information of each target object, the signal light state information and a preset trajectory prediction model, determining a first predicted driving trajectory of each target object in a preset time period in the future includes: Determine the target object based on the first driving state information of the target vehicle, the second driving state information of each target object and the signal light state information step historical motion data, the distance between the target object and the target vehicle step relative to the historical motion data, the remaining time for the green light distance of the traffic light corresponding to the driving direction of the target object to change, the target object Step historical movement data; The target object step historical motion data, the distance between the target object and the target vehicle step 1 relative historical motion data, the distance between the target object and the target vehicle step 2 relative historical motion data, the remaining time of the green light distance change in the signal light corresponding to the driving direction of the target object, and the target object step historical motion data, inputting the preset trajectory prediction model so that the preset trajectory prediction model outputs the future trajectory prediction value of the target object and the category probability of the future trajectory prediction value; A first predicted driving trajectory of each of the target objects in a preset future time period is determined according to the future trajectory prediction value and the category probability.

[0010] Optionally, the preset trajectory prediction model includes: a scale coefficient generation module, an improved backbone network, a feedforward neural network module, a splicing module and a trajectory classification module, wherein the multi-head self-attention module in the improved backbone network is replaced by a variable-scale self-attention module; The scale factor generating module is based on the distance between the target object and the target vehicle. Step 2: Determine the scale coefficient vector based on the remaining time of the green light distance change in the traffic light corresponding to the historical motion data and the driving direction of the target object; The improved backbone network is based on the scale coefficient vector, the target object step historical motion data, the distance between the target object and the target vehicle Step 1: Determine the trajectory feature sequence relative to the historical motion data; The feedforward neural network module determines a future trajectory prediction value of the target object based on the trajectory feature sequence; The splicing module is based on the future trajectory prediction value and the target object The historical motion data of each step determines the trajectory feature matrix; The trajectory classification module determines the class probability based on the trajectory feature matrix.

[0011] Optionally, determining the danger warning area based on the allowed roads corresponding to the signal light state and the driving road includes: Determine the intersection coordinates of the driving road and the road intersection of the driving road; Obtaining an estimated time for the target vehicle to arrive at the road intersection and a speed range for the target object to pass through the road intersection; Determining an estimated distance range according to the estimated duration and the speed range; The danger warning area is determined according to the estimated distance range and the intersection coordinates.

[0012] In a second aspect, the present application provides a vehicle collision warning device, comprising: A first acquisition module is used to acquire the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; A first determination module is used to determine a danger warning area based on a passable road corresponding to the signal light state and the driving road when the signal light state information does not match the driving direction, the passable road being different from the driving road; A second acquisition module is used to acquire the number of target objects with collision risks in the danger warning area; The warning module is used to determine a target warning method according to the number of objects and issue a warning according to the target warning method.

[0013] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement any vehicle collision warning method described in the first aspect when executing the program stored in the memory.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program of a vehicle collision warning method is stored. When the program of the vehicle collision warning method is executed by a processor, the steps of the vehicle collision warning method described in any one of the first aspects are implemented.

[0015] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: The embodiment of the present application can determine the danger warning area based on the allowed roads and driving roads corresponding to the signal light status in response to the situation where the signal light status information does not match the driving direction of the target vehicle, and then determine the corresponding target warning method and issue a warning based on the number of target objects that may collide with the target vehicle in the danger warning area. The present application can predict the possible collision risk of the target vehicle in the state of running a red light, so as to provide timely warning before the potential risk occurs, reduce the risk of traffic accidents between the target vehicle and the target object in the state of running a red light, and improve the safety of the target vehicle and the target object. It can not only improve the travel efficiency and safety of ambulances, but also improve the overall traffic safety level of intersections, which has important social and economic value, and the method provides more reliable technical support for the construction of future intelligent transportation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 A flow chart of a vehicle collision warning method provided in an embodiment of the present application; Figure 2 A schematic diagram of a scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 3 A schematic diagram of another scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 4 A schematic diagram of another scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 5 A schematic diagram of another scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 6 A schematic diagram of another scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 7 A schematic diagram of another scenario in which the state of a traffic light is inconsistent with the direction of travel of an ambulance provided in an embodiment of the present application; Figure 8 A schematic diagram of the principle of multiplying the triangular attention coefficient matrix by the scale coefficient provided in an embodiment of the present application; Fig. 9 A schematic diagram of a misidentification scenario is provided for an embodiment of the present application; Fig.10 A structural diagram of a trajectory prediction model is provided for an embodiment of the present application; Fig.11 A structural diagram of a scale factor generation module is provided for an embodiment of the present application; Fig.12 A structural diagram of a CBAM is provided for an embodiment of the present application; Fig.13 A structural diagram of a series connection channel attention module and a spatial attention module in a CBAM is provided for an embodiment of the present application; Fig.14 A structural diagram of a trajectory classification module is provided for an embodiment of the present application; Fig.15 A structural diagram of a multi-scale convolution module is provided for an embodiment of the present application; Fig.16 A schematic diagram of an application scenario in which an ambulance is traveling straight, the signal light in the Y direction is a red light for traveling straight, and the signal light in the X direction is a green light for traveling straight is provided for an embodiment of the present application; Fig.17 A flowchart of a vehicle collision warning method in practical application provided by an embodiment of the present application; Fig.18 A simulation result diagram for predicting the trajectories of the ambulance and the jammer; Fig.19 Another simulation result diagram for predicting the trajectories of the ambulance and the jammer vehicle; Fig. 20 Another simulation result diagram for predicting the trajectories of the ambulance and the jammer vehicle; Fig.21 A structural diagram of a vehicle collision warning device provided in an embodiment of the present application; Fig. 22 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0020] In the crossroads scenario, since this scenario is quite different from the long straight road following scenario, if the collision warning mechanism is implemented by relying only on a single dimension, that is, the straight-line distance measurement between the ambulance and the potential interfering vehicle, its limitations are significant. In the crossroads scenario, the diversity of vehicle driving directions and the dynamic control of traffic lights lead to the complexity and variability of the relative motion state between the ambulance and the interfering vehicle. This warning method based only on distance has a greatly reduced accuracy in predicting collision risks. In addition, the effective warning range of this method is often limited to the stage where the two vehicles are very close, and it is difficult to achieve early warning, thereby limiting its potential in improving road safety and rescue efficiency. For ambulance drivers, if they only rely on intuitive judgment of the driving trajectory of the vehicle in the direction of the vehicle and adopt an overly conservative waiting strategy, although potential conflicts can be avoided to a certain extent, precious emergency time may be sacrificed in unnecessary situations, which has a negative impact on the timeliness of emergency rescue tasks. To this end, the embodiments of the present application provide a vehicle collision warning method, device, electronic device and storage medium.

[0021] The embodiment of the present application provides a vehicle collision warning method, which is applicable to a large crossroad section with a traffic light. The vehicle collision warning method can be applied to an electronic device arranged on a vehicle, such as Figure 1 As shown, the vehicle collision warning method may include the following steps: Step S101, obtaining the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; In the embodiment of the present application, the target vehicle is the self-vehicle, which refers to a special vehicle that does not drive in accordance with traffic regulations (such as an ambulance, fire truck, police car, engineering rescue vehicle, military supervision vehicle, etc.), the driving direction of the target vehicle can refer to the front direction of the target vehicle, the signal light status information can refer to the current status information of the signal light facing the front of the target vehicle, such as: red light and countdown, green light and countdown, or yellow light and countdown, etc., and the current driving road can refer to the road on which the target vehicle is currently driving and has not reached the traffic light.

[0022] The first set of high-definition cameras can be installed at the front of the vehicle to detect the status of the traffic lights; millimeter-wave radars are installed at the front, left and right sides of the vehicle body to measure the position and speed of the target object itself; the target vehicle's own GPS / Beidou satellite positioning system and vehicle speed sensor are used to monitor the target vehicle's own position and speed; the target vehicle is also equipped with an NVIDIA Jetson Xavier NX edge computing box to receive sensor signals and perform data processing, image recognition and early warning calculations.

[0023] In this step, when the target vehicle arrives at the intersection, the current status of the traffic lights at the intersection is detected. Furthermore, a high-definition camera can be used to capture the image of the traffic lights at the intersection, and then the color and countdown status of the traffic lights can be identified through an image processing algorithm to obtain the traffic light status information; the current driving route of the target vehicle can be determined through the GPS / Beidou satellite positioning system.

[0024] Step S102, when the signal light state information does not match the driving direction, determining a danger warning area based on the allowed road corresponding to the signal light state and the driving road, the allowed road being different from the driving road; In the embodiment of the present application, the mismatch between the signal light status information and the driving direction means that the current permitted passing direction of the signal light is different from the driving direction. For example, the target vehicle is an ambulance. Figures 2 to 7 As shown in the figure, the scenarios with different traffic light states and ambulance driving directions can be divided into 6 sub-scenarios (for the convenience of description, an XOY coordinate system is established at the intersection, and when the ambulance arrives at the intersection, the front of the car is facing the Y direction): (1) If Figure 2 As shown, the ambulance is going straight, the signal light in the Y direction is a red light for going straight, and the signal light in the X direction is a green light for going straight; (2) If Figure 3 As shown, the ambulance is going straight, the signal light in the Y direction is a red light for going straight, and the signal light in the X direction is a green light for turning left; (3) If Figure 4 As shown, the ambulance turns left, the signal light in the Y direction is a red light for turning left, and the signal light in the X direction is a green light for going straight; (4) If Figure 5 As shown, the ambulance turns left, the signal light in the Y direction is a red light for turning left, and the signal light in the X direction is a green light for turning left; (5) If Figure 6 As shown, the ambulance turns left, and the signal light in direction Y is red for left turn and green for straight ahead; (6) If Figure 7 As shown, the ambulance is going straight, and the traffic light in direction Y is red for going straight and green for turning left.

[0025] When the traffic light status information matches the driving direction, that is, when the direction currently allowed by the traffic light is the same as the driving direction, no subsequent processing is required and the target vehicle can pass normally.

[0026] In this step, the coordinates of the intersection of the driving road and the road intersection of the driving road can be determined; the estimated time for the target vehicle to reach the road intersection and the speed range of the target object passing through the road intersection can be obtained; the estimated distance range can be determined based on the estimated time and the speed range; and the danger warning area can be determined based on the estimated distance range and the intersection coordinates.

[0027] That is to say, the lane of the passing vehicle (i.e. the allowed road) can be determined based on the current traffic light status information, and the intersection (i.e. the collision point) of the lane and the lane (i.e. the driving road) that the target vehicle is going to pass is determined. According to the set target vehicle speed, body length and width, and lane width, the speed range of the target object is preset, and the position coordinate range of the target object on the allowed road that may reach the collision point at the same time as the target vehicle is calculated. This range is the danger warning area.

[0028] Since the camera is installed at a certain height and has vertical and horizontal field of view angles, the projection width of the lane in the image, that is, the lane width, can be calculated through the camera's installation height, pitch angle and yaw angle and using geometric relationships.

[0029] Step S103, obtaining the number of target objects with collision risk in the danger warning area; The target object may refer to a vehicle, a motorcycle, etc. A second set of high-definition cameras is also provided at the front end of the target vehicle to identify the number of target objects within the danger warning area.

[0030] Identification of target objects in the danger warning area: The YOLOv8 algorithm is used for vehicle detection, and the open source traffic dataset Argoverse is used for model training to ensure that the model can efficiently identify target objects. The trained model file is saved on the Jetson Xavier NX, the YOLOv8 model is loaded using PyTorch, and the parameters and configurations of the model are initialized to ensure that it can run efficiently on the Jetson Xavier NX. Video frames are captured from the camera, and the YOLOv8 model is used for target object detection. Each frame of the image is input into the YOLOv8 model for target object detection, and the detection results are obtained, including the bounding box, category, and confidence of the target object. According to the set danger warning area, the target objects in the area are further screened, and the detection results that are not in the danger warning area are filtered out. Only the number of target objects in the danger warning area is counted.

[0031] Step S104, determining a target warning method according to the number of objects, and issuing a warning according to the target warning method.

[0032] The number of objects in the danger warning area is different, and the probability of collision with the target vehicle is different. Therefore, the corresponding level of target warning method can be set according to the different numerical ranges of the number of objects to help the driver of the target vehicle make a decision.

[0033] Exemplarily, two groups of buzzers can be set on the target vehicle, one group is set as intermittent alarm for the first-level warning, and the other group is set as continuous alarm for the second-level warning. This is to distinguish the warning prompts at different levels. By designing a two-level warning system, appropriate warnings are provided at different risk levels, avoiding the problem of excessive or insufficient warnings.

[0034] The embodiment of the present application can determine the danger warning area based on the allowed roads and driving roads corresponding to the signal light status in response to the situation where the signal light status information does not match the driving direction of the target vehicle, and then determine the corresponding target warning method and issue a warning based on the number of target objects that may collide with the target vehicle in the danger warning area. The present application can predict the possible collision risk of the target vehicle in the state of running a red light, so as to provide timely warning before the potential risk occurs, reduce the risk of traffic accidents between the target vehicle and the target object in the state of running a red light, and improve the safety of the target vehicle and the target object. It can not only improve the travel efficiency and safety of ambulances, but also improve the overall traffic safety level of intersections, which has important social and economic value, and the method provides more reliable technical support for the construction of future intelligent transportation systems.

[0035] In another embodiment of the present application, step S104 determines the target warning method according to the number of the target objects, including: Step S201, determining whether the number of objects is greater than or equal to a preset number threshold; The preset number threshold can be a pre-set number of vehicles with a higher collision risk, such as 3, 5, 10, etc. Different preset number thresholds can be set according to the size of the danger warning area to more accurately measure the collision risk and improve the traffic efficiency of the target vehicle while ensuring the safety of the target vehicle and the target object.

[0036] Step S202: If the number of objects is greater than or equal to a preset number threshold, determine that the target warning mode is the first warning mode.

[0037] Exemplarily, when the number of objects is greater than or equal to 3, if the target vehicle continues to move, the probability of a traffic accident is high, and the first-level warning system issues a first-level warning (such as stopping and waiting).

[0038] In the embodiment of the present application, when the number of target objects that may collide with the target vehicle in the danger warning area is large, the first warning mode can be determined as the target warning mode, so as to notify the driver of the target vehicle through the first warning mode not to continue to run a red light, thereby reducing the risk of traffic accidents involving the target vehicle in the red light running state and improving the safety of the target vehicle and the target objects.

[0039] In another embodiment of the present application, step S104 determines the target warning method according to the number of the target objects, and further includes: Step S301, if the number of the objects is less than a preset number threshold, obtaining the first driving state information of the target vehicle and the second driving state information of each of the target objects; Exemplarily, when the number of objects is less than 3, the first-level warning system issues a passable prompt, and the target vehicle continues to pass through the intersection.

[0040] The first driving state information may include: position information and speed information of the target vehicle, etc., and the second driving state information may include: position information and speed information of the target object, etc.

[0041] The embodiment of the present application can detect the driving status of target objects around the target vehicle (i.e., vehicles that may collide with the target vehicle) in real time. Furthermore, the target objects around the target vehicle can be detected and tracked by combining millimeter-wave radar and high-definition camera. The millimeter-wave radar provides distance and speed data, the camera recognizes the vehicle in the image through the YOLOv8 algorithm, and the NVDIA Jetson Xavier NX edge computing box processes the received data. The system outputs the driving status information such as the position and speed of the target object in real time.

[0042] Step S302, determining collision risk information between the target vehicle and any of the target objects according to the first driving state information of the target vehicle, the second driving state information of each of the target objects, and the signal light state information; In this step, the first predicted driving trajectory of each target object in a future preset time period can be determined based on the first driving state information of the target vehicle, the second driving state information of each target object, the traffic light state information and a preset trajectory prediction model; the second predicted driving trajectory of the target vehicle in a future preset time period can be determined based on the first driving state information and the motion equation; and according to the first predicted driving trajectory, the second predicted driving trajectory and a preset collision detection algorithm, it is determined whether the target vehicle and each target object will collide in the future preset time period to obtain the collision risk information.

[0043] In practical applications, the position and speed information of the first target object in the danger warning area, the position and speed information of the target vehicle itself, and the remaining seconds of the green light in the direction of travel of the target object can be obtained in real time, and the trained trajectory prediction model can be input to predict the future trajectory of the target object. The target vehicle's future trajectory is calculated based on the equation of motion. Based on the trajectory prediction information of the two vehicles, the OBB collision detection algorithm is used to calculate the collision between the two vehicles in the future. If the detection result shows that there is a risk of collision, a secondary warning prompt is issued to remind the driver to stop. If it is detected that the first target object has passed the collision point, the driving status information of the second target object is obtained, and the same method is used to predict and warn.

[0044] Wherein, based on the first driving state information of the target vehicle, the second driving state information of each target object, the signal light state information and a preset trajectory prediction model, determining a first predicted driving trajectory of each target object in a preset time period in the future includes: Determine the target object based on the first driving state information of the target vehicle, the second driving state information of each target object and the signal light state information step historical motion data, the distance between the target object and the target vehicle step relative to the historical motion data, the remaining time for the green light distance of the traffic light corresponding to the driving direction of the target object to change, the target object step historical motion data of the target object; step historical motion data, the distance between the target object and the target vehicle step 1 relative historical motion data, the distance between the target object and the target vehicle step 2 relative historical motion data, the remaining time of the green light distance change in the signal light corresponding to the driving direction of the target object, and the target object The preset trajectory prediction model is input with the historical motion data of the step, so that the preset trajectory prediction model outputs the future trajectory prediction value of the target object and the category probability of the future trajectory prediction value; and the first predicted driving trajectory of each target object in the future preset time period is determined according to the future trajectory prediction value and the category probability.

[0045] For example, it is known Moment target object past Historical movement data of the step, including the horizontal and vertical coordinates at each moment and its speed , combined with the relative motion data between the target object and the target vehicle, including the relative position and relative speed And the signal light status information, including the signal light status category of the target object's driving direction and the remaining time of the green light The predicted trajectory coordinates of the target object are also known as the future trajectory prediction values. .

[0046] Among them, the future of the target vehicle is calculated based on the motion equation Based on the trajectory prediction information of the two vehicles, the OBB collision detection algorithm is used to calculate the collision between the two vehicles in the future. Whether a collision will occur at this moment is as follows: Get the future predicted by the trajectory prediction model The coordinates of the target object at the moment, the kinematic equations for the future The coordinates of the target vehicle at the moment, as well as the rectangular bounding box defined according to the length and width of the vehicle, are then converted into an OBB to reflect the actual direction and position of the vehicle. When constructing an OBB, it is necessary to calculate the four corner points of each vehicle and construct a directional bounding box based on these points. In order to detect potential collisions, the separating axis theory (SAT) is applied to detect potential collisions, calculate the normal vectors on the boundary of each OBB, these vectors constitute the separating axes, and project the vertices of each OBB onto these separating axes. Check whether the projections of the two OBBs on these separating axes overlap. If the projections of the OBBs overlap on all selected separating axes, the two OBBs are considered to intersect and there is a risk of collision; otherwise, the vehicles will not collide at that moment.

[0047] The trajectory prediction model in the embodiment of the present application includes 3 inputs: Input 1: Target object’s Step historical motion data and the two vehicles Step relative historical motion data: The vehicle motion information at any time in the sequence is expressed as , and for The horizontal and vertical coordinates of the target object in the road section reference system at the moment, and For the target object The absolute lateral velocity and the absolute longitudinal velocity at the moment. and for The lateral relative position and longitudinal relative position of the target object and the target vehicle at the moment, and For the target object and the target vehicle The lateral relative velocity and longitudinal relative velocity at the moment.

[0048] Position encoding: Since the vehicle's motion data is a set of time series data, it has a sequence, so the input 1 also needs to add the time sequence information, and the time information of the sequence is added by position embedding. For the time information of the input sequence, sine and cosine encoding position embedding is used to retain all the time series information:

[0049] In the formula, Indicates time, and The first and Dimensions, .

[0050] Input 2: Two cars The relative historical motion data and the remaining seconds of the green light in the direction of the target object. The vehicle motion information at any time in the sequence is expressed as , and For the time The horizontal and vertical relative positions of the target object and the target vehicle are recorded. and For the target object and the target vehicle The lateral relative velocity and longitudinal relative velocity at the moment. for The remaining seconds of the green light in the direction of the target object's travel.

[0051] Function of input 2: X2 is input to the scale coefficient generation module to generate a scale coefficient vector for the variable scale self-attention module of the backbone network. Specifically, the motion state of the target vehicle relative to the target object and the remaining seconds of the green light in the target object's driving direction will affect the front-to-back correlation of the position coordinates at different times in the target object's trajectory. For example, the closer the relative position of the target vehicle and the target object is, the more likely it is that the target object will suddenly change its driving state, and the front-to-back correlation of its trajectory sequence will become weaker; if the remaining seconds of the green light in the target object's driving direction are too few, it may cause the target object to change its original uniform driving state to accelerated driving, and the front-to-back correlation of its trajectory sequence will also become weaker.

[0052] The conventional self-attention module linearly transforms the input matrix to generate the query matrix Query, the key matrix Key and the value matrix Value to perform attention calculation and obtain the global self-attention feature map. The attention coefficient is calculated between any two moments of the vehicle's historical motion data. In fact, this global self-attention is not suitable for trajectory sequences: the motion state at the later moment will not affect the motion state at the previous moment, so the elements of the lower triangle of the attention coefficient matrix are masked; each motion state at the historical moment does not affect the motion trajectory at the later moment, and needs to be adjusted according to the actual situation. Therefore, a scale coefficient generation module is used to generate a length of The scaling coefficient vector B , to trade off the attention coefficient between two moments. Vector BEach element of is between 0 and 1, and the number of elements in each column of the upper triangular attention coefficient matrix is ​​multiplied by B The corresponding scale factor in is the number of elements that need to be retained in the column, such as Figure 8 shown.

[0053] Assume that the scale factor generation module generates a scale factor vector:

[0054] The number of valid elements in each column of the original upper triangular attention coefficient matrix:

[0055] Vector B and N Multiply the corresponding elements of 0 and round up to get:

[0056] In each column of the self-attention coefficient matrix, 1, 2, 3, 4, 4, 1, 2, 4, and 5 elements are retained respectively, and the remaining elements will be masked.

[0057] Input 3: Target object's Step historical motion data: The vehicle motion information at any time in the sequence is expressed as , and for The horizontal and vertical coordinates of the target object in the road section reference system at that moment.

[0058] Enter 3 as the target object The historical trajectory of the steps is combined with the future prediction of the target object by the backbone network. Step trajectories are concatenated and input into the trajectory classification module, which outputs the trajectory category (straight ahead, left turn, right turn), and uses the category probability to guide the network parameter learning.

[0059] Design purpose: Since the target object is at an intersection with a traffic light, its trajectory trend is determined by the traffic light. Under the influence of the target vehicle, the trajectory of the target object will be adjusted relative to the ideal trajectory, but the trajectory trend will not change. Specifically, when the target object itself is in a straight state, the trajectory will be adjusted, but it is impossible to turn left or right due to the adjustment of the trajectory. Therefore, the trajectory category corresponding to the traffic light state is used to guide the training of the network to prevent the prediction model from misjudging the future trajectory of the target object when the target object avoids the target vehicle. Fig. 9As shown in the figure, the actual trajectory of the target object is a vertical dotted line trajectory. Due to the influence of the target vehicle on the side, the middle track bends to the left. Without the guidance of the trajectory category, it is easy to mispredict it as Fig. 9 The dotted line in the middle is a left turn. When the model is added with the trajectory category guidance corresponding to the traffic light, the probability of the model predicting a left turn or right turn instead of a straight track will be reduced.

[0060] The trajectory prediction model contains 2 outputs: Output 1: The trajectory prediction model output 1 is expressed as ,in For the future The predicted value of the target object trajectory at time t, is the prediction time domain. The vehicle motion information at any time in the sequence is expressed as , and for The horizontal and vertical coordinates of the target object in the road section reference system at that moment.

[0061] Output 2: . is the category probability of the current target object’s driving trajectory (straight ahead, left turn, right turn).

[0062] Step S303: If it is determined according to the collision risk information that there is a collision risk between the target vehicle and any target object, the target warning mode is determined to be the second warning mode.

[0063] In the embodiment of the present application, the intensity of the second warning method (such as volume, continuous occurrence duration, sound sharpness, etc.) is greater than the first warning method.

[0064] The embodiment of the present application can obtain the status of the dangerous target object locked in the first-level warning module and its own status in real time, and predict the trajectory of the target object in real time through an innovative trajectory prediction model, and use the predicted trajectory to perform collision detection on the two vehicles based on the bounding box method, and provide a safety warning for the ambulance according to the detection results.

[0065] In another embodiment of the present application, the preset trajectory prediction model includes: a scale coefficient generation module, an improved backbone network, a feedforward neural network module, a splicing module and a trajectory classification module, wherein the multi-head self-attention module in the improved backbone network is replaced by a variable-scale self-attention module; The scale factor generating module is based on the distance between the target object and the target vehicle. Step 2: Determine the scale coefficient vector based on the remaining time of the green light distance change in the traffic light corresponding to the historical motion data and the driving direction of the target object; The improved backbone network is based on the scale coefficient vector, the target object step historical motion data, the target object and the target vehicle Step 1: Determine the trajectory feature sequence relative to the historical motion data; The feedforward neural network module determines the future trajectory prediction value of the target object based on the trajectory feature sequence; The splicing module is based on the future trajectory prediction value and the target object The historical motion data of each step determines the trajectory feature matrix; The trajectory classification module determines the class probability based on the trajectory feature matrix.

[0066] In the embodiment of the present application, the preset trajectory prediction model uses the encoder part of the transformer as the backbone network, and makes improvements on this basis. The overall structure of the trajectory prediction model is as follows: Fig.10 shown.

[0067] (1) The multi-head self-attention module of the original network is replaced by an innovative variable-scale self-attention module. B , mask out some elements in the self-attention coefficient matrix, change the original global attention to a variable range of local attention, which is more in line with the actual situation and reduces the amount of network calculation. B Provided by the scale factor generation module.

[0068] (2) Scale coefficient generation module Scale coefficient generation module: used to learn a scale coefficient vector for use by the variable scale self-attention module. The historical data of each step is combined with the remaining seconds of the green light in the driving direction of the target object at each moment to form The matrix is ​​taken as input, passes through the convolution layer, Relu activation function, CBMA attention module, and then average pooling is performed on the channel to regain The matrix is ​​then transformed into , and adjust the vector elements to between 0 and 1 through the sigmoid function, so as to obtain a vector with a length of The scaling coefficient vector B The scale factor generation module is as follows: Fig.11 shown.

[0069] In the convolution layer, the convolution kernel size used is 3×3, the number of convolution kernels is 32, and padding is used to ensure that the output size is not reduced.

[0070] CBAM (Convolutional Block Attention Module) is an attention mechanism module that combines channel attention and spatial attention. It improves the performance of the model by adaptively learning the importance of different channels and spatial positions in the feature map. CBAM achieves weighting of input data by connecting the channel attention module and the spatial attention module in series, thereby focusing on important feature information. Its principle diagram is shown in the figure below. Fig.12 and Fig.13 shown.

[0071] This application uses the relative motion information of the two vehicles and the traffic light status information to adjust the scale of the self-attention module, so that the network learning is more in line with the actual situation, while reducing the amount of calculation and improving the prediction speed.

[0072] (3) The output part is changed to double output: After the backbone network passes through Nx encoder outputs and then passes through a fully connected neural network, we get The matrix , that is, the target object to be predicted in the future The trajectory of the steps.

[0073] The target object The historical trajectory X3 and the predicted trajectory Splice, get The matrix is ​​input into the trajectory classification module. After the coordinate rotation module, multi-scale convolution module, Relu activation function, fully connected neural network, linear layer, and softmax function, a vector of length 3 is obtained, which corresponds to the probability that the trajectory belongs to (straight line, left turn, right turn). The probability of the trajectory category corresponding to the traffic light state in the current target object direction is taken as the second output of the network. . The role of is to guide the training of trajectory prediction network parameters. The trajectory classification module is as follows Fig.14 shown.

[0074] Among them, the coordinate change module rotates the coordinates of the target object counterclockwise by a corresponding angle according to the different positions of the target object for subsequent classification. Figures 2 to 7 In the coordinate system defined in the sub-scene in , the rotation angle of the target object coordinates is shown in Table 1: Table 1 Target object location The angle of the coordinate to rotate counterclockwise X-axis negative direction 0 X-axis positive direction 180 Positive direction of Y axis 90 The coordinate rotation formula is:

[0075] The multi-scale convolution module contains four convolution kernels of different sizes, which use different receptive fields to better extract the features of the trajectory. Padding is used in all convolutions to ensure the consistency of the output size. After concatenating the four convolution results, a four-channel three-dimensional matrix is ​​obtained, which is average pooled in the channel direction, restored to a two-dimensional matrix, and then output to the next module, such as Fig.15 shown.

[0076] The loss function of the trajectory prediction network is: The loss function consists of loss1 corresponding to output 1 and loss2 corresponding to output 2, and λ is an adjustable hyperparameter. Loss2 guides the training of trajectories by constraining the categories of trajectories. The loss function of the entire trajectory prediction model is:

[0077] in, and For prediction The horizontal and vertical coordinates of the target object in the road section reference system at the moment, and For real The horizontal and vertical coordinates of the target object in the road section reference system at the moment, For the prediction time.

[0078] Model evaluation index: The trajectory prediction module selects the root mean square error RMSE (denoted as ) evaluates the deviation between the predicted trajectory and the actual trajectory, The smaller the value, the smaller the gap between the predicted value and the actual observed value, which means the prediction is more accurate.

[0079] The calculation formula is:

[0080] Where M is the total number of test sets, and They represent the true coordinates and predicted coordinates of the trajectory respectively.

[0081] The embodiment of the present application uses trajectory categories to guide network training, fully utilizing the special advantages of the scene of an intersection with traffic lights, and improving the accuracy of trajectory prediction.

[0082] Training of trajectory prediction model: Based on the Carla simulation software, a virtual simulation experimental scene of driving at an intersection was built and the experiment was carried out to obtain data: the six sub-scenarios in claim 5 were simulated, and a total of 9,600 data sets of different sub-scenarios were obtained, and the trajectory categories (straight, left turn, right turn) of the target objects were marked. 80% were designated as training sets and 20% as test sets. During the test evaluation, the input historical data length was 5s, and the corresponding number of trajectory points was 25. The prediction durations were 3s, 5s, and 7s, respectively, and the corresponding numbers of trajectory points were 15, 25, and 35, respectively.

[0083] The training set data is processed to obtain three inputs X1, X2, and X3 of the trajectory prediction model, where X1 is the target object Step historical motion data and two vehicles The relative historical motion data is added with position embedding and then input into the backbone network. After passing through the variable scale self-attention module, residual network and layer normalization, feedforward neural network and other sub-modules, the target object is generated. step; X2 is the predicted trajectory of the two vehicles The relative historical motion data and the remaining seconds of the green light are used to input into the scale factor generation module to generate the scale factor vector for the variable scale attention module of the backbone network. B X3 is the target object step historical motion data and compare it with the future predicted by the backbone network After the step trajectories are concatenated, they are used to generate trajectory category probabilities (straight ahead, left turn, right turn). This probability is added to the loss function to guide the network parameter learning.

[0084] For ease of understanding, Fig.16 Take the application scenario where the ambulance is going straight, the traffic light in the Y direction is red, and the traffic light in the X direction is green, as an example, execute Fig.17 The process shown ( Fig.17 The target object is called the jammer, the danger warning area is called the danger area, and the signal light is called the traffic light): (1) The ambulance arrives at the waiting area at the intersection. The vehicle is going to go straight. The camera detects that the current traffic light status is: the traffic light in direction Y is red for straight driving, and the traffic light in direction X is green for straight driving. The first-level warning module monitors the straight driving lane in direction X, including the two straight driving lanes on the left and right sides.

[0085] (2) For the straight lane on the left side of the ambulance, according to the geometric relationship, the collision point of the two vehicles is the intersection point O of the straight lines AB and CD. The distance between O and the ambulance is S. AO , the speed of the ambulance passing through the intersection is v 0, the length of the ambulance body is L, then the time period for the ambulance to reach the collision point is to , the speed range of the interference vehicle passing through the intersection is , then the danger zone on the left straight lane of the ambulance is EF, where , For the right through lane of the ambulance, the calculation method of the danger zone is the same.

[0086] (3) The high-definition camera uses the trained YOLOv8 model to identify interfering vehicles in the danger zone in real time. When the number of interfering vehicles is greater than or equal to 3, the first-level warning system issues a no-passing prompt, and the ambulance continues to wait at the intersection; at the same time, it continues to monitor the status of the traffic lights and changes the monitored danger zone according to the changes in the traffic lights. When the number of interfering vehicles in the danger zone is less than 3, the first-level warning system issues a start-passing prompt, and the ambulance starts to pass through the intersection.

[0087] (4) The secondary warning system starts working. The data collected by the early warning system sensors are preprocessed to obtain the real-time driving information of the first jammer and the ambulance as well as the traffic light status information. After processing, three input vectors are obtained: , , . Driving information is collected every 0.2s, and a total of Step, will pass The driving information X1, X2, X3 of the first step is input into the trained trajectory prediction model to predict the future trajectory of the interfering vehicle. At the same time, according to the current position and speed of the ambulance itself, the ambulance's future movement is calculated according to uniform linear motion (straight travel) or uniform circular motion (left turn and right turn). The secondary warning system uses the prediction information of the two vehicles and the OBB collision detection algorithm to determine whether there is a risk of collision between the two vehicles. If the OBB collision detection algorithm detects that there is a risk of collision, a secondary warning prompt will be issued to remind the driver to stop. If it is detected that the first interfering vehicle has passed the collision point, the information of the second interfering vehicle will be monitored and the same method will be used for prediction and warning.

[0088] Figures 18 to 20 This is a simulation result diagram for predicting the trajectories of the ambulance and the jammer. Fig.18 There is no risk of collision between the ambulance and the jammer in the next 3 seconds and 5 seconds, so no warning prompt is issued at this time; Fig.19 There is a risk of collision between the ambulance and the jammer in the next 5 seconds, at which time an intermittent warning prompt can be issued; Fig. 20 If there is a risk of collision between the ambulance and the jammer in the next 3 seconds, a continuous warning can be issued. Figures 18 to 20The dashed boxes are the locations of the ambulance and the jammer vehicle predicted by the trajectory prediction method in the aforementioned embodiment in 3 seconds or 5 seconds in the future, and the solid boxes are the current locations of the ambulance and the jammer vehicle.

[0089] In another embodiment of the present application, a vehicle collision warning device is also provided, such as Fig.21 As shown, including: The first acquisition module 11 is used to acquire the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; A first determining module 12 is used to determine a danger warning area based on a passable road corresponding to the signal light state and the driving road when the signal light state information does not match the driving direction, the passable road being different from the driving road; A second acquisition module 13 is used to acquire the number of target objects with collision risks in the danger warning area; The warning determination module 14 is used to determine a target warning method according to the number of objects and issue a warning according to the target warning method.

[0090] In another embodiment of the present application, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the vehicle collision warning method described in any of the above method embodiments when executing the program stored in the memory.

[0091] The electronic device provided by the embodiment of the present invention, the processor can determine the danger warning area based on the allowed roads and driving roads corresponding to the signal light state and the driving direction of the target vehicle by executing the program stored in the memory, and then determine the corresponding target warning method and issue a warning according to the number of target objects that may collide with the target vehicle in the danger warning area. The application can predict the possible collision risk of the target vehicle in the state of running a red light, so as to provide timely warning before the potential risk occurs, reduce the risk of traffic accidents between the target vehicle and the target object in the state of running a red light, and improve the safety of the target vehicle and the target object. It can not only improve the travel efficiency and safety of ambulances, but also improve the overall traffic safety level of intersections, which has important social and economic value, and the method provides more reliable technical support for the construction of future intelligent transportation systems.

[0092] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 22 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0093] The communication interface 1120 is used for communication between the above electronic device and other devices.

[0094] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0095] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0096] In another embodiment of the present application, a computer-readable storage medium is also provided, on which a program of a vehicle collision warning method is stored. When the program of the vehicle collision warning method is executed by a processor, the steps of the vehicle collision warning method described in any of the aforementioned method embodiments are implemented.

[0097] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0098] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A vehicle collision warning method, characterized in that: include: Obtaining the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; In the case where the signal light state information does not match the driving direction, determining a danger warning area based on a passable road corresponding to the signal light state and the driving road, the passable road being different from the driving road; Acquire the number of target objects with collision risk in the danger warning area; A target early warning method is determined according to the number of objects, and an early warning is issued according to the target early warning method.

2. The vehicle collision warning method according to claim 1, characterized in that: Determining a target warning method according to the number of target objects includes: Determining whether the number of objects is greater than or equal to a preset number threshold; If the number of objects is greater than or equal to a preset number threshold, the target warning mode is determined to be the first warning mode.

3. The vehicle collision warning method according to claim 2, characterized in that: Determining a target early warning method according to the number of the target objects also includes: If the number of the objects is less than a preset number threshold, obtaining the first driving state information of the target vehicle and the second driving state information of each of the target objects; Determine the collision risk information between the target vehicle and any of the target objects according to the first driving state information of the target vehicle, the second driving state information of each of the target objects, and the signal light state information; If it is determined according to the collision risk information that there is a collision risk between the target vehicle and any target object, the target warning mode is determined to be the second warning mode.

4. The vehicle collision warning method according to claim 3, characterized in that: Determining collision risk information between the target vehicle and any of the target objects according to the first driving state information of the target vehicle, the second driving state information of each of the target objects, and the signal light state information includes: Based on the first driving state information of the target vehicle, the second driving state information of each target object, the signal light state information and a preset trajectory prediction model, determining a first predicted driving trajectory of each target object in a preset future time period; Determine a second predicted driving trajectory of the target vehicle in a preset future time period based on the first driving state information and the motion equation; According to the first predicted driving trajectory, the second predicted driving trajectory and a preset collision detection algorithm, it is determined whether the target vehicle and each target object will collide within a preset time period in the future, and the collision risk information is obtained.

5. The vehicle collision warning method according to claim 4, characterized in that: Based on the first driving state information of the target vehicle, the second driving state information of each target object, the signal light state information, and a preset trajectory prediction model, determining a first predicted driving trajectory of each target object in a preset time period in the future, including: Determine the target object based on the first driving state information of the target vehicle, the second driving state information of each target object and the signal light state information step historical motion data, the distance between the target object and the target vehicle step relative to the historical motion data, the remaining time for the green light distance of the traffic light corresponding to the driving direction of the target object to change, the target object Step historical movement data; The target object step historical motion data, the distance between the target object and the target vehicle step 1 relative historical motion data, the distance between the target object and the target vehicle step 2 relative historical motion data, the remaining time of the green light distance change in the signal light corresponding to the driving direction of the target object, and the target object step historical motion data, inputting the preset trajectory prediction model so that the preset trajectory prediction model outputs the future trajectory prediction value of the target object and the category probability of the future trajectory prediction value; A first predicted driving trajectory of each of the target objects in a preset future time period is determined according to the future trajectory prediction value and the category probability.

6. The vehicle collision warning method according to claim 5, characterized in that: The preset trajectory prediction model includes: a scale coefficient generation module, an improved backbone network, a feedforward neural network module, a splicing module and a trajectory classification module, wherein the multi-head self-attention module in the improved backbone network is replaced by a variable-scale self-attention module; The scale factor generating module is based on the distance between the target object and the target vehicle. Step 2: Determine the scale coefficient vector based on the remaining time of the green light distance change in the traffic light corresponding to the historical motion data and the driving direction of the target object; The improved backbone network is based on the scale coefficient vector, the target object step historical motion data, the distance between the target object and the target vehicle Step 1: Determine the trajectory feature sequence relative to the historical motion data; The feedforward neural network module determines a future trajectory prediction value of the target object based on the trajectory feature sequence; The splicing module is based on the future trajectory prediction value and the target object The historical motion data of each step determines the trajectory feature matrix; The trajectory classification module determines the class probability based on the trajectory feature matrix.

7. The vehicle collision warning method according to claim 3, characterized in that: Determining a danger warning area based on the allowed road corresponding to the signal light state and the driving road includes: Determine the intersection coordinates of the driving road and the road intersection of the driving road; Obtaining an estimated time for the target vehicle to arrive at the road intersection and a speed range for the target object to pass through the road intersection; Determining an estimated distance range according to the estimated duration and the speed range; The danger warning area is determined according to the estimated distance range and the intersection coordinates.

8. A vehicle collision warning device, characterized in that: include: A first acquisition module is used to acquire the signal light status information in the driving direction of the target vehicle and the current driving road of the target vehicle; A first determination module is used to determine a danger warning area based on a passable road corresponding to the signal light state and the driving road when the signal light state information does not match the driving direction, the passable road being different from the driving road; A second acquisition module is used to acquire the number of target objects with collision risks in the danger warning area; The warning module is used to determine a target warning method according to the number of objects and issue a warning according to the target warning method.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the vehicle collision warning method described in any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program of the vehicle collision warning method, and when the program of the vehicle collision warning method is executed by the processor, the steps of the vehicle collision warning method described in any one of claims 1 to 7 are implemented.