Collision detection method and device, electronic equipment, vehicle and storage medium

By integrating deep learning models on vehicles, using driving video to predict the driving trajectory and spacing of adjacent vehicles, the problem of low collision detection efficiency in the prior art is solved, and efficient and accurate collision detection and early warning are achieved.

CN120472705APending Publication Date: 2025-08-12BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411642400.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing vehicle collision detection methods are inefficient, radar equipment is expensive, and ultrasonic sensor detection range is limited, making collision detection impossible efficiently.

Method used

By obtaining the driving video of the target vehicle, using deep learning methods to predict the driving trajectory and spacing of adjacent vehicles, collision detection is performed based on the predicted spacing, and combining early warning and autonomous driving actions to avoid collisions.

Benefits of technology

It realizes efficient and accurate vehicle collision detection, early warning and automatic safe driving actions, improving the efficiency and safety of collision detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472705A_ABST
    Figure CN120472705A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a collision detection method and device, electronic equipment, a vehicle and a storage medium. A driving video of a target vehicle is acquired, wherein the driving video comprises an adjacent vehicle; predicting a target distance between the target vehicle and the adjacent vehicle at the next moment based on the driving video; and performing collision detection on the target vehicle based on the target distance. Therefore, the distance between the target vehicle and the adjacent vehicle at the next moment is predicted according to the driving video in the driving process of the target vehicle, so that collision detection is carried out on the target vehicle according to the distance between the target vehicle and the adjacent vehicle at the next moment, and efficient and accurate collision detection on the vehicle is realized; and the vehicle collision detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During driving, vehicle collision detection is crucial to ensure vehicle safety, intelligent driving, and avoid collisions with other vehicles. Existing collision detection methods often use radar or ultrasonic sensors to detect the distance between the vehicle and other vehicles or obstacles.

[0003] However, since radar equipment is relatively expensive and the detection range of ultrasonic sensors is limited, existing collision detection methods are unable to efficiently detect vehicle collisions, resulting in low collision detection efficiency. Summary of the Invention

[0004] The embodiments of the present application provide a collision detection method, device, electronic device, vehicle and storage medium, which can realize efficient and accurate collision detection of vehicles and improve the efficiency of vehicle collision detection.

[0005] In order to achieve the above-mentioned object, according to a first aspect of the present application, a collision detection method is provided, the method comprising:

[0006] Acquire a driving video of the target vehicle, wherein the driving video includes neighboring vehicles;

[0007] Predicting a target distance between the target vehicle and the neighboring vehicle at a next moment based on the driving video;

[0008] A collision detection is performed on the target vehicle based on the target distance.

[0009] In some embodiments, predicting the target distance between the target vehicle and the neighboring vehicle at the next moment based on the driving video includes: predicting the target driving image of the neighboring vehicle at the next moment based on the driving video; and predicting the target distance between the target vehicle and the neighboring vehicle at the next moment based on the target driving image.

[0010] In some embodiments, predicting the target driving image of the neighboring vehicle at the next moment based on the driving video includes: using a trajectory prediction model to predict the trajectory of the neighboring vehicle based on the driving video to obtain the target driving image of the neighboring vehicle at the next moment.

[0011] In some embodiments, based on the target driving image, predicting the target distance between the target vehicle and the neighboring vehicle at the next moment includes: identifying a first distance between the target vehicle and the neighboring vehicle in the target driving image; and calculating the target distance between the target vehicle and the neighboring vehicle at the next moment based on the first distance.

[0012] In some embodiments, identifying the first distance between the target vehicle and the neighboring vehicle in the target driving image includes: identifying a first position of the target vehicle and a second position of the neighboring vehicle in the target driving image; and determining the first distance between the target vehicle and the neighboring vehicle in the target driving image based on the first position and the second position.

[0013] In some embodiments, the target distance between the target vehicle and the adjacent vehicle at the next moment is calculated based on the first distance, including: obtaining a target mapping relationship corresponding to the camera that captures the driving video, the target mapping relationship including a mapping relationship between vehicle spacing and the distance between vehicles in the driving image; and calculating the target distance between the target vehicle and the adjacent vehicle at the next moment based on the target mapping relationship and the first distance.

[0014] In some embodiments, the target vehicle is provided with a plurality of cameras, and the driving video includes video data collected by each of the cameras.

[0015] In some embodiments, the driving video captured by each camera is used to perform collision detection on adjacent vehicles captured by each camera.

[0016] In some embodiments, the collision detection of the target vehicle based on the target distance includes: if the target distance meets a preset safety distance condition, determining that the target vehicle is in a state without collision risk; if the target distance does not meet the preset safety distance condition, determining that the target vehicle is in a state with collision risk.

[0017] In some embodiments, if the target distance does not meet a preset safety distance condition, after determining that the target vehicle is in a state with a collision risk, it also includes: controlling the target vehicle to generate a collision warning.

[0018] In some embodiments, if the target distance does not meet the preset safety distance condition, after determining that the target vehicle is in a state with a collision risk, it also includes: controlling the target vehicle to move based on the target distance so that the target vehicle does not collide with the adjacent vehicle.

[0019] In some embodiments, controlling the target vehicle to move based on the target distance includes: determining a target direction in which the target vehicle has a collision risk, and an adjacent vehicle located in the target direction is a first adjacent vehicle; based on the target direction, obtaining a first distance between the target vehicle and a second adjacent vehicle in the target distance, and the second adjacent vehicle and the first adjacent vehicle are adjacent vehicles located on both sides of the target vehicle; and controlling the target vehicle to move based on the first distance.

[0020] In some embodiments, controlling the target vehicle to move based on the first distance includes: if the first distance is greater than a preset distance threshold, controlling the target vehicle to move in the opposite direction of the target direction; if the first distance is not greater than the preset distance threshold, controlling the target vehicle to initiate emergency braking.

[0021] According to a second aspect of the present application, a collision detection device is provided, comprising:

[0022] An acquisition module is used to acquire a driving video of the target vehicle, wherein the driving video includes adjacent vehicles;

[0023] A prediction module, configured to predict a target distance between the target vehicle and the adjacent vehicles at a next moment based on the driving video;

[0024] A detection module is used to perform collision detection on the target vehicle based on the target distance.

[0025] According to a third aspect of the present application, an electronic device is provided, including a processor and a memory, wherein the memory stores an application program, and the processor is configured to run the application program in the memory to implement the collision detection method provided in an embodiment of the present application.

[0026] According to a fourth aspect of the present application, a vehicle is provided, comprising the electronic device provided by the third aspect of the present application.

[0027] According to a fifth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in any collision detection method provided in the embodiments of the present application.

[0028] According to a sixth aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps in the collision detection method provided in an embodiment of the present application.

[0029] In the collision detection method, device, electronic device, vehicle, and storage medium of the embodiments of the present application, a driving video of a target vehicle is acquired, the driving video including adjacent vehicles; based on the driving video, a target distance between the target vehicle and adjacent vehicles at the next moment is predicted; and collision detection is performed on the target vehicle based on the target distance. In this way, by acquiring driving video captured during the driving of the target vehicle in real time, the distance between the target vehicle and adjacent vehicles at the next moment can be predicted in real time based on the driving video, and collision detection is performed on the target vehicle based on the distance between the target vehicle and adjacent vehicles at the next moment, thereby achieving efficient and accurate collision detection of the vehicle, providing early warning of possible collisions between the vehicles, and thus improving the efficiency of vehicle collision detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0031] Figure 1 This is a schematic diagram of an implementation scenario of a collision detection method provided in an embodiment of the present application;

[0032] Figure 2 This is a flowchart of a collision detection method provided by an embodiment of the present application;

[0033] Figure 3a is a schematic diagram of a target vehicle of a collision detection method provided in an embodiment of the present application;

[0034] Figure 3b This is a schematic diagram of the chip structure of a collision detection method provided in an embodiment of the present application;

[0035] Figure 3c This is a schematic diagram of a model architecture of a collision detection method provided in an embodiment of the present application;

[0036] Figure 4a is a schematic diagram of a driving image of a collision detection method provided in an embodiment of the present application;

[0037] Figure 4b Schematic diagram of vehicle spacing in a collision detection method provided in an embodiment of the present application;

[0038] Figure 4c This is a schematic diagram of the overall architecture of a collision detection method provided in an embodiment of the present application;

[0039] Figure 4dThis is a schematic diagram of a specific process of a collision detection method provided in an embodiment of the present application;

[0040] Figure 5 is a schematic structural diagram of a collision detection device provided in an embodiment of the present application;

[0041] Figure 6 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only 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 those skilled in the art without creative work are within the scope of protection of the present application.

[0043] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0044] The embodiments of the present application provide a collision detection method, device, electronic device, vehicle, and storage medium. The collision detection device can be integrated into an electronic device, which can be a server, a terminal, or other device.

[0045] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as basic cloud computing services such as big data and artificial intelligence platforms. Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions on this.

[0046] The electronic device may be integrated into a vehicle, which may be a fuel vehicle, a plug-in hybrid vehicle, a new energy vehicle, etc. This application does not impose any specific limitation on this.

[0047] See also Figure 1 , taking the collision detection device integrated into electronic equipment as an example, Figure 1 A schematic diagram of an implementation scenario of the collision detection method provided in an embodiment of the present application, wherein the electronic device can be integrated in a vehicle, and the electronic device can obtain a driving video of the target vehicle, which includes adjacent vehicles; based on the driving video, predict the target distance between the target vehicle and the adjacent vehicles at the next moment; and perform collision detection on the target vehicle based on the target distance.

[0048] It should be noted that Figure 1 The schematic diagram of the implementation environment scenario of the collision detection method shown is merely an example. The implementation environment scenario of the collision detection method described in the embodiments of this application is intended to more clearly illustrate the technical solution of the embodiments of this application and does not constitute a limitation on the technical solution provided in the embodiments of this application. It will be appreciated by those skilled in the art that with the evolution of collision detection and the emergence of new business scenarios, the technical solution provided in this application is equally applicable to similar technical problems.

[0049] The solutions provided in the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0050] This embodiment will be described from the perspective of a collision detection device, which can be integrated into an electronic device.

[0051] See also Figure 2 , Figure 2 : is a flow chart of a collision detection method provided in an embodiment of the present application. The collision detection method includes:

[0052] Step S101: Acquire a driving video of a target vehicle.

[0053] The driving video includes neighboring vehicles.

[0054] The target vehicle may be the vehicle currently undergoing collision detection, i.e., the ego vehicle. The driving video may be a video captured during the target vehicle's driving process. The driving video may include the target vehicle's surrounding driving environment, for example, the target vehicle's neighboring vehicles, which may be vehicles in front of, behind, to the left of, or to the right of the target vehicle.

[0055] In order to facilitate the acquisition of the distance between the target vehicle and the adjacent vehicles, the driving video of the target vehicle may include the adjacent vehicles and at least a partial area of the target vehicle. For example, in the driving video, part of the body of the adjacent vehicle and part of the body of the target vehicle may be displayed.

[0056] There are many ways to obtain the target vehicle's driving video. For example, the target vehicle may be provided with multiple cameras, and the driving video may include video data collected by each camera. In this way, the target vehicle's driving video is obtained based on the video data collected by each camera on the target vehicle.

[0057] Optionally, the driving video captured by each camera can be used to perform collision detection on adjacent vehicles captured by each camera.

[0058] In one embodiment, the camera may include at least one of a front camera, a rear camera, a left camera, and a right camera. The front camera may be a camera located at the front end of the target vehicle, the rear camera may be a camera located at the rear end of the target vehicle, the left camera may be a camera located on the left side of the target vehicle, and the right camera may be a camera located on the right side of the target vehicle. In this manner, the target vehicle can be equipped with cameras located in various directions to capture driving videos of the target vehicle in various directions, thereby enabling collision detection of the target vehicle in various directions based on the driving videos in various directions.

[0059] For example, a front camera may be provided at the front end of the target vehicle, such as a camera may be provided on the hood of the target vehicle, and a rear camera may be provided at the rear end of the target vehicle, such as a camera may be provided on the trunk of the target vehicle.

[0060] Step S102 : predicting the target distance between the target vehicle and adjacent vehicles at the next moment based on the driving video.

[0061] The target distance may be the predicted distance between the target vehicle and adjacent vehicles.

[0062] If there are multiple driving videos, the target distance can be the distance between the neighboring vehicle and the target vehicle in each driving video. For example, if the driving video is captured by a front-facing camera, the neighboring vehicle is the vehicle in front of the target vehicle. For another example, if the driving video is captured by a rear-facing camera, the neighboring vehicle is the vehicle behind the target vehicle.

[0063] There are multiple ways to predict the target distance between the target vehicle and the neighboring vehicles at the next moment based on the driving video. For example, based on the driving video, the target driving image of the neighboring vehicle at the next moment can be predicted; based on the target driving image, the target distance between the target vehicle and the neighboring vehicle at the next moment can be predicted.

[0064] The target driving image may be an image indicating the driving trajectory of the neighboring vehicle at the next moment, or may be a predicted driving image of the neighboring vehicle that may be captured by the camera at the next moment. The next moment may be the moment after the last frame of the driving video.

[0065] There are many ways to predict the target driving image of the neighboring vehicle at the next moment based on the driving video. For example, a prediction model can be used to predict the neighboring vehicle based on the driving video to obtain the target driving image of the neighboring vehicle at the next moment.

[0066] The prediction model may be a model for predicting the driving trajectory of adjacent vehicles. The prediction model may accurately generate the image frame Xn+1 at the next moment based on a continuous image sequence X1, X2, ..., Xn in the input driving video.

[0067] Optionally, the prediction model can be a model based on a generative adversarial network. For example, the generator in a traditional generative adversarial network can be changed to a long short-term memory network (LSTM) to improve the efficiency of sequence data processing.

[0068] In one embodiment, to overcome the limitations of LSTM in processing three-dimensional information, a convolutional LSTM (ConvLSTM) can be used instead of LSTM. ConvLSTM converts the two-dimensional input of LSTM into a three-dimensional vector (tensor), with the last two dimensions being the spatial dimensions (rows and columns). For each moment t of data, ConvLSTM replaces some of the fully connected operations in LSTM with convolution operations, enabling predictions based on the current input and the past states of local neighbors, improving the accuracy of predicting the next trajectory of neighboring vehicles based on driving video.

[0069] In one embodiment, the prediction model can be integrated into the core data processor of the target vehicle, so that the target vehicle can be detected for collision based on the collected driving video during the target vehicle's driving process. For example, please refer to Figure 3a , Figure 3a: This is a schematic diagram of a target vehicle of a collision detection method provided by an embodiment of the present application. The target vehicle can be provided with a front camera 1, a rear camera 2, a connecting line 3, a connecting line 4, an interface 5, an interface 6, a housing 7, a cooling fan 8, a vehicle controller 9, a data interaction connecting line 10 and a core data processor 11. The target vehicle can also be connected to an external computer 12, which can be used to update and iterate the prediction model. In this way, a prediction model that can predict the future driving trajectory of adjacent vehicles can be trained in an offline mode. Then, the trained prediction model can be embedded in the core data processor 11 and loaded in the housing 7, and the housing can include a cooling fan 8 and some data interfaces. When the target vehicle is traveling in real time, the front camera 1 and the rear camera 2 can be used to collect driving videos in real time. The collected driving videos can be transmitted to the core data processor 11 through the data connecting lines 3 and 4 to detect whether the target vehicle has a collision warning with an adjacent vehicle based on the prediction model in the core data processor, so as to take corresponding warning measures by transmitting the warning to the vehicle controller 9 of the target vehicle through the wiring harness 10, thereby improving the timeliness and efficiency of the collision warning.

[0070] In one embodiment, the core data processor may have a variety of chip architectures. For example, a specific chip architecture of the core data processor may refer to Figure 3b , Figure 3b The figure is a schematic diagram of the chip structure of a collision detection method provided by an embodiment of the present application, wherein the chip equipped with the prediction model may include a camera interface, an SD card interface, a power interface, a clock, a CAN data interface, a USB interface, etc. The vehicle information acquisition module, the front camera, the rear camera, and other modules in the target vehicle can exchange information with the chip equipped with the prediction model in the core data processor via the controller area network (CAN) to perform collision detection on the target vehicle.

[0071] In one embodiment, there are many ways to obtain the prediction model, for example, please refer to Figure 3c , Figure 3cThis is a schematic diagram of the model architecture of a collision detection method provided by an embodiment of the present application. The embodiment of the present application constructs a prediction model structure based on convolutional LSTM and generative adversarial network, wherein a three-layer convolutional LSTM can be constructed as a generator model of the prediction model. 3D convolution can also be used as a discriminator to alternately train the generator and the discriminator. The training goal is to make the samples generated by the generator closer and closer to the distribution of real samples, and ultimately achieve the effect that the generated data and the real data are almost indistinguishable. The goal of the generator is to predict future video frames as realistically as possible, and to construct a ConvLSTM model as a generator. The goal of the discriminator is to predict whether the image is real or fake, to distinguish between real data and generated data, and the discriminator can be composed of convolutional layers. The ultimate goal is to make the predicted vehicle image at the next moment almost consistent with the real image at the next moment, so that the discrimination error can be maximized when training the generator and minimized when training the discriminator. After building the prediction model, the training set can be input to fit the parameters of each model, and then the test set can be input to evaluate the model performance to obtain a model that can predict the vehicle's driving trajectory.

[0072] Specifically, historical driving data can be collected, with a large number of videos of vehicles in front of and behind the vehicle serving as a dataset, and divided into training and test sets. The driving video data can then be preprocessed, for example, by extracting the video frame sequence into an image format with dimensions of m×m.

[0073] Optionally, the pixel values of the image frames contained in the historical driving video can be normalized to [-1, 1] to reduce the impact of video image domain variations on the convergence training of the prediction model. Video image domain variations refer to the problem of model performance degradation caused by differences between the source and target domains in video processing and analysis tasks. These differences may arise from a variety of factors, including but not limited to lighting conditions, camera parameters, viewing angles, environmental background, weather conditions, motion blur, etc. Therefore, by normalizing the pixel values in the image frames, the prediction model can better process video data from different environments or conditions, thereby improving trajectory prediction accuracy.

[0074] Among them, the LSTM network is a special loop structure with three "gate" structures: forget gate, input gate and output gate. The forget gate in LSTM controls whether to forget the hidden cell state of the previous layer with a certain probability. t-1 is the hidden state of the previous sequence, x t is the sequence data of driving video, σ is the activation function, f t is the output of the forget gate, W f is the weight matrix, b f For the bias top, the specific formula can be expressed as:

[0075] f t =σ(W f [h t-1 , x t ]+b f )

[0076] After going through the "forget gate", it also needs to supplement the latest memory from the current input, which requires the "input gate" to complete. The input gate consists of two parts. The first part uses the first activation function (sigmoid) and the output is i t The second part uses the second activation function (tanh), and the results of the two will be multiplied together to update the cell state to get C t The specific formula can be expressed as:

[0077] i t =σ(W i [h t-1 , x t ]+b i )

[0078] C t =f t *C t-1 +tanh(σ(W C [h t-1 , x t ]+b c ))

[0079] With the new hidden cell state C t , you can see the output gate, o t is the hidden state h of the previous sequence t-1 and this sequence x t And the activation function is obtained, h t is the final output state, which can be expressed as:

[0080] o t =σ(W O [h t-1 , x t ]+b O )

[0081] h t =o t *tanh(C t )

[0082] To overcome LSTM's limitations in processing three-dimensional information, ConvLSTM converts the 2D input of LSTM into a 3D tensor, where the last two dimensions are spatial dimensions (rows and columns). For each data point t, ConvLSTM replaces some of the concatenation operations in LSTM with convolution operations, making predictions based on the current input and the past states of local neighbors.

[0083] There are multiple ways to predict the target distance between the target vehicle and the neighboring vehicles at the next moment based on the target driving image. For example, a first distance between the target vehicle and the neighboring vehicles in the target driving image can be identified; based on the first distance, the target distance between the target vehicle and the neighboring vehicles at the next moment is calculated.

[0084] The first distance may be the distance between the target vehicle and adjacent vehicles in the target driving image.

[0085] There are many ways to identify the first distance between the target vehicle and the adjacent vehicle in the target driving image. For example, the first position of the target vehicle and the second position of the adjacent vehicle can be identified in the target driving image; based on the first position and the second position, the first distance between the target vehicle and the adjacent vehicle is determined in the target driving image.

[0086] The first position may be the position of the target vehicle in the target driving image, and the second position may be the position of the adjacent vehicle in the target driving image.

[0087] Optionally, the second position may be a position closest to the target vehicle in an area where neighboring vehicles are located in the target driving image.

[0088] For example, see Figure 4a , Figure 4a The figure is a schematic diagram of a driving image of a collision detection method provided by an embodiment of the present application. In the predicted target driving image, a neighboring vehicle detection frame can be identified. This neighboring vehicle detection frame can be used to determine the position of the neighboring vehicle in the target driving image. The second position can be the position within the neighboring vehicle detection frame closest to the target vehicle. The first position can be the position of the target vehicle closest to the neighboring vehicle in the target driving image. Based on the first and second positions, the distance between the target vehicle and the neighboring vehicle in the target driving image, i.e., the target spacing, can be determined.

[0089] There are multiple ways to calculate the target distance between the target vehicle and the adjacent vehicle at the next moment based on the first distance. For example, a target mapping relationship corresponding to a camera that captures driving video can be obtained; based on the target mapping relationship and the first distance, the target distance between the target vehicle and the adjacent vehicle at the next moment is calculated.

[0090] Among them, the target mapping relationship may include a mapping relationship between vehicle spacing and the distance of vehicles in the driving image. The vehicle spacing may be the distance between the target vehicle and the adjacent vehicles in the actual scene, and the distance of vehicles in the driving image may be the distance between the target vehicle and the adjacent vehicles in the captured driving image.

[0091] Among them, there are many ways to obtain the target mapping relationship corresponding to the camera that collects driving videos. For example, the driving images collected by the camera of the target vehicle can be calibrated in advance to determine the mapping relationship between a distance in the driving image and the distance in the actual scene. For example, by obtaining the distance between an object and the vehicle in the driving image collected by the camera, and the distance between the object and the vehicle in the actual scene, the target mapping relationship corresponding to each camera can be obtained by fitting using equations such as third-order linear regression.

[0092] Step S103: performing collision detection on the target vehicle based on the target distance.

[0093] Among them, there can be multiple ways to perform collision detection on the target vehicle based on the target distance. For example, if the target distance meets the preset safety distance condition, it can be determined that the target vehicle is in a state without collision risk; if the target distance does not meet the preset safety distance condition, it can be determined that the target vehicle is in a state with collision risk.

[0094] Among them, the preset safety distance condition can be a preset condition for determining whether the target vehicle and the adjacent vehicle are at a safe distance. The safety distance can be a pre-set distance threshold, for example, it can be a distance value such as 0.5 meters, 1 meter, etc. For example, when the target distance is greater than the safety distance, it can indicate that the target distance meets the preset safety distance condition. At this time, the target vehicle does not have a collision risk. When the target distance is not greater than the safety distance, it can indicate that the target distance does not meet the preset safety distance condition. At this time, the target vehicle has a collision risk.

[0095] Optionally, the state with collision risk may include states of various risk levels, for example, a "collision occurs" state (for example, the target distance is less than 0.05 meters), an "extremely dangerous" state (for example, the target distance is between 0.05 and 0.5 meters). For example, please refer to Figure 4b , Figure 4bThis is a vehicle spacing diagram of a collision detection method provided by an embodiment of the present application. Assuming that there is a target vehicle 1, an adjacent vehicle 2 behind the target vehicle, and an adjacent vehicle 3 in front of the target vehicle, and assuming that the safety distance is 0.5m, when the target spacing between the target vehicle 1 and the adjacent vehicle 2 behind is greater than 0.5 meters, it can be indicated that the target vehicle 1 and the adjacent vehicle 2 behind are not at risk of collision. When the target spacing between the target vehicle 1 and the adjacent vehicle 3 in front is between 0.05 and 0.5 meters, it can be indicated that the target vehicle 1 and the adjacent vehicle 3 have a collision risk, and a collision warning can be generated. When the target spacing between the target vehicle 1 and the adjacent vehicle 2 behind is between 0.05 and 0.5 meters, it can be indicated that the target vehicle 1 and the adjacent vehicle 2 behind are at risk of collision, and a collision warning can be generated. When the target spacing between the target vehicle 1 and the adjacent vehicle 3 in front is greater than 0.5 meters, it can be indicated that the target vehicle 1 and the adjacent vehicle 3 do not have a collision risk.

[0096] Optionally, after determining that the target vehicle is in a state with a collision risk, the target vehicle may be controlled to generate a collision warning.

[0097] For example, the target vehicle's vehicle controller can be triggered to send a CAN message via the CAN network to control the target vehicle's instrument panel to display a collision warning message. At the same time, a CAN message can be sent to control the target vehicle's alarm system to generate an alarm. If no collision warning is generated, the detection cycle can continue.

[0098] Optionally, after determining that the target vehicle is in a state with a collision risk, the target vehicle may be controlled to move based on the target distance so that the target vehicle does not collide with an adjacent vehicle.

[0099] There are multiple ways to control the movement of the target vehicle based on the target distance. For example, a target direction in which the target vehicle has a collision risk can be determined, and the adjacent vehicle located in the target direction is the first adjacent vehicle; based on the target direction, a first distance between the target vehicle and the second adjacent vehicle is obtained in the target distance; and the target vehicle is controlled to move based on the first distance.

[0100] Wherein, the target direction can be the direction in which the target vehicle may collide. For example, when the target distance between the target vehicle and the adjacent vehicle in front does not meet the preset safety distance condition, the target direction can be the front of the target vehicle. When the target distance between the target vehicle and the adjacent vehicle in the rear does not meet the preset safety distance condition, the target direction can be the rear of the target vehicle. The first adjacent vehicle can be the adjacent vehicle in the target direction of the target vehicle. The second adjacent vehicle can be the adjacent vehicles located on both sides of the target vehicle with the first adjacent vehicle. For example, when the first adjacent vehicle is the adjacent vehicle in front of the target vehicle, the second adjacent vehicle can be the adjacent vehicle behind the target vehicle. When the first adjacent vehicle is the adjacent vehicle on the left side of the target vehicle, the second adjacent vehicle can be the adjacent vehicle on the right side of the target vehicle. The first spacing can be the spacing between the target vehicle and the second adjacent vehicle.

[0101] Among them, there can be multiple ways to control the movement of the target vehicle based on the first distance. For example, if the first distance is greater than a preset distance threshold, the target vehicle can be controlled to move in the opposite direction of the target direction; if the first distance is not greater than the preset distance threshold, the target vehicle can be controlled to start emergency braking.

[0102] Among them, the specific value of the preset distance threshold can be set according to actual conditions, and the embodiment of the present application does not limit it here.

[0103] For example, it can be determined whether the collision warning occurs in front of or behind the target vehicle. If a collision warning occurs in front, it can be determined whether the distance between the adjacent vehicle behind and the target vehicle (i.e., the first spacing) is greater than a preset distance threshold of 0.5m. If the distance to the rear vehicle is greater than 0.5m, the target vehicle can be controlled to move back 0.1m, and the execution is repeated until the distance to the adjacent vehicle in front and the distance to the adjacent vehicle behind are both greater than 0.5m, and the collision warning is lifted. Optionally, if the distance between the target vehicle and the adjacent vehicle behind is also less than the preset distance threshold of 0.5m, the target vehicle can be controlled to initiate emergency braking to minimize the damage caused by the vehicle collision, thereby effectively improving the efficiency of vehicle collision detection.

[0104] Correspondingly, if a collision warning occurs behind the target vehicle, the target vehicle can be moved in a manner similar to the handling method for a collision warning in front of the target vehicle to minimize the damage caused by the vehicle collision.

[0105] Optionally, when the target vehicle is at risk of collision, the target vehicle can be controlled through the assisted driving system, and more intelligent collision warning measures such as intelligent navigation can be provided.

[0106] Optionally, when the target vehicle has a collision risk, corresponding safety measures may be taken, such as controlling the deployment of an airbag.

[0107] In one embodiment, please refer to Figure 4c , Figure 4c This is a schematic diagram of the overall architecture of a collision detection method provided by an embodiment of the present application. The embodiment of the present application can train an offline mode prediction model through an offline mode-model training module. A large number of driving video data sets of vehicles in front and behind the vehicle can be collected and input into the established trajectory prediction model. Based on the driving images of surrounding vehicles in the collected driving video data, a prediction model that can well predict the vehicle's driving trajectory and calculate the detection of the target vehicle and the adjacent vehicles in front and behind can be fitted through a deep learning prediction model. The user operation terminal can update and optimize the model at any time through an external computer to improve the model prediction accuracy. The vehicle-side potential collision perception module can store the prediction model in the vehicle-side core data processor and perform online real-time collision detection during the driving process of the target vehicle. The driving video data from the front and rear cameras of the vehicle are collected in real time and input into the matching prediction model to obtain the distance between the vehicle and the adjacent vehicles. According to the preset minimum safe distance for collision warning, it can be determined whether a collision warning is generated. If a collision warning is generated, the vehicle-side decision-making control module can be entered. At this time, the vehicle controller can forward the CAN message based on the real-time predicted target distance, control the display of the collision warning on the instrument panel, issue an alarm, and realize the vehicle's autonomous measures by controlling the throttle, etc., so as to effectively perform collision prediction, warning and collision avoidance operations of the target vehicle, thereby improving collision detection efficiency.

[0108] In one embodiment, please refer to Figure 4d , Figure 4dThis is a specific flow chart of a collision detection method provided by an embodiment of the present application. The driving video collected by each camera in the target vehicle can be input into a prediction model, thereby obtaining the model prediction result to determine whether a collision warning is generated. When a collision warning is generated, the collision warning related information can be displayed on the instrument panel and an alarm is issued. Then, the vehicle controller can determine which camera's warning is in front or behind the target vehicle. When a collision warning occurs in front, it can be determined whether the rear distance (i.e., the first spacing) is greater than the safe distance. When it is greater than the safe distance, the throttle of the target vehicle can be controlled to move the target vehicle backward until the rear distance and the front distance of the target vehicle are both greater than the safe distance, and a collision alarm is triggered. When the rear distance is not greater than the safe distance, the target vehicle can be controlled to perform emergency braking. Similarly, when a collision warning occurs in the rear, it can be determined whether the front distance (i.e., the first spacing) is greater than the safe distance. When it is greater than the safe distance, the throttle of the target vehicle can be controlled to move the target vehicle forward until the rear distance and the front distance of the target vehicle are both greater than the safe distance, and a collision alarm is triggered. When the distance ahead is not greater than the safe distance, the target vehicle can be controlled to perform emergency braking to minimize the damage caused by vehicle collision.

[0109] Optionally, because offline training allows more time for model parameter tuning and optimization, more complex models and training strategies can be tried. Furthermore, if data distribution varies, offline training can better adapt to personalized services. For example, driver habits can be selected as attributes for model building to provide more precise personalized services. During online deployment, because pre-trained models are smaller, load faster, have shorter service response times, and provide a better user experience, offline resources can be utilized for model fitting and deployment on the vehicle side, providing more accurate prediction models and conserving vehicle-side resources.

[0110] Existing collision detection methods often use radar or ultrasonic sensors to detect the distance between a vehicle and other vehicles or obstacles. However, due to the high cost of radar equipment and the limited detection range of ultrasonic sensors, existing collision detection methods are unable to effectively detect vehicle collisions, resulting in low collision detection efficiency.

[0111] To this end, the embodiment of the present application proposes an efficient, low-cost vehicle collision risk prediction and control system that can remind drivers to pay attention to driving safety and automatically perform safe driving actions when necessary. It uses deep learning methods to fit a prediction model that can predict vehicle trajectories for collision warning, and the prediction model is installed on the vehicle side. The vehicle side inputs real-time driving video data into the prediction model for collision warning, and can automatically perform safe driving actions when necessary to effectively avoid collision accidents.

[0112] To improve the accuracy and efficiency of collision prediction, the present embodiment utilizes a deep learning-based video prediction method. Compared to traditional image acquisition and processing, this method offers greater real-time data accuracy and can predict a vehicle's likely location at the next moment, enabling proactive action to avoid unnecessary accidents. Furthermore, the use of a deep learning model based on video prediction allows for more offline time for model parameter tuning and optimization, significantly improving collision prediction accuracy.

[0113] Furthermore, in order to effectively reduce the load of the vehicle controller, the embodiment of the present application installs the prediction model on the vehicle side, proposes a vehicle side installation device, and designs a shell including a data acquisition line, a data interaction line and a cooling fan. The prediction model is installed independently, and the real-time driving video can be directly input into the prediction model. The already fitted prediction model can achieve rapid response and provide early warning results. Combining the strategy of offline training and online model deployment, a more accurate prediction model can be trained and fitted offline according to the specific situation and then re-installed on the vehicle side, saving vehicle side resources and effectively reducing the load of the vehicle controller.

[0114] In addition, in order to fundamentally avoid the occurrence of collisions, the embodiment of the present application combines the warning system with the warning processing method. By inputting real-time driving video data into the prediction model, if it is determined that the target vehicle has a collision risk, a collision warning is generated, and the warning result and the target distance of the predicted trajectory are input into the vehicle controller, and the vehicle performs autonomous safe driving actions forward and backward until the warning is lifted. Active intervention in the vehicle can effectively reduce vehicle rear-end collisions caused by driver negligence or untimely operation, effectively reduce the occurrence of collisions, and improve the safety and reliability of vehicle driving.

[0115] At the same time, to improve the comprehensiveness of rear-end collision warnings, the embodiment of the present application installs cameras at the front and rear of the vehicle. The front and rear cameras collect real-time driving video data of the target vehicle in front and behind the target vehicle as input to the prediction model, so that it can determine in real time whether the impending collision warning is with the vehicle in front or behind, so that appropriate measures can be taken quickly and accurately to reduce the damage and losses caused by the vehicle collision. In addition, compared with radar equipment, ultrasonic sensors and other equipment, the embodiment of the present application uses basic equipment such as cameras in its design, which has the characteristics of low cost and ease of use, greatly improving the efficiency of vehicle collision detection.

[0116] As can be seen from the above, the embodiment of the present application obtains a driving video of the target vehicle, which includes neighboring vehicles; based on the driving video, predicts the target distance between the target vehicle and the neighboring vehicles at the next moment; and performs collision detection on the target vehicle based on the target distance. In this way, by obtaining the driving video captured by the target vehicle in real time during its driving process, the distance between the target vehicle and the neighboring vehicles at the next moment can be predicted in real time based on the driving video, and then collision detection is performed on the target vehicle based on the distance between the target vehicle and the neighboring vehicles at the next moment, thereby achieving efficient and accurate collision detection of the vehicle, so as to provide early warning of possible collisions between the vehicles, thereby improving the efficiency of vehicle collision detection.

[0117] To facilitate better implementation of the collision detection method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above collision detection method. The meanings of the terms are the same as those in the above collision detection method, and the specific implementation details can be referred to the description in the method embodiment.

[0118] For example, Figure 5 FIG. 2 is a schematic diagram of the structure of a collision detection device provided in an embodiment of the present application. The collision detection device may include an acquisition module 201, a prediction module 202, and a detection module 203, as follows:

[0119] An acquisition module 201 is configured to acquire a driving video of a target vehicle, wherein the driving video includes adjacent vehicles;

[0120] A prediction module 202 is configured to predict the target distance between the target vehicle and adjacent vehicles at the next moment based on the driving video;

[0121] The detection module 203 is configured to perform collision detection on the target vehicle based on the target distance.

[0122] In one embodiment, the prediction module 202 includes:

[0123] The image prediction submodule is used to predict the target driving image of the neighboring vehicle at the next moment based on the driving video;

[0124] The distance prediction submodule is used to predict the target distance between the target vehicle and adjacent vehicles at the next moment based on the target driving image.

[0125] In one embodiment, the image prediction submodule is used to:

[0126] Through the prediction model, the neighboring vehicles are predicted based on the driving video to obtain the target driving image of the neighboring vehicles at the next moment.

[0127] In one embodiment, the spacing prediction submodule includes:

[0128] a distance recognition unit, configured to recognize a first distance between a target vehicle and adjacent vehicles in the target driving image;

[0129] The distance calculation unit is used to calculate the target distance between the target vehicle and the adjacent vehicle at a next moment based on the first distance.

[0130] In one embodiment, the distance identification unit is configured to:

[0131] identifying a first position of a target vehicle and a second position of a neighboring vehicle in the target driving image;

[0132] Based on the first position and the second position, a first distance between the target vehicle and a neighboring vehicle is determined in the target driving image.

[0133] In one embodiment, the distance calculation unit is configured to:

[0134] Obtaining a target mapping relationship corresponding to a camera that captures driving video, the target mapping relationship including a mapping relationship between vehicle spacing and distances between vehicles in the driving image;

[0135] Based on the target mapping relationship and the first distance, a target distance between the target vehicle and the adjacent vehicles at the next moment is calculated.

[0136] In one embodiment, the target vehicle is provided with a plurality of cameras, and the driving video includes video data collected by each camera.

[0137] In one embodiment, the driving video captured by each camera is used to perform collision detection on adjacent vehicles captured by each camera.

[0138] In one embodiment, the detection module 203 is configured to:

[0139] If the target distance meets the preset safety distance condition, it is determined that the target vehicle is in a state without collision risk;

[0140] If the target distance does not meet the preset safety distance condition, it is determined that the target vehicle is in a state with a collision risk.

[0141] In one embodiment, the collision detection device further includes a collision warning module, which is configured to:

[0142] Control the target vehicle to generate a collision warning.

[0143] In one embodiment, the collision detection device further includes:

[0144] The control module is used to control the target vehicle to move based on the target distance so that the target vehicle does not collide with adjacent vehicles.

[0145] In one embodiment, the control module includes:

[0146] A direction determination submodule, configured to determine a target direction in which the target vehicle has a collision risk, wherein an adjacent vehicle located in the target direction is a first adjacent vehicle;

[0147] a distance acquisition submodule, configured to acquire, based on the target direction, a first distance between the target vehicle and a second adjacent vehicle in the target distance, where the second adjacent vehicle and the first adjacent vehicle are adjacent vehicles located on both sides of the target vehicle;

[0148] The movement control submodule is used to control the movement of the target vehicle based on the first distance.

[0149] In one embodiment, the mobile control submodule is configured to:

[0150] If the first distance is greater than a preset distance threshold, controlling the target vehicle to move in a direction opposite to the target direction;

[0151] If the first distance is not greater than the preset distance threshold, the target vehicle is controlled to initiate emergency braking.

[0152] As can be seen from the above, the embodiment of the present application obtains the driving video of the target vehicle through the acquisition module 201, and the driving video includes adjacent vehicles; the prediction module 202 predicts the target distance between the target vehicle and the adjacent vehicles at the next moment based on the driving video; and the detection module 203 performs collision detection on the target vehicle based on the target distance. In this way, by acquiring the driving video collected during the driving process of the target vehicle in real time, the distance between the target vehicle and the adjacent vehicles at the next moment can be predicted in real time based on the driving video, and the target vehicle can be collided with based on the distance between the target vehicle and the adjacent vehicles at the next moment, thereby achieving efficient and accurate collision detection of the vehicle, so as to provide early warning of possible collisions between the vehicles, thereby improving the efficiency of vehicle collision detection.

[0153] Accordingly, the embodiment of the present application further provides an electronic device, such as Figure 6 As shown, Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0154] The processor 301 is the control center of the electronic device 300. It connects the various parts of the entire electronic device 300 using various interfaces and lines. It executes various functions of the electronic device 300 and processes data by running or loading software programs and / or units stored in the memory 302 and calling data stored in the memory 302. The processor 301 can be a processor CPU, a graphics processor GPU, a network processor (NP), etc., and can implement or execute the various methods, steps, and logic blocks disclosed in the embodiments of this application.

[0155] In the embodiment of the present application, the processor 301 in the electronic device 300 loads instructions corresponding to one or more application processes into the memory 302 according to the following steps, and the processor 301 runs the application stored in the memory 302 to implement various functions, such as:

[0156] Obtaining a driving video of the target vehicle, including neighboring vehicles;

[0157] Based on the driving video, predict the target distance between the target vehicle and the adjacent vehicles at the next moment;

[0158] Perform collision detection on target vehicles based on target distance.

[0159] Furthermore, various functions implemented by running the application stored in the memory 302 can also be described in the aforementioned embodiments and will not be repeated here.

[0160] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0161] Optional, such as Figure 6 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. Among them, the processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307 respectively. Those skilled in the art will understand that Figure 6 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0162] The touch display screen 303 can be used to display a graphical user interface and receive user operations generated by the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED) or the like can be used to configure the display panel. The touch panel can be used to collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus or the like on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to realize the input function.

[0163] The radio frequency circuit 304 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.

[0164] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 305 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data. The audio data is then output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between external headphones and the electronic device.

[0165] The input unit 306 may be configured to receive input target video and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0166] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 307 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0167] although Figure 6 Not shown, the electronic device 300 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0168] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in one embodiment, please refer to the relevant descriptions of other embodiments. It should be noted that the electronic device provided in the embodiments of this application and the collision detection method in the above embodiments are based on the same concept. The specific implementation process is detailed in the above method embodiments and will not be repeated here.

[0169] As can be seen from the above, the electronic device provided in the embodiment of the present application can obtain a driving video of the target vehicle, which includes adjacent vehicles; based on the driving video, predict the target distance between the target vehicle and the adjacent vehicles at the next moment; and perform collision detection on the target vehicle based on the target distance. In this way, by obtaining the driving video collected during the driving process of the target vehicle in real time, the distance between the target vehicle and the adjacent vehicles at the next moment can be predicted in real time based on the driving video, and the target vehicle can be collided with based on the distance between the target vehicle and the adjacent vehicles at the next moment, thereby achieving efficient and accurate collision detection of the vehicle, so as to provide early warning of possible collisions between the vehicles, thereby improving the efficiency of vehicle collision detection.

[0170] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0171] To this end, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to cause the electronic device to perform any of the collision detection methods provided in the embodiments of the present application. For example, the computer program can perform the following steps of the collision detection method:

[0172] Obtaining a driving video of the target vehicle, including neighboring vehicles;

[0173] Based on the driving video, predict the target distance between the target vehicle and the adjacent vehicles at the next moment;

[0174] Perform collision detection on target vehicles based on target distance.

[0175] Furthermore, for the detailed steps of the above method steps, please refer to the description in the above embodiments, which will not be repeated here.

[0176] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0177] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0178] Since the computer program stored in the computer-readable storage medium can execute any collision detection method provided in the embodiments of the present application, the beneficial effects that can be achieved by any collision detection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0179] According to one aspect of the present application, a computer program product is also provided, including a computer program, which is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0180] In the above-described embodiments of the collision detection device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. For portions not described in detail in a particular embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the above-described collision detection device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can be referred to in the description of the collision detection method in the above embodiments, and the details will not be repeated here.

[0181] The above is a detailed introduction to a collision detection method, device, electronic device, vehicle, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A collision detection method, characterized in that: include: Acquire a driving video of the target vehicle, wherein the driving video includes neighboring vehicles; Predicting a target distance between the target vehicle and the neighboring vehicle at a next moment based on the driving video; A collision detection is performed on the target vehicle based on the target distance.

2. The collision detection method according to claim 1, characterized in that: The predicting, based on the driving video, the target distance between the target vehicle and the neighboring vehicle at the next moment includes: Based on the driving video, predicting a target driving image of the neighboring vehicle at the next moment; A target distance between the target vehicle and the neighboring vehicle at the next moment is predicted based on the target driving image.

3. The collision detection method according to claim 2, characterized in that: The predicting, based on the driving video, a target driving image of the neighboring vehicle at a next moment, includes: The neighboring vehicle is predicted based on the driving video by using a prediction model to obtain a target driving image of the neighboring vehicle at the next moment.

4. The collision detection method according to claim 2, wherein: The predicting, based on the target driving image, the target distance between the target vehicle and the adjacent vehicle at the next moment, includes: identifying a first distance between the target vehicle and the neighboring vehicle in the target driving image; Based on the first distance, a target distance between the target vehicle and the adjacent vehicle at the next moment is calculated.

5. The collision detection method according to claim 4, characterized in that: The identifying a first distance between the target vehicle and the neighboring vehicle in the target driving image includes: identifying a first position of the target vehicle and a second position of the neighboring vehicle in the target driving image; Based on the first position and the second position, a first distance between the target vehicle and the neighboring vehicle is determined in the target driving image.

6. The collision detection method according to claim 4, characterized in that: Calculating a target distance between the target vehicle and the adjacent vehicle at a next moment based on the first distance includes: Obtaining a target mapping relationship corresponding to a camera that captures the driving video, the target mapping relationship including a mapping relationship between vehicle spacing and distances between vehicles in the driving image; A target distance between the target vehicle and the adjacent vehicle at the next moment is calculated based on the target mapping relationship and the first distance.

7. The collision detection method according to claim 1, characterized in that: The target vehicle is provided with a plurality of cameras, and the driving video includes video data collected by each of the cameras.

8. The collision detection method according to claim 7, characterized in that: The driving video captured by each camera is used to perform collision detection on adjacent vehicles captured by each camera.

9. The collision detection method according to any one of claims 1 to 8, characterized in that: The performing collision detection on the target vehicle based on the target distance includes: If the target distance meets the preset safety distance condition, it is determined that the target vehicle is in a state without collision risk; If the target distance does not meet the preset safety distance condition, it is determined that the target vehicle is in a state with a collision risk.

10. The collision detection method according to claim 9, characterized in that: If the target distance does not meet the preset safety distance condition, after determining that the target vehicle is in a state with a collision risk, the method further includes: The target vehicle is controlled to generate a collision warning.

11. The collision detection method according to claim 9, characterized in that: If the target distance does not meet the preset safety distance condition, after determining that the target vehicle is in a state with a collision risk, the method further includes: The target vehicle is controlled to move based on the target distance so that the target vehicle does not collide with the adjacent vehicle.

12. The collision detection method according to claim 11, characterized in that: The controlling the target vehicle to move based on the target distance includes: determining a target direction in which the target vehicle has a collision risk, wherein an adjacent vehicle located in the target direction is a first adjacent vehicle; Based on the target direction, obtaining a first distance between the target vehicle and a second adjacent vehicle in the target distance, where the second adjacent vehicle and the first adjacent vehicle are adjacent vehicles located on both sides of the target vehicle; The target vehicle is controlled to move based on the first distance.

13. The collision detection method according to claim 12, characterized in that: The controlling the target vehicle to move based on the first distance includes: If the first distance is greater than a preset distance threshold, controlling the target vehicle to move in a direction opposite to the target direction; If the first distance is not greater than a preset distance threshold, the target vehicle is controlled to initiate emergency braking.

14. A collision detection device, characterized in that: include: An acquisition module is used to acquire a driving video of the target vehicle, wherein the driving video includes adjacent vehicles; A prediction module, configured to predict a target distance between the target vehicle and the adjacent vehicles at a next moment based on the driving video; A detection module is used to perform collision detection on the target vehicle based on the target distance.

15. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor is enabled to perform the steps of any one of the methods of claims 1 to 13.

16. A vehicle, characterized in that: The vehicle includes the electronic device according to claim 15.

17. A computer-readable storage medium, characterized in that The method comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the methods according to claims 1 to 13.