Method, system and storage medium for intelligently identifying environmental noise categories
Through the method of identifying environmental noise categories, the problem that noise monitoring in the existing technology cannot distinguish different noise categories is solved, the automatic identification and differentiation of noise categories is realized, more accurate noise monitoring indicators and law enforcement basis are provided, and misjudgments are reduced. .
Patent Information
- Application Number
- CN202410926523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing noise monitoring only measures equivalent sound pressure levels and cannot distinguish between different environmental noise categories, leading to problems in determining excessive natural noise and law enforcement.
By dividing environmental noise into multiple categories, collecting sound files, performing preprocessing and feature extraction, building a noise category recognition model, identifying noise types and their confidence levels, and combining data synthesis methods for model training and data enhancement.
It has realized automatic identification and differentiation of environmental noise categories, improved noise monitoring indicators, provided a more accurate basis for noise law enforcement and governance, and reduced misjudgments and penalties.
Smart Images

Figure CN118471268B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of environmental noise processing, and in particular relates to a method, a system and a storage medium for intelligently identifying environmental noise categories. Background Art
[0002] Noise monitoring is one of the important issues in social governance. The comprehensiveness of monitoring indicators is an important basis for noise law enforcement and governance. At present, noise monitoring only measures the equivalent sound pressure level, and simply determines that as long as the equivalent sound pressure level is greater than the specified value, the noise exceeds the standard. The problem with the enforcement of noise exceeding the standard is that even if a certain location simply exceeds the specified decibel number due to the sound of wind, rain, and birds in nature, it faces the problem of determining that the noise exceeds the standard and even the risk of the corresponding entity being punished. Therefore, it is very meaningful to define and automatically identify the categories of environmental noise in practice, and to provide main noise type discrimination for environmental noise in addition to the equivalent sound pressure level. Summary of the invention
[0003] In view of the above problems, the present invention provides a method, system and storage medium for intelligently identifying environmental noise categories, aiming to improve current environmental noise monitoring indicators and provide a basis for noise law enforcement and management.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for intelligently identifying environmental noise categories is provided, the method comprising the following steps:
[0005] Classify environmental noise into multiple environmental noise categories;
[0006] For each environmental noise category, a sound file is collected and manually labeled with the noise category label;
[0007] Preprocess each sound file marked with a noise category label to obtain a number of preprocessed sound clips;
[0008] Performing feature extraction on each preprocessed sound segment to obtain features of each sound segment;
[0009] Building a noise category recognition model based on the environmental noise category and the sound segment features;
[0010] The features of each sound segment are input into a noise category recognition model for model training, and the trained noise category recognition model is used to identify the noise type of the sound segment to be identified and its corresponding confidence level.
[0011] The present invention is further characterized in that the process of preprocessing each sound file marked with a noise category label includes:
[0012] Dividing the sound file into a plurality of sound segments based on a specified duration;
[0013] assigning a unique file name to each of said sound clips,
[0014] Generalization processing is performed on each of the sound clips.
[0015] The present invention is further characterized in that: the sound file is divided into a plurality of sound segments based on a specified duration, and the process includes: using a sliding window to sample the sound file in real time to obtain a sound segment with a duration of t seconds, and the two sound segments before and after the sampling have an overlap of s seconds, s <t。
[0016] A further technical feature of the present invention is that the noise category recognition model identifies the noise type of each sound segment and its corresponding confidence level. When the confidence level is greater than a specified threshold, the corresponding noise type will be used as the final output result. The specified threshold is set by plotting the noise category recognition accuracy under different thresholds based on a verification data set, and the threshold corresponding to the highest accuracy rate is determined as the specified threshold.
[0017] The present invention is further characterized in that: feature extraction is performed on each preprocessed sound segment to obtain the feature of each sound segment, and the process includes:
[0018] Extract the M-row and N-column Mel-spectrogram matrix of each sound clip;
[0019] Scaling the original time domain signal of each sound clip into a time domain signal vector containing N data points, merging the time domain signal vector and the Mel-spectrogram matrix into a mixed signal matrix of M+1 rows and N columns, wherein the time domain signal vector is the first row of the mixed signal matrix;
[0020] Based on the signals included in the mixed signal matrix, sound segment features that are discriminative of different sound types are extracted.
[0021] The present invention is further characterized in that: for multiple environmental noise categories, the noise category recognition model is constructed respectively, specifically including:
[0022] Convert the mixed signal matrix of M+1 rows and N columns into a row vector containing (M+1)*N elements;
[0023] The R sound clips used for training are formed into a matrix P with R rows and (M+1)*N columns;
[0024] Select the sound clips containing a certain category from the R sound clips, set the category label to a two-dimensional row vector with element values 1 and 0, and for the sound clips not containing a certain category, set its category label to a two-dimensional row vector with element values 0 and 1, and finally form a matrix Q with R rows and 2 columns with the category label vectors of the R sound clips;
[0025] Assume that there is a relationship between P and Q, Py=Q, y represents an unknown number, and use Find an approximate value of y where represents the transpose of the matrix P, τ represents a small positive number, and I represents the identity matrix;
[0026] The process of finding the approximate value of y is the training process of the noise category recognition model;
[0027] Before inputting the sound segment to be recognized into each of the noise category recognition models that have been trained, the sound segment to be recognized is first converted into a row vector g containing (M+1)*N elements;
[0028] Take g as the input of each noise category recognition model, according to gy i =h i , and calculate the corresponding model output h i ;
[0029] Based on h i is a row vector containing two elements, compare h i If the first element is larger and the corresponding confidence is greater than the specified threshold, the current sound clip belongs to the i-th category, where the confidence is defined as h i The ratio of the absolute value of the first element to the second element in .
[0030] The present invention is further characterized in that: data enhancement is performed on the sound clips with multiple labels based on a data synthesis method for training the noise category recognition model, specifically including any one or more of the following methods a and b:
[0031] a. Data synthesis of two or three significant sound types;
[0032] b. synthesizing data of a class of significant sound types and a class of non-significant sound types;
[0033] Among them, the sound clips synthesized in methods a and b are marked with categories as significant sound types used for synthesis; the significant sound types refer to sound types that are clearly distinguishable by normal human ears, and the non-significant sound types refer to sound types that are indistinguishable by normal human ears.
[0034] According to a second aspect of an embodiment of the present disclosure, a system for intelligently identifying environmental noise categories is provided, the system comprising:
[0035] An environmental noise category acquisition module, used for dividing the environmental noise into multiple environmental noise categories;
[0036] The category label acquisition module is used to collect a sound file for each environmental noise category and manually label the noise category label;
[0037] A sound file preprocessing module is used to preprocess each sound file that has been marked with a noise category label to obtain a number of preprocessed sound clips;
[0038] A sound segment feature acquisition module is used to extract features from each sound segment after preprocessing to obtain features of each sound segment;
[0039] A noise category recognition model building module, used to build a noise category recognition model based on the environmental noise category and the sound segment features;
[0040] The sound segment recognition module is used to input the features of each sound segment into the noise category recognition model for model training, and use the trained noise category recognition model to identify the noise type of the sound segment to be recognized and its corresponding confidence.
[0041] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for intelligently identifying environmental noise categories when executing the program.
[0042] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the above-mentioned method for intelligently identifying environmental noise categories are implemented.
[0043] The disclosed embodiments provide a method, system and storage medium for intelligently identifying environmental noise categories, which define the main categories of environmental noise and realize automatic identification of environmental noise categories. The present invention improves the current environmental noise monitoring indicators and can provide a basis for noise law enforcement and governance.
[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the description, serve to explain the principles of the present invention.
[0046] Figure 1 is a schematic flow chart of a method for intelligently identifying environmental noise categories in an embodiment of the present invention;
[0047] Figure 2 It is a schematic diagram of the flow of the sound file preprocessing method in an embodiment of the present invention;
[0048] Figure 3is a schematic diagram of a flow chart of a method for extracting features from a sound clip according to an embodiment of the present invention;
[0049] Figure 4 is a schematic diagram of the system structure for intelligently identifying the category of environmental noise in an embodiment of the present invention;
[0050] Figure 5 It is a schematic diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0052] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0053] The embodiments of the present invention provide the following embodiments for a method, system and storage medium for intelligently identifying environmental noise categories:
[0054] Example 1 is used to illustrate a method for intelligently identifying environmental noise categories. Figure 1 , which is a flow chart of a method for intelligently identifying environmental noise categories, and the specific steps include:
[0055] S1. classifying the environmental noise into multiple environmental noise categories;
[0056] S2. For each environmental noise category, a sound file is collected and manually labeled with the noise category label;
[0057] S3, preprocessing each sound file marked with a noise category label to obtain a number of preprocessed sound clips;
[0058] S4, extracting features from each preprocessed sound segment to obtain features of each sound segment;
[0059] S5, constructing a noise category recognition model based on the environmental noise category and the sound segment features;
[0060] S6. Input the features of each sound segment into a noise category recognition model for model training, and use the trained noise category recognition model to identify the noise type of the sound segment to be identified and its corresponding confidence level.
[0061] During the specific implementation of S1 and S2, the main environmental noise is divided into the following categories: electric saw sound, pile driving sound, (large machine) excavation sound, airplane sound, engine sound (including engine noise of motorcycles, tractors, large machines, etc.), other mechanical roar, high-speed rail sound, vehicle horn sound, traffic sound, whistle sound, air defense alarm sound, Chinese speaking sound, non-Chinese speaking sound, music sound (including instrument sound), music and singing sound, a cappella singing sound, wind sound, bird singing sound, chicken singing sound, dog barking sound, duck calling sound, goose calling sound, cat calling sound, frog sound, insect sound (including cicada, cricket, etc.), other animal calling sound, rain sound, stream sound, sea wave sound, storm sound, and the embodiment divides a total of 30 categories. The above definition is consistent with the environment of major cities, towns and villages. In the actual application stage, corresponding to the input of a sound signal, the output result is one of the above 30 noise categories or the "unknown" category. In addition, each of the 30 noise categories belongs to one of the four major noise categories: industrial production noise, construction noise, transportation noise, and social life noise (this method refers to these four major noise categories as major noise categories). The system also outputs the major noise category to which each specific noise category belongs.
[0062] As described in S3, each sound file with a noise category label is preprocessed, and the process is as follows Figure 2 As shown, including:
[0063] S31, dividing the sound file into a plurality of sound segments based on a specified duration;
[0064] S32, assigning a unique file name to each of the sound clips,
[0065] S33, performing generalization processing on each of the sound clips.
[0066] Specifically, the automatic identification of environmental noise in the embodiment of the method is realized based on machine learning. In a specific example, first, for each environmental noise category, no less than 20 sound files with a length of more than 40 seconds are collected, and noise category labels are manually provided. In practice, the collected sound clips may contain only a single noise category or multiple noise categories; the manually provided noise category labels must cover the noise types that can be distinguished by the human ear.
[0067] In the data preprocessing step, for each sound file, it is segmented into sound segments with a duration of t seconds, and a sound segment containing multiple noise categories is called a "mixed sound" segment. For each sound segment obtained by segmentation, its file name contains its category label and serial number and the file name is unique (the file name of the "mixed sound" segment needs to contain all the category labels contained in the segment). In the actual sound acquisition process, it is not only affected by electromagnetic signal interference, but also due to differences in devices of different sound cards, there are also slight differences in the collected sound signals. Considering these factors, the original sound segment is subjected to the following generalization process, and the sound segment obtained after processing is used as a new sound segment with the same label as the original sound segment: A weak white noise is added to each original sound segment. The specific operation is to first transform each original sound segment into the frequency domain, then superimpose the weak white noise on its frequency domain signal, and use the superimposed result as the new sound segment (here the weak white noise means that the energy of the superimposed white noise is less than one-tenth of the energy of the original sound segment).
[0068] It should be noted that in addition to giving the main noise type in the sound segment, the noise category recognition model also gives the confidence level corresponding to the noise type.
[0069] In S31, taking the specified duration as the standard, the sound file is segmented into several sound segments. The process includes: using a sliding window to perform real-time sampling on the sound file to obtain a sound segment with a duration of t seconds, and there is an overlap of s seconds between the two sound segments before and after sampling, s < t.
[0070] Specifically, the automatic environmental noise recognition method needs to have high accuracy and good stability. First, the sound card is used for real-time sound acquisition, and then, in a partially overlapping manner, feature extraction is performed on each sound segment of t seconds. The specific method is to use a sliding window to perform real-time sampling on the sound to obtain a sound segment with a duration of t seconds (abbreviated as a sound segment), and there is an overlap of s seconds (s < t) between the two sound segments obtained by sampling. The sound sampling with partially overlapping data is beneficial to the more complete utilization of the sound signal. After such sound sampling, the data obtained by using the sound signal mixing scheme described later is used as the feature of each sound segment. Then, the trained noise category recognition model is used for noise category recognition. For each noise type recognized by the model, the system reads its corresponding confidence level. Only when the confidence level is greater than the specified threshold, the noise type is finally output to the display screen of the system. The threshold for setting the optimal confidence level boundary is set according to the experiment. In practice, based on the prepared verification data set (the verification data set contains a total of no less than 50 different sound segments, and the noise category in each sound segment is known), the accuracy rate of the noise type discrimination obtained by the system under different "thresholds" is plotted, and the threshold corresponding to the highest accuracy rate is used as the final threshold of the system.
[0071] The noise type discrimination accuracy is measured using the following dual indicators: , ,
[0072] ,in Representative The first The number of sound categories in a sound clip (based on the number of sound categories that can be distinguished by the human ear), and Representative The first The number of sound categories correctly identified in the sound clips. Representative The total number of sound clips in the sound file. Representative The first Whether the sound category contained in the sound clip is completely and accurately identified, if so, its value is 1, otherwise its value is 0. For example, if a sound clip contains life sounds, bird sounds, and frog sounds at the same time, only when these three sounds are identified, the corresponding The value is 1, otherwise it is 0. is called the overall discrimination accuracy, is called the complete discrimination accuracy. Obviously, .
[0073] Furthermore, the noise category recognition model identifies the noise type of each sound segment and its corresponding confidence level. When the confidence level is greater than a specified threshold, the corresponding noise type will be used as the final output result. The specified threshold is set by plotting the noise category recognition accuracy under different thresholds based on the verification data set, and the threshold corresponding to the highest accuracy rate is determined as the specified threshold.
[0074] In S4, feature extraction is performed on each preprocessed sound segment to obtain the feature of each sound segment. The process is as follows: Figure 3 As shown, including:
[0075] S41, extracting a Mel-spectrogram matrix of M rows and N columns of each sound clip;
[0076] S42, scaling the original time domain signal of each sound clip into a time domain signal vector containing N data points, merging the time domain signal vector and the Mel-spectrogram matrix into a mixed signal matrix of M+1 rows and N columns, wherein the time domain signal vector is the first row of the mixed signal matrix;
[0077] S43. Extracting sound segment features that are discriminative of different sound types based on the signals included in the mixed signal matrix.
[0078] Specifically, before noise category recognition, it is necessary to extract features from the sound clips, both in the model training and application stages. In the specific implementation process, feature extraction uses the following sound signal mixing scheme:
[0079] First, extract the Mel-spectrogram matrix of each short-time sound segment. Let the Mel-spectrogram matrix be a matrix of M rows and N columns. Scale the original time domain signal of each short-time sound segment into an N-dimensional vector containing N data points (referred to as the time domain signal vector), and merge it with the corresponding Mel-spectrogram matrix into a matrix of M+1 rows and N columns (referred to as the mixed signal matrix), and the time domain signal vector is the first row of the matrix. See the corresponding diagram Figure 3 .
[0080] The advantage of the above-mentioned sound signal mixing scheme is that the mixed signal matrix contains not only the sound signal in the statistical sense of frequency, but also the time-varying signal of sound intensity, which can better extract the sound representation features that are discriminative for different sound types.
[0081] In S5, a noise category recognition model is constructed based on the environmental noise category and the sound segment feature. Specifically, for multiple environmental noise categories, the noise category recognition model is constructed respectively, which specifically includes:
[0082] Convert the mixed signal matrix of M+1 rows and N columns into a row vector containing (M+1)*N elements;
[0083] The R sound clips used for training are formed into a matrix P with R rows and (M+1)*N columns;
[0084] Select the sound clips containing a certain category from the R sound clips, set the category label to a two-dimensional row vector with element values 1 and 0, and for the sound clips not containing a certain category, set its category label to a two-dimensional row vector with element values 0 and 1, and finally form a matrix Q with R rows and 2 columns with the category label vectors of the R sound clips;
[0085] Assume that there is a relationship between P and Q, Py=Q, y represents an unknown number, and use Find an approximate value of y where represents the transpose of the matrix P, τ represents a small positive number, and I represents the identity matrix;
[0086] The process of finding the approximate value of y is the training process of the noise category recognition model;
[0087] Before inputting the sound segment to be recognized into each of the noise category recognition models that have been trained, the sound segment to be recognized is first converted into a row vector g containing (M+1)*N elements;
[0088] Take g as the input of each noise category recognition model, according to gy i =h i , and calculate the corresponding model output h i ;
[0089] Based on h i is a row vector containing two elements, compare h i If the first element is larger and the corresponding confidence is greater than the specified threshold, the current sound clip belongs to the i-th category, where the confidence is defined as h i The ratio of the absolute value of the first element to the second element in .
[0090] For the recognition of the 30 categories in this embodiment, a recognition model is constructed for each category. The feature of each short-term sound segment is a matrix of M+1 rows and N columns. For the convenience of representation, it is converted into a row vector containing (M+1) x N elements. Assuming that there are a total of R short-term sound segments used for training, they constitute a matrix of R rows and (M+1) x N columns, and are represented as P.
[0091] The steps to build a recognition model for a certain category are as follows: first, select all short-term sound clips belonging to this category from all R short-term sound clips (for short-term sound clips containing multiple categories of sounds, as long as they contain the current category, they belong to this category), and set their category labels to two-dimensional row vectors with element values of 1 and 0 respectively; then, set the category labels of all remaining short-term sound clips to two-dimensional row vectors with element values of 0 and 1 respectively. Obviously, the category label vectors of all R short-term sound clips form a matrix of R rows and 2 columns, which is denoted as Q. Assume that there is a relationship Py=Q between P and Q (y is unknown). Then use Find an approximate value of y where Represents the transpose of the matrix P, τ represents a small positive number, and I represents the unit matrix. The process of finding the approximate value of y is also called the training process of the recognition model. The training process of the recognition model for each category is the same as above. Therefore, there are 30 recognition models for 30 categories. Different recognition models correspond to different y. Let the y of the first to the 30th recognition models be y1,…, y30 respectively.
[0092] The process of using the recognition model to identify the sound category of a short-term sound clip is as follows: for a short-term sound clip of a specific input system, first extract its row vector features of (M+1) x N elements and represent them as g. Then, use g as the input of 30 recognition models respectively, and calculate the corresponding model outputs in turn. For example, for the i-th recognition model, calculate the product of g and matrix yi, let the product result be hi, and hi is the model output. Obviously, hi is a row vector containing two elements. By comparison, the size of the two elements in hi is determined. If the first element is larger and the corresponding confidence is greater than the specified threshold, it is considered that the current short-term sound clip belongs to the i-th category. The confidence is defined as the ratio of the absolute values of the first and second elements in hi. The specific value of the threshold is determined during the training process of the recognition model, and the basis for determination is to obtain the highest recognition accuracy for all short-term sound clips used for training.
[0093] Data enhancement is performed on the sound clips with multiple labels based on a data synthesis method for training the noise category recognition model, specifically including any one or more of the following methods a and b:
[0094] a. Data synthesis of two or three significant sound types;
[0095] b. synthesizing data of a class of significant sound types and a class of non-significant sound types;
[0096] Among them, the sound clips synthesized in methods a and b are marked with categories as significant sound types used for synthesis; the significant sound types refer to sound types that are clearly distinguishable by normal human ears, and the non-significant sound types refer to sound types that are indistinguishable by normal human ears.
[0097] Specifically, the classification of short-duration sound clips with multiple labels (i.e., short-duration sound clips containing multiple environmental noises) is a difficult problem. Data enhancement is an effective means to provide model robustness for this problem. The number and diversity of short-duration sound clips with multiple labels collected in the data set are difficult to meet the requirements of model training. Therefore, the present invention proposes the following two effective data enhancement schemes based on data synthesis: Scheme 1 is the data synthesis of two and three types of significant sound types; Scheme 2 is the data synthesis of one type of significant sound type and one type of non-significant sound type. The so-called significant sound type refers to a sound type that is clearly distinguishable by the normal human ear; and the non-significant sound type refers to a sound type that is difficult for the normal human ear to distinguish. The category labeling result of the sound clip synthesized by Scheme 2 is the significant sound type used for synthesis. The category labeling results of the sound clip synthesized by Scheme 1 are all the significant sound types used for synthesis; in other words, if two different significant sound types are used to synthesize data, the category labeling results of the synthesized sound clip will be these two significant sound types (that is, the synthesized sound clip has 2 category labels); if three different significant sound types are used to synthesize data, the category labeling results of the synthesized sound clip will be these three significant sound types (that is, the synthesized sound clip has 3 category labels).
[0098] Example 2 is used to illustrate a system for intelligently identifying environmental noise categories. Figure 4 , the system 400 comprises:
[0099] An environmental noise category acquisition module 410 is used to classify the environmental noise into multiple environmental noise categories;
[0100] The category label acquisition module 420 is used to collect a sound file for each environmental noise category and manually label the noise category label;
[0101] The sound file preprocessing module 430 is used to preprocess each sound file marked with a noise category label to obtain a plurality of preprocessed sound clips;
[0102] The sound segment feature acquisition module 440 is used to extract features from each sound segment after preprocessing to obtain features of each sound segment;
[0103] A noise category recognition model building module 450 is used to build a noise category recognition model based on the environmental noise category and the sound segment features;
[0104] The sound segment identification module 460 is used to input the features of each sound segment into the noise category identification model for model training, and use the trained noise category identification model to identify the noise type of the sound segment to be identified and its corresponding confidence.
[0105] In addition to the upper module, the system 400 may also include other components. However, since these components are irrelevant to the content of the embodiment of the present disclosure, their illustration and description are omitted here.
[0106] The other specific working processes of the system 400 for intelligently identifying the types of environmental noise refer to the description of the above-mentioned method embodiment for intelligently identifying the types of environmental noise, which will not be described in detail.
[0107] Another embodiment is used to illustrate that the system of the present invention can also be used with the help of Figure 5 The architecture of the computing device shown is implemented. Figure 5 The architecture of the computing device is shown. Figure 5 As shown, a computer system 510, a system bus 530, one or more CPUs 540, an input / output 520, a memory 550, etc. The memory 550 can store various data or files used for computer processing and / or communication and program instructions executed by the CPU including the method for intelligently identifying the category of environmental noise in the embodiment. Figure 5 The architecture shown is only exemplary and can be adjusted according to actual needs when implementing different devices. Figure 5 One or more components in. The memory 550, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for intelligently identifying environmental noise categories in the embodiment of the present invention (for example, the environmental noise category acquisition module 410, the category label acquisition module 420, the sound file preprocessing module 430, the sound segment feature acquisition module 440, the noise category recognition model construction module 450 and the sound segment recognition module 460 in the system 400 for intelligently identifying environmental noise categories). One or more CPUs 540 execute various functional applications and data processing of the system of the present invention by running the software programs, instructions and modules stored in the memory 550, that is, to implement the above-mentioned method for intelligently identifying environmental noise categories, which includes the following steps:
[0108] Classify environmental noise into multiple environmental noise categories;
[0109] For each environmental noise category, a sound file is collected and manually labeled with the noise category label;
[0110] Preprocess each sound file marked with a noise category label to obtain a number of preprocessed sound clips;
[0111] Performing feature extraction on each preprocessed sound segment to obtain features of each sound segment;
[0112] Building a noise category recognition model based on the environmental noise category and the sound segment features;
[0113] The features of each sound segment are input into a noise category recognition model for model training, and the trained noise category recognition model is used to identify the noise type of the sound segment to be identified and its corresponding confidence level.
[0114] Of course, the processor of the server provided in the embodiment of the present invention is not limited to executing the method operations described above, but can also execute related operations in the method for intelligently identifying environmental noise categories provided in any embodiment of the present invention.
[0115] The memory 550 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 550 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 550 may further include a memory remotely arranged relative to one or more CPUs 540, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0116] The input / output 520 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The input / output 520 may also include a display device such as a display screen.
[0117] The embodiment of the present invention also provides a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the method for intelligently identifying the category of environmental noise described in the above embodiment is implemented. The computer-readable storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0120] In addition, other specific working processes of a non-temporary computer-readable storage medium refer to the description of the above-mentioned method embodiment for intelligently identifying environmental noise categories, and will not be repeated here.
[0121] Based on the technical solutions provided by the above embodiments, a method, system and storage medium for intelligently identifying environmental noise categories define the main categories of environmental noise and realize automatic identification of environmental noise categories. The present invention improves the current environmental noise monitoring indicators and can provide a basis for noise law enforcement and control.
[0122] In this document, the terms "comprises," "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, such that a step or method that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such step or method.
[0123] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for intelligently identifying environmental noise categories, characterized in that: The method comprises the following steps: Classify environmental noise into multiple environmental noise categories; For each environmental noise category, a sound file is collected and manually labeled with the noise category label; Preprocess each sound file marked with a noise category label to obtain a number of preprocessed sound clips; Performing feature extraction on each preprocessed sound segment to obtain features of each sound segment; Building a noise category recognition model based on the environmental noise category and the sound segment features; Inputting the features of each sound segment into a noise category recognition model for model training, and using the trained noise category recognition model to identify the noise type of the sound segment to be identified and its corresponding confidence level; The features of each sound segment after preprocessing are extracted to obtain the features of each sound segment. The process includes: Extract the M-row and N-column Mel-spectrogram matrix of each sound clip; Scaling the original time domain signal of each sound clip into a time domain signal vector containing N data points, merging the time domain signal vector and the Mel-spectrogram matrix into a mixed signal matrix of M+1 rows and N columns, wherein the time domain signal vector is the first row of the mixed signal matrix; Extracting sound segment features that are discriminative of different sound types based on the signals included in the mixed signal matrix; For multiple environmental noise categories, the noise category recognition models are respectively constructed, specifically including: Convert the mixed signal matrix of M+1 rows and N columns into a row vector containing (M+1)*N elements; The R sound clips used for training are formed into a matrix P with R rows and (M+1)*N columns; Select the sound clips containing a certain category from the R sound clips, set the category label to a two-dimensional row vector with element values 1 and 0, and for the sound clips not containing a certain category, set its category label to a two-dimensional row vector with element values 0 and 1, and finally form a matrix Q with R rows and 2 columns with the category label vectors of the R sound clips; Assume that there is a relationship between P and Q, Py=Q, y represents an unknown number, and use Find an approximate value of y where represents the transpose of the matrix P, τ represents a small positive number, and I represents the identity matrix; The process of finding the approximate value of y is the training process of the noise category recognition model; Before inputting the sound segment to be recognized into each of the noise category recognition models that have been trained, the sound segment to be recognized is first converted into a row vector g containing (M+1)*N elements; Take g as the input of each noise category recognition model, according to gy i =h i , and calculate the corresponding model output h i ; Based on h i is a row vector containing two elements, compare h i If the first element is larger and the corresponding confidence is greater than the specified threshold, the current sound clip belongs to the i-th category, where the confidence is defined as h i The ratio of the absolute value of the first element to the second element in .
2. The method for intelligently identifying environmental noise categories according to claim 1, characterized in that: The process of preprocessing each sound file with a noise category label includes: Dividing the sound file into a plurality of sound segments based on a specified duration; assigning a unique file name to each of said sound clips, Generalization processing is performed on each of the sound clips.
3. The method for intelligently identifying environmental noise categories according to claim 2, characterized in that: The sound file is divided into several sound segments based on the specified duration, the process comprising: using a sliding window to sample the sound file in real time to obtain sound segments with a duration of t seconds, and the two sound segments before and after the sampling have an overlap of s seconds, s <t。 4. The method for intelligently identifying environmental noise categories according to claim 1, characterized in that: The noise category recognition model identifies the noise type of each sound segment and its corresponding confidence level. When the confidence level is greater than a specified threshold, the corresponding noise type will be used as the final output result. The specified threshold is set by plotting the noise category recognition accuracy under different thresholds based on the verification data set, and the threshold corresponding to the highest accuracy rate is determined as the specified threshold.
5. The method for intelligently identifying the category of environmental noise according to any one of claims 1 to 4, characterized in that: Data enhancement is performed on the sound clips with multiple labels based on a data synthesis method for training the noise category recognition model. The specific method includes any one or more of the following a and b: a. Data synthesis of two or three significant sound types; b. synthesizing data of a class of significant sound types and a class of non-significant sound types; Among them, the sound clips synthesized in methods a and b are marked with categories as significant sound types used for synthesis; the significant sound types refer to sound types that are clearly distinguishable by normal human ears, and the non-significant sound types refer to sound types that are indistinguishable by normal human ears.
6. A system for intelligently identifying environmental noise categories, characterized in that: include: An environmental noise category acquisition module, used for dividing the environmental noise into multiple environmental noise categories; The category label acquisition module is used to collect a sound file for each environmental noise category and manually label the noise category label; A sound file preprocessing module is used to preprocess each sound file that has been marked with a noise category label to obtain a number of preprocessed sound clips; A sound segment feature acquisition module is used to extract features from each sound segment after preprocessing to obtain features of each sound segment; A noise category recognition model building module, used to build a noise category recognition model based on the environmental noise category and the sound segment features; A sound segment recognition module, used to input the features of each sound segment into a noise category recognition model for model training, and use the trained noise category recognition model to identify the noise type of the sound segment to be identified and its corresponding confidence level; The features of each sound segment after preprocessing are extracted to obtain the features of each sound segment. The process includes: Extract the M-row and N-column Mel-spectrogram matrix of each sound clip; Scaling the original time domain signal of each sound clip into a time domain signal vector containing N data points, merging the time domain signal vector and the Mel-spectrogram matrix into a mixed signal matrix of M+1 rows and N columns, wherein the time domain signal vector is the first row of the mixed signal matrix; Extracting sound segment features that are discriminative of different sound types based on the signals included in the mixed signal matrix; For multiple environmental noise categories, the noise category recognition models are respectively constructed, specifically including: Convert the mixed signal matrix of M+1 rows and N columns into a row vector containing (M+1)*N elements; The R sound clips used for training are formed into a matrix P with R rows and (M+1)*N columns; Select the sound clips containing a certain category from the R sound clips, set the category label to a two-dimensional row vector with element values 1 and 0, and for the sound clips not containing a certain category, set its category label to a two-dimensional row vector with element values 0 and 1, and finally form a matrix Q with R rows and 2 columns with the category label vectors of the R sound clips; Assume that there is a relationship between P and Q, Py=Q, y represents an unknown number, and use Find an approximate value of y where represents the transpose of the matrix P, τ represents a small positive number, and I represents the identity matrix; The process of finding the approximate value of y is the training process of the noise category recognition model; Before inputting the sound segment to be recognized into each of the noise category recognition models that have been trained, the sound segment to be recognized is first converted into a row vector g containing (M+1)*N elements; Take g as the input of each noise category recognition model, according to gy i =h i , and calculate the corresponding model output h i ; Based on h i is a row vector containing two elements, compare h i If the first element is larger and the corresponding confidence is greater than the specified threshold, the current sound clip belongs to the i-th category, where the confidence is defined as h i The ratio of the absolute value of the first element to the second element in .
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for intelligently identifying the category of environmental noise as claimed in any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method for intelligently identifying environmental noise categories as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Environment sound identification method and system based on convolutional neural network
CN109065030A
Typical abnormal sound alarm method for elevator based on depth single classifier
CN110364141A
Audio classification method and device, electronic equipment and storage medium
CN115240707A
Noise event detection method and device
CN116913325A
Improved prototype network training method, sound classification method, device and equipment
CN117275515A
