Abstract With the rapid development of the technology, the amount of information on the has reached an unprecedented scale. People can get any information they want whether from puter or mobile phone. How to get more useful information quickly and accurately from the massive data and how to explore the potential valuable knowledge and patterns to make the more intelligent so that people can get better experience has e a serious problem in the era. In this context Web data mining emerged as one of the effective ways to solve this problem. There are three areas in web data mining including web content mining, web structure mining and web log mining. The main background of this thesis is web log mining. Since the web log data is of high-dimensional, massive, semi-structured or unstructured characteristics, traditional data mining algorithms can not meet the performance requirements. So the particle swarm algorithm of the swarm intelligence is applied to the user clustering. Studies have shown that the algorithm has better performance on high-dimensional data than tradition clustering algorithms. This thesis firstly researches on the basic principles of classic cluster algorithm and Particle Swarm Optimization (PSO) algorithm. And then analyzes pares the advantages and disadvantages between several classic user clustering algorithms and particle swarm clustering algorithm. Secondly, for the problems of existing clustering algorithm such as easy to fall into local optimum result and instability on high-dimensional data, an improved PSO algorithm based on K-means is proposed. By defining the divergence to determine the timing of K-means algorithm operation, the new algorithm makes full use of the local search capability of K-means and the global search capability of PSO to accelerate the convergence speed and also improve the results accuracy. Thirdly, the thesis introduces the concept of fitness variance to make inertia weight in particle swarm algorithm adjust i