In order to realize the effective prediction of landslide risk in the tunnel entrance area, an multivariate time series model is established on the basis of the traditional model, taking temperature and rainfall factors as additional input indicators. Bacterial foraging optimization algorithm (BFOA) is used to search the global optimal solution of the key parameters \\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\gamma$$\\end{document} and \\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\sigma^{2}$$\\end{document} of least squares support vector machine (LSSVM) to improve its regression accuracy, and the evolved LSSVM is used to describe the aforementioned multivariate time series model. At the same time, a remote real-time internet of things (IoT) monitoring system for the tunnel entrance section, including monitoring indicators such as surface subsidence, temperature, and rainfall, has also been designed and implemented, providing a stable and accurate data source for the realization of this prediction model. Based on the engineering measurement data, the accuracy of the established model is checked and analyzed, the optimal value of historical data amount is determined to be 5 days, and the optimal value of prediction step is 1 day. The research results are applied in the construction of Wendong tunnel of Molin expressway, Yunnan, China. Practice shows that the prediction results of the multivariate time series model established in this study is accurate. This method can realize the prediction and early warning of slope risk, which provides a effective technical means for risk control of tunnel portal section.