Mobile Internet will promote the continuous change of human interaction, leading to an increase in mobile traffic, so the demand for network bandwidth and data volume is rising rapidly, which is also one of the problems that 5G needs to solve. The mobile communication network of the railway system has the characteristics of high-speed user mobility, large-scale group mobility of users, high certainty of user mobile lines, and high QoS requirements for dispatching information. In order to improve the transmission reliability requirements of the railway system for wireless communication, a quick search method algorithm based on GMCS model to encode the number of each subinterval is proposed. Hybrid precoding is designed according to multivariate symmetry rules. The target beam is designed according to the GMCS model, and the hierarchical training beam is designed to minimize the mean square error between the training beam and the target beam as the objective function. Then, the fast search model based on beam overlap is extended to NLoS to solve the problem of misjudgment caused by multipath. In the simulation experiment, it proves that the search success rate of the research in this paper is 10% higher than that of the traditional algorithm. It improves the search speed and has obvious advantages in complexity. It can provide a dynamic reliable conversion mechanism for the railway communication environment, reduce the transmission power of the base station, and optimize the actual effect of uplink and downlink service requirements.