A hearing aid earplug leakage sound ultrasonic feature diagnosis method based on intelligent sensor
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]因此,本发明提供了一种基于智能传感器的助听器耳塞漏音超声特征诊断方法解决易产生误判漏判和检测效率低下的问题
[0016]本发明有益效果为:通过构建的损耗声学模型,进行数据配准和最小二乘拟合量化评估,实现了对泄漏量的精准反演,提升了诊断的准确性,从而有效克服了因特征提取不充分而导致的误判与漏判问题。采用SVM算法进行缺陷分类,并依据预设规则生成密封性测试指令,实现了从诊断到执行的闭环控制,同时通过驱动超声探头执行逐点扫描与动态聚焦,实现了自适应声场扫描,从而避免了全域无差别扫描带来的资源浪费,提升了检测效率。
Smart Images

Figure CN121645117B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-destructive testing technology, and in particular to a method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors. Background Technology
[0002] Hearing aids are electronic amplification devices used to help people with hearing loss improve their hearing ability. The seal between the earpiece and the ear canal, i.e., earpiece leakage, directly affects the sound transmission efficiency of the hearing aid. Traditional ultrasound diagnosis of earpiece leakage relies heavily on subjective auscultation or simple airtightness tests. In recent years, non-invasive, non-destructive testing methods have been adopted for the ultrasound diagnosis of earpiece leakage due to their advantages such as high resolution, strong penetration, and sensitivity to minute structural changes, thus improving the objectivity and accuracy of the tests to some extent.
[0003] Current ultrasound diagnostic methods for earplug leakage suffer from two main shortcomings: First, traditional ultrasound testing is often limited to single-dimensional time delay analysis, failing to fully integrate phase information and frequency domain features. This limits the ability to identify weak leakage signals, especially when dealing with earplugs with complex geometries, leading to frequent misdiagnosis and missed diagnosis. Second, existing diagnostic procedures lack closed-loop feedback mechanisms and adaptive testing strategies. The testing process is often a static, one-off operation, unable to dynamically adjust the scanning path based on the test results, resulting in low testing efficiency. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors, which solves the problems of easy misjudgment and missed judgment and low detection efficiency.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for diagnosing sound leakage in hearing aid earplugs using ultrasonic features based on intelligent sensors, which includes: collecting initial state data of the hearing aid, performing signal modulation and parameter calibration, and obtaining an earplug configuration and control list; According to the earplug configuration and control list, ultrasonic detection signals are emitted to the hearing aid earplugs, echo time-domain data is collected simultaneously, and fast Fourier transform is performed to generate amplitude-phase frequency response curves; envelope detection method is used to coarsely extract features from the amplitude-phase frequency response curves to form acoustic impedance anomaly spectrum features. The acoustic impedance anomaly spectrum features are input into the loss acoustic model. The feature fusion layer performs data registration and feature enhancement, the parameter inversion layer performs quantitative assessment of leakage, and the ultrasonic features of leakage sound are output. The ultrasonic features of sound leakage are used for pattern recognition and command mapping to generate a sealing test command. Based on the sealing test command, an ultrasonic probe is used to perform a sound field scan on the hearing aid earpiece, and sound pressure feedback data is collected and integrated to form a final diagnostic report.
[0007] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the step of obtaining the earplug configuration and control list specifically includes the following steps. The initial state data is converted from digital to analog, and an FIR filter is used for signal smoothing and noise suppression to form a modulated digital signal. Based on the target frequency response curve, the parameters of the modulated digital signal are calibrated to generate an earphone configuration and control list.
[0008] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the acquisition of echo time-domain data specifically includes the following steps. The ultrasonic transmission parameters are initialized according to the earpiece configuration and control list, and pulse code modulation and transmission power calibration are performed by the DSP digital signal processor to generate an ultrasonic pulse sequence. Based on ultrasonic pulse sequences, a piezoelectric ultrasonic transducer is used to emit ultrasonic detection signals to the hearing aid earpiece, and a MEMS microphone array is used to collect echo time-domain data.
[0009] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the generation of amplitude-phase frequency response curves specifically refers to using the Hanning window function to window the echo time-domain data to generate a windowed time-domain signal, and performing a fast Fourier transform on the windowed time-domain signal to form the amplitude-phase frequency response curves.
[0010] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the step of forming abnormal acoustic impedance spectrum features specifically includes the following steps. The envelope spectrum of the signal is obtained by performing Hilbert transform and low-pass filtering on the amplitude-phase frequency response curve using the envelope detection method. The spectral features of the signal envelope spectrum are extracted, and anomaly detection is performed to form acoustic impedance anomaly spectrum features.
[0011] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the loss acoustic model is specifically constructed as follows: A feature fusion layer is built using bidirectional gated recurrent units, and a parameter inversion layer is built using a fully connected network. Residual connections and layer stacking are performed on the feature fusion layer and parameter inversion layer to construct a loss acoustic model.
[0012] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplugs based on intelligent sensors according to the present invention, the output of the ultrasonic feature of the leakage sound specifically includes the following steps. The acoustic impedance anomaly spectrum features are input into the loss acoustic model, and the feature fusion layer performs data registration and feature enhancement through a weighted interpolation algorithm to generate a fused acoustic impedance vector. The parameter inversion layer uses least squares fitting to quantify the leakage of the fused acoustic impedance vector and form a preliminary leakage criterion. A time-frequency joint analysis was performed on the preliminary leakage criteria to output the ultrasonic characteristics of the leakage sound.
[0013] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the step of generating a sealing test command specifically includes the following steps. The SVM vector machine algorithm is used to classify the features of leaking ultrasound and form a defect type pattern. According to the preset parameter matching rules, the sealing adjustment parameters are matched for the defect type pattern, and the instruction is encoded to generate the sealing test instruction.
[0014] As a preferred embodiment of the ultrasonic feature diagnosis method for sound leakage in hearing aid earplugs based on intelligent sensors described in this invention, the acquisition of sound pressure feedback data specifically refers to driving an ultrasonic probe to perform point-by-point sound field scanning and dynamic focusing on the hearing aid earplug according to a sealing test command, while simultaneously using an acoustic sensor array to acquire sound pressure feedback data.
[0015] As a preferred embodiment of the ultrasonic feature diagnosis method for hearing aid earplug leakage based on intelligent sensors described in this invention, the step of forming a final diagnostic report specifically includes the following steps: performing multi-dimensional feature analysis on sound pressure feedback data to form structured diagnostic data, and performing dynamic rendering to generate a final diagnostic report.
[0016] The beneficial effects of this invention are as follows: By constructing a lossy acoustic model, data registration and least-squares fitting quantification evaluation are performed, achieving accurate inversion of leakage amount and improving diagnostic accuracy, thereby effectively overcoming the problems of misjudgment and missed judgment caused by insufficient feature extraction. The SVM algorithm is used for defect classification, and sealing test instructions are generated according to preset rules, realizing closed-loop control from diagnosis to execution. Simultaneously, by driving the ultrasonic probe to perform point-by-point scanning and dynamic focusing, adaptive acoustic field scanning is achieved, thus avoiding the resource waste caused by indiscriminate scanning across the entire domain and improving detection efficiency. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a method for diagnosing sound leakage in hearing aid earplugs based on intelligent sensors using ultrasound features.
[0019] Figure 2 This is a flowchart of ultrasonic detection signal generation and data acquisition.
[0020] Figure 3 The flowchart for generating acoustic impedance anomaly spectrum features.
[0021] Figure 4 This is a flowchart for the ultrasound characteristic diagnosis of leaky sound. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for diagnosing sound leakage in hearing aid earplugs based on intelligent sensors using ultrasonic features, comprising the following steps: S1. Collect the initial state data of the hearing aid, perform signal modulation and parameter calibration, and obtain the earpiece configuration and control list.
[0026] S1.1 Collect initial state data of the hearing aid.
[0027] Initial state data includes the user's hearing range, ear canal geometry, ambient background noise, and earplug physical configuration information; The user's hearing range is acquired using a clinical audiometer, the ear canal geometry is acquired using an ear canal optical scanner, ambient background noise is acquired using the MEMS microphone built into the hearing aid, and the physical configuration information of the earpiece is read through a device identification register interface (such as an I²C communication interface).
[0028] S1.2. Perform digital-to-analog conversion on the initial state data, and use an FIR filter to smooth the signal and suppress noise to form a modulated digital signal.
[0029] The initial state data is sampled at equal time intervals using an ADC (Analog-to-Digital Converter) at a fixed sampling rate (determined based on the effective frequency components of the initial state data, e.g., 40 kHz) to obtain a discrete-time voltage sequence. According to codeword allocation rules, the discrete-time voltage sequence is binary encoded, converting it from the analog domain to the digital domain to generate discrete digital codes. The discrete digital codes are then reassembled and buffered using a data buffer to form the original discrete signal. It should be noted that the codeword allocation rule is defined based on the quantization level correspondence of historical discrete-time voltage sequences.
[0030] The original discrete signal is convolutionally filtered using an FIR filter to generate a filtered signal sequence. This filtered signal sequence is then subjected to an exponential moving average to smooth the waveform and obtain a preliminary smoothed signal. The preliminary smoothed signal is then decomposed using the Daubechies wavelet basis function to generate frequency detail coefficients. High-frequency detail coefficients are then removed, thereby improving the signal-to-noise ratio and outputting a modulated digital signal. This modulated digital signal eliminates noise interference introduced during acquisition and retains frequency components reflecting the essential characteristics of the initial state, providing a high-quality, highly reliable data foundation for subsequent steps.
[0031] S1.3. Based on the target frequency response curve, calibrate the parameters of the modulated digital signal and generate an earphone configuration and control list.
[0032] The target frequency response curve is defined based on the acoustic compensation needs of the user's hearing range, representing the frequency response that the hearing aid should have when achieving the ideal compensation effect in the user's ear canal.
[0033] The target frequency response curve is segmented and normalized using a frequency band analyzer to obtain the target frequency band gain. At the same time, the modulated digital signal is frequency domain converted by fast Fourier transform to obtain the actual frequency response gain. The target frequency band gain and the actual frequency response gain are compared point by point to obtain the gain difference of each frequency band.
[0034] The modulated digital signal is calibrated. Further, based on the gain difference across frequency bands, gain compensation and nonlinear compression are applied to the modulated digital signal to generate a preliminary correction signal. The frequency response characteristics of the preliminary correction signal are extracted and projected into the parameter space to obtain an optimized parameter subspace. Boundary constraints are applied to the optimized parameter subspace to obtain calibrated acoustic parameters, including gain compensation values, compression ratios, and maximum output limits. The calibrated acoustic parameters and earpiece physical configuration information are fused and encapsulated in XML format to generate a structured configuration file, namely the earpiece configuration and control list. This earpiece configuration and control list serves as the core control parameters for hearing aid operation, providing a precise parameter benchmark for subsequent acoustic testing and personalized fitting. It should be noted that parameter space projection refers to the process of dimensionality reduction and feature reconstruction of frequency response features through principal component analysis; boundary constraint processing refers to the process of truncating the parameter range and verifying the effectiveness of the optimized parameter subspace according to the hearing aid hardware performance specifications (read through the device register interface).
[0035] S2. According to the earplug configuration and control list, emit ultrasonic detection signals to the hearing aid earplugs, simultaneously collect echo time-domain data, and perform fast Fourier transform to generate amplitude-phase frequency response curves; use envelope detection method to coarsely extract features from the amplitude-phase frequency response curves to form acoustic impedance anomaly spectrum features.
[0036] S2.1 Initialize the ultrasonic transmission parameters according to the earplug configuration and control list, and generate an ultrasonic pulse sequence by performing pulse code modulation and transmission power calibration through the DSP digital signal processor.
[0037] The calibrated acoustic parameters in the earphone configuration and control list are extracted as initialization reference values and stored in the configuration cache of the DSP digital signal processor. The DSP digital signal processor loads the initialization reference values into the timer period register, performs address mapping and parameter latching, completes the initialization, and obtains the initialized ultrasonic emission parameters.
[0038] Pulse code modulation is performed on the initialized ultrasonic transmission parameters. Furthermore, the SPToolbox component of MATLAB software is used to synthesize digital waveforms of the initialized ultrasonic transmission parameters to generate a baseband digital signal sequence. The baseband digital signal sequence represents the ultrasonic pulse envelope and phase information and has accurate time-frequency characteristics. According to the pulse coding rules, the baseband digital signal sequence is grouped and coded and the phase transition is optimized to achieve code pattern mapping, ensuring the accuracy of the coding format and obtaining a standard coded pulse sequence. It should be noted that the SP Toolbox component achieves digital waveform synthesis by constructing time-domain waveforms and shaping frequency-domain characteristics of the initialized ultrasonic transmission parameters; the pulse coding rules are defined based on the differential phase shift keying (DPSK) protocol.
[0039] The DSP digital signal processor monitors the transmission channel power of the standard coded pulse sequence in real time, and adjusts the transmission signal amplitude of the standard coded pulse sequence through a digital potentiometer according to the transmission channel power to generate a calibrated pulse sequence. The calibrated pulse sequence is then transmitted to the ADC digital-to-analog converter through a high-speed serial interface (such as LVDS) for signal reconstruction to generate an ultrasonic pulse sequence. It should be noted that signal reconstruction refers to the process of analog recovery and harmonic suppression of the calibrated pulse sequence through a sample-and-hold circuit and a low-pass filter.
[0040] Advantageously, compared to existing transmitting circuits based on fixed-gain amplifiers, this invention, through a feedback control mechanism of pulse code modulation and transmit power calibration, can not only adapt to different earplug acoustic characteristics, but also significantly improve the signal-to-noise ratio of the transmitted signal, ensuring that the ultrasonic pulse sequence can accurately reflect the earplug configuration requirements, and has the advantages of high precision and strong adaptability.
[0041] S2.2 Based on the ultrasonic pulse sequence, a piezoelectric ultrasonic transducer is used to emit ultrasonic detection signals to the hearing aid earpiece, and a MEMS microphone array is used to collect the echo time domain data.
[0042] An ultrasonic pulse sequence is input into a high-voltage power amplifier for voltage amplification to generate a high-voltage electrical signal. The high-voltage electrical signal is applied to the piezoelectric crystal of the piezoelectric ultrasonic transducer and converted into mechanical vibration through the inverse piezoelectric effect, thereby transmitting an ultrasonic detection signal into the closed space formed by the hearing aid earplug and the ear canal. It should be noted that the inverse piezoelectric effect is a physical phenomenon in which a piezoelectric material undergoes mechanical deformation under the action of an alternating electric field, realizing the conversion of electrical energy into sound energy.
[0043] Simultaneously with transmitting ultrasonic detection signals, the MEMS microphone array is activated to enter receiving mode. When the transmitted ultrasonic detection signals propagate in the ear canal and encounter changes in acoustic impedance (such as the gap between the earplug and the ear canal wall, physiological structures within the ear canal, etc.), part of the ultrasonic detection signals will be reflected, forming echo signals. After the echo signals are captured by the MEMS microphone array, they are bandwidth limited and synchronously sampled through a built-in anti-aliasing filter to generate echo time-domain data. It should be noted that the anti-aliasing filter achieves frequency band limitation by cutting off the frequency of the echo signal and attenuating it in the stopband.
[0044] S2.3. Use the Hanning window function to window the echo time-domain data to generate a windowed time-domain signal, and perform a fast Fourier transform on the windowed time-domain signal to form the amplitude and phase frequency response curve.
[0045] The Hanning window function and the echo time-domain data are multiplied point-by-point to generate a window function modulated signal. A moving average filter is then applied to smooth the boundaries of the window function modulated signal to eliminate spectral energy diffusion and obtain a weighted time-domain segment. The weighted time-domain segment is then aligned with the time axis and zero-filled to ensure consistent time-domain resolution, resulting in a windowed time-domain signal. The Hanning window function can effectively reduce the data boundary discontinuity caused by signal truncation, thereby significantly reducing spectral leakage. It should be noted that zero-padding expansion refers to the process of adding zero values to the tail of a weighted time-domain segment and extending the sequence length.
[0046] A Fast Fourier Transform is performed on the windowed time-domain signal. Further, a butterfly arithmetic processor is used to perform a frequency domain transformation on the windowed time-domain signal to generate initial frequency domain data. Complex decomposition is then performed on the initial frequency domain data to form a complex spectral representation. The Hilbert function from the SciPy library is used to extract the amplitude parameters of the complex spectral representation, and polynomial curve fitting is performed to obtain the amplitude distribution sequence. Simultaneously, the phase angle of the complex spectral representation is de-wound to generate a continuous phase sequence. It should be noted that the shape operation processor is a parallel computing unit of the Cooley-Tukey algorithm, which realizes frequency domain transformation through divide-and-conquer strategy and complex multiplication accumulation; polynomial curve fitting refers to the process of approximating the amplitude parameter with curves and optimizing the residuals using the least squares method; phase angle dewinding refers to the process of correcting phase jumps and restoring linear phases in the complex spectrum representation through phase continuity detection.
[0047] Affine transformation is used to unify the amplitude distribution sequence and the continuous phase sequence into a single coordinate system, generating joint frequency response data. Cubic spline interpolation is then performed on the joint frequency response data to fill in missing frequency points and generate optimized frequency response data. An orthogonal frequency division multiplexing encoder is used to encode the optimized frequency response data in two channels to obtain the amplitude-phase signal stream. A Bezier curve fitting algorithm is then used to smoothly connect the amplitude-phase signal stream to construct the amplitude-phase frequency response curve. The amplitude-phase frequency response curve not only accurately contains the frequency characteristics of the signal but also retains complete phase information, providing an accurate frequency domain analysis basis for subsequent acoustic impedance anomaly feature extraction. It should be noted that the orthogonal frequency division multiplexing encoder achieves dual-channel encoding by performing subcarrier modulation and cyclic prefix insertion on the optimized frequency response data; the Bezier curve fitting algorithm is a parametric curve generation method that achieves smooth connection by optimizing the control point location and tangent direction of the amplitude and phase signal streams.
[0048] S2.4. Using the envelope detection method, perform Hilbert transform and low-pass filtering on the amplitude and phase frequency response curves to obtain the signal envelope spectrum; extract the spectral features of the signal envelope spectrum and perform anomaly detection to form acoustic impedance anomaly spectrum features.
[0049] The baseband signal is reconstructed from the amplitude-phase frequency response curve using the envelope detection method, eliminating the carrier frequency of the amplitude-phase frequency response curve while retaining the modulation information, and generating a baseband time-domain waveform. The baseband time-domain waveform is then orthogonally synthesized using Hilbert transform to obtain instantaneous phase-amplitude pairs, and polar coordinate transformation is performed on these pairs to generate the instantaneous envelope of the signal. To eliminate high-frequency noise in the instantaneous envelope and highlight the main envelope contour trend, a low-pass filter is applied to smooth the instantaneous envelope, yielding the signal envelope spectrum. It should be noted that the envelope detection method reconstructs the baseband signal by performing frequency downconversion and complex exponential demodulation on the amplitude-phase frequency response curve; the Hilbert transform achieves quadrature component synthesis by performing orthogonal phase shift and imaginary part construction on the baseband time-domain waveform.
[0050] The signal envelope spectrum is input into a sliding window and traversed to statistically analyze the fluctuation frequency characteristics of the signal envelope spectrum (such as the frequency of the formant peaks, the centroid of the spectrum, and the roll-off point of the spectrum). The fluctuation frequency characteristics are then embedded in a dimension-reducing autoencoder to generate spectral features. The spectral features characterize the acoustic impedance state and can capture local acoustic changes caused by minute leaks. It should be noted that the dimensionality reduction embedding of the fluctuation frequency features using an autoencoder is specifically performed as follows: the fluctuation frequency features are forward propagated to generate a latent space representation, and the latent space representation is reconstructed by a decoder to obtain the spectral features.
[0051] Unsupervised anomaly detection algorithms (such as Isolation Forest) are used to quantify the anomaly degree of spectral features: Bootstrap sampling is used to randomly sample a subset of spectral features to generate multiple sets of training samples, and anomaly scores for multiple sets of training samples are calculated. The specific mathematical formula is as follows. ; in, This represents the index of multiple training samples. Indicates the first Anomaly scores for each training sample Indicates the first The path length value of each training sample. This represents the mean of the path length values. This represents the sum of multiple training samples. Represents the sum of multiple training samples The standardized harmonic coefficient; It should be noted that the path length value is obtained by performing recursive spatial segmentation and node depth statistics on the training samples; the standardized harmonic coefficient is used to eliminate the influence of the training sample size on the path length, and is defined based on the asymptotic distribution characteristics of the mean of the path length value, with an exemplary value range of [2.0, 8.0].
[0052] Based on the anomaly score, the spectral features are spatially clustered using a spectral clustering algorithm to obtain anomaly feature subsets. Then, based on the frequency domain proximity rule, feature-frequency correlation mapping is performed on the anomaly feature subsets to form acoustic impedance anomaly spectral features. It should be noted that the spectral clustering algorithm achieves spatial clustering by modeling neighborhood relationships and embedding low-dimensional manifolds into spectral features; the frequency domain proximity rule is based on the spatial distribution features of historical anomalous feature subsets, and achieves feature-frequency correlation mapping by aligning the spatial positions of anomalous feature subsets and interpolating probability densities. Compared to existing fixed threshold envelope detection and static spectrum analysis techniques, this invention significantly improves the detection sensitivity of minute acoustic impedance anomalies in strong noise environments through baseband signal reconstruction and unsupervised anomaly detection, and has the advantage of low false alarm rate.
[0053] S3. Input the acoustic impedance anomaly spectrum features into the loss acoustic model, perform data registration and feature enhancement in the feature fusion layer, perform quantitative assessment of leakage in the parameter inversion layer, and output the leakage sound ultrasonic features.
[0054] S3.1 Construct and train a lossy acoustic model.
[0055] In the PyTorch framework, the bidirectional gated recurrent unit is called through the nn.GRU function and initialized. For example, the number of network layers is set to 3, batch priority is set to True, dropout rate is set to 0.2, and a LayerNorm layer is connected after the bidirectional gated recurrent unit to normalize gradients and stabilize gradient propagation, thus completing the construction of the bidirectional gated recurrent unit. Use the nn.Linear function to call the fully connected network and initialize it. For example, set the output dimension to 64, the bias term to False, and the activation function to ReLU. Then, add a Dropout layer after the fully connected network for regularization to prevent overfitting. At the same time, use batch normalization to optimize the feature distribution and enhance the feature representation ability, thus completing the construction of the parameter inversion layer. The `torch.add` function is used to perform residual connections between the feature fusion layer and the parameter inversion layer to obtain cross-layer feature representations. These cross-layer feature representations are then concatenated to generate enhanced feature vectors. Global average pooling is used to compress the spatial dimension of the enhanced feature vectors to obtain contextual feature representations. The `Softmax` function is used to normalize the contextual feature representations to generate attention weights. Based on these attention weights, the feature fusion layer and the parameter inversion layer are stacked hierarchically to complete the construction of the lossy acoustic model. Next, the loss acoustic model is trained. Further, the historical acoustic impedance anomaly spectrum features are divided into a sample set, a training set, and a validation set. On the sample set, Min-Max normalization is used for data standardization, and data is loaded in batches using a DataLoader to form standard training batches. On the training set, the Adam optimizer is used to perform gradient backpropagation on the standard training batches, with a gradient pruning function applied simultaneously for amplitude limiting to obtain updated loss acoustic model parameters. On the validation set, the cross-entropy loss function is used to quantize the updated loss acoustic model parameters to obtain the validation loss. When the validation loss exceeds the convergence threshold for several consecutive rounds (e.g., 5 rounds, the specific value based on the hyperparameter definition of the early stopping mechanism), training terminates, and the trained loss acoustic model is output synchronously. It should be noted that the convergence threshold is defined based on the relative error change rate of the validation loss. For example, the validation loss is input into a sliding window and differentially compared to obtain the relative error change rate. The relative error change rate is used as the convergence criterion, and exponential weighted smoothing is performed to generate the convergence threshold. An exemplary value range is 0.001-0.005. Preferably, the loss acoustic model constructed in this invention, through the combination of bidirectional gated recurrent units and fully connected networks, can capture the long-term dependence characteristics of acoustic impedance anomaly spectrum in the frequency dimension compared to the traditional method of simply using convolutional neural networks. In particular, by combining residual connections and layer stacking, the gradient vanishing problem in deep network training is solved, enabling the loss acoustic model to learn more representative feature representations, thereby improving the inversion accuracy and recall rate of small leakage features.
[0056] S3.2 The feature fusion layer performs data registration and feature enhancement through a weighted interpolation algorithm to generate a fused acoustic impedance vector.
[0057] The acoustic impedance anomaly spectrum features are input into the loss acoustic model via the Input interface. The feature fusion layer uses dynamic time warping to align the acoustic impedance anomaly spectrum features in time, resulting in a warped feature sequence. Cubic spline interpolation is then performed on the warped feature sequence to eliminate sampling rate differences and fill in missing data, generating a registration feature sequence. The registration feature sequence is then subjected to feature selection and nonlinear transformation using the GLU activation function to form an enhanced feature representation.
[0058] A bidirectional gated recurrent unit is applied to extract contextual features from the enhanced feature representation: the forward gated recurrent unit performs forward temporal scanning and hidden state updates on the enhanced feature representation to obtain the forward hidden state sequence; the backward gated recurrent unit performs reverse temporal scanning and state backtracking on the enhanced feature representation to obtain the backward hidden state sequence; a fully connected layer is used to linearly project the forward hidden state sequence and the backward hidden state sequence to obtain bidirectional contextual features; It should be noted that reverse temporal scanning refers to the process of performing reverse sequence traversal and temporal dependency modeling on the enhanced feature representation; state backtracking refers to the process of restoring historical states and performing backward gradient propagation on the enhanced feature representation.
[0059] Acoustic impedance anomaly spectrum features are used as the key vector of the attention mechanism, and bidirectional context features are used as the query vector. The key vector and query vector are scaled by dot product and normalized by the Softmax function to obtain the feature association weights. Based on the feature association weights, the acoustic impedance anomaly spectrum features and bidirectional context features are residually connected and gradient normalized by the LayerNorm layer to stabilize the numerical distribution and generate a fused acoustic impedance vector.
[0060] S3.3 The parameter inversion layer uses least squares fitting to quantify the leakage of the fused acoustic impedance vector and form a preliminary leakage criterion.
[0061] The fused acoustic impedance vector is mapped to a high-dimensional feature space through a fully connected network: the GELU function is applied to perform nonlinear mapping on the fused acoustic impedance vector to generate a primary feature representation, and layer normalization is used to perform distribution standardization and feature scaling on the primary feature representation to form a high-dimensional feature tensor.
[0062] Least squares fitting is used to perform linear regression on the high-dimensional feature tensor, resulting in multiple weight coefficient matrices. The mean squared error loss function is then used to calculate the error of these weight coefficient matrices, and gradient descent is employed for iterative updates to generate leakage probability values. The specific mathematical formula is as follows. ; in, This represents the probability value of leakage. This represents the Sigmoid activation function. This represents the second weight coefficient matrix. This represents the matrix transpose operation. This represents the hyperbolic tangent activation function. Represents the first weight coefficient matrix , Represents a high-dimensional feature tensor. Indicates the first bias term. Indicates the second bias term; It should be noted that the bias term is used for the baseline of the linear regression fit, and its specific value is based on the feature contribution of the weight coefficient matrix.
[0063] The leakage probability value is nonlinearly transformed using the Sigmoid function, and hole filling and edge smoothing are performed using morphological closing operations to eliminate isolated noise points and connect adjacent leakage regions, generating a connected leakage probability map. Multi-scale leakage region features are extracted from the connected leakage probability map using pyramid pooling, and One-Hot encoding is used to classify the multi-scale leakage region features, encoding them as preliminary leakage criteria. The preliminary leakage criteria not only include the basis for judging the leakage state, but also provide reliability measurement information of the judgment result. It should be noted that pyramid pooling is a multi-resolution feature extraction method that extracts features of leaky regions at multiple scales by dividing and aggregating features in a connected leakage probability map; category encoding refers to the process of discretizing and expanding the dimensions of features of leaky regions at multiple scales through One-Hot encoding.
[0064] S3.4 Perform time-frequency joint analysis on the preliminary leakage criteria and output the ultrasonic characteristics of the leakage sound.
[0065] A short-time Fourier transform is used to perform time-frequency conversion on the preliminary leakage criterion, generating a time-frequency distribution matrix. A peak detection algorithm is used to track the formant peaks of the time-frequency distribution matrix to obtain the frequency domain energy distribution. Mode decomposition is then performed on the frequency domain energy distribution to extract spectral envelope features. The time-domain signal is reconstructed from the time-frequency distribution matrix to obtain a pulse waveform, and transient characteristics are captured to extract pulse time features. Wavelet transform is used to perform multi-resolution decomposition on the time-frequency distribution matrix to extract energy distribution features. It should be noted that mode decomposition refers to the process of separating components and selecting features of frequency domain energy distribution through intrinsic mode functions; time domain signal reconstruction refers to the process of phase recovery and amplitude reconstruction of time-frequency distribution matrix using the overlapping addition method.
[0066] Principal component analysis was used to perform feature dimensionality reduction and eigenvalue decomposition on spectral envelope features, pulse time features, and energy distribution features, and the top U eigenvalues were extracted as principal component vectors. The principal component vectors were then scaled by Z-score standardization to form the leaky ultrasound features.
[0067] S4. Perform pattern recognition and command mapping on the leakage ultrasound features to generate a sealing test command; according to the sealing test command, use an ultrasound probe to perform a sound field scan on the hearing aid earpiece, simultaneously collect sound pressure feedback data, integrate the data, and form a final diagnostic report.
[0068] S4.1. Defect classification is performed on the ultrasonic leakage features using the SVM vector machine algorithm to form a defect type pattern.
[0069] The SVM (Short Dimension Vector Machine) algorithm is used to optimize the hyperplane of the leaking ultrasound features to obtain the optimal segmentation parameters. Boundary constraints are then applied to these parameters to obtain a set of support vectors. A nonlinear transformation is performed on the support vector set through feature space mapping to generate a high-dimensional space vector. The inner product of these high-dimensional space vectors is then performed to obtain the decision function value. The decision function values are then compared by margin to obtain the classification symbol output. Based on the maximum margin principle, the classification symbol output is used to determine the category, forming the defect type. Finally, the defect types are weighted by confidence level to generate specific defect type patterns (such as cracks, holes, corrosion, etc.). It should be noted that hyperplane optimization refers to the process of using the SVM vector machine algorithm to perform gradient descent iteration and parameter update on the leaky ultrasound features; boundary constraints refer to the process of truncating the range of the optimal segmentation parameters and verifying their feasibility according to the KKT condition rules (Karush-Kuhn-Tucker conditions); radial basis functions achieve margin comparison by applying exponential decay weighting and similarity mapping to the decision function values; the maximum margin principle is based on the definition of maximizing the geometric margin of the decision function values, and achieves category determination by searching the discriminant boundary and ranking the confidence of the classification symbol output.
[0070] S4.2. According to the preset parameter matching rules, match the sealing adjustment parameters for the leakage ultrasonic characteristics, and encode the instructions to generate a sealing test instruction.
[0071] A sealing parameter knowledge base is constructed based on the acoustic physical characteristics of hearing aid earplugs, and the parameters of the sealing parameter knowledge base are normalized to obtain parameter matching rules. The similarity of the leakage ultrasonic features with the benchmark parameter features in the parameter matching rules is compared to obtain an initial matching degree matrix. Based on the initial matching degree matrix, the K-nearest neighbor algorithm is used to perform nearest neighbor search to obtain a set of candidate parameters. A fuzzy logic controller is used to perform membership inference on the candidate parameter set to obtain the matching sealing adjustment parameters. It should be noted that the fuzzy logic controller achieves membership inference by performing fuzzification and defuzzification decisions on the candidate parameter set.
[0072] According to the Modbus-RTU protocol, the sealing adjustment parameters are encapsulated and a check code is added. The sealing adjustment parameters are converted into a command frame, and the integrity of the command frame is constrained by CRC check to form a sealing test command. It should be noted that CRC check achieves integrity constraints by performing polynomial division and remainder comparison on the instruction frame.
[0073] S4.3. According to the sealing test command, drive the ultrasonic probe to perform point-by-point sound field scanning and dynamic focusing on the hearing aid earpiece, and at the same time use the acoustic sensor array to collect sound pressure feedback data.
[0074] The sealing test command is input into the three-axis linkage stepper motor, which drives the ultrasonic probe to perform planar trajectory positioning and depth axial adjustment to obtain a synchronous trigger signal. The synchronous trigger signal is used to start the ultrasonic transmission circuit, which excites the ultrasonic probe to generate ultrasonic waves and performs sound field scanning point by point. At the same time, the phase delay controller of the ultrasonic probe is used to perform beam emission and focus calibration to achieve dynamic focusing. Meanwhile, an acoustic sensor array is constructed using piezoelectric sensors, microphone matrix and impedance detection unit to collect sound pressure amplitude, spectral characteristics and acoustic impedance changes, and package and integrate them into sound pressure feedback data.
[0075] S4.4 Perform multi-dimensional feature analysis on the sound pressure feedback data to form structured diagnostic data; dynamically render the structured diagnostic data to generate the final diagnostic report.
[0076] Empirical mode decomposition was used to extract features from the sound pressure feedback data to generate multi-scale feature components. Tensor reshaping was used to perform feature splicing on the multi-scale feature components. At the same time, principal component analysis was used to compress the dimensions to form structured diagnostic data. It should be noted that empirical mode decomposition is a signal decomposition method that extracts features by locating extreme points and fitting envelopes to sound pressure feedback data.
[0077] The structured diagnostic data is interpolated in three-dimensional space using the WebGL rendering engine, and contour mapping and gradient shading are performed using the Canvas drawing API to achieve dynamic rendering and obtain a multimodal diagnostic view. Finally, the PDFKit tool of the WebGL rendering engine is used to lay out the multimodal diagnostic view to obtain the final diagnostic report. It should be noted that the WebGL rendering engine is a web-based graphics library that performs 3D spatial interpolation by transforming vertex coordinates and interpolating fragments from structured diagnostic data.
[0078] In summary, this invention achieves accurate leakage inversion through the construction of a lossy acoustic model, data registration, and least-squares fitting quantification evaluation, significantly improving diagnostic accuracy and effectively overcoming the problems of misjudgment and missed judgment caused by insufficient feature extraction. The use of the SVM algorithm for defect classification and the generation of sealing test instructions based on preset rules realize closed-loop control from diagnosis to execution. Simultaneously, by driving the ultrasonic probe to perform point-by-point scanning and dynamic focusing, adaptive acoustic field scanning is achieved, thus avoiding the resource waste caused by indiscriminate scanning across the entire domain and significantly improving detection efficiency.
[0079] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors, characterized in that: include, Collect initial state data of the hearing aid, perform signal modulation and parameter calibration, and obtain the earpiece configuration and control list; According to the earplug configuration and control list, ultrasonic detection signals are emitted to the hearing aid earplugs, echo time-domain data is collected simultaneously, and fast Fourier transform is performed to generate amplitude-phase frequency response curves; envelope detection method is used to coarsely extract features from the amplitude-phase frequency response curves to form acoustic impedance anomaly spectrum features. The acoustic impedance anomaly spectrum features are input into the loss acoustic model. The feature fusion layer performs data registration and feature enhancement, the parameter inversion layer performs quantitative assessment of leakage, and the ultrasonic features of leakage sound are output. The specific construction process of the loss acoustic model is as follows. A feature fusion layer is built using bidirectional gated recurrent units, and a parameter inversion layer is built using a fully connected network. Residual connections and hierarchical stacking are performed on the feature fusion layer and parameter inversion layer to construct a loss acoustic model; The output leakage ultrasonic characteristics specifically include the following steps. The acoustic impedance anomaly spectrum features are input into the loss acoustic model, and the feature fusion layer performs data registration and feature enhancement through a weighted interpolation algorithm to generate a fused acoustic impedance vector. The parameter inversion layer uses least squares fitting to quantify the leakage of the fused acoustic impedance vector and form a preliminary leakage criterion. Time-frequency joint analysis was performed on the preliminary leakage criteria to output the ultrasonic characteristics of the leakage sound; The ultrasonic features of sound leakage are used for pattern recognition and command mapping to generate a sealing test command. Based on the sealing test command, an ultrasonic probe is used to perform a sound field scan on the hearing aid earpiece, and sound pressure feedback data is collected and integrated to form a final diagnostic report.
2. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 1, characterized in that: The process of obtaining the earbud configuration and control list specifically includes the following steps. The initial state data is converted from digital to analog, and an FIR filter is used for signal smoothing and noise suppression to form a modulated digital signal. Based on the target frequency response curve, the parameters of the modulated digital signal are calibrated to generate an earphone configuration and control list.
3. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 2, characterized in that: The acquisition of echo time-domain data specifically includes the following steps. The ultrasonic transmission parameters are initialized according to the earpiece configuration and control list, and pulse code modulation and transmission power calibration are performed by the DSP digital signal processor to generate an ultrasonic pulse sequence. Based on ultrasonic pulse sequences, a piezoelectric ultrasonic transducer is used to emit ultrasonic detection signals to the hearing aid earpiece, and a MEMS microphone array is used to collect echo time-domain data.
4. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 1, characterized in that: The generation of amplitude and phase frequency response curves specifically refers to using the Hanning window function to window the echo time-domain data, generating a windowed time-domain signal, and performing a fast Fourier transform on the windowed time-domain signal to form the amplitude and phase frequency response curves.
5. The method for diagnosing hearing aid earplug leakage using ultrasound features based on intelligent sensors as described in claim 4, characterized in that: The formation of the acoustic impedance anomaly spectrum features specifically includes the following steps. The envelope spectrum of the signal is obtained by performing Hilbert transform and low-pass filtering on the amplitude-phase frequency response curve using the envelope detection method. The spectral features of the signal envelope spectrum are extracted, and anomaly detection is performed to form acoustic impedance anomaly spectrum features.
6. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 5, characterized in that: The generation of the sealing test command specifically includes the following steps. The SVM vector machine algorithm is used to classify the features of leaking ultrasound and form a defect type pattern. According to the preset parameter matching rules, the sealing adjustment parameters are matched for the defect type pattern, and the instruction is encoded to generate the sealing test instruction.
7. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 1, characterized in that: The acquisition of sound pressure feedback data specifically refers to driving an ultrasonic probe to perform point-by-point sound field scanning and dynamic focusing on the hearing aid earpiece according to the sealing test command, while simultaneously using an acoustic sensor array to acquire sound pressure feedback data.
8. The method for diagnosing hearing aid earplug leakage using ultrasonic features based on intelligent sensors as described in claim 7, characterized in that, The process of generating the final diagnostic report specifically includes the following steps: performing multi-dimensional feature analysis on the sound pressure feedback data to form structured diagnostic data, and then dynamically rendering it to generate the final diagnostic report.
Citation Information
Patent Citations
Earphone control method and device and storage medium
CN111818439A
Audio processing method and system of wearable acoustic equipment
CN120499556A