As more and more high-throughput protein-protein interactions data are collected, a large fraction of newly discovered proteins have an unknown functional role. A challenge to the scientific community is to assign these newly proteins with a biological function that can be verified by experiment. On the basis of thorough analysis of existing protein function prediction, we take double direction enumeration method combined with the distance constrains to find protein pathway, and propose a new predicting model based on topological structural of protein-protein interaction (PPI) network and protein pathway, which greatly increases the speed of the algorithm. To validate the method, the Yeast Saccharomyces cerevisiae protein-protein interaction network and corresponding protein pathways are analyzed. Comparing with other methods, our results can substantially improve the accuracy and robustness of functional annotation.