Abstract

The pumping station is one of the critical parts of the hydraulic structure in China. Traditional forecasting methods are limited in accuracy, time-consuming, and high cost, resulting in limited data availability. Therefore, simulation model analysis based on soft computation is a realistic and valuable alternative. This article intends to use the BP neural network to predict the safe operation status of pump stations and optimize the initial threshold and weight information of the BP network using the sparrow search algorithm (SSA) to improve the accuracy and generalization ability of the model. In addition, to more accurately reflect the correlation between various influencing factors and the safe operation status of the pumping station, the entropy weight method and the analytic hierarchy process were used to obtain the comprehensive weights of each main influencing factor. The experimental results show that the SSA-BP model can accurately predict the safe operation status of pumping stations, and compared with other traditional models, the SSA-BP model has better convergence and higher accuracy. This model provides a new approach for predicting the safe operation of pumping stations and has particular reference significance for predicting the safe operation of other pumping stations.

1. Introduction

With the rapid development of urbanization in modern society and the high demand for industrial production, pump stations are an essential component of modern urban infrastructure construction. Currently, our country has built 108,000 pumping stations. It also plays an irreplaceable role in urban water supply, industrial wastewater treatment, water environment ecological protection, and other aspects [1]. However, during long-term use, the pumping station may experience aging equipment, complete safety facilities, and untimely maintenance [2]; leakage of pumps, aging of electrical equipment, etc. may cause fires and explosions, leading to safety accidents and irreversible losses. According to traditional safety assessment methods, there are three types: the first type [3] uses National Safety Assessment Standards, such as the Pump Station Design Specification” to conduct safety assessments; the second type [4] involves experts using practical experience to assess safety; the third type [5] requires computer simulation technology to simulate the operation of a pump station, and through data analysis and evaluation, determine its safety. The first type of safety evaluation standard is often lacking or too simple to evaluate the safety of the pump station comprehensively [6]; the second type may have limited data obtained from on-site detection and may not reflect the comprehensive operation status and risks of the pump station; the third type, which uses simulation analysis models, may have inaccuracies that could lead to evaluation results that are inconsistent with the actual conditions [7]. Therefore, the problem of accurately judging the safety of pump station operation solely by traditional security evaluation methods and single defense and management methods is complex. Considering these situations, this article proposes a prediction model based on the sparrow search algorithm to optimize the BP neural network (SSA-BP) [8]; improving the accuracy and comprehensiveness of pump station operation can enhance safety and transform the current passive safety management mode into an active one, providing targeted preventive measures for the next step of pump station operation. This is an effective way to ensure the safe operation of pump stations [9].

The prediction of pump station operation safety is mainly divided into three stages. The first stage extracts the main influencing factors of pump station operation safety. The second stage is to evaluate the safety status of the pump station operation and determine the safety level. The third stage is the prediction of the safety status of the pump station operation. As the core part of the entire structure, the pump station operation safety prediction needs to analyze and process the safety of past and current pump station operations and then make predictions for the future. Chen et al. [10] proposed a pump station safety management model based on error theory. The model can classify primary accident types that are prone to occur at pump stations and determine the likelihood and impact range of events of different safety levels through error theory analysis. Through, the study and promotion of the wear prediction method for pump station pipelines and valves, Ou et al. [11] have effectively solved the uncertainty problem of mechanical relativity in the safety evaluation of pump station pressure systems, provided technical support for the operation and management of pump stations; Dawidowicz [12] conducted in-depth research on typical problems of pump stations and proposed a safety evaluation method that targets the main risks. Through the application of artificial neural network (ANN) algorithms, the analysis and determination of the protection level of the pump station is achieved, providing a basis for improving the safety of pump station operation. To address a series of technical issues in prediction further, many scholars have begun to explore neuroscience and artificial intelligence deeply. Hassabis et al. [13] studied the historical interaction between artificial intelligence and neuroscience, emphasizing the current progress of artificial intelligence. Imran et al. [14] artificial intelligence for disaster response (AIDR), which enables humans and machines to work together and apply human intelligence quickly to large-scale integration and cross between big data and other fields, has been proposed. The BP neural network model [15] is one of the most widely used models with good nonlinear prediction capabilities [16]. Kisi et al. [17] use three artificial intelligence methods, namely ANN, adaptive neuro-fuzzy inference system (ANFIS), and gene expression programing (GEP), to predict the daily changes in the lake water level. Lee et al. [18] developed an enhanced fresh food mixed sales forecasting model for CVS by combining self-organizing map neural networks with radial basis functions (RBF), called enhanced clustering and prediction model (ECPM). The model evaluated daily fresh food sales data for 6 months in Taiwan’s chain CVS. Huo et al. [19] adopted a stock price prediction model based on a three-layer BP neural network, which has a faster convergence speed and overcomes the redundancy and noise of samples. The model was simulated on the Matlab platform. The results showed that the LM-BP model achieved high accuracy in short-term stock price prediction. Zhang et al. [20] established a BP neural network based on an improved genetic algorithm (GA) to simulate the relationship between the appearance of welds and the characteristics of the weld pool shadow. The model’s effectiveness was analyzed through two welding speed experiments, and its predictive performance was verified. To improve the predictive accuracy of the BP neural network model, Song et al. [21] proposed a prediction model combining the AdaBoost algorithm and the BP neural network. The effectiveness of the prediction model was verified through the prediction of railway freight volume statistical data from 1999 to 2005. Chen et al. [22] during COVID–19 pandemic, used the BP neural network model to predict users’ suitability for online teaching, with a prediction accuracy of 77.5%. Kalinic et al. [23] used a BP neural network to predict the attitudes of mobile commerce consumers and found that neural networks have higher predictive ability than the linear models. During the application process, the BP algorithm also has its flaws, such as its dependence on the initial values and thresholds of the network, the disadvantage of slow convergence speed and easy falling into local minima during training. Park proposed PSO for the connection weight matrix of the BP neural network [24, 25]. However, PSO has problems such as long peak times. Dehuri and Cho [26] proposed GA to optimize neural networks, but GA has problems such as slow convergence speed; Xue and Shen [27] proposed a new type of swarm intelligence optimization algorithm (SSA). Zhao and Guo [28] optimized the extreme learning machine (ELM) using the SSA to predict short-term wind power output. Simulation results showed that the proposed SSA-ELM model had high-prediction accuracy and strong generalizability, providing decision support for wind power forecasting and secure grid operations.

Based on scholars’ research in the prediction field, the BP neural network can achieve good predictions, and the SSA intelligent optimization algorithm can be used to optimize machine learning models and improve the accuracy of the predictions. The SSA-BP prediction model has specific potential and application prospects in predicting pump station operation safety. However, there is little related research, so this article further explores its theoretical basis and corresponding simulation effects. A pump station operation safety prediction model based on SSA-BP is obtained using the SSA algorithm to optimize the BP neural network prediction model.

2. Pump Station Safety Assessment System

This study aims to establish a predictive model for the safe operation of pumping stations. First, it is necessary to establish a safety evaluation system for pumping station operation, analyze the factors affecting the operation of pumping stations, and describe and calculate them qualitatively and quantitatively to obtain the safety level of the pumping station (Figure 1).

On-site investigation and risk identification are used to obtain safety factors of pump station operation. Then, the analytic hierarchy process (AHP) is used to determine the evaluation index system for pump station operation safety. Combine the objective weights obtained by the entropy weight method (EWM) with the subjective weights obtained by AHP to obtain the comprehensive weights [29]. Determine the scoring criteria using the Delphi expert scoring method [30]. To score the second-level indicators for the safe operation of actual pumping stations and perform uniform data transfer processing on the results. Calculate the comprehensive weight with the underlying indicators to obtain the safety index of the first-level indicator and ultimately evaluate the pump station’s safety level and safety assessment.

2.1. Safety Evaluation Index System

Analyze the main factors affecting the operation status of pump stations and classify the unsafe elements of pump station operation status, mainly including the five categories of pump station operation management system, operation management behavior, civil structure safety status, safety status of electromechanical equipment, and safety status of metal equipment. They are used as primary evaluation indicators, divided into five primary indicators (A1, A2, A3, A4, and A5). Then, they are further decomposed and refined into 26 secondary indicators, including safety production management system, organization setup, and personnel management, comprehensive management system, operation management system, operation management and scheduling, contingency management, flood control, engineering facilities and management, maintenance and comprehensive safety management, concrete structure, masonry structure, main and auxiliary warehouse, water inlet and outlet structures, other building structures, main water pump, main motor, transformer, auxiliary equipment, computer monitoring system, other electrical equipment, gate and flap, trash rack, crane, hoist, and other metal structures, denoted as (B1,…B26) and shown in Figure 2.

According to the relevant national regulations and existing literature materials [3133], the rating grading standard for evaluating the safety operation status of pumping stations is divided into four levels: safe, basically safe, relatively unsafe, and unsafe. The specific numerical standards corresponding to each evaluation level are shown in Table 1 to facilitate calculation.

2.2. Determination of Index Weight
2.2.1. Analytic Hierarchy Process

The AHP was proposed by the American operations research expert Saty in 1970 [34]. The basic steps of the AHP include constructing the decision matrix by comparing the evaluation indicators at each level, calculating the weight vector, and determining the relative weights of the indicators.

Step 1: Construct the judgment matrix according to the opinions of experts on each evaluation, as follows:

In the formula, m represents the number of criteria, and represents the ratio of importance between the -th and -th criteria.

Step 2: Normalize each value in the judgment matrix column by column:

Step 3: Add the normalized rows together to obtain :

Step 4: Normalize the resulting to obtain the relative weight :

Step 5: According to the requirements of the AHP, to ensure the consistency of evaluators’ thinking and the compatibility of judgment matrices during the evaluation process, a consistency check should be conducted after determining the judgment matrices and weights of various elements. CI represents the consistency index of the judgment matrix:

is the maximum eigenvalue of the judgment matrix. m is the dimension of the matrix. If , the judgment matrix meets the consistency requirements. When , the judgment matrix must be modified until consistent. RI is the random consistency index, as shown in Table 2.

2.2.2. Entropy Weight Method

The weights in the EWM [35] are determined by the magnitude of the information of each evaluation indicator. When the information of an indicator changes significantly, the smaller the entropy value, the larger the weight, indicating that the indicator is more important in the evaluation system. The calculation steps of the entropy value method are as follows:

Step 1: Construct the evaluation matrix as follows:

The formula represents pumping stations and evaluation indicators. represents the corresponding value of the the pumping station under the j-th evaluation indicator.

Step 2: Nondimensional processing of data to eliminate the influence of physical quantities. The calculation formula is as follows:

Step 3: Calculate the ratio or contribution of the j-th level and -th evaluation index. The calculation formula is as follows:

Step 4: Calculate the entropy value of the -th evaluation index:

Step 5: Calculate the differential coefficient. The calculation formula is as follows:

Step 6: Determine the weight of the evaluation index as follows:

2.2.3. Comprehensive Weighting Method

The AHP primarily determines weights based on experts’ practical experience and knowledge structure. Although it reflects subjective intentions well, it still lacks scientific calculation. The EWM mainly relies on the objective scientific calculation of data, but it is easy to deviate from reality. The comprehensive weight evaluation indicators are determined jointly by AHP and EWM. The relevant formula is as follows:

2.3. Scoring

Using the Delphi method to assign safety index values for pump station operation. About, 10–20 experts score are based on the specific situation of pump station operation safety, considering the actual benefits and safety level of the pump station. The expert scoring results are then averaged and standardized.

2.4. Calculation

Based on the above evaluation work, the comprehensive scoring method is used to comprehensively score the safety status of the North–South Water Diversion Project East Route Pump Station, with each indicator being weighted and scored layer by layer, resulting in a comprehensive safety value for the operation safety of the East Route Pump Station of the North–South Water Diversion Project. The calculation formula is as follows:

In the formula, is the comprehensive safety value of the pump station operation, is the safety index of each primary indicator, is the safety index of the secondary indicator, and is the comprehensive weight of each indicator.

3. SSA-BP Neural Network

3.1. BP Neural Network

An ANN is a method of information processing based on a biological neural network. In this theory, ANNs can simulate any complex nonlinear relationship through nonlinear units and have been widely used in artificial intelligence and sensitivity. The structure of an artificial neural network consists of the input, hidden, and output layers. The BP neural network model is one of the most widely used ANN models. The typical BP network structure model is shown in Figure 3.

The BP neural network generates the prediction value by linking the input, hidden, and output layers with their corresponding weights and thresholds. The weights and thresholds are updated through the gradient descent method by comparing the predicted and true response values to minimize the prediction error.

Initialize the weights and thresholds within the range of , where the weights and thresholds connecting the input layer and the hidden layer are represented as and , respectively. The weights and thresholds connecting the hidden layer and the output layer are represented as and , respectively.

Update the corresponding weights and thresholds. Specifically, the updated weight of the output layer is given by the formula , and the updated threshold of the output layer is given by the formula . The updated weight of the hidden layer is given by the formula , and the updated threshold of the hidden layer is given by the formula . Here, is the learning rate and is the number of iterations.

During training, if the overall error is less than the predetermined value, the training is completed. Otherwise, return to Step 3 for new training rounds until the error exceeds the requirement or the algorithm reaches the maximum training time.

3.2. Sparrow Search Algorithm

Although, the BP neural network can obtain the final convergence of the network learning process, its disadvantage is that the learning and training time is too long, and it is easy to converge to the optimal local value. The BP neural network has been improved by incorporating the SSA, the SSA-BP neural network, to address this issue.

The SSA is a novel swarm optimization method proposed by Xue and Shen [27] in 2020, based on sparrow foraging behavior and antipredator behavior. The algorithm is implemented by idealizing the behavior of sparrows and formulating the corresponding rules. In SSA, each sparrow has three possible behaviors:(1)As a discoverer, searching for food, which is the individual who finds food earliest in the sparrow group;(2)As a follower, following the discoverer to obtain food;(3)As a scout, guarding and scouting.

The basic process of SSA is to initialize the sparrow population, calculate individual fitness values and determine the best and worst fitness individuals, sequentially update the positions of discoverers, joiners, and scouts, and update them through continuous iteration until the termination condition is met.

The position update of the discoverers is as follows:where represents the current iteration number, L represents a matrix where each element is 1, is the maximum number of iterations, Q is a random number following standard normal distribution, is the position of the -th sparrow in the -th dimension, is a uniform random number between 0 and 1, represents the warning value, and represents the safety value. When , indicates that some sparrows in the population have detected the presence of predators and have issued warnings to other sparrows in the population so that the population can quickly fly to other safe areas for foraging. When , it indicates that there are no predators around the foraging environment, and discoverers can search in a wider area.

The position update formula for the joiners is as follows:where is the population size, is a matrix where each element is randomly assigned as 1 or −1, and is the current globally worst position, and is the current discoverer’s best position. When , it means that the -th joiner with poor fitness is in a hungry state and has not obtained food and needs to continue to search for food in other areas to obtain energy.

While sparrows are foraging, some individuals among them are responsible for vigilance. When danger approaches, they will abandon their current food, regardless of whether the sparrow is a discoverer or a joiner, and move to a new location. The position update formula for the scouts is as follows:where is a random number from , is the step size control parameter, which follows a random normal distribution with variance 1 and means 0, represents the current global best position, and represents a minimum constant to prevent the denominator from being 0. , , and represent the current sparrow’s global worst, global best, and individual fitness. When , it indicates that the sparrow in the middle of the population has detected the danger of the current position. It needs to move closer to other sparrows to reduce the risk of being preyed upon. When , it indicates that the sparrow is at the population’s edge and very susceptible to predator attacks.

3.3. SSA-BP Neural Network Algorithm

The BP neural networks with gradient descent may result in local minima instead of global minima. These shortcomings can be addressed by optimizing the initial connection weights and thresholds. Therefore, this study uses SSA to optimize the initial connection weights and thresholds of BP neural networks and assigns the optimal connection weights and thresholds found by SSA to BP neural networks to establish the optimal BP neural network model [3638]. The specific process of SSA-BP is shown in Figure 4.

Build a BP neural network and determine its topology. Initialize the parameters of the SSA algorithm, including initial population size, maximum evolution generation, the proportion of producers in the population, the proportion of sparrows aware of population danger, safety threshold, etc. and input sample data. Calculate and rank the fitness values of individual sparrows to determine the best and worst fitness values and their corresponding positions. According to Equations (1618), compute the new sparrow position’s fitness value, compare the updated population’s fitness values with the original optimal weight, and update the optimal global information. Check if the iteration meets the termination criteria. If it does, stop the iteration and record the best solution, then continue with the previous step; otherwise, recalculate. Stop the SSA algorithm iteration and use the output global optimal solution as the initial connection weights and thresholds in the BP neural network training model.

4. Experiments

4.1. Data Collection

This article uses Matlab software for simulation verification. Based on the concept of data space, 100 safe operation supervision results of pumping stations are selected from the 3-year data from the Huaihe River Basin South-to-North Water Diversion Project from 2020 to 2022. This simulation experiment is completed using the constructed pumping station operation safety index system mentioned above.

4.2. Determine the Weight and Security Level of Data

The 26 secondary indicators of the safety indicator system for pump station operation can be found in Table 3, and the calculation of the comprehensive weight of the five primary indicators is shown in Table 4.

Use the Delphi method to assign safety index values to its underlying indicators, then use comprehensive weights to calculate the upper-level indicators one by one, finally obtaining the comprehensive safety index of the pumping station and the corresponding safety level. The safety index of the first-level indicators and the comprehensive safety index and safety level were selected for 10 pumping stations, as shown in Table 5.

4.3. Data Preprocessing

To verify the predictive model for the safe operation of pumping stations, 100 sets of supervised inspection results for the safe operation of pumping stations were selected as data samples. In order to prevent the overfitting problems caused by too few training samples, the ratio of training sample data allocation is higher than that of test data. In order to get the right allocation problem, we conducted a control treatment, as shown in Table 6. After screening and processing, a ratio of 8 : 2 is more appropriate. Twenty sample data were selected as the test set to verify the model’s accuracy, and 80 data sets were used as the training set for the network training. The input is the safety index after the secondary indicators of each pumping station, and the output is the comprehensive index and safety level of the pumping station. Normalization was performed on it, and five sets of training set samples are shown in Table 7.

4.4. Model Validation and Performance Indicators

The structure of the BP neural network is as follows: 26 secondary indicators, including the safety production management system, comprehensive management system, and operation management system of cranes, gate machines, etc. These are used as the final input parameters. Therefore, the number of input layer neurons is 26, and the number of output layer neurons in the BP network is consistent with the expected output. The decision variable of the sample is the safety index of different pump stations, which is directly represented by the numbers. Therefore, the number of output layer nodes is 1. The maximum training iteration time is 1,000, the minimum training target error is 0.00001, and the learning rate is 0.01.

A BP network can contain different numbers of hidden layers. However, it has been theoretically proven that a BP network with only one hidden layer can achieve any nonlinear mapping. The number of neurons in the hidden layer is generally determined by the empirical formulas, such as Equation (19). Therefore, the number of neurons in the hidden layer is usually between 6 and 15. As shown in Figure 5, when the number of neurons in the hidden layer is 10, the model’s MSE is the smallest. Therefore, the number of neurons in the hidden layer is set to 10 for the training model.where is the number of hidden layer nodes, is the number of input layer nodes, l is the number of output layers, and is a constant between 1 and 10.

The SSA initialization parameters are as follows: the initial population size is 30, the maximum number of iterations is 50%, 20% of the population are discoverers who realize the danger, and 20% are scouts who are conscious of the danger. The safety threshold is 0.6. As shown in Table 8.

To more intuitively understand the prediction accuracy of the model, we chose four performance indicators to evaluate the model error: mean-square error (MSE), root-mean-square error (RMSE), mean-absolute error (MAE), and mean absolute percentage error (MAPE); as shown in Table 9.

MSE is used to detect the deviation between the predicted and actual values of the model. The smaller the MSE, the higher the model’s accuracy in describing experimental data. RMSE measures the deviation between the observed and true values by taking the square root of MSE. MAE can more accurately describe the true situation of prediction errors. MAPE divides MAE by the true value and then multiplies it by a percentage, which can more accurately describe the relative error.

We also use goodness-of-fit as another evaluation metric for our model, goodness-of-fit is an indicator to describe the degree of match between the model and actual data. It determines the model’s applicability by calculating the similarity between the actual observed values and the theoretically predicted values, showing the reliability and stability comparisons of the BP and SSA-BP prediction results.

Figure 5 shows that the model’s MSE is minimized when the number of neurons in the hidden layer is 10; therefore, the number of neurons in the hidden layer is 10.

4.5. Comparison of Results

The Matlab software was used to simulate the operational safety status of 100 pump stations. BP and SSA-BP models, GA-BP models, and PSO-BP models were constructed. In Figure 6, it was found that compared with the BP model, The SSA-BP model finds the optimal connection weight and threshold and obtains stable and accurate prediction values. This indicates that the SSA-BP model has improved the reliability and predictive accuracy of the pump station operation prediction model by combining parameter optimization schemes with the basic BP model. It can also detect anomalies and issue warnings, making it easier for the future pump station safety management and safe use of the pump station.

More specifically, in Figure 7, we found that the SSA-BP model generates smaller errors than the BP model, indicating that its estimates are more accurate.

To further verify the reliability of the predicted results, the MAE, MSE, RMSE, and MAPE of SSA-BP were compared with GA-BP, PSO-BP, and BP, as shown in Table 10.

In Table 10, the SSA-BP model produced smaller MAEs than the BP, GA-BP, and PSO-BP models, decreasing by 75.65%, 57.66%, and 62.78%, respectively. Similarly, the SSA-BP model produced a smaller MSE than the BP, GA-BP, and PSO-BP models, decreasing by 95.7%, 64.83%, and 72.71%, respectively.

Further comparison of their fitting goodness-of-fit values helped in analyzing and evaluating the effectiveness of the models, aiding in the selection of the best predictive model. The evaluation metrics of the goodness of fit and error analysis have different roles in analyzing experimental results. The comparative results of the goodness-of-fit indicate the applicability of the SSA-BP model and the selection of the best model. In contrast, the comparative results of error analysis indicate the accuracy and reliability of the model. The results of all comparison metrics are consistent, verifying that SSA improves the prediction accuracy of the basic BP model and is more effective than optimization algorithms such as GA and PSO.

5. Conclusions

(1) Using the SSA to optimize the weights and thresholds of the BP neural network, compared with other traditional models, the SSA-BP model produces lower MSE than the BP, GA-BP, and PSO-BP models, with reductions of 95.7%, 64.83%, and 72.71%, respectively. The results indicate that the SSA-BP model has better robustness and accuracy.

(2) In addition, the model also has certain limitations. The model only considers the five main influencing factors and the safety of the pumping station may be affected by the environmental changes, such as changes in weather, water level, and other factors. The SSA-BP model may not be able to adapt well to this environmental change, resulting in inaccurate prediction results for the safe operation of pumping stations. Further improvement is still needed in the future.

Data Availability

Requests for the data used to support the findings of this study will be considered by the corresponding author.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This study was supported by the Anhui Provincial Natural Science Foundation (Grant Nos. 2008085QE245 and 2308085US08), the Natural Science Research Project of Higher Education Institutions in Anhui Province (Grant No. KJ2019A0747), the School-Enterprise Cooperative Development Project of Anhui Jianzhu University (Grant No. HYB20210178), the Project of Science and Technology Plan of Department of Housing and Urban-Rural Development of Anhui Province (Grant No. 2021-YF22).