This chapter focuses on the background knowledge of three relevant domains: information retrieval, optimization, and machine learning. It briefly introduces the deep learning basic method and common models to facilitate the in-depth study of readers. The chapter lists some sample codes for key algorithms or computational procedures written in C++ or Matlab language. Inverted index is one of the essential technologies of modern search engines. There are two basic operations for inverted index: add a new document to the index; return to the corresponding document collection when given a query composed of multiple terms. Inverted index is the cornerstone of large-scale information retrieval, while vector space model is one of the most fundamental and foremost methods for document similarity measurement in information retrieval. The aim of optimization is to find an optimal solution to a mathematically expressed optimization goal with systematic methods and thoughts.