In order to provide more personalized recommendation services for users as well as improve the platform's traffic and user satisfaction, a recommendation method based on the TwinBERT model has been proposed. As a matter of fact, this method combines not only the basic information of users and items but also user comments or item text information to predict users' behaviors and make more accurate recommendations. The text information in the dataset is encoded in sentences using the BERT model, and the encoded text features are fused with other features to obtain a representation of user and item embedding vectors. These vectors are then used to predict the user's rating of the item and recommend relevant items for the user. The proposed method was tested on the Amazon review dataset and the MovieLens dataset, and the experimental results showed that it improved over traditional recommendation algorithms in terms of accuracy and efficiency.