| In recent years,with the significant growth of netizens and improvement of software technology,online consultation system generally reflected in business,government,education as well as entertainment,shopping and SNS.Currently,in order to exchange interactive advisory information more timely,those systems generally use the sophisticated and eclectic scheme,for example,they are Ajax,Comet,XHR based on polling and long connections,but these techniques exist delays,disorder or even lost,resulting in real-time and reliability is not high.On the other hand.information increases powerfully and becomes overload,recommendation algorithms have higher requirements on the scalability and accuracy.Therefore,how to ensure the real-time and reliability of the online consultation system and to increase the prediction accuracy and scalability,become two main threats.This paper studies on an online consultation system based on WebSocket and collaborative filtering algorithms,I divided into the following concrete work:Firstly,for the real-time performance and reliability stability issues in online consultation system,the paper analyzes and compares Ajax Polling,Comet,WebSocket methods,and then proposes a scheme based on WebS-ocket and flash bridged.The program use HTML5 WebSocket communication to achieve real-time data exchange and flash bridged can extend the compatibility for WebSocket of browsers with low version.A series of experiments show that this scheme can significantly improve the delay and reliability of online consultation system.Secondly,for the scalability and accuracy issues of CF algorithm,this paper analyzes the existing Slope one and Weighted Slope One algorithm and finds their scalability isn't high due to memory bottleneck.On this basis,we propose a distributed and improved algorithm algorithm based Weighted Slope One,with distributed method to train data,in each task the middle data can be directly loaded into memory,and parallel computing;addition to the similarity based projects to improve Weighted Slope One.Experimental results show that the improved algorithm are better than the original algorithm in terms of scalability and accuracy.Finally,combining these studies,this paper implements an online consultation system,and conducts experiments and system testing to verify the proposed design and the improved algorithm. |