Method for predicting influence of noise environment on hearing
The NoiseAudito prediction model, through adaptive variables and a dynamic temporal attention module, combined with an encoder and decoder, addresses the issues of individual differences and dynamic noise environment changes in traditional methods, achieving higher accuracy and adaptability in hearing impact prediction.
Patent Information
- Application Number
- CN202411388583.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional machine learning methods have limitations in predicting the impact of noise environments on hearing. They cannot effectively take into account individual differences and changes in dynamic noise environments, resulting in low prediction accuracy and the inability to adjust in real time.
The NoiseAudito prediction model is adopted, which uses an adaptive variable attention module and a dynamic temporal attention module, combined with the encoder and decoder structure, to capture the dependencies between variables and time steps in the data on the impact of noise environment on hearing, and uses multivariate features for prediction.
It improves the accuracy and applicability of predicting the impact of noise environment on hearing, and can adjust the prediction results in real time to adapt to complex and dynamic changes in noise environment.
Smart Images

Figure CN119296573A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine learning, and in particular relates to a method for predicting the impact of a noise environment on hearing. Background Art
[0002] With the acceleration of industrialization, the problem of noise pollution is becoming increasingly serious. Environmental noise generated by construction, industrial production, etc. has become an important factor endangering public health. Long-term exposure to high-decibel noise environment can easily cause irreversible damage to hearing. Data from the World Health Organization show that more than 5% of the population is at risk of hearing loss caused by noise. Especially in the process of urbanization, noise exposure has become one of the main reasons. Noise damage to hearing not only affects the individual's auditory system, but may also cause emotional instability and other problems. Therefore, effective prediction of the impact of noise environment on hearing is of great practical significance for hearing protection and noise management.
[0003] Traditional machine learning methods usually rely on statistical models and empirical formulas. Although such methods are simple and easy to use, they have certain limitations. First, most of these methods are based on mean calculations, ignoring the complexity of the effects of different noise frequencies, intensities, and exposure durations on hearing. Second, traditional methods usually rely on fixed noise exposure thresholds and fail to take into account individual differences in hearing sensitivity. For example, people of different ages and health conditions respond differently to noise. Finally, these methods perform poorly when dealing with dynamically changing noise environments, and are unable to adjust the prediction results in real time, making it difficult to capture the immediate impact of short-term fluctuations in noise changes on hearing.
[0004] In recent years, with the advancement of multivariate time series prediction technology, deep learning-based methods for predicting the impact of noise environment on hearing have gradually attracted attention. Such methods can integrate complex data from multiple sources, including noise intensity, frequency, duration, individual characteristics, etc., and more accurately predict the risk of hearing loss by modeling nonlinear dependencies between variables. Through the attention mechanism, these models can capture the key moments of noise in different frequency bands and intensities, and predict the cumulative impact of noise exposure on hearing. At the same time, combined with individualized data, the model can also customize prediction plans for different populations to improve the accuracy and applicability of the prediction. Summary of the invention
[0005] The present invention provides a method for predicting the impact of a noisy environment on hearing. Aiming at the relevant data of the impact of a noisy environment on hearing with multivariate characteristics, a NoiseAudito prediction model is proposed, which consists of an adaptive variable attention module, a dynamic time attention module, an encoder and a decoder structure.
[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose specifically includes the following steps: S1. Collect data related to the impact of noise environment on hearing, including features and target variables, and perform preprocessing operations on the collected data; S2, use moving average filter to denoise the data of the impact of noise environment on hearing, and use The normalization operation is performed by the method to divide the data on the impact of noise environment on hearing into a training set and a test set; S3. Construct an adaptive variable attention module to capture the dependency between data variables of the impact of noise environment on hearing, which specifically includes the following steps: S31. Data on the impact of input noise environment on hearing ,in is the time step, is the number of variables that the noise environment affects hearing. The noise environment’s impact on hearing data is embedded into the hidden layer space based on the distance embedding method to obtain the embedded input ; S32, embedding input Split along the time dimension to get the segmented input , and calculate the query embedding , introduces a dynamic displacement range adjustment mechanism, and obtains adaptive displacement values through depthwise separable convolution , perform sampling operation on the segmented input data to obtain the segmented input after displacement ; S33, from the shifted segmentation input Extract key embedding Embedded with values , using relative position encoding self-attention to calculate the attention output , and concatenate all attention outputs to get the adaptive variable attention module output ; S4. Construct a dynamic time attention module to capture the dependency between the time steps of the noise environment on the hearing data, which specifically includes the following steps: S41, Input Embedded Input , converting it to a new transformed representation , and calculate the query for each transformed time window , according to the dimension of the embedding space, we can get the query of each group ; S42, introduce dynamic deformation control mechanism, and use dilated convolution to generate dynamic deformation , for the original time window Perform sampling operation to obtain the deformed input ; S43. From the deformed input Get the key With value , and divide the key of each group according to the dimension of the embedding space With value , using multi-scale attention to calculate the attention output , and concatenate the attention outputs of all groups to get the dynamic time attention module output ; S5, output the adaptive variable attention module through batch normalization and fully connected layers Output of dynamic temporal attention module Splice to get the encoder layer output , and use the long short-term memory network and the fully connected layer as decoders to generate the final prediction results of the impact of noise environment on hearing .
[0007] Preferably, in step S1, the data related to the impact of noise environment on hearing include noise level data, noise environment exposure time data, noise exposure time period data, noise frequency range data, individual age and health status data, individual hearing threshold change data, and noise type data. The method processes the outliers in the data of the impact of noise environment on hearing. The specific formula is as follows: ; In the formula, For the Data on the impact of noise environment on hearing, is the mean of the data on the impact of noise environment on hearing, is the standard deviation of the data on the impact of noise environment on hearing.
[0008] Preferably, in step S2, a moving average filter is used to denoise the data on the effect of the noise environment on hearing, and the specific formula is as follows: ; In the formula, is the window width, After filtering, The output value of the sampling point, The data on the impact of noise environment on hearing is in The value of the sampling point, For relative index within the window, use The normalization operation is performed by the method, and the data on the impact of noise environment on hearing are divided into training set and test set in proportion.
[0009] Preferably, in step S3, S31, the noise environment impact data on hearing is input ,in is the time step, is the number of noise environment-induced hearing variables. The input noise environment-induced hearing data are grouped and embedded into the hidden layer space based on the distance embedding method according to the correlation between the noise environment-induced hearing variables. First, the distance between each input noise environment-induced hearing data variable is calculated. The specific formula is as follows: ; In the formula, is the time step, Input noise environment's impact on hearing data variable At time step The value of Input the data variable of the effect of noise environment on hearing for the target At time step The value of For variables The norm of For variables The norm of , based on the calculated distance , sort all the noise environment's hearing impact data variables in ascending order, so that the noise environment's hearing impact data variables with higher correlation are placed in front. Specifically, in For each input noise environment impact on hearing data variable and the target noise environment impact on hearing data variable, the sorted noise environment impact on hearing data variable is divided into Group, specifically, ,in For the The representation of group variables after embedding, For the The input variables of the group, is the number of variable groups, and then the embeddings of each group are concatenated into an overall embedding matrix. The specific formula is as follows: ; In the formula, For the connection operation, For the The representation of group variables after embedding, adding position encoding and performing batch normalization operation, the specific formula is as follows: ; In the formula, is the position encoding, which is used to retain the time step information, where is the time step, is the dimension of the embedding space, is the representation matrix after embedding, where is the time step, is the dimension of the embedding space, is the batch normalization operation, is the embedding input, where is the time step, is the dimension of the embedding space.
[0010] Preferably, the data on the impact of noise environment on hearing are embedded into the hidden layer space through an embedding method based on the distance between variables. This method can effectively capture the correlation between variables. Specifically, the distance between each variable is calculated, the noise environment variables are sorted according to the correlation, and they are grouped and embedded, so that the model can better capture the key features of the data on the impact of noise environment on hearing, especially the interaction between different variables, thereby improving the accuracy of the overall prediction.
[0011] Preferably, in steps S3 and S32, the embedded input obtained in step S31 is Split operation according to the time dimension, each split input contains time steps, the step size of the split input is Specifically, after segmentation, we get segmented input, represented as ,in is the time step, For each time step, the feature dimension is then Calculate query embedding. The specific formula is as follows: ; In the formula, To split the input, In order to query the embedded weight matrix, a dynamic displacement range adjustment mechanism is introduced. The dynamic adjustment amplitude is adjusted by multi-layer perceptron on the segmentation input. The specific formula is as follows: ; In the formula, To split the input, is a multi-layer perceptron, used to The adaptive displacement amplitude is learned in is the amplitude parameter of the displacement, and then the adaptive displacement value is generated through the depthwise convolution and pointwise convolution operation of the depthwise separable convolution. The specific formula is as follows: ; In the formula, To split the input, For query embedding, is the amplitude parameter of the displacement, is a deep convolution, used to extract local spatial features. It is a point-by-point convolution, which is used for feature fusion between different features. is the activation function, and then weighted average interpolation is used to segment the input Sampling is performed, and the specific formula is as follows: ; ; In the formula, To split the input, For segmentation input The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the adaptive displacement value and the original point position value respectively, Interpolation point With neighboring points The distance between is the segmentation input after displacement.
[0012] Preferably, the input data is segmented according to the time dimension and a dynamic displacement range adjustment mechanism is introduced. The adaptive displacement value is generated by using the depthwise separable convolution, and the segmented input data is sampled and processed. The dynamic displacement mechanism ensures that the model can flexibly adjust the dependencies between different time steps, and improves the ability to capture local time series changes through segmentation and displacement operations. Moreover, by dynamically adjusting the displacement and segmentation operations, the model can better adapt to changes in the time step, enhance the ability to process complex time series, and make the prediction results more accurate.
[0013] Preferably, in steps S3 and S33, the segmented input after displacement is Extract key embedding and value embedding from the code. The specific formula is as follows: ; ; In the formula, For key embedding, is the value embedding, and The weight matrices for key embedding and value embedding are respectively, for each shifted segmentation input , the attention is calculated by encoding the self-attention through relative position. The specific formula is as follows: ; In the formula, For query embedding, is the transpose of the key embedding, is the value embedding, is the scaling factor, is the relative position encoding matrix, representing the query embedding Medium Element Embedded with key Elements in The relative position relationship of all the displaced segments is finally input attention Splice along the time dimension to get the complete attention output , linear projection is performed through the fully connected layer to obtain the output of the adaptive variable attention module. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, For full attention output, Output of the adaptive variable attention module.
[0014] Preferably, the key embedding and value embedding of the segmented input data are calculated through the relative position encoding mechanism, and the attention output is calculated using the self-attention mechanism, and finally the output of the adaptive variable attention module is obtained. The relative position encoding ensures that the model can capture the time sequence information in the data. At the same time, the self-attention mechanism is used to improve the modeling ability of complex dependencies between different variables, improve the model's ability to understand the characteristics of different time steps of noise data, and can better handle nonlinear features in time series, thereby improving prediction accuracy.
[0015] Preferably, in step S4, S41, the embedded input ,in is the time step, is the dimension of the embedding space, which is converted into a new transformed representation ,in is the time window size, for Indicates the number of time periods in each time window. The specific formula is as follows: ; In the formula, For embedding input, For conversion operations, is the time window size, for represents the number of time periods in each time window, is the dimension of the embedding space, in each transformed time window data ,in for represents the number of time periods in each time window, is the dimension of the embedding space and performs the query calculation. The specific formula is as follows: ; In the formula, is the converted time window data, is the weight matrix of the query, and the query According to the dimension of the embedding space, it can be divided into Group, each group ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups.
[0016] Preferably, the embedded input data is converted into a time window representation, the queries in each time window are calculated by querying the weight matrix, and the query groups are divided by the embedding dimension. This can ensure that the model captures the changes in noise data in the short term in different time windows, thereby enhancing the sensitivity to short-term fluctuation characteristics. At the same time, the division of time windows and query calculation can more accurately extract short-term feature changes in a noisy environment, thereby improving the flexibility of prediction.
[0017] Preferably, a dynamic deformation control mechanism is introduced in steps S4 and S42 to adjust the deformation amplitude Designed to depend on the current time step and the transformed time window data of the input Dynamic functions , and is implemented through a multi-layer perceptron. The specific formula is as follows: ; In the formula, is the converted time window data, is a multi-layer perceptron, is the deformation amplitude, is the current time step, and the dilated convolution is used to generate the dynamic deformation. The specific formula is as follows: ; In the formula, is the converted time window data, is the current time step is the dilated convolution operation, is the activation function, For each group of queries, the original time window is sampled by weighted average interpolation. The specific formula is as follows: ; ; In the formula, is the original time window, is the original time window The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the dynamic deformation and the original point deformation respectively, Interpolation point With neighboring points The distance between is the deformed input.
[0018] Preferably, the dynamic deformation is generated by dilated convolution, and the deformation amplitude is adjusted in combination with a multilayer perceptron to adapt to the data changes in the current time step. The dynamic deformation control mechanism enables the model to flexibly adjust the feature representation of different time steps in the time series, and enhances the ability to respond to sudden changes in data. The model can adaptively adjust the time step, enhances the ability to capture sudden noise fluctuations, and makes the prediction more stable and accurate.
[0019] Preferably, in steps S4 and S43, the deformed input Calculation key With value , the specific formula is as follows: ; ; In the formula, is the key, For the value, is the deformed input, and are the weight matrices for keys and values respectively, and then the keys With value According to the dimension of the embedding space, it can be divided into Group, each group and ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups. Multi-scale attention is used to extract the data features of the impact of noise environment on hearing at different time scales, and the attention output is calculated at these scales. The specific formula is as follows: ; In the formula, is the total number of scales, For different time scales, For scale For each group of queries, For scale The keys of each group on For scale The value of each group on is the scaling factor, For scale The corresponding embedding space dimension is is the number of groups, and the attention outputs of all groups are linearly projected through the fully connected layer to obtain the dynamic time attention module output. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, is the attention output for all groups, Output of the dynamic temporal attention module.
[0020] Preferably, a multi-scale attention mechanism is introduced to extract the noise environment characteristics at different time scales and calculate the attention output at these scales. The multi-scale attention mechanism can capture the feature information at different time granularities, ensuring that the model can understand the short-term and long-term noise effects at the same time. Multi-scale modeling can effectively cope with the combined impact of long-term and short-term fluctuations in the noise environment, thereby significantly improving the comprehensiveness and accuracy of the prediction.
[0021] Preferably, in step S5, the output of the adaptive variable attention module is transmitted through the skip connection layer and the fully connected layer. Output of dynamic temporal attention module Perform splicing to obtain the splicing output. The specific formula is as follows: ; In the formula, is the concatenation operation of the fully connected layer, is the output of the adaptive variable attention module, is the output of the dynamic temporal attention module, For batch normalization operation, concatenate the output Input to the encoder layer and get the encoder layer output. The specific formula is as follows: ; In the formula, is the encoder layer operation, To concatenate the outputs, the long short-term memory network and the fully connected layer are used as decoders to generate the final prediction results of the impact of the noise environment on hearing. The specific formula is as follows: ; In the formula, is the weight matrix of the fully connected layer, is a long short-term memory network, For the long short-term memory network at time step The hidden state of is the encoder at time step The splicing output, For the long short-term memory network at time step The state of the memory cell, is the bias term of the fully connected layer.
[0022] Preferably, the outputs of the adaptive variable attention module and the dynamic time attention module are decoded through a long short-term memory network, and the final prediction result is generated through a fully connected layer. The long short-term memory network can effectively capture the long-term and short-term dependencies in the time series, and combined with the fully connected layer, it can further enhance the nonlinear expression of features, thereby improving the final prediction effect.
[0023] To sum up, due to the adoption of the technical solution, the beneficial effects of the present invention are as follows: the present invention proposes a NoiseAudito prediction model, which is applied to the prediction scenario of the impact of noise environment on hearing, including an adaptive variable attention module, a dynamic time attention module, an encoder and a decoder. The adaptive variable attention module is used to capture the dependency between the variables of the noise environment impact on hearing data, and the dynamic time attention module is used to capture the dependency between the time steps of the noise environment impact on hearing data. The encoder and the decoder are used to extract time and variable dependency features from the input noise environment impact on hearing data, and generate the final noise environment impact on hearing prediction results, ensuring that the model can establish an accurate mapping from input to output. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A step-by-step diagram of a method for predicting the impact of a noisy environment on hearing.
[0025] Figure 2 This is the NoiseAudito prediction model structure diagram.
[0026] Figure 3 Figure 2 is the structure diagram of the adaptive variable attention module.
[0027] Figure 4 This is the structure diagram of the dynamic temporal attention module.
[0028] Figure 5 The NoiseAudito prediction model implements the prediction fitting effect diagram of the impact of noise environment on hearing. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0030] See also Figure 1-Figure 5 The present invention provides a technical solution: a method for predicting the impact of a noise environment on hearing, which can capture the dependency between variables of the data on the impact of a noise environment on hearing by constructing an adaptive variable attention module, and a dynamic time attention module can capture the dependency between time steps of the data on the impact of a noise environment on hearing. The encoder and decoder can extract time and variable dependency features from the data on the impact of a noise environment on hearing, and generate a final prediction result of the impact of a noise environment on hearing, thereby completing an accurate prediction of the impact of a noise environment on hearing. The specific steps are as follows: Figure 1 shown.
[0031] Construct the NoiseAudito prediction model, whose structure is as follows Figure 2 As shown, the specific steps are as follows:
[0032] S1. Collect data related to the impact of noise environment on hearing, including features and target variables, and perform preprocessing operations on the collected data.
[0033] Furthermore, the data related to the impact of noise environment on hearing include noise level data, noise environment exposure time data, noise exposure time period data, noise frequency range data, individual age and health status data, individual hearing threshold change data, and noise type data. The method processes the outliers in the data of the impact of noise environment on hearing. The specific formula is as follows: ; In the formula, For the Data on the impact of noise environment on hearing, is the mean of the data on the impact of noise environment on hearing, is the standard deviation of the data on the impact of noise environment on hearing.
[0034] S2, use moving average filter to denoise the data of the impact of noise environment on hearing, and use The normalization operation is performed by the method, and the data on the impact of noise environment on hearing are divided into training set and test set.
[0035] Furthermore, a moving average filter is used to denoise the data on the impact of the noise environment on hearing. The specific formula is as follows: ; In the formula, is the window width, After filtering, The output value of the sampling point, The data on the impact of noise environment on hearing is in The value of the sampling point, For relative index within the window, use The normalization operation was performed by the method, and the data on the impact of noise environment on hearing were divided into training set and test set in the ratio of 7:3.
[0036] S31. Data on the impact of input noise environment on hearing ,in is the time step, is the number of variables that the noise environment affects hearing. The noise environment’s impact on hearing data is embedded into the hidden layer space based on the distance embedding method to obtain the embedded input .
[0037] Furthermore, an adaptive variable attention module is constructed, whose structure is as follows Figure 3 As shown, the input noise environment affects hearing data ,in is the time step, is the number of noise environment-induced hearing variables. The input noise environment-induced hearing data are grouped and embedded into the hidden layer space based on the distance embedding method according to the correlation between the noise environment-induced hearing variables. First, the distance between each input noise environment-induced hearing data variable is calculated. The specific formula is as follows: ; In the formula, is the time step, Input noise environment's impact on hearing data variable At time step The value of Input the data variable of the effect of noise environment on hearing for the target At time step The value of For variables The norm of For variables The norm of , based on the calculated distance , sort all the noise environment's hearing impact data variables in ascending order, so that the noise environment's hearing impact data variables with higher correlation are placed in front. Specifically, in For each input noise environment impact on hearing data variable and the target noise environment impact on hearing data variable, the sorted noise environment impact on hearing data variable is divided into Group, specifically, ,in For the The representation of group variables after embedding, For the The input variables of the group, is the number of variable groups, and then the embeddings of each group are concatenated into an overall embedding matrix. The specific formula is as follows: ; In the formula, For the connection operation, For the The representation of group variables after embedding, adding position encoding and performing batch normalization operation, the specific formula is as follows: ; In the formula, is the position encoding, which is used to retain the time step information, where is the time step, is the dimension of the embedding space, is the representation matrix after embedding, where is the time step, is the dimension of the embedding space, is the batch normalization operation, is the embedding input, where is the time step, is the dimension of the embedding space.
[0038] S32, embedding input Split along the time dimension to get the segmented input , and calculate the query embedding , introduces a dynamic displacement range adjustment mechanism, and obtains adaptive displacement values through depthwise separable convolution , perform sampling operation on the segmented input data to obtain the segmented input after displacement .
[0039] Further, the embedding obtained in step S31 is input Split operation according to the time dimension, each split input contains time steps, the step size of the split input is Specifically, after segmentation, we get segmented input, represented as ,in is the time step, For each time step, the feature dimension is then Calculate query embedding. The specific formula is as follows: ; In the formula, To split the input, In order to query the embedded weight matrix, a dynamic displacement range adjustment mechanism is introduced. The dynamic adjustment amplitude is adjusted by multi-layer perceptron on the segmentation input. The specific formula is as follows: ; In the formula, To split the input, is a multi-layer perceptron, used to The adaptive displacement amplitude is learned in is the amplitude parameter of the displacement, and then the adaptive displacement value is generated through the depthwise convolution and pointwise convolution operation of the depthwise separable convolution. The specific formula is as follows: ; In the formula, To split the input, For query embedding, is the amplitude parameter of the displacement, is a deep convolution, used to extract local spatial features. It is a point-by-point convolution, which is used for feature fusion between different features. is the activation function, and then weighted average interpolation is used to segment the input Sampling is performed, and the specific formula is as follows: ; ; In the formula, To split the input, For segmentation input The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the adaptive displacement value and the original point position value respectively, Interpolation point With neighboring points The distance between is the segmentation input after displacement.
[0040] S33, from the shifted segmentation input Extract key embedding Embedded with values , using relative position encoding self-attention to calculate the attention output , and concatenate all attention outputs to get the adaptive variable attention module output .
[0041] Further, from the shifted segmented input Extract key embedding and value embedding from the code. The specific formula is as follows: ; ; In the formula, For key embedding, is the value embedding, and The weight matrices for key embedding and value embedding are respectively, for each shifted segmentation input , the attention is calculated by encoding the self-attention through relative position. The specific formula is as follows: ; In the formula, For query embedding, is the transpose of the key embedding, is the value embedding, is the scaling factor, is the relative position encoding matrix, representing the query embedding Medium Element Embedded with key Elements in The relative position relationship of all the displaced segments is finally input attention Splice along the time dimension to get the complete attention output , linear projection is performed through the fully connected layer to obtain the output of the adaptive variable attention module. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, For full attention output, Output of the adaptive variable attention module.
[0042] S41, Input Embedded Input , converting it to a new transformed representation , and calculate the query for each transformed time window , according to the dimension of the embedding space, we can get the query of each group .
[0043] Furthermore, a dynamic temporal attention module is constructed, whose structure is as follows Figure 4 As shown, the input is embedded in the input ,in is the time step, is the dimension of the embedding space, which is converted into a new transformed representation ,in is the time window size, for Indicates the number of time periods in each time window. The specific formula is as follows: ; In the formula, For embedding input, For conversion operations, is the time window size, for represents the number of time periods in each time window, is the dimension of the embedding space, in each transformed time window data ,in for represents the number of time periods in each time window, is the dimension of the embedding space and performs the query calculation. The specific formula is as follows: ; In the formula, is the converted time window data, is the weight matrix of the query, and the query According to the dimension of the embedding space, it can be divided into Group, each group ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups.
[0044] S42, introduce dynamic deformation control mechanism, and use dilated convolution to generate dynamic deformation , for the original time window Perform sampling operation to obtain the deformed input .
[0045] Furthermore, a dynamic deformation control mechanism is introduced to adjust the deformation amplitude Designed to depend on the current time step and the transformed time window data of the input Dynamic functions , and is implemented through a multi-layer perceptron. The specific formula is as follows: ; In the formula, is the converted time window data, is a multi-layer perceptron, is the deformation amplitude, is the current time step, and the dilated convolution is used to generate the dynamic deformation. The specific formula is as follows: ; In the formula, is the converted time window data, is the current time step is the dilated convolution operation, is the activation function, For each group of queries, the original time window is sampled by weighted average interpolation. The specific formula is as follows: ; ; In the formula, is the original time window, is the original time window The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the dynamic deformation and the original point deformation respectively, Interpolation point With neighboring points The distance between is the deformed input.
[0046] S43. From the deformed input Get the key With value , and divide the key of each group according to the dimension of the embedding space With value , using multi-scale attention to calculate the attention output , and concatenate the attention outputs of all groups to get the dynamic time attention module output .
[0047] Furthermore, from the deformed input Calculation key With value , the specific formula is as follows: ; ; In the formula, is the key, For the value, is the deformed input, and are the weight matrices for keys and values respectively, and then the keys With value According to the dimension of the embedding space, it can be divided into Group, each group and ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups. Multi-scale attention is used to extract the data features of the impact of noise environment on hearing at different time scales, and the attention output is calculated at these scales. The specific formula is as follows: ; In the formula, is the total number of scales, For different time scales, For scale For each group of queries, For scale The keys of each group on For scale The value of each group on is the scaling factor, For scale The corresponding embedding space dimension is is the number of groups, and the attention outputs of all groups are linearly projected through the fully connected layer to obtain the dynamic time attention module output. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, is the attention output for all groups, Output of the dynamic temporal attention module.
[0048] S5, output the adaptive variable attention module through batch normalization and fully connected layers Output of dynamic temporal attention module Splice to get the encoder layer output , and use the long short-term memory network and the fully connected layer as decoders to generate the final prediction results of the impact of noise environment on hearing .
[0049] Furthermore, the output of the adaptive variable attention module is connected through the skip connection layer and the fully connected layer. Output of dynamic temporal attention module Perform splicing to obtain the splicing output. The specific formula is as follows: ; In the formula, is the concatenation operation of the fully connected layer, is the output of the adaptive variable attention module, is the output of the dynamic temporal attention module, For batch normalization operation, concatenate the output Input to the encoder layer and get the encoder layer output. The specific formula is as follows: ; In the formula, is the encoder layer operation, To concatenate the outputs, the long short-term memory network and the fully connected layer are used as decoders to generate the final prediction results of the impact of the noise environment on hearing. The specific formula is as follows: ; In the formula, is the weight matrix of the fully connected layer, is a long short-term memory network, For the long short-term memory network at time step The hidden state of is the encoder at time step The splicing output, For the long short-term memory network at time step The state of the memory cell, is the bias term of the fully connected layer.
[0050] Furthermore, the NoiseAudito prediction model is written in Python. The experiment runs on the Windows operating system, using Pytorch as the framework in the CUDA11.27 environment. It is trained on an NVIDIA 4070TI 8GB GPU. The dataset is 3 months of noise environment impact on hearing data. After data preprocessing, it is input into the NoiseAudito prediction model. The encoder input dimension is set to 7, the decoder input dimension is set to 7, the model hidden layer dimension is set to 512, the encoder layer number is set to 2, the decoder layer number is set to 1, the block length is set to 7, the step size is set to 7, the number of training rounds is set to 10, and the batch size is set to 32. Set to 0.0001.
[0051] Furthermore, the NoiseAudito prediction model realizes the prediction of the effect of noise environment on hearing. Figure 5As shown in the figure, the horizontal axis is the noise exposure time (hours), the vertical axis is the hearing loss (dB HL), the black dotted line represents the predicted data, and the gray solid line represents the actual data. It can be seen from the figure that the overall trend of the predicted data is basically consistent with the actual data, especially when the noise exposure time is 0 to 500 hours, the predicted value of the model almost completely coincides with the actual value, indicating that the model has a high prediction accuracy for hearing loss in the early stages. During the entire noise exposure process, the trend lines of the predicted data and the actual data remain similar, especially when the exposure time gradually increases, the predicted value closely follows the actual value, reflecting the stability and robustness of the model. Even at times when the data fluctuates greatly, the model can still capture the changes in hearing loss well. At the same time, the prediction situation during a noise exposure time of up to 700 hours shows that the model can maintain a high prediction accuracy over a long period of time.
Claims
1. A method for predicting the impact of a noise environment on hearing, characterized in that: The following steps are involved: S1. Collect data related to the impact of noise environment on hearing, including features and target variables, and perform preprocessing operations on the collected data; S2, use moving average filter to denoise the data of the impact of noise environment on hearing, and use The method is used to perform normalization operations and divide the data set on the impact of noise environment on hearing; S3. Construct an adaptive variable attention module, which specifically includes the following steps: S31. Data on the impact of input noise environment on hearing ,in is the time step, is the number of variables that the noise environment affects hearing. The noise environment’s impact on hearing data is embedded into the hidden layer space based on the distance embedding method to obtain the embedded input ; S32, embedding input Split along the time dimension to get the segmented input , and calculate the query embedding , introduces a dynamic displacement range adjustment mechanism, and obtains adaptive displacement values through depthwise separable convolution , perform sampling operation on the segmented input data to obtain the segmented input after displacement ; S33, from the shifted segmentation input Extract key embedding Embedded with values , using relative position encoding self-attention to calculate the attention output , and concatenate all attention outputs to get the adaptive variable attention module output ; S4. Construct a dynamic temporal attention module, which specifically includes the following steps: S41, Input Embedded Input , converting it to a new transformed representation , and calculate the query for each transformed time window , according to the dimension of the embedding space, we can get the query of each group ; S42, introduce dynamic deformation control mechanism, and use dilated convolution to generate dynamic deformation , for the original time window Perform sampling operation to obtain the deformed input ; S43. From the deformed input Get the key With value , and divide the key of each group according to the dimension of the embedding space With value , using multi-scale attention to calculate the attention output , and concatenate the attention outputs of all groups to get the dynamic time attention module output ; S5, output the adaptive variable attention module through batch normalization and fully connected layers Output of dynamic temporal attention module Splice to get the encoder layer output , and use the long short-term memory network and the fully connected layer as decoders to generate the final prediction results of the impact of noise environment on hearing .
2. The method for predicting the effect of a noise environment on hearing according to claim 1, characterized in that: In the steps S3 and S31, the data on the effect of the noise environment on hearing is input. ,in is the time step, is the number of noise environment-induced hearing variables. The input noise environment-induced hearing data are grouped and embedded into the hidden layer space based on the distance embedding method according to the correlation between the noise environment-induced hearing variables. First, the distance between each input noise environment-induced hearing data variable is calculated. The specific formula is as follows: ; In the formula, is the time step, Input noise environment's impact on hearing data variable At time step The value of Input the data variable of the effect of noise environment on hearing for the target At time step The value of For variables The norm of For variables The norm of , based on the calculated distance , sort all the noise environment's hearing impact data variables in ascending order, so that the noise environment's hearing impact data variables with higher correlation are placed in front. Specifically, in For each input noise environment impact on hearing data variable and the target noise environment impact on hearing data variable, the sorted noise environment impact on hearing data variable is divided into Group, specifically, ,in For the The representation of group variables after embedding, For the The input variables of the group, is the number of variable groups, and then the embeddings of each group are concatenated into an overall embedding matrix. The specific formula is as follows: ; In the formula, For the connection operation, For the The representation of group variables after embedding, adding position encoding and performing batch normalization operation, the specific formula is as follows: ; In the formula, is the position encoding, which is used to retain the time step information, where is the time step, is the dimension of the embedding space, is the representation matrix after embedding, where is the time step, is the dimension of the embedding space, is the batch normalization operation, is the embedding input, where is the time step, is the dimension of the embedding space.
3. The method for predicting the effect of noise environment on hearing according to claim 2, characterized in that: In the steps S3 and S32, the embedded input obtained in step S31 is Split operation according to the time dimension, each split input contains time steps, the step size of the split input is Specifically, after segmentation, we get Segmented input, represented as ,in is the time step, For each time step, the feature dimension is then Calculate query embedding. The specific formula is as follows: ; In the formula, To split the input, In order to query the embedded weight matrix, a dynamic displacement range adjustment mechanism is introduced. The dynamic adjustment amplitude is adjusted by multi-layer perceptron on the segmentation input. The specific formula is as follows: ; In the formula, To split the input, is a multi-layer perceptron, used to The adaptive displacement amplitude is learned in is the amplitude parameter of the displacement, and then the adaptive displacement value is generated through the depthwise convolution and pointwise convolution operation of the depthwise separable convolution. The specific formula is as follows: ; In the formula, To split the input, For query embedding, is the amplitude parameter of the displacement, is a deep convolution, used to extract local spatial features. It is a point-by-point convolution, which is used for feature fusion between different features. is the activation function, and then weighted average interpolation is used to segment the input Sampling is performed, and the specific formula is as follows: ; ; In the formula, To split the input, For segmentation input The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the adaptive displacement value and the original point position value respectively, Interpolation point With neighboring points The distance between is the segmentation input after displacement.
4. The method for predicting the effect of noise environment on hearing according to claim 3, characterized in that: In the steps S3 and S33, the segmented input after displacement is inputted Extract key embedding and value embedding from the code. The specific formula is as follows: ; ; In the formula, For key embedding, is the value embedding, and The weight matrices for key embedding and value embedding are respectively, for each shifted segmentation input , the attention is calculated by encoding the self-attention through relative position. The specific formula is as follows: ; In the formula, For query embedding, is the transpose of the key embedding, is the value embedding, is the scaling factor, is the relative position encoding matrix, representing the query embedding Medium Element Embedded with key Elements in The relative position relationship of all the displaced segments is finally input attention Splice along the time dimension to get the complete attention output , linear projection is performed through the fully connected layer to obtain the output of the adaptive variable attention module. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, For full attention output, Output of the adaptive variable attention module.
5. The method for predicting the effect of noise environment on hearing according to claim 4, characterized in that: In steps S4 and S41, the embedded input is input ,in is the time step, is the dimension of the embedding space, which is converted into a new transformed representation ,in is the time window size, for Indicates the number of time periods in each time window. The specific formula is as follows: ; In the formula, For embedding input, For conversion operations, is the time window size, for represents the number of time periods in each time window, is the dimension of the embedding space, in each transformed time window data ,in for represents the number of time periods in each time window, is the dimension of the embedding space and performs the query calculation. The specific formula is as follows: ; In the formula, is the converted time window data, is the weight matrix of the query, and the query According to the dimension of the embedding space, it can be divided into Group, each group ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups.
6. A method for predicting the effect of a noise environment on hearing according to claim 5, characterized in that: In the steps S4 and S42, a dynamic deformation control mechanism is introduced to adjust the deformation amplitude Designed to depend on the current time step and the transformed time window data of the input Dynamic functions , and is implemented through a multi-layer perceptron. The specific formula is as follows: ; In the formula, is the converted time window data, is a multi-layer perceptron, is the deformation amplitude, is the current time step, and the dilated convolution is used to generate the dynamic deformation. The specific formula is as follows: ; In the formula, is the converted time window data, is the current time step is the dilated convolution operation, is the activation function, For each group of queries, the original time window is sampled by weighted average interpolation. The specific formula is as follows: ; ; In the formula, is the original time window, is the original time window The neighboring points of represent the reference points in the interpolation process. For neighboring points The weight of and are the dynamic deformation and the original point deformation respectively, Interpolation point With neighboring points The distance between is the deformed input.
7. A method for predicting the effect of a noise environment on hearing according to claim 6, characterized in that: In the steps S4 and S43, the deformed input Calculation key With value , the specific formula is as follows: ; ; In the formula, is the key, For the value, is the deformed input, and are the weight matrices for keys and values respectively, and then the keys With value According to the dimension of the embedding space, it can be divided into Group, each group and ,in for represents the number of time periods in each time window, is the dimension of the embedding space, is the number of groups. Multi-scale attention is used to extract the data features of the impact of noise environment on hearing at different time scales, and the attention output is calculated at these scales. The specific formula is as follows: ; In the formula, is the total number of scales, For different time scales, For scale For each group of queries, For scale The keys of each group on For scale The value of each group on is the scaling factor, For scale The corresponding embedding space dimension is is the number of groups, and the attention outputs of all groups are linearly projected through the fully connected layer to obtain the dynamic time attention module output. The specific formula is as follows: ; In the formula, is the transpose of the weight matrix of the fully connected layer, is the attention output for all groups, Output of the dynamic temporal attention module.
8. A method for predicting the effect of a noise environment on hearing according to claim 7, characterized in that: In step S5, the output of the adaptive variable attention module is transmitted through the skip connection layer and the fully connected layer. Output of dynamic temporal attention module Perform splicing to obtain the splicing output. The specific formula is as follows: ; In the formula, is the concatenation operation of the fully connected layer, is the output of the adaptive variable attention module, is the output of the dynamic temporal attention module, For batch normalization operation, concatenate the output Input to the encoder layer and get the encoder layer output. The specific formula is as follows: ; In the formula, is the encoder layer operation, To concatenate the outputs, the long short-term memory network and the fully connected layer are used as decoders to generate the final prediction results of the impact of the noise environment on hearing. The specific formula is as follows: ; In the formula, is the weight matrix of the fully connected layer, is a long short-term memory network, For the long short-term memory network at time step The hidden state of is the encoder at time step The splicing output, For the long short-term memory network at time step The state of the memory cell, is the bias term of the fully connected layer.
9. The method for predicting the effect of noise environment on hearing according to claim 1, characterized in that: In order to predict the impact of noise environment on hearing, the data related to the impact of noise environment on hearing collected from the noise exposure history survey are used, including noise level data, noise environment exposure time data, noise exposure time period data, noise frequency range data, individual age and health status data, individual hearing threshold change data, and noise type data. The collected relevant data are preprocessed to ensure data quality, and then the processed data are divided into training and test sets for training and evaluating the performance of the prediction model of the impact of noise environment on hearing.
Citation Information
Cited By
Power equipment fault diagnosis method based on multi-dimensional feature attention enhancement
CN119622318A
Noise frequency hearing loss prediction method and system based on machine learning
CN119811652A