# Research on Intelligent Grading Evaluation of Water Conservancy Project Safety Risks Based on Deep Learning

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- The set of task scenarios of water conservancy projects was collated, and the sample data were organized in chunks by task scenarios to construct a two-by-two linearly independent task scenario vector.
- To address the problem of missing features in short texts, this paper constructs a vector of hazard source information representation based on a priori knowledge as auxiliary information, and weighted fusion of sample data in terms of task scenarios through an a priori attention mechanism, which makes the model have a more similar learning style to that of humans.
- In response to the defects of the transformer network model with large computation, integrating project characteristics task scenes and sliding windows, proposed an improved water engineering safety risk evaluation model based on transformer and built a task scene judgment gate to restrict the attention mechanism to a sliding window with task scenario, which reduces the network computation and improves the model operation efficiency.

## 2. Literature Review

## 3. Materials and Methods

#### 3.1. Study Area and Data Source

#### 3.2. Task Scenarios

#### 3.3. A Priori Attention

#### 3.4. Improved the Water Engineering Safety Risk Evaluation Model Based on Transformer

Algorithm 1: Intelligent hierarchical evaluation model of water conservancy project safety risk based on transformer algorithm | |

Input | Text vector based on task scene ${\mathrm{X}}_{1}$ |

Priori knowledge vector ${\mathrm{X}}_{2}$ | |

Task scene vector T | |

Output | The risk prediction level corresponding to the text vector Y |

1 | Function Linearity-Agnostic(T): |

2 | for (i = 0; i < T.length; i++) |

3 | Temp = new Array(T.length).fill(0) |

4 | temp[i] = i |

5 | T[i] = concat(T[i],temp) |

6 | Return T |

7 | End function |

8 | Function a priori-Attention(${\mathrm{X}}_{1}$, ${\mathrm{X}}_{2}$) |

9 | Q = ${\mathrm{W}}^{\mathrm{Q}}\cdot {\mathrm{X}}_{1}$, K = ${\mathrm{W}}^{\mathrm{K}}\cdot {\mathrm{X}}_{1}$, V = ${\mathrm{W}}^{\mathrm{V}}\cdot {\mathrm{X}}_{1}$ |

10 | R = Scale(Q $\cdot {\mathrm{K}}^{\mathrm{T}}$) = $\frac{\mathrm{Q}\cdot {\mathrm{K}}^{\mathrm{T}}}{\sqrt{{\mathrm{d}}_{\mathrm{k}}}}$ |

11 | Z = SoftMax(R)$\cdot $V |

12 | Return Z + ${\mathrm{X}}_{2}$ |

13 | End function |

14 | Function Slide_Window_i(X, T): |

15 | $if\mathrm{T}\left[\mathrm{i}\right]\cdot \mathrm{T}\left[\mathrm{j}\right]!=0$ |

16 | ${\mathrm{Q}}^{\mathrm{i}}={\mathrm{W}}_{\mathrm{qi}}\cdot \mathrm{X},{\mathrm{K}}^{\mathrm{i}}={\mathrm{W}}_{\mathrm{ki}}\cdot \mathrm{X}$, ${\mathrm{V}}^{\mathrm{i}}={\mathrm{W}}_{\mathrm{vi}}\cdot \mathrm{X}$ |

17 | ${\mathrm{Q}}_{\mathrm{i}}=\frac{{\mathrm{Q}}_{\mathrm{i}}}{\left|{\mathrm{T}}_{\mathrm{i}}\right|}$, ${\mathrm{K}}_{\mathrm{i}}=\frac{{\mathrm{K}}_{\mathrm{i}}}{\left|{\mathrm{T}}_{\mathrm{i}}\right|}$, ${\mathrm{V}}_{\mathrm{i}}=\frac{{\mathrm{V}}_{\mathrm{i}}}{\left|{\mathrm{T}}_{\mathrm{i}}\right|}$ |

18 | R = Scale(${\mathrm{Q}}_{\mathrm{i}}$ $\cdot {\mathrm{K}}_{\mathrm{i}}{}^{\mathrm{T}}$) = $\frac{{\mathrm{Q}}_{\mathrm{i}}\cdot {\mathrm{K}}_{\mathrm{i}}{}^{\mathrm{T}}}{\sqrt{{\mathrm{d}}_{\mathrm{k}}}}$ |

19 | Y = SoftMax(R) $\cdot $V |

20 | Else continue |

21 | Return Y |

22 | End function |

23 | T = Linearity-Agnostic(T) |

24 | X = a priori-Attention(${\mathrm{X}}_{1},{\mathrm{X}}_{2}$) |

25 | Y = Slide_Window_i(X, T) |

## 4. Results

#### 4.1. Experimental Preparation

- In the a priori knowledge validity experiments, the same dataset and prediction model are used, and the only difference is whether or not a priori knowledge is introduced and a priori knowledge is used as auxiliary information to compensate for the feature defects in the short text for comparison experiments to verify the validity of a priori knowledge.
- In the model prediction correctness experiments, multiple network models (SVM, CNN, GAT, RCNN, transformer) are selected for the risk level prediction correctness comparison experiments on the project dataset. The SVM model parameters are as follows: the penalty parameter c was set as the default value 1, the kernel function was selected as the Gaussian radial basis function, and the function parameter g was set as 0.25; other parameters of the neural network model are as follows: embedding-dim is 256, max-length is 100, batch-size is 16, and the learning rate is 1 × 10
^{−5}. - In the model efficiency experiments, the transformer model and the improved model are selected for comparative analysis in terms of running time to verify the efficiency of the improved model.

#### 4.2. A Priori Attentional Validity Experiment

#### 4.3. Experiment on the Correctness of Model Prediction

- SVM: this method uses TF-IDF to construct a hazard feature vector for hazard source text and input it into the SVM model for training to realize hazard source prediction;
- CNN: this method uses CNN to extract the text feature information of hazard sources and then uses softmax as the classifier;
- RCNN: this method is a new model constructed by combining CNN and recurrent neural network (RNN), which can combine the advantages of the two neural networks and improve the performance of the model;
- GAT: the heterogeneous text graph is constructed by using the hazard information representation vector based on prior knowledge as input. This method uses the attention mechanism on the basis of graph convolutional network modeling, which can achieve good results.
- Transformer: The model is a neural network model based on a self-attention mechanism, which is widely used in the field of natural language processing, such as machine translation, language understanding, and generation.

#### 4.4. Model Efficiency Experiments

## 5. Discussion

## 6. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Jiang, D.; Xin, Y.; Yang, F. Construction of safety production risk management system for hydraulic engineering. Northeast. Water Conserv. Hydropower
**2022**, 40, 56–57. [Google Scholar] - ICOLD. Lessons from Dam Incidents; Complete Edition; International Commission on Large Dams (ICOLD): Paris, France, 1974. [Google Scholar]
- ICOLD. Deterioration of Dams and Reservoirs; International Commission on Large Dams (ICOLD): Paris, France, 1983. [Google Scholar]
- ICOLD. Dam Failures Statistical Analysis; Bulletin99; International Commission on Large Dams (ICOLD): Paris, France, 1995. [Google Scholar]
- Ge, W.; Jiao, Y.T.; Li, Z.K.; Zhang, Z.; Guo, X. Current status and development trend of research on the consequences of dam failure risk. Adv. Water Sci.
**2020**, 31, 143–151. [Google Scholar] - Sheng, J.; Li, H.; Sheng, T. Statistical analysis of reservoir dam failures and their loss of life in China. J. Water Resour. Water Transp. Eng.
**2022**, 1–17. Available online: https://kns.cnki.net/kcms/detail/32.1613.TV.20221006.1325.002.html (accessed on 10 March 2023). - Pan, H.; Liang, Z.; Li, Y.; Xue, Q. Safety evaluation model and application of transmission and substation project based on entropy power material element. Pract. Underst. Math.
**2018**, 48, 13–20. [Google Scholar] - Williams, R.F.; Abeyta, R.D. Management of Risk and Uncertainty in Systems Acquisition: Proceedings of the 1983 Defense Risk and Uncertainty Workshop Held at Fort Belvoir, Virginia on 13–15 July 1983; Defense Systems Management Coll Fort Belvoir Va: Fort Belvoir, VA, USA, 1983. [Google Scholar]
- Ward, S.; Chapman, C. Transforming project risk management into project uncertainty management. Int. J. Proj. Manag.
**2003**, 21, 97–105. [Google Scholar] [CrossRef] - Lyons, T.; Skitmore, M. Project risk management in the Queensland engineering construction industry: A survey. Int. J. Proj. Manag.
**2004**, 22, 51–61. [Google Scholar] [CrossRef] - Bing, L.; Tiong, R.L.K. Risk management model for international construction joint ventures. J. Constr. Eng. Manag.
**1999**, 125, 377–384. [Google Scholar] [CrossRef] - Saaty, T.L. The Analytic Hierarchy Process: Planing, Priarity Selling, Resource Allocation; McGraw Hill: New York, NY, USA, 1980; pp. 222–309. [Google Scholar]
- Mills, A. A systematic approach to risk management for construction. Struct. Surv.
**2001**, 19, 245–252. [Google Scholar] [CrossRef] - Hreinsson, E.B.; Jonasson, K. Monte carlo based risk analysis in hydroelectric power system expansion planning in the presence of uncertainty in project cost and capacity. In Proceedings of the 38th International UPEC, Thessaloniki, Greece, 1–3 September 2003. [Google Scholar]
- Yang, J.; Zhang, H. Research on fuzzy hierarchical comprehensive evaluation method for large water conservancy project risks. People’s Yangtze River
**2007**, 6, 148–150. [Google Scholar] - Zadeh, L.A. Fuzzy sets. Inf. Control
**1965**, 8, 338–353. [Google Scholar] [CrossRef] - Zhang, S. Safety assessment of offshore drilling and repair rig derricks and bases based on hidden danger analysis. Mar. Eng.
**2021**, 50, 6. [Google Scholar] - He, M.; Sun, J.; Cheng, Y. A review of text classification research based on plain Bayesian. Intell. Sci.
**2016**, 34, 8. [Google Scholar] - Wang, S.I.; Manning, C.D. Baselines, and bigrams: Simple, good sentiment and topic classification. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics, Jeju, Republic of Korea, 10 July 2012; Volume 2: Short Papers. pp. 90–94. [Google Scholar]
- Kim, Y. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, 25–29 October 2014; ACL: Stroudsburg, PA, USA, 2014; pp. 1746–1751. [Google Scholar]
- Guo, D.-L.; Liu, S.-M.; Zheng, Q.-S. A convolutional neural network-based classification method for short text on the Internet. Comput. Mod.
**2017**, 4, 78–81. [Google Scholar] - Liu, P.; Qiu, X.; Huang, X. Recurrent neural network for text classification with multi-task learning. arXiv
**2016**, arXiv:1605.05101. [Google Scholar] - Zhou, Y.; Xu, B.; Xu, J.; Yang, L.; Li, C. Compositional recurrent neural networks for chinese short text classification. In Proceedings of the 2016 IEEE/WIC/ACM International Conference on Web Intelligence (WI), Omaha, NE, USA, 13–16 October 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 137–144. [Google Scholar]
- He, C.; Yang, J.; Luo, C.L. Feature fusion short text classification algorithm based on BiLSTM neural network. Intell. Comput. Appl.
**2019**, 9, 21–27. [Google Scholar] - Liu, T.; Zhang, S.R.; Wang, C.; Li, Z.H.; Guan, H.; Wang, X.H. BERT-BiLSTM hybrid model for intelligent text analysis of water conservancy construction accidents. J. Hydroelectr. Eng.
**2022**, 41, 1–12. [Google Scholar] - Li, L.; Zhang, H.; Pang, J.; Huang, J. Dam surface crack detection based on deep learning. In Proceedings of the 2019 International Conference on Robotics, Intelligent Control and Artificial Intelligence, Shanghai, China, 20–22 September 2019; pp. 738–743. [Google Scholar]
- Liu, Y.Q.; Fu, Z.M.; Wu, H.; Jie, W. Hazard identification of water conservancy construction based on improved YOLOv3-DN algorithm. J. Saf. Environ.
**2022**, 22, 550–557. [Google Scholar] - Li, B.; Xiang, Y.; Feng, D.; He, Z.; Wu, J.; Dai, T.; Li, J. A short text classification model incorporating knowledge perception and dual attention. J. Softw.
**2022**, 33, 3565–3581. [Google Scholar] - Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Zhang, X.; Qiu, X.; Pang, J.; Liu, F.; Li, X. Dual-axial self-attention network for text classification. Sci. China Inf. Sci.
**2021**, 64, 1–11. [Google Scholar] [CrossRef] - Hu, Z.; Jian, F.; Tang, S.; Ming, Z.; Jiang, B. DFSMN-T: Chinese speech recognition combining strong language model Transformer. Comput. Eng. Appl.
**2022**, 58, 187–194. [Google Scholar] - Diligenti, M.; Roychowdhury, S.; Gori, M. Integrating prior knowledge into deep learning. In Proceedings of the 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), Cancun, Mexico, 18–21 December 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 920–923. [Google Scholar]
- Liu, X.; Yuan, J.B.; Wang, T.X. An indoor human behavior recognition method based on scene prior knowledge. Comput. Sci.
**2022**, 49, 225–232. [Google Scholar] - Niyogi, P.; Girosi, F.; Poggio, T. Incorporating prior information in machine learning by creating virtual examples. Proc. IEEE
**1998**, 86, 2196–2209. [Google Scholar] [CrossRef] - Bao, J.T.; Tang, R.; Liu, T. Analysis of the first flood control and drainage scheduling benefits of the Xin Meng River extension and dredging project. Jiangsu Water Resour.
**2021**, 11, 57–60. [Google Scholar] - Wang, J. Design and application of improved bailey bridge in the new Menghe project. People’s Yellow River
**2022**, 44 (Suppl. 1), 107–108+110. [Google Scholar] - Fu, L.J. Construction of linear irrelevant vector groups. Heilongjiang Sci. Technol. Inf.
**2010**, 31, 25–25286. [Google Scholar] - Xuan, D.; Wang, J.; Yu, H.; Zhao, J. Application of prior knowledge in deep learning. Comput. Eng. Des.
**2015**, 36, 3087–3091. [Google Scholar]

First-Class Mission Scenes | Secondary Mission Scenes |
---|---|

Earthwork | Basic regulations |

Open earth excavation | |

Concealed earth excavation | |

Open stone excavation | |

Concealed stone excavation | |

Stonework blasting operation | |

Construction and safety support | |

earth-rock filling |

Hazardous Source Category | Types of Accidents That May Result |
---|---|

Equipment, facilities, tools, accessories defects | Object strikes |

Management Factor Deficiency | Vehicle Injuries |

Harsh climate and environment | Mechanical damage |

Behavioral hazards | Lifting Injuries |

Construction operations do not meet the specifications | Electrocution |

Toxic and harmful gases | Falling from a height |

Toxic chemical spill | Collapse |

Behavioral hazards | Explosion, fire |

Poor working site environment | Poisoning, asphyxiation |

Fire Safety | Other Injuries |

Risk Level | Quantity | Example Sentences of Experimental Corpus |
---|---|---|

Level I | 1830 | Structure support material does not meet the requirements |

Level II | 1877 | The mud discharge line needs to pass through the bridge hole and pile group, did not check the mud discharge pipe fixed measures |

Level III | 2748 | When connecting and dismantling the mud pipe in windy and rough waters, the operator did not fasten the safety rope |

Level IV | 1045 | The setting of steel escalators does not meet the safety requirements |

Prediction Level | Precision | Recall | F1 | Accuracy | |||||
---|---|---|---|---|---|---|---|---|---|

Grade I | Grade II | Grade III | Grade IV | ||||||

True level | Grade I | 1424 | 361 | 35 | 10 | 0.759 | 0.778 | 0.768 | 0.778 |

Grade II | 275 | 1309 | 254 | 39 | 0.619 | 0.697 | 0.656 | 0.697 | |

Grade III | 146 | 362 | 2033 | 207 | 0.814 | 0.740 | 0.775 | 0.740 | |

Grade IV | 32 | 82 | 177 | 754 | 0.747 | 0.722 | 0.714 | 0.722 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Tao, F.; Pi, Y.; Deng, M.; Tang, Y.; Yuan, C.
Research on Intelligent Grading Evaluation of Water Conservancy Project Safety Risks Based on Deep Learning. *Water* **2023**, *15*, 1607.
https://doi.org/10.3390/w15081607

**AMA Style**

Tao F, Pi Y, Deng M, Tang Y, Yuan C.
Research on Intelligent Grading Evaluation of Water Conservancy Project Safety Risks Based on Deep Learning. *Water*. 2023; 15(8):1607.
https://doi.org/10.3390/w15081607

**Chicago/Turabian Style**

Tao, Feifei, Yanling Pi, Menghua Deng, Yongjun Tang, and Chi Yuan.
2023. "Research on Intelligent Grading Evaluation of Water Conservancy Project Safety Risks Based on Deep Learning" *Water* 15, no. 8: 1607.
https://doi.org/10.3390/w15081607