This invention discloses a sequence recommendation method based on multi-scale encoding and
capsule intent purification. The method acquires and preprocesses user dynamic interaction sequences, and extracts logically related sequence pairs based on the principle of prediction target consistency. Using a multi-scale segment mapping method, the preprocessed user dynamic interaction sequences are deconstructed into behavioral segments of different granularities, and features are extracted and weighted to form a fused sequence representation. The generated fused sequence representation is then subjected to
primary clustering, and the dynamic routing mechanism of the
capsule network is used to perform nonlinear mapping and
semantic enhancement on the cluster centers, generating a purified high-order intent
capsule set. A joint
loss function is constructed to uniformly optimize the main recommendation task and the multi-dimensional self-supervised auxiliary task. The parameters of the multi-scale
encoder, capsule network, and item embedding matrix are synchronously updated using the
backpropagation algorithm until the
recommendation model converges, resulting in a trained
recommendation model. Recommended sequences are then obtained based on the trained
recommendation model.