Vehicle microphone fault identification method and device, electronic equipment and storage medium
By using the scene recognition model of feature extraction, normalization and attention modules, the noise data of the vehicle microphone is identified and processed, and the problem of low accuracy in vehicle microphone fault recognition in the prior art is solved, achieving higher fault recognition accuracy and background noise filtering effect.
Patent Information
- Application Number
- CN202411835434.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In the prior art, the accuracy of vehicle microphone fault recognition is low, especially in variable outdoor environments. Microphone fault causes the collected sound changes, affecting the accuracy of background noise filtering.
By obtaining the sample noise data of the vehicle microphone for preprocessing, it is divided into a training set and a test set, and the preset first scene recognition model is used for training and testing. The model includes a feature extraction module, a normalization module and an attention module for feature extraction, normalization, and feature channel enhancement, thereby determining the target noise scenario and matching calculations to identify faults.
It improves the accuracy of vehicle microphone fault recognition, reduces the probability of fault recognition errors caused by environmental complexity, and ensures the accuracy of background noise filtering.
Smart Images

Figure CN119785825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle microphone fault identification, and in particular to a vehicle microphone fault identification method, device, electronic equipment, and storage medium. Background Art
[0002] External noise monitoring is very important for vehicles. In order to improve user comfort, background noise needs to be filtered out based on external noise monitoring. External noise monitoring needs to be based on the noise collection of the microphone. Therefore, the fault identification of vehicle microphones is receiving more and more attention. However, the current fault detection of microphones is still at the stage of using radios for detection. However, the outdoor environment is very changeable and the microphone failure situations are also very diverse. Sometimes, although the microphone can collect sound, the collected sound has changed due to internal faults, which will lead to large errors in the subsequent filtering of background sound. The accuracy of using radios to identify vehicle microphone failures is very low. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a vehicle microphone fault identification method, device, electronic device, and storage medium, which can improve the accuracy of vehicle microphone fault identification.
[0004] In a first aspect, an embodiment of the present invention provides a vehicle microphone fault identification method, which is applied to a vehicle microphone fault identification device, wherein the vehicle microphone fault identification device is connected to a vehicle microphone, and the vehicle microphone is used to collect background noise data outside the vehicle, and the method includes: Acquire sample noise data of the vehicle microphone, and preprocess the sample noise data, wherein the sample noise data is used to indicate historical background noise data outside the vehicle collected by the vehicle microphone; Dividing the preprocessed sample noise data into a training set and a test set; Inputting the training set into a preset first scene recognition model for training to obtain the trained first scene recognition model, wherein the first scene recognition model includes: a feature extraction module, a normalization module, and an attention module; Inputting the test set into the trained first scene recognition model to obtain the first scene recognition model that completes the test; In response to a vehicle microphone fault identification instruction, a fault identification process is performed on the vehicle microphone to obtain a first matching result of the vehicle microphone, wherein the first matching result is used to characterize whether the vehicle microphone has a fault. The fault identification process step includes: Acquire first noise data to be measured through the vehicle microphone, and preprocess the first noise data to be measured, wherein the first noise data to be measured is used to indicate real-time background noise data outside the vehicle collected by the vehicle microphone; Inputting the preprocessed first noise data to be tested into the trained first scene recognition model; Performing feature extraction on the first noise data to be measured by the feature extraction module to obtain sound features; The normalization module is used to normalize the extracted sound features, and the attention module is used to enhance the feature channels of the normalized sound features; Determining a target noise scene from a preset optional scene classification according to the enhanced sound characteristics; Determine a target database from a preset first optional sound database according to the target noise scene; The first noise data to be measured is matched and calculated with the sound data in the target database to obtain the first matching result of the vehicle microphone.
[0005] In some embodiments of the present invention, the step of acquiring the sample noise data includes: When the vehicle is started, initial noise is collected through the vehicle microphone; The initial noise is separated in sequence through different filters to obtain wind noise, traffic road noise and engine noise respectively, wherein the sample noise data includes the wind noise, the traffic road noise and the engine noise.
[0006] In some embodiments of the present invention, the feature extraction module performs feature extraction on the first noise data to be measured to obtain Mel cepstral coefficients and linear cepstral coefficients of the first noise data to be measured; The Mel-frequency cepstral coefficients and the linear cepstral coefficients are arranged and combined to obtain a feature vector of the first noise data to be measured as the sound feature.
[0007] In some embodiments of the present invention, the feature extraction of the first noise data to be measured by the feature extraction module to obtain Mel cepstral coefficients and linear cepstral coefficients of the first noise data to be measured includes: Performing pre-emphasis processing on the first noise data to be measured by the feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing fast Fourier transform processing on the first noise data to be measured after the frame division and windowing processing; Performing signal conversion on the first noise data to be measured after fast Fourier transform processing by using a Mel filter to obtain a Mel frequency domain; Performing logarithmic processing and discrete cosine transform on the Mel frequency domain to obtain the Mel cepstral coefficient; Performing pre-emphasis processing on the first noise data to be measured by the feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing linear prediction analysis on the minute hand and the first noise data to be measured after windowing; The first noise data to be measured in the linear prediction analysis is subjected to cepstrum transformation to obtain linear cepstrum coefficients.
[0008] In some embodiments of the present invention, the step of acquiring the first optional sound database includes: Acquire historical noise data of the vehicle microphone of the corresponding category in each scene; Feature extraction is performed on the historical noise data of each category to obtain historical waveform features, and the historical waveform features of each category are used as the first optional sound database.
[0009] In some embodiments of the present invention, performing matching calculation on the first noise data to be measured and the sound data in the target database to obtain the first matching result of the vehicle microphone includes: Performing feature extraction on the first noise data to be measured to obtain target waveform features; Sequentially calculating similarities between the target waveform feature and each of the historical waveform features in the target database to obtain a plurality of first similarities; Performing a linear weighted calculation on the first similarity to obtain a second similarity; When the second similarity is less than a preset value, it is determined that the first matching result of the vehicle microphone is that the microphone is faulty.
[0010] In some embodiments of the present invention, the vehicle microphone is provided with a vibration sensor, a counter and a timer, and the step of generating the vehicle microphone fault identification instruction further includes: Initializing the counter and timer; When the vehicle starts working, the timer starts recording; Whenever the value of the vibration sensor is greater than a preset vibration threshold, the value of the counter is increased by 1; The value of the timer and the value of the counter are obtained. When the value of the counter is greater than a preset number threshold, or the value of the timer is greater than a preset time threshold, or a user-started detection instruction input from the vehicle PC is received, the vehicle microphone fault identification instruction is generated.
[0011] In a second aspect, an embodiment of the present invention provides a vehicle microphone fault identification method and device, wherein the vehicle microphone fault identification device is connected to a vehicle microphone, the vehicle microphone is used to collect background noise data outside the vehicle, and the vehicle microphone fault identification device is used to execute the vehicle microphone fault identification method described in the first aspect above.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, comprising the vehicle microphone fault identification method and device as described in the second aspect above.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the vehicle microphone fault identification method as described in the first aspect above.
[0014] The vehicle microphone fault identification method according to the embodiment of the present invention has at least the following beneficial effects: applied to a vehicle microphone fault identification device, the vehicle microphone fault identification device is connected to a vehicle microphone, the vehicle microphone is used to collect background noise data outside the vehicle, the method comprises: Acquire sample noise data of the vehicle microphone, and preprocess the sample noise data, wherein the sample noise data is used to indicate historical background noise data outside the vehicle collected by the vehicle microphone; Dividing the preprocessed sample noise data into a training set and a test set; Inputting the training set into a preset first scene recognition model for training to obtain the trained first scene recognition model, wherein the first scene recognition model includes: a feature extraction module, a normalization module, and an attention module; Inputting the test set into the trained first scene recognition model to obtain the first scene recognition model that completes the test; In response to a vehicle microphone fault identification instruction, a fault identification process is performed on the vehicle microphone to obtain a first matching result of the vehicle microphone, wherein the first matching result is used to characterize whether the vehicle microphone has a fault. The fault identification process step includes: Acquire first noise data to be measured through the vehicle microphone, and preprocess the first noise data to be measured, wherein the first noise data to be measured is used to indicate real-time background noise data outside the vehicle collected by the vehicle microphone; Inputting the preprocessed first noise data to be tested into the trained first scene recognition model; Performing feature extraction on the first noise data to be measured by the feature extraction module to obtain sound features; The normalization module is used to normalize the extracted sound features, and the attention module is used to enhance the feature channels of the normalized sound features; Determining a target noise scene from a preset optional scene classification according to the enhanced sound characteristics; Determine a target database from a preset first optional sound database according to the target noise scene; The first noise data to be measured is matched and calculated with the sound data in the target database to obtain the first matching result of the vehicle microphone.
[0015] Model training is performed based on the sample noise data collected by the vehicle microphone, and then the first noise data to be tested is input into the trained first scene recognition model. First, the features in the sound are extracted through the feature extraction module to facilitate feature learning, and then the scale is standardized through the normalization module. Finally, the sound features are enhanced using the attention module. This is to better understand the sound scene collected by the microphone, call different databases according to different scenes to match the sound with the first noise data to be tested, accurately determine the scene where the vehicle is located, and reduce the probability of fault identification errors caused by complex environments. Then, the first noise data to be tested is compared with the target database to accurately identify whether the first noise data to be tested is abnormal data. When it is abnormal data, it means that the vehicle microphone has a fault. This improves accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a vehicle microphone fault identification method provided by an embodiment of the present invention; Figure 2 It is a structural diagram of a vehicle microphone fault identification device provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0017] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0018] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0019] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0020] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0021] The control method of the embodiment of the present invention is further described below based on the accompanying drawings.
[0022] Reference Figure 1 , Figure 1 A flow chart of a vehicle microphone fault identification method provided by an embodiment of the present invention is provided. The vehicle microphone fault identification method is applied to a vehicle microphone fault identification device. The vehicle microphone fault identification device is connected to a vehicle microphone. The vehicle microphone is used to collect background noise data outside the vehicle. The vehicle microphone fault identification method includes but is not limited to the following steps: Step S110, acquiring sample noise data of the vehicle microphone and preprocessing the sample noise data, wherein the sample noise data is used to indicate historical background noise data outside the vehicle collected by the vehicle microphone; Step S120, dividing the preprocessed sample noise data into a training set and a test set; Step S130, inputting the training set into a preset first scene recognition model for training to obtain a trained first scene recognition model, wherein the first scene recognition model includes: a feature extraction module, a normalization module, and an attention module; Step S140, inputting the test set into the trained first scene recognition model to obtain a first scene recognition model that completes the test; Step S150, in response to the vehicle microphone fault identification instruction, performing fault identification processing on the vehicle microphone to obtain a first matching result of the vehicle microphone, wherein the first matching result is used to indicate whether the vehicle microphone has a fault. The fault identification processing step includes: Acquire first noise data to be measured through the vehicle microphone, and preprocess the first noise data to be measured, wherein the first noise data to be measured is used to indicate real-time background noise data outside the vehicle collected by the vehicle microphone; Inputting the preprocessed first noise data to be tested into the trained first scene recognition model; Performing feature extraction on the first noise data to be measured by a feature extraction module to obtain sound features; The extracted sound features are normalized by the normalization module, and the feature channels of the normalized sound features are enhanced by the attention module; According to the enhanced sound characteristics, a target noise scene is determined from preset optional scene classifications; Determine a target database from a preset first optional sound database according to a target noise scene; The first noise data to be measured is matched and calculated with the sound data in the target database to obtain a first matching result of the vehicle microphone.
[0023] It should be noted that the vehicle microphone is used to collect sounds outside the vehicle. It is understandable that the purpose of the first scene recognition model is to determine the scene the vehicle is currently in. For example, when driving in different scenes such as highways, urban areas, and mountainous areas, the noise generated by the surrounding environment is different and diverse. Therefore, the attention module is used to enhance the importance of specific feature channels, so that accurate classification can be performed even with many features. The first scene recognition model can dynamically identify different parts in the feature sequence to determine the scene in which the vehicle is located. This can reduce the decrease in the accuracy of microphone fault identification caused by the complex and large-scale changes in the vehicle driving environment. Then, the target database is determined from the preset first optional sound database according to the target noise scene. Furthermore, the first optional sound database is obtained based on sample noise data processing. First, the sample noise data is scene-classified according to different scenes, and then the normal sound in each scene is selected for preprocessing, such as data cleaning, etc., and then the preprocessed sample noise data is feature extracted to obtain features such as time domain features and frequency domain features, and the features of the normal sound are stored. It should be noted that before the first noise data to be tested is matched with the sound data in the target database, the first noise data to be tested also needs to be preprocessed and feature extracted. Then, the features of the first noise data to be tested are calculated for difference with the features of the normal sound stored in the database. When the difference is large, it is considered that the microphone is faulty.
[0024] In another embodiment, the step of acquiring sample noise data includes: When the vehicle starts, the initial noise is collected through the vehicle microphone; The initial noise is separated in turn through different filters to obtain wind noise, traffic road noise and engine noise respectively, wherein the sample noise data includes wind noise, traffic road noise and engine noise.
[0025] It should be noted that there are a lot of noises during vehicle driving, and the noises we mainly use are wind noise, traffic road noise and engine noise. It can be understood that traffic road noise mainly refers to human voice. This makes it convenient for the subsequent first scene recognition model to judge different scenes according to the features. The first scene recognition model further extracts features of wind noise, traffic road noise and engine noise in the feature extraction module. For example, the wind noise can extract features such as intensity and intensity variation range. After normalization and feature enhancement, the classifier is used to classify and identify the features for scenes. Therefore, a pre-designed bandpass filter is used to separate noise in a specific frequency band. For example, the human voice frequency band (about 70~350Hz) is filtered to extract the human voice signal; the engine noise frequency band is filtered to extract the engine noise signal.
[0026] In another embodiment, the feature extraction module extracts human voice information from traffic road noise, and the enhanced sound features are used to determine the target noise scene from the preset optional scene classification through a classifier, including: Determine the enhanced sound features through a classifier; When the sound intensity characteristic of the wind sound is greater than the preset wind noise threshold, and the intensity variation range characteristic of the wind sound is greater than the preset first range value, the sound intensity characteristic of the engine noise is greater than the first engine noise threshold, and the sound intensity variation range characteristic of the human voice information is less than the preset second range value, it is determined that the scene in which the first noise data to be measured is located is a high-speed scene; When the intensity variation range of the wind sound is greater than the first range value, the sound intensity characteristic of the engine noise is greater than the second engine noise threshold, and the sound intensity variation range of the human voice information is less than the preset second range value, it is determined that the scene where the first noise data to be tested is located is a mountain scene, wherein the second engine noise threshold is greater than the first engine noise threshold; When the sound intensity characteristic of wind noise is less than the preset wind noise threshold, and the intensity variation range characteristic of wind noise is less than the preset first range value of engine noise, the sound intensity characteristic of engine noise is greater than the second engine noise threshold, and the sound strength variation range characteristic of human voice information is greater than the preset second range value, it is determined that the scene in which the first noise data to be tested is located is an urban scene.
[0027] It should be noted that in different scenarios, such as: at high speeds, the relative movement of air and the vehicle body intensifies due to the increase in vehicle speed, so the intensity of wind sound is relatively high, but the wind direction is stable, so the intensity variation range is small. At the same time, the engine needs a higher speed to provide power at high speeds, so the engine noise will also increase, and there are very few pedestrians on the highway, and the fewer people, the smaller the range of sound intensity variation, and the more people, the larger the range of sound intensity variation. Therefore, when the sound intensity of the wind sound is greater than the preset wind noise threshold, and the intensity variation range of the wind sound is greater than the preset first range value, at the same time, the engine noise is greater than the first engine noise threshold, and the sound intensity variation range of the human voice information is less than the preset second range value, it is determined that the label corresponding to the sample noise data is a high-speed scene; similarly, in mountainous areas, due to the terrain, there are fewer people, and the wind may have different intensities when it blows through the microphone from different directions. By monitoring the intensity changes of wind noise, the direction of the wind source can be inferred. In addition, in mountainous areas, since more power is needed to climb the slope, the engine noise will increase due to the high load operation of the engine, which is much greater than the engine noise on the highway. Therefore, when the intensity variation range of the wind sound is greater than the first range value, the engine noise is greater than the second engine noise threshold, and the sound intensity variation range of the human voice information is less than the preset second range value, the sample noise data corresponding label is determined to be a mountain scene, where the second engine noise threshold is greater than the first engine noise threshold; similarly, in the urban area, due to the relatively low speed of the vehicle, the wind sound is also relatively low, and the wind changes less, but in the urban area, due to frequent start and stop and low-speed driving, the engine noise will be relatively obvious, and the biggest difference between the urban area and other environments is that there are a lot of pedestrians, so when the sound intensity of the wind sound is less than the preset wind noise threshold, and the wind sound intensity variation range is less than the preset first range value engine noise, the engine noise is greater than the second engine noise threshold, and the sound intensity variation range of the human voice information is greater than the preset second range value, the sample noise data corresponding label is determined to be an urban scene. It can be understood that the above are just examples of some scenes.
[0028] In another embodiment, the feature extraction module extracts features from the first noise data to be measured to obtain sound features, including: Performing feature extraction on the first noise data to be measured by a feature extraction module to obtain Mel cepstral coefficients and linear cepstral coefficients of the first noise data to be measured; The Mel cepstral coefficients and the linear cepstral coefficients are arranged and combined to obtain a feature vector of the first noise data to be measured as a sound feature.
[0029] It should be noted that the Mel cepstral coefficients and the linear prediction cepstral coefficients obtain different features in the first noise data to be tested. The Mel cepstral coefficients are used to obtain features related to human auditory characteristics, while the linear prediction cepstral coefficients are used to obtain the spectral envelope of the speech signal. The combination of the two can obtain the characteristics of the speech signal more comprehensively. The process of arranging and combining the two is mainly to flatten the Mel cepstral coefficients and the linear prediction cepstral coefficients respectively, and then connect them in a preset order to form a new feature, that is, the final sound feature, which is a composite feature vector that can more accurately describe the first noise data to be tested and improve the accuracy of classification.
[0030] In another embodiment, the step of obtaining the Mel-cepstral coefficients of the first noise data to be measured includes: Performing pre-emphasis processing on the first noise data to be measured by a feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing fast Fourier transform processing on the first noise data to be measured after the frame division and windowing processing; Performing signal conversion on the first noise data to be measured after fast Fourier transform processing by using a Mel filter to obtain a Mel frequency domain; The Mel frequency domain is logarithmically processed and discrete cosine transformed to obtain the Mel cepstral coefficients.
[0031] It should be noted that the Mel cepstral coefficient can obtain features related to human auditory characteristics. The specific acquisition steps are as follows: the pre-emphasis processing mainly performs high-pass filtering on the first noise data to be tested, that is, highlights the high-frequency part and reduces the interference of the low-frequency part. Then, frame division and windowing are performed to eliminate edge effects, and the Hamming window function is used for windowing. The data after each frame of windowing is converted to the frequency domain by fast Fourier transform, and input into the Mel filter and converted to the Mel frequency domain. Take the logarithm of the Mel frequency domain to obtain the logarithmic Mel spectrum, and perform discrete cosine transform on the logarithmic Mel spectrum to obtain the Mel cepstral coefficient.
[0032] In another embodiment, the step of obtaining the linear cepstral coefficients of the first noise data to be measured includes: Performing pre-emphasis processing on the first noise data to be measured by a feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing linear prediction analysis on the minute hand and the first noise data to be measured after windowing; The first noise data to be tested in the linear prediction analysis is subjected to cepstrum transformation to obtain linear cepstrum coefficients.
[0033] It should be noted that the linear prediction cepstral coefficient can obtain the spectrum envelope of the speech signal. The specific steps are as follows: the pre-emphasis processing mainly performs high-pass filtering on the first noise data to be measured, that is, highlights the high-frequency part and reduces the interference of the low-frequency part. Then, frame division and windowing processing are performed to eliminate the edge effect, and the windowing uses the Hamming window function. After that, the speech signal after each frame of windowing is subjected to linear prediction analysis, and the linear prediction coefficient is determined by the minimum mean square error criterion. The linear prediction coefficient is converted into the cepstral coefficient of each frame of speech signal by cepstral transformation.
[0034] In another embodiment, the step of acquiring the first optional sound database includes: Obtain historical noise data of vehicle microphones of corresponding categories in each scenario; Feature extraction is performed on the historical noise data of each category to obtain historical waveform features, and the historical waveform features of each category are used as the first optional sound database.
[0035] It should be noted that because vehicles will arrive at different scenes, such as mountainous areas, urban areas, highways, etc., the noise in different scenes is also different, so a corresponding database needs to be built for each scene for subsequent comparison to see if the microphone is abnormal. Directly comparing sound clips with sound clips can easily lead to inaccuracies, so first you need to obtain the characteristics of the historical noise data corresponding to each type of scene, and obtain the historical waveform characteristics as a database for subsequent comparison. The waveform quantifies the sound, making it easier to ensure the accuracy of subsequent comparisons.
[0036] In another embodiment, matching calculation is performed on the first noise data to be measured and the sound data in the target database to obtain a first matching result of the vehicle microphone, including: Performing feature extraction on the first noise data to be measured to obtain target waveform features; Sequentially calculating similarities between the target waveform feature and each historical waveform feature in the target database to obtain a plurality of first similarities; Performing linear weighted calculation on the first similarity to obtain a second similarity; When the second similarity is less than a preset value, it is determined that the first matching result of the vehicle microphone is that the microphone is faulty.
[0037] It should be noted that the similarity between sounds is determined by calculating the similarity between the waveforms of different sound data, thereby determining whether the sound collected by the microphone is a normal sound. Therefore, in order to improve accuracy, the waveform features corresponding to the sounds collected historically for multiple times are stored in the target database, and the target waveform features are sequentially similarly calculated with the historical waveform features in the target database to obtain a first similarity, and then the first similarity is linearly weighted to obtain a second similarity. The weight can be preset and set according to actual conditions. When the second similarity is closer to 1, it means a complete positive correlation, and when it is close to -1, it is a complete negative correlation, which is irrelevant. Therefore, a preset value is set. When the second similarity is less than the preset value, it means that the waveform of the first noise data to be tested is very different from the waveform in the target database, and it is considered that the microphone is faulty, so there is also a problem with the collected sound.
[0038] In another embodiment, a vibration sensor, a counter and a timer are provided in the vehicle microphone, and the step of generating the vehicle microphone fault identification instruction further includes: Initialize counters and timers; When the vehicle starts working, the timer starts recording; Whenever the value of the vibration sensor is greater than the preset vibration threshold, the value of the counter increases by 1; The values of the timer and the counter are obtained. When the value of the counter is greater than the preset number threshold, or the value of the timer is greater than the preset time threshold, or a user-started detection instruction input from the vehicle PC is received, a vehicle microphone fault identification instruction is generated.
[0039] It should be noted that the timing of microphone fault identification needs to be adjusted. When the vehicle brakes suddenly, or is hit, or is driving on a bumpy road, the microphone is most likely to be affected and fail. Therefore, a vibration sensor is set. Because the vibration sensor is in the microphone, and the vehicle microphone is in the vehicle, when the vehicle vibrates and causes the microphone to vibrate, the vibration sensor will feel it and record the number of times greater than the preset vibration threshold. When the number reaches the preset number threshold, that is, when the vehicle is subjected to excessive vibration, the microphone is very likely to be damaged. At this time, a vehicle microphone fault identification instruction is generated to start the automatic fault identification of the vehicle microphone. In addition, long-term use is also prone to failure, so when the timer value is greater than the preset time threshold, a vehicle microphone fault identification instruction is also generated; in addition, if the user actively enters the user start detection instruction on the vehicle PC, a vehicle microphone fault identification instruction can also be generated.
[0040] like Figure 2 As shown, Figure 2: is a structural diagram of a vehicle microphone fault identification device provided by an embodiment of the present invention. The present invention also provides a vehicle microphone fault identification device, comprising: The processor 201 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 202 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 202 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 202, and the processor 201 calls and executes the vehicle microphone fault identification method of the embodiment of this application; Input / output interface 203, used to implement information input and output; The communication interface 204 is used to realize the communication interaction between the apparatus and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.); Bus 205 , which transmits information between various components of the device (e.g., processor 201 , memory 202 , input / output interface 203 , and communication interface 204 ); The processor 201 , the memory 202 , the input / output interface 203 and the communication interface 204 are connected to each other in communication within the device via the bus 205 .
[0041] An embodiment of the present application also provides an electronic device, including the vehicle microphone fault identification device as described above.
[0042] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned vehicle microphone fault identification method is implemented.
[0043] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0044] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0045] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A vehicle microphone fault identification method, characterized in that: Applied to a vehicle microphone fault identification device, the vehicle microphone fault identification device is connected to a vehicle microphone, and the vehicle microphone is used to collect background noise data outside the vehicle. The method includes: Acquire sample noise data of the vehicle microphone, and preprocess the sample noise data, wherein the sample noise data is used to indicate historical background noise data outside the vehicle collected by the vehicle microphone; Dividing the preprocessed sample noise data into a training set and a test set; Inputting the training set into a preset first scene recognition model for training to obtain the trained first scene recognition model, wherein the first scene recognition model includes: a feature extraction module, a normalization module, and an attention module; Inputting the test set into the trained first scene recognition model to obtain the first scene recognition model that completes the test; In response to a vehicle microphone fault identification instruction, a fault identification process is performed on the vehicle microphone to obtain a first matching result of the vehicle microphone, wherein the first matching result is used to characterize whether the vehicle microphone has a fault. The fault identification process step includes: Acquire first noise data to be measured through the vehicle microphone, and preprocess the first noise data to be measured, wherein the first noise data to be measured is used to indicate real-time background noise data outside the vehicle collected by the vehicle microphone; Inputting the preprocessed first noise data to be tested into the trained first scene recognition model; Performing feature extraction on the first noise data to be measured by the feature extraction module to obtain sound features; The normalization module is used to normalize the extracted sound features, and the attention module is used to enhance the feature channels of the normalized sound features; According to the enhanced sound features, determining a target noise scene from a preset optional scene classification through a classifier; Determine a target database from a preset first optional sound database according to the target noise scene; The first noise data to be measured is matched and calculated with the sound data in the target database to obtain the first matching result of the vehicle microphone.
2. The vehicle microphone fault identification method according to claim 1, characterized in that: The step of acquiring the sample noise data comprises: When the vehicle is started, initial noise is collected through the vehicle microphone; The initial noise is separated in sequence through different filters to obtain wind noise, traffic road noise and engine noise respectively, wherein the sample noise data includes the wind noise, the traffic road noise and the engine noise.
3. The vehicle microphone fault identification method according to claim 1, characterized in that: The extracting features of the first noise data to be measured by the feature extraction module to obtain sound features includes: Performing feature extraction on the first noise data to be measured by the feature extraction module to obtain Mel cepstral coefficients and linear cepstral coefficients of the first noise data to be measured; The Mel-frequency cepstral coefficients and the linear cepstral coefficients are arranged and combined to obtain a feature vector of the first noise data to be measured as the sound feature.
4. The vehicle microphone fault identification method according to claim 3, characterized in that: The step of extracting features of the first noise data to be measured by the feature extraction module to obtain Mel cepstral coefficients and linear cepstral coefficients of the first noise data to be measured includes: Performing pre-emphasis processing on the first noise data to be measured by the feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing fast Fourier transform processing on the first noise data to be measured after the frame division and windowing processing; Performing signal conversion on the first noise data to be measured after fast Fourier transform processing by using a Mel filter to obtain a Mel frequency domain; Performing logarithmic processing and discrete cosine transform on the Mel frequency domain to obtain the Mel cepstral coefficient; Performing pre-emphasis processing on the first noise data to be measured by the feature extraction module; Performing frame division and windowing processing on the first noise data to be measured; Performing linear prediction analysis on the minute hand and the first noise data to be measured after windowing; The first noise data to be measured in the linear prediction analysis is subjected to cepstrum transformation to obtain linear cepstrum coefficients.
5. The vehicle microphone fault identification method according to claim 2, characterized in that: The feature extraction module extracts human voice information from the traffic road noise, and the enhanced sound features are used to determine a target noise scene from a preset optional scene classification through a classifier, including: Determining the enhanced sound features by the classifier; When the sound intensity characteristic of the wind sound is greater than a preset wind noise threshold, and the intensity variation range characteristic of the wind sound is greater than a preset first range value, the sound intensity characteristic of the engine noise is greater than a first engine noise threshold, and the sound intensity variation range characteristic of the human voice information is less than a preset second range value, it is determined that the scene in which the first noise data to be measured is located is a high-speed scene; When the intensity variation range of the wind sound is greater than the first range value, the sound intensity characteristic of the engine noise is greater than the second engine noise threshold, and the sound intensity variation range of the human voice information is less than the preset second range value, it is determined that the scene where the first noise data to be measured is located is a mountain scene, wherein the second engine noise threshold is greater than the first engine noise threshold; When the sound intensity characteristic of the wind sound is less than the preset wind noise threshold, and the intensity variation range characteristic of the wind sound is less than the preset first range value of the engine noise, the sound intensity characteristic of the engine noise is greater than the second engine noise threshold, and the sound strength variation range characteristic of the human voice information is greater than the preset second range value, it is determined that the scene in which the first noise data to be measured is located is an urban scene.
6. The vehicle microphone fault identification method according to claim 1, characterized in that: The matching calculation of the first noise data to be measured with the sound data in the target database to obtain the first matching result of the vehicle microphone includes: Acquire historical noise data of the vehicle microphone of the corresponding category in each scene; Extracting features from the historical noise data of each category to obtain historical waveform features, and using the historical waveform features of each category as the first optional sound database; Performing feature extraction on the first noise data to be measured to obtain target waveform features; Sequentially calculating similarities between the target waveform feature and each of the historical waveform features in the target database to obtain a plurality of first similarities; Performing a linear weighted calculation on the first similarity to obtain a second similarity; When the second similarity is less than a preset value, it is determined that the first matching result of the vehicle microphone is that the microphone is faulty.
7. The vehicle microphone fault identification method according to claim 1, characterized in that: The vehicle microphone is provided with a vibration sensor, a counter and a timer, and the step of generating the vehicle microphone fault identification instruction further includes: Initializing the counter and timer; When the vehicle starts working, the timer starts recording; Whenever the value of the vibration sensor is greater than a preset vibration threshold, the value of the counter is increased by 1; The value of the timer and the value of the counter are obtained. When the value of the counter is greater than a preset number threshold, or the value of the timer is greater than a preset time threshold, or a user-started detection instruction input from the vehicle PC is received, the vehicle microphone fault identification instruction is generated.
8. A vehicle microphone fault identification device, characterized in that: The vehicle microphone fault identification device is connected to a vehicle microphone, and the vehicle microphone is used to collect background noise data outside the vehicle. The vehicle microphone fault identification device is used to: Acquire sample noise data of the vehicle microphone, and preprocess the sample noise data, wherein the sample noise data is used to indicate historical background noise data outside the vehicle collected by the vehicle microphone; Dividing the preprocessed sample noise data into a training set and a test set; Inputting the training set into a preset first scene recognition model for training to obtain the trained first scene recognition model, wherein the first scene recognition model includes: a feature extraction module, a normalization module, and an attention module; Inputting the test set into the trained first scene recognition model to obtain the first scene recognition model that completes the test; In response to a vehicle microphone fault identification instruction, a fault identification process is performed on the vehicle microphone to obtain a first matching result of the vehicle microphone, wherein the first matching result is used to characterize whether the vehicle microphone has a fault. The fault identification process step includes: Acquire first noise data to be measured through the vehicle microphone, and preprocess the first noise data to be measured, wherein the first noise data to be measured is used to indicate real-time background noise data outside the vehicle collected by the vehicle microphone; Inputting the preprocessed first noise data to be tested into the trained first scene recognition model; Performing feature extraction on the first noise data to be measured by the feature extraction module to obtain sound features; The normalization module is used to normalize the extracted sound features, and the attention module is used to enhance the feature channels of the normalized sound features; Determining a target noise scene from a preset optional scene classification according to the enhanced sound characteristics; Determine a target database from a preset first optional sound database according to the target noise scene; The first noise data to be measured is matched and calculated with the sound data in the target database to obtain the first matching result of the vehicle microphone.
9. An electronic device, characterized in that: Includes the vehicle microphone fault identification device as described in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the vehicle microphone fault identification method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Acoustic event detecting method under hospital noise environment
CN108648748A
Microphone fault detection method and device, electronic equipment and storage medium
CN111263284A
Method and device for detecting pickup assembly and electronic equipment
CN112104949A
High-precision microphone test method and system adaptive to multiple scenes, and medium
CN114339573A
Noise generation model training method and device, equipment and medium
CN115035911A