Audio denoising method and device, computer device and storage medium
By performing shift transformation and statistical feature analysis on audio data, noise can be directly identified and removed, solving the problem of pre-labeling noise features in existing technologies and achieving more efficient and accurate audio denoising processing.
Patent Information
- Application Number
- CN202211507087.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Existing audio denoising methods require pre-labeling of noise features, making them ineffective in processing audio data in scenarios where noise features are not pre-labeled.
By performing a shift transformation on the encoded sequence of audio data, dividing the shift sequence, and conducting a metric analysis of the target string, the statistical characteristics of the subsequence are obtained. Denoising is then performed based on these statistical characteristics, avoiding the need for pre-labeling of noise features.
It reduces the complexity of audio noise reduction, broadens the application scenarios, and improves the accuracy and anti-interference ability of noise reduction.
Smart Images

Figure CN115862653B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an audio denoising method and device, computer equipment and storage medium. BACKGROUND
[0002] With the development of noise processing field, audio denoising technology appears. In traditional audio denoising technology, high-pass filter can be used to eliminate low-frequency noise, or some notch filter can be used to eliminate continuous sound in certain frequency band.
[0003] However, the current audio denoising method needs to label noise features in advance, such as determining the frequency band where noise occurs, or pre-determining the spectral energy of noise, and then processing noise based on the determined noise features. For the use scene without labeling noise features in advance, the processing effect is not ideal. SUMMARY
[0004] Therefore, it is necessary to provide an audio denoising method, device, computer equipment and storage medium which can directly denoise audio data without labeling noise features in advance.
[0005] In a first aspect, the present application provides an audio denoising method, which comprises:
[0006] Performing shift transformation on the encoding sequence of the audio data to obtain a shift sequence set;
[0007] Dividing the shift sequence in the shift sequence set to obtain a subsequence set corresponding to the shift sequence;
[0008] Performing measure analysis of target string on the subsequence in the subsequence set to obtain statistical features of the subsequence;
[0009] Performing denoising processing on the audio data according to the statistical features of the subsequence.
[0010] In one embodiment, dividing the shift sequence in the shift sequence set to obtain a subsequence set corresponding to the shift sequence comprises:
[0011] Dividing the shift sequence in the shift sequence set based on a first set length to obtain a window sequence set corresponding to the shift sequence;
[0012] Dividing the window sequence in the window sequence set corresponding to the shift sequence based on a second set length to obtain a subsequence set corresponding to the shift sequence; wherein the first set length is greater than the second set length.
[0013] In one of the embodiments, the measure analysis of the target string is performed on the sub-sequences in the sub-sequence set to obtain statistical characteristics of the sub-sequences, including:
[0014] For each sub-sequence in the sub-sequence set, the statistical characteristics of the sub-sequence are determined according to the length of the sub-sequence, the number of the first target string in the sub-sequence, and the number of the second target string in the sub-sequence; wherein the first target string is different from the target string.
[0015] In one of the embodiments, the statistical characteristics of the sub-sequence are determined according to the length of the sub-sequence, the number of the first target string in the sub-sequence, and the number of the second target string in the sub-sequence, including:
[0016] The ratio between the length of the sub-sequence and the number of the first target string in the sub-sequence is taken as the first probability distribution in the statistical characteristics of the sub-sequence;
[0017] The ratio between the length of the sub-sequence and the number of the second target string in the sub-sequence is taken as the second probability distribution in the statistical characteristics of the sub-sequence.
[0018] In one of the embodiments, the audio data is denoised according to the statistical characteristics of the sub-sequences, including:
[0019] The sub-sequences are clustered according to the statistical characteristics;
[0020] The noise distribution area in the audio data is determined according to the number of the sub-sequences in each cluster;
[0021] The noise distribution area is denoised.
[0022] In one of the embodiments, the audio data is denoised according to the statistical characteristics of the sub-sequences, including:
[0023] The first probability distribution of the shift sequences in the shift sequence set is determined according to the first probability distribution in the statistical characteristics of the sub-sequences;
[0024] The first probability distribution of the shift sequence set is obtained according to the first probability distribution of the shift sequences;
[0025] The second probability distribution of the shift sequences in the shift sequence set is determined according to the second probability distribution in the statistical characteristics of the sub-sequences;
[0026] The second probability distribution of the shift sequence set is obtained according to the second probability distribution of the shift sequences;
[0027] The audio data is denoised according to the first probability distribution and the second probability distribution of the shift sequence set.
[0028] In a second aspect, the present application provides an audio denoising device, which comprises:
[0029] a data shifting module, configured to perform a shift transformation on an encoding sequence of audio data to obtain a set of shift sequences;
[0030] a sequence dividing module, configured to divide a shift sequence in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequence;
[0031] a measure analysis module, configured to perform a measure analysis on a sub-sequence in the set of sub-sequences to obtain a statistical feature of the sub-sequence;
[0032] an audio denoising module, configured to perform a denoising processing on the audio data according to the statistical feature of the sub-sequence.
[0033] In a third aspect, the present application provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0034] performing a shift transformation on an encoding sequence of audio data to obtain a set of shift sequences;
[0035] dividing a shift sequence in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequence;
[0036] performing a measure analysis on a sub-sequence in the set of sub-sequences to obtain a statistical feature of the sub-sequence;
[0037] performing a denoising processing on the audio data according to the statistical feature of the sub-sequence.
[0038] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the following steps when executed by a processor:
[0039] performing a shift transformation on an encoding sequence of audio data to obtain a set of shift sequences;
[0040] dividing a shift sequence in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequence;
[0041] performing a measure analysis on a sub-sequence in the set of sub-sequences to obtain a statistical feature of the sub-sequence;
[0042] performing a denoising processing on the audio data according to the statistical feature of the sub-sequence.
[0043] In a fifth aspect, the present application provides a computer program product, which comprises a computer program, and the computer program implements the following steps when executed by a processor:
[0044] performing shift transformation on the encoding sequence of the audio data to obtain a set of shift sequences;
[0045] dividing the shift sequences in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequences;
[0046] performing measure analysis of a target string on the sub-sequences in the set of sub-sequences to obtain statistical features of the sub-sequences;
[0047] performing denoising processing on the audio data according to the statistical features of the sub-sequences.
[0048] The audio denoising method, device, computer device and storage medium described above can obtain a set of shift sequences by performing shift transformation on the encoding sequence of the audio data, can obtain a set of sub-sequences corresponding to the shift sequences by dividing the shift sequences in the set of shift sequences, can obtain statistical features of the sub-sequences by performing measure analysis of a target string on the sub-sequences in the set of sub-sequences, and can directly perform denoising processing on the audio data based on the statistical features of the sub-sequences. The above scheme can directly perform shift transformation, division, measure analysis and other processing on the encoding sequence of the audio data that needs to be denoised, obtain statistical features, and identify and denoise the noise that may exist in the audio data based on the statistical features. Compared with related audio denoising methods, the above scheme does not need to label noise features in advance, reduces the complexity of audio denoising, and widens the use scenarios of audio denoising processing. In addition, the statistical features introduced by the shift transformation, division, measure analysis and other processing of the audio data have strong anti-interference ability, and thus the result of audio denoising is more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 An application environment diagram of an audio denoising method in an embodiment;
[0050] Figure 2 A flowchart of an audio denoising method in an embodiment;
[0051] Figure 3 A flowchart of dividing shift sequences in an embodiment;
[0052] Figure 4 A flowchart of determining statistical features of sub-sequences in an embodiment;
[0053] Figure 5 A flowchart of audio denoising based on statistical features in an embodiment;
[0054] Figure 6 A flowchart of audio denoising based on statistical features in another embodiment;
[0055] Figure 7 This is a flowchart illustrating the audio noise reduction method in yet another embodiment;
[0056] Figure 8 This is a structural block diagram of an audio noise reduction device in one embodiment;
[0057] Figure 9 This is a structural block diagram of the sequence partitioning module in one embodiment;
[0058] Figure 10 This is a block diagram of the measurement analysis module in one embodiment;
[0059] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] The audio noise reduction method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process, such as audio data to be denoised. The data storage system can be integrated on server 104 or placed in the cloud or on other network servers. The audio denoising method provided in this embodiment can be applied to server 104, terminal 102, or through interaction between terminal 102 and server 104. For example, server 104 performs a shift transformation on the encoded sequence of audio data to obtain a shift sequence set. It then divides the shift sequences in the shift sequence set to obtain a subsequence set corresponding to the shift sequences. It performs target string metric analysis on the subsequences in the subsequence set to obtain the statistical characteristics of the subsequences. Based on these statistical characteristics, the audio data can be denoised. Furthermore, server 104 can send the processed audio data to terminal 102 so that terminal 102 can perform subsequent processing on the processed audio data based on the actual usage scenario, such as sound source identification. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0062] The current audio denoising method needs to be labeled in advance, such as determining the frequency band of noise, or pre-determining the noise spectrum energy and other noise features to perform denoising processing. For example, when denoising in-car voice recording, by analyzing other in-car voice recordings, the noise spectrum energy is determined, and then based on the determined noise energy spectrum, the audio data to be denoised is denoised. For the use scene of not labeling noise features in advance, the processing effect is not ideal.
[0063] Based on this, in one embodiment, as shown in Figure 2 , an audio denoising method is provided, which is applied to Figure 1 The server is taken as an example for illustration, which includes the following steps:
[0064] S201, shift transform is performed on the encoding sequence of the audio data to obtain a set of shift sequences.
[0065] The audio data is the audio data to be denoised; the encoding sequence is the sequence obtained by encoding the audio data according to the set encoding rule. Optionally, the encoding rule can be determined according to the denoising result of other audio data. For example, the encoding rule is binary encoding, and the encoding sequence obtained by encoding the audio data is a bit sequence.
[0066] Optionally, shift transformation refers to a way of changing the order of the encoding sequence by shifting, which can be determined according to the encoding mode of the encoding sequence, and the source and use scene of the audio data. The shift mode includes right shift, left shift, and left and right cross shift, etc. For example, the shift transformation mode of the encoding sequence obtained by encoding the audio data using the binary encoding rule can be to shift the encoding sequence to the right by a set length, and for the characters shifted out, add them to the start of the encoding sequence in the original order.
[0067] The shift sequence set can include one or more shift sequences. Optionally, multiple different shift lengths can be used to shift transform the encoding sequence to obtain the shift sequence set. In one implementation, different shift lengths can form an arithmetic sequence, for example, the first shift length is 1, the second shift length is 2, …, the nth shift length is n, etc. For example, in the case of right shift, assuming that the encoding sequence obtained by encoding the audio data to be denoised using binary encoding is 1011010010100110, one shift length m=4, and one shift length m=8, then after shift transformation, the shift sequence 0110101101001010 can be obtained, and the shift sequence 1010011010110100 can be obtained.
[0068] For example, the length of the encoding sequence of the audio data encoded by using the binary code is too long, and the length of the sequence is mostly 2 n Therefore, when the shift transformation is performed, the shift length m = 2 n may be selected. The shift length is less than the length of the encoding sequence. Further, the length of the shift sequence is equal to the length of the encoding sequence.
[0069] S202, the shift sequence in the shift sequence set is divided to obtain the subsequence set corresponding to the shift sequence.
[0070] Optionally, the division rule can be determined based on the encoding mode and the length of the encoding sequence. According to the division rule, each shift sequence in the shift sequence set is divided. Specifically, for each shift sequence in the shift sequence set, the shift sequence is divided according to the division rule to obtain the subsequence set corresponding to the shift sequence. For example, the division length in the division rule can be an integer that can be divided by the length of the shift sequence.
[0071] For example, assuming that a shift sequence is 0110101101001010, the division length can be 4 according to the length of the shift sequence, and the shift sequence is divided from left to right to obtain the subsequence set of the shift sequence, which is {0110, 1011, 0100, 1010}.
[0072] Further, since the length of the shift sequence is too long, the subsequence set can be obtained by dividing the shift sequence in multiple levels, that is, the number of divisions can be greater than one. In actual application, in order to ensure the accuracy of the denoising result and the efficiency of the denoising, the shift sequence can be divided twice, and the specific division process will be described in detail in the subsequent embodiments.
[0073] S203, the measure analysis of the target string is performed on the subsequence in the subsequence set to obtain the statistical characteristics of the subsequence.
[0074] In this embodiment, the target string can be determined according to the encoding characters contained in the encoding sequence. For example, the encoding characters contained in the encoding sequence include 1, 0, 10, 11, 01, 00, etc. Since the string changes when the shift transformation is performed, the strings 1 and 01 can be analyzed in this embodiment. The measure analysis can also be called statistical analysis, which is used to count the occurrence of the target string in the subsequence.
[0075] Specifically, for each subsequence in the subsequence set corresponding to each shift sequence, the number of occurrences of the target string in the subsequence can be counted, and the counted number can be transformed according to a set conversion rule to obtain the statistical feature of the subsequence. For example, the statistical feature of the subsequence can be determined based on the ratio of the counted number to the length of the shift sequence corresponding to the subsequence.
[0076] It should be noted that the number of target strings in the embodiment can be one or more; to ensure the accuracy of the denoising processing, in an implementable manner, the number of target strings is at least two. Further, for each subsequence, the measure analysis of each target string is performed on the subsequence to determine the statistical feature of the subsequence.
[0077] S204, according to the statistical feature of the subsequence, the audio data is denoised.
[0078] Specifically, statistical analysis can be performed on the statistical features of all subsequences to obtain the noise distribution; based on the obtained noise distribution, the subsequences with noise are mapped to the encoding sequence of the audio data, based on which the frequency band in which the noise is located can be accurately obtained, and further, the noise frequency band that has been determined is denoised. The denoising processing can use filtering processing and the like.
[0079] Exemplarily, a neural network model that can perform audio denoising processing can also be trained based on historical audio denoising data, the audio data and the obtained noise distribution are input into the trained neural network model, and the model can automatically perform denoising processing.
[0080] In the above audio denoising method, by performing shift transformation on the encoding sequence of the audio data, a set of shift sequences can be obtained, and by dividing the shift sequences in the set of shift sequences, a set of subsequences corresponding to the shift sequences can be obtained, and further, the measure analysis of the target string is performed on the subsequences in the set of subsequences to obtain the statistical feature of the subsequence, and based on the statistical feature of the subsequence, the audio data can be directly denoised. The above scheme directly performs shift transformation, division, measure analysis and the like on the encoding sequence of the audio data that needs to be denoised, obtains the statistical feature, and based on the statistical feature, the noise that can exist in the audio data can be identified and denoised. Compared with related audio denoising methods, the noise feature does not need to be labeled in advance, the complexity of audio denoising is reduced, and the use scenario of audio denoising processing is widened. In addition, the statistical feature introduced by the shift transformation, division, measure analysis and the like of the audio data has strong anti-interference ability, and thus the result of audio denoising is more accurate.
[0081] Figure 3For a flowchart of dividing the shift sequence in an embodiment, the embodiment further elaborates the operation of S202, i.e., dividing the shift sequence to obtain the subsequence set, on the basis of the above-mentioned embodiment, and can specifically include the following steps:
[0082] S301, dividing the shift sequence in the shift sequence set based on a first set length to obtain a window sequence set corresponding to the shift sequence.
[0083] The first set length refers to a length that can reasonably divide the shift sequence, which is set based on the encoding mode of the audio data and the length of the shift sequence. Further, the first set length is less than the length of the shift sequence.
[0084] Specifically, for each shift sequence in the shift sequence set, the shift sequence can be divided in the order from left to right with the first set length as the division unit, and the sequences obtained after division can be arranged in chronological order to obtain a window sequence set corresponding to the shift sequence, i.e., one shift sequence corresponds to one window sequence set. Further, at least two window sequences are included in one window sequence set.
[0085] S302, dividing the window sequence in the window sequence set corresponding to the shift sequence based on a second set length to obtain a subsequence set corresponding to the shift sequence.
[0086] Corresponding to the first set length, the second set length refers to a length that can reasonably divide the window sequence, which is set based on the encoding mode of the audio data and the length of the window sequence. The second set length is less than the first set length.
[0087] Specifically, for each shift sequence, the window sequences in the window sequence set corresponding to the shift sequence can be divided in the order from left to right with the second set length as the division unit, and a subsequence set corresponding to the shift sequence can be obtained. Optionally, one window sequence can be divided into multiple subsequences, i.e., one window sequence corresponds to one subsequence set. Further, one shift sequence includes multiple window sequences, and further, one shift sequence corresponds to multiple subsequence sets.
[0088] It can be understood that in the embodiment, the subsequence obtained by multiple divisions of the shift sequence is more fine-grained, and further, the characteristics of the audio data can be more accurately analyzed, i.e., the noise position can be more accurately located, thereby improving the accuracy of audio denoising processing.
[0089] It should be noted that when the shift sequence is divided, the length of the sub-sequence may be unevenly divided. In order to avoid the error introduced by the division, the length of the sub-sequence is introduced in the process of determining the statistical characteristics of the sub-sequence on the basis of the above embodiment. Optionally, for each sub-sequence in the sub-sequence set corresponding to each shift sequence, the statistical characteristics of the sub-sequence can be determined according to the length of the sub-sequence, the number of the first target string in the sub-sequence, and the number of the second target string in the sub-sequence; wherein the first target string is different from the target string.
[0090] Optionally, in combination with Figure 4 As shown in the figure, the specific implementation process includes the following steps:
[0091] S401, the ratio between the length of the sub-sequence and the number of the first target string in the sub-sequence is taken as the first probability distribution in the statistical characteristics of the sub-sequence.
[0092] Wherein, the first target string refers to a string that can measure the distribution of characters in the sub-sequence based on the encoding mode of the audio data; the first probability distribution refers to the frequency of the first target string in the sub-sequence.
[0093] Optionally, in the case of a bit sequence, the first target string can be set to 1, and the first probability distribution P can be set to P. Further, based on the length K of the target sub-sequence and the number M1 of the first target string in the sub-sequence, the first probability distribution P of the statistical characteristics of the sub-sequence can be obtained.
[0094] S402, the ratio between the length of the sub-sequence and the number of the second target string in the sub-sequence is taken as the second probability distribution in the statistical characteristics of the sub-sequence.
[0095] Wherein, the second target string refers to another string that can measure the distribution of characters in the sub-sequence based on the encoding mode of the audio data; the second probability distribution refers to the frequency of the second target string in the sub-sequence.
[0096] Optionally, in the case of a bit sequence, the second target string can be set to 01, and the second probability distribution Q can be set to Q. Further, based on the length K of the target sub-sequence and the number M2 of the second target string in the sub-sequence, the second probability distribution Q of the statistical characteristics of the sub-sequence can be obtained.
[0097] In this embodiment, the statistical characteristics are extracted by using statistical method, i.e. calculating the probability distribution of the target string in the sub-sequence, to obtain the statistical characteristics of the sub-sequence, thereby improving the anti-interference ability of audio denoising.
[0098] Figure 5 For a flowchart of audio denoising based on statistical characteristics in an embodiment, based on the above embodiment, the embodiment further explains S204 in detail, specifically including the following steps:
[0099] S501, clustering the sub-sequences according to the statistical characteristics.
[0100] Optionally, in the embodiment, the sub-sequences with the same statistical characteristics are classified as a class. Further, in the case where the statistical characteristics of the sub-sequences include the first probability distribution and the second probability distribution, the sub-sequences with the same first probability distribution and the same second probability distribution can be classified as a class. That is, a class is essentially a type of statistical characteristics.
[0101] S502, determining the noise distribution area in the audio data according to the number of sub-sequences in each class.
[0102] It can be understood that the statistical characteristics of noise data in the audio data are more diverse and less in number than the statistical characteristics of normal audio data, which leads to the clustering of the statistical characteristics of the sub-sequences, resulting in a few statistical characteristic classes with a small number of sub-sequences, which are noise sequences.
[0103] Optionally, the number of sub-sequences in each class obtained in S501 can be counted, and based on the number of sub-sequences in each class, each class is sorted in descending order; from the sorting result, a target class with a number less than a set threshold is selected; based on the way of shifting and dividing the coding sequence, the sub-sequences in the target class are mapped to the coding sequence of the audio data, and the noise distribution area, i.e., the noise distribution area in the audio data, is obtained.
[0104] S503, denoising the noise distribution area.
[0105] Specifically, after determining the noise distribution area, filtering processing is performed on the noise distribution area. Optionally, denoising processing can be performed by eliminating the sub-sequences to achieve denoising processing of the audio data.
[0106] In the embodiment, by clustering the sub-sequences according to the statistical characteristics, the noise distribution area in the audio data is determined, which does not require prior labeling of noise characteristics compared with related audio denoising methods, reduces the complexity of audio denoising, and widens the use scenarios of audio denoising processing. At the same time, the noise distribution area is denoised to improve the accuracy of audio denoising.
[0107] Figure 6For another embodiment of the flowchart of the audio denoising method based on statistical characteristics, based on the above embodiment, the embodiment further explains S204 in detail, which includes the following steps:
[0108] S601, determining the first probability distribution of the shift sequence in the shift sequence set according to the first probability distribution in the statistical characteristics of the subsequence.
[0109] Specifically, for each shift sequence in the shift sequence set, based on the first probability distribution in the statistical characteristics of each subsequence in the subsequence set corresponding to the shift sequence, the number of subsequences with the same first probability distribution is counted, and then the first probability distribution of the shift sequence is determined.
[0110] For example, there are 100 subsequences with P=0.2, 110 subsequences with P=0.3, and 200 subsequences with P=0.5 in the subsequence set corresponding to the shift sequence, and then the first probability distribution of the shift sequence can be represented as {(0.2, 100), (0.3, 110), (0.5, 200)}.
[0111] S602, obtaining the first probability distribution of the shift sequence set according to the first probability distribution of the shift sequence.
[0112] Specifically, statistical analysis of the first probability distribution of each shift sequence in the shift sequence set can obtain the first probability distribution of the entire shift sequence set. For example, the same P in each shift sequence can be linearly added to obtain the first probability distribution of the entire shift sequence set.
[0113] For example, the shift sequence set includes three shift sequences, the first probability distribution of the shift sequence 1 is {(0.2, 100), (0.3, 110), (0.5, 200)}, the probability distribution of the shift sequence 2 is {(0.1, 100), (0.4, 110), (0.5, 200)}, and the probability distribution of the shift sequence 3 is {(0.6, 100), (0.3, 110), (0.1, 200)}. Linear addition of each shift sequence can obtain the first probability distribution of the entire shift sequence set as {(0.1, 300), (0.2, 100), (0.3, 220), (0.4, 110), (0.5, 400), (0.6, 100)}.
[0114] S603, determining the second probability distribution of the shift sequence in the shift sequence set according to the second probability distribution in the statistical characteristics of the subsequence.
[0115] Corresponding to step S601, for each shift sequence in the shift sequence set, based on the second probability distribution in the feature of each sub-sequence in the sub-sequence set corresponding to the shift sequence, the number of sub-sequences with the same second probability distribution is counted, and then the second probability distribution of the shift sequence is determined.
[0116] For example, there are 120 sub-sequences of Q=0.15, 150 sub-sequences of Q=0.2, and 180 sub-sequences of Q=0.33 in the sub-sequence set corresponding to the shift sequence, so the second probability distribution of the shift sequence can be represented as {(0.15, 120), (0.2, 150), (0.33, 180)}.
[0117] S604, according to the second probability distribution of the shift sequence, the second probability distribution of the shift sequence set is obtained.
[0118] Similarly, the second probability distribution of each shift sequence in the shift sequence set can be statistically analyzed to obtain the second probability distribution of the entire shift sequence set. For example, the same Q in each shift sequence can be linearly added to obtain the second probability distribution of the entire shift sequence set.
[0119] For example, the shift sequence set includes three shift sequences, the second probability distribution of shift sequence 1 is {(0.15, 120), (0.2, 150), (0.33, 180)}, the probability distribution of shift sequence 2 is {(0.1, 100), (0.33, 110), (0.5, 200)}, and the probability distribution of shift sequence 3 is {(0.33, 100), (0.5, 110), (0.7, 200)}. Linearly adding each shift sequence can obtain the first probability distribution of the entire shift sequence set as {(0.1, 100), (0.15, 120), (0.2, 150), (0.33, 220), (0.4, 390), (0.5, 310), (0.7, 200)}.
[0120] S605, according to the first probability distribution and the second probability distribution of the shift sequence set, the audio data is denoised.
[0121] Specifically, the first probability distribution P and the second probability distribution Q in the shift sequence set are combined, and then the obtained P, Q probability combination is compared with the probability combination existing in the sub-sequence. If the probability combination exists in the sub-sequence, the probability combination is valid; if the probability combination does not exist in the sub-sequence, the probability combination is invalid.
[0122] Further, based on the effective P, Q probability combination, a series of (X, Y, Z) coordinates are obtained. Wherein, X represents the first probability distribution, Y represents the second probability distribution, and Z represents the number of times of occurrence of the probability combination, such as a probability combination P=0.2, Q=0.5, at this time Z=C1 (i.e. the number of times of occurrence of P=0.2 in the shift sequence set)+C2 (i.e. the number of times of occurrence of Q=0.5 in the shift sequence set). Subsequently, based on the series of (X, Y, Z) coordinates obtained by transformation, a three-dimensional solid figure is constructed, and from the figure, the probability combination with a smaller number of occurrences in the subsequence can be directly obtained. The probability combination with a number of occurrences less than a preset threshold can be regarded as a noise statistical feature.
[0123] Further, based on the shift and division manner of the encoding sequence, the probability combination regarded as a noise statistical feature is mapped to the encoding sequence of the audio data, and a noise distribution region, i.e. a noise distribution region in the audio data, is obtained. After determining the noise distribution region, denoising processing is performed on the noise distribution region.
[0124] In the embodiment, based on the logic of the shift and division processing of the encoding sequence, the first probability distribution and the second probability distribution of the shift sequence set can be derived according to the statistical feature of the subsequence, and then based on the probability distribution of the shift sequence set, the denoising processing of the audio data can be realized. The above scheme provides an optional way for accurately identifying and removing the noise of the audio data.
[0125] Figure 7 For another embodiment of the flowchart of the audio denoising method, on the basis of the above embodiment, the embodiment provides an optional example of an audio denoising method. In combination with Figure 7 , the specific implementation process is as follows:
[0126] S701, performing shift transformation on the encoding sequence of the audio data to obtain a shift sequence set.
[0127] S702, based on a first set length, dividing the shift sequence in the shift sequence set to obtain a window sequence set corresponding to the shift sequence.
[0128] S703, based on a second set length, dividing the window sequence in the window sequence set corresponding to the shift sequence to obtain a subsequence set corresponding to the shift sequence.
[0129] S704, for each subsequence in the subsequence set, determining a statistical feature of the subsequence according to the length of the subsequence, the number of first target strings in the subsequence and the number of second target strings in the subsequence.
[0130] Wherein, the first target string is different from the target string.
[0131] S705, determine the first probability distribution of the shift sequence in the shift sequence set according to the first probability distribution in the statistical feature of the subsequence.
[0132] S706, obtain the first probability distribution of the shift sequence set according to the first probability distribution of the shift sequence.
[0133] S707, determine the second probability distribution of the shift sequence in the shift sequence set according to the second probability distribution in the statistical feature of the subsequence.
[0134] S708, obtain the second probability distribution of the shift sequence set according to the second probability distribution of the shift sequence.
[0135] S709, perform denoising processing on the audio data according to the first probability distribution and the second probability distribution of the shift sequence set.
[0136] The specific process of S701-S709 can be referred to the description of the method embodiments, and the implementation principle and technical effects are similar, which will not be repeated here.
[0137] It should be understood that although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps has no strict order limitation, and these steps can be executed in other order. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.
[0138] Based on the same inventive concept, the embodiments of the present application also provide an audio denoising device for implementing the above-mentioned audio denoising method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more audio denoising device embodiments provided below can be referred to the limitations of the audio denoising method described above, which will not be repeated here.
[0139] In one embodiment, as shown in Figure 8 An audio denoising device 1 is provided, which includes a data shift module 10, a sequence division module 20, a measure analysis module 30 and an audio denoising module 40, wherein:
[0140] The data shift module 10 is configured to perform shift transformation on the encoding sequence of the audio data to obtain a shift sequence set.
[0141] The sequence partitioning module 20 is used to partition the shifted sequences in the shifted sequence set to obtain the subsequence set corresponding to the shifted sequence;
[0142] The measurement analysis module 30 is used to perform measurement analysis on the target string of the subsequences in the subsequence set to obtain the statistical characteristics of the subsequences;
[0143] The audio denoising module 40 is used to denoise the audio data based on the statistical characteristics of the subsequence.
[0144] In one embodiment, such as Figure 9 As shown, Figure 8 The sequence partitioning module 20 also includes:
[0145] The first partitioning unit 21 is used to partition the shift sequence in the shift sequence set based on a first set length to obtain the window sequence set corresponding to the shift sequence;
[0146] The second partitioning unit 22 is used to partition the window sequence in the window sequence set corresponding to the shift sequence based on the second preset length to obtain the subsequence set corresponding to the shift sequence; wherein the first preset length is greater than the second preset length.
[0147] In one embodiment, the measurement analysis module 30 is used for:
[0148] For each subsequence in the subsequence set, the statistical characteristics of the subsequence are determined based on its length, the number of first target strings in the subsequence, and the number of second target strings in the subsequence; wherein the first target string is different from the target string.
[0149] In one embodiment, such as Figure 10 As shown, Figure 8 The measurement analysis module 30 also includes:
[0150] The first analysis unit 31 is used as the ratio between the length of the subsequence and the number of first target strings in the subsequence as the first probability distribution in the statistical features of the subsequence;
[0151] The second analysis unit 32 is used as the ratio between the length of the subsequence and the number of second target strings in the subsequence as the second probability distribution in the statistical characteristics of the subsequence.
[0152] In one embodiment, the audio noise reduction module 40 is used for:
[0153] Cluster the subsequences based on statistical characteristics;
[0154] The noise distribution region in the audio data is determined based on the number of various neutron sequences;
[0155] The noise distribution region is denoised.
[0156] In an embodiment, the audio denoising module 40 is further configured to:
[0157] determine, according to the first probability distribution in the statistical feature of the sub-sequence, a first probability distribution of the shift sequence in the shift sequence set;
[0158] obtain the first probability distribution of the shift sequence set according to the first probability distribution of the shift sequence;
[0159] determine, according to the second probability distribution in the statistical feature of the sub-sequence, a second probability distribution of the shift sequence in the shift sequence set;
[0160] obtain the second probability distribution of the shift sequence set according to the second probability distribution of the shift sequence;
[0161] perform denoising processing on the audio data according to the first probability distribution and the second probability distribution of the shift sequence set.
[0162] The above modules in the audio denoising apparatus can be implemented by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to the above modules.
[0163] In an embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 11 The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store audio data to be denoised and the like. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an audio denoising method.
[0164] Those skilled in the art can understand that Figure 11 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0165] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0166] performing shift transformation on the encoding sequence of the audio data to obtain a set of shift sequences;
[0167] dividing the shift sequences in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequences;
[0168] performing measure analysis on the sub-sequences in the set of sub-sequences with respect to the target string to obtain statistical features of the sub-sequences;
[0169] performing denoising processing on the audio data according to the statistical features of the sub-sequences.
[0170] In the above embodiment, when the processor implements the logic of dividing the shift sequences in the set of shift sequences to obtain a set of sub-sequences corresponding to the shift sequences in the computer program, the following steps are specifically implemented:
[0171] dividing the shift sequences in the set of shift sequences based on a first set length to obtain a set of window sequences corresponding to the shift sequences, and dividing the window sequences in the set of window sequences corresponding to the shift sequences based on a second set length to obtain the set of sub-sequences corresponding to the shift sequences; wherein the first set length is greater than the second set length.
[0172] In the above embodiment, when the processor implements the logic of performing measure analysis on the sub-sequences in the set of sub-sequences with respect to the target string to obtain statistical features of the sub-sequences in the computer program, the following steps are specifically implemented:
[0173] for each sub-sequence in the set of sub-sequences, determining the statistical features of the sub-sequence according to the length of the sub-sequence, the number of first target strings in the sub-sequence, and the number of second target strings in the sub-sequence; wherein the first target strings are different from the target string.
[0174] In the above embodiment, when the processor implements the logic of determining the statistical features of the sub-sequence according to the length of the sub-sequence, the number of first target strings in the sub-sequence, and the number of second target strings in the sub-sequence in the computer program, the following steps are specifically implemented:
[0175] taking the ratio between the length of the sub-sequence and the number of first target strings in the sub-sequence as a first probability distribution in the statistical features of the sub-sequence; and taking the ratio between the length of the sub-sequence and the number of second target strings in the sub-sequence as a second probability distribution in the statistical features of the sub-sequence.
[0176] On the basis of the previous embodiment, when the processor executes the logic in the computer program for denoising the audio data according to the statistical characteristics of the sub-sequences, the following steps are specifically implemented:
[0177] According to the statistical characteristics, the sub-sequences are clustered; according to the number of sub-sequences in each cluster, a noise distribution region in the audio data is determined; and the noise distribution region is denoised.
[0178] On the basis of the previous embodiment, when the processor executes the logic in the computer program for denoising the audio data according to the statistical characteristics of the sub-sequences, the following steps are specifically implemented:
[0179] According to the first probability distribution in the statistical characteristics of the sub-sequences, a first probability distribution of the shift sequences in the shift sequence set is determined; according to the first probability distribution of the shift sequences, a first probability distribution of the shift sequence set is obtained; according to the second probability distribution in the statistical characteristics of the sub-sequences, a second probability distribution of the shift sequences in the shift sequence set is determined; according to the second probability distribution of the shift sequences, a second probability distribution of the shift sequence set is obtained; and according to the first probability distribution and the second probability distribution of the shift sequence set, the audio data is denoised.
[0180] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0181] The shift sequences in the shift sequence set are divided to obtain a sub-sequence set corresponding to the shift sequences.
[0182] The shift sequences in the shift sequence set are divided to obtain a sub-sequence set corresponding to the shift sequences.
[0183] The shift sequences in the shift sequence set are divided to obtain a sub-sequence set corresponding to the shift sequences.
[0184] The shift sequences in the shift sequence set are divided to obtain a sub-sequence set corresponding to the shift sequences.
[0185] On the basis of the previous embodiment, when the processor executes the logic in the computer program for denoising the audio data according to the statistical characteristics of the sub-sequences, the following steps are specifically implemented:
[0186] Based on the first set length, the shift sequences in the shift sequence set are divided to obtain a window sequence set corresponding to the shift sequences; based on the second set length, the window sequences in the window sequence set corresponding to the shift sequences are divided to obtain a sub-sequence set corresponding to the shift sequences; and the first set length is greater than the second set length.
[0187] On the basis of the previous embodiment, the code logic in the computer program that the measure analysis of the target string is performed on the subsequence in the subsequence set to obtain the statistical characteristics of the subsequence is executed by the processor to implement the following steps:
[0188] For each subsequence in the subsequence set, the statistical characteristics of the subsequence are determined according to the length of the subsequence, the number of the first target string in the subsequence, and the number of the second target string in the subsequence; wherein the first target string is different from the target string.
[0189] On the basis of the previous embodiment, the code logic in the computer program that the statistical characteristics of the subsequence are determined according to the length of the subsequence, the number of the first target string in the subsequence, and the number of the second target string in the subsequence is executed by the processor to implement the following steps:
[0190] The ratio between the length of the subsequence and the number of the first target string in the subsequence is taken as the first probability distribution in the statistical characteristics of the subsequence; and the ratio between the length of the subsequence and the number of the second target string in the subsequence is taken as the second probability distribution in the statistical characteristics of the subsequence.
[0191] On the basis of the previous embodiment, the code logic in the computer program that the audio data is denoised according to the statistical characteristics of the subsequence is executed by the processor to implement the following steps:
[0192] The subsequence is clustered according to the statistical characteristics; the noise distribution area in the audio data is determined according to the number of the subsequence in each cluster; and the noise distribution area is denoised.
[0193] On the basis of the previous embodiment, the code logic in the computer program that the audio data is denoised according to the statistical characteristics of the subsequence is executed by the processor to implement the following steps:
[0194] The first probability distribution of the shift sequence in the shift sequence set is determined according to the first probability distribution in the statistical characteristics of the subsequence; the first probability distribution of the shift sequence set is obtained according to the first probability distribution of the shift sequence; the second probability distribution of the shift sequence in the shift sequence set is determined according to the second probability distribution in the statistical characteristics of the subsequence; the second probability distribution of the shift sequence set is obtained according to the second probability distribution of the shift sequence; and the audio data is denoised according to the first probability distribution and the second probability distribution of the shift sequence set.
[0195] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps:
[0196] The shift sequence set is divided to obtain a subsequence set corresponding to the shift sequence.
[0197] The shift sequence set is divided to obtain a subsequence set corresponding to the shift sequence.
[0198] The shift sequence set is divided to obtain a subsequence set corresponding to the shift sequence.
[0199] The shift sequence set is divided to obtain a subsequence set corresponding to the shift sequence.
[0200] In the previous embodiment, when the computer program is executed by the processor to divide the shift sequence set to obtain a subsequence set corresponding to the shift sequence, the following steps are specifically implemented:
[0201] The shift sequence set is divided to obtain a subsequence set corresponding to the shift sequence.
[0202] In the previous embodiment, when the computer program is executed by the processor to divide the shift sequence set to obtain a subsequence set corresponding to the shift sequence, the following steps are specifically implemented:
[0203] For each subsequence in the subsequence set, the length of the subsequence, the number of first target strings in the subsequence, and the number of second target strings in the subsequence are determined to determine the statistical characteristics of the subsequence; wherein the first target string is different from the target string.
[0204] In the previous embodiment, when the computer program is executed by the processor to divide the shift sequence set to obtain a subsequence set corresponding to the shift sequence, the following steps are specifically implemented:
[0205] The ratio between the length of the subsequence and the number of first target strings in the subsequence is taken as the first probability distribution in the statistical characteristics of the subsequence; and the ratio between the length of the subsequence and the number of second target strings in the subsequence is taken as the second probability distribution in the statistical characteristics of the subsequence.
[0206] In the previous embodiment, when the computer program is executed by the processor to divide the shift sequence set to obtain a subsequence set corresponding to the shift sequence, the following steps are specifically implemented:
[0207] According to the statistical characteristics, the sub-sequences are clustered; according to the number of sub-sequences in each category, a noise distribution area in the audio data is determined; and the noise distribution area is denoised.
[0208] On the basis of the previous embodiment, when the computer program is executed by the processor to perform the operation of denoising the audio data according to the statistical characteristics of the sub-sequences, the following steps are specifically implemented:
[0209] According to the first probability distribution in the statistical characteristics of the sub-sequences, a first probability distribution of the shift sequences in the shift sequence set is determined; according to the first probability distribution of the shift sequences, a first probability distribution of the shift sequence set is obtained; according to the second probability distribution in the statistical characteristics of the sub-sequences, a second probability distribution of the shift sequences in the shift sequence set is determined; according to the second probability distribution of the shift sequences, a second probability distribution of the shift sequence set is obtained; and according to the first probability distribution and the second probability distribution of the shift sequence set, the audio data is denoised.
[0210] It should be noted that the audio information (including but not limited to the audio information to be denoised, etc.) and the data (including but not limited to the data for analysis, the stored data, the displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties.
[0211] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0212] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0213] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An audio denoising method, characterized in that, The method comprises: adopting multiple different shift lengths to respectively shift the encoded sequence of the audio data to obtain a shift sequence set; wherein the shift length is less than the length of the encoded sequence, and the different shift lengths can constitute an arithmetic sequence; based on a first set length, dividing the shift sequence in the shift sequence set to obtain a window sequence set corresponding to the shift sequence; based on a second set length, dividing the window sequence in the window sequence set corresponding to the shift sequence to obtain a subsequence set corresponding to the shift sequence; wherein the first set length is greater than the second set length; performing measure analysis of a target string on the subsequence in the subsequence set to obtain statistical characteristics of the subsequence; the measure analysis of the target string on the subsequence in the subsequence set to obtain the statistical characteristics of the subsequence comprises: for each subsequence in the subsequence set, determining the statistical characteristics of the subsequence according to the length of the subsequence, the number of first target strings in the subsequence and the number of second target strings in the subsequence; wherein the first target string is different from the target string; performing denoising processing on the audio data according to the statistical characteristics of the subsequence.
2. The method of claim 1, wherein, the determination of the statistical characteristics of the subsequence according to the length of the subsequence, the number of first target strings in the subsequence and the number of second target strings in the subsequence comprises: taking the ratio between the length of the subsequence and the number of first target strings in the subsequence as the first probability distribution in the statistical characteristics of the subsequence; taking the ratio between the length of the subsequence and the number of second target strings in the subsequence as the second probability distribution in the statistical characteristics of the subsequence.
3. The method of claim 2, wherein, the denoising processing on the audio data according to the statistical characteristics of the subsequence comprises: clustering the subsequence according to the statistical characteristics; determining the noise distribution area in the audio data according to the number of subsequences in each class; performing denoising processing on the noise distribution area.
4. The method of claim 2, wherein, the denoising processing on the audio data according to the statistical characteristics of the subsequence comprises: determining the first probability distribution of the shift sequence in the shift sequence set according to the first probability distribution in the statistical characteristics of the subsequence; obtaining the first probability distribution of the shift sequence set according to the first probability distribution of the shift sequence; determining the second probability distribution of the shift sequence in the shift sequence set according to the second probability distribution in the statistical characteristics of the subsequence; obtaining the second probability distribution of the shift sequence set according to the second probability distribution of the shift sequence; performing denoising processing on the audio data according to the first probability distribution and the second probability distribution of the shift sequence set.
5. An audio denoising apparatus, characterized by, The device for performing the audio denoising method as claimed in any one of claims 1-4 comprises: a data shift module for shifting the encoded sequence of the audio data to obtain a shift sequence set; a sequence division module for dividing the shift sequence in the shift sequence set to obtain a subsequence set corresponding to the shift sequence; a measure analysis module, configured to perform measure analysis on the sub-sequences in the sub-sequence set to obtain statistical features of the sub-sequences; an audio denoising module, configured to perform denoising processing on the audio data according to the statistical features of the sub-sequences. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 4.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 4.
Citation Information
Patent Citations
Data sequence denoising method and device, electronic equipment and computer storage medium
CN111898080A