Aimed at the lack of parameters being difficult to be determined in the stage of relation fitting of water leveral and discharge,the paper used a new kind of swarm intelligent bionic algorithm—communal spiders optimization algorithm (SSO) to optimize the correlation parameters of water level and flow,and took the relation fitting of water lever and discharge in Renli and Zongguantian station of Lijiang river of Yunnan Province for example ,and compared the results with that of particle swarm optimization algorithm (PSO) and least square method (LSM) fitting. The results show that the average relative error absolute value of SSO algorithm for the fitting of water level and flow relationship in the two stations is 0.57% and 0.53% respectively, and the fitting precision is better than that of PSO and LSM. SSO algorithm has the advantages of fast convergence speed, strong global optimization ability, and so on. Using SSO algorithm to optimize the relationship water level and flow can get a better fitting effect.