Search

CN-122019871-A - Cross-domain recommendation method, model training method and device

CN122019871ACN 122019871 ACN122019871 ACN 122019871ACN-122019871-A

Abstract

The embodiment of the application discloses a cross-domain recommendation method, a model training method and a device. The method comprises the steps of obtaining user portrait data of a user in at least one source field, generating a first prompt instruction based on the user portrait data, inputting the first prompt instruction into a first large language model, obtaining an initial recommended object set generated by the first large language model, wherein the first prompt instruction is used for prompting the first large language model to generate an initial recommended object belonging to a target field according to the user portrait data, matching candidate objects in the target field based on the initial recommended object set to obtain a target recommended object set, and each target recommended object in the target recommended object set is a candidate object matched with the initial recommended object in the candidate object set, wherein the candidate objects in the candidate object set are preset recommended objects. The cross-domain recommendation effect can be improved based on semantic understanding capability and generative retrieval capability of the large language model.

Inventors

  • DU YONG
  • YANG HANG
  • WANG ZHENG
  • WU XIANGYU
  • WEN SHIYANG
  • LIU ZHIQIANG

Assignees

  • 北京达佳互联信息技术有限公司

Dates

Publication Date
20260512
Application Date
20260116

Claims (14)

  1. 1. A cross-domain recommendation method, comprising: Acquiring user portrait data of a user in at least one source field; Generating a first prompt instruction based on the user portrait data, inputting the first prompt instruction into a first large language model, and acquiring an initial recommended object set generated by the first large language model, wherein the first prompt instruction is used for prompting the first large language model to generate an initial recommended object belonging to a target field according to the user portrait data; And matching candidate objects in the candidate object set in the target field based on the initial recommendation object set to obtain a target recommendation object set, wherein each target recommendation object in the target recommendation object set is a candidate object matched with the initial recommendation object in the candidate object set, and the candidate objects in the candidate object set are preconfigured recommendable objects.
  2. 2. The method of claim 1, wherein the matching candidate objects in the candidate object set of the target area based on the initial recommended object set to obtain a target recommended object set comprises: generating initial recommendation object description information corresponding to each initial recommendation object in the initial recommendation object set; converting each initial recommendation object description information into a corresponding initial recommendation object vector representation respectively; And carrying out similarity retrieval based on the initial recommended object vector representation and candidate object vector representations respectively corresponding to the candidate objects in the candidate object set to obtain the target recommended object set.
  3. 3. The method of claim 2, wherein generating initial recommendation object description information corresponding to each initial recommendation object in the initial recommendation object set, respectively, comprises: Generating a second prompting instruction based on each initial recommended object in the initial recommended object set, and inputting the second prompting instruction into a second large language model, wherein the second prompting instruction is used for prompting the second large language model to generate initial recommended object description information corresponding to each initial recommended object; And acquiring initial recommended object description information corresponding to each initial recommended object generated by the second large language model.
  4. 4. The method of claim 2, wherein the converting each of the initial recommended object description information into a corresponding initial recommended object vector representation, respectively, comprises: And respectively converting the description information of each initial recommended object into a corresponding initial recommended object vector representation by using an embedded model.
  5. 5. The method of claim 1, wherein the user representation data comprises user attribute data and user behavior data in at least one source domain, the behavior data comprising a sequence of behaviors and/or behavior statistics.
  6. 6. The method according to any one of claims 1 to 5, wherein the first large language model is a cross-domain recommendation model obtained by embedding a domain type encoder in a backbone network of a pre-trained large language model and performing supervised fine tuning, or the first large language model is a cross-domain recommendation model obtained by embedding a domain type encoder in a backbone network of a pre-trained large language model and performing supervised fine tuning and preference alignment optimization.
  7. 7. A method of model training, comprising: embedding a domain type encoder in a backbone network of a pre-trained large language model to obtain an initial model, wherein the domain type encoder is used for converting an input natural language into a domain identification vector, and the domain identification vector is used for describing a domain corresponding to the natural language; acquiring a plurality of first training samples, wherein the first training samples comprise user portrait data of a sample user in at least one source field and interactive objects in a target field; and performing supervision fine tuning on the initial model by using the plurality of first training samples to obtain a first large language model for performing cross-domain object recommendation, wherein a first prompting instruction generated based on user portrait data is used as input of the initial model in the supervision fine tuning process, an interactive object in a target domain is used as target output of the initial model, and the first prompting instruction is used for prompting the initial model to generate a recommended object belonging to the target domain according to the user portrait data.
  8. 8. The method of claim 7, wherein the method further comprises: generating a plurality of object sample pairs according to the recommended objects generated by the first large language model, wherein each object sample pair comprises an object positive sample and an object negative sample, the object positive sample is the object of positive feedback of a user in the recommended objects generated by the first large language model, and the object negative sample is the object of negative feedback of the user in the recommended objects generated by the first large language model; And performing preference alignment optimization on the first large language model by using the plurality of object sample pairs.
  9. 9. The method of claim 8, wherein said optimizing the alignment of the first large language model using the plurality of object sample pairs comprises: Performing a first stage of preference alignment optimization on the first large language model based on a first set of sample pairs of the plurality of object sample pairs; performing preference alignment optimization of a second stage on the first large language model obtained by the preference alignment optimization of the first stage based on a second sample pair set of the plurality of object sample pairs; Wherein the first set of sample pairs has a lower learning difficulty than the second set of sample pairs.
  10. 10. A cross-domain recommendation device, comprising: The acquisition module is used for acquiring user portrait data of a user in at least one source field; The generation module is used for generating a first prompt instruction based on the user portrait data and inputting the first prompt instruction into a first large language model, wherein the first prompt instruction is used for prompting the first large language model to generate an initial recommended object belonging to a target field according to the user portrait data and acquiring an initial recommended object set generated by the first large language model; The matching module is used for matching candidate objects in the candidate object set in the target field based on the initial recommendation object set to obtain a target recommendation object set, each target recommendation object in the target recommendation object set is a candidate object matched with the initial recommendation object in the candidate object set, and the candidate objects in the candidate object set are preconfigured recommended objects.
  11. 11. A model training device, comprising: The model construction module is used for embedding a domain type encoder in a backbone network of the pre-trained large language model to obtain an initial model, wherein the domain type encoder is used for converting an input natural language into a domain identification vector, and the domain identification vector is used for describing a domain corresponding to the natural language; The system comprises a monitoring fine-tuning module, a monitoring fine-tuning module and a target field recommendation module, wherein the monitoring fine-tuning module is used for acquiring a plurality of first training samples, the first training samples comprise user portrait data of a sample user in at least one source field and interactive objects in the target field, the initial model is subjected to monitoring fine-tuning by utilizing the plurality of first training samples to obtain a first large language model for cross-field object recommendation, a first prompt instruction generated based on the user portrait data is used as input of the initial model in the monitoring fine-tuning process, the interactive objects in the target field are used as target output of the initial model, and the first prompt instruction is used for prompting the initial model to generate recommended objects belonging to the target field according to the user portrait data.
  12. 12. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 6 or the steps of the method of any one of claims 7 to 9.
  13. 13. An electronic device, comprising: One or more processors, and A memory associated with the one or more processors for storing program instructions that, when read for execution by the one or more processors, perform the steps of the method of any of claims 1 to 6, or perform the steps of the method of any of claims 7 to 9.
  14. 14. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps of the method of any one of claims 1 to 6 or the steps of the method of any one of claims 7 to 9.

Description

Cross-domain recommendation method, model training method and device Technical Field The application relates to the technical field of personalized recommendation, in particular to a cross-domain recommendation method, a model training method and a device. Background With the explosive development of the internet and the mobile internet, the amount of information that can be contacted by users increases exponentially, and a recommendation system becomes a core means for relieving information overload. Traditional recommendation relies on user-object interactions, learning user preferences through matrix decomposition, deep neural networks, and other techniques, and then performing similarity recommendation in the field. However, when user behaviors are scattered in multiple heterogeneous fields such as video, electronic commerce, music, news and the like, a single-field recommendation method faces bottlenecks such as sparse data and inconsistent feature space. In order to break the 'data island', a cross-domain recommendation framework is widely applied at present, and the sharing characteristics of users in the source domain and the target domain are utilized to conduct object recommendation, but the mode is limited by the distribution difference of the characteristics of the users in different domains, and the recommendation effect is poor. Disclosure of Invention In view of the above, the application provides a cross-domain recommendation method, a model training method and a device, so as to facilitate the improvement of the cross-domain recommendation effect. The application provides the following scheme: in a first aspect, a cross-domain recommendation method is provided, the method including: Acquiring user portrait data of a user in at least one source field; Generating a first prompt instruction based on the user portrait data, inputting the first prompt instruction into a first large language model, and acquiring an initial recommendation object set generated by the first large language model, wherein the first prompt instruction is used for prompting the first large language model to generate an initial recommendation object belonging to the target field according to the user portrait data; and matching the candidate objects in the candidate object set in the target field based on the initial recommendation object set to obtain a target recommendation object set, wherein each target recommendation object in the target recommendation object set is a candidate object matched with the initial recommendation object in the candidate object set, and the candidate objects in the candidate object set are preconfigured recommended objects. Optionally, matching the candidate objects in the candidate object set in the target field based on the initial recommended object set to obtain the target recommended object set, including: generating initial recommendation object description information corresponding to each initial recommendation object in the initial recommendation object set; converting each initial recommendation object description information into corresponding initial recommendation object vector representations respectively; and carrying out similarity retrieval based on the initial recommended object vector representation and candidate object vector representations respectively corresponding to the candidate objects in the candidate object set to obtain a target recommended object set. Optionally, generating initial recommended object description information corresponding to each initial recommended object in the initial recommended object set includes: Generating a second prompting instruction based on each initial recommended object in the initial recommended object set, and inputting the second prompting instruction into a second large language model, wherein the second prompting instruction is used for prompting the second large language model to generate initial recommended object description information corresponding to each initial recommended object respectively; And acquiring initial recommended object description information corresponding to each initial recommended object generated by the second large language model. Optionally, converting each initial recommendation object description information into a corresponding initial recommendation object vector representation, respectively, including: and respectively converting the description information of each initial recommended object into corresponding initial recommended object vector representation by using the embedded model. Optionally, the user profile data comprises user attribute data and behavior data of the user in at least one source domain, the behavior data comprising a behavior sequence and/or behavior statistics. Optionally, the first large language model is a cross-domain recommendation model obtained by embedding a domain type encoder in a backbone network of the pre-trained large language model and performing superv