A method, device, vehicle, and medium for adjusting car volume.
By classifying and identifying the noise level of the in-vehicle environment, the system automatically adjusts the audio volume, solving the operational complexity and safety issues of in-vehicle audio systems in noisy environments, and achieving efficient and safe volume adjustment and a high-quality audio experience.
Patent Information
- Application Number
- CN202411031699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing car audio systems require manual volume adjustment in noisy environments, which is complicated to operate, affects driving safety, and makes it difficult to provide a high-quality audio experience.
By collecting ambient sounds inside the vehicle, classifying and identifying noise categories and numbers, determining noise levels, and automatically adjusting the audio volume, the system uses a pre-trained classification model and noise level mapping table for precise adjustment.
It enables automatic adjustment of car volume, simplifies the operation process, improves adjustment efficiency, provides a high-quality audio experience, and ensures driving safety.
Smart Images

Figure CN118928271B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive volume control technology, specifically to an automotive volume control method, device, vehicle, and medium. Background Technology
[0002] In recent years, with the advancement of technology, car audio systems have become increasingly feature-rich, capable of playing music and radio programs, answering Bluetooth calls, and even providing voice recognition and navigation functions. However, no matter how rich the functions, providing a high-quality audio experience remains the core mission of car audio systems.
[0003] In practical use, car audio systems often need to operate in various noisy environments. For example, engine noise, wind noise, and tire-road friction noise can interfere with the audio output of the system, making it difficult for users to hear the content clearly. While users can manually adjust the volume to adapt to changes in noise, this is not only cumbersome but can also distract the driver, affecting driving safety. Therefore, there is an urgent need for an audio system that can automatically adapt to changes in in-vehicle noise, providing a technical solution for effectively adjusting the car's volume when in-vehicle noise is present. Summary of the Invention
[0004] In view of this, the present invention provides a method, device, vehicle and medium for adjusting car volume, in order to solve the problems mentioned in the above-mentioned technical background, such as the complexity of operation, low adjustment efficiency, impact on user driving safety and difficulty in providing users with a better audio experience.
[0005] In a first aspect, the present invention provides a method for adjusting the volume of a car, the method comprising:
[0006] Collect ambient sounds inside the target vehicle;
[0007] The in-vehicle ambient sound is classified, and the corresponding classification results are obtained. The classification results include normal sound data and noise data of at least one preset category.
[0008] The noise level is determined based on the noise category and / or the number of noises corresponding to the classification results;
[0009] Adjust the audio volume of the target car based on the noise level.
[0010] This invention classifies collected in-vehicle ambient sounds, determines noise levels based on noise categories and / or the number of noises in the classification results, and adjusts the audio volume of the target car based on the noise level. This enables automatic adjustment of car volume, which not only simplifies the adjustment process and meets the needs of volume adjustment for different noises, improving adjustment efficiency, but also provides users with a better audio experience, reduces the frequency of volume adjustments by users, and greatly ensures the safety of users while driving.
[0011] In one optional implementation, the noise level is determined based on the noise category and / or the number of noises corresponding to the classification result, including:
[0012] Determine the number of noise data points in the classification results;
[0013] When there is only one noise element, determine the noise category of the noise data;
[0014] If the noise category is engine noise data, then the noise level is determined to be level three;
[0015] If the noise category is any one of tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 2.
[0016] If the noise category is either wind noise data or other environmental noise data, then the noise level is determined to be Level 1, and Level 2 is higher than Level 1 but lower than Level 3.
[0017] This invention determines the noise level by counting the number of noises, and when there is only one noise, it determines the noise level based on the different noise categories corresponding to the noise data. This ensures the accuracy of the noise level, further improves the precision and efficiency of car volume adjustment, and protects the driving safety of users.
[0018] In one alternative implementation, when there are multiple noises, the noise category of each noise is determined separately;
[0019] If the noise category contains at least engine noise data, or at least two of the following noise categories: tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 3.
[0020] If the noise category does not include engine noise data, but the noise category includes any one of tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 2.
[0021] If all noise categories are wind noise data and / or other environmental noise data, then the noise level is determined to be Level 1.
[0022] This invention determines the noise level by identifying the number of noises and, when there are multiple noises, by determining the different noise categories and their numbers corresponding to the noise data. This not only ensures the accuracy of noise level determination but also improves the accuracy of subsequent car volume adjustment, thereby providing users with a better audio experience.
[0023] In an optional implementation, before determining the noise level based on the noise category and / or number of noises corresponding to the classification results, the vehicle volume adjustment method further includes:
[0024] Determine the number of noise data points in the classification results;
[0025] When there is only one noise source, determine the current intensity of the noise data;
[0026] When there are multiple noises, the noise intensity of each noise is determined, and the current intensity corresponding to the maximum noise intensity is selected from all noise intensities.
[0027] Determine whether the current intensity is greater than the preset intensity threshold;
[0028] When the current intensity is greater than the preset intensity threshold, the noise level is determined to be level three;
[0029] When the current intensity is not greater than the preset intensity threshold, the step of determining the noise level based on the noise category and / or the number of noises corresponding to the classification result is executed.
[0030] This invention takes into account the relationship between noise intensity and noise level determination in practical applications. By designing a method to determine the magnitude of the current intensity corresponding to the maximum noise intensity and the preset intensity threshold, it can closely match reality and further enhance the accuracy of noise level, thus achieving efficient, concise, fast and safe automatic adjustment of car volume.
[0031] In one optional implementation, the preset categories of noise data include at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic device noise data, wind noise data, and other environmental noise data; the in-vehicle ambient sound is classified to obtain the corresponding classification results, including:
[0032] The ambient sound inside the car is input into a pre-trained classification model for category prediction, and the corresponding classification result is obtained.
[0033] This invention takes into account the various types of noise in automotive scenarios. By using a pre-trained, preset classification model to perform fine-grained classification of in-vehicle ambient sounds, it can improve the recognition accuracy of in-vehicle ambient sounds and thus enhance the efficiency of car volume adjustment.
[0034] In one optional implementation, the training process of the pre-defined classification model includes:
[0035] Collect raw data under different driving scenarios. The raw data includes normal sound data and at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic equipment noise data, wind noise data, and other environmental noise data.
[0036] All raw data is labeled to obtain corresponding label data;
[0037] After performing pre-processing on all the raw data, extract the time-domain and frequency-domain features corresponding to each raw data.
[0038] A training dataset is constructed based on the time-domain features, frequency-domain features, and label data corresponding to all the original data.
[0039] The preset classification model is trained based on the training dataset to obtain the trained preset classification model.
[0040] This invention collects raw data containing various noise and normal data from different driving scenarios, and performs preprocessing and feature extraction on it, which ensures the quality of training data and greatly enhances the accuracy of the classification results of the preset classification model.
[0041] In one alternative implementation, adjusting the audio volume of the target vehicle based on the noise level includes:
[0042] Determine the preset target volume corresponding to the noise level;
[0043] Adjust the audio volume of the target car to the preset target volume.
[0044] This invention adjusts the audio volume of a target car by using preset target volumes corresponding to different levels. It can automatically adjust the audio volume to adapt to changes in noise, which not only improves adjustment efficiency but also ensures the safety of the user and provides a better audio experience.
[0045] In one optional implementation, before classifying the in-vehicle ambient sounds and obtaining the classification results, the vehicle volume adjustment further includes:
[0046] Detect whether there is talking behavior inside the target car;
[0047] If speaking is detected, return to the step of collecting ambient sounds inside the target vehicle.
[0048] If there is no speaking behavior, then proceed with the step of classifying the ambient sound inside the vehicle and obtaining the corresponding classification results.
[0049] This invention takes into account the impact of sound in actual human-computer interaction scenarios and in-vehicle conversation scenarios on car volume adjustment, and discards the corresponding collected in-vehicle ambient sound when speaking behavior is detected in the target car, so as to ensure the accuracy of noise acquisition in the in-vehicle ambient sound, thereby improving the accuracy and efficiency of subsequent car volume adjustment.
[0050] Secondly, the present invention provides a car volume control device, the device comprising:
[0051] The collection module is used to collect ambient sounds inside the target vehicle.
[0052] The classification module is used to classify the sounds in the vehicle environment and obtain the classification results. The classification results include normal sound data and noise data of at least one preset category.
[0053] The determination module is used to determine the noise level based on the noise category and / or the number of noises corresponding to the classification results;
[0054] The adjustment module is used to adjust the audio volume of the target car based on the noise level.
[0055] The car volume control device of the present invention not only realizes automatic adjustment of car volume, meets the volume adjustment needs of different noise levels, speeds up the volume adjustment process, and improves adjustment efficiency, but also provides users with a better audio experience, reduces the frequency of driver volume adjustment, and further ensures the safety of users.
[0056] Thirdly, the present invention provides a vehicle, the vehicle including a controller, the controller including a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform a vehicle volume adjustment method according to the first aspect or any corresponding embodiment described above.
[0057] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform a car volume adjustment method according to the first aspect or any corresponding embodiment described above.
[0058] The car volume adjustment method and apparatus of the present invention classify the collected in-vehicle ambient sounds, determine the noise level based on the noise category and / or number of noises in the classification results, and adjust the audio volume of the target car based on the noise level. This enables automatic adjustment of the car volume, which not only simplifies the adjustment process and meets the volume adjustment needs of different noises and improves adjustment efficiency, but also provides users with a better audio experience, reduces the frequency of volume adjustment by users, and greatly protects the driving safety of users. Attached Figure Description
[0059] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0060] Figure 1 This is a schematic flowchart of a car volume adjustment method according to an embodiment of the present invention;
[0061] Figure 2 This is a flowchart illustrating another method for adjusting car volume according to an embodiment of the present invention;
[0062] Figure 3 This is a flowchart illustrating another method for adjusting car volume according to an embodiment of the present invention;
[0063] Figure 4 This is a schematic diagram of the decision tree algorithm architecture;
[0064] Figure 5 This is a logic diagram of the PID control algorithm;
[0065] Figure 6 This is a structural block diagram of a car volume control device according to an embodiment of the present invention;
[0066] Figure 7 This is a schematic diagram of the structure of the vehicle controller according to an embodiment of the present invention. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0068] This invention provides an embodiment of a car volume adjustment method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0069] This embodiment provides a method for adjusting the volume of a car, which is applied to the controller in a hybrid vehicle, such as a microcontroller or microprocessor. Figure 1 This is a flowchart illustrating a car volume adjustment method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the process includes the following steps:
[0070] Step S101: Collect the ambient sound inside the target car.
[0071] It should be noted that, in this embodiment, the in-vehicle ambient sound includes the noise inherent in the various devices on the vehicle, noise data from the surrounding environment, and normal sound data. The collection method and specific content are not limited here. For example, using sound acquisition devices such as microphones mounted on the target vehicle to collect current engine noise, tire-road friction noise, wind noise, and noise from in-vehicle electrical equipment is merely an example.
[0072] Step S102: Classify the ambient sound in the vehicle and obtain the classification results. The classification results include normal sound data and noise data of at least one preset category.
[0073] In this embodiment, classifying in-vehicle ambient sounds aims to identify the presence of noise data and the specific category corresponding to that noise. The specific content of the preset categories is determined adaptively based on the actual noise types. It should be noted that the in-vehicle ambient sounds in this embodiment may be composite sound data containing multiple categories of noise data, requiring further analysis and determination based on the classification probability corresponding to each category of noise data. This is only provided as an example.
[0074] Step S103: Determine the noise level based on the noise category and / or number of noises corresponding to the classification results.
[0075] In this embodiment, after obtaining the classification results of the in-vehicle ambient sound, it is determined whether there is noise, and the noise level is determined according to the corresponding noise category and / or the number of noises. The specific content of the noise level is not limited here, and is adaptively adjusted based on actual needs. For example, the noise level may include two levels.
[0076] Step S104: Adjust the audio volume of the target car based on the noise level.
[0077] It should be noted that the different noise levels set in this embodiment correspond to corresponding volume adjustment values, and there is a mapping relationship between the two. This mapping can be stored in a table or file for later retrieval. For example, assuming that the current ambient sound in the car is detected as L3 (medium noise level), the noise decibel value is between 51-70dB. In order to provide the best listening experience in this noise environment, the volume is adjusted to the target value of 50%. This is only an example for illustration.
[0078] In this embodiment of the invention, the collected in-vehicle ambient sounds are classified, and the noise level is determined based on the noise category and / or number of noises in the classification results. The volume of the target car's audio system is then adjusted based on the noise level, which enables automatic adjustment of the car's volume. This not only simplifies the adjustment process and meets the volume adjustment needs for different noises, improving adjustment efficiency, but also provides users with a better audio experience, reduces the frequency of volume adjustments by users, and greatly ensures the safety of users while driving.
[0079] This embodiment provides a method for adjusting car volume. Figure 2 This is a flowchart illustrating another car volume adjustment method according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:
[0080] Step S201: Collect the ambient sound inside the target car.
[0081] In practical applications, considering the impact of voice in human-computer interaction scenarios and in-car conversations on car volume adjustment, this embodiment, after collecting the in-car ambient sound of the target car, needs to further detect the presence of speaking behavior. If speaking behavior is detected within the target car, the corresponding collected in-car ambient sound is discarded to ensure the accuracy of noise acquisition within the in-car ambient sound, thereby improving the accuracy and efficiency of subsequent car volume adjustment. Specifically, the car volume adjustment method of this embodiment further includes: detecting whether speaking behavior exists within the target car; if speaking behavior exists, returning to step S201 of collecting the in-car ambient sound of the target car; if no speaking behavior exists, performing step S202 of classifying the in-car ambient sound and obtaining the corresponding classification result.
[0082] It should be noted that the speaking behavior in this embodiment includes the user's phone call and conversation behavior inside the vehicle. The specific detection method is not limited here and can be determined based on conventional speaking behavior detection methods in the field. For example, to detect whether a user is making a phone call in the target car in the current driving scenario, Bluetooth call detection can be performed on the target car's Bluetooth device. That is, if no Bluetooth call is detected, it is determined that no phone call behavior exists; or, by acquiring an image of the target car's interior, phone call behavior detection can be performed on that image (such as holding a phone while driving, talking on a mobile phone, etc.). This is only an example for illustration.
[0083] Step S202: Classify the ambient sound in the vehicle and obtain the classification results. The classification results include normal sound data and noise data of at least one preset category.
[0084] In this embodiment, the preset categories of noise data include at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic equipment noise data, wind noise data, and other environmental noise data. It should be noted that the in-vehicle electronic equipment noise data in this embodiment mainly refers to the noise from in-vehicle electrical equipment, including the sound of the audio system, air conditioning system, etc., which can be reduced by optimizing equipment design and improving installation quality. Wind noise data and other environmental noise data mainly refer to external environmental noise, which can be reduced by installing various sound-insulating and sound-absorbing materials in the vehicle.
[0085] Specifically, in step S202 above, the in-vehicle ambient sound is classified, and the corresponding classification results are obtained, including:
[0086] Step S2021: Input the in-vehicle ambient sound into the trained preset classification model for category prediction and obtain the corresponding classification result.
[0087] It should be noted that the specific type of the preset classification model in this embodiment is not limited and can be adjusted adaptively based on actual needs. For example, the preset classification model may be a convolutional classification model or a decision tree model, which is only used as an example. Specifically, this embodiment takes into account the multiple types of noise in the automotive scene. By using the trained preset classification model to perform fine categorization of the in-vehicle environmental sounds, the recognition accuracy of the in-vehicle environmental sounds can be improved, thereby enhancing the efficiency of car volume adjustment.
[0088] In this embodiment, the training process of the preset classification model includes:
[0089] Step A1: Collect raw data under different driving scenarios. The raw data includes normal sound data and at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic device noise data, wind noise data, and other environmental noise data.
[0090] In this embodiment, when collecting different types of noise data, attention should be paid to the design of the data acquisition environment to minimize the mutual influence between different noise data and improve the quality of the collected data. It should be noted that the specific types of noise data included in the raw data are determined based on the adaptability of the actual project.
[0091] Step A2: Label all the original data to obtain the corresponding label data.
[0092] In this embodiment, the specific content of the tag data can be adaptively set based on actual needs. For example, normal sound data is marked as 0, and wind noise data is marked as 5. This is only an example.
[0093] Step A3: After performing preset processing on all raw data, extract the time domain features and frequency domain features corresponding to each raw data.
[0094] In this embodiment, the specific content of the preset processing is not limited and can be adaptively set based on actual needs. For example, in order to compare different data on the same order of magnitude, the preset processing is standardization processing, that is, subtracting the mean from the original data and dividing by its standard deviation, in order to eliminate the impact of differences in different numerical ranges on subsequent model training. This is only an example.
[0095] Step A4: Construct a training dataset based on the time-domain features, frequency-domain features, and label data corresponding to all the original data.
[0096] In this embodiment, the specific content of the time-domain features and frequency-domain features is not limited and can be adjusted adaptively based on actual needs. For example, time-domain features include the time-domain amplitude, peak value, and mean value of the data, while frequency-domain features include frequency distribution, such as frequency and phase information, and the energy ratio of low-frequency, mid-frequency, and high-frequency bands. This is only an example for illustration.
[0097] Step A5: Train the preset classification model based on the training dataset to obtain the trained preset classification model.
[0098] In this embodiment of the invention, by collecting raw data containing various noise and normal data under different driving scenarios, and preprocessing and extracting features, the quality of training data can be guaranteed, and the accuracy of the classification results of the preset classification model can be greatly enhanced.
[0099] Step S203: Determine the noise level based on the noise category and / or number of noises corresponding to the classification results.
[0100] It should be noted that the specific number of noise data points included in the classification results is not limited here and can be adjusted adaptively based on actual needs. Specifically, step S203 above includes:
[0101] Step B1: Determine the number of noise data points in the classification results.
[0102] In this embodiment, a label is set for each noise data and the probability of the noise data of that category is determined according to the model output results corresponding to different labels. The number of noise data that meet the set probability threshold is counted to obtain the number of noise data included in the classification result.
[0103] Step B2: When there is only one noise source, determine the noise category of the noise data.
[0104] In this embodiment, the noise category is determined based on the noise category label corresponding to the classification result.
[0105] Step B3: If the noise category is engine noise data, then the noise level is determined to be level three.
[0106] It should be noted that, according to industry standards, if engine noise exceeds a certain decibel level, it is considered high-intensity noise, which has a significant impact. Therefore, in this embodiment, the corresponding noise level of the engine noise data is set to the highest level, namely the third level.
[0107] Step B4: If the noise category is any one of tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 2.
[0108] It should be noted that, according to industry standards, the tire noise data, brake noise data, and in-vehicle electronic equipment noise data in this embodiment are medium-intensity noises. Therefore, the corresponding noise level for this type of noise in this embodiment is set to medium level, i.e., level two.
[0109] Step B5: If the noise category is either wind noise data or other environmental noise data, then the noise level is determined to be Level 1, and Level 2 is higher than Level 1 but lower than Level 3.
[0110] In this embodiment, for ambient noise outside the vehicle, such as wind noise data and other environmental noise data, since active isolation measures can be taken (such as soundproofing the target vehicle to reduce the impact of external noise on the in-vehicle environment and create a quieter and more comfortable riding experience) to reduce its impact on the volume of the in-vehicle audio system, the corresponding noise level of this type of noise is set to the lowest level, i.e., the first level, in this embodiment.
[0111] In this embodiment of the invention, by determining the number of noises and, when the number of noises is one, determining the noise level based on the different noise categories corresponding to the noise data, the accuracy of the noise level can be guaranteed, further improving the precision and efficiency of car volume adjustment and ensuring the safety of the user.
[0112] The car volume adjustment method in this embodiment further includes:
[0113] Step C1: When there are multiple noises, determine the noise category of each noise.
[0114] In this embodiment, the determination of the noise category for each noise is as described above and will not be repeated here.
[0115] Step C2: If the noise category includes at least engine noise data, or at least two of the following noise categories: tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 3.
[0116] Step C3: If the noise category does not include engine noise data, and the noise category includes any one of tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 2.
[0117] Step C4: If the noise category is wind noise data and / or other environmental noise data, then the noise level is determined to be Level 1.
[0118] In this embodiment of the invention, the noise level is determined by judging the number of noises, and when there are multiple noises, the noise level is determined based on the different noise categories and their numbers corresponding to the noise data. This not only ensures the accuracy of the noise level determination, but also improves the accuracy of subsequent car volume adjustment, thereby providing users with a better audio experience.
[0119] In practical applications, determining the level of in-vehicle noise essentially involves classifying the identified noise types and intensities. That is, if the intensity of a certain type of noise exceeds a certain decibel value, it is classified as high-intensity noise. Therefore, the car volume adjustment method in this embodiment, before determining the noise level based on the noise category and / or the number of noises corresponding to the classification results, also includes:
[0120] Step D1: Determine the number of noise data points in the classification results.
[0121] In this embodiment, the determination of the number of noise data points is as described above and will not be repeated here.
[0122] Step D2: When there is only one noise source, determine the current intensity of the noise data.
[0123] It should be noted that noise intensity refers to the strength of a sound signal, which depends on the amplitude of the sound wave vibration; the larger the amplitude, the greater the intensity; the smaller the amplitude, the smaller the intensity. The unit of sound intensity is generally expressed in decibels (dB). In this embodiment, the current intensity is determined based on conventional data acquisition methods in the art, such as measuring noise intensity using a frequency analyzer, real-time analyzer, noise dosimeter, automatic recorder, magnetic tape recorder, etc.
[0124] Step D3: When there are multiple noises, determine the noise intensity of each noise and select the current intensity corresponding to the maximum noise intensity from all noise intensities.
[0125] Step D4: Determine whether the current intensity is greater than the preset intensity threshold.
[0126] In this embodiment, the specific value of the preset intensity threshold is set adaptively based on the actual project requirements and is not limited here.
[0127] Step D5: When the current intensity is greater than the preset intensity threshold, the noise level is determined to be level three.
[0128] Step D6: When the current intensity is not greater than the preset intensity threshold, execute step S203 to determine the noise level based on the noise category and / or number of noises corresponding to the classification result.
[0129] In this embodiment of the invention, considering the relationship between noise intensity and noise level determination in practical applications, the current intensity corresponding to the maximum noise intensity and the preset intensity threshold are compared by designing a method that closely matches reality and further enhances the accuracy of noise levels, thereby achieving efficient, concise, fast and safe automatic adjustment of car volume.
[0130] Step S204: Adjust the audio volume of the target car based on the noise level.
[0131] Specifically, step S204 includes:
[0132] Step S2041: Determine the preset target volume corresponding to the noise level.
[0133] In this embodiment, the specific value of the preset target volume is set adaptively based on the actual project requirements and is not limited here.
[0134] Step S2042: Control the audio volume of the target car to adjust to the preset target volume.
[0135] In this embodiment, the method for controlling the audio volume of the target car is adaptively determined based on actual needs, such as PID control (Proportional-Integral-Derivative Control) or other adaptive control algorithms, which are only used as examples.
[0136] In this embodiment of the invention, the audio volume of the target car is adjusted by using preset target volumes corresponding to different levels. This can automatically adjust the audio volume to adapt to changes in noise, which not only improves adjustment efficiency but also ensures the safety of the user and provides the user with a better audio experience.
[0137] It should be noted that the car volume adjustment method in this embodiment can be applied to the target car's in-vehicle audio system, in-vehicle entertainment system, and related intelligent vehicle systems. Specifically, it can be applied to:
[0138] 1. Car Audio System: Can be directly applied to the car audio system to provide a better audio experience. When the noise inside the car increases, the car audio system can automatically increase the volume; conversely, when the noise inside the car decreases, it can automatically decrease the volume.
[0139] 2. Car Entertainment System: For in-vehicle entertainment systems that integrate audio playback, auxiliary functions can be provided. For example, when playing music or radio programs, the playback volume can be adjusted according to the real-time noise level inside the car.
[0140] 3. Intelligent Driving Assistance System: This system can also be used to improve the recognition rate of voice commands. Specifically, by adjusting the volume in real time, voice commands can be accurately recognized even in noisy in-car environments.
[0141] 4. In-vehicle communication system: In-vehicle communication systems, such as Bluetooth phones, can be used to optimize call quality. Specifically, by automatically adjusting the volume, calls remain clear in various noisy environments.
[0142] 5. In-vehicle voice recognition system: In in-vehicle voice recognition systems, such as intelligent voice assistants, this can be used to optimize voice recognition performance. Specifically, it automatically adjusts the input volume of the in-vehicle voice recognition system based on the noise environment inside the vehicle to improve recognition accuracy.
[0143] In one specific embodiment, a scheme for automatically adjusting audio volume based on in-vehicle noise is proposed. This scheme can collect and analyze in-vehicle noise in real time, and then automatically adjust the audio volume based on the noise data. This achieves a high-quality audio experience in noisy environments while avoiding the inconvenience of manual volume adjustment, and is expected to provide a new technical solution for in-vehicle audio systems. See also... Figure 3 The car volume adjustment method in this embodiment is applied to the in-vehicle audio system of the target car. This system can monitor the noise inside the vehicle in real time and automatically adjust the audio volume according to the noise level, providing a better audio experience without interfering with driving. Specifically, the system mainly consists of three modules:
[0144] 1. Noise Detection Module: This module is responsible for collecting ambient sound inside the vehicle using the vehicle's built-in microphone, processing the data, and identifying the noise level. This module is the data acquisition and processing part of the entire system.
[0145] In this embodiment, sound processing algorithms (such as Fourier transform, discrete wavelet transform, etc.) can be used to process ambient sound to obtain a rough estimate of the noise level inside the vehicle.
[0146] It should be noted that the discrete wavelet transform can provide analysis with both time and frequency resolution, and is particularly effective for non-stationary signals. It can capture instantaneous changes and can be used in practical applications to analyze short-term and drastic noise changes inside a vehicle, such as the sound of sudden braking.
[0147] In one specific embodiment, since different noise sources produce different frequency distributions, this embodiment uses Fourier transform to process the collected ambient sound inside the vehicle. The input of the Fourier transform (the sound signal in the time domain) is the in-vehicle sound data (usually in the form of a time series), and the output is the sound signal in the frequency domain. After the Fourier transform, the amplitude and phase of the sound signal at each frequency are obtained, and this frequency and phase information constitutes the frequency domain representation of the sound signal. Specifically, the basic implementation process is as follows: the sound signal in the time domain is decomposed into a superposition of infinitely many sine and cosine signals, each sine and cosine signal corresponding to a specific frequency; the amplitude and phase of the sound signal at each frequency are calculated; and the sound signal is converted from the time domain to the frequency domain using this amplitude and phase information.
[0148] 2. Noise Level Classification Module: Based on the collected noise data, this module classifies noise levels. Classification criteria can be set according to actual needs, such as dividing noise levels into three categories: quiet, normal, and noisy.
[0149] In this embodiment, the specific classification criteria must first be determined, based on defined characteristics (such as frequency domain characteristics: the energy ratio of low, mid, and high frequency bands; and time domain characteristics: the time-domain amplitude, peak value, and mean value of the signal). Specifically, after data collection (requiring a large amount of noise data from different environments), feature extraction is performed (extracting the aforementioned features from the raw data). Then, exploratory data analysis tools, i.e., visualization tools (such as spectrograms, histograms, etc.), are used to analyze the distribution differences of features among different noise types and levels. This module needs to classify noise levels based on the data provided by the noise detection module and using classification algorithms (such as support vector machines, neural networks, decision trees, etc.).
[0150] In one specific embodiment, see Figure 4 The process of using decision trees to classify noise levels includes data preprocessing, model training, and prediction, specifically:
[0151] 2.1 Feature extraction, preprocessing, and training.
[0152] (1) Extract the spectral intensity from the frequency domain signal obtained from the Fourier transform module, and then select the average intensity of all frequencies or the maximum intensity of a specific frequency band as features.
[0153] (2) Feature preprocessing: Because features may be on different orders of magnitude (for example, some feature values are between 0 and 1, and some may be between 100 and 10000), they need to be standardized to the same order of magnitude. A common practice is to subtract the mean and divide by the standard deviation.
[0154] (3) Training the classifier: Use the decision tree algorithm to train some labeled noise level data.
[0155] In this embodiment, the decision tree algorithm takes the following steps: First, a feature is selected as the root node. This feature should best segment the dataset, meaning it minimizes the uncertainty of the noise level. Common criteria include information gain, gain ratio, and Gini index. Then, for each value of this feature (i.e., the root in the diagram), a branch is created. For each branch, a subtree is recursively constructed using the corresponding subset of the dataset (i.e., all samples taking this value for the feature). The recursive process typically terminates when all samples have the same noise level, all samples have the same value for all features, or a preset maximum depth is reached.
[0156] 2.2 Training process.
[0157] (1) Initialize model parameters.
[0158] (2) Input the training data into the model and calculate the output of the model.
[0159] (3) Calculate the loss function based on the model output and the actual labels.
[0160] (4) Use the gradient descent optimization algorithm to update the model parameters in order to reduce the value of the loss function.
[0161] (5) Repeat steps (2)-(4) until the model’s performance reaches a satisfactory level or the preset number of iterations is reached.
[0162] 2.3 Predicted noise level.
[0163] (1) Extract features from new noisy data.
[0164] (2) Input the features into the trained classifier to obtain the prediction results of the noise level.
[0165] (3) As needed, the prediction results can be converted into actual noise level labels.
[0166] 2.4 Gradient Descent Algorithm.
[0167] In this embodiment, the specific implementation includes: a noise level classifier f(x) = wx + b, where x is the input feature, and w and b are parameters to be learned. When training the classifier, the goal is to find a set of w and b such that the classifier's output is as close as possible to the true noise level. A loss function is defined, such as the mean squared error loss function: L(w,b) = (1 / n) × Σ(f(x_i) - y_i)^2, where x_i is the feature of the i-th sample, y_i is its true noise level, and n is the total number of samples. The goal is to find a set of w and b such that the value of the loss function L(w,b) is minimized.
[0168] This process requires parameter initialization, specifically initializing the values of w and b. Let's assume the initial values are w0 and b0. Then, calculate the gradient of the loss function L(w,b) with respect to the current parameters (the gradient is a vector where each element is a partial derivative of the loss function with respect to the corresponding parameter). In this example, the gradient consists of two parts: the partial derivative of the loss function with respect to w and the partial derivative of the loss function with respect to b. Specifically, the partial derivative with respect to w is: dL / dw = (2 / n) × Σx_i(f(x_i) - y_i), where Σ is the summation over all samples; the partial derivative with respect to b is: dL / db = (2 / n) × Σ(f(x_i) - y_i). These two partial derivatives constitute the gradient: [dL / dw, dL / db].
[0169] The process involves updating parameters: the values of w and b need to be updated based on the gradient and a preset learning rate α (a positive decimal). The update rule is: new w = old w - α × (dL / dw), new b = old b - α × (dL / db). Then, the termination condition needs to be checked. If the loss function value is sufficiently small, or if the loss function value does not decrease significantly after a certain number of iterations, or if the preset maximum number of iterations is reached, the algorithm can stop. The above steps are repeated: if the termination condition is not met, the algorithm returns to the step of recalculating the gradient, updating the parameters, and checking the termination condition again. This process repeats until the termination condition is met, i.e., training ends.
[0170] 3. Volume Control Module: Automatically adjusts the speaker volume based on the noise level. The specific adjustment strategy can be set according to actual needs; for example, the speaker volume can be increased when the noise level is high.
[0171] In practical applications, this module needs to automatically adjust the speaker volume using a PID control algorithm (i.e., a PID controller) based on the noise level classification results. It should be noted that the PID controller consists of three parts:
[0172] 1. Proportional Gain (P): This part directly depends on the current error value. The proportional gain determines the contribution of this part to the control signal. Generally speaking, the larger the error, the greater the contribution of this part.
[0173] 2. Integral Part (I): This part depends on the accumulation of past error values. The integral gain determines the contribution of this part to the control signal. The function of this part is to eliminate the steady-state error of the system, that is, the persistent, non-zero error.
[0174] 3. Differential Part (D): This part depends on the rate of change of the error value. The differential gain determines the contribution of this part to the control signal. Its function is to predict the trend of error change, thereby reducing system overshoot and oscillation.
[0175] 4. Adjust Volume: Adjust the audio volume based on the control signal calculated by the PID controller. If the control signal is positive, increase the volume; if the control signal is negative, decrease the volume. Feedback the adjusted volume to the PID controller as the current volume for the next error calculation.
[0176] In one specific embodiment, see Figure 5 The specific implementation process is as follows: 1. Receive input: Receive input from the noise level classification module, i.e., the noise level of the current environment. 2. Set target value: Set an ideal target volume value for each noise level according to application requirements. For example, if the noise level is very high, it may be desirable for the speaker volume to be correspondingly higher so that the user can hear clearly. 3. Calculate error: The error is the difference between the target value and the actual volume of the speaker. This error value will be used by the PID controller to adjust the volume. 4. PID control: The PID controller calculates a control signal based on the error value to adjust the speaker volume.
[0177] This invention provides a specific strategy for dynamically adjusting volume based on noise levels, enabling automatic adjustment of audio volume according to the ambient noise level inside the vehicle. Specifically, it optimizes data processing procedures such as time-domain to frequency-domain signal conversion, frequency characteristic extraction, and standardization; it designs processes for feature selection, recursive subtree construction, and gradient descent optimization of the decision tree classifier's training and optimization; and it sets different volume adjustment rules based on different noise levels to ensure users receive the best audio experience in various noise environments. In summary, this invention provides a novel, automatic, efficient, simple, and safe technical solution for adjusting the volume of in-vehicle audio systems.
[0178] This embodiment also provides a car volume control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, a "module" can be a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0179] This invention provides a car volume control device, such as... Figure 6 As shown, the device includes:
[0180] The collection module 601 is used to collect the ambient sound inside the target car.
[0181] The classification module 602 is used to classify the ambient sound in the vehicle and obtain the classification results, which include normal sound data and noise data of at least one preset category.
[0182] The determination module 603 is used to determine the noise level based on the noise category and / or the number of noises corresponding to the classification result.
[0183] Adjustment module 604 is used to adjust the audio volume of the target vehicle based on the noise level.
[0184] In some optional implementations, the classification module 602 includes a classification submodule, used to input the in-vehicle ambient sound into a trained preset classification model for category prediction and obtain the corresponding classification result.
[0185] In some optional implementations, the classification submodule includes: a model training unit for collecting raw data under different driving scenarios, wherein the raw data includes normal sound data and at least one of engine noise data, tire noise data, brake noise data, in-vehicle electronic device noise data, wind noise data, and other environmental noise data; labeling all raw data to obtain corresponding label data; after performing preset processing on all raw data, extracting the time-domain features and frequency-domain features corresponding to each raw data; constructing a training dataset based on the time-domain features, frequency-domain features, and label data corresponding to all raw data; and training a preset classification model based on the training dataset to obtain a trained preset classification model.
[0186] In some optional implementations, the determining module 603 includes: a first determining submodule, a second determining submodule, a third determining submodule, a fourth determining submodule, and a fifth determining submodule; wherein, the first determining submodule is used to determine the number of noise data included in the classification result; the second determining submodule is used to determine the noise category of the noise data when the number of noise data is one; the third determining submodule is used to determine the noise level as the third level if the noise category is engine noise data; the fourth determining submodule is used to determine the noise level as the second level if the noise category is any one of tire noise data, brake noise data, and in-vehicle electronic device noise data; and the fifth determining submodule is used to determine the noise level as the first level if the noise category is any one of wind noise data and other environmental noise data, wherein the second level is higher than the first level and lower than the third level.
[0187] In some optional implementations, the determining module 603 further includes: a first determining submodule, a second determining submodule, a third determining submodule, and a fourth determining submodule; wherein, the first determining submodule is used to determine the noise category of each noise when there are multiple noises; the second determining submodule is used to determine the noise level as the third level if the noise category contains at least engine noise data, or at least two of the following: tire noise data, brake noise data, and in-vehicle electronic device noise data; the third determining submodule is used to determine the noise level as the second level if the noise category does not contain engine noise data, but contains any one of the following: tire noise data, brake noise data, and in-vehicle electronic device noise data; and the fourth determining submodule is used to determine the noise level as the first level if all noise categories are wind noise data and / or other environmental noise data.
[0188] In some optional embodiments, the apparatus further includes: a judgment module, configured to determine the number of noise data contained in the classification result; when the number of noise data is one, determine the current intensity of the noise data; when the number of noise data is multiple, determine the noise intensity of each noise data separately, and filter the current intensity corresponding to the maximum noise intensity from all noise intensities; determine whether the current intensity is greater than a preset intensity threshold; when the current intensity is greater than the preset intensity threshold, determine the noise level as the third level; when the current intensity is not greater than the preset intensity threshold, perform the step of determining the noise level based on the noise category and / or the number of noise data corresponding to the classification result.
[0189] In some optional embodiments, the adjustment module 604 includes: a first adjustment submodule and a second adjustment submodule; wherein, the first adjustment submodule is used to determine a preset target volume corresponding to the noise level; and the second adjustment submodule is used to control the audio volume of the target vehicle to be adjusted to the preset target volume.
[0190] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0191] In this embodiment, the car volume control device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0192] The car volume adjustment device of this invention can realize automatic adjustment of car volume, simplify the adjustment process, meet the volume adjustment needs of different noise levels, improve adjustment efficiency, provide users with a better audio experience, reduce the frequency of user volume adjustment, and greatly protect the user's driving safety.
[0193] This invention also provides a vehicle, which includes a controller. In this embodiment, the controller is a vehicle controller, used for powering on / off and waking up its subordinate sub-controllers and network nodes, and each of its power supply interfaces can collect the real-time output current. Other controllers with the above functions are also applicable.
[0194] Figure 7 This is a schematic diagram of the structure of the controller provided in an optional embodiment of the present invention, as shown below. Figure 7 As shown, the controller includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the controller, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple controllers can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 7 Take a processor 10 as an example.
[0195] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0196] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0197] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the controller. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0198] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0199] The controller also includes a communication interface 30 for the main control chip to communicate with other devices or communication networks.
[0200] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded via a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor main control chips, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0201] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for adjusting car volume, characterized in that, The method includes: Collect ambient sounds inside the target vehicle; The in-vehicle ambient sound is classified to obtain a classification result, which includes normal sound data and noise data of at least one preset category. The noise level is determined based on the noise category and / or the number of noises corresponding to the classification results; The volume of the target vehicle's audio system is adjusted based on the noise level. The step of determining the noise level based on the noise category and / or the number of noises corresponding to the classification result includes: Determine the number of noise data points in the classification result; When there are multiple noises, the noise category of each noise is determined separately; If the noise category includes at least engine noise data, or if the noise category includes at least two of the following: tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 3.
2. The car volume adjustment method according to claim 1, characterized in that, The step of determining the noise level based on the noise category and / or number of noises corresponding to the classification result further includes: Determine the number of noise data points in the classification result; When the number of noise items is one, the noise category of the noise data is determined; If the noise category is engine noise data, then the noise level is determined to be level three; If the noise category is any one of tire noise data, brake noise data, and in-vehicle electronic device noise data, then the noise level is determined to be the second level. If the noise category is any one of wind noise data and other environmental noise data, then the noise level is determined to be the first level, and the second level is higher than the first level and lower than the third level.
3. The car volume adjustment method according to claim 1, characterized in that, When there are multiple noises, after determining the noise category of each noise, the method further includes: If the noise category does not include engine noise data, and the noise category includes any one of tire noise data, brake noise data, and in-vehicle electronic device noise data, then the noise level is determined to be the second level. If the noise categories are all wind noise data and / or other environmental noise data, then the noise level is determined to be Level 1.
4. The car volume adjustment method according to claim 3, characterized in that, Before determining the noise level based on the noise category and / or number of noises corresponding to the classification result, the method further includes: Determine the number of noise data points in the classification result; When the number of noise items is one, determine the current intensity of the noise data; When there are multiple noises, the noise intensity of each noise is determined, and the current intensity corresponding to the maximum noise intensity is selected from all noise intensities. Determine whether the current intensity is greater than a preset intensity threshold; When the current intensity is greater than the preset intensity threshold, the noise level is determined to be level three; When the current intensity is not greater than the preset intensity threshold, the step of determining the noise level based on the noise category and / or the number of noises corresponding to the classification result is performed.
5. The car volume adjustment method according to claim 1, characterized in that, The preset categories of noise data include at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic equipment noise data, wind noise data, and other environmental noise data. The classification of the in-vehicle ambient sound, and the corresponding classification results, include: The in-vehicle ambient sound is input into a pre-trained preset classification model for category prediction, and the corresponding classification result is obtained.
6. The car volume adjustment method according to claim 5, characterized in that, The training process of the preset classification model includes: Collect raw data under different driving scenarios, wherein the raw data includes normal sound data and at least one of the following: engine noise data, tire noise data, brake noise data, in-vehicle electronic equipment noise data, wind noise data, and other environmental noise data. All raw data is labeled to obtain corresponding label data; After performing pre-processing on all the raw data, extract the time-domain and frequency-domain features corresponding to each raw data. A training dataset is constructed based on the time-domain features, frequency-domain features, and label data corresponding to all the original data. The preset classification model is trained based on the training dataset to obtain the trained preset classification model.
7. The method for adjusting car volume according to any one of claims 1 to 6, characterized in that, The adjustment of the audio volume of the target vehicle based on the noise level includes: Determine the preset target volume corresponding to the noise level; Control the audio volume of the target car to adjust to the preset target volume.
8. The car volume adjustment method according to claim 1, characterized in that, Before classifying the in-vehicle ambient sound and obtaining the classification result, the method further includes: Detect whether there is any talking behavior inside the target vehicle; If speaking is detected, return to the step of collecting ambient sounds inside the target vehicle. If there is no speaking behavior, then the step of classifying the in-vehicle ambient sound is performed to obtain the corresponding classification result.
9. A car volume control device, characterized in that, The device includes: The collection module is used to collect ambient sounds inside the target vehicle. The classification module is used to classify the in-vehicle ambient sound and obtain the classification result, which includes normal sound data and noise data of at least one preset category. The determination module is used to determine the noise level based on the noise category and / or the number of noises corresponding to the classification result; An adjustment module is used to adjust the audio volume of the target vehicle based on the noise level; The step of determining the noise level based on the noise category and / or the number of noises corresponding to the classification result includes: Determine the number of noise data points in the classification result; When there are multiple noises, the noise category of each noise is determined separately; If the noise category includes at least engine noise data, or if the noise category includes at least two of the following: tire noise data, brake noise data, and in-vehicle electronic equipment noise data, then the noise level is determined to be Level 3.
10. A vehicle, characterized in that, The vehicle includes a controller, which includes a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the vehicle volume adjustment method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the vehicle volume adjustment method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Running warning system and method for new energy vehicle
CN106956645A
Method and system for adjusting volume, mobile terminal and storage medium
CN110995925A
Noise-based in-vehicle volume control method, device and equipment and storage medium
CN115755702A