The paper uses BP neural network method to analyze the behavior preference of web users to achieve user behavior clustering, help advertisers to find online advertising design and optimize web design. At the same time, the paper analyzes the user preference cluster analysis, which helps users to find the desired webpage and content more conveniently, shorten the retrieval time and improve the retrieval efficiency. Firstly, the paper analyzes the log files of the web server, and then conducts session classification, finds the frequent data from the session vector, and normalizes the generated p...