Vehicle horn control method and device, storage medium and autonomous vehicle

CN117565784BActive Publication Date: 2026-08-28GUANGZHOU XIAOMA HUIXING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311760789.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2026-08-28
Estimated Expiration
2043-12-19

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种车辆鸣笛控制方法、车辆鸣笛控制装置、存储介质、处理器和电子设备,以至少解决现有的鸣笛规划方案未充分考虑自动驾驶车辆与交通参与者的交互博弈能力,导致鸣笛处理的准确度较低问题

Benefits of technology

[0019]进一步地,一种自动驾驶车辆,包括:所述的电子设备。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117565784B_ABST
    Figure CN117565784B_ABST
Patent Text Reader

Abstract

The application provides a vehicle horn control method and device, a storage medium and an autonomous vehicle. The method comprises the following steps: constructing a neural network model with a fusion attention mechanism; obtaining real-time obstacle information during real-time driving of a controlled vehicle, and constructing a real-time feature vector corresponding to the real-time obstacle information; inputting the real-time feature vector into the neural network model for operation to obtain a real-time attention coefficient of the obstacle and a real-time safety coefficient of the controlled vehicle; and controlling the controlled vehicle to sound a horn in the case that the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold. The attention mechanism is fused in the neural network model to fully consider the interactive game ability of the vehicle and the traffic participants, and the setting of the feature vector in the application makes the predicted danger coefficient more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and more specifically, to a vehicle horn control method, device, storage medium, electronic device, and autonomous vehicle. Background Technology

[0002] During vehicle operation, road conditions are complex and varied, requiring constant awareness of the movements of other road users and anticipation of their actions. Warnings should be issued for any dangerous behaviors that could affect the vehicle's operation in order to prevent traffic accidents.

[0003] In existing technologies, neural network models are applied to the field of vehicle driving horn processing. Generally, horn warnings are issued based on the driving trends of people or non-people (bicycles, electric vehicles, etc.) around the vehicle. However, the interaction and game between autonomous vehicles and traffic participants are not fully considered, resulting in low accuracy of horn processing. Summary of the Invention

[0004] The main objective of this application is to provide a vehicle horn control method, a vehicle horn control device, a storage medium, a processor, and an electronic device, so as to at least solve the problem that existing horn planning schemes do not fully consider the interactive game ability between autonomous vehicles and traffic participants, resulting in low accuracy of horn processing.

[0005] To achieve the above objectives, according to one aspect of this application, a vehicle horn control method is provided, comprising: constructing a neural network model incorporating an attention mechanism, wherein the neural network model is trained using multiple sets of training data, wherein any set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector, wherein the feature vector is composed at least of a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and moving speed information of the obstacle in a preset direction, wherein the two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle, the obstacle attention coefficient directly affects the controlled vehicle safety coefficient, and the obstacle attention coefficient characterizes the consideration weight of the obstacle in the final horn horn result; acquiring real-time obstacle information and constructing a real-time feature vector corresponding to the real-time obstacle information during the real-time driving of the controlled vehicle; inputting the real-time feature vector into the neural network model for calculation to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, and controlling the controlled vehicle to honk its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold.

[0006] Optionally, the feature vector further includes a two-dimensional polygon representing the controlled vehicle. Whether the two-dimensional polygon representing the obstacle and the two-dimensional polygon representing the controlled vehicle intersect affects the safety factor of the controlled vehicle. The larger the intersection area of ​​the two-dimensional polygon representing the obstacle and the two-dimensional polygon representing the controlled vehicle, the lower the safety factor of the controlled vehicle.

[0007] Optionally, the two-dimensional polygon representing the controlled vehicle is a polygon externally tangent to the controlled vehicle, and the two-dimensional polygon representing the obstacle is a polygon externally tangent to the obstacle.

[0008] Optionally, before constructing the neural network model that incorporates the attention mechanism, the method further includes: based on the model Obtain the attention weight ω corresponding to the attention coefficient of each obstacle. i , where d i The obstacle attention coefficient of the i-th obstacle is represented by A and B, which are constants, and n is the total number of obstacles.

[0009] Optionally, before constructing the neural network model that incorporates the attention mechanism, the method further includes: based on the model p = 1 - ∑ 1≤i≤n d i ω i Determine the safety factor p of the controlled vehicle, where d i The obstacle attention coefficient represents the i-th obstacle, where n is the total number of obstacles, and ω is the number of obstacles. i The attention weight for the i-th obstacle is represented.

[0010] Optionally, the feature vector is represented as (info1, info2, ..., infon), where n represents the dimension of the feature vector, which is equal to the number of times obstacle information is acquired within a preset time period. a1 represents the two-dimensional polygon of the obstacle, a2 represents the distance information, and a3 represents the movement speed information.

[0011] Optionally, after inputting the real-time feature vector into the neural network model to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle, the method further includes: normalizing the real-time safety coefficient of the controlled vehicle to obtain a normalized safety coefficient; and controlling the controlled vehicle to sound its horn if the normalized safety coefficient is less than a first safety coefficient threshold.

[0012] Optionally, the method further includes: constructing a two-dimensional polygon representing the obstacle; wherein, constructing the two-dimensional polygon representing the obstacle includes: obtaining multiple location points on the edge of the obstacle; and sequentially connecting the multiple location points to form the two-dimensional polygon.

[0013] Optionally, acquiring multiple location points on the edge of the obstacle includes: setting a spacing; and acquiring the multiple location points on the edge of the obstacle at equal intervals based on the spacing.

[0014] Optionally, the feature vector further includes the type of obstacle; the preset direction includes a first preset direction and a second preset direction, the first preset direction is perpendicular to the second preset direction, and both the first preset direction and the second preset direction are parallel to the horizontal plane.

[0015] Optionally, the attention mechanism is one of the following: Bahdanau attention mechanism, Luong attention mechanism, or self-attention mechanism.

[0016] According to another aspect of this application, a vehicle horn control device is provided, comprising: a construction unit for constructing a neural network model incorporating an attention mechanism, wherein the neural network model is trained using multiple sets of training data, wherein any set of training data includes: a feature vector composed of obstacle information acquired within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector, wherein the feature vector is composed at least of a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and moving speed information of the obstacle in a preset direction, wherein the two-dimensional polygon representing the obstacle is... The obstacle attention coefficient, formed by sequentially connecting multiple location points on the obstacle, directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in consideration of the obstacle. The acquisition and construction unit is used to acquire real-time obstacle information and construct a real-time feature vector corresponding to the real-time obstacle information during the real-time driving of the controlled vehicle. The calculation unit is used to input the real-time feature vector into the neural network model for calculation to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, and to control the controlled vehicle to honk its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold.

[0017] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the described vehicle horn control methods.

[0018] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and 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 including methods for performing any of the described vehicle horn control methods.

[0019] Furthermore, an autonomous vehicle includes: the aforementioned electronic device.

[0020] By applying the technical solution of this application, a neural network model integrating an attention mechanism is constructed. During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the obstacle information is constructed. The real-time feature vector is input into the neural network model for computation to obtain a real-time obstacle attention coefficient and a real-time safety coefficient for the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold, the controlled vehicle is controlled to sound its horn. By integrating the attention mechanism into the neural network model, the interactive game ability between the vehicle and traffic participants is fully considered, and the feature vector settings in this application make the predicted danger coefficient more accurate. Attached Figure Description

[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 A hardware structure block diagram of a mobile terminal for executing a vehicle horn control method according to an embodiment of this application is shown;

[0023] Figure 2 A schematic flowchart of a vehicle horn control method according to an embodiment of this application is shown;

[0024] Figure 3 An example diagram is shown illustrating the generation of feature vectors based on information about the controlled vehicle and the electric vehicle, according to an embodiment of this application.

[0025] Figure 4 A schematic diagram illustrating the steps of controlling vehicle horn blasting in real time according to an embodiment of this application is shown.

[0026] Figure 5 A structural block diagram of a vehicle horn control device provided according to an embodiment of this application is shown. Detailed Implementation

[0027] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0031] Neural network model: A neural network model is a model that processes information and learns through the connections and activations between neurons.

[0032] Attention mechanisms are computational models that simulate human attention. They mimic how humans select and focus their attention when processing information. When applied to neural network models, attention mechanisms help the model prioritize important parts of information and improve its performance and efficiency. Therefore, attention mechanisms and neural network models can be used in combination to enhance the model's effectiveness in processing information.

[0033] As described in the background section, existing horn planning schemes do not fully consider the interactive game ability between autonomous vehicles and traffic participants, resulting in low accuracy of horn processing. To address the issue of low accuracy in horn processing caused by existing horn planning schemes not fully considering the interactive game ability between autonomous vehicles and traffic participants, embodiments of this application provide a vehicle horn control method, device, storage medium, electronic device, and autonomous vehicle.

[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0035] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a vehicle horn control method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0036] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the vehicle horn control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] This embodiment provides a vehicle horn control method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0038] Figure 2 This is a flowchart of a vehicle horn control method according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:

[0039] Step S201: Construct a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0040] The feature vector can be represented as info = [aab dv], where aab represents the two-dimensional polygon of the obstacle, d represents the distance between the obstacle and the controlled vehicle, and v represents the speed of the obstacle in the preset direction.

[0041] Specifically, such as Figure 3 As shown, the electric vehicle's speed in the preset direction is v = [vx, vy]. The speed of the electric vehicle in the preset direction is obtained based on its speed in the y-direction and its speed in the x-direction. The two-dimensional polygon of the electric vehicle is {(x1, y1), (x2, y2), (x3, y3), (x4, y4)}, and is described by the coordinates of its vertices in a counterclockwise order. The distance between the electric vehicle and the controlled vehicle is d.

[0042] The fusion of attention mechanisms and neural network models typically includes the following steps:

[0043] 1) Determine the scope of application of the attention mechanism: First, it is necessary to determine the specific location and method of applying the attention mechanism in the neural network model. The attention mechanism can be applied in different layers and modules, such as the encoding stage and decoding stage in an encoder-decoder model, or the attention mechanism itself can be an independent module.

[0044] 2) Select an appropriate attention mechanism model: Choose an appropriate attention mechanism model based on the specific task requirements and data characteristics. Common attention mechanism models include Bahdanau attention, Luong attention, and self-attention mechanisms.

[0045] 3) Integrating attention mechanisms and neural network models: Integrating the selected attention mechanism model into the neural network model usually requires some modifications and adjustments to the neural network model to accommodate the addition of the attention mechanism. For example, in an encoder-decoder model, an attention mechanism can be introduced at each time step of the decoder so that different parts of the input can be given different degrees of attention when generating the output.

[0046] 4) Training and tuning: After integration, the entire model needs to be trained and tuned so that the attention mechanism and neural network model can be effectively combined and achieve good performance in real tasks.

[0047] In summary, the integration of attention mechanisms and neural network models requires proper design and adjustment to ensure that the two can work together to improve the performance and effectiveness of the model.

[0048] Among them, the controlled vehicles are autonomous vehicles;

[0049] Specifically, we first collect a large number of driving records from experienced drivers, extract multiple segments of drivers honking their horns, and an equal number of segments of drivers not honking their horns. These segments are then combined into a training dataset for training a neural network model that incorporates an attention mechanism.

[0050] Step S202: During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed.

[0051] During the real-time driving of the controlled vehicle, the real-time obstacle information includes: pedestrians near the controlled vehicle, electric vehicles driving nearby, and other vehicles that may interact with the controlled vehicle.

[0052] Among them, nearby vehicles that may interact with the controlled vehicle could be in situations where a car is driving out of the community exit and is about to encroach on the controlled vehicle's driving lane.

[0053] Specifically, the first step is to determine the real-time positions of obstacles around the controlled vehicle. This can be achieved using onboard sensors (such as LiDAR, cameras, and ultrasonic sensors). Then, based on these positions, a series of features can be extracted, including but not limited to the distance between the obstacle and the controlled vehicle, the obstacle's size, shape, speed, and direction of motion. Finally, the extracted obstacle features are combined into a real-time feature vector, which can be used to represent the various features of the obstacle. For example, features such as distance, shape, size, and speed can be used as components of the feature vector.

[0054] Step S203: Input the real-time feature vector into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, control the controlled vehicle to sound its horn.

[0055] Specifically, by inputting real-time feature vectors into the neural network model for computation, the output includes the real-time attention coefficient of each obstacle (a scalar compressed to 0-1) and the safety coefficient of the controlled vehicle (a scalar compressed to 0-1). If the first safety coefficient threshold is 0.2, and s < 0.2, then it is considered that there is a potential risk, and the controlled vehicle is controlled to sound its horn.

[0056] This embodiment constructs a neural network model incorporating an attention mechanism. During the real-time driving of the controlled vehicle, it acquires real-time obstacle information and constructs real-time feature vectors corresponding to the obstacle information. The real-time feature vectors are input into the neural network model for computation, yielding a real-time obstacle attention coefficient and a real-time safety coefficient for the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold, the controlled vehicle is controlled to sound its horn. By incorporating the attention mechanism into the neural network model, the interactive game between the vehicle and traffic participants is fully considered. Furthermore, the feature vector settings in this application make the predicted risk coefficient more accurate.

[0057] In the specific implementation process, the feature vector of step S202 above also includes whether the two-dimensional polygon representing the controlled vehicle, the two-dimensional polygon representing the obstacle, and the two-dimensional polygon representing the controlled vehicle intersect, which affects the safety factor of the controlled vehicle. Among them, the larger the intersection area of ​​the two-dimensional polygon representing the obstacle and the two-dimensional polygon representing the controlled vehicle, the lower the safety factor of the controlled vehicle.

[0058] This method constructs a two-dimensional polygon based on the outline of the obstacle, and determines the safety factor of the controlled vehicle by the area of ​​the intersection between the two-dimensional polygon constructed with the outline of the controlled vehicle. This allows for a more intuitive and accurate determination of the safety factor of the controlled vehicle, making the controlled vehicle safer during driving.

[0059] Specifically, the two-dimensional polygon representing the controlled vehicle is a polygon externally tangent to the controlled vehicle, and the two-dimensional polygon representing the obstacle is a polygon externally tangent to the obstacle.

[0060] This method controls the controlled vehicle and the obstacle separately within their respective polygons, allowing the controlled vehicle to automatically sound its horn before an accident occurs, effectively preventing accidents from happening.

[0061] Furthermore, before constructing the neural network model that incorporates the attention mechanism, the method also includes: based on the model Obtain the attention weight ω corresponding to the attention coefficient of each obstacle. i , where d i Let A and B be constants, and n be the total number of obstacles.

[0062] Specifically, assume there are n obstacles, where n is a fixed constant to fix the input size, and the obstacle attention coefficient of the i-th obstacle is d. i Obtain attention weights In each round of parameter updates, obstacles with high risk factors are reinforced, and obstacles with greater potential danger are identified through attention weights.

[0063] Furthermore, before constructing the neural network model that incorporates the attention mechanism, the method also includes: based on the model p = 1 - ∑ 1≤i≤n d i ω i Determine the safety factor p of the controlled vehicle, where d i ω represents the obstacle attention coefficient of the i-th obstacle, n is the total number of obstacles, and ω i This represents the attention weight of the i-th obstacle.

[0064] Specifically, this method calculates the sum of the products of the corresponding attention weight and attention coefficient for each obstacle to obtain the unsafe coefficient of the controlled vehicle, and then subtracts the unsafe coefficient of the controlled vehicle from 1 to obtain the safe coefficient of the controlled vehicle.

[0065] Specifically, the feature vector is represented as (info1, info2, ..., infon), where n represents the dimension of the feature vector, which is equal to the number of times obstacle information is acquired within a preset time period. a1 represents the two-dimensional polygon of the obstacle, a2 represents the distance information, and a3 represents the movement speed information.

[0066] For example, if the information of an electric vehicle at a certain moment is info, then the movement information of the electric vehicle within the past 10 seconds can be statistically analyzed at 0.1-second intervals, i.e. (info1, info2, ..., info100). These 100 info values ​​can be used as the input feature vector.

[0067] This method constructs feature vectors by analyzing the two-dimensional polygons of obstacles, distance information, and movement speed information.

[0068] Furthermore, after inputting the real-time feature vectors into the neural network model for computation, and obtaining the real-time attention coefficient for obstacles and the real-time safety coefficient for the controlled vehicle, such as... Figure 4 As shown, the method also includes the following steps:

[0069] Step S301: Normalize the real-time safety factor of the controlled vehicle to obtain the normalized safety factor;

[0070] Step S302: If the normalized safety factor is less than the first safety factor threshold, control the controlled vehicle to sound its horn.

[0071] This method normalizes the real-time safety coefficient of the controlled vehicle, resulting in a more intuitive and easier-to-understand normalized safety coefficient. This improves the interpretability and visualization of the algorithm, and reduces computational complexity. It is only necessary to compare the normalized safety coefficient with the first safety coefficient threshold to determine whether the controlled vehicle needs to sound its horn.

[0072] Specifically, the method further includes: constructing a two-dimensional polygon representing the obstacle; wherein, constructing the two-dimensional polygon representing the obstacle includes: obtaining multiple location points on the edge of the obstacle; and sequentially connecting the multiple location points to form a two-dimensional polygon.

[0073] This method determines the size of a two-dimensional polygon by taking multiple location points on the edge of the obstacle, thus enabling a more accurate assessment of the obstacle's size in the two-dimensional plane.

[0074] More specifically, acquiring multiple location points on the edge of an obstacle includes: setting a spacing; and acquiring multiple location points on the edge of an obstacle at equal intervals based on the spacing.

[0075] This method sets the spacing between each location point of the obstacle to prevent the obstacle's edges from being too complex or the location points from being too numerous, thus avoiding excessive memory usage in the generated two-dimensional polygons of the obstacle.

[0076] Furthermore, the feature vector also includes the type of obstacle; the preset direction includes a first preset direction and a second preset direction, the first preset direction is perpendicular to the second preset direction, and both the first preset direction and the second preset direction are parallel to the horizontal plane.

[0077] This method obtains the type of obstacle by setting a preset direction; the obstacle type includes pedestrians, electric vehicles, cars, buses, and other obstacles. Determining the type of obstacle can help the controlled vehicle avoid collisions or reduce their severity. By identifying the type of obstacle, the vehicle can take appropriate measures, such as avoidance, deceleration, or stopping, thus improving driving safety and reducing traffic accidents.

[0078] Furthermore, the attention mechanism is one of the following: Bahdanau attention mechanism, Luong attention mechanism, or self-attention mechanism.

[0079] Both the Bahdanau attention mechanism and the Luong attention mechanism are techniques used to enhance the performance of recurrent neural networks (RNNs) when processing sequential data. Their main difference lies in how they handle the input and hidden states.

[0080] The Bahdanau attention mechanism computes attention weights at each time step of the RNN and then sums these weights across the input sequence to obtain a context vector for each time step. This context vector is used to assist in the computation of the RNN's hidden state at the current time step.

[0081] The Luong attention mechanism calculates attention weights at the current time step of the RNN and then applies these weights to the entire input sequence to obtain a context vector. There are two different variations of the Luong attention mechanism: global attention and local attention. Global attention performs a weighted summation on the entire input sequence, while local attention performs a weighted summation only on a portion of the input sequence.

[0082] Self-attention, on the other hand, is a different type of attention mechanism. It's not designed to enhance the performance of RNNs, but rather to improve the performance of Transformer models. Self-attention performs a weighted summation on all positions in the input sequence simultaneously, unlike RNNs which process each time step sequentially. This allows self-attention to capture long-range dependencies in the input sequence more quickly.

[0083] In summary, Bahdanau attention and Luong attention mechanisms are techniques used to enhance the performance of RNNs, while self-attention mechanisms are techniques used to enhance the performance of Transformer models (negative-based neural network models). They differ in how they handle input and hidden states and are suitable for different model structures and application scenarios.

[0084] This application also provides a vehicle horn control device. It should be noted that the vehicle horn control device of this application can be used to execute the vehicle horn control method provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0085] The following describes the vehicle horn control device provided in the embodiments of this application.

[0086] Figure 5 This is a schematic diagram of a vehicle horn control device according to an embodiment of this application. Figure 5 As shown, the device includes:

[0087] The first building unit 51 is used to build a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0088] The fusion of attention mechanisms and neural network models typically includes the following steps:

[0089] 1) Determine the scope of application of the attention mechanism: First, it is necessary to determine the specific location and method of applying the attention mechanism in the neural network model. The attention mechanism can be applied in different layers and modules, such as the encoding stage and decoding stage in an encoder-decoder model, or the attention mechanism itself can be an independent module.

[0090] 2) Select an appropriate attention mechanism model: Choose an appropriate attention mechanism model based on the specific task requirements and data characteristics. Common attention mechanism models include Bahdanau attention, Luong attention, and self-attention mechanisms.

[0091] 3) Integrating attention mechanisms and neural network models: Integrating the selected attention mechanism model into the neural network model usually requires some modifications and adjustments to the neural network model to accommodate the addition of the attention mechanism. For example, in an encoder-decoder model, an attention mechanism can be introduced at each time step of the decoder so that different parts of the input can be given different degrees of attention when generating the output.

[0092] 4) Training and tuning: After integration, the entire model needs to be trained and tuned so that the attention mechanism and neural network model can be effectively combined and achieve good performance in real tasks.

[0093] In summary, the integration of attention mechanisms and neural network models requires proper design and adjustment to ensure that the two can work together to improve the performance and effectiveness of the model.

[0094] Specifically, we first collect a large number of driving records from experienced drivers, extract multiple segments of drivers honking their horns, and an equal number of segments of drivers not honking their horns. These segments are then combined into a training dataset for training a neural network model that incorporates an attention mechanism.

[0095] The acquisition construction unit 52 is used to acquire real-time obstacle information and construct real-time feature vectors corresponding to the real-time obstacle information during the real-time driving of the controlled vehicle.

[0096] Specifically, the first step is to determine the real-time positions of obstacles around the controlled vehicle. This can be achieved using onboard sensors (such as LiDAR, cameras, and ultrasonic sensors). Then, based on these positions, a series of features can be extracted, including but not limited to the distance between the obstacle and the controlled vehicle, the obstacle's size, shape, speed, and direction of motion. Finally, the extracted obstacle features are combined into a real-time feature vector, which can be used to represent the various features of the obstacle. For example, features such as distance, shape, size, and speed can be used as components of the feature vector.

[0097] The operation unit 53 is used to input the real-time feature vector into the neural network model for operation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. When the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, the controlled vehicle is controlled to sound its horn.

[0098] By inputting real-time feature vectors into the neural network model for computation, the output includes the real-time attention coefficient of each obstacle (a scalar compressed to 0-1) and the safety coefficient of the controlled vehicle (a scalar compressed to 0-1). If the first safety coefficient threshold is 0.2, and s < 0.2, then it is considered that there is a potential risk, and the controlled vehicle is controlled to sound its horn.

[0099] In this embodiment, the first construction unit 51 is used to construct a neural network model that integrates the attention mechanism; the acquisition unit 52 is used to acquire real-time obstacle information and construct real-time feature vectors corresponding to the real-time obstacle information during the real-time driving of the controlled vehicle; the calculation unit 53 is used to input the real-time feature vectors into the neural network model for calculation to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, and to control the controlled vehicle to sound its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold. By integrating the attention mechanism into the neural network model, the interactive game ability between the vehicle and traffic participants is fully considered, and the feature vector settings in this application make the predicted risk coefficient more accurate.

[0100] As an optional approach, obtaining the building blocks includes representative modules;

[0101] The representative module is used to represent the two-dimensional polygons representing the controlled vehicle. Whether the two-dimensional polygons representing obstacles and the two-dimensional polygons representing the controlled vehicle intersect affects the safety factor of the controlled vehicle. Among them, the larger the intersection area of ​​the two-dimensional polygons representing obstacles and the two-dimensional polygons representing the controlled vehicle, the lower the safety factor of the controlled vehicle.

[0102] Specifically, the device constructs a two-dimensional polygon based on the outline of the obstacle, and determines the safety factor of the controlled vehicle by the area of ​​the intersection between the two-dimensional polygon constructed with the outline of the controlled vehicle. This allows for a more intuitive and accurate determination of the safety factor of the controlled vehicle, making the controlled vehicle safer during driving.

[0103] An alternative scheme is that the two-dimensional polygon representing the controlled vehicle is a polygon externally tangent to the controlled vehicle, and the two-dimensional polygon representing the obstacle is a polygon externally tangent to the obstacle.

[0104] The device controls the controlled vehicle and the obstacle to be contained within their respective polygons, allowing the controlled vehicle to automatically sound its horn before an accident occurs, thus effectively preventing the accident from happening.

[0105] In one alternative embodiment, the device further includes an acquisition unit;

[0106] The acquisition unit is used to, before constructing a neural network model that incorporates an attention mechanism, based on the model... Obtain the attention weight ω corresponding to the attention coefficient of each obstacle. i , where d i Let A and B be constants, and n be the total number of obstacles.

[0107] Specifically, assume there are n obstacles, where n is a fixed constant to fix the input size, and the obstacle attention coefficient of the i-th obstacle is d. i Obtain attention weights In each round of parameter updates, obstacles with high risk factors are reinforced, and obstacles with greater potential danger are identified through attention weights.

[0108] In one alternative embodiment, the apparatus further includes a determining unit;

[0109] Determine the unit, used to determine the model p = 1 - ∑ 1≤i≤n d i ω i Determine the safety factor p of the controlled vehicle, where d i ω represents the obstacle attention coefficient of the i-th obstacle, n is the total number of obstacles, and ω i This represents the attention weight of the i-th obstacle.

[0110] The device calculates the sum of the product of the corresponding attention weight and the attention coefficient for each obstacle to obtain the unsafe coefficient of the controlled vehicle. Then, by subtracting the unsafe coefficient of the controlled vehicle from 1, the safe coefficient of the controlled vehicle can be obtained.

[0111] One optional approach is to represent the feature vector as (info1, info2, ..., infon), where n represents the dimension of the feature vector, which is equal to the number of times obstacle information is acquired within a preset time period. a1 represents the two-dimensional polygon of the obstacle, a2 represents the distance information, and a3 represents the movement speed information.

[0112] Specifically, the device constructs a feature vector by analyzing the two-dimensional polygon of the obstacle, its distance information, and its movement speed information.

[0113] In one alternative embodiment, the apparatus further includes a receiving unit and a control unit;

[0114] The unit is used to input real-time feature vectors into the neural network model for computation, and after obtaining the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle, the real-time safety coefficient of the controlled vehicle is normalized to obtain the normalized safety coefficient.

[0115] The control unit is used to control the controlled vehicle to sound its horn when the normalized safety factor is less than the first safety factor threshold.

[0116] This device normalizes the real-time safety coefficient of the controlled vehicle, making the normalized safety coefficient more intuitive and easier to understand. This improves the interpretability and visualization of the algorithm, and reduces computational complexity. It is only necessary to compare the normalized safety coefficient with the first safety coefficient threshold to determine whether the controlled vehicle needs to sound its horn.

[0117] In one alternative embodiment, the device further includes a second building unit for constructing a two-dimensional polygon representing an obstacle; the second building unit includes an acquisition module and a connection module, the acquisition module for acquiring multiple location points on the edge of the obstacle; and the connection module for sequentially connecting the multiple location points to form a two-dimensional polygon.

[0118] The device determines the size of a two-dimensional polygon by measuring multiple points on the edge of the obstacle, thus enabling a more accurate assessment of the obstacle's size in a two-dimensional plane.

[0119] In one alternative approach, the acquisition module includes a setting submodule and an acquisition submodule; the setting submodule is used to set the spacing; the acquisition submodule is used to acquire multiple location points on the edge of the obstacle at equal intervals based on the spacing.

[0120] This device prevents the edges of obstacles from being too complex or the number of points from being too large, thus avoiding excessive memory usage in the generated two-dimensional polygons of obstacles. By setting the spacing between each location point of the obstacle, the device prevents the two-dimensional polygons of the obstacle from being generated from occupying too much system memory.

[0121] An optional scheme is that the preset direction includes a first preset direction and a second preset direction, the first preset direction is perpendicular to the second preset direction, and both the first preset direction and the second preset direction are parallel to the horizontal plane.

[0122] This device identifies the type of obstacle by setting a preset direction; the obstacle types include pedestrians, electric vehicles, cars, buses, and other obstacles. Determining the type of obstacle can help the controlled vehicle avoid collisions or reduce their severity. By identifying the type of obstacle, the vehicle can take appropriate measures, such as swerving, slowing down, or stopping, thus improving driving safety and reducing traffic accidents.

[0123] One possible approach is to use one of the following attention mechanisms: Bahdanau attention mechanism, Luong attention mechanism, or self-attention mechanism.

[0124] Both the Bahdanau attention mechanism and the Luong attention mechanism are techniques used to enhance the performance of recurrent neural networks (RNNs) when processing sequential data. Their main difference lies in how they handle the input and hidden states.

[0125] The Bahdanau attention mechanism computes attention weights at each time step of the RNN and then sums these weights across the input sequence to obtain a context vector for each time step. This context vector is used to assist in the computation of the RNN's hidden state at the current time step.

[0126] The Luong attention mechanism calculates attention weights at the current time step of the RNN and then applies these weights to the entire input sequence to obtain a context vector. There are two different variations of the Luong attention mechanism: global attention and local attention. Global attention performs a weighted summation on the entire input sequence, while local attention performs a weighted summation only on a portion of the input sequence.

[0127] Self-attention, on the other hand, is a different type of attention mechanism. It's not designed to enhance the performance of RNNs, but rather to improve the performance of Transformer models. Self-attention performs a weighted summation on all positions in the input sequence simultaneously, unlike RNNs which process each time step sequentially. This allows self-attention to capture long-range dependencies in the input sequence more quickly.

[0128] In summary, Bahdanau attention and Luong attention mechanisms are techniques used to enhance the performance of RNNs, while self-attention mechanisms are techniques used to enhance the performance of Transformer models (negative-based neural network models). They differ in how they handle input and hidden states and are suitable for different model structures and application scenarios.

[0129] This application also provides an autonomous driving vehicle, including electronic devices.

[0130] The vehicle horn control device includes a processor and a memory. The aforementioned building units, building and acquiring units, and arithmetic units are all stored as program units in the memory. The processor executes the program units stored in the memory to implement the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.

[0131] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and adjusting kernel parameters can address the issue of low accuracy in horn processing caused by existing horn planning schemes failing to adequately consider the interactive game between autonomous vehicles and traffic participants.

[0132] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0133] This invention provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the computer-readable storage medium is located to execute the vehicle horn control method.

[0134] Specifically, vehicle horn control methods include:

[0135] Step S201: Construct a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0136] Step S202: During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed.

[0137] Step S203: Input the real-time feature vector into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, control the controlled vehicle to sound its horn.

[0138] This invention provides a processor for running a program, wherein the program executes the vehicle horn control method during runtime.

[0139] Specifically, vehicle horn control methods include:

[0140] Step S201: Construct a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0141] Step S202: During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed.

[0142] Step S203: Input the real-time feature vector into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, control the controlled vehicle to sound its horn.

[0143] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:

[0144] Step S201: Construct a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0145] Step S202: During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed.

[0146] Step S203: Input the real-time feature vector into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, control the controlled vehicle to sound its horn.

[0147] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0148] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:

[0149] Step S201: Construct a neural network model that integrates the attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and the obstacle attention coefficient and the safety coefficient of the controlled vehicle corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, the distance information between the obstacle and the controlled vehicle, and the speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the safety coefficient of the controlled vehicle. The obstacle attention coefficient represents the weight of the final horn-honking result in considering the obstacle.

[0150] Step S202: During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed.

[0151] Step S203: Input the real-time feature vector into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, control the controlled vehicle to sound its horn.

[0152] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0155] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0156] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0157] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0158] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0159] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0160] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0161] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0162] 1) A vehicle horn control method according to this application includes: constructing a neural network model that integrates an attention mechanism, wherein the neural network model is trained using multiple sets of training data, wherein any set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector, wherein the feature vector is composed of at least a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and speed information of the obstacle in a preset direction, wherein the two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle, the obstacle attention coefficient directly affects the controlled vehicle safety coefficient, and the obstacle attention coefficient represents the weight of the obstacle consideration in the final horn horn result; during the real-time driving of the controlled vehicle, acquiring real-time obstacle information and constructing a real-time feature vector corresponding to the real-time obstacle information; inputting the real-time feature vector into the neural network model for calculation to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, and controlling the controlled vehicle to honk its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold. By incorporating the attention mechanism into the neural network model, the interactive game ability between vehicles and traffic participants is fully considered, and the feature vector settings in this application make the predicted risk coefficient more accurate.

[0163] 2) A vehicle horn control device according to this application includes: a construction unit for constructing a neural network model that integrates an attention mechanism, wherein the neural network model is trained using multiple sets of training data, wherein any set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector, wherein the feature vector is composed of at least a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and moving speed information of the obstacle in a preset direction, wherein the two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle, the obstacle attention coefficient directly affects the controlled vehicle safety coefficient, and the obstacle attention coefficient represents the weight of the obstacle in the final horn-honking result; an acquisition construction unit for acquiring real-time obstacle information and constructing a real-time feature vector corresponding to the real-time obstacle information during the real-time driving of the controlled vehicle; and a calculation unit for inputting the real-time feature vector into the neural network model for calculation to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, and controlling the controlled vehicle to honk its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold. By incorporating the attention mechanism into the neural network model, the interactive game ability between vehicles and traffic participants is fully considered, and the feature vector settings in this application make the predicted risk coefficient more accurate.

[0164] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling vehicle horn use, characterized in that, include: A neural network model integrating an attention mechanism is constructed, wherein the neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the controlled vehicle safety coefficient, and the obstacle attention coefficient characterizes the weight of the final horn-honking result in considering the obstacle. During the real-time driving of the controlled vehicle, real-time obstacle information is acquired, and a real-time feature vector corresponding to the real-time obstacle information is constructed. The real-time feature vector is input into the neural network model for calculation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle. If the real-time safety coefficient of the controlled vehicle is less than the first safety coefficient threshold, the controlled vehicle is controlled to sound its horn.

2. The method according to claim 1, characterized in that, The feature vector also includes a two-dimensional polygon representing the controlled vehicle. Whether the two-dimensional polygon representing the obstacle and the two-dimensional polygon representing the controlled vehicle intersect affects the safety factor of the controlled vehicle. The larger the intersection area of ​​the two-dimensional polygon representing the obstacle and the two-dimensional polygon representing the controlled vehicle, the lower the safety factor of the controlled vehicle.

3. The method according to claim 2, characterized in that, The two-dimensional polygon representing the controlled vehicle is a polygon externally tangent to the controlled vehicle, and the two-dimensional polygon representing the obstacle is a polygon externally tangent to the obstacle.

4. The method according to claim 1, characterized in that, Before constructing the neural network model that incorporates the attention mechanism, the method further includes: According to the model Obtain the attention weight ω corresponding to the attention coefficient of each obstacle. i , where d i The obstacle attention coefficient of the i-th obstacle is represented by A and B, which are constants, and n is the total number of obstacles.

5. The method according to claim 4, characterized in that, Before constructing the neural network model that incorporates the attention mechanism, the method further includes: According to the model p = 1 - ∑ 1≤i≤n d i ω i Determine the safety factor p of the controlled vehicle, where d i The obstacle attention coefficient represents the i-th obstacle, where n is the total number of obstacles, and ω is the number of obstacles. i The attention weight for the i-th obstacle is represented.

6. The method according to claim 1, characterized in that, The feature vector is represented as (info1, info2, ..., infon), where n represents the dimension of the feature vector, which is equal to the number of times obstacle information is acquired within a preset time period. a1 represents the two-dimensional polygon of the obstacle, a2 represents the distance information, and a3 represents the movement speed information.

7. The method according to claim 1, characterized in that, After inputting the real-time feature vector into the neural network model to obtain the real-time obstacle attention coefficient and the real-time safety coefficient of the controlled vehicle, the method further includes: The real-time safety factor of the controlled vehicle is normalized to obtain a normalized safety factor. If the normalized safety factor is less than the first safety factor threshold, the controlled vehicle is controlled to sound its horn.

8. The method according to claim 1, characterized in that, The method further includes: Construct a two-dimensional polygon representing the obstacle; The construction of the two-dimensional polygon representing the obstacle includes: Obtain multiple location points on the edge of the obstacle; The two-dimensional polygon is formed by sequentially connecting multiple of the aforementioned location points.

9. The method according to claim 8, characterized in that, Obtaining multiple location points on the edge of the obstacle, including: Set the spacing; Multiple location points on the edge of the obstacle are obtained at equal intervals based on the aforementioned spacing.

10. The method according to any one of claims 1 to 9, characterized in that, The feature vector also includes the type of the obstacle; The preset direction includes a first preset direction and a second preset direction. The first preset direction is perpendicular to the second preset direction, and both the first preset direction and the second preset direction are parallel to the horizontal plane.

11. The method according to any one of claims 1 to 9, characterized in that, The attention mechanism is one of the following: Bahdanau attention mechanism, Luong attention mechanism, or self-attention mechanism.

12. A vehicle horn control device, characterized in that, include: A construction unit is used to construct a neural network model that integrates an attention mechanism. The neural network model is trained using multiple sets of training data. Each set of training data includes: a feature vector composed of obstacle information obtained within a historical time period, and an obstacle attention coefficient and a controlled vehicle safety coefficient corresponding to the feature vector. The feature vector is composed of at least a two-dimensional polygon representing the obstacle, distance information between the obstacle and the controlled vehicle, and speed information of the obstacle in a preset direction. The two-dimensional polygon representing the obstacle is formed by sequentially connecting multiple position points on the obstacle. The obstacle attention coefficient directly affects the controlled vehicle safety coefficient and represents the weight of the obstacle consideration in the final horn-honking result. The acquisition construction unit is used to acquire real-time obstacle information and construct a real-time feature vector corresponding to the real-time obstacle information during the real-time driving process of the controlled vehicle. The computing unit is used to input the real-time feature vector into the neural network model for computation to obtain the real-time attention coefficient of the obstacle and the real-time safety coefficient of the controlled vehicle, and to control the controlled vehicle to sound its horn when the real-time safety coefficient of the controlled vehicle is less than a first safety coefficient threshold.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the vehicle horn control method according to any one of claims 1 to 11.

14. An electronic device, characterized in that, include: One or more processors, a memory, and 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 including methods for performing the vehicle horn control method according to any one of claims 1 to 11.

15. An autonomous vehicle, characterized in that, include: The electronic device according to claim 14.

Citation Information

Patent Citations

  • Obstacle avoidance trajectory planning method and system and vehicle

    CN111591307A

  • Automatic driving whistling method, device and equipment and readable storage medium

    CN116394970A