The invention discloses a real-time recommendation
system and method based on Spark. A stacked recommendation
system framework based on Spark is constructed, and comprises a
data collecting module, an offline recommendation module, an online recommendation module and a recommendation module. The offline recommendation module is used for selecting a corresponding recommendation
algorithm from an offline recommendation
algorithm library according to user configuration parameters to
train user behavior data, and a user
feature model is obtained; the online recommendation module is used for sending the user behavior data to corresponding algorithms in an online recommendation
algorithm library for training, and an increment user
feature model is obtained; an
online model training engine is used for adopting the user
feature model obtained through training as a basic model, carrying out incremental updating through a current increment recommendation algorithm and the newly received user behavior data, and a newest user feature model is obtained. The recommendation module is used for updating a user recommendation
list in combination with an
inertia updating mechanism according to the user feature model. The accuracy and timeliness of the recommendation result can be effectively improved.