A rain amount recognition method and system based on MFCC and PSO-SVM

By combining dynamic and static features of MFCC and optimizing the SVM model using random forest and particle swarm optimization algorithms, the problem of low accuracy in rainfall recognition in existing technologies is solved, and efficient rainfall recognition is achieved.

CN119939368BActive Publication Date: 2026-07-07NANTONG INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANTONG INST OF TECH
Filing Date
2025-01-08
Publication Date
2026-07-07

Smart Images

  • Figure CN119939368B_ABST
    Figure CN119939368B_ABST
Patent Text Reader

Abstract

The application discloses a rain amount identification method and system based on MFCC and PSO-SVM, and relates to the technical field of signal processing, and comprises the following steps: obtaining a rain sound signal and pre-processing the rain sound signal; performing fast Fourier transform and discrete cosine transform on the pre-processed signal, calculating MFCC static features, and calculating dynamic features according to a dynamic solving formula; performing feature importance evaluation by using a random forest algorithm, and screening features with high correlation as inputs; optimizing an SVM model by using a PSO algorithm, finding an optimal parameter combination of a regularization parameter c and a kernel function parameter g of the SVM model, and analyzing rain amount identification performance; the application combines dynamic features with static features, improves the identification performance of the model, selects features by using the random forest algorithm, reduces feature dimension, improves the generalization ability of the model, meanwhile, the PSO algorithm is used to optimize the regularization parameter and the kernel function parameter of the SVM model, and the identification performance is improved, and the accuracy of rain amount identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and specifically to a rainfall identification method and system based on MFCC and PSO-SVM. Background Technology

[0002] Rainfall is an important indicator of climate conditions in a region. Changes in the climate of a region can be directly reflected in changes in rainfall in that region. Rainfall forecasting plays an important role in agricultural production and urban work and life. However, making accurate and timely rainfall forecasts is a challenge. Therefore, the accurate identification of rainfall is of great research significance in meteorological research and disaster prevention and mitigation.

[0003] Traditional rainfall measurement methods typically rely on devices such as tipping bucket rain gauges, which directly collect and measure rainfall to predict rainfall type. However, these devices often experience mechanical wear and measurement errors as they age. With the continuous development of information intelligence and machine learning technologies, various pattern recognition technologies are gaining importance, and rain sound signal recognition is one such emerging monitoring method. Rain sound signal recognition analyzes the sound produced by raindrops hitting objects to achieve real-time monitoring and assessment of rainfall conditions. Ferroudj used machine learning technology to detect rain sounds in environmental recordings, effectively predicting the type of heavy rain and non-heavy rain, as well as real-time rainfall intensity. Wang et al. used monitoring audio as input to build an automatic classification system, transforming rainfall observation tasks into audio classification tasks, providing an effective supplement to traditional rainfall monitoring technologies. Alkhatib et al. designed an acoustic rainfall sensing system based on scientific citizen participation and used a Gaussian process regression model to test and analyze parameters such as rainfall intensity and duration. Teng Shaohua et al. used multi-neural network models such as probabilistic neural networks (PNN) and radial basis functions (RBF) for rainfall type identification and rainfall prediction. Rainfall prediction methods based on rain sound recognition remain a hot research topic in academia. While the aforementioned methods have improved the accuracy of rainfall recognition to some extent, they still suffer from the following problems: the extracted MFCC static features cannot characterize the dynamic changes of rain sound signals, resulting in slightly lower recognition accuracy for light and heavy rain; furthermore, neural network models have limited applicability to large training data samples due to drawbacks such as local optima and slow convergence speed. Therefore, a rainfall recognition method and system based on MFCC and PSO-SVM is needed to address these issues. Summary of the Invention

[0004] The purpose of this invention is to provide a rainfall identification method and system based on MFCC and PSO-SVM to solve the problems existing in the prior art mentioned in the background section.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A rainfall identification method based on MFCC and PSO-SVM includes the following steps:

[0007] S1: Acquire rain sound signals and preprocess them;

[0008] S2: MFCC dynamic and static feature extraction. The preprocessed signal is subjected to fast Fourier transform and discrete cosine transform to calculate the static features of MFCC and the dynamic features are calculated according to the dynamic solution formula.

[0009] S3: Feature selection. The random forest algorithm is used to evaluate the importance of features. Based on the relevance level, highly relevant features are selected as input.

[0010] S4: Construct a PSO-SVM rainfall recognition model, optimize the SVM model using the PSO algorithm, find the optimal combination of regularization parameter c and kernel function parameter g of the SVM model, train the optimized SVM model using the training set and test set, and analyze the rainfall recognition performance.

[0011] Preferably, the specific steps for preprocessing the rain sound signal in S1 are as follows:

[0012] The original rain sound signal x(n) is preprocessed by denoising, pre-emphasis, framing, and windowing. The signal x(n) is pre-emphasized by passing it through a high-pass filter, then the signal is divided into frames, and each frame is multiplied by a window function. The Hamming window has the following form:

[0013]

[0014] Where 0≤n≤N-1, N is the window length, and a is usually 0.46. After preprocessing, the signal s(n) is obtained.

[0015] Preferably, the process of extracting the dynamic and static features of the rain sound signal MFCC in S2 includes the following steps:

[0016] S21: Perform a Fast Fourier Transform on the preprocessed signal s(n) to obtain the spectrum S of each frame. i (k), the formula is as follows:

[0017]

[0018] S22: Regarding the spectrum S i (k) Take the modulus and then square it to obtain the energy spectrum of the speech signal. Pass the energy spectrum through a set of Mel-scale triangular filters. Finally, calculate the logarithmic energy of the output of each filter group. The formula is:

[0019]

[0020] Where H m (k) is the Mel filter bank, defined as:

[0021]

[0022] S23: Substituting the obtained logarithmic energy s(m) into the discrete cosine transform, we obtain the static characteristics of MFCC, as shown in the formula:

[0023]

[0024] S24: Standard MFCC features only reflect the static characteristics of rain sound signals. The dynamic characteristics of rain sound signals can be described by the difference spectrum of these static features. The formula for calculating the dynamic features is:

[0025]

[0026] Where, d t This represents the first-order dynamic characteristics of the rain sound signal. Calculating the characteristics of the t-th frame requires coefficients from t+n to tn; typically, N is taken as 2, and for d... t The second-order dynamic features of the rain sound signal can be obtained by using the same formula; finally, the 39-dimensional MFCC features of the rain sound signal are obtained, including 13-dimensional static features, 13-dimensional first-order dynamic features and 13-dimensional second-order dynamic features.

[0027] Preferably, the specific steps for feature importance evaluation using the random forest algorithm in S3 are as follows:

[0028] For each feature, its importance weight is calculated using the OUT-OF-BAG error, where importance V(X) is the weight of the feature. j ) is represented as:

[0029]

[0030] Where e t Let $\frac{ ... To randomly change the j-th feature variable X of the out-of-bag data j The value of the out-of-bag error is recalculated.

[0031] Preferably, step S4 specifically includes the following steps:

[0032] S41: Population initialization: Initialize the local search capability, global search capability, maximum population size, and maximum number of evolutions parameters of PSO-SVM. Initialize the velocity of each particle. Each particle includes the penalty parameter g and the kernel function parameter c. Calculate the initial fitness.

[0033] S42: Calculating the particle's fitness value: In the PSO-SVM algorithm, each particle represents a parameter combination. Its fitness value is calculated using a fitness function. Then, each particle updates its individual optimal position and global optimal position based on the fitness function result. Finally, based on the individual and global optimal positions, the particle moves towards the optimal direction to search for the minimum value of the fitness function, finding the optimal parameter combination. The SVM-based cross-validation accuracy fitness function is defined as follows:

[0034]

[0035] S43: Finding individual and population extreme values: Compare the fitness value of each particle with the individual extreme value. If the fitness function value is smaller, the fitness value is called the new individual extreme value. Then compare the new individual extreme value with the global best fitness value. If the individual extreme value is smaller, it is taken as the current population extreme value.

[0036] S44: Update particle velocity and position, using the following formula:

[0037]

[0038] Where w is the weighting factor; t is the current iteration number; c1 and c2 are acceleration factors; r1 and r2 are uniformly random numbers in the range [0,1], their purpose being to limit the position and velocity of the particles; x ij v represents the position of the i-th particle; ij p represents the velocity of the i-th particle; ij It is the optimal location the particle experiences;

[0039] S45: Determine whether the current particle meets the termination condition. The termination condition is the error threshold of the fitness function. If it is less than the error threshold, the current iteration terminates and the optimal parameter combination is output. Otherwise, return to step S42 and continue iterative calculation.

[0040] S46: Obtain the optimal parameter combination, train the optimized SVM model using the training and test sets, and analyze the rainfall recognition performance.

[0041] This invention also provides a rainfall identification system based on MFCC and PSO-SVM, comprising:

[0042] Rain sound signal preprocessing module: used to perform noise reduction, pre-emphasis, and windowing preprocessing on the collected rain sound signals to obtain a relatively clean rain sound signal;

[0043] Rain sound signal feature extraction module: used to extract the static and dynamic features of MFCC from the preprocessed rain sound signal through fast Fourier transform and discrete cosine transform;

[0044] Rain sound signal feature selection module: It is used to calculate the importance weight of each dimension of the extracted rain sound signal 39-dimensional MFCC features using the feature importance evaluation mechanism built into random forest, and select features according to the relevance level, and screen the highly relevant features as input.

[0045] SVM Model Optimization Module: Used to optimize SVM models. It utilizes the global search capability of PSO to optimize the regularization parameter c and kernel function parameter g of the SVM to obtain the optimal parameter combination.

[0046] Rainfall recognition module: Used to identify rainfall amount. Selected features are input into the optimized SVM model to identify rainfall amount and analyze the model's recognition performance.

[0047] Compared with the prior art, the beneficial effects of the present invention are:

[0048] The MFCC dynamic features extracted in this invention describe the dynamic changes in rain sound. Combining dynamic and static features effectively improves the model's recognition performance. Using the random forest algorithm for feature selection effectively reduces feature dimensionality and improves the model's generalization ability. Simultaneously, the PSO algorithm optimizes the regularization and kernel parameters of the SVM model, effectively enhancing recognition performance and increasing the accuracy of rainfall identification. Compared to traditional methods using only MFCC static features, combining dynamic and static features improves the overall accuracy of rainfall identification by 8%. After random forest feature selection, the overall accuracy of rainfall identification improves by 5%. Using the PSO-SVM model for rainfall identification, the overall accuracy reaches 91.1%, with the accuracy for heavy and light rain exceeding 90%. Attached Figure Description

[0049] Figure 1 This is a flowchart of the rainfall identification method of the present invention.

[0050] Figure 2 This is a schematic diagram of the basic model framework of the present invention.

[0051] Figure 3 This is a schematic diagram comparing the accuracy of rainfall identification based on different features according to the present invention.

[0052] Figure 4 This is a schematic diagram of the particle fitness curve of the PSO optimization algorithm of this invention.

[0053] Figure 5 This is a schematic diagram illustrating the accuracy of rainfall identification based on PSO-SVM according to the present invention.

[0054] Figure 6This is a schematic diagram of the rainfall identification confusion matrix based on PSO-SVM of the present invention.

[0055] Figure 7 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0056] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0057] Please see Figure 1-7 The present invention provides the following technical solutions:

[0058] A rainfall identification method based on MFCC and PSO-SVM includes the following steps:

[0059] S1: Acquire the rain sound signal and preprocess it. The specific steps for preprocessing the rain sound signal are as follows:

[0060] The original rain sound signal x(n) is preprocessed by denoising, pre-emphasis, framing, and windowing. The signal x(n) is pre-emphasized by passing it through a high-pass filter, then the signal is divided into frames, and each frame is multiplied by a window function. The Hamming window has the following form:

[0061]

[0062] Where 0≤n≤N-1, N is the window length, and a is usually 0.46. After preprocessing, the signal s(n) is obtained.

[0063] S2: MFCC dynamic and static feature extraction. The preprocessed signal undergoes Fast Fourier Transform and Discrete Cosine Transform to calculate the static features of the MFCC and the dynamic features based on the dynamic solution formula. The process of MFCC dynamic and static feature extraction from rain sound signals includes the following steps:

[0064] S21: Perform a Fast Fourier Transform on the preprocessed signal s(n) to obtain the spectrum S of each frame. i (k), the formula is as follows:

[0065]

[0066] S22: Regarding the spectrum S i (k) Take the modulus and then square it to obtain the energy spectrum of the speech signal. Pass the energy spectrum through a set of Mel-scale triangular filters. Finally, calculate the logarithmic energy of the output of each filter group. The formula is:

[0067]

[0068] Where H m(k) is the Mel filter bank, defined as:

[0069]

[0070] S23: Substituting the obtained logarithmic energy s(m) into the discrete cosine transform, we obtain the static characteristics of MFCC, as shown in the formula:

[0071]

[0072] S24: Standard MFCC features only reflect the static characteristics of rain sound signals. The dynamic characteristics of rain sound signals can be described by the difference spectrum of these static features. The formula for calculating the dynamic features is:

[0073]

[0074] Where, d t This represents the first-order dynamic characteristics of the rain sound signal. Calculating the characteristics of the t-th frame requires coefficients from t+n to tn; typically, N is taken as 2, and for d... t The second-order dynamic features of the rain sound signal can be obtained by using the same formula; finally, the 39-dimensional MFCC features of the rain sound signal are obtained, including 13-dimensional static features, 13-dimensional first-order dynamic features and 13-dimensional second-order dynamic features.

[0075] S3: Feature selection. The random forest algorithm is used to evaluate feature importance. Based on relevance levels, highly relevant features are selected as input. The specific steps for feature importance evaluation using the random forest algorithm are as follows:

[0076] For each feature, its importance weight is calculated using the OUT-OF-BAG error, where importance V(X) is the weight of the feature. j ) is represented as:

[0077]

[0078] Where e t Let $\frac{ ... To randomly change the j-th feature variable X of the out-of-bag data j The value of the out-of-bag error is recalculated.

[0079] S4: Construct a PSO-SVM rainfall recognition model, optimize the SVM model using the PSO algorithm, find the optimal combination of regularization parameter c and kernel function parameter g, train the optimized SVM model using the training and test sets, and analyze the rainfall recognition performance; specifically including the following steps:

[0080] S41: Population initialization: Initialize the local search capability, global search capability, maximum population size, and maximum number of evolutions parameters of PSO-SVM. Initialize the velocity of each particle. Each particle includes the penalty parameter g and the kernel function parameter c. Calculate the initial fitness.

[0081] S42: Calculating the particle's fitness value: In the PSO-SVM algorithm, each particle represents a parameter combination. Its fitness value is calculated using a fitness function. Then, each particle updates its individual optimal position and global optimal position based on the fitness function result. Finally, based on the individual and global optimal positions, the particle moves towards the optimal direction to search for the minimum value of the fitness function, finding the optimal parameter combination. The SVM-based cross-validation accuracy fitness function is defined as follows:

[0082]

[0083] S43: Finding individual and population extreme values: Compare the fitness value of each particle with the individual extreme value. If the fitness function value is smaller, the fitness value is called the new individual extreme value. Then compare the new individual extreme value with the global best fitness value. If the individual extreme value is smaller, it is taken as the current population extreme value.

[0084] S44: Update particle velocity and position, using the following formula:

[0085]

[0086] Where w is the weighting factor; t is the current iteration number; c1 and c2 are acceleration factors; r1 and r2 are uniformly random numbers in the range [0,1], their purpose being to limit the position and velocity of the particles; x ij v represents the position of the i-th particle; ij p represents the velocity of the i-th particle; ij It is the optimal location the particle experiences;

[0087] S45: Determine whether the current particle meets the termination condition. The termination condition is the error threshold of the fitness function. If it is less than the error threshold, the current iteration terminates and the optimal parameter combination is output. Otherwise, return to step S42 and continue iterative calculation.

[0088] S46: Obtain the optimal parameter combination, train the optimized SVM model using the training and test sets, and analyze the rainfall recognition performance.

[0089] like Figure 3 As shown, Figure 3This invention utilizes a BP neural network model to analyze rainfall identification results under two scenarios: static features of extracted rain sound signals (MFCC) and a combination of static and dynamic features of MFCC. Experimental results show that compared to using only static MFCC features for rainfall identification, combining dynamic MFCC features improves the accuracy of rainfall identification for both light and heavy rain. The identification rate for moderate rain decreases slightly, but still reaches 80%, and the overall rainfall identification accuracy is improved by 8%. Therefore, combining static and dynamic features of MFCC can effectively improve the accuracy of rainfall identification.

[0090] Table 1. Average Importance Weights of 39-Dimensional MFCC Features

[0091]

[0092] As shown in Table 1, to further improve the accuracy of rainfall identification, the most representative features were selected, and feature importance was evaluated using the RF algorithm. Table 1 shows the average importance weight of the 39-dimensional MFCC features after 20 calculations. Based on Table 1 and the correlation level classification, a feature threshold of 0.30 was used to remove slightly correlated features, leaving the 32-dimensional rain sound signal MFCC features as input. An SVM model was then used for rainfall identification, and the performance of rainfall identification was analyzed. Experimental results show that after feature selection to remove slightly correlated features, the overall accuracy of rainfall identification improved by 5%, and improvements were also seen in the identification of medium and light rainfall, with accuracy increases of 14% and 10.2%, respectively. Therefore, feature selection before rainfall identification is feasible.

[0093] like Figure 4 As shown, by Figure 4 It can be seen that in the first 32 iterations, the particle fitness value remained at 0.161538, possibly indicating that it was trapped in a local optimum. However, from the 32nd to the 33rd iteration, the fitness value decreased significantly, indicating that the PSO algorithm found a better solution and quickly converged to it. After that, the fitness value remained stable, indicating that the algorithm reached the optimal solution and no longer improved. The optimal penalty parameter c was 3.5122 and the optimal kernel function parameter g was 7.4566.

[0094] like Figure 5 and Figure 6 As shown, Figure 5 , Figure 6 These represent the rainfall recognition accuracy and confusion matrix of the PSO-SVM model, respectively. Figure 5 , Figure 6It can be seen that the SVM model's rainfall recognition performance was significantly improved after PSO optimization. The PSO-SVM model had only one misclassified sample in both light and moderate rain, and the overall rainfall recognition accuracy was 20% higher than the unoptimized SVM model. Furthermore, improvements were seen in the recognition of heavy, moderate, and light rain, especially in the recognition accuracy of heavy and light rain, reaching 85% and 95.5% respectively. Therefore, the method of optimizing the SVM model using PSO demonstrates excellent performance in improving rainfall recognition accuracy, validating its practicality and accuracy.

[0095] Table 2 Rainfall identification results (%) for different models

[0096]

[0097] As shown in Table 2, to further verify the effectiveness of the PSO-SVM rainfall recognition model, a comparative experimental group was set up, using the traditional SVM, BP neural network, and PSO-SVM models for rainfall recognition. Table 2 shows the rainfall recognition results under different models. Since the purpose of the experiment is to accurately identify the amount of rainfall from the rain sound signal, the recognition accuracy is the most important indicator among all evaluation metrics. The experimental results show that the traditional SVM model has the worst rainfall recognition performance, with a rainfall recognition accuracy of only 60.03%. The F1 score reflects the balance between precision and recall. Due to the large difference between precision and recall in the SVM model, the F1 score is not high, only 58.8%. The BP neural network performs better than the SVM model in rainfall recognition, with significant improvements in all metrics, reaching 80.48% in accuracy and 79.16% in F1 score. The PSO-SVM model has the highest performance in rainfall recognition, outperforming both the SVM and BP neural network models in all evaluation metrics, with a recognition accuracy of 91.10% and an F1 score of 90.78%.

[0098] Table 3. Comparison of average recognition accuracy (%) for heavy, medium, and light rain under different models

[0099]

[0100] As shown in Table 3, after comparing the overall average recognition accuracy of different models, the average recognition accuracy of different models for heavy, medium, and light rainfall was further analyzed. Table 3 compares the average recognition accuracy of heavy, medium, and light rainfall under different models. According to Table 3, the SVM model has a lower recognition accuracy for light and heavy rain, only showing a relatively good performance in moderate rain, reaching 84.45%. The BP neural network model performs well in light rain, with an accuracy close to 90%. It is slightly less effective in moderate and heavy rain, but its accuracy is generally higher than that of the SVM model. The PSO-SVM model significantly outperforms the traditional SVM and BP neural network models in all rainfall conditions, with the most significant improvement in recognition accuracy for heavy and light rain, both exceeding 90%. This addresses the problem of poor recognition performance for heavy and light rain to some extent, proving the effectiveness of the PSO-SVM model. Although it is slightly less effective in moderate rain, its accuracy still reaches 86.59%.

[0101] like Figure 7 As shown, the present invention also provides a rainfall identification system based on MFCC and PSO-SVM, comprising:

[0102] Rain sound signal preprocessing module: used to perform noise reduction, pre-emphasis, and windowing preprocessing on the collected rain sound signals to obtain a relatively clean rain sound signal;

[0103] Rain sound signal feature extraction module: used to extract the static and dynamic features of MFCC from the preprocessed rain sound signal through fast Fourier transform and discrete cosine transform;

[0104] Rain sound signal feature selection module: It is used to calculate the importance weight of each dimension of the extracted rain sound signal 39-dimensional MFCC features using the feature importance evaluation mechanism built into random forest, and select features according to the relevance level, and screen the highly relevant features as input.

[0105] SVM Model Optimization Module: Used to optimize SVM models. It utilizes the global search capability of PSO to optimize the regularization parameter c and kernel function parameter g of the SVM to obtain the optimal parameter combination.

[0106] Rainfall recognition module: Used to identify rainfall amount. Selected features are input into the optimized SVM model to identify rainfall amount and analyze the model's recognition performance.

[0107] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A rainfall identification method based on MFCC and PSO-SVM, characterized in that, Includes the following steps: S1: Acquire rain sound signals and preprocess them; S2: MFCC dynamic and static feature extraction. The preprocessed signal is subjected to fast Fourier transform and discrete cosine transform to calculate the static features of MFCC and the dynamic features are calculated according to the dynamic solution formula. The process of extracting dynamic and static features of the rain sound signal MFCC in S2 includes the following steps: S21: For the preprocessed signal Perform a Fast Fourier Transform to obtain the spectrum of each frame. The formula is as follows: S22: Regarding the spectrum The energy spectrum of the speech signal is obtained by taking the modulus and then squaring it. This energy spectrum is then passed through a set of Mel-scale triangular filters. Finally, the logarithmic energy output of each filter set is calculated using the following formula: in It is a Mel filter bank, which is defined as: S23: The obtained logarithmic energy Substituting the discrete cosine transform, we obtain the static characteristics of MFCC, as shown in the formula: S24: Standard MFCC features only reflect the static characteristics of rain sound signals. The dynamic characteristics of rain sound signals can be described by the difference spectrum of these static features. The formula for calculating the dynamic features is: in, Representing the first-order dynamic characteristics of the rain sound signal, calculate the... Frame features need arrive The coefficient; usually, The value is 2. The second-order dynamic features of the rain sound signal can be obtained by using the same formula; finally, the 39-dimensional MFCC features of the rain sound signal are obtained, including 13-dimensional static features, 13-dimensional first-order dynamic features and 13-dimensional second-order dynamic features. S3: Feature selection. The random forest algorithm is used to evaluate the importance of features. Based on the relevance level, highly relevant features are selected as input. S4: Construct a PSO-SVM rainfall recognition model, optimize the SVM model using the PSO algorithm, find the optimal combination of regularization parameter c and kernel function parameter g of the SVM model, train the optimized SVM model using the training set and test set, and analyze the rainfall recognition performance.

2. The rainfall identification method based on MFCC and PSO-SVM according to claim 1, characterized in that, The specific steps for preprocessing the rain sound signal in S1 are as follows: For the original rain sound signal Denoising, pre-emphasis, framing, and windowing preprocessing are performed to improve the signal quality. The signal is pre-emphasized using a high-pass filter, then segmented into frames, and each frame is multiplied by a window function, with the Hamming window taking the following form: Among them, 0 , It refers to the window length, generally speaking. The value is set to 0.46, and the signal is obtained after preprocessing. .

3. The rainfall identification method based on MFCC and PSO-SVM according to claim 1, characterized in that, The specific steps for feature importance evaluation using the random forest algorithm in S3 are as follows: For each feature, its importance weight is calculated using the OUT-OF-BAG error. Represented as: in Let $\frac{ ... To randomly change the data outside the bag One characteristic variable The value of the out-of-bag error is recalculated.

4. The rainfall identification method based on MFCC and PSO-SVM according to claim 1, characterized in that, S4 specifically includes the following steps: S41: Population initialization: Initialize the local search capability, global search capability, maximum population size, and maximum number of evolutions parameters of PSO-SVM. Initialize the velocity of each particle. Each particle includes the penalty parameter g and the kernel function parameter c. Calculate the initial fitness. S42: Calculating the particle's fitness value: In the PSO-SVM algorithm, each particle represents a parameter combination. Its fitness value is calculated using a fitness function. Then, each particle updates its individual optimal position and global optimal position based on the fitness function result. Finally, based on the individual and global optimal positions, the particle moves towards the optimal direction to search for the minimum value of the fitness function, finding the optimal parameter combination. The SVM-based cross-validation accuracy fitness function is defined as follows: S43: Finding individual and population extreme values: Compare the fitness value of each particle with the individual extreme value. If the fitness function value is smaller, the fitness value is called the new individual extreme value. Then compare the new individual extreme value with the global best fitness value. If the individual extreme value is smaller, it is taken as the current population extreme value. S44: Update particle velocity and position, using the following formula: Where w is the weighting factor; t is the current iteration number; and It is the acceleration factor; and It is a uniform random number in the range [0,1], the purpose of which is to limit the position and velocity of the particles; Let i be the position of the i-th particle; This represents the velocity of the i-th particle; It is the optimal location the particle experiences; S45: Determine whether the current particle meets the termination condition. The termination condition is the error threshold of the fitness function. If it is less than the error threshold, the current iteration terminates and the optimal parameter combination is output. Otherwise, return to step S42 and continue iterative calculation. S46: Obtain the optimal parameter combination, train the optimized SVM model using the training and test sets, and analyze the rainfall recognition performance.

5. A rainfall identification system based on MFCC and PSO-SVM designed according to any one of claims 1-4, characterized in that, include: Rain sound signal preprocessing module: used to perform noise reduction, pre-emphasis, and windowing preprocessing on the collected rain sound signals to obtain a relatively clean rain sound signal; Rain sound signal feature extraction module: used to extract the static and dynamic features of MFCC from the preprocessed rain sound signal through fast Fourier transform and discrete cosine transform; Rain sound signal feature selection module: It is used to calculate the importance weight of each dimension of the extracted rain sound signal 39-dimensional MFCC features using the feature importance evaluation mechanism built into random forest, and select features according to the relevance level, and screen the highly relevant features as input. SVM Model Optimization Module: Used to optimize SVM models. It utilizes the global search capability of PSO to optimize the regularization parameter c and kernel function parameter g of the SVM to obtain the optimal parameter combination. Rainfall recognition module: Used to identify rainfall amount. Selected features are input into the optimized SVM model to identify rainfall amount and analyze the model's recognition performance.