The invention provides a personalized recommendation method and
system based on a language modeling and elastic reasoning collaborative architecture, and belongs to the technical field of recommendation. The
system comprises a data module, a
language representation construction module, an elastic sub-model generation module, a dynamic routing training module and a self-adaptive recommendation module. In the implementation process, the
language representation construction module formats user behaviors and article information into a
natural language sequence through a predefined personalized prompt template, unified coding is conducted through a large
language model, and user and article language representations with rich
semantics are generated. The elastic sub-model generation module carries out multi-
scale structure segmentation on a feed-forward layer and multi-head attention in a unified Transform architecture, and a series of nested sub-models with gradually increased calculation complexity and consistent
semantics are constructed. In the model training process, the dynamic routing training module randomly activates sub-models of different scales for forward and reverse propagation in each training step, introduces a task-aware routing mechanism, and dynamically selects the optimal sub-model according to the characteristics of the current recommendation task in the reasoning stage. And the self-adaptive recommendation module loads the trained elastic language
recommendation model, and calls the sub-model selected by the dynamic
route to generate a recommendation result according to the context information and the task type of the target user. Through wide experimental
verification, the prediction performance superior to that of a full-size model is realized on various recommendation tasks, and the problem of performance fluctuation of a large
language model in a recommendation scene due to mismatching of a model scale and task requirements is effectively solved.