An acoustic scene classification method and system based on acoustic features
Patent Information
- Application Number
- CN202611450087.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]鉴于此,本发明提出了一种基于声学特征的声场景分类方法及系统,旨在解决现有方法采用固定分帧窗长与固定分类阈值,无法兼顾瞬态声事件捕捉精度与平稳声场分析效率,难以适配不同行驶场景下声学信号分布差异,致使声场景分类准确性与实时性下降的技术问题
对汽车行驶环境声学信号进行分帧处理,生成包含多个初始时频片段的片段序列;提取各初始时频片段内的声学事件边界,计算声学能量占比与时频结构复杂度参数;将各声学事件边界分别归类为第一声学事件以及第二声学事件;基于第一声学事件的分布状态,为各初始时频片段所在的时间区间分配目标分析窗长;按分配的目标分析窗长重新分帧,生成目标时频片段;对第一声学事件与第二声学事件进行特征降维生成目标特征集合,并生成可执行声场景分类的数据,提升复杂行驶环境下声场景分类对瞬态声事件的捕捉能力,保证声场景分类结果的准确性。
Smart Images

Figure CN122967683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sound scene classification technology, and more specifically, to a sound scene classification method and system based on acoustic features. Background Technology
[0002] With the rapid development of intelligent connected vehicles and in-vehicle voice interaction technology, the classification of sound scenes in the vehicle driving environment has important application value in fields such as autonomous driving environment perception, in-vehicle noise reduction control, and voice wake-up optimization.
[0003] Existing sound scene classification methods typically segment the acquired acoustic signal into frames of fixed length and extract acoustic features, then output the scene category through a classification model. However, the sound composition of the vehicle driving environment is complex, with dense transient sound events in intersections such as intersections and tunnels, while the sound field is stable in scenarios such as high-speed cruising. Fixed frame lengths are difficult to balance capturing transient changes and frequency resolution. At the same time, existing methods often use fixed thresholds to distinguish sound events and uniform compression rates for feature dimensionality reduction, which reduces classification accuracy when the background sound intensity changes. Furthermore, they are prone to losing key sound event details or retaining a large number of redundant features during compression, making it difficult to balance classification accuracy and real-time performance. Summary of the Invention
[0004] In view of this, the present invention proposes a sound scene classification method and system based on acoustic features, aiming to solve the technical problems of existing methods that use fixed frame window length and fixed classification threshold, which cannot take into account both the accuracy of transient sound event capture and the efficiency of stable sound field analysis, and are difficult to adapt to the differences in acoustic signal distribution under different driving scenarios, resulting in a decrease in the accuracy and real-time performance of sound scene classification.
[0005] This invention proposes a sound scene classification method based on acoustic features, including: Acquire acoustic signals of the vehicle's driving environment, perform frame-segmentation processing on the acoustic signals of the vehicle's driving environment, and generate a segment sequence containing multiple initial time-frequency segments; Extract the acoustic event boundaries within each initial time-frequency segment, and calculate the acoustic energy ratio and time-frequency structure complexity parameters of each acoustic event boundary; Based on the acoustic energy ratio and the time-frequency structure complexity parameter, each of the acoustic event boundaries is classified into a first acoustic event representing the intersection region of complex sound scenes and a second acoustic event representing the substrate of a single sound scene. Based on the distribution of the first acoustic events within each initial time-frequency segment, a target analysis window length is adaptively allocated to the time interval where each initial time-frequency segment is located; Within each of the aforementioned time intervals, the acoustic signal of the vehicle driving environment is reframed according to the allocated target analysis window length to generate target time-frequency segments; The first acoustic event and the second acoustic event within the target time-frequency segment are subjected to feature dimensionality reduction and a target feature set is generated. Based on the target feature set, data for performing sound scene classification is generated.
[0006] Further, the acoustic event boundaries within each of the initial time-frequency segments are extracted, and the acoustic energy proportion and time-frequency structure complexity parameters of each acoustic event boundary are calculated, including: Calculate the reference energy of the global bounding boundary of the initial time-frequency segment; Traverse each acoustic event boundary within the initial time-frequency segment, calculate the internal actual energy of the acoustic event boundary, and the ratio of the internal actual energy to the reference energy, and determine it as the acoustic energy percentage. The ratio of the square of the boundary length of the acoustic event boundary to the actual internal energy is calculated and determined as the time-frequency structure complexity parameter.
[0007] Furthermore, based on the acoustic energy ratio and the time-frequency structure complexity parameter, each acoustic event boundary is classified into a first acoustic event representing the intersection region of complex sound scenes and a second acoustic event representing the basis of a single sound scene, including: Calculate the sum of the internal actual energies of all acoustic event boundaries within the initial time-frequency segment; Calculate the difference between the reference energy of the global outer boundary of the initial time-frequency segment and the sum of the actual internal energy, and determine the ratio of the difference to the reference energy as the equivalent background sound proportion of the initial time-frequency segment; Based on the equivalent background sound ratio, the energy ratio threshold and complexity threshold are calculated using a preset mapping function; Traverse each of the acoustic event boundaries within the initial time-frequency segment, and determine the currently traversed acoustic event boundary as the boundary to be classified; Obtain the acoustic energy percentage and the time-frequency structure complexity parameter corresponding to the boundary to be classified; If the acoustic energy percentage is greater than or equal to the energy percentage threshold, or the time-frequency structure complexity parameter is greater than or equal to the complexity threshold, then the boundary to be classified is classified as the first acoustic event. If the acoustic energy percentage is less than the energy percentage threshold and the time-frequency structure complexity parameter is less than the complexity threshold, then the boundary to be classified is classified as the second acoustic event.
[0008] Furthermore, based on the distribution of the first acoustic events within each of the initial time-frequency segments, a target analysis window length is adaptively allocated to the time interval containing each of the initial time-frequency segments, including: Determine whether each of the initial time-frequency segments contains the first acoustic event; If the initial time-frequency segment contains the first acoustic event, then the time interval in which the initial time-frequency segment is located is allocated a first analysis window length as the target analysis window length; If the initial time-frequency segment does not contain the first acoustic event, then the second analysis window length is assigned as the target analysis window length for the time interval where the initial time-frequency segment is located; Wherein, the length of the first analysis window is less than the length of the second analysis window.
[0009] Furthermore, before reframing the acoustic signal of the vehicle driving environment according to the allocated target analysis window length within each of the aforementioned time intervals to generate the target time-frequency segment, the process further includes: Identify a first time interval and a second time interval that are adjacent in the time axis direction, wherein the first time interval is allocated with the first analysis window length and the second time interval is allocated with the second analysis window length; The boundary region between the first time interval and the second time interval is defined as the window length transition region; Within the window length transition zone, a transition frame time plane is generated according to a preset step size; A third analysis window length is allocated to the crossover framing time plane, and the acoustic signal of the vehicle driving environment is re-framing. The value of the third analysis window length is between the first analysis window length and the second analysis window length.
[0010] Further, feature dimensionality reduction is performed on the first acoustic event and the second acoustic event within the target time-frequency segment to generate a target feature set, including: The first acoustic event or the second acoustic event within the target time-frequency segment is identified as the event to be processed, wherein the event to be processed consists of multiple feature sampling points arranged in chronological order.
[0011] Furthermore, it also includes: If the event to be processed is the first acoustic event, then the first feature compression threshold is configured as the target feature compression threshold; If the event to be processed is the second acoustic event, then the target feature compression threshold is determined based on the second feature compression threshold, wherein the first feature compression threshold is less than the second feature compression threshold; Following the temporal sequence, a traversal window containing three consecutive feature sampling points is established; Calculate the feature deviation distance from the middle feature sampling point in the middle position within the traversal window to the line connecting the feature sampling points on both sides; If the feature deviation distance is less than the target feature compression threshold, the intermediate feature sampling point is deleted, and the next feature sampling point is extracted along the temporal sequence to complete the traversal window, thereby updating the three consecutive feature sampling points calculated in the next iteration. If the feature deviation distance is greater than or equal to the target feature compression threshold, the intermediate feature sampling point is retained, and the traversal window is slid backward along the temporal sequence to update the next three consecutive feature sampling points.
[0012] Further, determining the target feature compression threshold based on the second feature compression threshold includes: Calculate the shortest time-frequency Euclidean distance between the second acoustic event within the target time-frequency segment and the nearest first acoustic event; Determine whether the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold; If the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold, the second acoustic event is marked as a transition acoustic event, and based on the shortest time-frequency Euclidean distance, the first feature compression threshold and the second feature compression threshold, a dynamic transition compression threshold corresponding to the transition acoustic event is calculated through a preset interpolation function, and the dynamic transition compression threshold is determined as the target feature compression threshold. If the shortest time-frequency Euclidean distance is greater than or equal to a preset smooth transition threshold, then the second feature compression threshold is determined as the target feature compression threshold.
[0013] Furthermore, data for performing sound scene classification is generated based on the target feature set, including: Based on the quantity ratio, energy distribution, and complexity parameter distribution of each first acoustic event and each second acoustic event in the target feature set, the sound scene category corresponding to the acoustic signal of the vehicle driving environment is determined; Based on the sound scene category and the time interval corresponding to the acoustic signal of the vehicle driving environment, data for executable sound scene classification is generated.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: The acoustic signals of the vehicle driving environment are processed by framing to generate a segment sequence containing multiple initial time-frequency segments. Acoustic event boundaries within each initial time-frequency segment are extracted, and the acoustic energy ratio and time-frequency structure complexity parameters are calculated. Each acoustic event boundary is classified into a first acoustic event and a second acoustic event. Based on the distribution of the first acoustic events, a target analysis window length is allocated to the time interval of each initial time-frequency segment. The segments are re-framed according to the allocated target analysis window length to generate target time-frequency segments. Feature dimensionality reduction is performed on the first and second acoustic events to generate a target feature set, and data for executable sound scene classification is generated. This improves the ability of sound scene classification in complex driving environments to capture transient sound events and ensures the accuracy of sound scene classification results.
[0015] On the other hand, this application also provides a sound scene classification system based on acoustic features, including: The sequence generation module is used to acquire acoustic signals of the vehicle driving environment, perform frame-segmentation processing on the acoustic signals of the vehicle driving environment, and generate a segment sequence containing multiple initial time-frequency segments. An acoustic processing module is used to extract acoustic event boundaries within each initial time-frequency segment and calculate the acoustic energy ratio and time-frequency structure complexity parameters of each acoustic event boundary. The event segmentation module is used to classify each of the acoustic event boundaries into a first acoustic event representing the intersection area of complex sound scenes and a second acoustic event representing the basis of a single sound scene, based on the acoustic energy ratio and the time-frequency structure complexity parameter. The window length allocation module is used to adaptively allocate a target analysis window length to the time interval where each of the initial time-frequency segments is located, based on the distribution state of the first acoustic events within each of the initial time-frequency segments. The segment update module is used to re-frame the acoustic signal of the vehicle driving environment according to the allocated target analysis window length within each time interval to generate target time-frequency segments; The scene classification module is used to perform feature dimensionality reduction on the first acoustic event and the second acoustic event in the target time-frequency segment and generate a target feature set, and generate data for executable sound scene classification based on the target feature set. Attached Figure Description
[0016] The accompanying drawings are used to illustrate the technical solutions of the present invention and do not constitute a limitation on the scope of protection of the present invention. The process nodes, regional relationships, and functional block diagrams in the drawings are used to illustrate the implementation methods of the embodiments of the present invention. In the drawings: Figure 1 A flowchart illustrating the acoustic scene classification method based on acoustic features provided in an embodiment of the present invention; Figure 2This is a functional block diagram of an acoustic scene classification system based on acoustic features provided in an embodiment of the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will now be described with reference to the accompanying drawings. These embodiments are used to illustrate the technical solutions of the present invention and do not limit the scope of protection of the present invention. Unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0018] In some embodiments of this application, see Figure 1 As shown, this application proposes a sound scene classification method based on acoustic features, including: S110: Acquire the acoustic signal of the vehicle driving environment, perform frame-segmentation processing on the acoustic signal of the vehicle driving environment, and generate a segment sequence containing multiple initial time-frequency segments; S120: Extract the acoustic event boundaries within each of the initial time-frequency segments, and calculate the acoustic energy ratio and time-frequency structure complexity parameters of each of the acoustic event boundaries; S130: Based on the acoustic energy ratio and the time-frequency structure complexity parameter, each of the acoustic event boundaries is classified into a first acoustic event representing the intersection area of complex sound scenes and a second acoustic event representing the substrate of a single sound scene. S140: Based on the distribution state of the first acoustic events within each of the initial time-frequency segments, adaptively allocate a target analysis window length to the time interval where each of the initial time-frequency segments is located; S150: Within each of the time intervals, the acoustic signal of the vehicle driving environment is reframed according to the allocated target analysis window length to generate target time-frequency segments; S160: Perform feature dimensionality reduction on the first acoustic event and the second acoustic event within the target time-frequency segment and generate a target feature set, and generate data for executable sound scene classification based on the target feature set.
[0019] Specifically, the acoustic signals of the vehicle's driving environment are collected by the vehicle's onboard microphone, such as the mixed sound picked up when the vehicle passes through urban intersections, tunnels, and highway sections. Frame processing involves dividing the continuous acoustic signal into fixed frame lengths and performing time-frequency transformation to obtain multiple initial time-frequency segments arranged in time sequence. Each segment is a local time-frequency energy distribution map.
[0020] In some embodiments of this application, acoustic event boundaries within each initial time-frequency segment are extracted, and the acoustic energy proportion and time-frequency structure complexity parameters of each acoustic event boundary are calculated, including: Calculate the reference energy of the global bounding boundary of the initial time-frequency segment; Traverse each acoustic event boundary within the initial time-frequency segment, calculate the internal actual energy of the acoustic event boundary, and the ratio of the internal actual energy to the reference energy, and determine it as the acoustic energy percentage. The ratio of the square of the boundary length of the acoustic event boundary to the actual internal energy is calculated and determined as the time-frequency structure complexity parameter.
[0021] Specifically, the global bounding boundary refers to the outermost closed contour that encloses all energy regions within the initial time-frequency segment. The sum of the internal energies of the global bounding boundary is the reference energy.
[0022] An acoustic event boundary refers to a closed contour line on a time-frequency map that encloses a region of energy accumulation, such as the contour lines enclosed by a horn sound or engine roar. For the target acoustic event boundary being processed, the energy of each time-frequency point within its closed contour is accumulated to obtain the actual internal energy.
[0023] Boundary length refers to the length of the closed contour line of the acoustic event boundary on the time-frequency diagram.
[0024] The beneficial effects of the above technical solution are: using the energy of the outer boundary as a unified standard to calculate the energy ratio, and using the ratio of the square of the boundary length to the internal energy to calculate the complexity, the interference caused by the difference in energy scale is eliminated, making the characteristic characterization of different event boundaries objectively comparable.
[0025] In some embodiments of this application, based on the acoustic energy ratio and the time-frequency structure complexity parameter, each acoustic event boundary is classified into a first acoustic event representing a complex acoustic scene intersection region and a second acoustic event representing a single acoustic scene substrate, including: Calculate the sum of the internal actual energies of all acoustic event boundaries within the initial time-frequency segment; Calculate the difference between the reference energy of the global outer boundary of the initial time-frequency segment and the sum of the actual internal energy, and determine the ratio of the difference to the reference energy as the equivalent background sound proportion of the initial time-frequency segment; Based on the equivalent background sound ratio, the energy ratio threshold and complexity threshold are calculated using a preset mapping function; Traverse each of the acoustic event boundaries within the initial time-frequency segment, and determine the currently traversed acoustic event boundary as the boundary to be classified; Obtain the acoustic energy percentage and the time-frequency structure complexity parameter corresponding to the boundary to be classified; If the acoustic energy percentage is greater than or equal to the energy percentage threshold, or the time-frequency structure complexity parameter is greater than or equal to the complexity threshold, then the boundary to be classified is classified as the first acoustic event. If the acoustic energy percentage is less than the energy percentage threshold and the time-frequency structure complexity parameter is less than the complexity threshold, then the boundary to be classified is classified as the second acoustic event.
[0026] Specifically, internal actual energy refers to the sum of energy at each time frequency point within the closed region of each acoustic event boundary.
[0027] The preset mapping function refers to a pre-defined functional relationship used to map the equivalent background sound proportion to an energy proportion threshold and a complexity threshold. Mapping functions include linear functions, piecewise functions, etc., and the specific function chosen depends on the actual needs. For example, if a linear function is selected, T_e = 0.1 + 0.167 × b; T_c = 3 + 10 × b; where b is the equivalent background sound proportion, such as 0.3, T_e is the energy proportion threshold, and T_c is the complexity threshold. In this case, the energy proportion threshold would be 0.15, and the complexity threshold would be 6. The value of the complexity threshold increases as the equivalent background sound proportion increases.
[0028] Iterate through the boundaries of each acoustic event within the initial time-frequency segment. The currently traversed acoustic event boundary is denoted as the boundary to be classified.
[0029] The beneficial effects of the above technical solution are: by dynamically adjusting the classification threshold using the equivalent background sound ratio, the complexity threshold changes synchronously with the background sound ratio, which can adapt to the differences in acoustic signal distribution under different driving scenarios, avoid the problem of inaccurate classification in mixed sound scenarios with a fixed threshold, effectively distinguish between converging sound events and fundamental sound events, improve the accuracy and adaptability of acoustic event classification, and provide an accurate classification basis for subsequent overall sound scene classification.
[0030] In some embodiments of this application, based on the distribution of the first acoustic events within each initial time-frequency segment, a target analysis window length is adaptively allocated to the time interval containing each initial time-frequency segment, including: Determine whether each of the initial time-frequency segments contains the first acoustic event; If the initial time-frequency segment contains the first acoustic event, then the time interval in which the initial time-frequency segment is located is allocated a first analysis window length as the target analysis window length; If the initial time-frequency segment does not contain the first acoustic event, then the second analysis window length is assigned as the target analysis window length for the time interval where the initial time-frequency segment is located; Wherein, the length of the first analysis window is less than the length of the second analysis window.
[0031] Specifically, the distribution state determines whether the first acoustic event exists within the initial time-frequency segment. The analysis window length refers to the duration of each frame during reframing. A shorter window length results in higher temporal resolution, enabling the capture of transient changes; a longer window length results in higher frequency resolution and fewer frames, which helps save computational resources.
[0032] If an initial time-frequency segment contains the first acoustic event, it indicates that the time interval containing that segment contains a complex intersecting sound scene with dense transient acoustic changes, requiring a finer temporal resolution for characterization. In this case, a first analysis window length is assigned to that time interval as the target analysis window length. In this embodiment, the first analysis window length is 10 milliseconds. If an initial time-frequency segment does not contain the first acoustic event, it indicates that the time interval containing that segment has a single sound scene basis with stable acoustic conditions, and does not require a finer temporal resolution. In this case, a second analysis window length is assigned to that time interval as the target analysis window length. In this embodiment, the second analysis window length is 50 milliseconds.
[0033] The beneficial effects of the above technical solution are: adaptively adjusting the frame window length according to the distribution type of acoustic events within the current segment; using a short window length in the intersection area of complex sound scenes to retain higher temporal resolution and accurately capture the changing details of transient sound signals; using a long window length in a single, stable sound scene to obtain higher frequency resolution, while reducing the number of frames and reducing subsequent computational load, thus balancing the accuracy and computational efficiency of sound signal feature extraction, and solving the problem that a fixed window length cannot be adapted to both complex dynamic sound scenes and stable, single sound scenes at the same time.
[0034] In some embodiments of this application, before reframing the vehicle driving environment acoustic signal according to the allocated target analysis window length within each time interval to generate the target time-frequency segment, the method further includes: Identify a first time interval and a second time interval that are adjacent in the time axis direction, wherein the first time interval is allocated with the first analysis window length and the second time interval is allocated with the second analysis window length; The boundary region between the first time interval and the second time interval is defined as the window length transition region; Within the window length transition zone, a transition frame time plane is generated according to a preset step size; A third analysis window length is allocated to the crossover framing time plane, and the acoustic signal of the vehicle driving environment is re-framing. The value of the third analysis window length is between the first analysis window length and the second analysis window length.
[0035] Specifically, for example, a first analysis window of 10 milliseconds is allocated within the first time interval, and a second analysis window of 50 milliseconds is allocated within the second time interval. The first and second time intervals are adjacent on the time axis. The boundary region between the first and second time intervals is defined as the window length transition region. The window length transition region refers to the transition area formed by extending a certain duration to both sides of the boundary point of the two time intervals. In this embodiment, a window length transition region of 40 milliseconds is formed by taking 20 milliseconds before and after the boundary point.
[0036] Within the window length transition zone, a transitional framing time plane is generated according to a preset step size. The step size refers to the magnitude of the gradual change in window length. In this embodiment, the step size is 10 milliseconds. That is, within the window length transition zone, starting from the first analysis window length, framing time nodes of 10 milliseconds, 20 milliseconds, 30 milliseconds, and 40 milliseconds are generated sequentially in 10-millisecond steps until approaching the second analysis window length.
[0037] A third analysis window length is allocated to the transition framing time plane. This third analysis window length falls between the first and second analysis window lengths. In this embodiment, the third analysis window length is 30 milliseconds. After determining the third analysis window length, the acoustic signal of the vehicle's driving environment within the window length transition zone is framed using a 30-millisecond intermediate window length; the first time interval is still framed using a 10-millisecond short window; and the second time interval is still framed using a 50-millisecond long window. In other words, the analysis window length changes in the following order on the time axis: 10 milliseconds - 30 milliseconds - 50 milliseconds.
[0038] The beneficial effects of the above technical solution are: before reframing, adjacent window length intervals are identified and a transition zone is set, and step-by-step framing is performed with the intermediate window length to achieve a smooth gradient transition of the analysis window length on the time axis, eliminate feature inconsistency and classification error caused by abrupt changes in window length, and avoid spectral leakage caused by abrupt changes in window length.
[0039] In some embodiments of this application, feature dimensionality reduction is performed on the first acoustic event and the second acoustic event within the target time-frequency segment to generate a target feature set, including: The first acoustic event or the second acoustic event within the target time-frequency segment is identified as the event to be processed, wherein the event to be processed consists of multiple feature sampling points arranged in chronological order.
[0040] In some embodiments of this application, it also includes: If the event to be processed is the first acoustic event, then the first feature compression threshold is configured as the target feature compression threshold; If the event to be processed is the second acoustic event, then the target feature compression threshold is determined based on the second feature compression threshold, wherein the first feature compression threshold is less than the second feature compression threshold; Following the temporal sequence, a traversal window containing three consecutive feature sampling points is established; Calculate the feature deviation distance from the middle feature sampling point in the middle position within the traversal window to the line connecting the feature sampling points on both sides; If the feature deviation distance is less than the target feature compression threshold, the intermediate feature sampling point is deleted, and the next feature sampling point is extracted along the temporal sequence to complete the traversal window, thereby updating the three consecutive feature sampling points calculated in the next iteration. If the feature deviation distance is greater than or equal to the target feature compression threshold, the intermediate feature sampling point is retained, and the traversal window is slid backward along the temporal sequence to update the next three consecutive feature sampling points.
[0041] Specifically, the two types of events have different levels of importance in subsequent classification, therefore different feature compression thresholds are used during dimensionality reduction. Feature sampling points refer to feature vectors extracted from acoustic events in temporal order. For example, if a Mel-spectrum feature vector is extracted every 1 millisecond, a 100-millisecond event contains 100 feature sampling points.
[0042] If the event to be processed is a first acoustic event, then the first feature compression threshold is configured as the target feature compression threshold. In this embodiment, the first feature compression threshold is set to 0.02. If the event to be processed is a second acoustic event, then the target feature compression threshold is determined based on the second feature compression threshold. In this embodiment, the second feature compression threshold is set to 0.1. The first feature compression threshold is less than the second feature compression threshold, ensuring that the first acoustic event retains more details during dimensionality reduction, while the second acoustic event has more redundancy compressed.
[0043] Feature deviation distance refers to the perpendicular distance of an intermediate feature sampling point from the line connecting the first and last points in the feature space. If the feature deviation distance is less than the target feature compression threshold, it indicates that the intermediate point is redundant. This intermediate feature sampling point is deleted, and the next feature sampling point is extracted sequentially and added to the window, maintaining three points in the window for the next calculation. If the feature deviation distance is greater than or equal to the target feature compression threshold, it indicates that the intermediate point is important. This intermediate feature sampling point is retained, and the traversal window is slid one position forward sequentially to update the three consecutive feature sampling points for the next calculation. For example, consider three consecutive feature sampling points A, B, and C for a first acoustic event, where B is the intermediate point. If the feature deviation distance from B to the line connecting A and C is 0.01, which is less than the first feature compression threshold of 0.02, then point B is deleted, and point D is added, continuing the calculation for points A, C, and D. If, in the three consecutive feature sampling points for a second acoustic event, the feature deviation distance of the intermediate point is 0.05, which is less than the second feature compression threshold of 0.1, then the intermediate point is deleted, and the calculation continues with the addition of points. If the deviation distance of the midpoint feature of a certain first acoustic event is 0.05, which is greater than or equal to the first feature compression threshold of 0.02, then the midpoint is retained, and the window is shifted backward. The feature data retained after dimensionality reduction of the first and second acoustic events are merged to generate the target feature set.
[0044] The beneficial effects of the above technical solution are: setting feature compression thresholds differently for different types of acoustic events, while retaining the core change details of the first acoustic event, deleting more redundant feature points for the relatively stable second acoustic event, effectively compressing the overall feature dimension, reducing the computational load of the subsequent sound scene classification model, while ensuring that key acoustic features are not lost, balancing classification accuracy and computational efficiency, and providing data support for real-time sound scene classification.
[0045] In some embodiments of this application, determining the target feature compression threshold based on a second feature compression threshold includes: Calculate the shortest time-frequency Euclidean distance between the second acoustic event within the target time-frequency segment and the nearest first acoustic event; Determine whether the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold; If the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold, the second acoustic event is marked as a transition acoustic event, and based on the shortest time-frequency Euclidean distance, the first feature compression threshold and the second feature compression threshold, a dynamic transition compression threshold corresponding to the transition acoustic event is calculated through a preset interpolation function, and the dynamic transition compression threshold is determined as the target feature compression threshold. If the shortest time-frequency Euclidean distance is greater than or equal to a preset smooth transition threshold, then the second feature compression threshold is determined as the target feature compression threshold.
[0046] Specifically, the second acoustic event typically corresponds to a single acoustic scene floor. However, if its location is close to the first acoustic event, it is often affected by the residual influence of complex acoustic scene intersection areas, impacting subsequent classification accuracy. Therefore, a transitional judgment is added when determining the target feature compression threshold for the second acoustic event. The shortest time-frequency Euclidean distance refers to the minimum Euclidean distance in the time-frequency plane between each feature sampling point of the current second acoustic event and each feature sampling point of the nearest first acoustic event.
[0047] In this embodiment, the preset smooth transition threshold is set to 20 time-frequency units.
[0048] In this embodiment, linear interpolation is used as the interpolation function. The dynamic transition compression threshold is calculated using the following formula: T_d=T2-(T2-T1)×(d÷D); Where T_d is the dynamic transition compression threshold, T2 is the second feature compression threshold, T1 is the first feature compression threshold, d is the shortest time-frequency Euclidean distance, and D is the smooth transition threshold. For example, if T1 is 0.02, T2 is 0.1, D is 20, and d is 8, then T_d is 0.068.
[0049] The beneficial effects of the above technical solution are: to make a transition judgment on the second acoustic event based on the distance from the first acoustic event, and to interpolate and calculate the dynamic transition compression threshold, so that the dimensionality reduction precision changes continuously with the distance of the scene, and the classification boundary accuracy is not lost.
[0050] In some embodiments of this application, generating executable sound scene classification data based on the target feature set includes: Based on the quantity ratio, energy distribution, and complexity parameter distribution of each first acoustic event and each second acoustic event in the target feature set, the sound scene category corresponding to the acoustic signal of the vehicle driving environment is determined; Based on the sound scene category and the time interval corresponding to the acoustic signal of the vehicle driving environment, data for executable sound scene classification is generated.
[0051] Specifically, the target feature set includes the dimensionality-reduced feature sequences of the first and second acoustic events, as well as the acoustic energy proportion and time-frequency structure complexity parameters corresponding to each event. Based on the target feature set, the following information is statistically analyzed: the number of first acoustic events; the number of second acoustic events; the proportion of the number of first acoustic events to the total number of events in both categories; the average energy proportion of the first acoustic events; the average complexity parameter of the first acoustic events; the average energy proportion of the second acoustic events; and the average complexity parameter of the second acoustic events.
[0052] In this embodiment, if the proportion of the number of first acoustic events is greater than or equal to 50%, and the average value of the complexity parameter of the first acoustic events is greater than or equal to 6, then it is determined to be an intersection scene. If the number of first acoustic events accounts for less than 30%, and the average energy percentage of second acoustic events is greater than or equal to 0.4, then it is determined to be a high-speed cruising scenario. If the proportion of the number of first acoustic events is greater than or equal to 30% and less than 50%, and the average complexity parameter of the first acoustic events is greater than or equal to 4 and less than 6, then it is determined to be a tunnel scene. If the number of first acoustic events accounts for less than 20% and the average energy percentage of second acoustic events is less than 0.4, then it is determined to be a parking lot scenario.
[0053] If a scenario does not fall under any of the above rules, it is determined to be a mixed sound scene.
[0054] Based on the sound scene category and the time interval corresponding to the acoustic signals of the vehicle driving environment, data for executable sound scene classification is generated. For example, the data for executable sound scene classification includes: Sound scene category: intersection scene; Time range: 10:23:00—10:23:02.
[0055] The beneficial effect of the above technical solution is that it enables the feature dimensionality reduction results to be converted into executable sound scene classification data, which meets the practical application needs of automotive sound scene classification.
[0056] Based on another preferred embodiment described above, see [link to preferred embodiment]. Figure 2 As shown, this embodiment provides a sound scene classification system based on acoustic features, including: The sequence generation module is used to acquire acoustic signals of the vehicle driving environment, perform frame-segmentation processing on the acoustic signals of the vehicle driving environment, and generate a segment sequence containing multiple initial time-frequency segments. An acoustic processing module is used to extract acoustic event boundaries within each initial time-frequency segment and calculate the acoustic energy ratio and time-frequency structure complexity parameters of each acoustic event boundary. The event segmentation module is used to classify each of the acoustic event boundaries into a first acoustic event representing the intersection area of complex sound scenes and a second acoustic event representing the basis of a single sound scene, based on the acoustic energy ratio and the time-frequency structure complexity parameter. The window length allocation module is used to adaptively allocate a target analysis window length to the time interval where each of the initial time-frequency segments is located, based on the distribution state of the first acoustic events within each of the initial time-frequency segments. The segment update module is used to re-frame the acoustic signal of the vehicle driving environment according to the allocated target analysis window length within each time interval to generate target time-frequency segments; The scene classification module is used to perform feature dimensionality reduction on the first acoustic event and the second acoustic event in the target time-frequency segment and generate a target feature set, and generate data for executable sound scene classification based on the target feature set.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A sound scene classification method based on acoustic features, characterized in that, include: Acquire acoustic signals of the vehicle's driving environment, perform frame-segmentation on the acoustic signals of the vehicle's driving environment, and generate a segment sequence containing multiple initial time-frequency segments; Extract the acoustic event boundaries within each initial time-frequency segment, and calculate the acoustic energy percentage and time-frequency structure complexity parameters of each acoustic event boundary; Based on the acoustic energy ratio and the time-frequency structure complexity parameter, each of the acoustic event boundaries is classified into a first acoustic event representing the intersection region of complex sound scenes and a second acoustic event representing the substrate of a single sound scene. Based on the distribution of the first acoustic events within each initial time-frequency segment, a target analysis window length is adaptively allocated to the time interval where each initial time-frequency segment is located; Within each of the time intervals, the acoustic signal of the vehicle driving environment is reframed according to the allocated target analysis window length to generate target time-frequency segments; The first acoustic event and the second acoustic event within the target time-frequency segment are subjected to feature dimensionality reduction and a target feature set is generated. Based on the target feature set, data for performing sound scene classification is generated.
2. The sound scene classification method based on acoustic features according to claim 1, characterized in that, Extract the acoustic event boundaries within each initial time-frequency segment, and calculate the acoustic energy proportion and time-frequency structure complexity parameters of each acoustic event boundary, including: Calculate the reference energy of the global bounding boundary of the initial time-frequency segment; Traverse each acoustic event boundary within the initial time-frequency segment, calculate the internal actual energy of the acoustic event boundary, and the ratio of the internal actual energy to the reference energy, and determine it as the acoustic energy percentage. The ratio of the square of the boundary length of the acoustic event boundary to the actual internal energy is calculated and determined as the time-frequency structure complexity parameter.
3. The sound scene classification method based on acoustic features according to claim 1, characterized in that, Based on the acoustic energy ratio and the time-frequency structure complexity parameter, each acoustic event boundary is classified into a first acoustic event representing the intersection region of complex sound scenes and a second acoustic event representing the basis of a single sound scene, including: Calculate the sum of the internal actual energies of all acoustic event boundaries within the initial time-frequency segment; Calculate the difference between the reference energy of the global outer boundary of the initial time-frequency segment and the sum of the actual internal energy, and determine the ratio of the difference to the reference energy as the equivalent background sound proportion of the initial time-frequency segment; Based on the equivalent background sound ratio, the energy ratio threshold and complexity threshold are calculated using a preset mapping function; Traverse each of the acoustic event boundaries within the initial time-frequency segment, and determine the currently traversed acoustic event boundary as the boundary to be classified; Obtain the acoustic energy percentage and the time-frequency structure complexity parameter corresponding to the boundary to be classified; If the acoustic energy percentage is greater than or equal to the energy percentage threshold, or the time-frequency structure complexity parameter is greater than or equal to the complexity threshold, then the boundary to be classified is classified as the first acoustic event. If the acoustic energy percentage is less than the energy percentage threshold and the time-frequency structure complexity parameter is less than the complexity threshold, then the boundary to be classified is classified as the second acoustic event.
4. The sound scene classification method based on acoustic features according to claim 1, characterized in that, Based on the distribution of the first acoustic events within each of the initial time-frequency segments, a target analysis window length is adaptively allocated to the time interval containing each of the initial time-frequency segments, including: Determine whether each of the initial time-frequency segments contains the first acoustic event; If the initial time-frequency segment contains the first acoustic event, then the time interval in which the initial time-frequency segment is located is allocated a first analysis window length as the target analysis window length; If the initial time-frequency segment does not contain the first acoustic event, then the second analysis window length is assigned as the target analysis window length for the time interval where the initial time-frequency segment is located; Wherein, the length of the first analysis window is less than the length of the second analysis window.
5. The acoustic scene classification method based on acoustic features according to claim 4, characterized in that, Before reframing the vehicle driving environment acoustic signal according to the allocated target analysis window length within each of the aforementioned time intervals to generate the target time-frequency segment, the method further includes: Identify a first time interval and a second time interval that are adjacent in the time axis direction, wherein the first time interval is allocated with the first analysis window length and the second time interval is allocated with the second analysis window length; The boundary region between the first time interval and the second time interval is defined as the window length transition region; Within the window length transition zone, a transition frame time plane is generated according to a preset step size; A third analysis window length is allocated to the crossover framing time plane, and the acoustic signal of the vehicle driving environment is re-framing. The value of the third analysis window length is between the first analysis window length and the second analysis window length.
6. The sound scene classification method based on acoustic features according to claim 1, characterized in that, The first acoustic event and the second acoustic event within the target time-frequency segment are subjected to feature dimensionality reduction and a target feature set is generated, including: The first acoustic event or the second acoustic event within the target time-frequency segment is identified as the event to be processed, wherein the event to be processed consists of multiple feature sampling points arranged in chronological order.
7. The acoustic scene classification method based on acoustic features according to claim 6, characterized in that, Also includes: If the event to be processed is the first acoustic event, then the first feature compression threshold is configured as the target feature compression threshold; If the event to be processed is the second acoustic event, then the target feature compression threshold is determined based on the second feature compression threshold, wherein the first feature compression threshold is less than the second feature compression threshold; Following the temporal sequence, a traversal window containing three consecutive feature sampling points is established; Calculate the feature deviation distance from the middle feature sampling point in the middle position within the traversal window to the line connecting the feature sampling points on both sides; If the feature deviation distance is less than the target feature compression threshold, the intermediate feature sampling point is deleted, and the next feature sampling point is extracted along the temporal sequence to complete the traversal window, thereby updating the three consecutive feature sampling points calculated in the next iteration. If the feature deviation distance is greater than or equal to the target feature compression threshold, the intermediate feature sampling point is retained, and the traversal window is slid backward along the temporal sequence to update the next three consecutive feature sampling points.
8. The sound scene classification method based on acoustic features according to claim 7, characterized in that, Determining the target feature compression threshold based on the second feature compression threshold includes: Calculate the shortest time-frequency Euclidean distance between the second acoustic event within the target time-frequency segment and the nearest first acoustic event; Determine whether the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold; If the shortest time-frequency Euclidean distance is less than a preset smooth transition threshold, the second acoustic event is marked as a transition acoustic event, and based on the shortest time-frequency Euclidean distance, the first feature compression threshold and the second feature compression threshold, a dynamic transition compression threshold corresponding to the transition acoustic event is calculated through a preset interpolation function, and the dynamic transition compression threshold is determined as the target feature compression threshold. If the shortest time-frequency Euclidean distance is greater than or equal to a preset smooth transition threshold, then the second feature compression threshold is determined as the target feature compression threshold.
9. The sound scene classification method based on acoustic features according to claim 1, characterized in that, Data for generating executable sound scene classification based on the target feature set includes: Based on the quantity ratio, energy distribution, and complexity parameter distribution of each first acoustic event and each second acoustic event in the target feature set, the sound scene category corresponding to the acoustic signal of the vehicle driving environment is determined; Based on the sound scene category and the time interval corresponding to the acoustic signal of the vehicle driving environment, data for executable sound scene classification is generated.
10. A sound scene classification system based on acoustic features, applied to the sound scene classification method based on acoustic features as described in any one of claims 1-9, characterized in that, include: The sequence generation module is used to acquire acoustic signals of the vehicle driving environment, perform frame-segmentation processing on the acoustic signals of the vehicle driving environment, and generate a segment sequence containing multiple initial time-frequency segments. An acoustic processing module is used to extract acoustic event boundaries within each initial time-frequency segment and calculate the acoustic energy ratio and time-frequency structure complexity parameters of each acoustic event boundary. The event segmentation module is used to classify each of the acoustic event boundaries into a first acoustic event representing the intersection area of complex sound scenes and a second acoustic event representing the basis of a single sound scene, based on the acoustic energy ratio and the time-frequency structure complexity parameter. The window length allocation module is used to adaptively allocate a target analysis window length to the time interval where each of the initial time-frequency segments is located, based on the distribution state of the first acoustic events within each of the initial time-frequency segments. The segment update module is used to re-frame the acoustic signal of the vehicle driving environment according to the allocated target analysis window length within each time interval to generate target time-frequency segments; The scene classification module is used to perform feature dimensionality reduction on the first acoustic event and the second acoustic event in the target time-frequency segment and generate a target feature set, and generate data for executable sound scene classification based on the target feature set.