Vehicle type identification method, electronic equipment and computer storage medium

The vehicle type recognition method processes audio data to accurately identify nearby vehicles, addressing the challenge of timely recognition and ensuring special vehicles can pass through safely.

CN119625995AActive Publication Date: 2025-03-14ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411772279.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-14
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing technologies fail to promptly identify nearby vehicles' types, particularly special vehicles like ambulances, police cars, and fire trucks, leading to difficulties in their timely passage and potential accidents or losses.

Method used

A vehicle type recognition method using an audio classification model that processes multi-channel audio data from a vehicle's environment, performing channel feature extraction, dimension transformation, and data processing to accurately determine the type of nearby vehicles, enabling timely recognition and avoidance measures.

Benefits of technology

The method enables precise and timely identification of nearby vehicle types, facilitating avoidance maneuvers and ensuring special vehicles can reach their destinations quickly, thereby reducing accidents and losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625995A_ABST
    Figure CN119625995A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle type identification method, electronic equipment and a computer storage medium. The method comprises the following steps: acquiring target audio data; performing channel feature extraction on the target audio data based on a depth divisible convolution module to obtain first feature data; performing dimension conversion on the first feature data to obtain second feature data; processing the second feature data according to element-level multiplication to obtain third feature data; performing channel feature extraction on the third feature data based on a depth-divisible convolution module to obtain fourth feature data; calculating a plurality of probability values between the fourth feature data and the plurality of vehicle labels; a vehicle type of the vehicle is determined based on the plurality of probability values. According to the invention, the type of the vehicle can be identified timely based on the audio signal of the previous driving environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the acceleration of urbanization and the continuous development of vehicle technology, there are more and more family cars, commercial vehicles or special vehicles on the road. Among them, special vehicles are vehicles that need to perform emergency tasks, such as ambulances, police cars, military vehicles, rescue vehicles, fire trucks, etc.

[0003] If the vehicle type of nearby vehicles is not identified in time to determine whether there is a special vehicle, other vehicles on the road will not take evasive measures for the special vehicle, making it difficult for the special vehicle to drive quickly. As a result, life or property loss may occur due to the difficulty of the special vehicle to drive quickly to the destination. Summary of the invention

[0004] In view of the above, the embodiments of the present application provide a vehicle type identification method, an electronic device and a computer storage medium, which can solve the problem in the prior art that the vehicle type of nearby vehicles is not identified in time to determine whether there is a special vehicle.

[0005] An embodiment of the present application provides a vehicle type recognition method, which is applied to a first vehicle, wherein the first vehicle is provided with an audio classification model, wherein the audio classification model is used to recognize the vehicle type of a second vehicle, and the second vehicle is located on one side of the first vehicle; the method comprises: acquiring target audio data, wherein the target audio data comprises sound information collected by the first vehicle in a current driving environment, and the target audio data has multiple channels; performing channel feature extraction on the target audio data to obtain first feature data, wherein the channel dimension of the first feature data is greater than the channel dimension of the target audio data; performing dimension conversion on the first feature data to obtain second feature data, wherein the number of channels of the second feature data is the same as the number of channels of the target audio data; performing data processing on the second feature data to obtain third feature data, wherein the third feature data comprises data interaction information between channels in the second feature data; performing channel feature extraction on the third feature data to obtain fourth feature data, wherein the fourth feature data is used to characterize the sound characteristics of the second vehicle; and determining the vehicle type of the second vehicle based on the fourth feature data.

[0006] The vehicle type identification method of the embodiment of the present application can separate the correlation between the spatial dimension and the channel dimension of the target audio data by performing channel feature extraction on the target audio data, thereby reducing the calculation parameters. The first feature data is then dimensionally converted to reduce the complexity of subsequent data calculations. Then, the second feature data is processed to enhance the information interaction between different feature channels and improve the model's ability to characterize features. Next, the third feature data is subjected to channel feature extraction to obtain data that can accurately reflect the sound characteristics of the second vehicle. Finally, the vehicle type of the second vehicle is determined based on the fourth feature data. This method can accurately identify the type of the second vehicle in a timely manner.

[0007] In some embodiments, in some embodiments, after the data processing of the second feature data to obtain the third feature data, it also includes: performing full connection processing on the third feature data to obtain first processed data, the number of channels of the first processed data is the same as the number of channels of the second feature data; the channel feature extraction of the third feature data to obtain the fourth feature data includes: performing channel feature extraction on the first processed data to obtain the fourth feature data.

[0008] In some embodiments, after performing full connection processing on the third feature data to obtain the first processed data, it also includes: performing normalization processing on the first processed data to obtain the second processed data; performing channel feature extraction on the first processed data to obtain the fourth feature data includes: performing channel feature extraction on the second processed data to obtain the fourth feature data.

[0009] In some embodiments, after extracting channel features from the target audio data to obtain first feature data, it also includes: normalizing the first feature data to obtain third processed data; and performing dimension conversion on the first feature data to obtain second feature data includes: performing dimension conversion on the third processed data to obtain the second feature data.

[0010] In some embodiments, the audio classification model includes a second activation layer; after performing dimension conversion on the third processed data to obtain the second feature data, it also includes: inputting the second feature data into the second activation layer to obtain fourth processed data, and each data in the fourth processed data is within a preset numerical range; performing data processing on the second feature data to obtain the third feature data includes: performing data processing on the fourth processed data to obtain the third feature data.

[0011] In some embodiments, determining the vehicle type of the second vehicle based on the fourth characteristic data includes: calculating multiple probability values ​​between the fourth characteristic data and multiple vehicle tags, each of the vehicle tags corresponds to a vehicle type, and each of the vehicle tags corresponds to one probability value; determining a target probability value based on the multiple probability values, and taking the vehicle type corresponding to the target probability value as the vehicle type of the second vehicle.

[0012] In some embodiments, the audio classification model includes a first activation layer; the calculation of multiple probability values ​​between the fourth feature data and multiple vehicle labels includes: pooling the fourth feature data to obtain fifth feature data; inputting the fifth feature data into the first activation layer to obtain multiple probability values.

[0013] In some embodiments, acquiring the target audio data includes: collecting the audio signal of the first vehicle in the current driving environment; digitizing the audio signal to obtain initial audio data; reshaping the initial audio data to obtain audio reshaping data; and aggregating the audio reshaping data to obtain the target audio data.

[0014] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above-mentioned vehicle type identification method.

[0015] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned vehicle type identification method.

[0016] The above-mentioned electronic device and computer-readable storage medium correspond to the above-mentioned vehicle type identification method and vehicle type identification method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The present invention is a flowchart of a method for identifying a vehicle type according to an embodiment of the present application.

[0018] Figure 2 A schematic diagram of the structure of an audio classification model provided in one embodiment of the present application.

[0019] Figure 3 for Figure 2 Schematic diagram of the structure of the StarBlock module.

[0020] Figure 4 The present invention is a flowchart of the steps of the training process of the audio classification model provided according to one embodiment of the present application.

[0021] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the implementation methods of the present application and the features in the implementation methods can be combined with each other without conflict.

[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described implementations are only part of the implementations of the present application, rather than all the implementations.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0025] It should be further noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0026] In this application, "at least one" means one or more, and "more" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0027] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0028] The embodiments of the present application provide a vehicle type identification method, an electronic device, and a computer-readable storage medium. The vehicle type identification method is applied to a first vehicle, wherein the first vehicle can be a commercial vehicle, a family vehicle, an engineering vehicle, etc. The present application does not limit the specific type of the first vehicle.

[0029] Specifically, the first vehicle is provided with an audio classification model, and the audio classification model is used to identify the vehicle type of the second vehicle, and the second vehicle is located on one side of the first vehicle. In this embodiment, the second vehicle is located within the preset collection range of the first vehicle. Among them, the preset collection range can be a circular range with a radius of 10 meters centered on the position of the first vehicle. Alternatively, the preset collection range can be a quadrilateral range with a length of 10 meters and a width of 5 meters centered on the position of the first vehicle. The present application does not limit the preset collection range of the first vehicle, and the preset collection range of the first vehicle can be a regular pattern or an irregular pattern.

[0030] The first vehicle uses a pre-trained audio classification model to identify the vehicle type of the second vehicle, thereby determining whether the second vehicle is a special vehicle. When the second vehicle is identified as a special vehicle, the driver of the first vehicle is prompted that there is a special vehicle nearby, so as to remind the driver to take avoidance measures for the special vehicle and let the special vehicle pass first.

[0031] Special vehicles are vehicles that need to perform emergency tasks, including ambulances, police cars, military vehicles, rescue vehicles, fire trucks, tow trucks, engineering rescue vehicles, road sweepers, water trucks, garbage collection trucks, aerial work vehicles, road construction vehicles, traffic command vehicles, dangerous goods transport vehicles, mobile communication vehicles, medical emergency vehicles, power engineering vehicles, water engineering vehicles and tunnel inspection vehicles, etc. In other embodiments, the method can also be applied to other devices besides the first vehicle, and the present application does not limit it.

[0032] The specific application and training method of the audio classification model will be described in detail below.

[0033] Figure 1 This is a flowchart of the steps of an embodiment of the vehicle type identification method of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0034] See also Figure 1 As shown, the vehicle type identification method may include the following steps.

[0035] Step 101, obtaining target audio data.

[0036] In this embodiment, the target audio data includes sound information collected by the first vehicle in the current driving environment, and the target audio data has multiple channels. Specifically, in order to obtain the target audio data, a sound collection device can be set on the first vehicle, and when the driver drives the first vehicle, the sound collection device collects the audio signal of the first vehicle in the current driving environment. The sound collection device can be an audio sensor, a microphone, etc.

[0037] Specifically, the audio signal is processed into data to obtain initial audio data. The initial audio data is preprocessed to obtain intermediate audio data. The data preprocessing includes data type conversion, data segmentation, data normalization, etc. For example, the value of each data in the initial audio data is processed so that the value of each data is within a preset range. The preset range may be [-1, 1], and the preset range may be changed according to actual data preprocessing requirements.

[0038] Since the amount of initial audio data is large, the initial audio data can be processed step by step by setting a sliding window. The sliding window is set to: the window length is 0.96 seconds and the sliding step is 0.48 seconds. In other embodiments, the sliding window can also be set to a window length of 1.25 seconds and a sliding step of 0.65 seconds. The sliding window can be adjusted according to the actual data processing requirements.

[0039] Further, such as Figure 2 As shown, the audio classification model includes a data reshaping layer, a data aggregation layer, a StarBlock module, a pooling layer and a first activation layer which are arranged in sequence. The intermediate audio data is input into the data reshaping layer for data reshaping processing to remove the interference data in the intermediate audio data. The intermediate audio data after data reshaping is then input into the data aggregation layer for data aggregation processing to ensure the uniformity of the data. In the present embodiment, before the intermediate audio data is input into the data reshaping layer for data reshaping processing, the intermediate audio data can also be processed using a short-time Fourier transform to obtain a logarithmic Mel feature, and the logarithmic Mel feature is used as the intermediate audio data. Among them, data aggregation and data reshaping processing are both prior art and will not be repeated here.

[0040] For audio signals, the dimension of the data corresponding to the audio signals is relatively high. If the data corresponding to the audio signals are directly input into the model for training or reasoning, the complexity of the model training or reasoning is also high, and overfitting is prone to occur. Therefore, it is necessary to perform data preprocessing, data reshaping and data aggregation on the data corresponding to the audio signals, and then use the processed data as the input of the model, which can not only improve the accuracy of the model processing, but also reduce the complexity of the model processing data in the early stage. In this embodiment, since the logarithmic Mel feature can calculate the sound frame by frame, capture the instantaneous dynamic characteristics of the sound source, and map the frequency response similar to human auditory perception. Therefore, the logarithmic Mel feature is closer to the characteristics of the audio signal. When the model is used for training or reasoning, the intermediate audio data is processed by short-time Fourier transform to obtain the logarithmic Mel feature. Using the logarithmic Mel feature as the intermediate audio data can better reflect the differences between different sample categories in the audio signal, and thus can more accurately identify and classify the sound.

[0041] Step 102: extract channel features from the target audio data to obtain first feature data.

[0042] In some embodiments, the channel dimension of the first feature data is greater than the channel dimension of the target audio data. Figure 3 ,The StarBlock module includes a depthwise separable convolutional module, a fully connected layer, a normalization layer, and a second activation layer. The depthwise separable convolutional module includes a first depthwise separable convolutional layer and a second depthwise separable convolutional layer.

[0043] Assume that the channel dimension of the target audio data is d, input the target audio data into the StarBlock module, and use the first depth-separable convolutional layer to extract channel features of the target audio data to obtain the first feature data with a channel dimension of 4d.

[0044] Specifically, depthwise separable convolution mainly includes channel-by-channel convolution and point-by-point convolution. Channel-by-channel convolution mainly applies a convolution kernel independently in each input channel, and each convolution kernel is only responsible for the convolution operation of one channel, which can significantly reduce the number of parameters and the amount of calculation. After channel-by-channel convolution, point-by-point convolution mainly uses a 1x1 convolution kernel to convolve the output of all channels to mix and combine the features of different channels to generate new feature data, thereby enhancing the expressiveness of the model.

[0045] Step 103: perform dimension conversion on the first feature data to obtain second feature data.

[0046] In some embodiments, the number of channels of the second feature data is the same as the number of channels of the target audio data. Before the first feature data is dimensionally converted, it is necessary to first normalize the first feature data based on the normalization layer to obtain the third processed data. Then, the third processed data is dimensionally converted to obtain the second feature data. In this embodiment, the normalization layer is a batch normalization layer. The application of the normalization layer stabilizes the process of model reasoning, thereby reducing the occurrence of overfitting. At the same time, two parallel fully connected layers are designed after the first depth separable convolution layer, and the third processed data is input into the two parallel fully connected layers for dimension conversion to obtain the second feature data. The two parallel fully connected layers can convert the first feature data with a channel dimension of 4d into the second feature data with a channel dimension of d. Not only can the multi-scale feature data in the third processed data be extracted, but also the model is guaranteed to have high computational efficiency.

[0047] Further, the second feature data is input into the second activation layer to obtain fourth processed data, and each data in the fourth processed data is within a preset numerical range. In this embodiment, the second activation layer is provided with a ReLU6 activation function. The ReLU6 activation function sets all outputs of data less than 0 in the second feature data to 0, and at the same time limits all outputs to a preset numerical range, that is, between [0,6]. The processing of the second activation layer helps to reduce the amount of calculation of the model and prevent overfitting.

[0048] Step 104: Process the second characteristic data to obtain third characteristic data.

[0049] In some embodiments, the third characteristic data includes data interaction information between channels in the second characteristic data. Figure 3 , the fourth processed data is processed based on element-level multiplication to obtain the third feature data. The application of element-level multiplication can enhance the information interaction capability between different feature channels in the fourth processed data, and also improve the model's ability to represent features.

[0050] Further, the third feature data is fully connected to obtain the first processed data, and the number of channels of the first processed data is the same as the number of channels of the second feature data. The third feature data is fully connected, so that the model can integrate the feature data extracted by the first depth-separable convolution layer, two parallel fully connected layers, the normalization layer, the ReLU6 activation function, and the element-level multiplication to obtain data that fully reflects the channel characteristics.

[0051] Step 105: extract channel features from the third feature data to obtain fourth feature data.

[0052] In some embodiments, the fourth feature data is used to characterize the sound characteristics of the second vehicle. Specifically, based on the second depth-separable convolution layer, channel feature extraction is performed on the first processed data to obtain the fourth feature data. Specifically, based on the normalization layer, the first processed data is normalized to obtain the second processed data. Based on the second depth-separable convolution layer, channel feature extraction is performed on the second processed data to obtain the fourth feature data.

[0053] Step 106: Determine the vehicle type of the second vehicle based on the fourth characteristic data.

[0054] In some embodiments, multiple probability values ​​between the fourth feature data and multiple vehicle tags are calculated, each vehicle tag corresponds to a vehicle type, and each vehicle tag corresponds to a probability value. A target probability value is determined based on the multiple probability values, and the vehicle type corresponding to the target probability value is used as the vehicle type of the second vehicle.

[0055] In this embodiment, corresponding vehicle labels are set according to the vehicle type. For example, when the special vehicles include ambulances, police cars, military vehicles, rescue vehicles, and fire trucks, the vehicle labels include ambulance labels, police car labels, military vehicle labels, rescue vehicle labels, and fire truck labels. In other embodiments, if the special vehicles also include other vehicles, other vehicle labels are set accordingly.

[0056] For details, please combine Figure 2 , based on the pooling layer, the fourth feature data is pooled to obtain the fifth feature data. The fifth feature data is input into the first activation layer to obtain multiple probability values. In this embodiment, the fourth feature data is averaged and pooled to obtain the fifth feature data. Average pooling slides a sliding window on the input data, averages all values ​​in each window, and obtains the output value of the window. Average pooling can effectively suppress noise and reduce information redundancy. It can also well retain the background information of the data and reduce the problem of background information loss caused by ignoring local maxima.

[0057] The first activation layer is equipped with a Softmax function. The Softmax function can calculate the probability value between the fifth feature data and each vehicle label. The sum of all probability values ​​is 1.

[0058] In some embodiments, the maximum probability value among the multiple probability values ​​is used as the target probability value. The vehicle type corresponding to the vehicle label matching the target probability value is the vehicle type of the second vehicle.

[0059] In this embodiment, it is also possible to detect whether the target probability value is greater than a preset probability threshold. If the target probability value is greater than the preset probability threshold, the vehicle type corresponding to the vehicle label matching the target probability value is the vehicle type of the second vehicle. The preset probability threshold is 0.95 or 0.9. The specific value of the preset probability threshold can be set according to actual detection requirements.

[0060] It should be noted that two or more StarBlock modules can be set between the data aggregation layer and the pooling layer. The more layers of StarBlock modules are set, the more key features can be extracted, and the higher the accuracy of the calculated probability value.

[0061] In this embodiment, when the second vehicle is determined to be a special vehicle, the first vehicle can send a prompt message to the outside to remind other vehicles that a special vehicle is passing by and that they need to give way to the special vehicle to ensure that the special vehicle can reach the destination of the task in time. The first vehicle can send the prompt message by sound or screen display. This application does not limit the way in which the first vehicle sends the prompt message.

[0062] Compared with the prior art, this embodiment has at least the following advantages: By using the first deep convolutional layer to process the target audio data, the correlation between the spatial dimension and the channel dimension of the target audio data can be split, reducing the number of parameters required for the convolution calculation. The first feature data is then converted to reduce the complexity of subsequent data calculations. Then, the second feature data is processed using element-level multiplication to enhance the information interaction between different feature channels and improve the model's ability to characterize features. Next, the third feature data is processed using the second deep separable convolutional layer to obtain data that can accurately reflect the sound characteristics of the second vehicle. Finally, the vehicle type of the second vehicle is determined by calculating the multiple probability values. This method can identify the vehicle type of the second vehicle in a timely manner. When the second vehicle is identified as a special vehicle, other vehicles are reminded to avoid the special vehicle so that the special vehicle can complete the emergency task in a timely manner, thereby avoiding or reducing casualties or property losses.

[0063] refer to Figure 4 The figure is a flowchart of the steps of the training process of the audio classification model provided in the embodiment of the present application. The specific steps include: Step 201, obtaining training audio data.

[0064] In some embodiments, the training audio data includes sound information collected by the first vehicle in historical driving environments.

[0065] For example, we can collect alarm sound samples and road sound samples of a particular vehicle. Then, we use an audio synthesis editor to edit and process the alarm sound samples and road sound samples. Specifically, we adjust the time series characteristics of the alarm sound samples and road sound samples, including changing the pitch and volume, to ensure that they can adapt to a variety of application scenarios. Subsequently, we synthesize these processed alarm sound samples and road sound samples to obtain synthesized sounds. After the synthesis is completed, we use manual evaluation and professional audio analysis tools to verify the authenticity and consistency of the synthesized sounds. This ensures that the synthesized sounds can perform well in the subsequent training process of the audio classification model.

[0066] Then, the synthesized sound is processed into data to obtain training audio data. The data processing includes data preprocessing, data reshaping and data aggregation. For specific content, please refer to step 101, and it will not be repeated here to avoid repetition.

[0067] Step 202: extract channel features from the training audio data to obtain first training feature data.

[0068] In some embodiments, the channel dimension of the first training feature data is greater than the channel dimension of the training audio data, and the training audio data has multiple channels.

[0069] Step 203: perform dimension conversion on the first training feature data to obtain second training feature data.

[0070] In some embodiments, the number of channels of the second training feature data is the same as the number of channels of the training audio data.

[0071] Step 204: Process the second training feature data to obtain third training feature data.

[0072] In some embodiments, the third training feature data is used to characterize data interaction information between channels in the second training feature data.

[0073] Step 205: Perform channel feature extraction on the third training feature data to obtain fourth training feature data.

[0074] The specific contents of step 202 to step 205 are the same as the specific contents of step 102 to step 105, and will not be repeated here to avoid repetition.

[0075] Step 206 , calculating a plurality of training probability values ​​between the fourth training feature data and a plurality of vehicle labels, each vehicle label corresponding to a vehicle type.

[0076] In some embodiments, the fourth training feature data is pooled to obtain fifth training feature data. The fifth training feature data is input into the first activation layer to obtain multiple training probability values. The first activation layer is provided with a Softmax function. The Softmax function can calculate the probability value between the fifth training feature data and each vehicle label. The sum of all probability values ​​is 1.

[0077] Step 207, obtaining labeling probability data.

[0078] In some embodiments, the labeled probability data characterizes the association between the training audio data and each vehicle label. In this embodiment, the training audio data is manually labeled to obtain the labeled probability data. For example, if the training audio data is data corresponding to the sound emitted by an ambulance, the probability value between the training audio data and the ambulance label in the labeled probability data is marked as 1, and the probability value between the training audio data and other vehicle labels is marked as 0. The probability values ​​between the training audio data and all vehicle labels are used as the labeled probability data.

[0079] Step 208: Calculate the loss value of the loss function corresponding to the audio classification model based on the multiple training probability values ​​and the labeled probability data.

[0080] In this embodiment, a cross entropy loss function is used to calculate the loss value of the loss function corresponding to the audio classification model, so that the difference between multiple training probability values ​​and labeled probability data can be measured.

[0081] Step 209: Update the model parameters of the audio classification model based on the loss value until the audio classification model converges.

[0082] The gradient of the loss function with respect to the model parameters is calculated through the back-propagation algorithm, and then the model parameters are updated using an optimization algorithm (such as Adam) to minimize the loss function value, thereby improving the prediction accuracy of the model.

[0083] In some embodiments, the model parameters are also initialized using the He initialization method. The He initialization method is a method for initializing the weights of a neural network, which aims to solve the problem of neuron "death" that may be caused by the ReLU activation function during initialization. He initialization reasonably initializes the weights according to the number of activation units in the previous layer, ensuring that the input and output variances of each layer are consistent, thereby speeding up the training speed and improving the stability of the model.

[0084] Combining the Adam optimization algorithm, loss function and He initialization method can effectively optimize the neural network model. The Adam algorithm accelerates the convergence speed and improves the stability of training by dynamically adjusting the learning rate; the loss function is used as an optimization target to guide the adjustment of model parameters and improve prediction accuracy; the He initialization method ensures the rationality of network initialization and reduces the difficulties in the early stages of training. These methods work together to enable the model to learn and generalize better.

[0085] It should be noted that the training audio data may include multiple initial training data. Each initial training data corresponds to a vehicle type. Each initial training data is input into the audio classification model respectively, so that the audio classification model can learn the characteristics of the sound emitted by vehicles of different vehicle types. Thereby, the accuracy of the audio classification model in identifying the vehicle type of the second vehicle is improved.

[0086] Compared with the prior art, this embodiment has at least the following advantages: On the one hand, the model parameters are updated through the loss function and the Adam optimization algorithm to minimize the loss function value, thereby improving the prediction accuracy of the model. On the other hand, the He initialization method is used to solve the problem of neuron "death" that may be caused by the ReLU activation function during initialization, so as to ensure that the input and output variances of each layer are consistent, thereby speeding up the training speed and improving the stability of the model. Thus, the training effect of the audio classification model is improved.

[0087] The embodiment of the present application also provides a vehicle type recognition system. The vehicle type recognition method is applied to the vehicle type recognition system. The vehicle type recognition system is deployed in a first vehicle. The vehicle type recognition system includes a sound collection device, a data transmission component, a signal processing unit and a control unit. The control unit is communicatively connected to the sound collection device, the data transmission component and the signal processing unit.

[0088] In this embodiment, the sound collection device is an array of microphones outside the vehicle, which is responsible for capturing ambient sound and performing preliminary processing through pulse density modulation (PDM) technology to optimize the quality of the audio signal. These signals are then transmitted from the sound collection device to the data transmission component through the main line, and the data transmission component transmits the signals to ensure accurate transmission and synchronization of the data.

[0089] The data transmission component includes multiple repeaters, which forward signals in the main line network to ensure stable transmission of signals between nodes. At the same time, the data transmission component also uses time division multiplexing (TDM) technology when performing data transmission. The application of TDM technology further improves transmission efficiency and allows multiple signals to be transmitted in time sequence on the same channel without conflict.

[0090] The signal processing unit is provided with a signal modulation and demodulation module, which uses quadrature amplitude modulation (QAM) technology to modulate and demodulate the signal to achieve high-speed and stable data transmission. The data processed by the signal processing unit is transmitted to the control unit. The vehicle type recognition method deployed in the control unit processes the data input by the signal processing unit. Thus, the audio signal collected by the first vehicle is analyzed and recognized.

[0091] Specifically, the vehicle type recognition method is deployed in the control unit. The specific contents include: Through quantization-aware training QAT (Quantization-Aware Training), the quantization parameters required to convert the audio classification model from floating point numbers to low-precision integer representation are obtained. Then, the trained audio classification model is converted into a file format that can be deployed on the vehicle side using the QNN (Qualcomm Neural Network) model conversion tool. On the other hand, the quantization parameters are injected into the interpretable json file of the converted audio classification model, and then compiled into a binary file that can be loaded by QNN for reasoning. Finally, it is deployed to the NPU backend of the vehicle, and the performance is improved by more than 10 times compared to the traditional CPU reasoning solution.

[0092] Please refer to Figure 5 , is a schematic diagram of the hardware structure of the electronic device 1000 provided in the embodiment of the present application. Figure 5 As shown, the electronic device 1000 may include a processor 1001 and a memory 1002. The memory 1002 is used to store one or more computer programs 1003. The one or more computer programs 1003 are configured to be executed by the processor 1001. The one or more computer programs 1003 include instructions, and the above instructions can be used to implement the above method in the electronic device 1000.

[0093] It is understandable that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 may include more or fewer components than shown, or combine or separate some components, or arrange the components differently.

[0094] The processor 1001 may include one or more processing units, for example, the processor 1001 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0095] The processor 1001 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 1001 is a cache memory. The memory may store instructions or data that the processor 1001 has just used or circulated. If the processor 1001 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 1001, and thus improves the efficiency of the system.

[0096] In some embodiments, the processor 1001 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.

[0097] In some embodiments, processor 1001 is used to execute acceleration schemes such as single instruction multiple data (SIMD) and very long instruction word (VLIW).

[0098] In some embodiments, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0099] This embodiment further provides a storage medium, in which computer instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.

[0100] Among them, the electronic device and storage medium provided in this embodiment are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0101] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0102] In several embodiments provided in the present application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0103] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0106] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A vehicle type identification method, characterized in that: Applied to a first vehicle, the first vehicle is provided with an audio classification model, the audio classification model is used to identify the vehicle type of a second vehicle, the second vehicle is located on one side of the first vehicle; the method comprises: Acquire target audio data, where the target audio data includes sound information collected by the first vehicle in a current driving environment, and the target audio data has multiple channels; Performing channel feature extraction on the target audio data to obtain first feature data, wherein a channel dimension of the first feature data is greater than a channel dimension of the target audio data; Performing dimension conversion on the first feature data to obtain second feature data, wherein the number of channels of the second feature data is the same as the number of channels of the target audio data; Processing the second characteristic data to obtain third characteristic data, wherein the third characteristic data includes data interaction information between channels in the second characteristic data; Performing channel feature extraction on the third feature data to obtain fourth feature data, wherein the fourth feature data is used to characterize the sound feature of the second vehicle; Based on the fourth feature data, a vehicle type of the second vehicle is determined.

2. The vehicle type identification method according to claim 1, characterized in that: After the second characteristic data is processed to obtain the third characteristic data, the method further includes: Performing full connection processing on the third feature data to obtain first processed data, wherein the number of channels of the first processed data is the same as the number of channels of the second feature data; The step of performing channel feature extraction on the third feature data to obtain fourth feature data includes: Channel feature extraction is performed on the first processed data to obtain the fourth feature data.

3. The vehicle type identification method according to claim 2, characterized in that: After performing full connection processing on the third feature data to obtain first processed data, the method further includes: Normalizing the first processed data to obtain second processed data; The extracting channel features from the first processed data to obtain the fourth feature data includes: Channel feature extraction is performed on the second processed data to obtain the fourth feature data.

4. The vehicle type identification method according to claim 1, characterized in that: After extracting the channel feature of the target audio data to obtain the first feature data, the method further includes: Normalizing the first feature data to obtain third processed data; The performing dimension conversion on the first feature data to obtain second feature data includes: Perform dimension conversion on the third processed data to obtain the second feature data.

5. The vehicle type identification method according to claim 4, characterized in that: The audio classification model includes a second activation layer; after the third processed data is dimensionally converted to obtain the second feature data, the audio classification model further includes: Inputting the second characteristic data into the second activation layer to obtain fourth processed data, wherein each data in the fourth processed data is within a preset value range; The performing data processing on the second characteristic data to obtain third characteristic data includes: The fourth processed data is processed to obtain the third characteristic data.

6. The vehicle type identification method according to claim 1, characterized in that: The determining the vehicle type of the second vehicle based on the fourth feature data includes: Calculating a plurality of probability values ​​between the fourth feature data and a plurality of vehicle tags, each of the vehicle tags corresponding to a vehicle type, and each of the vehicle tags corresponding to a probability value; A target probability value is determined according to the multiple probability values, and the vehicle type corresponding to the target probability value is used as the vehicle type of the second vehicle.

7. The vehicle type identification method according to claim 6, characterized in that: The audio classification model includes a first activation layer; the calculating multiple probability values ​​between the fourth feature data and multiple vehicle labels includes: Performing pooling processing on the fourth feature data to obtain fifth feature data; The fifth feature data is input into the first activation layer to obtain a plurality of probability values.

8. The vehicle type identification method according to claim 1, characterized in that: The step of acquiring target audio data comprises: collecting an audio signal of the first vehicle in the current driving environment; Performing data processing on the audio signal to obtain initial audio data; Reshaping the initial audio data to obtain audio reshaping data; The audio reshaping data is aggregated to obtain the target audio data.

9. An electronic device, comprising a processor and a memory, characterized in that: The memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the vehicle type identification method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the vehicle type identification method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Traffic flow identification method and device based on audio signal, and storage medium

    CN114155876A

  • Intelligent outbound method, device and equipment based on emotion recognition and storage medium

    CN117690436A

  • Audio data processing method and device, electronic equipment and storage medium

    CN118366454A

  • Voice recognition device and program

    JP2015158582A

  • Speech recognition method, speech recognition device, and electronic equipment

    US20220115002A1