Collision warning method and device of vehicle, electronic equipment and storage medium
By calculating the heading angle and distance in the vehicle coordinate system for collision warning, the inaccuracy problem caused by the introduction of physical parameters in the existing technology is solved, and more accurate collision warning is achieved.
Patent Information
- Application Number
- CN202311391943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-10-24
AI Technical Summary
The introduction of numerous physical parameters in existing vehicle collision warning technologies results in inaccurate warnings.
By obtaining the first vector of the current vehicle in the vehicle coordinate system and the vehicle coordinates of surrounding vehicles, the heading angle and lateral and longitudinal distances are calculated, and collision warnings are generated based on these parameters.
This reduces errors in physical parameters and improves the accuracy of collision warnings.
Smart Images

Figure CN117485330B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive technology, and more specifically, to a collision warning method, device, electronic device, and storage medium for a vehicle. Background Technology
[0002] Currently, with the widespread adoption of vehicles, intelligent driving or smart driving is becoming increasingly important. Collision warning plays a crucial role in the driving process. In vehicle collision accidents, in addition to frontal collisions, rear-end collisions (such as rear-end collisions) and side collisions (such as intersection accidents) also account for a large proportion. However, current technologies for vehicle collision warning use a large number of physical parameters. Since the acquisition of physical parameters may contain errors, using too many physical parameters in collision warning can lead to inaccurate collision warnings. Summary of the Invention
[0003] In view of this, embodiments of this application propose a vehicle collision warning method, device, electronic device, and storage medium, which can more accurately perform vehicle collision warning.
[0004] In a first aspect, embodiments of this application provide a collision warning method for a vehicle. The method includes: obtaining a first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of surrounding vehicles in the same vehicle coordinate system; obtaining a second vector of the surrounding vehicles based on their coordinates; obtaining a heading angle of the current vehicle's travel direction relative to the surrounding vehicles based on the first vector of the current vehicle and the second vector of the surrounding vehicles; obtaining a lateral distance and a longitudinal distance between the surrounding vehicles and the current vehicle based on the heading angle and their coordinates; and issuing a collision warning to the current vehicle based on the lateral and longitudinal distances.
[0005] Secondly, embodiments of this application provide a collision warning device for a vehicle, comprising: a data acquisition module, a vector acquisition module, a heading angle acquisition module, a distance acquisition module, and a collision warning module. The data acquisition module is used to acquire a first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of surrounding vehicles in the same coordinate system. The vector acquisition module is used to obtain a second vector of the surrounding vehicles based on their coordinates. The heading angle acquisition module is used to obtain the heading angle of the current vehicle's travel direction relative to the surrounding vehicles based on the first vector and the second vectors of the surrounding vehicles. The distance acquisition module is used to obtain the lateral and longitudinal distances between the surrounding vehicles and the current vehicle based on the heading angle and their coordinates. The collision warning module is used to issue a collision warning to the current vehicle based on the lateral and longitudinal distances.
[0006] In one possible implementation, the data acquisition module is further configured to obtain a first vector of the current vehicle in its forward direction based on a first angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system, and a second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system. The vehicle coordinate system is established with the current vehicle as the origin, due north as the direction of the positive half-axis of the Y-axis in the vehicle coordinate system, and due south as the direction of the positive half-axis of the X-axis in the vehicle coordinate system. The vector acquisition module is configured to obtain a second vector formed between the surrounding vehicles and the origin of the vehicle coordinate system based on the vehicle coordinates of the surrounding vehicles and the origin of the vehicle coordinate system.
[0007] In one possible implementation, the data acquisition module is further configured to, within a first preset angle range, take the sine and cosine values of the difference between the first angle and the first set angle value between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system to obtain a first vector; the data acquisition module is further configured to, when the second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within a second preset angle range, take the sine and cosine values of the difference between the first angle and the second set angle value between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system to obtain a first vector, wherein the minimum value of the first preset angle range is less than the maximum value of the second preset angle range, and the first set angle value is different from the second set angle value.
[0008] In one possible implementation, the heading angle acquisition module is further configured to calculate the heading angle between the current vehicle and the surrounding vehicles using a heading angle calculation formula, based on a first vector of the current vehicle and a second vector of the surrounding vehicles. The heading angle calculation formula is: Where, r RV The heading angle, Let be the first vector. This is the second vector. In one possible implementation, the distance acquisition module is further configured to obtain the Euclidean distance between the surrounding vehicles and the origin of the vehicle coordinate system based on the coordinates of the surrounding vehicles; multiply the Euclidean distance by the cosine of the heading angle to obtain the lateral distance between the surrounding vehicles and the current vehicle; and multiply the Euclidean distance by the sine of the heading angle to obtain the longitudinal distance between the surrounding vehicles and the current vehicle.
[0009] In one possible implementation, the device further includes a positional relationship determination module, which is further configured to determine the positional relationship between the current vehicle and the surrounding vehicles based on the heading angle, wherein when the heading angle is greater than a preset angle, the surrounding vehicles are behind the current vehicle, and when the heading angle is not greater than the preset angle, the surrounding vehicles are in front of the current vehicle; the collision warning module is further configured to provide a collision warning based on the lateral distance, the longitudinal distance, and the positional relationship. In one possible implementation, the collision warning module is further configured to generate collision warning information when the longitudinal distance is less than a first preset distance, or the lateral distance is less than a second preset distance.
[0010] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above-described method.
[0011] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run by a processor.
[0012] Fifthly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device retrieves the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described above.
[0013] This application provides a collision warning method, device, electronic device, and storage medium for vehicles. The method includes: acquiring a first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of surrounding vehicles in the same coordinate system; obtaining a second vector of the surrounding vehicles based on their coordinates; obtaining the heading angle of the current vehicle relative to the surrounding vehicles based on the first vector and the second vectors; obtaining the lateral and longitudinal distances between the surrounding vehicles and the current vehicle based on the heading angle and the vehicle coordinates; and issuing a collision warning for the current vehicle based on the lateral and longitudinal distances. By employing this method, when calculating the heading angle and the lateral and longitudinal distances between the current vehicle and surrounding vehicles for collision warning, only a small number of parameters are used—namely, only the first vector of the current vehicle's forward direction in the established vehicle coordinate system and the positions of the surrounding vehicles in that coordinate system. This avoids errors caused by the introduction of numerous physical parameters during the collision warning process, thus resulting in more accurate collision warning results using the solution presented in this application. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A schematic flowchart of a vehicle collision warning method according to an embodiment of this application is shown;
[0016] Figure 2 The diagram illustrates an application scenario of a vehicle collision warning method provided in an embodiment of this application.
[0017] Figure 3 A connection block diagram of a vehicle collision warning device according to an embodiment of this application is shown;
[0018] Figure 4 A structural block diagram of an electronic device for performing the methods of embodiments of this application is shown. Detailed Implementation
[0019] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0020] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0021] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0022] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0023] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0024] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0025] Please read Figure 1 , Figure 1 The present application also provides a collision warning method for a vehicle, which can be applied to an electronic device. This electronic device can be the aforementioned in-vehicle terminal, any processor in the vehicle capable of executing the vehicle collision warning method, or a server or other device associated with the vehicle. The method includes:
[0026] Step S110: Obtain the first vector of the current vehicle in the forward direction in the vehicle coordinate system established with the current vehicle, and the vehicle coordinates of the surrounding vehicles in the vehicle coordinate system.
[0027] The horizontal and vertical coordinate directions of the vehicle coordinate system established with the current vehicle can be arbitrary. For example, the vehicle coordinate system can be based on the current vehicle as the origin, with the vehicle's direction of travel as the positive half-axis of the X-axis, and the positive half-axis of the Y-axis obtained by rotating the positive half-axis of the X-axis 90° clockwise. Another example is that the vehicle coordinate system can also be based on the current vehicle as the origin, with due north as the positive half-axis of the Y-axis and due south as the positive half-axis of the X-axis. It should be understood that the above methods of constructing the vehicle coordinate system are merely illustrative, and there are many other ways to construct a vehicle coordinate system, which are not specifically limited here. It should also be understood that when using the current vehicle as the origin, it can be the center position of the current vehicle, the center of gravity of the current vehicle, or a specified position of the current vehicle, such as the front or rear position. In other words, the determination of the coordinate origin is not specifically limited here.
[0028] One way to obtain the first vector of the current vehicle in the vehicle coordinate system established with the current vehicle is to obtain the angle between the current vehicle's direction of travel and any coordinate axis in the vehicle coordinate system, and obtain the vehicle's first vector based on this angle.
[0029] To facilitate obtaining the vehicle's position in the coordinate system and reduce the calculation process, in one possible embodiment of this application, the vehicle coordinate system is established with the current vehicle as the origin, north as the positive half-axis of the Y-axis in the vehicle coordinate system, and south as the positive half-axis of the X-axis in the vehicle coordinate system. The method for obtaining the first vector of the current vehicle in the forward direction within the vehicle coordinate system established by the current vehicle can be based on a first angle between the current vehicle's travel direction and the positive half-axis of the X-axis in the vehicle coordinate system, and a second angle between the current vehicle's travel direction and the positive half-axis of the Y-axis in the vehicle coordinate system.
[0030] In this implementation, if the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within a first preset angle range, a first vector is obtained by taking the sine and cosine values of the difference between the first included angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and the first preset angle value; if the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within a second preset angle range, a first vector is obtained by taking the sine and cosine values of the difference between the first included angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and the second preset angle value, where the minimum value of the first preset angle range is less than the maximum value of the second preset angle range, and the first preset angle value is different from the second preset angle value.
[0031] For example, if the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is hw, and the first set angle is... The first preset angle range is: The second set angle is The second preset angle range is: Then when The difference between the first included angle and the second set angle value is when The difference between the first included angle and the second set angle value is Accordingly, the first vector is
[0032] The surrounding vehicles of the current vehicle can be vehicles within a preset distance that the current vehicle can detect. Correspondingly, the number of surrounding vehicles can be one or more. The vehicle coordinates of the surrounding vehicles can be the coordinates of the closest position on the surrounding vehicle to the current vehicle in the vehicle coordinate system, or the coordinates of a specified position (e.g., center position or center of gravity position) of the surrounding vehicle in the vehicle coordinate system. In one possible embodiment of this application, the vehicle coordinates of the surrounding vehicles in the vehicle coordinate system can be the coordinates of the closest position of the surrounding vehicle to the current vehicle in the vehicle coordinate system.
[0033] One way to obtain the vehicle coordinates of the surrounding vehicles in the vehicle coordinate system is to calculate them using the vehicle coordinates of the surrounding vehicles and the current vehicle in the global coordinate system. Specifically, the coordinate transformation relationship between the vehicle coordinate system and the global coordinate system can be obtained based on the vehicle coordinates of the current vehicle in the global coordinate system. The coordinates of the surrounding vehicles in the vehicle coordinate system can then be obtained based on the coordinate transformation relationship and the measured coordinates of the surrounding vehicles in the global coordinate system.
[0034] Step S120: Based on the vehicle coordinates of the surrounding vehicles, obtain the second vector of the surrounding vehicles.
[0035] One way to obtain the second vector of surrounding vehicles based on their coordinates is to use the vehicle coordinates as the second vector. Alternatively, it can be to obtain the Euclidean distance from the surrounding vehicles to the origin based on their coordinates, and use the ratio between the vehicle coordinates and this Euclidean distance as the second vector. Another method is to use the ratio of the surrounding vehicles' coordinates to any non-zero vector value as the second vector.
[0036] Step S130: Based on the first vector of the current vehicle and the second vector of the surrounding vehicles, obtain the heading angle of the current vehicle relative to the heading of the surrounding vehicles.
[0037] The heading angle of the current vehicle relative to surrounding vehicles refers to the angle formed by the current vehicle's direction of travel and the line connecting the current vehicle and surrounding vehicles. In other words, it is the angle formed between the first vector and the second vector.
[0038] When calculating the angle between the first vector and the second vector, if the first vector or the second vector is not a unit vector, the above step S130 may include: multiplying the first vector and the second vector to obtain a vector product; multiplying the scalar value corresponding to the first vector and the scalar value corresponding to the second vector to obtain a scalar product; and performing an inverse cosine calculation on the ratio of the vector product to the scalar product to obtain the heading angle between the current vehicle and the surrounding vehicles.
[0039] If both the first vector and the second vector are unit vectors, then step S130 above may include: multiplying the first vector and the second vector to obtain a vector product; and performing an inverse cosine calculation on the vector product to obtain the heading angle between the current vehicle and the surrounding vehicles.
[0040] After obtaining the heading angle between the current vehicle and surrounding vehicles, the positional relationship between the current vehicle and surrounding vehicles can be determined using the heading angle, i.e., whether the surrounding vehicles are in front of or behind the current vehicle. Specifically, when the heading angle is greater than a preset angle, the surrounding vehicles are behind the current vehicle; when the heading angle is not greater than the preset angle, the surrounding vehicles are in front of the current vehicle. The preset angle can be 90°, 89°, or 91°, etc.
[0041] Step S140: Based on the heading angle and the vehicle coordinates of the surrounding vehicles, obtain the lateral distance and longitudinal distance between the surrounding vehicles and the current vehicle.
[0042] Specifically, step S140 can involve establishing an X1OY1 coordinate system with the current vehicle's location as the origin and the vehicle's direction of travel as the positive X1 axis. The positive Y1 axis is obtained by rotating the positive X1 axis 90° clockwise. A correspondence is established between the X1OY1 coordinate system and the vehicle coordinate system. Based on this correspondence and the coordinates of surrounding vehicles in the vehicle coordinate system, the coordinates of the surrounding vehicles in the X1OY1 coordinate system are obtained. The horizontal coordinate value represents the lateral distance, and the vertical coordinate value represents the longitudinal distance. The correspondence between the X1OY1 coordinate system and the vehicle coordinate system can be determined based on the angle between the vehicle's direction of travel and the positive X-axis in the vehicle coordinate system.
[0043] Step S140 above can also be: obtaining the Euclidean distance between the surrounding vehicles and the origin of the vehicle coordinate system based on the coordinates of the surrounding vehicles; multiplying the Euclidean distance by the cosine of the heading angle to obtain the lateral distance between the surrounding vehicles and the current vehicle; and multiplying the Euclidean distance by the sine of the heading angle to obtain the longitudinal distance between the surrounding vehicles and the current vehicle.
[0044] Step S150: Provide a collision warning for the current vehicle based on the lateral and longitudinal distances.
[0045] In one possible implementation, step S150 may involve generating collision warning information when the longitudinal distance is less than a first preset distance or the lateral distance is less than a second preset distance. The second preset distance may be less than the first preset distance.
[0046] To achieve a more effective early warning system, multiple preset distances can be set, and the warning information can be of different levels.
[0047] For example, when the lateral distance is within a first preset distance threshold range, or the longitudinal distance is within a second preset distance range, a first-level warning signal is generated, wherein the maximum value of the first preset distance threshold range may be greater than the maximum value of the second preset distance threshold range. When the lateral distance is within a third preset distance threshold range, or the longitudinal distance is within a fourth preset distance range, a second-level warning signal is generated, wherein the maximum value of the third preset distance threshold range is the minimum value of the first preset distance threshold range, and the maximum value of the fourth preset distance threshold range is the minimum value of the second preset distance threshold range. It should be understood that, in addition to the distance threshold ranges given above, there may be more distance threshold ranges, which will not be elaborated in this application. It should also be noted that, in order to provide users with good collision warning prompts, the playback effects (display effects or audio prompt effects) corresponding to different levels of warning signals are different, so that users can take timely actions to avoid vehicle collisions based on the played warning signals.
[0048] In another possible implementation, considering that the current vehicle's positional relationship with surrounding vehicles may differ, the distance threshold for generating warning information may also differ. When issuing a warning, after determining the positional relationship between the current vehicle and surrounding vehicles based on the heading angle, a collision warning can be issued based on the lateral distance, the longitudinal distance, and the positional relationship.
[0049] For example, in this implementation, if it is determined that surrounding vehicles are in front of the current vehicle, the lateral distance is no greater than a first distance threshold, and the longitudinal distance is no greater than a second distance threshold, a first collision warning signal is generated to issue a warning, wherein the first distance threshold may be greater than the second distance threshold. If it is determined that surrounding vehicles are behind the current vehicle, the lateral distance is no greater than a third distance threshold, and the longitudinal distance is no greater than a fourth distance threshold, a second collision warning signal is generated to issue a warning, wherein the third distance threshold may be greater than the first distance threshold, the second distance threshold may be greater than the fourth distance threshold, and the third distance threshold may be greater than the fourth distance threshold.
[0050] By employing a vehicle collision warning method provided in this application embodiment, the following steps are taken: First, the first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of surrounding vehicles in the same coordinate system are obtained. Second, the second vectors of the surrounding vehicles are obtained based on their coordinates. Third, the heading angle of the current vehicle relative to the surrounding vehicles is obtained based on the first and second vectors of the current vehicle. Fourth, the lateral and longitudinal distances between the current vehicle and the surrounding vehicles are obtained based on the heading angle and the vehicle coordinates of the surrounding vehicles. Finally, a collision warning is issued to the current vehicle based on these lateral and longitudinal distances. In calculating the heading angle, lateral distance, and longitudinal distance between the current vehicle and surrounding vehicles for collision warning, only a small number of parameters are used—specifically, only the first vector of the current vehicle's forward direction in the established coordinate system and the positions of the surrounding vehicles in that coordinate system. This avoids errors caused by the introduction of numerous physical parameters during the collision warning process, resulting in more accurate collision warning results.
[0051] like Figure 2As shown in the illustration, this application provides an exemplary scenario diagram of a vehicle collision warning method. In the diagram, HV represents the current vehicle, and RV represents surrounding vehicles. A vehicle coordinate system is established with the current vehicle as the origin, north as the positive half-axis of the Y-axis, and south as the positive half-axis of the X-axis. A first vector in the forward direction of the current vehicle in the vehicle coordinate system (XOY coordinate system) is obtained based on the angle between the current vehicle's driving direction and the south direction, or based on the angle between the current vehicle's driving direction and the north direction. Get the vehicle coordinates (x, y, y) of the surrounding vehicles in the vehicle coordinate system (XOY coordinate system) of the current vehicle. R ,y R ).
[0052] If the second included angle between the current vehicle's direction of travel and the positive half-axis of the Y-axis in the vehicle's coordinate system is hw, then the first set angle is... The first preset angle range is: The second set angle is The second preset angle range is: Then when The difference between the first included angle and the second set angle value is when The difference between the first included angle and the second set angle value is Accordingly, the first vector is
[0053] At this time, based on the vehicle coordinates (x) of the surrounding vehicles... R ,y R The second vector can be obtained. but
[0054] or,
[0055] In obtaining the second vector Then, by using the first vector Second vector Multiplying the corresponding unit vectors gives the angle between the first and second vectors (the heading angle r). RV The cosine value of ). The heading angle r can be obtained by performing inverse cosine calculation on the cosine value. RV =cos -1 (x1 cosθ1+y1 sinθ1). That is, the heading angle between the current vehicle and the surrounding vehicles can be calculated using the heading angle formula, based on the first vector of the current vehicle and the second vector of the surrounding vehicles. The heading angle formula is: Where, r RV The heading angle, Let be the first vector. Let be the second vector. It should be noted that the position of the unit vector in the coordinate system should be on the unit circle, that is, the distance between the unit vector and the origin is 1 unit.
[0056] After obtaining the heading angle, the positional relationship between the current vehicle and surrounding vehicles can be determined based on the heading angle. Specifically, if cos r RV <0, that is, r RV If the angle is greater than 90°, then surrounding vehicles are behind the vehicle in front; if cos r RV ≥0, that is, r RV If the angle is ≤90°, then the surrounding vehicles are in front of the vehicle in front.
[0057] When calculating the lateral and longitudinal distances between the current vehicle and surrounding vehicles, the lateral distance is: Longitudinal distance:
[0058] After obtaining the positional relationship, lateral distance, and longitudinal distance between the surrounding vehicles and the current vehicle, if it is determined that the surrounding vehicles are in front of the current vehicle, the lateral distance is no greater than a first distance threshold, and the longitudinal distance is no greater than a second distance threshold, a first collision warning signal is generated to issue a warning. The first distance threshold may be greater than the second distance threshold. If it is determined that the surrounding vehicles are behind the current vehicle, the lateral distance is no greater than a third distance threshold, and the longitudinal distance is no greater than a fourth distance threshold, a second collision warning signal is generated to issue a warning. The third distance threshold may be greater than the first distance threshold, the second distance threshold may be greater than the fourth distance threshold, and both the third and fourth distance thresholds may be greater than the first and fourth distance thresholds.
[0059] In summary, as described in the technical solution, a vector is constructed with HV as the origin and the north direction as the positive y-axis. Only need to focus on vectors The angle between the vector and the positive x-axis can be used to calculate the vector. and The angle between the two vehicles, i.e., the angle of travel direction (heading angle), can be used to further calculate the longitudinal and lateral distances between the surrounding vehicles (RV) and the current vehicle (HV). This allows for collision warning. The entire process involves relatively few variables; the coordinates of the RV in a coordinate system with HV as the origin can be obtained. Because vectors and products are introduced to calculate the heading angle and longitudinal and lateral distances, there is no need to discuss too many cases, and the relative direction of the RV to HV can be easily determined. This significantly reduces the calculation process and avoids errors caused by the introduction of numerous physical parameters. Therefore, the collision warning results obtained using the scheme in this application are more accurate.
[0060] It should be understood that, unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they may be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily to be completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0061] Please see Figure 3 Another embodiment of this application provides a vehicle collision warning device 200, which includes: a data acquisition module 210, a vector acquisition module 220, a heading angle acquisition module 230, a distance acquisition module 240, and a collision warning module 250. The data acquisition module 210 is used to acquire a first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of surrounding vehicles in the same coordinate system. The vector acquisition module 220 is used to obtain a second vector of the surrounding vehicles based on their coordinates. The heading angle acquisition module 230 is used to obtain the heading angle of the current vehicle's travel direction relative to the surrounding vehicles based on the first vector of the current vehicle and the second vectors of the surrounding vehicles. The distance acquisition module 240 is used to obtain the lateral distance and longitudinal distance between the surrounding vehicles and the current vehicle based on the heading angle and the vehicle coordinates of the surrounding vehicles. The collision warning module 250 is used to provide a collision warning to the current vehicle based on the lateral and longitudinal distances.
[0062] In one possible implementation, the data acquisition module 210 is further configured to obtain a first vector of the current vehicle in the forward direction based on a first angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and a second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system. The vehicle coordinate system is a coordinate system established with the current vehicle as the origin, the north direction as the positive half-axis direction of the Y-axis in the vehicle coordinate system, and the south direction as the positive half-axis direction of the X-axis in the vehicle coordinate system.
[0063] The vector acquisition module 220 is further configured to obtain a second vector, which is formed between the surrounding vehicles and the origin of the vehicle coordinate system, based on the vehicle coordinates of the surrounding vehicles and the origin of the vehicle coordinate system, representing the current vehicle's driving direction relative to the vehicle coordinate system.
[0064] In one possible implementation, the data acquisition module 210 is further configured to, when the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within a first preset angle range, take the sine and cosine values of the difference between the first included angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and a first preset angle value to obtain a first vector; and to, when the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within a second preset angle range, take the sine and cosine values of the difference between the first included angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and a second preset angle value to obtain a first vector, wherein the minimum value of the first preset angle range is less than the maximum value of the second preset angle range, and the first preset angle value is different from the second preset angle value.
[0065] In one possible implementation, the heading angle obtaining module 230 is further configured to calculate the heading angle between the current vehicle and the surrounding vehicles using a heading angle calculation formula, based on the first vector of the current vehicle and the second vector of the surrounding vehicles. The heading angle calculation formula is: Where, r RV The heading angle, Let be the first vector. This is the second vector.
[0066] In one possible implementation, the distance acquisition module 240 is further configured to obtain the Euclidean distance between the surrounding vehicles and the origin of the vehicle coordinate system based on the coordinates of the surrounding vehicles; multiply the Euclidean distance by the cosine of the heading angle to obtain the lateral distance between the surrounding vehicles and the current vehicle; and multiply the Euclidean distance by the sine of the heading angle to obtain the longitudinal distance between the surrounding vehicles and the current vehicle.
[0067] In one possible implementation, the device further includes a positional relationship determination module, which is further configured to determine the positional relationship between the current vehicle and the surrounding vehicles based on the heading angle, wherein when the heading angle is greater than a preset angle, the surrounding vehicles are behind the current vehicle, and when the heading angle is not greater than the preset angle, the surrounding vehicles are in front of the current vehicle; the collision warning module 250 is further configured to provide a collision warning based on the lateral distance, the longitudinal distance, and the positional relationship. In one possible implementation, the collision warning module 250 is further configured to generate collision warning information when the longitudinal distance is less than a first preset distance, or the lateral distance is less than a second preset distance.
[0068] Each module in the above-described device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module. It should be noted that the device embodiments in this application correspond to the foregoing method embodiments. The specific principles of the device embodiments can be found in the foregoing method embodiments, and will not be repeated here.
[0069] The following will combine Figure 4 This application describes an electronic device.
[0070] Please see Figure 4 Based on the vehicle collision warning method provided in the above embodiments, this application embodiment also provides another electronic device 100 including a processor 102 capable of executing the aforementioned method. The electronic device 100 may be an in-vehicle terminal or the current vehicle, or a server associated with the current vehicle, etc.
[0071] The electronic device 100 also includes a memory 104. The memory 104 stores a program that can execute the contents of the foregoing embodiments, and the processor 102 can execute the program stored in the memory 104.
[0072] The processor 102 may include one or more cores for data processing and message matrix units. The processor 102 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and by calling data stored in the memory 104. Optionally, the processor 102 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 102 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 102 and may be implemented separately using a communication chip.
[0073] The memory 104 may include random access memory (RAM) or read-only memory (ROM). The memory 104 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data acquired by the electronic device 100 during use (e.g., vehicle coordinates of surrounding vehicles).
[0074] The electronic device 100 may also include a network module and a screen. The network module is used to receive and transmit electromagnetic waves, converting electromagnetic waves into electrical signals, thereby enabling communication with communication networks or other devices, such as audio playback devices. The network module may include various existing circuit elements used to perform these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. The network module can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs).
[0075] In some embodiments, the electronic device 100 may further include a peripheral interface 106 and at least one peripheral device. The processor 102, memory 104, and peripheral interface 106 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral interface via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency component 108, a positioning component 112, a camera 114, an audio component 116, a display screen 118, and a power supply 122.
[0076] Peripheral interface 106 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 102 and memory 104. In some embodiments, processor 102, memory 104 and peripheral interface 106 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 102, memory 104 and peripheral interface 106 can be implemented on separate chips or circuit boards, and this application embodiment does not limit this.
[0077] The radio frequency (RF) component 108 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF component 108 communicates with communication networks and other communication devices via electromagnetic signals. The RF component 108 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF component 108 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF component 108 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF component 108 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0078] Positioning component 112 is used to locate the current geographic location of an electronic device to enable navigation or LBS (Location Based Service). Positioning component 112 can be a positioning component based on the US GPS (Global Positioning System), BeiDou system, or Galileo system.
[0079] Camera 114 is used to capture images or videos. Optionally, camera 114 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device 100, and the rear-facing camera is located on the back of the electronic device 100. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, camera 114 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0080] Audio component 116 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to processor 102 for processing, or input to radio frequency component 108 for voice communication. For stereo acquisition or noise reduction purposes, there may be multiple microphones, each located at a different part of electronic device 100. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from processor 102 or radio frequency component 108 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into sound waves that humans can hear, but also into sound waves that humans cannot hear for purposes such as ranging. In some embodiments, audio component 114 may also include a headphone jack.
[0081] Display screen 118 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 118 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 102 for processing. In this case, display screen 118 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 118, which serves as the front panel of electronic device 100; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of electronic device 100 or in a folded design; in still other embodiments, display screen 118 may be a flexible display screen, disposed on a curved or folded surface of electronic device 100. Furthermore, display screen 118 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 118 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0082] Power supply 122 is used to supply power to various components in electronic device 100. Power supply 122 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 122 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0083] This application also provides a structural block diagram of a computer-readable storage medium. The computer-readable medium stores program code, which can be called by a processor to execute the methods described in the above method embodiments.
[0084] Computer-readable storage media can be electronic storage devices such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, computer-readable storage media includes non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program code that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code can be compressed, for example, in a suitable form.
[0085] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods described in the various optional implementations above.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A collision warning method for vehicles, characterized in that, The method includes: Based on the first angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system, and the second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system, a first vector of the current vehicle in the forward direction is obtained. The vehicle coordinate system is established with the current vehicle as the origin, the north direction as the positive half-axis of the Y-axis in the vehicle coordinate system, and the south direction as the positive half-axis of the X-axis in the vehicle coordinate system. Based on the vehicle coordinates of the surrounding vehicles and the origin of the vehicle coordinate system, a second vector is obtained between the surrounding vehicles and the origin of the vehicle coordinate system. Based on the first vector of the current vehicle and the second vector of the surrounding vehicles, the heading angle of the current vehicle relative to the heading of the surrounding vehicles is obtained; Based on the heading angle and the vehicle coordinates of the surrounding vehicles, the lateral and longitudinal distances between the surrounding vehicles and the current vehicle are obtained; A collision warning is issued for the current vehicle based on the lateral and longitudinal distances.
2. The method according to claim 1, characterized in that, Based on the first angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system, and the second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system, the first vector of the current vehicle in the forward direction is obtained, including: If the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within the first preset angle range, the first vector is obtained by taking the sine and cosine values of the difference between the first included angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and the first preset angle value. If the second included angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system is within the second preset angle range, the first vector is obtained by taking the sine and cosine values of the difference between the first included angle and the second preset angle value between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system, respectively. The minimum value of the first preset angle range is less than the maximum value of the second preset angle range, and the first preset angle value is different from the second preset angle value.
3. The method according to claim 1, characterized in that, Based on the first vector of the current vehicle and the second vectors of the surrounding vehicles, the heading angle between the current vehicle and the surrounding vehicles is obtained, including: Multiply the first vector by the second vector to obtain a vector product; Multiply the scalar value corresponding to the first vector by the scalar value corresponding to the second vector to obtain a scalar product; The inverse cosine of the ratio of the vector product to the scalar product is used to obtain the heading angle between the current vehicle and the surrounding vehicles.
4. The method according to claim 1, characterized in that, If the first vector and the second vector are unit vectors, based on the first vector of the current vehicle and the second vectors of the surrounding vehicles, the heading angle between the current vehicle and the surrounding vehicles is obtained, including: Calculate the product of the first vector and the second vector; The inverse cosine of the vector product is used to obtain the heading angle between the current vehicle and the surrounding vehicles.
5. The method according to any one of claims 1-4, characterized in that, The process of obtaining the lateral and longitudinal distances between the current vehicle and the surrounding vehicles based on the heading angle and the vehicle coordinates of the surrounding vehicles includes: The Euclidean distance between the surrounding vehicles and the origin of the coordinate system is obtained based on the coordinates of the surrounding vehicles. Multiply the Euclidean distance by the cosine of the heading angle to obtain the lateral distance between the surrounding vehicles and the current vehicle; Multiplying the Euclidean distance by the sine of the heading angle yields the longitudinal distance between the surrounding vehicles and the current vehicle.
6. The method according to claim 1, characterized in that, After obtaining the heading angle of the current vehicle relative to the surrounding vehicles based on the first vector of the current vehicle and the second vector of the surrounding vehicles, the method further includes: The positional relationship between the current vehicle and the surrounding vehicles is determined based on the heading angle, wherein when the heading angle is greater than a preset angle, the surrounding vehicles are behind the current vehicle, and when the heading angle is not greater than the preset angle, the surrounding vehicles are in front of the current vehicle. The method of providing a collision warning for the current vehicle based on the lateral and longitudinal distances includes: Collision warning is generated based on the lateral distance, the longitudinal distance, and the positional relationship.
7. The method according to claim 1, characterized in that, Based on the lateral and longitudinal distances, a collision warning is issued for the current vehicle, including: When the longitudinal distance is less than a first preset distance, or the lateral distance is less than a second preset distance, a collision warning message is generated.
8. A collision warning device for a vehicle, characterized in that, The device includes: The data acquisition module is used to acquire the first vector of the current vehicle's forward direction in a vehicle coordinate system established with the current vehicle, and the vehicle coordinates of the surrounding vehicles in the vehicle coordinate system; wherein, the vehicle coordinate system is established with the current vehicle as the origin, due north as the positive half-axis direction of the Y-axis in the vehicle coordinate system, and due south as the positive half-axis direction of the X-axis in the vehicle coordinate system, and the first vector is calculated based on the first angle between the current vehicle's driving direction and the positive half-axis of the X-axis in the vehicle coordinate system and the second angle between the current vehicle's driving direction and the positive half-axis of the Y-axis in the vehicle coordinate system; A vector acquisition module is used to obtain a second vector of the surrounding vehicles based on the vehicle coordinates of the surrounding vehicles; wherein the second vector is constructed based on the vehicle coordinates of the surrounding vehicles and the origin of the vehicle coordinate system; The heading angle acquisition module is used to obtain the heading angle of the current vehicle relative to the surrounding vehicles based on the first vector of the current vehicle and the second vector of the surrounding vehicles; The distance acquisition module is used to obtain the lateral distance and longitudinal distance between the surrounding vehicles and the current vehicle based on the heading angle and the vehicle coordinates of the surrounding vehicles; The collision warning module is used to provide collision warnings to the current vehicle based on the lateral and longitudinal distances.
9. An electronic device, characterized in that, include: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be invoked by a processor to execute the method as described in any one of claims 1-7.
Citation Information
Patent Citations
V2X-based adaptive vehicle collision time determination method and device
CN115497337A
Vehicle Anti-collision forewarning method, system and in-vehicle computer device
US20210070285A1
